diff --git a/.all-contributorsrc b/.all-contributorsrc
index 753598d6c3e..ced3b155bcb 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -158,7 +158,7 @@
]
},
{
- "login": "codydbentley",
+ "login": "sircodemane",
"name": "Cody Bentley",
"avatar_url": "https://avatars.githubusercontent.com/u/6968902?v=4",
"profile": "https://codybentley.dev/",
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 180057d45eb..84b7cb6dc5c 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -7,7 +7,7 @@ body:
- type: markdown
attributes:
value: |
- ***Please note: No new bug reports are being accepted for Wails v1***
+ ***Please note: No bug reports are currently being accepted for Wails v3***
Before submitting this issue, please do the following:
- Do a web search for your error. This usually leads to a much better understanding of the issue.
- Prove that the error is indeed a Wails bug and not an application bug, with a specific set of steps to reproduce.
@@ -84,4 +84,4 @@ body:
description: Add any other context about the problem here.
placeholder: Add any other context about the problem here.
validations:
- required: false
\ No newline at end of file
+ required: false
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 44bf5eef603..bf3d8de390b 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,3 +1,11 @@
+
+
+
# Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index f208e446a10..cd9cfa42a1c 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -2,7 +2,7 @@ name: Build + Test v2
on:
push:
- branches: [release/*, master]
+ branches: [release/*, master, bugfix/*]
workflow_dispatch:
jobs:
@@ -12,45 +12,59 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-latest, windows-latest, macos-latest]
- go-version: [1.18, 1.19]
+ os: [ubuntu-22.04, ubuntu-24.04, windows-latest, macos-latest, macos-11]
+ go-version: ['1.21']
steps:
- name: Checkout code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- - name: Install linux dependencies
- if: matrix.os == 'ubuntu-latest'
- run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
+ - uses: awalsh128/cache-apt-pkgs-action@latest
+ if: matrix.os == 'ubuntu-22.04'
+ with:
+ packages: libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
+ version: 1.0
+
+ - uses: awalsh128/cache-apt-pkgs-action@latest
+ if: matrix.os == 'ubuntu-24.04'
+ with:
+ packages: libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config
+ version: 1.0
- name: Setup Go
- uses: actions/setup-go@v3
+ uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
+ cache-dependency-path: ./v2/go.sum
- name: Run tests (mac)
- if: matrix.os == 'macos-latest'
+ if: matrix.os == 'macos-latest' || matrix.os == 'macos-11'
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
working-directory: ./v2
run: go test -v ./...
- name: Run tests (!mac)
- if: matrix.os != 'macos-latest'
+ if: matrix.os != 'macos-latest' && matrix.os != 'macos-11' && matrix.os != 'ubuntu-24.04'
working-directory: ./v2
run: go test -v ./...
+ - name: Run tests (Ubuntu 24.04)
+ if: matrix.os == 'ubuntu-24.04'
+ working-directory: ./v2
+ run: go test -v -tags webkit2_41 ./...
+
test_js:
name: Run JS Tests
if: github.repository == 'wailsapp/wails'
runs-on: ubuntu-latest
strategy:
matrix:
- node-version: [16.x]
+ node-version: [20.x]
steps:
- name: Checkout code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
@@ -72,7 +86,7 @@ jobs:
strategy:
fail-fast: true
matrix:
- os: [ubuntu-latest, windows-latest, macos-latest]
+ os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04, macos-11]
template:
[
svelte,
@@ -89,15 +103,16 @@ jobs:
vanilla-ts,
plain,
]
- go-version: [1.18, 1.19]
+ go-version: ['1.21']
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Setup Go
- uses: actions/setup-go@v3
+ uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
+ cache-dependency-path: ./v2/go.sum
- name: Build Wails CLI
run: |
@@ -105,14 +120,29 @@ jobs:
go install
wails -help
- - name: Install linux dependencies
- if: matrix.os == 'ubuntu-latest'
+ - name: Install linux dependencies ( 22.04 )
+ if: matrix.os == 'ubuntu-22.04'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
- - name: Generate template '${{ matrix.template }}'
+ - name: Install linux dependencies ( 24.04 )
+ if: matrix.os == 'ubuntu-24.04'
+ run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config
+
+ - name: Generate & Build template '${{ matrix.template }}'
+ if: matrix.os != 'ubuntu-24.04'
run: |
mkdir -p ./test-${{ matrix.template }}
cd ./test-${{ matrix.template }}
wails init -n ${{ matrix.template }} -t ${{ matrix.template }} -ci
cd ${{ matrix.template }}
wails build -v 2
+
+ - name: Generate & Build template '${{ matrix.template }}' (ubuntu-24.04)
+ if: matrix.os == 'ubuntu-24.04'
+ run: |
+ mkdir -p ./test-${{ matrix.template }}
+ cd ./test-${{ matrix.template }}
+ wails init -n ${{ matrix.template }} -t ${{ matrix.template }} -ci
+ cd ${{ matrix.template }}
+ wails build -v 2 -tags webkit2_41
+
diff --git a/.github/workflows/generate-sponsor-image.yml b/.github/workflows/generate-sponsor-image.yml
index 5f3006d7e7d..2c915c5d81b 100644
--- a/.github/workflows/generate-sponsor-image.yml
+++ b/.github/workflows/generate-sponsor-image.yml
@@ -16,7 +16,7 @@ jobs:
- name: Set Node
uses: actions/setup-node@v2
with:
- node-version: 16.x
+ node-version: 20.x
- name: Update Sponsors
run: cd scripts/sponsors && chmod 755 ./generate-sponsor-image.sh && ./generate-sponsor-image.sh
@@ -25,7 +25,7 @@ jobs:
SPONSORKIT_GITHUB_LOGIN: wailsapp
- name: Create Pull Request
- uses: peter-evans/create-pull-request@v4
+ uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: update sponsors.svg"
add-paths: "website/static/img/sponsors.svg"
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 6db750b73ef..c70050276e1 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- name: Verify Changed files
- uses: tj-actions/verify-changed-files@v11.1
+ uses: tj-actions/verify-changed-files@v17
id: verify-changed-files
with:
files: |
@@ -26,23 +26,50 @@ jobs:
run: |
echo "::warning::Feature branch does not contain any changes to the website."
+# lint_go:
+# name: Run Go Linters
+# runs-on: ubuntu-latest
+# steps:
+# - name: Checkout code
+# uses: actions/checkout@v4
+#
+# - name: Setup Go
+# uses: actions/setup-go@v4
+# with:
+# go-version: "1.21"
+#
+# - name: Update go modules
+# working-directory: ./v2
+# run: go mod tidy
+#
+# - name: Run Linter
+# uses: golangci/golangci-lint-action@v3
+# with:
+# version: v1.54
+# working-directory: ./v2
+# args: --timeout=10m0s --config ./.golangci.yml
+
test_go:
name: Run Go Tests
runs-on: ${{ matrix.os }}
if: github.event.review.state == 'approved'
strategy:
matrix:
- os: [ubuntu-latest, windows-latest, macos-latest]
- go-version: [1.18, 1.19]
+ os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04]
+ go-version: ['1.21']
steps:
- name: Checkout code
uses: actions/checkout@v3
- - name: Install linux dependencies
- if: matrix.os == 'ubuntu-latest'
+ - name: Install linux dependencies ( 22.04 )
+ if: matrix.os == 'ubuntu-22.04'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
+ - name: Install linux dependencies ( 24.04 )
+ if: matrix.os == 'ubuntu-24.04'
+ run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config
+
- name: Setup Go
uses: actions/setup-go@v3
with:
@@ -56,6 +83,11 @@ jobs:
run: go test -v ./...
- name: Run tests (!mac)
- if: matrix.os != 'macos-latest'
+ if: matrix.os != 'macos-latest' && matrix.os != 'ubuntu-24.04'
working-directory: ./v2
run: go test -v ./...
+
+ - name: Run tests (Ubuntu 24.04)
+ if: matrix.os == 'ubuntu-24.04'
+ working-directory: ./v2
+ run: go test -v -tags webkit2_41 ./...
diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml
new file mode 100644
index 00000000000..453e4cb8546
--- /dev/null
+++ b/.github/workflows/semgrep.yml
@@ -0,0 +1,24 @@
+on:
+ workflow_dispatch: {}
+ pull_request: {}
+ push:
+ branches:
+ - main
+ - master
+ paths:
+ - .github/workflows/semgrep.yml
+ schedule:
+ # random HH:MM to avoid a load spike on GitHub Actions at 00:00
+ - cron: 14 16 * * *
+name: Semgrep
+jobs:
+ semgrep:
+ name: semgrep/ci
+ runs-on: ubuntu-20.04
+ env:
+ SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
+ container:
+ image: returntocorp/semgrep
+ steps:
+ - uses: actions/checkout@v3
+ - run: semgrep ci
diff --git a/.github/workflows/sync-translated-documents.yml b/.github/workflows/sync-translated-documents.yml
index 2a014fd240a..0aa06f11e13 100644
--- a/.github/workflows/sync-translated-documents.yml
+++ b/.github/workflows/sync-translated-documents.yml
@@ -2,6 +2,8 @@ name: Sync Translations
on:
workflow_dispatch:
+ schedule:
+ - cron: "0 0 * * *"
jobs:
sync-translated-documents:
@@ -13,7 +15,7 @@ jobs:
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
- node-version: 18.x
+ node-version: 20.x
- name: Install Task
uses: arduino/setup-task@v1
diff --git a/.github/workflows/upload-source-documents.yml b/.github/workflows/upload-source-documents.yml
index c94245ba507..df15246fcc4 100644
--- a/.github/workflows/upload-source-documents.yml
+++ b/.github/workflows/upload-source-documents.yml
@@ -15,7 +15,7 @@ jobs:
- name: Verify Changed files
id: changed-files
- uses: tj-actions/changed-files@v35
+ uses: tj-actions/changed-files@v41
with:
files: |
website/**/*.mdx
@@ -25,7 +25,7 @@ jobs:
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
- node-version: 18.x
+ node-version: 20.x
- name: Setup Task
uses: arduino/setup-task@v1
diff --git a/.gitignore b/.gitignore
index cca5546860c..e7888b44a42 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,3 +36,6 @@ v2/cmd/wails/internal/commands/initialise/templates/testtemplates/
/v3/examples/build/bin/testapp
/websitev3/site/
/v3/examples/plugins/bin/testapp
+
+# Temporary called mkdocs, should be renamed to more standard -website or similar
+/mkdocs-website/site
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000000..52b962c555e
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,3 @@
+website
+v2
+v3
\ No newline at end of file
diff --git a/.prettierrc.yml b/.prettierrc.yml
new file mode 100644
index 00000000000..685d8b6e758
--- /dev/null
+++ b/.prettierrc.yml
@@ -0,0 +1,6 @@
+overrides:
+ - files:
+ - "**/*.md"
+ options:
+ printWidth: 80
+ proseWrap: always
diff --git a/README.de.md b/README.de.md
new file mode 100644
index 00000000000..b1616d2f908
--- /dev/null
+++ b/README.de.md
@@ -0,0 +1,160 @@
+
+
+
+
+
+Erschaffe Desktop Anwendungen mit Go & Web Technologien.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
+[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md)
+
+
+
+
+
+## Inhaltsverzeichnis
+
+- [Inhaltsverzeichnis](#inhaltsverzeichnis)
+- [Einführung](#einführung)
+- [Funktionen](#funktionen)
+ - [Roadmap](#roadmap)
+- [Loslegen](#loslegen)
+- [Sponsoren](#sponsoren)
+- [FAQ](#faq)
+- [Sterne Überblick](#sterne-überblick)
+- [Mitwirkende](#mitwirkende)
+- [Lizenz](#lizenz)
+- [Inspiration](#inspiration)
+
+## Einführung
+
+Die herkömmliche Methode zur Bereitstellung von Web-Interfaces für Go ist über einen eingebauten Webserver.
+Wails nutzt einen anderen Weg. Es kann sowohl Go-Code als auch ein Web-Frontend in eine einzige Datei bauen.
+Beigelieferte Werkzeuge übernehmen die Projekterstellung, den Kompilierungsprozess und das bauen.
+Du musst nur kreativ werden.
+
+## Funktionen
+
+- Nutze Standard Go für das Backend
+- Nutze eine Frontend Technologie mit der du dich bereits auskennst um dein UI zu bauen.
+- Erschaffe schnell und einfach Frontends mit vorgefertigten Vorlagen für deine Go-Programme
+- Nutze Javascript um Go Methoden aufzurufen
+- Automatisch generierte Typescript Definitionen für deine Go Strukturen und Methoden
+- Native Dialoge und Menüs
+- Native Dark-/Lightmode Unterstützung
+- Unterstützt moderne Transluzenz- und Milchglaseffekte
+- Vereinheitlichtes Eventsystem zwischen Go und Javascript
+- Leistungsstarkes CLI-Tool zum einfachen erstellen und bauen von Projekten
+- Multiplattformen
+- Nutze native Render-Engines - _keine eingebetteten Browser_!
+
+### Roadmap
+
+Die Projekt Roadmap kann [hier](https://github.com/wailsapp/wails/discussions/1484) gefunden werden. Bitte lies diese
+durch bevor du eine Idee vorschlägst
+
+## Loslegen
+
+Die Installationsinstruktionen sind auf der [offiziellen Website](https://wails.io/docs/gettingstarted/installation).
+
+## Sponsoren
+
+Dieses Projekt wird von diesen freundlichen Leuten und Firmen unterstützt:
+
+
+
+
+
+
+## FAQ
+
+- Ist das eine Alternative zu Electron?
+
+ Hängt von deinen Anforderungen ab. Wails wurde entwickelt um das Go-Programmieren leicht zu machen und effiziente
+ Desktop-Anwendungen zu erstellen oder ein Frontend zu einer bestehenden Anwendung hinzuzufügen.
+ Wails bietet native Elemente wie Dialoge und Menüs und könnte somit als eine leichte effiziente Electron-Alternative
+ betrachtet werden.
+
+- Für wen ist dieses projekt geeignet?
+
+ Go Entwickler, die ein HTML/CSS/JS-Frontend in ihre Anwendung integrieren möchten, ohne einen Webserver zu erstellen und
+ einen Browser öffnen zu müssen, um dieses zu sehen
+
+- Wie kam es zu diesem Namen?
+
+ Als ich WebView sah dachte ich "Was ich wirklich will, ist ein Werkzeug für die Erstellung von WebView Anwendungen so wie Rails für Ruby".
+ Also war es zunächst ein Wortspiel (Webview on Rails). Zufälligerweise ist es auch ein Homophon des englischen Namens des [Landes](https://en.wikipedia.org/wiki/Wales), aus dem ich komme.
+ Also ist es dabei geblieben.
+
+## Sterne Überblick
+
+
+
+
+
+
+
+
+
+## Mitwirkende
+
+Die Liste der Mitwirkenden wird zu groß für diese Readme. All die fantastischen Menschen, die zu diesem
+Projekt beigetragen haben, haben [hier](https://wails.io/credits#contributors) ihre eigene Seite.
+
+## Lizenz
+
+[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
+
+## Inspiration
+
+Dieses Projekt wurde hauptsächlich zu den folgenden Alben entwickelt
+
+- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
+- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
+- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
+- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
+- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
+- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
+- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
+- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
+- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
+- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
+- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
+- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
+- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
diff --git a/README.es.md b/README.es.md
new file mode 100644
index 00000000000..59cbcf13265
--- /dev/null
+++ b/README.es.md
@@ -0,0 +1,169 @@
+
+
+
+
+
+ Construye aplicaciones de escritorio usando Go y tecnologías web.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
+[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
+[Türkçe](README.tr.md)
+
+
+
+
+
+## Tabla de Contenidos
+
+- [Tabla de Contenidos](#tabla-de-contenidos)
+- [Introducción](#introducción)
+- [Funcionalidades](#funcionalidades)
+ - [Plan de Trabajo](#plan-de-trabajo)
+- [Empezando](#empezando)
+- [Patrocinadores](#patrocinadores)
+- [Preguntas Frecuentes](#preguntas-frecuentes)
+- [Estrellas a lo Largo del Tiempo](#estrellas-a-lo-largo-del-tiempo)
+- [Colaboradores](#colaboradores)
+- [Licencia](#licencia)
+- [Inspiración](#inspiración)
+
+## Introducción
+
+El método tradicional para proveer una interfaz web en programas hechos con Go
+es a través del servidor web incorporado. Wails ofrece un enfoque diferente al
+permitir combinar el código hecho en Go con un frontend web en un solo archivo
+binario. Las herramientas que proporcionamos facilitan este trabajo para ti, al
+crear, compilar y empaquetar tu proyecto. ¡Lo único que debes hacer es ponerte
+creativo!
+
+## Funcionalidades
+
+- Utiliza Go estándar para el backend
+- Utiliza cualquier tecnología frontend con la que ya estés familiarizado para
+ construir tu interfaz de usuario
+- Crea rápidamente interfaces de usuario enriquecidas para tus programas en Go
+ utilizando plantillas predefinidas
+- Invoca fácilmente métodos de Go desde Javascript
+- Definiciones de Typescript generadas automáticamente para tus structs y
+ métodos de Go
+- Diálogos y menús nativos
+- Soporte nativo de modo oscuro / claro
+- Soporte de translucidez y efectos de ventana esmerilada
+- Sistema de eventos unificado entre Go y Javascript
+- Herramienta CLI potente para generar y construir tus proyectos rápidamente
+- Multiplataforma
+- Usa motores de renderizado nativos - ¡_sin navegador integrado_!
+
+### Plan de Trabajo
+
+El plan de trabajo se puede encontrar
+[aqui](https://github.com/wailsapp/wails/discussions/1484). Por favor,
+consúltalo antes de abrir una solicitud de mejora.
+
+## Empezando
+
+Las instrucciones de instalacion se encuentran en nuestra
+[pagina web oficial](https://wails.io/docs/gettingstarted/installation).
+
+## Patrocinadores
+
+Este Proyecto cuenta con el apoyo de estas amables personas/ compañías:
+
+
+
+
+
+
+## Preguntas Frecuentes
+
+- ¿Es esta una alternativa a Electron?
+
+ Depende de tus requisitos. Está diseñado para facilitar a los programadores de
+ Go la creación de aplicaciones de escritorio livianas o agregar una interfaz
+ gráfica a sus aplicaciones existentes. Wails ofrece elementos nativos como
+ menús y diálogos, por lo que podría considerarse una alternativa liviana a
+ Electron.
+
+- ¿A quien esta dirigido este proyecto?
+
+ El proyecto esta dirigido a programadores de Go que desean integrar una
+ interfaz HMTL/JS/CSS en sus aplicaciones, sin tener que recurrir a la creación
+ de un servidor y abrir el navegador para visualizarla.
+
+- ¿Cual es el significado del nombre?
+
+ Cuando vi WebView, pensé: "Lo que realmente quiero es una herramienta para
+ construir una aplicación WebView, algo similar a lo que Rails es para Ruby".
+ Así que inicialmente fue un juego de palabras (WebView en Rails). Además, por
+ casualidad, también es homófono del nombre en inglés del
+ [país](https://en.wikipedia.org/wiki/Wales) del que provengo. Así que se quedó
+ con ese nombre.
+
+## Estrellas a lo Largo del Tiempo
+
+[![Star History Chart](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
+
+## Colaboradores
+
+¡La lista de colaboradores se está volviendo demasiado grande para el archivo
+readme! Todas las personas increíbles que han contribuido a este proyecto tienen
+su propia página [aqui](https://wails.io/credits#contributors).
+
+## Licencia
+
+[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
+
+## Inspiración
+
+Este proyecto fue construido mientras se escuchaban estos álbumes:
+
+- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
+- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
+- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
+- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
+- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
+- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
+- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
+- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
+- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
+- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
+- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
+- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
+- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
+ [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
diff --git a/README.fr.md b/README.fr.md
new file mode 100644
index 00000000000..2f405b46a25
--- /dev/null
+++ b/README.fr.md
@@ -0,0 +1,144 @@
+
+
+
+
+
+ Créer des applications de bureau avec Go et les technologies Web.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
+[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
+[Türkçe](README.tr.md)
+
+
+
+
+
+## Sommaire
+
+- [Sommaire](#sommaire)
+- [Introduction](#introduction)
+- [Fonctionnalités](#fonctionnalités)
+ - [Feuille de route](#feuille-de-route)
+- [Démarrage](#démarrage)
+- [Les sponsors](#les-sponsors)
+- [Foire aux questions](#foire-aux-questions)
+- [Les étoiles au fil du temps](#les-étoiles-au-fil-du-temps)
+- [Les contributeurs](#les-contributeurs)
+- [License](#license)
+- [Inspiration](#inspiration)
+
+## Introduction
+
+La méthode traditionnelle pour fournir des interfaces web aux programmes Go consiste à utiliser un serveur web intégré. Wails propose une approche différente : il offre la possibilité d'intégrer à la fois le code Go et une interface web dans un seul binaire. Des outils sont fournis pour vous faciliter la tâche en gérant la création, la compilation et le regroupement des projets. Il ne vous reste plus qu'à faire preuve de créativité!
+
+## Fonctionnalités
+
+- Utiliser Go pour le backend
+- Utilisez n'importe quelle technologie frontend avec laquelle vous êtes déjà familier pour construire votre interface utilisateur.
+- Créez rapidement des interfaces riches pour vos programmes Go à l'aide de modèles prédéfinis.
+- Appeler facilement des méthodes Go à partir de Javascript
+- Définitions Typescript auto-générées pour vos structures et méthodes Go
+- Dialogues et menus natifs
+- Prise en charge native des modes sombre et clair
+- Prise en charge des effets modernes de translucidité et de "frosted window".
+- Système d'événements unifié entre Go et Javascript
+- Outil puissant pour générer et construire rapidement vos projets
+- Multiplateforme
+- Utilise des moteurs de rendu natifs - _pas de navigateur intégré_ !
+
+### Feuille de route
+
+La feuille de route du projet peut être consultée [ici](https://github.com/wailsapp/wails/discussions/1484). Veuillez consulter avant d'ouvrir une demande d'amélioration.
+
+## Démarrage
+
+Les instructions d'installation se trouvent sur le site [site officiel](https://wails.io/docs/gettingstarted/installation).
+
+## Les sponsors
+
+Ce projet est soutenu par ces personnes aimables et entreprises:
+
+
+
+
+
+
+## Foire aux questions
+
+- S'agit-il d'une alternative à Electron ?
+
+ Cela dépend de vos besoins. Il est conçu pour permettre aux programmeurs Go de créer facilement des applications de bureau légères ou d'ajouter une interface à leurs applications existantes. Wails offre des éléments natifs tels que des menus et des boîtes de dialogue, il peut donc être considéré comme une alternative légère à electron.
+
+- À qui s'adresse ce projet ?
+
+ Les programmeurs Go qui souhaitent intégrer une interface HTML/JS/CSS à leurs applications, sans avoir à créer un serveur et à ouvrir un navigateur pour l'afficher.
+
+- Pourquoi ce nom ??
+
+ Lorsque j'ai vu WebView, je me suis dit : "Ce que je veux vraiment, c'est un outil pour construire une application WebView, un peu comme Rails l'est pour Ruby". Au départ, il s'agissait donc d'un jeu de mots (Webview on Rails). Il se trouve que c'est aussi un homophone du nom anglais du [Pays](https://en.wikipedia.org/wiki/Wales) d'où je viens. Il s'est donc imposé.
+
+## Les étoiles au fil du temps
+
+[![Graphique de l'histoire des étoiles](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
+
+## Les contributeurs
+
+La liste des contributeurs devient trop importante pour le readme ! Toutes les personnes extraordinaires qui ont contribué à ce projet ont leur propre page [ici](https://wails.io/credits#contributors).
+
+## License
+
+[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
+
+## Inspiration
+
+Ce projet a été principalement codé sur les albums suivants :
+
+- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
+- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
+- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
+- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
+- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
+- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
+- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
+- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
+- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
+- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
+- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
+- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
+- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
diff --git a/README.ja.md b/README.ja.md
index f308fd7549d..d4edb662c87 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -42,7 +42,10 @@
-[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
+[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
+[Türkçe](README.tr.md)
@@ -52,17 +55,16 @@
- [目次](#目次)
- [はじめに](#はじめに)
- - [公式サイト](#公式サイト)
- - [ロードマップ](#ロードマップ)
- [特徴](#特徴)
-- [スポンサー](#スポンサー)
+ - [ロードマップ](#ロードマップ)
- [始め方](#始め方)
+- [スポンサー](#スポンサー)
- [FAQ](#faq)
- [スター数の推移](#スター数の推移)
- [コントリビューター](#コントリビューター)
-- [特記事項](#特記事項)
-- [スペシャルサンクス](#スペシャルサンクス)
- [ライセンス](#ライセンス)
+- [インスピレーション](#インスピレーション)
+
## はじめに
@@ -70,44 +72,35 @@ Go プログラムにウェブインタフェースを提供する従来の方
Wails では Go のコードとウェブフロントエンドを単一のバイナリにまとめる機能を提供します。
また、プロジェクトの作成、コンパイル、ビルドを行うためのツールが提供されています。あなたがすべきことは創造性を発揮することです!
-### 公式サイト
-
-Version 2:
-
-Wails v2 が 3 つのプラットフォームでベータ版としてリリースされました。興味のある方は[新しいウェブサイト](https://wails.io)をご覧ください。
-
-レガシー版 v1:
-
-レガシー版 v1 のドキュメントは[https://wails.app](https://wails.app)で見ることができます。
-
-### ロードマップ
-
-プロジェクトのロードマップは[こちら](https://github.com/wailsapp/wails/discussions/1484)になります。
-機能拡張のリクエストを出す前にご覧ください。
-
## 特徴
- バックエンドには Go を利用しています
- 使い慣れたフロントエンド技術を利用して UI を構築できます
-- あらかじめ用意されたテンプレートを利用することで、リッチなフロントエンドを備えた Go プログラムを作成できます
+- あらかじめ用意されたテンプレートを利用することで、リッチなフロントエンドを備えた Go プログラムを素早く作成できます
- JavaScript から Go のメソッドを簡単に呼び出すことができます
- あなたの書いた Go の構造体やメソットに応じた TypeScript の定義が自動生成されます
- ネイティブのダイアログとメニューが利用できます
+- ネイティブなダーク/ライトモードをサポートします
- モダンな半透明や「frosted window」エフェクトをサポートしています
- Go と JavaScript 間で統一されたイベント・システムを備えています
- プロジェクトを素早く生成して構築する強力な cli ツールを用意しています
- マルチプラットフォームに対応しています
- ネイティブなレンダリングエンジンを使用しています - _つまりブラウザを埋め込んでいるわけではありません!_
-## スポンサー
+### ロードマップ
-このプロジェクトは、以下の方々・企業によって支えられています。
-
+プロジェクトのロードマップは[こちら](https://github.com/wailsapp/wails/discussions/1484)になります。
+機能拡張のリクエストを出す前にご覧ください。
## 始め方
インストール方法は[公式サイト](https://wails.io/docs/gettingstarted/installation)に掲載されています。
+## スポンサー
+
+このプロジェクトは、以下の方々・企業によって支えられています。
+
+
## FAQ
- Electron の代替品になりますか?
@@ -128,20 +121,18 @@ Wails v2 が 3 つのプラットフォームでベータ版としてリリー
## スター数の推移
-[![スター数の推移](https://starchart.cc/wailsapp/wails.svg)](https://starchart.cc/wailsapp/wails)
+[![Star History Chart](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
## コントリビューター
貢献してくれた方のリストが大きくなりすぎて、readme に入りきらなくなりました!
このプロジェクトに貢献してくれた素晴らしい方々のページは[こちら](https://wails.io/credits#contributors)です。
-## 特記事項
+## ライセンス
-このプロジェクトは以下の方々の協力がなければ、実現しなかったと思います。
+[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
-- [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - 彼のサポートとフィードバックはとても大きいものでした。
-- [Serge Zaitsev](https://github.com/zserge) - Wails のウィンドウで使用している[Webview](https://github.com/zserge/webview)の作者です。
-- [Byron](https://github.com/bh90210) - 時には Byron が一人でこのプロジェクトを存続させてくれたこともありました。彼の素晴らしいインプットがなければ v1 に到達することはなかったでしょう。
+## インスピレーション
プロジェクトを進める際に、以下のアルバムたちも支えてくれています。
@@ -159,20 +150,3 @@ Wails v2 が 3 つのプラットフォームでベータ版としてリリー
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
-## スペシャルサンクス
-
-
-
- このプロジェクトを後援し、WailsをApple Siliconに移植する取り組みを支援してくれた Pace に とても 感謝しています!
- パワフルで素早く簡単に使えるプロジェクト管理ツールをお探しなら、ぜひチェックしてみてください!
-
-
-
- ライセンスを提供していただいたJetBrains社に感謝します!
- ロゴをクリックして、感謝の気持ちを伝えてください!
-
-
-
-## ライセンス
-
-[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
diff --git a/README.ko.md b/README.ko.md
index 441b77f6676..fc27dfbe1cf 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -42,7 +42,10 @@
-[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
+[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
+[Türkçe](README.tr.md)
diff --git a/README.md b/README.md
index 5910be65084..12ff1d6dc65 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,10 @@
-[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
+[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
+[Türkçe](README.tr.md)
@@ -84,7 +87,7 @@ make this easy for you by handling project creation, compilation and bundling. A
### Roadmap
The project roadmap may be found [here](https://github.com/wailsapp/wails/discussions/1484). Please consult
-this before open up an enhancement request.
+it before creating an enhancement request.
## Getting Started
@@ -120,7 +123,13 @@ This project is supported by these kind people / companies:
## Stargazers over time
-[![Star History Chart](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
+
+
+
+
+
+
+
## Contributors
diff --git a/README.pt-br.md b/README.pt-br.md
new file mode 100644
index 00000000000..8129ac853a0
--- /dev/null
+++ b/README.pt-br.md
@@ -0,0 +1,151 @@
+
+
+
+
+
+ Crie aplicativos de desktop usando Go e tecnologias Web.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
+[Türkçe](README.tr.md)
+
+
+
+
+
+## Índice
+
+- [Índice](#índice)
+- [Introdução](#introdução)
+- [Recursos e funcionalidades](#recursos-e-funcionalidades)
+ - [Plano de trabalho](#plano-de-trabalho)
+- [Iniciando](#iniciando)
+- [Patrocinadores](#patrocinadores)
+- [Perguntas frequentes](#perguntas-frequentes)
+- [Estrelas ao longo do tempo](#estrelas-ao-longo-do-tempo)
+- [Colaboradores](#colaboradores)
+- [Licença](#licença)
+- [Inspiração](#inspiração)
+
+## Introdução
+
+O método tradicional de fornecer interfaces da Web para programas Go é por meio de um servidor da Web integrado. Wails oferece uma
+abordagem: fornece a capacidade de agrupar o código Go e um front-end da Web em um único binário. As ferramentas são fornecidas para
+que torne isso mais fácil para você lidando com a criação, compilação e agrupamento de projetos. Tudo o que você precisa fazer é ser criativo!
+
+## Recursos e funcionalidades
+
+- Use Go padrão para o back-end
+- Use qualquer tecnologia de front-end com a qual você já esteja familiarizado para criar sua interface do usuário
+- Crie rapidamente um front-end avançado para seus programas Go usando modelos pré-construídos
+- Chame facilmente métodos Go com JavaScript
+- Definições TypeScript geradas automaticamente para suas estruturas e métodos Go
+- Diálogos e menus nativos
+- Suporte nativo ao modo escuro/claro
+- Suporta translucidez moderna e efeitos de "janela fosca"
+- Sistema de eventos unificado entre Go e JavaScript
+- Poderosa ferramenta cli para gerar e construir rapidamente seus projetos
+- Multiplataforma
+- Usa mecanismos de renderização nativos - _sem navegador incorporado_!
+
+### Plano de trabalho
+
+O plano de trabalho do projeto pode ser encontrado [aqui](https://github.com/wailsapp/wails/discussions/1484). Por favor consulte
+isso antes de abrir um pedido de melhoria.
+
+## Iniciando
+
+As instruções de instalação estão no [site oficial](https://wails.io/docs/gettingstarted/installation).
+
+## Patrocinadores
+
+Este projeto é apoiado por estas simpáticas pessoas/empresas:
+
+
+
+
+
+
+## Perguntas frequentes
+
+- Esta é uma alternativa ao Electron?
+
+ Depende de seus requisitos. Ele foi projetado para tornar mais fácil para os programadores Go criar aplicações desktop
+ e adicionar um front-end aos seus aplicativos existentes. O Wails oferece elementos nativos, como menus
+ e diálogos, por isso pode ser considerada uma alternativa leve, se comparado ao Electron.
+
+- A quem se destina este projeto?
+
+ Programadores Go que desejam agrupar um front-end HTML/JS/CSS com seus aplicativos, sem recorrer à criação de um
+ servidor e abrir um navegador para visualizá-lo.
+
+- Qual é o significado do nome?
+
+ Quando vi o WebView, pensei "O que eu realmente quero é ferramentas para construir um aplicativo WebView, algo semelhante ao que Rails é para Ruby". Portanto, inicialmente era um jogo de palavras (WebView on Rails). Por acaso, também era um homófono do
+ Nome em inglês para o [país](https://en.wikipedia.org/wiki/Wales) de onde eu sou. Então ficou com esse nome.
+
+## Estrelas ao longo do tempo
+
+[![Star History Chart](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
+
+## Colaboradores
+
+A lista de colaboradores está ficando grande demais para o arquivo readme! Todas as pessoas incríveis que contribuíram para o
+projeto tem sua própria página [aqui](https://wails.io/credits#contributors).
+
+## Licença
+
+[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
+
+## Inspiração
+
+Este projeto foi construído ouvindo esses álbuns:
+
+- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
+- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
+- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
+- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
+- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
+- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
+- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
+- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
+- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
+- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
+- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
+- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
+- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
diff --git a/README.ru.md b/README.ru.md
new file mode 100644
index 00000000000..4a24b9bcb3c
--- /dev/null
+++ b/README.ru.md
@@ -0,0 +1,153 @@
+
+
+
+
+
+ Собирайте Desktop приложения используя Go и Web технологии
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
+[Türkçe](README.tr.md)
+
+
+
+
+
+## Содержание
+
+- [Содержание](#содержание)
+- [Вступление](#вступление)
+- [Особенности](#особенности)
+ - [Roadmap](#roadmap)
+- [Быстрый старт](#быстрый-старт)
+- [Спонсоры](#спонсоры)
+- [FAQ](#faq)
+- [График звёздочек](#график-звёздочек-репозитория-относительно-времени)
+- [Контребьюторы](#контребьюторы)
+- [Лицензия](#лицензия)
+- [Вдохновение](#вдохновение)
+
+## Вступление
+
+Обычно, веб-интерфейсы для программ Go - это встроенный веб-сервер и веб-браузер.
+У Walls другой подход: он оборачивает как код Go, так и веб-интерфейс в один бинарник (EXE файл).
+Облегчает вам создание вашего приложения, управляя созданием, компиляцией и объединением проектов.
+Все ограничивается лишь вашей фантазией!
+
+## Особенности
+
+- Использование Go для backend
+- Поддержка любой frontend технологии, с которой вы уже знакомы для создания вашего UI
+- Быстрое создание frontend для ваших программ, используя готовые шаблоны
+- Очень лёгкий вызов функций Go из JavaScript
+- Автогенерация TypeScript типов для Go структур и функций
+- Нативные диалоги и меню
+- Нативная поддержка тёмной и светлой темы
+- Поддержка современных эффектов прозрачности и "матового окна"
+- Единая система эвентов для Go и JavaScript
+- Мощный CLI для быстрого создания ваших проектов
+- Мультиплатформенность
+- Использование нативного движка рендеринга - нет встроенному браузеру!
+
+### Roadmap
+
+Roadmap проекта вы можете найти [здесь](https://github.com/wailsapp/wails/discussions/1484).
+Пожалуйста, проконсультируйтесь перед предложением улучшения.
+
+## Быстрый старт
+
+Инструкции по установке находятся на [официальном сайте](https://wails.io/docs/gettingstarted/installation).
+
+## Спонсоры
+
+Проект поддерживается этими добрыми людьми / компаниями:
+
+
+
+
+
+
+## FAQ
+
+- Это альтернатива Electron?
+
+ Зависит от ваших требований. Wails разработан для легкого создания Desktop приложений или
+ расширения интерфейсной части существующих приложений для программистов на Go. Wails действительно
+ предлагает встроенные элементы, такие как меню и диалоги, так что его можно считать облегченной альтернативой Electron.
+
+- Для кого предназначен этот проект?
+
+ Для Golang программистов, которые хотят создавать приложения, используя HTML, JS и CSS,
+ без создания веб-сервера и открытия браузера для их просмотра.
+
+- Что это за название?
+
+ Когда я увидел WebView, я подумал: "Что мне действительно нужно, так это инструменты для создания приложения WebView,
+ немного похожие на Rails для Ruby". Изначально это была игра слов (Webview on Rails). Просто так получилось, что это
+ также омофон английского названия для [Страны](https://en.wikipedia.org/wiki/Wales) от куда я родом. Так что это прижилось.
+
+## График звёздочек репозитория по времени
+
+[![График звёзд](https://api.star-history.com/svg?repos=wailsapp/wails&type=Date)](https://star-history.com/#wailsapp/wails&Date)
+
+## Контрибьюторы
+
+Список участников слишком велик для README! У всех замечательных людей, которые внесли свой вклад в этот
+проект, есть своя [страничка](https://wails.io/credits#contributors).
+
+## Лицензия
+
+[![Статус FOSSA](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
+
+## Вдохновение
+
+Этот проект был создан, в основном, под эти альбомы:
+
+- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
+- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
+- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
+- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
+- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
+- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
+- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
+- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
+- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
+- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
+- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
+- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
+- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
diff --git a/README.tr.md b/README.tr.md
new file mode 100644
index 00000000000..b9e88c0b916
--- /dev/null
+++ b/README.tr.md
@@ -0,0 +1,156 @@
+
+
+
+
+
+ Go ve Web Teknolojilerini kullanarak masaüstü uygulamaları oluşturun.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
+[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) ·
+[Türkçe](README.tr.md)
+
+
+
+
+
+## İçerik
+
+- [İçerik](#içerik)
+- [Giriş](#giriş)
+- [Özellikler](#özellikler)
+ - [Yol Haritası](#yol-haritası)
+- [Başlarken](#başlarken)
+- [Sponsorlar](#sponsorlar)
+- [Sıkça sorulan sorular](#sıkça-sorulan-sorular)
+- [Zaman içinda yıldızlayanlar](#zaman-içinde-yıldızlayanlar)
+- [Katkıda bulunanlar](#katkıda-bulunanlar)
+- [Lisans](#lisans)
+- [İlham](#ilham)
+
+## Giriş
+
+Go programlarına web arayüzleri sağlamak için geleneksel yöntem, yerleşik bir web sunucusu kullanmaktır. Wails, farklı bir yaklaşım sunar: Hem Go kodunu hem de bir web ön yüzünü tek bir ikili dosyada paketleme yeteneği sağlar. Proje oluşturma, derleme ve paketleme işlemlerini kolaylaştıran araçlar sunar. Tek yapmanız gereken yaratıcı olmaktır!
+
+## Özellikler
+
+- Backend için standart Go kullanın
+- Kullanıcı arayüzünüzü oluşturmak için zaten aşina olduğunuz herhangi bir frontend teknolojisini kullanın
+- Hazır şablonlar kullanarak Go programlarınız için hızlıca zengin ön yüzler oluşturun
+- Javascript'ten Go metodlarını kolayca çağırın
+- Go yapı ve metodlarınız için otomatik oluşturulan Typescript tanımları
+- Yerel Diyaloglar ve Menüler
+- Yerel Karanlık / Aydınlık mod desteği
+- Modern saydamlık ve "buzlu cam" efektlerini destekler
+- Go ve Javascript arasında birleşik olay sistemi
+- Projelerinizi hızlıca oluşturmak ve derlemek için güçlü bir komut satırı aracı
+- Çoklu platform desteği
+- Yerel render motorlarını kullanır - _gömülü tarayıcı yok_!
+
+
+### Yol Haritesı
+
+Proje yol haritasına [buradan](https://github.com/wailsapp/wails/discussions/1484) ulaşabilirsiniz. Lütfen bir iyileştirme talebi oluşturmadan önce danışın.
+
+
+## Başlarken
+
+Kurulum talimatları [resmi web sitesinde](https://wails.io/docs/gettingstarted/installation) bulunmaktadır.
+
+
+## Sponsorlar
+
+Bu proje, aşağıdaki nazik insanlar / şirketler tarafından desteklenmektedir:
+
+
+
+
+
+
+## Sıkça Sorulan Sorular
+
+- Bu Electron'a alternatif mi?
+
+ Gereksinimlerinize bağlıdır. Go programcılarının hafif masaüstü uygulamaları yapmasını veya mevcut uygulamalarına bir ön yüz eklemelerini kolaylaştırmak için tasarlanmıştır. Wails, menüler ve diyaloglar gibi yerel öğeler sunduğundan, hafif bir Electron alternatifi olarak kabul edilebilir.
+
+- Bu proje kimlere yöneliktir?
+
+ HTML/JS/CSS ön yüzünü uygulamalarıyla birlikte paketlemek isteyen, ancak bir sunucu oluşturup bir tarayıcı açmaya başvurmadan bunu yapmak isteyen Go programcıları için.
+
+- İsmin anlamı nedir?
+
+ WebView'i gördüğümde, "Aslında istediğim şey, WebView uygulaması oluşturmak için araçlar, biraz Rails'in Ruby için olduğu gibi" diye düşündüm. Bu nedenle başlangıçta kelime oyunu (Rails üzerinde Webview) olarak ortaya çıktı. Ayrıca, benim geldiğim [ülkenin](https://en.wikipedia.org/wiki/Wales) İngilizce adıyla homofon olması tesadüf oldu. Bu yüzden bu isim kaldı.
+
+
+## Zaman içinda yıldızlayanlar
+
+
+
+
+
+
+
+
+
+## Katkıda Bulunanlar
+
+Katkıda bulunanların listesi, README için çok büyük hale geldi! Bu projeye katkıda bulunan tüm harika insanların kendi sayfaları [burada](https://wails.io/credits#contributors) bulunmaktadır.
+
+
+## Lisans
+
+[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
+
+## İlham
+
+Bu proje esas olarak aşağıdaki albümler dinlenilerek kodlandı:
+
+- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
+- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
+- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
+- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
+- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
+- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
+- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
+- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
+- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
+- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
+- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
+- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
+- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
+
diff --git a/README.uz.md b/README.uz.md
new file mode 100644
index 00000000000..88744e94ecd
--- /dev/null
+++ b/README.uz.md
@@ -0,0 +1,159 @@
+
+
+
+
+
+ Go va Web texnologiyalaridan foydalangan holda ish stoli ilovalarini yarating
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
+[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz) · [Deutsch](README.de.md) ·
+[Türkçe](README.tr.md)
+
+
+
+
+
+## Tarkib
+
+- [Tarkib](#tarkib)
+- [Kirish](#kirish)
+- [Xususiyatlari](#xususiyatlari)
+ - [Yo'l xaritasi](#yol-xaritasi)
+- [Ishni boshlash](#ishni-boshlash)
+- [Homiylar](#homiylar)
+- [FAQ](#faq)
+- [Vaqt o'tishi bilan yulduzlar](#vaqt-otishi-bilan-yulduzlar)
+- [Ishtirokchilar](#homiylar)
+- [Litsenziya](#litsenziya)
+- [Ilhomlanish](#ilhomlanish)
+
+## Kirish
+
+Odatda, Go dasturlari uchun veb-interfeyslar o'rnatilgan veb-server va veb-brauzerdir.
+Walls boshqacha yondashuvni qo'llaydi: u Go kodini ham, veb-interfeysni ham bitta ikkilik (e.g: EXE)fayliga o'raydi.
+Loyihalarni yaratish, kompilyatsiya qilish va birlashtirishni boshqarish orqali ilovangizni yaratishni osonlashtiradi.
+Hamma narsa faqat sizning tasavvuringiz bilan cheklangan!
+
+## Xususiyatlari
+
+- Backend uchun standart Go dan foydalaning
+- UI yaratish uchun siz allaqachon tanish bo'lgan har qanday frontend texnologiyasidan foydalaning
+- Oldindan tayyorlangan shablonlardan foydalanib, Go dasturlaringiz uchun tezda boy frontendlarni yarating
+- Javascriptdan Go methodlarini osongina chaqiring
+- Go struktura va methodlari uchun avtomatik yaratilgan Typescript ta'riflari
+- Mahalliy Dialoglar va Menyular
+- Mahalliy Dark / Light rejimini qo'llab-quvvatlash
+- Zamonaviy shaffoflik va "muzli oyna" effektlarini qo'llab-quvvatlaydi
+- Go va Javascript o'rtasidagi yagona hodisa tizimi
+- Loyihalaringizni tezda yaratish va qurish uchun kuchli cli vositasi
+- Ko'p platformali
+- Mahalliy renderlash mexanizmlaridan foydalanadi - _o'rnatilgan brauzer yo'q_!
+
+### Yo'l xaritasi
+
+Loyihaning yoʻl xaritasini [bu yerdan](https://github.com/wailsapp/wails/discussions/1484) topish mumkin. Iltimos, maslahatlashing
+Buni yaxshilash so'rovini ochishdan oldin.
+
+## Ishni boshlash
+
+O'rnatish bo'yicha ko'rsatmalar [Rasmiy veb saytda](https://wails.io/docs/gettingstarted/installation) mavjud.
+
+## Homiylar
+
+Ushbu loyiha quyidagi mehribon odamlar / kompaniyalar tomonidan qo'llab-quvvatlanadi:
+
+
+
+
+
+
+## FAQ
+
+- Bu Elektronga muqobilmi?
+
+ Sizning talablaringizga bog'liq. Bu Go dasturchilariga yengil ish stoli yaratishni osonlashtirish uchun yaratilgan
+ ilovalar yoki ularning mavjud ilovalariga frontend qo'shing. Wails menyular kabi mahalliy elementlarni taklif qiladi
+ va dialoglar, shuning uchun uni yengil elektron muqobili deb hisoblash mumkin.
+
+- Ushbu loyiha kimlar uchun?
+
+ Server yaratmasdan va uni ko'rish uchun brauzerni ochmasdan, o'z ilovalari bilan HTML/JS/CSS orqali frontendini birlashtirmoqchi bo'lgan dasturchilar uchun.
+
+- Bu qanday nom?
+
+ Men WebViewni ko'rganimda, men shunday deb o'yladim: "Menga WebView ilovasini yaratish uchun vositalar kerak.
+ biroz Rails for Rubyga o'xshaydi." Demak, dastlab bu so'zlar ustida o'yin edi (Railsda Webview). Shunday bo'ldi.
+ u men kelgan [Mamlakat](https://en.wikipedia.org/wiki/Wales)ning inglizcha nomining omofonidir.
+
+## Vaqt o'tishi bilan yulduzlar
+
+
+
+
+
+
+
+
+
+## Ishtirokchilar
+
+Ishtirokchilar roʻyxati oʻqish uchun juda kattalashib bormoqda! Bunga hissa qo'shgan barcha ajoyib odamlarning
+loyihada o'z sahifasi bor [bu yerga](https://wails.io/credits#contributors).
+
+## Litsenziya
+
+[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
+
+## Ilhomlanish
+
+Ushbu loyiha asosan quyidagi albomlar uchun kodlangan:
+
+- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
+- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
+- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
+- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
+- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
+- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
+- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
+- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
+- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
+- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
+- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
+- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
+- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
diff --git a/README.zh-Hans.md b/README.zh-Hans.md
index 69d456e7823..baeeb420e5b 100644
--- a/README.zh-Hans.md
+++ b/README.zh-Hans.md
@@ -42,7 +42,10 @@
-[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
+[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
+[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
+[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
+[Türkçe](README.tr.md)
@@ -87,7 +90,7 @@
## 快速入门
-使用说明在 [官网](https://wails.io/docs/gettingstarted/installation)。
+使用说明在 [官网](https://wails.io/zh-Hans/docs/gettingstarted/installation/)。
## 赞助商
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000000..cb096f8727a
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,38 @@
+# Security Policy
+
+## Supported Versions
+
+| Version | Supported |
+| ------- | ------------------ |
+| 2.x.x | :white_check_mark: |
+| 3.0.x-alpha | :x: |
+
+
+## Reporting a Vulnerability
+
+If you believe you have found a security vulnerability in our project, we encourage you to let us know right away.
+We will investigate all legitimate reports and do our best to quickly fix the problem.
+
+Before reporting though, please review our security policy below.
+
+### How to Report
+
+To report a security vulnerability, please use GitHub's [private vulnerability reporting](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability) feature. If possible, please include as much information as possible.
+This may include steps to reproduce, impact of the vulnerability, and anything else you believe would help us understand the problem.
+**Please do not include any sensitive or personal information in your report**.
+
+### What to Expect
+
+When you report a vulnerability, here's what you can expect:
+
+- **Acknowledgement**: We will acknowledge your email within 48 hours, and you'll receive a more detailed response to your email within 72 hours indicating the next steps in handling your report.
+
+- **Updates**: After the initial reply to your report, our team will keep you informed of the progress being made towards a fix and full announcement. These updates will be sent at least once a week.
+
+- **Confidentiality**: We will maintain strict confidentiality of your report until the security issue is resolved.
+
+- **Issue Resolution**: If the issue is confirmed, we will release a patch as soon as possible depending on complexity of the fix.
+
+- **Recognition**: We recognize and appreciate every individual who helps us identify and fix vulnerabilities in our project. While we do not currently have a bounty program, we would be happy to publicly acknowledge your responsible disclosure.
+
+We strive to make Wails safe for everyone, and we greatly appreciate the assistance of security researchers and users in helping us identify and fix vulnerabilities. Thank you for your contribution to the security of this project.
diff --git a/Taskfile.yaml b/Taskfile.yaml
index 73fef3cc0fc..7cc16582560 100644
--- a/Taskfile.yaml
+++ b/Taskfile.yaml
@@ -2,8 +2,19 @@
version: "3"
-vars:
- GREETING: Hello, World!
+includes:
+ website:
+ taskfile: website
+ dir: website
+
+ v2:
+ taskfile: v2
+ dir: v2
+ optional: true
+ v3:
+ taskfile: v3
+ dir: v3
+ optional: true
tasks:
contributors:check:
@@ -18,7 +29,19 @@ tasks:
cmds:
- npx -y all-contributors-cli generate
- release:
- dir: v2/tools/release
+ format:md:
+ cmds:
+ - npx prettier --write "**/*.md"
+
+ format:
+ cmds:
+ - task: format:md
+
+ format-all-md:
cmds:
- - go run release.go {{.CLI_ARGS}}
+ - task: format:md
+ - task: website:format:md
+ - task: v2:format:md
+ # - task: v2:website:format
+ - task: v3:format:md
+ # - task: v3:website:format:md
diff --git a/scripts/sponsors/package-lock.json b/scripts/sponsors/package-lock.json
index 30997a31a39..93408870341 100644
--- a/scripts/sponsors/package-lock.json
+++ b/scripts/sponsors/package-lock.json
@@ -9,234 +9,487 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
- "sponsorkit": "^0.8.2"
+ "sponsorkit": "^0.9.3"
}
},
"node_modules/@antfu/utils": {
- "version": "0.5.2",
- "resolved": "https://registry.npmmirror.com/@antfu/utils/-/utils-0.5.2.tgz",
- "integrity": "sha512-CQkeV+oJxUazwjlHD0/3ZD08QWKuGQkhnrKo3e6ly5pd48VUpXbb77q0xMU4+vc2CkJnDS02Eq/M9ugyX20XZA=="
- },
- "node_modules/ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
+ "version": "0.7.6",
+ "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.6.tgz",
+ "integrity": "sha512-pvFiLP2BeOKA/ZOS6jxx4XhKzdVLHDhGlFEaZ2flWWYf2xOqVniqpk38I04DFRyz+L0ASggl7SkItTc+ZLju4w==",
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
}
},
- "node_modules/ansi-escape-sequences": {
- "version": "4.1.0",
- "resolved": "https://registry.npmmirror.com/ansi-escape-sequences/-/ansi-escape-sequences-4.1.0.tgz",
- "integrity": "sha512-dzW9kHxH011uBsidTXd14JXgzye/YLb2LzeKZ4bsgl/Knwx8AtbSFkkGxagdNOoh0DlqHCmfiEjWKBaqjOanVw==",
+ "node_modules/@emnapi/runtime": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.1.0.tgz",
+ "integrity": "sha512-gCGlE0fJGWalfy+wbFApjhKn6uoSVvopru77IPyxNKkjkaiSx2HxDS7eOYSmo9dcMIhmmIvoxiC3N9TM1c3EaA==",
+ "optional": true,
"dependencies": {
- "array-back": "^3.0.1"
- },
- "engines": {
- "node": ">=8.0.0"
+ "tslib": "^2.4.0"
}
},
- "node_modules/ansi-escape-sequences/node_modules/array-back": {
- "version": "3.1.0",
- "resolved": "https://registry.npmmirror.com/array-back/-/array-back-3.1.0.tgz",
- "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==",
+ "node_modules/@img/sharp-darwin-arm64": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.3.tgz",
+ "integrity": "sha512-FaNiGX1MrOuJ3hxuNzWgsT/mg5OHG/Izh59WW2mk1UwYHUwtfbhk5QNKYZgxf0pLOhx9ctGiGa2OykD71vOnSw==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
"engines": {
- "node": ">=6"
+ "glibc": ">=2.26",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-arm64": "1.0.2"
}
},
- "node_modules/ansi-regex": {
- "version": "3.0.1",
- "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-3.0.1.tgz",
- "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==",
+ "node_modules/@img/sharp-darwin-x64": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.3.tgz",
+ "integrity": "sha512-2QeSl7QDK9ru//YBT4sQkoq7L0EAJZA3rtV+v9p8xTKl4U1bUqTIaCnoC7Ctx2kCjQgwFXDasOtPTCT8eCTXvw==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
"engines": {
- "node": ">=4"
+ "glibc": ">=2.26",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-x64": "1.0.2"
}
},
- "node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.2.tgz",
+ "integrity": "sha512-tcK/41Rq8IKlSaKRCCAuuY3lDJjQnYIW1UXU1kxcEKrfL8WR7N6+rzNoOxoQRJWTAECuKwgAHnPvqXGN8XfkHA==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
"engines": {
- "node": ">=8"
+ "macos": ">=11",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
},
"funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/array-back": {
- "version": "2.0.0",
- "resolved": "https://registry.npmmirror.com/array-back/-/array-back-2.0.0.tgz",
- "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==",
- "dependencies": {
- "typical": "^2.6.1"
- },
+ "node_modules/@img/sharp-libvips-darwin-x64": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.2.tgz",
+ "integrity": "sha512-Ofw+7oaWa0HiiMiKWqqaZbaYV3/UGL2wAPeLuJTx+9cXpCRdvQhCLG0IH8YGwM0yGWGLpsF4Su9vM1o6aer+Fw==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
"engines": {
- "node": ">=4"
+ "macos": ">=10.13",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/asn1": {
- "version": "0.2.6",
- "resolved": "https://registry.npmmirror.com/asn1/-/asn1-0.2.6.tgz",
- "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
- "dependencies": {
- "safer-buffer": "~2.1.0"
+ "node_modules/@img/sharp-libvips-linux-arm": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.2.tgz",
+ "integrity": "sha512-iLWCvrKgeFoglQxdEwzu1eQV04o8YeYGFXtfWU26Zr2wWT3q3MTzC+QTCO3ZQfWd3doKHT4Pm2kRmLbupT+sZw==",
+ "cpu": [
+ "arm"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.28",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmmirror.com/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
+ "node_modules/@img/sharp-libvips-linux-arm64": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.2.tgz",
+ "integrity": "sha512-x7kCt3N00ofFmmkkdshwj3vGPCnmiDh7Gwnd4nUwZln2YjqPxV1NlTyZOvoDWdKQVDL911487HOueBvrpflagw==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
"engines": {
- "node": ">=0.8"
+ "glibc": ">=2.26",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+ "node_modules/@img/sharp-libvips-linux-s390x": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.2.tgz",
+ "integrity": "sha512-cmhQ1J4qVhfmS6szYW7RT+gLJq9dH2i4maq+qyXayUSn9/3iY2ZeWpbAgSpSVbV2E1JUL2Gg7pwnYQ1h8rQIog==",
+ "cpu": [
+ "s390x"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.28",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
},
- "node_modules/aws-sign2": {
- "version": "0.7.0",
- "resolved": "https://registry.npmmirror.com/aws-sign2/-/aws-sign2-0.7.0.tgz",
- "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==",
+ "node_modules/@img/sharp-libvips-linux-x64": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.2.tgz",
+ "integrity": "sha512-E441q4Qdb+7yuyiADVi5J+44x8ctlrqn8XgkDTwr4qPJzWkaHwD489iZ4nGDgcuya4iMN3ULV6NwbhRZJ9Z7SQ==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
"engines": {
- "node": "*"
+ "glibc": ">=2.26",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/aws4": {
- "version": "1.11.0",
- "resolved": "https://registry.npmmirror.com/aws4/-/aws4-1.11.0.tgz",
- "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.2.tgz",
+ "integrity": "sha512-3CAkndNpYUrlDqkCM5qhksfE+qSIREVpyoeHIU6jd48SJZViAmznoQQLAv4hVXF7xyUB9zf+G++e2v1ABjCbEQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "musl": ">=1.2.2",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
},
- "node_modules/balanced-match": {
+ "node_modules/@img/sharp-libvips-linuxmusl-x64": {
"version": "1.0.2",
- "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.2.tgz",
+ "integrity": "sha512-VI94Q6khIHqHWNOh6LLdm9s2Ry4zdjWJwH56WoiJU7NTeDwyApdZZ8c+SADC8OH98KWNQXnE01UdJ9CSfZvwZw==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "musl": ">=1.2.2",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
},
- "node_modules/base64-js": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
+ "node_modules/@img/sharp-linux-arm": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.3.tgz",
+ "integrity": "sha512-Q7Ee3fFSC9P7vUSqVEF0zccJsZ8GiiCJYGWDdhEjdlOeS9/jdkyJ6sUSPj+bL8VuOYFSbofrW0t/86ceVhx32w==",
+ "cpu": [
+ "arm"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.28",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm": "1.0.2"
+ }
},
- "node_modules/bcrypt-pbkdf": {
- "version": "1.0.2",
- "resolved": "https://registry.npmmirror.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
- "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
- "dependencies": {
- "tweetnacl": "^0.14.3"
+ "node_modules/@img/sharp-linux-arm64": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.3.tgz",
+ "integrity": "sha512-Zf+sF1jHZJKA6Gor9hoYG2ljr4wo9cY4twaxgFDvlG0Xz9V7sinsPp8pFd1XtlhTzYo0IhDbl3rK7P6MzHpnYA==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.26",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm64": "1.0.2"
}
},
- "node_modules/bl": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
- "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
- "dependencies": {
- "buffer": "^5.5.0",
- "inherits": "^2.0.4",
- "readable-stream": "^3.4.0"
+ "node_modules/@img/sharp-linux-s390x": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.3.tgz",
+ "integrity": "sha512-vFk441DKRFepjhTEH20oBlFrHcLjPfI8B0pMIxGm3+yilKyYeHEVvrZhYFdqIseSclIqbQ3SnZMwEMWonY5XFA==",
+ "cpu": [
+ "s390x"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.28",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-s390x": "1.0.2"
}
},
- "node_modules/boolbase": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
- "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
+ "node_modules/@img/sharp-linux-x64": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.3.tgz",
+ "integrity": "sha512-Q4I++herIJxJi+qmbySd072oDPRkCg/SClLEIDh5IL9h1zjhqjv82H0Seupd+q2m0yOfD+/fJnjSoDFtKiHu2g==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.26",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-x64": "1.0.2"
+ }
},
- "node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
+ "node_modules/@img/sharp-linuxmusl-arm64": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.3.tgz",
+ "integrity": "sha512-qnDccehRDXadhM9PM5hLvcPRYqyFCBN31kq+ErBSZtZlsAc1U4Z85xf/RXv1qolkdu+ibw64fUDaRdktxTNP9A==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "musl": ">=1.2.2",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.2"
}
},
- "node_modules/buffer": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
+ "node_modules/@img/sharp-linuxmusl-x64": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.3.tgz",
+ "integrity": "sha512-Jhchim8kHWIU/GZ+9poHMWRcefeaxFIs9EBqf9KtcC14Ojk6qua7ghKiPs0sbeLbLj/2IGBtDcxHyjCdYWkk2w==",
+ "cpu": [
+ "x64"
],
- "dependencies": {
- "base64-js": "^1.3.1",
- "ieee754": "^1.1.13"
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "musl": ">=1.2.2",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.2"
}
},
- "node_modules/busboy": {
- "version": "1.6.0",
- "resolved": "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz",
- "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
+ "node_modules/@img/sharp-wasm32": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.3.tgz",
+ "integrity": "sha512-68zivsdJ0koE96stdUfM+gmyaK/NcoSZK5dV5CAjES0FUXS9lchYt8LAB5rTbM7nlWtxaU/2GON0HVN6/ZYJAQ==",
+ "cpu": [
+ "wasm32"
+ ],
+ "optional": true,
"dependencies": {
- "streamsearch": "^1.1.0"
+ "@emnapi/runtime": "^1.1.0"
},
"engines": {
- "node": ">=10.16.0"
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==",
+ "node_modules/@img/sharp-win32-ia32": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.3.tgz",
+ "integrity": "sha512-CyimAduT2whQD8ER4Ux7exKrtfoaUiVr7HG0zZvO0XTFn2idUWljjxv58GxNTkFb8/J9Ub9AqITGkJD6ZginxQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
"engines": {
- "node": ">=4"
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
}
},
- "node_modules/caseless": {
- "version": "0.12.0",
- "resolved": "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw=="
+ "node_modules/@img/sharp-win32-x64": {
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.3.tgz",
+ "integrity": "sha512-viT4fUIDKnli3IfOephGnolMzhz5VaTvDRkYqtZxOMIoMQ4MrAziO7pT1nVnOt2FAm7qW5aa+CCc13aEY6Le0g==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
},
- "node_modules/chownr": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
- "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
+ "node_modules/acorn": {
+ "version": "8.11.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
+ "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
},
- "node_modules/cliss": {
- "version": "0.0.2",
- "resolved": "https://registry.npmmirror.com/cliss/-/cliss-0.0.2.tgz",
- "integrity": "sha512-6rj9pgdukjT994Md13JCUAgTk91abAKrygL9sAvmHY4F6AKMOV8ccGaxhUUfcBuyg3sundWnn3JE0Mc9W6ZYqw==",
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dependencies": {
- "command-line-usage": "^4.0.1",
- "deepmerge": "^2.0.0",
- "get-stdin": "^5.0.1",
- "inspect-parameters-declaration": "0.0.9",
- "object-to-arguments": "0.0.8",
- "pipe-functions": "^1.3.0",
- "strip-ansi": "^4.0.0",
- "yargs-parser": "^7.0.0"
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
+ "node_modules/boolbase": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
+ },
"node_modules/cliui": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
@@ -306,51 +559,14 @@
"simple-swizzle": "^0.2.2"
}
},
- "node_modules/combined-stream": {
- "version": "1.0.8",
- "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
- "dependencies": {
- "delayed-stream": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/command-line-usage": {
- "version": "4.1.0",
- "resolved": "https://registry.npmmirror.com/command-line-usage/-/command-line-usage-4.1.0.tgz",
- "integrity": "sha512-MxS8Ad995KpdAC0Jopo/ovGIroV/m0KHwzKfXxKag6FHOkGsH8/lv5yjgablcRxCJJC0oJeUMuO/gmaq+Wq46g==",
- "dependencies": {
- "ansi-escape-sequences": "^4.0.0",
- "array-back": "^2.0.0",
- "table-layout": "^0.4.2",
- "typical": "^2.6.1"
- },
+ "node_modules/consola": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz",
+ "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==",
"engines": {
- "node": ">=4.0.0"
+ "node": "^14.18.0 || >=16.10.0"
}
},
- "node_modules/commander": {
- "version": "2.20.3",
- "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
- },
- "node_modules/consola": {
- "version": "2.15.3",
- "resolved": "https://registry.npmmirror.com/consola/-/consola-2.15.3.tgz",
- "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw=="
- },
- "node_modules/core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ=="
- },
"node_modules/css-select": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz",
@@ -377,69 +593,32 @@
"url": "https://github.com/sponsors/fb55"
}
},
- "node_modules/dashdash": {
- "version": "1.14.1",
- "resolved": "https://registry.npmmirror.com/dashdash/-/dashdash-1.14.1.tgz",
- "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==",
- "dependencies": {
- "assert-plus": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/decompress-response": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+ "node_modules/datauri": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/datauri/-/datauri-4.1.0.tgz",
+ "integrity": "sha512-y17kh32+I82G+ED9MNWFkZiP/Cq/vO1hN9+tSZsT9C9qn3NrvcBnh7crSepg0AQPge1hXx2Ca44s1FRdv0gFWA==",
"dependencies": {
- "mimic-response": "^3.1.0"
- },
- "engines": {
- "node": ">=10"
+ "image-size": "1.0.0",
+ "mimer": "^2.0.2"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/deep-extend": {
- "version": "0.6.0",
- "resolved": "https://registry.npmmirror.com/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/deepmerge": {
- "version": "2.2.1",
- "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-2.2.1.tgz",
- "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==",
- "engines": {
- "node": ">=0.10.0"
+ "node": ">= 10"
}
},
"node_modules/defu": {
- "version": "6.1.1",
- "resolved": "https://registry.npmmirror.com/defu/-/defu-6.1.1.tgz",
- "integrity": "sha512-aA964RUCsBt0FGoNIlA3uFgo2hO+WWC0fiC6DBps/0SFzkKcYoM/3CzVLIa5xSsrFjdioMdYgAIbwo80qp2MoA=="
- },
- "node_modules/delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
- "engines": {
- "node": ">=0.4.0"
- }
+ "version": "6.1.3",
+ "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.3.tgz",
+ "integrity": "sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ=="
},
"node_modules/destr": {
- "version": "1.2.1",
- "resolved": "https://registry.npmmirror.com/destr/-/destr-1.2.1.tgz",
- "integrity": "sha512-ud8w0qMLlci6iFG7CNgeRr8OcbUWMsbfjtWft1eJ5Luqrz/M8Ebqk/KCzne8rKUlIQWWfLv0wD6QHrqOf4GshA=="
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.2.tgz",
+ "integrity": "sha512-65AlobnZMiCET00KaFFjUefxDX0khFA/E4myqZ7a6Sq1yZtR8+FVIvilVX66vF2uobSumxooYZChiRPCKNqhmg=="
},
"node_modules/detect-libc": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",
- "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz",
+ "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
"engines": {
"node": ">=8"
}
@@ -483,33 +662,27 @@
}
},
"node_modules/domutils": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz",
- "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
+ "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==",
"dependencies": {
"dom-serializer": "^2.0.0",
"domelementtype": "^2.3.0",
- "domhandler": "^5.0.1"
+ "domhandler": "^5.0.3"
},
"funding": {
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
"node_modules/dotenv": {
- "version": "16.0.3",
- "resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-16.0.3.tgz",
- "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==",
+ "version": "16.3.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
+ "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==",
"engines": {
"node": ">=12"
- }
- },
- "node_modules/ecc-jsbn": {
- "version": "0.1.2",
- "resolved": "https://registry.npmmirror.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
- "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==",
- "dependencies": {
- "jsbn": "~0.1.0",
- "safer-buffer": "^2.1.0"
+ },
+ "funding": {
+ "url": "https://github.com/motdotla/dotenv?sponsor=1"
}
},
"node_modules/emoji-regex": {
@@ -517,18 +690,10 @@
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
- "node_modules/end-of-stream": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
- "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
- "dependencies": {
- "once": "^1.4.0"
- }
- },
"node_modules/entities": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz",
- "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==",
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"engines": {
"node": ">=0.12"
},
@@ -544,185 +709,12 @@
"node": ">=6"
}
},
- "node_modules/expand-template": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
- "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"engines": {
- "node": ">=6"
- }
- },
- "node_modules/extend": {
- "version": "3.0.2",
- "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz",
- "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
- },
- "node_modules/extsprintf": {
- "version": "1.3.0",
- "resolved": "https://registry.npmmirror.com/extsprintf/-/extsprintf-1.3.0.tgz",
- "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==",
- "engines": [
- "node >=0.6.0"
- ]
- },
- "node_modules/fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
- },
- "node_modules/fast-json-stable-stringify": {
- "version": "2.1.0",
- "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
- },
- "node_modules/find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmmirror.com/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==",
- "dependencies": {
- "locate-path": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/for-each-property": {
- "version": "0.0.4",
- "resolved": "https://registry.npmmirror.com/for-each-property/-/for-each-property-0.0.4.tgz",
- "integrity": "sha512-xYs28PM0CKXETFzuGC6ZooH0voZlsSDZwidJcy92flQJi3PK7i3gZx23xHXCPOaD4zmet3bDo+wS7E7SujrlCw==",
- "dependencies": {
- "get-prototype-chain": "^1.0.1"
- }
- },
- "node_modules/for-each-property-deep": {
- "version": "0.0.3",
- "resolved": "https://registry.npmmirror.com/for-each-property-deep/-/for-each-property-deep-0.0.3.tgz",
- "integrity": "sha512-qzP8QkODWVVRPpWiBZacSbBl67cTTWoBfxMG0wE46AsS1yl7qv05sGN+dHvD4s4tnvl/goe6Sp4qBI+rlVBgNg==",
- "dependencies": {
- "for-each-property": "0.0.4"
- }
- },
- "node_modules/forever-agent": {
- "version": "0.6.1",
- "resolved": "https://registry.npmmirror.com/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/form-data": {
- "version": "2.3.3",
- "resolved": "https://registry.npmmirror.com/form-data/-/form-data-2.3.3.tgz",
- "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
- "dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.6",
- "mime-types": "^2.1.12"
- },
- "engines": {
- "node": ">= 0.12"
- }
- },
- "node_modules/fs-constants": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
- "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
- },
- "node_modules/fs-extra": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz",
- "integrity": "sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=14.14"
- }
- },
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
- },
- "node_modules/get-caller-file": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "engines": {
- "node": "6.* || 8.* || >= 10.*"
- }
- },
- "node_modules/get-prototype-chain": {
- "version": "1.0.1",
- "resolved": "https://registry.npmmirror.com/get-prototype-chain/-/get-prototype-chain-1.0.1.tgz",
- "integrity": "sha512-2m7WZ0jveIg/dAbCbpUxEToaJ8Dmti5EkgDP8YM3UpHUT6SAORjE2odP8XQGNVGXMHi8q8cCCoy3HTByTaTVTw==",
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/get-stdin": {
- "version": "5.0.1",
- "resolved": "https://registry.npmmirror.com/get-stdin/-/get-stdin-5.0.1.tgz",
- "integrity": "sha512-jZV7n6jGE3Gt7fgSTJoz91Ak5MuTLwMwkoYdjxuJ/AmjIsE1UC03y/IWkZCQGEvVNS9qoRNwy5BCqxImv0FVeA==",
- "engines": {
- "node": ">=0.12.0"
- }
- },
- "node_modules/getpass": {
- "version": "0.1.7",
- "resolved": "https://registry.npmmirror.com/getpass/-/getpass-0.1.7.tgz",
- "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==",
- "dependencies": {
- "assert-plus": "^1.0.0"
- }
- },
- "node_modules/github-from-package": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
- "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
- },
- "node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/graceful-fs": {
- "version": "4.2.10",
- "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.10.tgz",
- "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
- },
- "node_modules/har-schema": {
- "version": "2.0.0",
- "resolved": "https://registry.npmmirror.com/har-schema/-/har-schema-2.0.0.tgz",
- "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/har-validator": {
- "version": "5.1.5",
- "resolved": "https://registry.npmmirror.com/har-validator/-/har-validator-5.1.5.tgz",
- "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
- "deprecated": "this library is no longer supported",
- "dependencies": {
- "ajv": "^6.12.3",
- "har-schema": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
+ "node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/he": {
@@ -733,200 +725,25 @@
"he": "bin/he"
}
},
- "node_modules/http-signature": {
- "version": "1.2.0",
- "resolved": "https://registry.npmmirror.com/http-signature/-/http-signature-1.2.0.tgz",
- "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==",
- "dependencies": {
- "assert-plus": "^1.0.0",
- "jsprim": "^1.2.2",
- "sshpk": "^1.7.0"
- },
- "engines": {
- "node": ">=0.8",
- "npm": ">=1.3.7"
- }
- },
- "node_modules/ieee754": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "node_modules/image-data-uri": {
- "version": "2.0.1",
- "resolved": "https://registry.npmmirror.com/image-data-uri/-/image-data-uri-2.0.1.tgz",
- "integrity": "sha512-BZh721F2Q5TwBdwpiqrBrHEdj8daj8KuMZK/DOCyqQlz1CqFhhuZWbK5ZCUnAvFJr8LaKHTaWl9ja3/a3DC2Ew==",
+ "node_modules/image-size": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.0.tgz",
+ "integrity": "sha512-JLJ6OwBfO1KcA+TvJT+v8gbE6iWbj24LyDNFgFEN0lzegn6cC6a/p3NIDaepMsJjQjlUWqIC7wJv8lBFxPNjcw==",
"dependencies": {
- "fs-extra": "^0.26.7",
- "magicli": "0.0.8",
- "mime-types": "^2.1.18",
- "request": "^2.88.0"
+ "queue": "6.0.2"
},
"bin": {
- "image-data-uri": "bin/magicli.js"
- }
- },
- "node_modules/image-data-uri/node_modules/fs-extra": {
- "version": "0.26.7",
- "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-0.26.7.tgz",
- "integrity": "sha512-waKu+1KumRhYv8D8gMRCKJGAMI9pRnPuEb1mvgYD0f7wBscg+h6bW4FDTmEZhB9VKxvoTtxW+Y7bnIlB7zja6Q==",
- "dependencies": {
- "graceful-fs": "^4.1.2",
- "jsonfile": "^2.1.0",
- "klaw": "^1.0.0",
- "path-is-absolute": "^1.0.0",
- "rimraf": "^2.2.8"
- }
- },
- "node_modules/image-data-uri/node_modules/jsonfile": {
- "version": "2.4.0",
- "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-2.4.0.tgz",
- "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==",
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
+ "image-size": "bin/image-size.js"
+ },
+ "engines": {
+ "node": ">=12.0.0"
}
},
"node_modules/inherits": {
"version": "2.0.4",
- "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
- "node_modules/ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
- },
- "node_modules/inspect-function": {
- "version": "0.3.4",
- "resolved": "https://registry.npmmirror.com/inspect-function/-/inspect-function-0.3.4.tgz",
- "integrity": "sha512-s0RsbJqK/sNZ+U1mykGoTickog3ea1A9Qk4mXniogOBu4PgkkZ56elScO7QC/r8D94lhGmJ2NyDI1ipOA/uq/g==",
- "dependencies": {
- "inspect-parameters-declaration": "0.0.8",
- "magicli": "0.0.8",
- "split-skip": "0.0.1",
- "stringify-parameters": "0.0.4",
- "unpack-string": "0.0.2"
- },
- "bin": {
- "inspect-function": "bin/magicli.js"
- }
- },
- "node_modules/inspect-function/node_modules/inspect-function": {
- "version": "0.2.2",
- "resolved": "https://registry.npmmirror.com/inspect-function/-/inspect-function-0.2.2.tgz",
- "integrity": "sha512-becs5gzcHwPrlHawscYkyQ/ShiOiosrXPhA5RVZ3qyWH4aWdD52RnMfXq/dwQXciHwiieD8aIPwdIWYv6eL+sQ==",
- "dependencies": {
- "split-skip": "0.0.1",
- "unpack-string": "0.0.2"
- }
- },
- "node_modules/inspect-function/node_modules/inspect-parameters-declaration": {
- "version": "0.0.8",
- "resolved": "https://registry.npmmirror.com/inspect-parameters-declaration/-/inspect-parameters-declaration-0.0.8.tgz",
- "integrity": "sha512-W4QzN1LgFmasKOM+NoLlDd2OAZM3enNZlVUOXoGQKmYBDFgxoPDOyebF55ALaf8avyM9TavNwibXxg347RrzCg==",
- "dependencies": {
- "magicli": "0.0.5",
- "split-skip": "0.0.2",
- "stringify-parameters": "0.0.4",
- "unpack-string": "0.0.2"
- },
- "bin": {
- "inspect-parameters-declaration": "bin/cli.js"
- }
- },
- "node_modules/inspect-function/node_modules/inspect-parameters-declaration/node_modules/magicli": {
- "version": "0.0.5",
- "resolved": "https://registry.npmmirror.com/magicli/-/magicli-0.0.5.tgz",
- "integrity": "sha512-wZbMtnl2v1b+Jp3xlqA9FU/O4I6YhGXR8xSY/eU2+gDAvut/F+W3gl4qs61iL4LELC7jqSAE6aAD5668EbmQHA==",
- "dependencies": {
- "commander": "^2.9.0",
- "get-stdin": "^5.0.1",
- "inspect-function": "^0.2.1",
- "pipe-functions": "^1.2.0"
- }
- },
- "node_modules/inspect-function/node_modules/inspect-parameters-declaration/node_modules/split-skip": {
- "version": "0.0.2",
- "resolved": "https://registry.npmmirror.com/split-skip/-/split-skip-0.0.2.tgz",
- "integrity": "sha512-weHOi8BolsDnGIwhhWHbA+wKSuSpvWwjRrdj8SdbIIis2vSwOE37CQP8x3EleuzxanUr3AK8BdUy4MkiOULPZg=="
- },
- "node_modules/inspect-function/node_modules/split-skip": {
- "version": "0.0.1",
- "resolved": "https://registry.npmmirror.com/split-skip/-/split-skip-0.0.1.tgz",
- "integrity": "sha512-7dkvq+gofI4M8zx4iZnEZ3O1s7FP4Y/iaIDHJh5RyWrs8idcPauFi2OZe3TBi36fLvR2j5z3kSzVtz6IhPdncQ=="
- },
- "node_modules/inspect-parameters-declaration": {
- "version": "0.0.9",
- "resolved": "https://registry.npmmirror.com/inspect-parameters-declaration/-/inspect-parameters-declaration-0.0.9.tgz",
- "integrity": "sha512-c3jrKKA1rwwrsjdGMAo2hFWV0vNe3/RKHxpE/OBt41LP3ynOVI1qmgxpZYK5SQu3jtWCyaho8L7AZzCjJ4mEUw==",
- "dependencies": {
- "magicli": "0.0.5",
- "split-skip": "0.0.2",
- "stringify-parameters": "0.0.4",
- "unpack-string": "0.0.2"
- },
- "bin": {
- "inspect-parameters-declaration": "bin/cli.js"
- }
- },
- "node_modules/inspect-parameters-declaration/node_modules/inspect-function": {
- "version": "0.2.2",
- "resolved": "https://registry.npmmirror.com/inspect-function/-/inspect-function-0.2.2.tgz",
- "integrity": "sha512-becs5gzcHwPrlHawscYkyQ/ShiOiosrXPhA5RVZ3qyWH4aWdD52RnMfXq/dwQXciHwiieD8aIPwdIWYv6eL+sQ==",
- "dependencies": {
- "split-skip": "0.0.1",
- "unpack-string": "0.0.2"
- }
- },
- "node_modules/inspect-parameters-declaration/node_modules/inspect-function/node_modules/split-skip": {
- "version": "0.0.1",
- "resolved": "https://registry.npmmirror.com/split-skip/-/split-skip-0.0.1.tgz",
- "integrity": "sha512-7dkvq+gofI4M8zx4iZnEZ3O1s7FP4Y/iaIDHJh5RyWrs8idcPauFi2OZe3TBi36fLvR2j5z3kSzVtz6IhPdncQ=="
- },
- "node_modules/inspect-parameters-declaration/node_modules/magicli": {
- "version": "0.0.5",
- "resolved": "https://registry.npmmirror.com/magicli/-/magicli-0.0.5.tgz",
- "integrity": "sha512-wZbMtnl2v1b+Jp3xlqA9FU/O4I6YhGXR8xSY/eU2+gDAvut/F+W3gl4qs61iL4LELC7jqSAE6aAD5668EbmQHA==",
- "dependencies": {
- "commander": "^2.9.0",
- "get-stdin": "^5.0.1",
- "inspect-function": "^0.2.1",
- "pipe-functions": "^1.2.0"
- }
- },
- "node_modules/inspect-property": {
- "version": "0.0.6",
- "resolved": "https://registry.npmmirror.com/inspect-property/-/inspect-property-0.0.6.tgz",
- "integrity": "sha512-LgjHkRl9W6bj2n+kWrAOgvCYPTYt+LanE4rtd/vKNq6yEb+SvVV7UTLzoSPpDX6/U1cAz7VfqPr+lPAIz7wHaQ==",
- "dependencies": {
- "for-each-property": "0.0.4",
- "for-each-property-deep": "0.0.3",
- "inspect-function": "^0.3.1"
- }
- },
"node_modules/is-arrayish": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
@@ -940,93 +757,18 @@
"node": ">=8"
}
},
- "node_modules/is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmmirror.com/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA=="
- },
- "node_modules/isstream": {
- "version": "0.1.2",
- "resolved": "https://registry.npmmirror.com/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g=="
- },
"node_modules/jiti": {
- "version": "1.16.0",
- "resolved": "https://registry.npmmirror.com/jiti/-/jiti-1.16.0.tgz",
- "integrity": "sha512-L3BJStEf5NAqNuzrpfbN71dp43mYIcBUlCRea/vdyv5dW/AYa1d4bpelko4SHdY3I6eN9Wzyasxirj1/vv5kmg==",
+ "version": "1.21.0",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
+ "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
"bin": {
"jiti": "bin/jiti.js"
}
},
- "node_modules/jsbn": {
- "version": "0.1.1",
- "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-0.1.1.tgz",
- "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg=="
- },
- "node_modules/json-schema": {
- "version": "0.4.0",
- "resolved": "https://registry.npmmirror.com/json-schema/-/json-schema-0.4.0.tgz",
- "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA=="
- },
- "node_modules/json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
- },
- "node_modules/json-stringify-safe": {
- "version": "5.0.1",
- "resolved": "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="
- },
- "node_modules/jsonfile": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/jsprim": {
- "version": "1.4.2",
- "resolved": "https://registry.npmmirror.com/jsprim/-/jsprim-1.4.2.tgz",
- "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
- "dependencies": {
- "assert-plus": "1.0.0",
- "extsprintf": "1.3.0",
- "json-schema": "0.4.0",
- "verror": "1.10.0"
- },
- "engines": {
- "node": ">=0.6.0"
- }
- },
- "node_modules/klaw": {
- "version": "1.3.1",
- "resolved": "https://registry.npmmirror.com/klaw/-/klaw-1.3.1.tgz",
- "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==",
- "optionalDependencies": {
- "graceful-fs": "^4.1.9"
- }
- },
- "node_modules/locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==",
- "dependencies": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/lodash.padend": {
- "version": "4.6.1",
- "resolved": "https://registry.npmmirror.com/lodash.padend/-/lodash.padend-4.6.1.tgz",
- "integrity": "sha512-sOQs2aqGpbl27tmCS1QNZA09Uqp01ZzWfDUoD+xzTii0E7dSQfRKcRetFwa+uXaxaqL+TKm7CgD2JdKP7aZBSw=="
+ "node_modules/jsonc-parser": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
+ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w=="
},
"node_modules/lru-cache": {
"version": "6.0.0",
@@ -1039,101 +781,37 @@
"node": ">=10"
}
},
- "node_modules/magicli": {
- "version": "0.0.8",
- "resolved": "https://registry.npmmirror.com/magicli/-/magicli-0.0.8.tgz",
- "integrity": "sha512-x/eBenweAHF+DsYy172sK4doRxZl0yrJnfxhLJiN7H6hPM3Ya0PfI6uBZshZ3ScFFSQD7HXgBqMdbnXKEZsO1g==",
- "dependencies": {
- "cliss": "0.0.2",
- "find-up": "^2.1.0",
- "for-each-property": "0.0.4",
- "inspect-property": "0.0.6"
- }
- },
- "node_modules/mime-db": {
- "version": "1.52.0",
- "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime-types": {
- "version": "2.1.35",
- "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
- "dependencies": {
- "mime-db": "1.52.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mimic-response": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dependencies": {
- "brace-expansion": "^1.1.7"
+ "node_modules/mimer": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/mimer/-/mimer-2.0.2.tgz",
+ "integrity": "sha512-izxvjsB7Ur5HrTbPu6VKTrzxSMBFBqyZQc6dWlZNQ4/wAvf886fD4lrjtFd8IQ8/WmZKdxKjUtqFFNaj3hQ52g==",
+ "bin": {
+ "mimer": "bin/mimer"
},
"engines": {
- "node": "*"
+ "node": ">= 12"
}
},
- "node_modules/minimist": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
- "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/mkdirp-classic": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
- "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
- },
- "node_modules/napi-build-utils": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
- "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
- },
- "node_modules/node-abi": {
- "version": "3.33.0",
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.33.0.tgz",
- "integrity": "sha512-7GGVawqyHF4pfd0YFybhv/eM9JwTtPqx0mAanQ146O3FlSh3pA24zf9IRQTOsfTSqXTNzPSP5iagAJ94jjuVog==",
+ "node_modules/mlly": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz",
+ "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==",
"dependencies": {
- "semver": "^7.3.5"
- },
- "engines": {
- "node": ">=10"
+ "acorn": "^8.10.0",
+ "pathe": "^1.1.1",
+ "pkg-types": "^1.0.3",
+ "ufo": "^1.3.0"
}
},
- "node_modules/node-addon-api": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
- "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA=="
- },
"node_modules/node-fetch-native": {
- "version": "0.1.8",
- "resolved": "https://registry.npmmirror.com/node-fetch-native/-/node-fetch-native-0.1.8.tgz",
- "integrity": "sha512-ZNaury9r0NxaT2oL65GvdGDy+5PlSaHTovT6JV5tOW07k1TQmgC0olZETa4C9KZg0+6zBr99ctTYa3Utqj9P/Q=="
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.4.1.tgz",
+ "integrity": "sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w=="
},
"node_modules/node-html-parser": {
- "version": "6.1.5",
- "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.5.tgz",
- "integrity": "sha512-fAaM511feX++/Chnhe475a0NHD8M7AxDInsqQpz6x63GRF7xYNdS8Vo5dKsIVPgsOvG7eioRRTZQnWBrhDHBSg==",
+ "version": "6.1.11",
+ "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.11.tgz",
+ "integrity": "sha512-FAgwwZ6h0DSDWxfD0Iq1tsDcBCxdJB1nXpLPPxX8YyVWzbfCjKWEzaynF4gZZ/8hziUmp7ZSaKylcn0iKhufUQ==",
"dependencies": {
"css-select": "^5.1.0",
"he": "1.2.0"
@@ -1150,267 +828,42 @@
"url": "https://github.com/fb55/nth-check?sponsor=1"
}
},
- "node_modules/oauth-sign": {
- "version": "0.9.0",
- "resolved": "https://registry.npmmirror.com/oauth-sign/-/oauth-sign-0.9.0.tgz",
- "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/object-to-arguments": {
- "version": "0.0.8",
- "resolved": "https://registry.npmmirror.com/object-to-arguments/-/object-to-arguments-0.0.8.tgz",
- "integrity": "sha512-BfWfuAwuhdH1bhMG5EG90WE/eckkBhBvnke8eSEkCDXoLE9Jk5JwYGTbCx1ehGwV48HvBkn62VukPBdlMUOY9w==",
- "dependencies": {
- "inspect-parameters-declaration": "0.0.10",
- "magicli": "0.0.5",
- "split-skip": "0.0.2",
- "stringify-parameters": "0.0.4",
- "unpack-string": "0.0.2"
- },
- "bin": {
- "object-to-arguments": "bin/cli.js"
- }
- },
- "node_modules/object-to-arguments/node_modules/inspect-function": {
- "version": "0.2.2",
- "resolved": "https://registry.npmmirror.com/inspect-function/-/inspect-function-0.2.2.tgz",
- "integrity": "sha512-becs5gzcHwPrlHawscYkyQ/ShiOiosrXPhA5RVZ3qyWH4aWdD52RnMfXq/dwQXciHwiieD8aIPwdIWYv6eL+sQ==",
+ "node_modules/ofetch": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.3.3.tgz",
+ "integrity": "sha512-s1ZCMmQWXy4b5K/TW9i/DtiN8Ku+xCiHcjQ6/J/nDdssirrQNOoB165Zu8EqLMA2lln1JUth9a0aW9Ap2ctrUg==",
"dependencies": {
- "split-skip": "0.0.1",
- "unpack-string": "0.0.2"
+ "destr": "^2.0.1",
+ "node-fetch-native": "^1.4.0",
+ "ufo": "^1.3.0"
}
},
- "node_modules/object-to-arguments/node_modules/inspect-function/node_modules/split-skip": {
- "version": "0.0.1",
- "resolved": "https://registry.npmmirror.com/split-skip/-/split-skip-0.0.1.tgz",
- "integrity": "sha512-7dkvq+gofI4M8zx4iZnEZ3O1s7FP4Y/iaIDHJh5RyWrs8idcPauFi2OZe3TBi36fLvR2j5z3kSzVtz6IhPdncQ=="
- },
- "node_modules/object-to-arguments/node_modules/inspect-parameters-declaration": {
- "version": "0.0.10",
- "resolved": "https://registry.npmmirror.com/inspect-parameters-declaration/-/inspect-parameters-declaration-0.0.10.tgz",
- "integrity": "sha512-L8/Bvt9iDXQTZ63xY5/MAyvzz+FagR/qGh1kIXvUpsno3AAE0Z95d6QO51zrcMGaEGpwh/57idfMxTxbvRmytg==",
- "dependencies": {
- "magicli": "0.0.5",
- "split-skip": "0.0.2",
- "stringify-parameters": "0.0.4",
- "unpack-string": "0.0.2"
- },
- "bin": {
- "inspect-parameters-declaration": "bin/cli.js"
- }
- },
- "node_modules/object-to-arguments/node_modules/magicli": {
- "version": "0.0.5",
- "resolved": "https://registry.npmmirror.com/magicli/-/magicli-0.0.5.tgz",
- "integrity": "sha512-wZbMtnl2v1b+Jp3xlqA9FU/O4I6YhGXR8xSY/eU2+gDAvut/F+W3gl4qs61iL4LELC7jqSAE6aAD5668EbmQHA==",
- "dependencies": {
- "commander": "^2.9.0",
- "get-stdin": "^5.0.1",
- "inspect-function": "^0.2.1",
- "pipe-functions": "^1.2.0"
- }
- },
- "node_modules/ohmyfetch": {
- "version": "0.4.21",
- "resolved": "https://registry.npmmirror.com/ohmyfetch/-/ohmyfetch-0.4.21.tgz",
- "integrity": "sha512-VG7f/JRvqvBOYvL0tHyEIEG7XHWm7OqIfAs6/HqwWwDfjiJ1g0huIpe5sFEmyb+7hpFa1EGNH2aERWR72tlClw==",
- "dependencies": {
- "destr": "^1.2.0",
- "node-fetch-native": "^0.1.8",
- "ufo": "^0.8.6",
- "undici": "^5.12.0"
- }
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dependencies": {
- "wrappy": "1"
- }
- },
- "node_modules/p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dependencies": {
- "p-try": "^1.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==",
- "dependencies": {
- "p-limit": "^1.1.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmmirror.com/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/performance-now": {
- "version": "2.1.0",
- "resolved": "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz",
- "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="
+ "node_modules/pathe": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz",
+ "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q=="
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
- "node_modules/pipe-functions": {
- "version": "1.3.0",
- "resolved": "https://registry.npmmirror.com/pipe-functions/-/pipe-functions-1.3.0.tgz",
- "integrity": "sha512-6Rtbp7criZRwedlvWbUYxqlqJoAlMvYHo2UcRWq79xZ54vZcaNHpVBOcWkX3ErT2aUA69tv+uiv4zKJbhD/Wgg=="
- },
- "node_modules/prebuild-install": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz",
- "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==",
- "dependencies": {
- "detect-libc": "^2.0.0",
- "expand-template": "^2.0.3",
- "github-from-package": "0.0.0",
- "minimist": "^1.2.3",
- "mkdirp-classic": "^0.5.3",
- "napi-build-utils": "^1.0.1",
- "node-abi": "^3.3.0",
- "pump": "^3.0.0",
- "rc": "^1.2.7",
- "simple-get": "^4.0.0",
- "tar-fs": "^2.0.0",
- "tunnel-agent": "^0.6.0"
- },
- "bin": {
- "prebuild-install": "bin.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/psl": {
- "version": "1.9.0",
- "resolved": "https://registry.npmmirror.com/psl/-/psl-1.9.0.tgz",
- "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
- },
- "node_modules/pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
- "node_modules/punycode": {
- "version": "2.1.1",
- "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.1.1.tgz",
- "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/qs": {
- "version": "6.5.3",
- "resolved": "https://registry.npmmirror.com/qs/-/qs-6.5.3.tgz",
- "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
- "engines": {
- "node": ">=0.6"
- }
- },
- "node_modules/rc": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+ "node_modules/pkg-types": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz",
+ "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==",
"dependencies": {
- "deep-extend": "^0.6.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- },
- "bin": {
- "rc": "cli.js"
+ "jsonc-parser": "^3.2.0",
+ "mlly": "^1.2.0",
+ "pathe": "^1.1.0"
}
},
- "node_modules/readable-stream": {
- "version": "3.6.1",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz",
- "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==",
+ "node_modules/queue": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz",
+ "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==",
"dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/reduce-flatten": {
- "version": "1.0.1",
- "resolved": "https://registry.npmmirror.com/reduce-flatten/-/reduce-flatten-1.0.1.tgz",
- "integrity": "sha512-j5WfFJfc9CoXv/WbwVLHq74i/hdTUpy+iNC534LxczMRP67vJeK3V9JOdnL0N1cIRbn9mYhE2yVjvvKXDxvNXQ==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/request": {
- "version": "2.88.2",
- "resolved": "https://registry.npmmirror.com/request/-/request-2.88.2.tgz",
- "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
- "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
- "dependencies": {
- "aws-sign2": "~0.7.0",
- "aws4": "^1.8.0",
- "caseless": "~0.12.0",
- "combined-stream": "~1.0.6",
- "extend": "~3.0.2",
- "forever-agent": "~0.6.1",
- "form-data": "~2.3.2",
- "har-validator": "~5.1.3",
- "http-signature": "~1.2.0",
- "is-typedarray": "~1.0.0",
- "isstream": "~0.1.2",
- "json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.19",
- "oauth-sign": "~0.9.0",
- "performance-now": "^2.1.0",
- "qs": "~6.5.2",
- "safe-buffer": "^5.1.2",
- "tough-cookie": "~2.5.0",
- "tunnel-agent": "^0.6.0",
- "uuid": "^3.3.2"
- },
- "engines": {
- "node": ">= 6"
+ "inherits": "~2.0.3"
}
},
"node_modules/require-directory": {
@@ -1421,31 +874,10 @@
"node": ">=0.10.0"
}
},
- "node_modules/rimraf": {
- "version": "2.7.1",
- "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz",
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- }
- },
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
- },
- "node_modules/safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
- },
"node_modules/semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
+ "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -1457,68 +889,42 @@
}
},
"node_modules/sharp": {
- "version": "0.31.3",
- "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz",
- "integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==",
+ "version": "0.33.3",
+ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.3.tgz",
+ "integrity": "sha512-vHUeXJU1UvlO/BNwTpT0x/r53WkLUVxrmb5JTgW92fdFCFk0ispLMAeu/jPO2vjkXM1fYUi3K7/qcLF47pwM1A==",
"hasInstallScript": true,
"dependencies": {
"color": "^4.2.3",
- "detect-libc": "^2.0.1",
- "node-addon-api": "^5.0.0",
- "prebuild-install": "^7.1.1",
- "semver": "^7.3.8",
- "simple-get": "^4.0.1",
- "tar-fs": "^2.1.1",
- "tunnel-agent": "^0.6.0"
+ "detect-libc": "^2.0.3",
+ "semver": "^7.6.0"
},
"engines": {
- "node": ">=14.15.0"
+ "libvips": ">=8.15.2",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/simple-concat": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
- "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "node_modules/simple-get": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
- "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "dependencies": {
- "decompress-response": "^6.0.0",
- "once": "^1.3.1",
- "simple-concat": "^1.0.0"
+ },
+ "optionalDependencies": {
+ "@img/sharp-darwin-arm64": "0.33.3",
+ "@img/sharp-darwin-x64": "0.33.3",
+ "@img/sharp-libvips-darwin-arm64": "1.0.2",
+ "@img/sharp-libvips-darwin-x64": "1.0.2",
+ "@img/sharp-libvips-linux-arm": "1.0.2",
+ "@img/sharp-libvips-linux-arm64": "1.0.2",
+ "@img/sharp-libvips-linux-s390x": "1.0.2",
+ "@img/sharp-libvips-linux-x64": "1.0.2",
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.2",
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.2",
+ "@img/sharp-linux-arm": "0.33.3",
+ "@img/sharp-linux-arm64": "0.33.3",
+ "@img/sharp-linux-s390x": "0.33.3",
+ "@img/sharp-linux-x64": "0.33.3",
+ "@img/sharp-linuxmusl-arm64": "0.33.3",
+ "@img/sharp-linuxmusl-x64": "0.33.3",
+ "@img/sharp-wasm32": "0.33.3",
+ "@img/sharp-win32-ia32": "0.33.3",
+ "@img/sharp-win32-x64": "0.33.3"
}
},
"node_modules/simple-swizzle": {
@@ -1529,26 +935,20 @@
"is-arrayish": "^0.3.1"
}
},
- "node_modules/split-skip": {
- "version": "0.0.2",
- "resolved": "https://registry.npmmirror.com/split-skip/-/split-skip-0.0.2.tgz",
- "integrity": "sha512-weHOi8BolsDnGIwhhWHbA+wKSuSpvWwjRrdj8SdbIIis2vSwOE37CQP8x3EleuzxanUr3AK8BdUy4MkiOULPZg=="
- },
"node_modules/sponsorkit": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/sponsorkit/-/sponsorkit-0.8.2.tgz",
- "integrity": "sha512-Gxh7hkTUuUVj823+BnwC77Rl5ztFEY00qA2QVULOU0N5qgj1YEP3/0BB/EayfPrHeV7HbAOwSeAnqC8/yoRABA==",
- "dependencies": {
- "consola": "^2.15.3",
- "dotenv": "^16.0.3",
- "fs-extra": "^11.1.0",
- "image-data-uri": "^2.0.1",
- "node-html-parser": "^6.1.5",
- "ohmyfetch": "^0.4.21",
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/sponsorkit/-/sponsorkit-0.9.3.tgz",
+ "integrity": "sha512-P7YLBr4Is+R7cl73E95wSCL/pKR8Cfqh156hQCcFxWZPxjGwt2BCKLd5S0Zx1XtvI5KrSbOczdjLQ5BVRk3L9Q==",
+ "dependencies": {
+ "consola": "^3.2.3",
+ "datauri": "^4.1.0",
+ "dotenv": "^16.3.1",
+ "node-html-parser": "^6.1.11",
+ "ofetch": "^1.3.3",
"picocolors": "^1.0.0",
- "sharp": "^0.31.3",
- "unconfig": "^0.3.7",
- "yargs": "^17.7.1"
+ "sharp": "^0.33.0",
+ "unconfig": "^0.3.11",
+ "yargs": "^17.7.2"
},
"bin": {
"sponsorkit": "bin/sponsorkit.js"
@@ -1557,46 +957,6 @@
"url": "https://github.com/sponsors/antfu"
}
},
- "node_modules/sshpk": {
- "version": "1.17.0",
- "resolved": "https://registry.npmmirror.com/sshpk/-/sshpk-1.17.0.tgz",
- "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
- "dependencies": {
- "asn1": "~0.2.3",
- "assert-plus": "^1.0.0",
- "bcrypt-pbkdf": "^1.0.0",
- "dashdash": "^1.12.0",
- "ecc-jsbn": "~0.1.1",
- "getpass": "^0.1.1",
- "jsbn": "~0.1.0",
- "safer-buffer": "^2.0.2",
- "tweetnacl": "~0.14.0"
- },
- "bin": {
- "sshpk-conv": "bin/sshpk-conv",
- "sshpk-sign": "bin/sshpk-sign",
- "sshpk-verify": "bin/sshpk-verify"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/streamsearch": {
- "version": "1.1.0",
- "resolved": "https://registry.npmmirror.com/streamsearch/-/streamsearch-1.1.0.tgz",
- "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
- "engines": {
- "node": ">=10.0.0"
- }
- },
- "node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
@@ -1629,220 +989,29 @@
"node": ">=8"
}
},
- "node_modules/stringify-parameters": {
- "version": "0.0.4",
- "resolved": "https://registry.npmmirror.com/stringify-parameters/-/stringify-parameters-0.0.4.tgz",
- "integrity": "sha512-H3L90ERn5UPtkpO8eugnKcLgpIVlvTyUTrcLGm607AV5JDH6z0GymtNLr3gjGlP6I6NB/mxNX9QpY6jEQGLPdQ==",
- "dependencies": {
- "magicli": "0.0.5",
- "unpack-string": "0.0.2"
- },
- "bin": {
- "stringify-parameters": "bin/cli.js"
- }
- },
- "node_modules/stringify-parameters/node_modules/inspect-function": {
- "version": "0.2.2",
- "resolved": "https://registry.npmmirror.com/inspect-function/-/inspect-function-0.2.2.tgz",
- "integrity": "sha512-becs5gzcHwPrlHawscYkyQ/ShiOiosrXPhA5RVZ3qyWH4aWdD52RnMfXq/dwQXciHwiieD8aIPwdIWYv6eL+sQ==",
- "dependencies": {
- "split-skip": "0.0.1",
- "unpack-string": "0.0.2"
- }
- },
- "node_modules/stringify-parameters/node_modules/magicli": {
- "version": "0.0.5",
- "resolved": "https://registry.npmmirror.com/magicli/-/magicli-0.0.5.tgz",
- "integrity": "sha512-wZbMtnl2v1b+Jp3xlqA9FU/O4I6YhGXR8xSY/eU2+gDAvut/F+W3gl4qs61iL4LELC7jqSAE6aAD5668EbmQHA==",
- "dependencies": {
- "commander": "^2.9.0",
- "get-stdin": "^5.0.1",
- "inspect-function": "^0.2.1",
- "pipe-functions": "^1.2.0"
- }
- },
- "node_modules/stringify-parameters/node_modules/split-skip": {
- "version": "0.0.1",
- "resolved": "https://registry.npmmirror.com/split-skip/-/split-skip-0.0.1.tgz",
- "integrity": "sha512-7dkvq+gofI4M8zx4iZnEZ3O1s7FP4Y/iaIDHJh5RyWrs8idcPauFi2OZe3TBi36fLvR2j5z3kSzVtz6IhPdncQ=="
- },
- "node_modules/strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==",
- "dependencies": {
- "ansi-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/table-layout": {
- "version": "0.4.5",
- "resolved": "https://registry.npmmirror.com/table-layout/-/table-layout-0.4.5.tgz",
- "integrity": "sha512-zTvf0mcggrGeTe/2jJ6ECkJHAQPIYEwDoqsiqBjI24mvRmQbInK5jq33fyypaCBxX08hMkfmdOqj6haT33EqWw==",
- "dependencies": {
- "array-back": "^2.0.0",
- "deep-extend": "~0.6.0",
- "lodash.padend": "^4.6.1",
- "typical": "^2.6.1",
- "wordwrapjs": "^3.0.0"
- },
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/tar-fs": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
- "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
- "dependencies": {
- "chownr": "^1.1.1",
- "mkdirp-classic": "^0.5.2",
- "pump": "^3.0.0",
- "tar-stream": "^2.1.4"
- }
- },
- "node_modules/tar-stream": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
- "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
- "dependencies": {
- "bl": "^4.0.3",
- "end-of-stream": "^1.4.1",
- "fs-constants": "^1.0.0",
- "inherits": "^2.0.3",
- "readable-stream": "^3.1.1"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/tough-cookie": {
- "version": "2.5.0",
- "resolved": "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz",
- "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
- "dependencies": {
- "psl": "^1.1.28",
- "punycode": "^2.1.1"
- },
- "engines": {
- "node": ">=0.8"
- }
- },
- "node_modules/tunnel-agent": {
- "version": "0.6.0",
- "resolved": "https://registry.npmmirror.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
- "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
- "dependencies": {
- "safe-buffer": "^5.0.1"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/tweetnacl": {
- "version": "0.14.5",
- "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA=="
- },
- "node_modules/typical": {
- "version": "2.6.1",
- "resolved": "https://registry.npmmirror.com/typical/-/typical-2.6.1.tgz",
- "integrity": "sha512-ofhi8kjIje6npGozTip9Fr8iecmYfEbS06i0JnIg+rh51KakryWF4+jX8lLKZVhy6N+ID45WYSFCxPOdTWCzNg=="
+ "node_modules/tslib": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
+ "optional": true
},
"node_modules/ufo": {
- "version": "0.8.6",
- "resolved": "https://registry.npmmirror.com/ufo/-/ufo-0.8.6.tgz",
- "integrity": "sha512-fk6CmUgwKCfX79EzcDQQpSCMxrHstvbLswFChHS0Vump+kFkw7nJBfTZoC1j0bOGoY9I7R3n2DGek5ajbcYnOw=="
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz",
+ "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA=="
},
"node_modules/unconfig": {
- "version": "0.3.7",
- "resolved": "https://registry.npmmirror.com/unconfig/-/unconfig-0.3.7.tgz",
- "integrity": "sha512-1589b7oGa8ILBYpta7TndM5mLHLzHUqBfhszeZxuUBrjO/RoQ52VGVWsS3w0C0GLNxO9RPmqkf6BmIvBApaRdA==",
- "dependencies": {
- "@antfu/utils": "^0.5.2",
- "defu": "^6.1.0",
- "jiti": "^1.16.0"
- }
- },
- "node_modules/undici": {
- "version": "5.21.0",
- "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz",
- "integrity": "sha512-HOjK8l6a57b2ZGXOcUsI5NLfoTrfmbOl90ixJDl0AEFG4wgHNDQxtZy15/ZQp7HhjkpaGlp/eneMgtsu1dIlUA==",
+ "version": "0.3.11",
+ "resolved": "https://registry.npmjs.org/unconfig/-/unconfig-0.3.11.tgz",
+ "integrity": "sha512-bV/nqePAKv71v3HdVUn6UefbsDKQWRX+bJIkiSm0+twIds6WiD2bJLWWT3i214+J/B4edufZpG2w7Y63Vbwxow==",
"dependencies": {
- "busboy": "^1.6.0"
+ "@antfu/utils": "^0.7.6",
+ "defu": "^6.1.2",
+ "jiti": "^1.20.0",
+ "mlly": "^1.4.2"
},
- "engines": {
- "node": ">=12.18"
- }
- },
- "node_modules/universalify": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
- "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/unpack-string": {
- "version": "0.0.2",
- "resolved": "https://registry.npmmirror.com/unpack-string/-/unpack-string-0.0.2.tgz",
- "integrity": "sha512-2ZFjp5aY7QwHE6HAp47RnKYfvgAQ5+NwbKq/ZVtty85RDb3/UaTeCfizo5L/fXzM7UkMP/zDtbV+kGW/iJiK6w=="
- },
- "node_modules/uri-js": {
- "version": "4.4.1",
- "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz",
- "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
- "dependencies": {
- "punycode": "^2.1.0"
- }
- },
- "node_modules/util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
- },
- "node_modules/uuid": {
- "version": "3.4.0",
- "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz",
- "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
- "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
- "bin": {
- "uuid": "bin/uuid"
- }
- },
- "node_modules/verror": {
- "version": "1.10.0",
- "resolved": "https://registry.npmmirror.com/verror/-/verror-1.10.0.tgz",
- "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==",
- "engines": [
- "node >=0.6.0"
- ],
- "dependencies": {
- "assert-plus": "^1.0.0",
- "core-util-is": "1.0.2",
- "extsprintf": "^1.2.0"
- }
- },
- "node_modules/wordwrapjs": {
- "version": "3.0.0",
- "resolved": "https://registry.npmmirror.com/wordwrapjs/-/wordwrapjs-3.0.0.tgz",
- "integrity": "sha512-mO8XtqyPvykVCsrwj5MlOVWvSnCdT+C+QVbm6blradR7JExAhbkZ7hZ9A+9NUtwzSqrlUo9a67ws0EiILrvRpw==",
- "dependencies": {
- "reduce-flatten": "^1.0.1",
- "typical": "^2.6.1"
- },
- "engines": {
- "node": ">=4.0.0"
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
}
},
"node_modules/wrap-ansi": {
@@ -1880,11 +1049,6 @@
"node": ">=8"
}
},
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
- },
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
@@ -1899,9 +1063,9 @@
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/yargs": {
- "version": "17.7.1",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz",
- "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==",
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
"dependencies": {
"cliui": "^8.0.1",
"escalade": "^3.1.1",
@@ -1915,14 +1079,6 @@
"node": ">=12"
}
},
- "node_modules/yargs-parser": {
- "version": "7.0.0",
- "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-7.0.0.tgz",
- "integrity": "sha512-WhzC+xgstid9MbVUktco/bf+KJG+Uu6vMX0LN1sLJvwmbCQVxb4D8LzogobonKycNasCZLdOzTAk1SK7+K7swg==",
- "dependencies": {
- "camelcase": "^4.1.0"
- }
- },
"node_modules/yargs/node_modules/yargs-parser": {
"version": "21.1.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
diff --git a/scripts/sponsors/package.json b/scripts/sponsors/package.json
index 70d6dc5ce9f..eb013cef60d 100644
--- a/scripts/sponsors/package.json
+++ b/scripts/sponsors/package.json
@@ -10,6 +10,6 @@
"author": "",
"license": "ISC",
"dependencies": {
- "sponsorkit": "^0.8.2"
+ "sponsorkit": "^0.9.3"
}
}
diff --git a/v2/.golangci.yml b/v2/.golangci.yml
new file mode 100644
index 00000000000..66b77ba7ff6
--- /dev/null
+++ b/v2/.golangci.yml
@@ -0,0 +1,162 @@
+# Options for analysis runner.
+run:
+ # Custom concurrency value
+ concurrency: 4
+
+ # Execution timeout
+ timeout: 10m
+
+ # Exit code when an issue is found.
+ issues-exit-code: 1
+
+ # Inclusion of test files
+ tests: false
+
+ modules-download-mode: readonly
+
+ allow-parallel-runners: false
+
+ go: '1.21'
+
+
+output:
+ # Runner output format
+ format: tab
+
+ # Print line of issue code
+ print-issued-lines: false
+
+ # Append linter to the output
+ print-linter-name: true
+
+ # Separate issues by line
+ uniq-by-line: true
+
+ # Output path prefixing
+ path-prefix: ""
+
+ # Sort results
+ sort-results: true
+
+
+# Specific linter configs
+linters-settings:
+ errcheck:
+ check-type-assertions: false
+ check-blank: false
+ ignore: fmt:.*
+ disable-default-exclusions: false
+
+ gofmt:
+ simplify: true
+
+ gofumpt:
+ extra-rules: false
+
+linters:
+ fast: false
+ # Enable all available linters.
+ enable-all: true
+ # Disable specific linters
+ disable:
+ - asasalint
+ - asciicheck
+ - bidichk
+ - bodyclose
+ - containedctx
+ - contextcheck
+ - cyclop
+ - deadcode
+ - decorder
+ - depguard
+ - dogsled
+ - dupl
+ - dupword
+ - durationcheck
+ - errchkjson
+ - errorlint
+ - execinquery
+ - exhaustive
+ - exhaustivestruct
+ - exhaustruct
+ - exportloopref
+ - forbidigo
+ - forcetypeassert
+ - funlen
+ - gci
+ - ginkgolinter
+ - gocheckcompilerdirectives
+ - gochecknoglobals
+ - gochecknoinits
+ - gocognit
+ - goconst
+ - gocritic
+ - gocyclo
+ - godot
+ - godox
+ - goerr113
+ - goheader
+ - goimports
+ - golint
+ - gomnd
+ - gomoddirectives
+ - gomodguard
+ - goprintffuncname
+ - gosec
+ - gosmopolitan
+ - govet
+ - grouper
+ - ifshort
+ - importas
+ - ineffassign
+ - interfacebloat
+ - interfacer
+ - ireturn
+ - lll
+ - loggercheck
+ - maintidx
+ - makezero
+ - maligned
+ - mirror
+ - musttag
+ - nakedret
+ - nestif
+ - nilerr
+ - nilnil
+ - nlreturn
+ - noctx
+ - nolintlint
+ - nonamedreturns
+ - nosnakecase
+ - nosprintfhostport
+ - paralleltest
+ - prealloc
+ - predeclared
+ - promlinter
+ - reassign
+ - revive
+ - rowserrcheck
+ - scopelint
+ - sqlclosecheck
+ - staticcheck
+ - structcheck
+ - stylecheck
+ - tagalign
+ - tagliatelle
+ - tenv
+ - testableexamples
+ - testpackage
+ - thelper
+ - tparallel
+ - typecheck
+ - unconvert
+ - unparam
+ - unused
+ - usestdlibvars
+ - varcheck
+ - varnamelen
+ - wastedassign
+ - whitespace
+ - wrapcheck
+ - wsl
+ - zerologlint
\ No newline at end of file
diff --git a/v2/.prettierignore b/v2/.prettierignore
new file mode 100644
index 00000000000..94c6af38ef8
--- /dev/null
+++ b/v2/.prettierignore
@@ -0,0 +1 @@
+website
\ No newline at end of file
diff --git a/v2/.prettierrc.yml b/v2/.prettierrc.yml
new file mode 100644
index 00000000000..685d8b6e758
--- /dev/null
+++ b/v2/.prettierrc.yml
@@ -0,0 +1,6 @@
+overrides:
+ - files:
+ - "**/*.md"
+ options:
+ printWidth: 80
+ proseWrap: always
diff --git a/v2/Taskfile.yaml b/v2/Taskfile.yaml
new file mode 100644
index 00000000000..d1893732b44
--- /dev/null
+++ b/v2/Taskfile.yaml
@@ -0,0 +1,28 @@
+# https://taskfile.dev
+
+version: "3"
+
+tasks:
+ download:
+ summary: Run go mod tidy
+ cmds:
+ - go mod tidy
+
+ lint:
+ summary: Run golangci-lint
+ cmds:
+ - golangci-lint run ./... --timeout=3m -v
+
+ release:
+ summary: Release a new version of Task. Call with `task v2:release -- `
+ dir: tools/release
+ cmds:
+ - go run release.go {{.CLI_ARGS}}
+
+ format:md:
+ cmds:
+ - npx prettier --write "**/*.md"
+
+ format:
+ cmds:
+ - task: format:md
diff --git a/v2/cmd/wails/build.go b/v2/cmd/wails/build.go
index 10010bf4fc1..5b689b7dcfd 100644
--- a/v2/cmd/wails/build.go
+++ b/v2/cmd/wails/build.go
@@ -18,7 +18,6 @@ import (
)
func buildApplication(f *flags.Build) error {
-
if f.NoColour {
pterm.DisableColor()
colour.ColourEnabled = false
@@ -50,6 +49,16 @@ func buildApplication(f *flags.Build) error {
return err
}
+ // Set obfuscation from project file
+ if projectOptions.Obfuscated {
+ f.Obfuscated = projectOptions.Obfuscated
+ }
+
+ // Set garble args from project file
+ if projectOptions.GarbleArgs != "" {
+ f.GarbleArgs = projectOptions.GarbleArgs
+ }
+
// Create BuildOptions
buildOptions := &build.Options{
Logger: logger,
@@ -57,6 +66,7 @@ func buildApplication(f *flags.Build) error {
OutputFile: f.OutputFilename,
CleanBinDirectory: f.Clean,
Mode: f.GetBuildMode(),
+ Devtools: f.Debug || f.Devtools,
Pack: !f.NoPackage,
LDFlags: f.LdFlags,
Compiler: f.Compiler,
@@ -82,6 +92,7 @@ func buildApplication(f *flags.Build) error {
{"Compiler", f.GetCompilerPath()},
{"Skip Bindings", bool2Str(f.SkipBindings)},
{"Build Mode", f.GetBuildModeAsString()},
+ {"Devtools", bool2Str(buildOptions.Devtools)},
{"Frontend Directory", projectOptions.GetFrontendDir()},
{"Obfuscated", bool2Str(f.Obfuscated)},
}
@@ -254,5 +265,4 @@ func buildApplication(f *flags.Build) error {
}
return nil
-
}
diff --git a/v2/cmd/wails/dev.go b/v2/cmd/wails/dev.go
index dbb2cf5d8fc..30213a68e13 100644
--- a/v2/cmd/wails/dev.go
+++ b/v2/cmd/wails/dev.go
@@ -1,16 +1,16 @@
package main
import (
+ "os"
+
"github.com/pterm/pterm"
"github.com/wailsapp/wails/v2/cmd/wails/flags"
"github.com/wailsapp/wails/v2/cmd/wails/internal/dev"
"github.com/wailsapp/wails/v2/internal/colour"
"github.com/wailsapp/wails/v2/pkg/clilogger"
- "os"
)
func devApplication(f *flags.Dev) error {
-
if f.NoColour {
pterm.DisableColor()
colour.ColourEnabled = false
@@ -34,5 +34,4 @@ func devApplication(f *flags.Dev) error {
}
return dev.Application(f, logger)
-
}
diff --git a/v2/cmd/wails/doctor.go b/v2/cmd/wails/doctor.go
index a4908ead144..5306cab1742 100644
--- a/v2/cmd/wails/doctor.go
+++ b/v2/cmd/wails/doctor.go
@@ -1,12 +1,16 @@
package main
import (
+ "fmt"
+ "github.com/wailsapp/wails/v2/internal/shell"
"runtime"
"runtime/debug"
+ "strconv"
"strings"
"github.com/pterm/pterm"
+ "github.com/jaypipes/ghw"
"github.com/wailsapp/wails/v2/cmd/wails/flags"
"github.com/wailsapp/wails/v2/internal/colour"
"github.com/wailsapp/wails/v2/internal/system"
@@ -14,43 +18,33 @@ import (
)
func diagnoseEnvironment(f *flags.Doctor) error {
-
if f.NoColour {
pterm.DisableColor()
colour.ColourEnabled = false
}
- app.PrintBanner()
+ pterm.DefaultSection = *pterm.DefaultSection.
+ WithBottomPadding(0).
+ WithStyle(pterm.NewStyle(pterm.FgBlue, pterm.Bold))
+
+ pterm.Println() // Spacer
+ pterm.DefaultHeader.WithBackgroundStyle(pterm.NewStyle(pterm.BgLightBlue)).WithMargin(10).Println("Wails Doctor")
+ pterm.Println() // Spacer
- spinner, _ := pterm.DefaultSpinner.Start("Scanning system - Please wait (this may take a long time)...")
+ spinner, _ := pterm.DefaultSpinner.WithRemoveWhenDone().Start("Scanning system - Please wait (this may take a long time)...")
// Get system info
info, err := system.GetInfo()
if err != nil {
- spinner.Fail("Failed.")
- return err
- }
- spinner.Success("Done.")
-
- pterm.DefaultSection.Println("System")
-
- systemTabledata := [][]string{
- {"OS", info.OS.Name},
- {"Version", info.OS.Version},
- {"ID", info.OS.ID},
- {"Go Version", runtime.Version()},
- {"Platform", runtime.GOOS},
- {"Architecture", runtime.GOARCH},
- }
-
- err = pterm.DefaultTable.WithData(systemTabledata).Render()
- if err != nil {
+ spinner.Fail()
+ pterm.Error.Println("Failed to get system information")
return err
}
+ spinner.Success()
pterm.DefaultSection.Println("Wails")
- wailsTableData := [][]string{
+ wailsTableData := pterm.TableData{
{"Version", app.Version()},
}
@@ -78,41 +72,137 @@ func diagnoseEnvironment(f *flags.Doctor) error {
return err
}
+ pterm.DefaultSection.Println("System")
+
+ systemTabledata := pterm.TableData{
+ {pterm.Bold.Sprint("OS"), info.OS.Name},
+ {pterm.Bold.Sprint("Version"), info.OS.Version},
+ {pterm.Bold.Sprint("ID"), info.OS.ID},
+ {pterm.Bold.Sprint("Go Version"), runtime.Version()},
+ {pterm.Bold.Sprint("Platform"), runtime.GOOS},
+ {pterm.Bold.Sprint("Architecture"), runtime.GOARCH},
+ }
+
+ // Probe CPU
+ cpus, _ := ghw.CPU()
+ if cpus != nil {
+ prefix := "CPU"
+ for idx, cpu := range cpus.Processors {
+ if len(cpus.Processors) > 1 {
+ prefix = "CPU " + strconv.Itoa(idx+1)
+ }
+ systemTabledata = append(systemTabledata, []string{prefix, cpu.Model})
+ }
+ } else {
+ cpuInfo := "Unknown"
+ if runtime.GOOS == "darwin" {
+ // Try to get CPU info from sysctl
+ if stdout, _, err := shell.RunCommand("", "sysctl", "-n", "machdep.cpu.brand_string"); err == nil {
+ cpuInfo = strings.TrimSpace(stdout)
+ }
+ }
+ systemTabledata = append(systemTabledata, []string{"CPU", cpuInfo})
+ }
+
+ // Probe GPU
+ gpu, _ := ghw.GPU(ghw.WithDisableWarnings())
+ if gpu != nil {
+ prefix := "GPU"
+ for idx, card := range gpu.GraphicsCards {
+ if len(gpu.GraphicsCards) > 1 {
+ prefix = "GPU " + strconv.Itoa(idx+1) + " "
+ }
+ if card.DeviceInfo == nil {
+ systemTabledata = append(systemTabledata, []string{prefix, "Unknown"})
+ continue
+ }
+ details := fmt.Sprintf("%s (%s) - Driver: %s", card.DeviceInfo.Product.Name, card.DeviceInfo.Vendor.Name, card.DeviceInfo.Driver)
+ systemTabledata = append(systemTabledata, []string{prefix, details})
+ }
+ } else {
+ gpuInfo := "Unknown"
+ if runtime.GOOS == "darwin" {
+ // Try to get GPU info from system_profiler
+ if stdout, _, err := shell.RunCommand("", "system_profiler", "SPDisplaysDataType"); err == nil {
+ var (
+ startCapturing bool
+ gpuInfoDetails []string
+ )
+ for _, line := range strings.Split(stdout, "\n") {
+ if strings.Contains(line, "Chipset Model") {
+ startCapturing = true
+ }
+ if startCapturing {
+ gpuInfoDetails = append(gpuInfoDetails, strings.TrimSpace(line))
+ }
+ if strings.Contains(line, "Metal Support") {
+ break
+ }
+ }
+ if len(gpuInfoDetails) > 0 {
+ gpuInfo = strings.Join(gpuInfoDetails, " ")
+ }
+ }
+ }
+ systemTabledata = append(systemTabledata, []string{"GPU", gpuInfo})
+ }
+
+ memory, _ := ghw.Memory()
+ if memory != nil {
+ systemTabledata = append(systemTabledata, []string{"Memory", strconv.Itoa(int(memory.TotalPhysicalBytes/1024/1024/1024)) + "GB"})
+ } else {
+ memInfo := "Unknown"
+ if runtime.GOOS == "darwin" {
+ // Try to get Memory info from sysctl
+ if stdout, _, err := shell.RunCommand("", "sysctl", "-n", "hw.memsize"); err == nil {
+ if memSize, err := strconv.Atoi(strings.TrimSpace(stdout)); err == nil {
+ memInfo = strconv.Itoa(memSize/1024/1024/1024) + "GB"
+ }
+ }
+ }
+ systemTabledata = append(systemTabledata, []string{"Memory", memInfo})
+ }
+
+ err = pterm.DefaultTable.WithBoxed().WithData(systemTabledata).Render()
+ if err != nil {
+ return err
+ }
+
pterm.DefaultSection.Println("Dependencies")
// Output Dependencies Status
- var dependenciesMissing = []string{}
- var externalPackages = []*packagemanager.Dependency{}
- var dependenciesAvailableRequired = 0
- var dependenciesAvailableOptional = 0
+ var dependenciesMissing []string
+ var externalPackages []*packagemanager.Dependency
+ dependenciesAvailableRequired := 0
+ dependenciesAvailableOptional := 0
- dependenciesTableData := [][]string{
+ dependenciesTableData := pterm.TableData{
{"Dependency", "Package Name", "Status", "Version"},
}
hasOptionalDependencies := false
// Loop over dependencies
for _, dependency := range info.Dependencies {
-
name := dependency.Name
+
if dependency.Optional {
- name = "*" + name
+ name = pterm.Gray("*") + name
hasOptionalDependencies = true
}
+
packageName := "Unknown"
- status := "Not Found"
+ status := pterm.LightRed("Not Found")
// If we found the package
if dependency.PackageName != "" {
-
packageName = dependency.PackageName
// If it's installed, update the status
if dependency.Installed {
- status = "Installed"
+ status = pterm.LightGreen("Installed")
} else {
// Generate meaningful status text
- status = "Available"
+ status = pterm.LightMagenta("Available")
if dependency.Optional {
dependenciesAvailableOptional++
@@ -133,22 +223,19 @@ func diagnoseEnvironment(f *flags.Doctor) error {
dependenciesTableData = append(dependenciesTableData, []string{name, packageName, status, dependency.Version})
}
- err = pterm.DefaultTable.WithHasHeader(true).WithData(dependenciesTableData).Render()
+ dependenciesTableString, _ := pterm.DefaultTable.WithHasHeader(true).WithData(dependenciesTableData).Srender()
+ dependenciesBox := pterm.DefaultBox.WithTitleBottomCenter()
if hasOptionalDependencies {
- pterm.Println("* - Optional Dependency")
+ dependenciesBox = dependenciesBox.WithTitle(pterm.Gray("*") + " - Optional Dependency")
}
+ dependenciesBox.Println(dependenciesTableString)
+
pterm.DefaultSection.Println("Diagnosis")
// Generate an appropriate diagnosis
- if len(dependenciesMissing) == 0 && dependenciesAvailableRequired == 0 {
- pterm.Println("Your system is ready for Wails development!")
- } else {
- pterm.Println("Your system has missing dependencies!")
- }
-
if dependenciesAvailableRequired != 0 {
pterm.Println("Required package(s) installation details: \n" + info.Dependencies.InstallAllRequiredCommand())
}
@@ -157,11 +244,18 @@ func diagnoseEnvironment(f *flags.Doctor) error {
pterm.Println("Optional package(s) installation details: \n" + info.Dependencies.InstallAllOptionalCommand())
}
+ if len(dependenciesMissing) == 0 && dependenciesAvailableRequired == 0 {
+ pterm.Success.Println("Your system is ready for Wails development!")
+ } else {
+ pterm.Warning.Println("Your system has missing dependencies!")
+ }
+
if len(dependenciesMissing) != 0 {
pterm.Println("Fatal:")
pterm.Println("Required dependencies missing: " + strings.Join(dependenciesMissing, " "))
pterm.Println("Please read this article on how to resolve this: https://wails.io/guides/resolving-missing-packages")
}
+ pterm.Println() // Spacer for sponsor message
return nil
}
diff --git a/v2/cmd/wails/flags/build.go b/v2/cmd/wails/flags/build.go
index d36ceef6a29..db05c90353f 100644
--- a/v2/cmd/wails/flags/build.go
+++ b/v2/cmd/wails/flags/build.go
@@ -24,8 +24,7 @@ type Build struct {
Common
BuildCommon
- NoPackage bool `name:"noPackage" description:"Skips platform specific packaging"`
- SkipModTidy bool `name:"m" description:"Skip mod tidy before compile"`
+ NoPackage bool `description:"Skips platform specific packaging"`
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"`
@@ -35,6 +34,7 @@ type Build struct {
ForceBuild bool `name:"f" description:"Force build of application"`
UpdateWailsVersionGoMod bool `name:"u" description:"Updates go.mod to use the same Wails version as the CLI"`
Debug bool `description:"Builds the application in debug mode"`
+ Devtools bool `description:"Enable Devtools in productions, Already enabled in debug mode (-debug)"`
NSIS bool `description:"Generate NSIS installer for Windows"`
TrimPath bool `description:"Remove all file system paths from the resulting executable"`
WindowsConsole bool `description:"Keep the console when building for Windows"`
diff --git a/v2/cmd/wails/flags/buildcommon.go b/v2/cmd/wails/flags/buildcommon.go
index dcad33abffb..4bbc4c62ca5 100644
--- a/v2/cmd/wails/flags/buildcommon.go
+++ b/v2/cmd/wails/flags/buildcommon.go
@@ -9,6 +9,7 @@ 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 {
diff --git a/v2/cmd/wails/flags/dev.go b/v2/cmd/wails/flags/dev.go
index 885e0ceada5..501450a982e 100644
--- a/v2/cmd/wails/flags/dev.go
+++ b/v2/cmd/wails/flags/dev.go
@@ -22,6 +22,7 @@ type Dev struct {
Browser bool `flag:"browser" description:"Open the application in a browser"`
NoReload bool `flag:"noreload" description:"Disable reload on asset change"`
NoColour bool `flag:"nocolor" description:"Disable colour in output"`
+ NoGoRebuild bool `flag:"nogorebuild" description:"Disable automatic rebuilding on backend file changes/additions"`
WailsJSDir string `flag:"wailsjsdir" description:"Directory to generate the Wails JS modules"`
LogLevel string `flag:"loglevel" description:"LogLevel to use - Trace, Debug, Info, Warning, Error)"`
ForceBuild bool `flag:"f" description:"Force build of application"`
@@ -46,7 +47,6 @@ func (*Dev) Default() *Dev {
}
func (d *Dev) Process() error {
-
var err error
err = d.loadAndMergeProjectConfig()
if err != nil {
@@ -112,7 +112,6 @@ func (d *Dev) loadAndMergeProjectConfig() error {
}
return nil
-
}
// GenerateBuildOptions creates a build.Options using the flags
@@ -120,6 +119,7 @@ func (d *Dev) GenerateBuildOptions() *build.Options {
result := &build.Options{
OutputType: "dev",
Mode: build.Dev,
+ Devtools: true,
Arch: runtime.GOARCH,
Pack: true,
Platform: runtime.GOOS,
diff --git a/v2/cmd/wails/flags/generate.go b/v2/cmd/wails/flags/generate.go
index 9adf78aa402..b14d67017fc 100644
--- a/v2/cmd/wails/flags/generate.go
+++ b/v2/cmd/wails/flags/generate.go
@@ -2,6 +2,7 @@ package flags
type GenerateModule struct {
Common
+ Compiler string `description:"Use a different go compiler to build, eg go1.15beta1"`
Tags string `description:"Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated"`
Verbosity int `name:"v" description:"Verbosity level (0 = quiet, 1 = normal, 2 = verbose)"`
}
@@ -12,3 +13,9 @@ type GenerateTemplate struct {
Frontend string `description:"Frontend to use for the template"`
Quiet bool `description:"Suppress output"`
}
+
+func (c *GenerateModule) Default() *GenerateModule {
+ return &GenerateModule{
+ Compiler: "go",
+ }
+}
diff --git a/v2/cmd/wails/flags/init.go b/v2/cmd/wails/flags/init.go
index 6e642ec9a2f..16d56a207d9 100644
--- a/v2/cmd/wails/flags/init.go
+++ b/v2/cmd/wails/flags/init.go
@@ -14,7 +14,6 @@ type Init struct {
}
func (i *Init) Default() *Init {
-
result := &Init{
TemplateName: "vanilla",
}
diff --git a/v2/cmd/wails/generate.go b/v2/cmd/wails/generate.go
index a7b059ecfdd..15a6b33d868 100644
--- a/v2/cmd/wails/generate.go
+++ b/v2/cmd/wails/generate.go
@@ -2,6 +2,9 @@ package main
import (
"fmt"
+ "os"
+ "path/filepath"
+
"github.com/leaanthony/debme"
"github.com/leaanthony/gosod"
"github.com/pterm/pterm"
@@ -14,12 +17,9 @@ import (
"github.com/wailsapp/wails/v2/pkg/clilogger"
"github.com/wailsapp/wails/v2/pkg/commands/bindings"
"github.com/wailsapp/wails/v2/pkg/commands/buildtags"
- "os"
- "path/filepath"
)
func generateModule(f *flags.GenerateModule) error {
-
if f.NoColour {
pterm.DisableColor()
colour.ColourEnabled = false
@@ -43,10 +43,16 @@ func generateModule(f *flags.GenerateModule) error {
return err
}
+ if projectConfig.Bindings.TsGeneration.OutputType == "" {
+ projectConfig.Bindings.TsGeneration.OutputType = "classes"
+ }
+
_, err = bindings.GenerateBindings(bindings.Options{
- Tags: buildTags,
- TsPrefix: projectConfig.Bindings.TsGeneration.Prefix,
- TsSuffix: projectConfig.Bindings.TsGeneration.Suffix,
+ Compiler: f.Compiler,
+ Tags: buildTags,
+ TsPrefix: projectConfig.Bindings.TsGeneration.Prefix,
+ TsSuffix: projectConfig.Bindings.TsGeneration.Suffix,
+ TsOutputType: projectConfig.Bindings.TsGeneration.OutputType,
})
if err != nil {
return err
@@ -55,7 +61,6 @@ func generateModule(f *flags.GenerateModule) error {
}
func generateTemplate(f *flags.GenerateTemplate) error {
-
if f.NoColour {
pterm.DisableColor()
colour.ColourEnabled = false
@@ -77,7 +82,7 @@ func generateTemplate(f *flags.GenerateTemplate) error {
}
templateDir := filepath.Join(cwd, f.Name)
if !fs.DirExists(templateDir) {
- err := os.MkdirAll(templateDir, 0755)
+ err := os.MkdirAll(templateDir, 0o755)
if err != nil {
return err
}
@@ -200,7 +205,7 @@ func processPackageJSON(frontendDir string) error {
json, _ = sjson.SetBytes(json, "name", "{{.ProjectName}}")
json, _ = sjson.SetBytes(json, "author", "{{.AuthorName}}")
- err = os.WriteFile(packageJSON, json, 0644)
+ err = os.WriteFile(packageJSON, json, 0o644)
if err != nil {
return err
}
@@ -231,7 +236,7 @@ func processPackageLockJSON(frontendDir string) error {
printBulletPoint("Updating package-lock.json data...")
json, _ = sjson.Set(json, "name", "{{.ProjectName}}")
- err = os.WriteFile(filename, []byte(json), 0644)
+ err = os.WriteFile(filename, []byte(json), 0o644)
if err != nil {
return err
}
diff --git a/v2/cmd/wails/init.go b/v2/cmd/wails/init.go
index f9a9c6b3f00..f79e37ffc44 100644
--- a/v2/cmd/wails/init.go
+++ b/v2/cmd/wails/init.go
@@ -3,6 +3,12 @@ package main
import (
"bufio"
"fmt"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "strings"
+ "time"
+
"github.com/flytam/filenamify"
"github.com/leaanthony/slicer"
"github.com/pkg/errors"
@@ -13,15 +19,9 @@ import (
"github.com/wailsapp/wails/v2/pkg/clilogger"
"github.com/wailsapp/wails/v2/pkg/git"
"github.com/wailsapp/wails/v2/pkg/templates"
- "os"
- "os/exec"
- "path/filepath"
- "strings"
- "time"
)
func initProject(f *flags.Init) error {
-
if f.NoColour {
pterm.DisableColor()
colour.ColourEnabled = false
@@ -125,6 +125,12 @@ 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")
@@ -215,7 +221,7 @@ func initGit(options *templates.Options) error {
"frontend/dist",
"frontend/node_modules",
}
- err = os.WriteFile(filepath.Join(options.TargetDir, ".gitignore"), []byte(strings.Join(ignore, "\n")), 0644)
+ err = os.WriteFile(filepath.Join(options.TargetDir, ".gitignore"), []byte(strings.Join(ignore, "\n")), 0o644)
if err != nil {
return errors.Wrap(err, "Unable to create gitignore")
}
@@ -271,8 +277,19 @@ func updateReplaceLine(targetPath string) {
}
}
- err = os.WriteFile("go.mod", []byte(strings.Join(lines, "\n")), 0644)
+ err = os.WriteFile("go.mod", []byte(strings.Join(lines, "\n")), 0o644)
if err != nil {
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()
+}
diff --git a/v2/cmd/wails/internal/dev/dev.go b/v2/cmd/wails/internal/dev/dev.go
index 8d11edbf730..2f6b10a7396 100644
--- a/v2/cmd/wails/internal/dev/dev.go
+++ b/v2/cmd/wails/internal/dev/dev.go
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"io"
+ "log"
"net/http"
"net/url"
"os"
@@ -51,7 +52,6 @@ func sliceToMap(input []string) map[string]struct{} {
// Application runs the application in dev mode
func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
-
cwd := lo.Must(os.Getwd())
// Update go.mod to use current wails version
@@ -60,10 +60,12 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
return err
}
- // Run go mod tidy to ensure we're up-to-date
- err = runCommand(cwd, false, "go", "mod", "tidy")
- if err != nil {
- 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
+ }
}
buildOptions := f.GenerateBuildOptions()
@@ -80,7 +82,7 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
// Setup signal handler
quitChannel := make(chan os.Signal, 1)
- signal.Notify(quitChannel, os.Interrupt, os.Kill, syscall.SIGTERM)
+ signal.Notify(quitChannel, os.Interrupt, syscall.SIGTERM)
exitCodeChannel := make(chan int, 1)
// Build the frontend if requested, but ignore building the application itself.
@@ -138,20 +140,6 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
}
}
- // create the project files watcher
- watcher, err := initialiseWatcher(cwd)
- if err != nil {
- return err
- }
-
- defer func(watcher *fsnotify.Watcher) {
- err := watcher.Close()
- if err != nil {
- logger.Fatal(err.Error())
- }
- }(watcher)
-
- logutils.LogGreen("Watching (sub)/directory: %s", cwd)
logutils.LogGreen("Using DevServer URL: %s", f.DevServerURL())
if f.FrontendDevServerURL != "" {
logutils.LogGreen("Using Frontend DevServer URL: %s", f.FrontendDevServerURL)
@@ -165,7 +153,10 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
}()
// Watch for changes and trigger restartApp()
- debugBinaryProcess = doWatcherLoop(buildOptions, debugBinaryProcess, f, watcher, exitCodeChannel, quitChannel, f.DevServerURL(), legacyUseDevServerInsteadofCustomScheme)
+ debugBinaryProcess, err = doWatcherLoop(cwd, buildOptions, debugBinaryProcess, f, exitCodeChannel, quitChannel, f.DevServerURL(), legacyUseDevServerInsteadofCustomScheme)
+ if err != nil {
+ return err
+ }
// Kill the current program if running and remove dev binary
if err := killProcessAndCleanupBinary(debugBinaryProcess, appBinary); err != nil {
@@ -255,8 +246,8 @@ func runFrontendDevWatcherCommand(frontendDirectory string, devCommand string, d
const (
stateRunning int32 = 0
- stateCanceling = 1
- stateStopped = 2
+ stateCanceling int32 = 1
+ stateStopped int32 = 2
)
state := stateRunning
go func() {
@@ -281,7 +272,6 @@ func runFrontendDevWatcherCommand(frontendDirectory string, devCommand string, d
// restartApp does the actual rebuilding of the application when files change
func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, exitCodeChannel chan int, legacyUseDevServerInsteadofCustomScheme bool) (*process.Process, string, error) {
-
appBinary, err := build.Build(buildOptions)
println()
if err != nil {
@@ -308,7 +298,6 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
// parse appargs if any
args, err := shlex.Split(f.AppArgs)
-
if err != nil {
buildOptions.Logger.Fatal("Unable to parse appargs: %s", err.Error())
}
@@ -337,9 +326,25 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
}
// doWatcherLoop is the main watch loop that runs while dev is active
-func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, watcher *fsnotify.Watcher, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL, legacyUseDevServerInsteadofCustomScheme bool) *process.Process {
+func doWatcherLoop(cwd string, buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL, legacyUseDevServerInsteadofCustomScheme bool) (*process.Process, error) {
+ // create the project files watcher
+ watcher, err := initialiseWatcher(cwd)
+ if err != nil {
+ logutils.LogRed("Unable to create filesystem watcher. Reloads will not occur.")
+ return nil, err
+ }
+
+ defer func(watcher *fsnotify.Watcher) {
+ err := watcher.Close()
+ if err != nil {
+ log.Fatal(err.Error())
+ }
+ }(watcher)
+
+ logutils.LogGreen("Watching (sub)/directory: %s", cwd)
+
// Main Loop
- var extensionsThatTriggerARebuild = sliceToMap(strings.Split(f.Extensions, ","))
+ extensionsThatTriggerARebuild := sliceToMap(strings.Split(f.Extensions, ","))
var dirsThatTriggerAReload []string
for _, dir := range strings.Split(f.ReloadDirs, ",") {
if dir == "" {
@@ -351,6 +356,12 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
continue
}
dirsThatTriggerAReload = append(dirsThatTriggerAReload, thePath)
+ err = watcher.Add(thePath)
+ if err != nil {
+ logutils.LogRed("Unable to watch path: %s due to error %v", thePath, err)
+ } else {
+ logutils.LogGreen("Watching (sub)/directory: %s", thePath)
+ }
}
quit := false
@@ -366,7 +377,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
assetDirURL := joinPath(devServerURL, "/wails/assetdir")
reloadURL := joinPath(devServerURL, "/wails/reload")
- for quit == false {
+ for !quit {
// reload := false
select {
case exitCode := <-exitCodeChannel:
@@ -441,16 +452,21 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
case <-timer.C:
if rebuild {
rebuild = false
- logutils.LogGreen("[Rebuild triggered] files updated")
- // Try and build the app
- newBinaryProcess, _, err := restartApp(buildOptions, debugBinaryProcess, f, exitCodeChannel, legacyUseDevServerInsteadofCustomScheme)
- if err != nil {
- logutils.LogRed("Error during build: %s", err.Error())
- continue
- }
- // If we have a new process, saveConfig it
- if newBinaryProcess != nil {
- debugBinaryProcess = newBinaryProcess
+ if f.NoGoRebuild {
+ logutils.LogGreen("[Rebuild triggered] skipping due to flag -nogorebuild")
+ } else {
+ logutils.LogGreen("[Rebuild triggered] files updated")
+ // Try and build the app
+
+ newBinaryProcess, _, err := restartApp(buildOptions, debugBinaryProcess, f, exitCodeChannel, legacyUseDevServerInsteadofCustomScheme)
+ if err != nil {
+ logutils.LogRed("Error during build: %s", err.Error())
+ continue
+ }
+ // If we have a new process, saveConfig it
+ if newBinaryProcess != nil {
+ debugBinaryProcess = newBinaryProcess
+ }
}
}
@@ -494,7 +510,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
quit = true
}
}
- return debugBinaryProcess
+ return debugBinaryProcess, nil
}
func joinPath(url *url.URL, subPath string) string {
diff --git a/v2/cmd/wails/internal/dev/watcher.go b/v2/cmd/wails/internal/dev/watcher.go
index 19caf0df8d1..4e7457ef942 100644
--- a/v2/cmd/wails/internal/dev/watcher.go
+++ b/v2/cmd/wails/internal/dev/watcher.go
@@ -18,7 +18,6 @@ type Watcher interface {
// initialiseWatcher creates the project directory watcher that will trigger recompile
func initialiseWatcher(cwd string) (*fsnotify.Watcher, error) {
-
// Ignore dot files, node_modules and build directories by default
ignoreDirs := getIgnoreDirs(cwd)
@@ -38,21 +37,22 @@ func initialiseWatcher(cwd string) (*fsnotify.Watcher, error) {
if err != nil {
return nil, err
}
- println("watching: " + dir)
}
return watcher, nil
}
func getIgnoreDirs(cwd string) []string {
ignoreDirs := []string{filepath.Join(cwd, "build/*"), ".*", "node_modules"}
-
+ baseDir := filepath.Base(cwd)
// Read .gitignore into ignoreDirs
f, err := os.Open(filepath.Join(cwd, ".gitignore"))
if err == nil {
scanner := bufio.NewScanner(f)
for scanner.Scan() {
line := scanner.Text()
- ignoreDirs = append(ignoreDirs, line)
+ if line != baseDir {
+ ignoreDirs = append(ignoreDirs, line)
+ }
}
}
diff --git a/v2/cmd/wails/internal/gomod/gomod.go b/v2/cmd/wails/internal/gomod/gomod.go
index 52e56344b33..5da14a5ff96 100644
--- a/v2/cmd/wails/internal/gomod/gomod.go
+++ b/v2/cmd/wails/internal/gomod/gomod.go
@@ -56,7 +56,7 @@ func SyncGoMod(logger *clilogger.CLILogger, updateWailsVersion bool) error {
}
if updated {
- return os.WriteFile(gomodFilename, gomodData, 0755)
+ return os.WriteFile(gomodFilename, gomodData, 0o755)
}
return nil
diff --git a/v2/cmd/wails/internal/version.txt b/v2/cmd/wails/internal/version.txt
index 8c99f59fb4b..899ab6bc49f 100644
--- a/v2/cmd/wails/internal/version.txt
+++ b/v2/cmd/wails/internal/version.txt
@@ -1 +1 @@
-v2.5.1
\ No newline at end of file
+v2.9.1
\ No newline at end of file
diff --git a/v2/cmd/wails/main.go b/v2/cmd/wails/main.go
index a0a7d4a319a..ccf1576e9c1 100644
--- a/v2/cmd/wails/main.go
+++ b/v2/cmd/wails/main.go
@@ -66,7 +66,6 @@ func bool2Str(b bool) string {
var app *clir.Cli
func main() {
-
var err error
app = clir.NewCli("Wails", "Go/HTML Appkit", internal.Version)
diff --git a/v2/cmd/wails/update.go b/v2/cmd/wails/update.go
index ac0e7375af2..9f8b6e60462 100644
--- a/v2/cmd/wails/update.go
+++ b/v2/cmd/wails/update.go
@@ -15,7 +15,6 @@ import (
// AddSubcommand adds the `init` command for the Wails application
func update(f *flags.Update) error {
-
if f.NoColour {
colour.ColourEnabled = false
pterm.DisableColor()
@@ -73,8 +72,7 @@ func update(f *flags.Update) error {
}
func updateToVersion(targetVersion *github.SemanticVersion, force bool, currentVersion string) error {
-
- var targetVersionString = "v" + targetVersion.String()
+ targetVersionString := "v" + targetVersion.String()
if targetVersionString == currentVersion {
pterm.Println("\nLooks like you're up to date!")
diff --git a/v2/examples/customlayout/build/windows/installer/project.nsi b/v2/examples/customlayout/build/windows/installer/project.nsi
index ca08626f783..4a72fbfaed5 100644
--- a/v2/examples/customlayout/build/windows/installer/project.nsi
+++ b/v2/examples/customlayout/build/windows/installer/project.nsi
@@ -45,6 +45,9 @@ VIAddVersionKey "FileVersion" "${INFO_PRODUCTVERSION}"
VIAddVersionKey "LegalCopyright" "${INFO_COPYRIGHT}"
VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}"
+# Enable HiDPI support. https://nsis.sourceforge.io/Reference/ManifestDPIAware
+ManifestDPIAware true
+
!include "MUI.nsh"
!define MUI_ICON "..\icon.ico"
diff --git a/v2/examples/customlayout/go.mod b/v2/examples/customlayout/go.mod
index a25b943836e..005bb557d9b 100644
--- a/v2/examples/customlayout/go.mod
+++ b/v2/examples/customlayout/go.mod
@@ -1,33 +1,39 @@
module changeme
-go 1.18
+go 1.21
+
+toolchain go1.21.0
require github.com/wailsapp/wails/v2 v2.1.0
require (
github.com/bep/debounce v1.2.1 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
- github.com/google/uuid v1.1.2 // indirect
+ github.com/godbus/dbus/v5 v5.1.0 // indirect
+ github.com/google/uuid v1.3.0 // indirect
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
- github.com/labstack/echo/v4 v4.9.0 // indirect
- github.com/labstack/gommon v0.3.1 // indirect
- github.com/leaanthony/go-ansi-parser v1.0.1 // indirect
+ github.com/labstack/echo/v4 v4.10.2 // indirect
+ github.com/labstack/gommon v0.4.0 // indirect
+ github.com/leaanthony/go-ansi-parser v1.6.0 // indirect
github.com/leaanthony/gosod v1.0.3 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/mattn/go-colorable v0.1.11 // indirect
- github.com/mattn/go-isatty v0.0.14 // indirect
- github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 // indirect
+ github.com/leaanthony/slicer v1.6.0 // indirect
+ github.com/leaanthony/u v1.1.0 // indirect
+ github.com/mattn/go-colorable v0.1.13 // indirect
+ github.com/mattn/go-isatty v0.0.19 // indirect
+ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
- github.com/samber/lo v1.27.1 // indirect
- github.com/tkrajina/go-reflector v0.5.5 // indirect
+ github.com/rivo/uniseg v0.4.4 // indirect
+ github.com/samber/lo v1.38.1 // indirect
+ github.com/tkrajina/go-reflector v0.5.6 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
- github.com/valyala/fasttemplate v1.2.1 // indirect
+ github.com/valyala/fasttemplate v1.2.2 // indirect
+ github.com/wailsapp/go-webview2 v1.0.10 // indirect
github.com/wailsapp/mimetype v1.4.1 // indirect
- golang.org/x/crypto v0.1.0 // indirect
- golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
- golang.org/x/net v0.7.0 // indirect
- golang.org/x/sys v0.5.0 // indirect
- golang.org/x/text v0.7.0 // indirect
+ golang.org/x/crypto v0.17.0 // indirect
+ golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
+ golang.org/x/net v0.17.0 // indirect
+ golang.org/x/sys v0.15.0 // indirect
+ golang.org/x/text v0.14.0 // indirect
)
replace github.com/wailsapp/wails/v2 v2.1.0 => ../..
diff --git a/v2/examples/customlayout/go.sum b/v2/examples/customlayout/go.sum
index de073ade8ed..4ec20616f62 100644
--- a/v2/examples/customlayout/go.sum
+++ b/v2/examples/customlayout/go.sum
@@ -5,55 +5,69 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
-github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
-github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
+github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
+github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
-github.com/labstack/echo/v4 v4.9.0 h1:wPOF1CE6gvt/kmbMR4dGzWvHMPT+sAEUJOwOTtvITVY=
-github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks=
-github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o=
-github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
+github.com/labstack/echo/v4 v4.10.2 h1:n1jAhnq/elIFTHr1EYpiYtyKgx4RW9ccVgkqByZaN2M=
+github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k=
+github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8=
+github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc=
github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA=
-github.com/leaanthony/go-ansi-parser v1.0.1 h1:97v6c5kYppVsbScf4r/VZdXyQ21KQIfeQOk2DgKxGG4=
-github.com/leaanthony/go-ansi-parser v1.0.1/go.mod h1:7arTzgVI47srICYhvgUV4CGd063sGEeoSlych5yeSPM=
+github.com/leaanthony/go-ansi-parser v1.6.0 h1:T8TuMhFB6TUMIUm0oRrSbgJudTFw9csT3ZK09w0t4Pg=
+github.com/leaanthony/go-ansi-parser v1.6.0/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ=
github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
+github.com/leaanthony/slicer v1.6.0 h1:1RFP5uiPJvT93TAHi+ipd3NACobkW53yUiBqZheE/Js=
+github.com/leaanthony/slicer v1.6.0/go.mod h1:o/Iz29g7LN0GqH3aMjWAe90381nyZlDNquK+mtH2Fj8=
+github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI=
+github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
-github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs=
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
-github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
+github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
+github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
-github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 h1:acNfDZXmm28D2Yg/c3ALnZStzNaZMSagpbr96vY6Zjc=
-github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
+github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
+github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
+github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
+github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
+github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.27.1 h1:sTXwkRiIFIQG+G0HeAvOEnGjqWeWtI9cg5/n51KrxPg=
-github.com/samber/lo v1.27.1/go.mod h1:it33p9UtPMS7z72fP4gw/EIfQB2eI8ke7GR2wc6+Rhg=
+github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
+github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
+github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
+github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
+github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M=
-github.com/tkrajina/go-reflector v0.5.5 h1:gwoQFNye30Kk7NrExj8zm3zFtrGPqOkzFMLuQZg1DtQ=
-github.com/tkrajina/go-reflector v0.5.5/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
+github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE=
+github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
+github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
+github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
+github.com/wailsapp/go-webview2 v1.0.10 h1:PP5Hug6pnQEAhfRzLCoOh2jJaPdrqeRgJKZhyYyDV/w=
+github.com/wailsapp/go-webview2 v1.0.10/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
-golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
-golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM=
-golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
+golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
+golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
+golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
+golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
+golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -62,14 +76,17 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
+golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
-golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/v2/go.mod b/v2/go.mod
index a323c32d1bc..375f6ee6f0d 100644
--- a/v2/go.mod
+++ b/v2/go.mod
@@ -1,6 +1,6 @@
module github.com/wailsapp/wails/v2
-go 1.18
+go 1.21
require (
github.com/Masterminds/semver v1.5.0
@@ -10,61 +10,71 @@ require (
github.com/charmbracelet/glamour v0.5.0
github.com/flytam/filenamify v1.0.0
github.com/fsnotify/fsnotify v1.4.9
- github.com/go-git/go-git/v5 v5.3.0
+ github.com/go-git/go-git/v5 v5.11.0
github.com/go-ole/go-ole v1.2.6
+ github.com/godbus/dbus/v5 v5.1.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
- github.com/google/uuid v1.1.2
+ github.com/google/uuid v1.3.0
github.com/jackmordaunt/icns v1.0.0
- github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e
- github.com/labstack/echo/v4 v4.9.0
- github.com/labstack/gommon v0.3.1
+ github.com/jaypipes/ghw v0.12.0
+ github.com/labstack/echo/v4 v4.10.2
+ github.com/labstack/gommon v0.4.0
github.com/leaanthony/clir v1.3.0
github.com/leaanthony/debme v1.2.1
- github.com/leaanthony/go-ansi-parser v1.0.1
+ github.com/leaanthony/go-ansi-parser v1.6.0
github.com/leaanthony/gosod v1.0.3
- github.com/leaanthony/slicer v1.5.0
+ github.com/leaanthony/slicer v1.6.0
+ github.com/leaanthony/u v1.1.0
github.com/leaanthony/winicon v1.0.0
github.com/matryer/is v1.4.0
- github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2
+ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
github.com/pkg/errors v0.9.1
github.com/pterm/pterm v0.12.49
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
- github.com/samber/lo v1.27.1
- github.com/stretchr/testify v1.8.0
- github.com/tc-hib/winres v0.1.5
+ github.com/samber/lo v1.38.1
+ github.com/stretchr/testify v1.8.4
+ github.com/tc-hib/winres v0.2.1
github.com/tidwall/sjson v1.1.7
- github.com/tkrajina/go-reflector v0.5.5
+ github.com/tkrajina/go-reflector v0.5.6
+ github.com/wailsapp/go-webview2 v1.0.10
github.com/wailsapp/mimetype v1.4.1
github.com/wzshiming/ctc v1.2.3
- golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
- golang.org/x/net v0.7.0
- golang.org/x/sys v0.5.0
- golang.org/x/tools v0.1.12
+ golang.org/x/mod v0.14.0
+ golang.org/x/net v0.25.0
+ golang.org/x/sys v0.20.0
+ golang.org/x/tools v0.17.0
)
require (
atomicgo.dev/cursor v0.1.1 // indirect
atomicgo.dev/keyboard v0.2.8 // indirect
bitbucket.org/creachadair/shell v0.0.7 // indirect
- github.com/Microsoft/go-winio v0.4.16 // indirect
+ dario.cat/mergo v1.0.0 // indirect
+ github.com/Microsoft/go-winio v0.6.1 // indirect
+ github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
+ github.com/StackExchange/wmi v1.2.1 // indirect
github.com/alecthomas/chroma v0.10.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
+ github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/console v1.0.3 // indirect
+ github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
- github.com/emirpasic/gods v1.12.0 // indirect
- github.com/go-git/gcfg v1.5.0 // indirect
- github.com/go-git/go-billy/v5 v5.2.0 // indirect
+ github.com/emirpasic/gods v1.18.1 // indirect
+ github.com/ghodss/yaml v1.0.0 // indirect
+ github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
+ github.com/go-git/go-billy/v5 v5.5.0 // indirect
+ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/gookit/color v1.5.2 // indirect
github.com/gorilla/css v1.0.0 // indirect
- github.com/imdario/mergo v0.3.12 // indirect
+ github.com/jaypipes/pcidb v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
- github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
- github.com/kr/pretty v0.3.0 // indirect
+ github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
+ github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/lithammer/fuzzysearch v1.1.5 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
- github.com/mattn/go-colorable v0.1.11 // indirect
- github.com/mattn/go-isatty v0.0.14 // indirect
+ github.com/mattn/go-colorable v0.1.13 // indirect
+ github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/microcosm-cc/bluemonday v1.0.17 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
@@ -72,24 +82,28 @@ require (
github.com/muesli/termenv v0.9.0 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
+ github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
- github.com/rivo/uniseg v0.2.0 // indirect
+ github.com/rivo/uniseg v0.4.4 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
+ github.com/skeema/knownhosts v1.2.1 // indirect
github.com/tidwall/gjson v1.9.3 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
- github.com/valyala/fasttemplate v1.2.1 // indirect
+ github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/wzshiming/winseq v0.0.0-20200112104235-db357dc107ae // indirect
- github.com/xanzy/ssh-agent v0.3.0 // indirect
+ github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
github.com/yuin/goldmark v1.4.13 // indirect
github.com/yuin/goldmark-emoji v1.0.1 // indirect
- golang.org/x/crypto v0.1.0 // indirect
- golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
- golang.org/x/image v0.5.0 // indirect
- golang.org/x/term v0.5.0 // indirect
- golang.org/x/text v0.7.0 // indirect
+ golang.org/x/crypto v0.23.0 // indirect
+ golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
+ golang.org/x/image v0.12.0 // indirect
+ golang.org/x/term v0.20.0 // indirect
+ golang.org/x/text v0.15.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
+ howett.net/plist v1.0.0 // indirect
)
diff --git a/v2/go.sum b/v2/go.sum
index 1eb919839fa..6e273e1ba10 100644
--- a/v2/go.sum
+++ b/v2/go.sum
@@ -4,6 +4,8 @@ atomicgo.dev/keyboard v0.2.8 h1:Di09BitwZgdTV1hPyX/b9Cqxi8HVuJQwWivnZUEqlj4=
atomicgo.dev/keyboard v0.2.8/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ=
bitbucket.org/creachadair/shell v0.0.7 h1:Z96pB6DkSb7F3Y3BBnJeOZH2gazyMTWlvecSD4vDqfk=
bitbucket.org/creachadair/shell v0.0.7/go.mod h1:oqtXSSvSYr4624lnnabXHaBsYW6RD80caLi2b3hJk0U=
+dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
+dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/MarvinJWendt/testza v0.1.0/go.mod h1:7AxNvlfeHP7Z/hDQ5JtE3OKYT3XFUeLCDE2DQninSqs=
github.com/MarvinJWendt/testza v0.2.1/go.mod h1:God7bhG8n6uQxwdScay+gjm9/LnO4D3kkcZX4hv9Rp8=
github.com/MarvinJWendt/testza v0.2.8/go.mod h1:nwIcjmr0Zz+Rcwfh3/4UhBp7ePKVhuBExvZqnKYWlII=
@@ -12,19 +14,22 @@ github.com/MarvinJWendt/testza v0.2.12/go.mod h1:JOIegYyV7rX+7VZ9r77L/eH6CfJHHzX
github.com/MarvinJWendt/testza v0.3.0/go.mod h1:eFcL4I0idjtIx8P9C6KkAuLgATNKpX4/2oUqKc6bF2c=
github.com/MarvinJWendt/testza v0.4.2/go.mod h1:mSdhXiKH8sg/gQehJ63bINcCKp7RtYewEjXsvsVUPbE=
github.com/MarvinJWendt/testza v0.4.3 h1:u2XaM4IqGp9dsdUmML8/Z791fu4yjQYzOiufOtJwTII=
+github.com/MarvinJWendt/testza v0.4.3/go.mod h1:CpXaOfceNEYnLDtNIyTrPPcCpDJYqzZnu2aiA2Wp33U=
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
-github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
-github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
-github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
+github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
+github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
+github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
+github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg=
+github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
+github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA=
+github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
-github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
-github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=
github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s=
-github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
-github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
+github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
+github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk=
@@ -34,90 +39,105 @@ github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
github.com/bitfield/script v0.19.0 h1:W24f+FQuPab9gXcW8bhcbo5qO8AtrXyu3XOnR4zhHN0=
github.com/bitfield/script v0.19.0/go.mod h1:ana6F8YOSZ3ImT8SauIzuYSqXgFVkSUJ6kgja+WMmIY=
+github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/charmbracelet/glamour v0.5.0 h1:wu15ykPdB7X6chxugG/NNfDUbyyrCLV9XBalj5wdu3g=
github.com/charmbracelet/glamour v0.5.0/go.mod h1:9ZRtG19AUIzcTm7FGLGbq3D5WKQ5UyZBbQsMQN0XIqc=
+github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
+github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
+github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
-github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
+github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
+github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
-github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
-github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
-github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
+github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=
+github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
+github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
+github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
github.com/flytam/filenamify v1.0.0 h1:ewx6BY2dj7U6h2zGPJmt33q/BjkSf/YsY/woQvnUNIs=
github.com/flytam/filenamify v1.0.0/go.mod h1:Dzf9kVycwcsBlr2ATg6uxjqiFgKGH+5SKFuhdeP5zu8=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
-github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
-github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
-github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
-github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
-github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
-github.com/go-git/go-billy/v5 v5.2.0 h1:GcoouCP9J+5slw2uXAocL70z8ml4A8B/H8nEPt6CLPk=
-github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
-github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M=
-github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
-github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc=
-github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw=
+github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY=
+github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4=
+github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
+github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
+github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=
+github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow=
+github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
+github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
+github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4=
+github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY=
+github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
+github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
-github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
-github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
+github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ=
github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo=
github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI=
github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg=
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
-github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
-github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/jackmordaunt/icns v1.0.0 h1:RYSxplerf/l/DUd09AHtITwckkv/mqjVv4DjYdPmAMQ=
github.com/jackmordaunt/icns v1.0.0/go.mod h1:7TTQVEuGzVVfOPPlLNHJIkzA6CoV7aH1Dv9dW351oOo=
+github.com/jaypipes/ghw v0.12.0 h1:xU2/MDJfWmBhJnujHY9qwXQLs3DBsf0/Xa9vECY0Tho=
+github.com/jaypipes/ghw v0.12.0/go.mod h1:jeJGbkRB2lL3/gxYzNYzEDETV1ZJ56OKr+CSeSEym+g=
+github.com/jaypipes/pcidb v1.0.0 h1:vtZIfkiCUE42oYbJS0TAq9XSfSmcsgo9IdxSm9qzYU8=
+github.com/jaypipes/pcidb v1.0.0/go.mod h1:TnYUvqhPBzCKnH34KrIX22kAeEbDCSRJ9cqLRCuNDfk=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
-github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
-github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck=
-github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
+github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
+github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
+github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
-github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/labstack/echo/v4 v4.9.0 h1:wPOF1CE6gvt/kmbMR4dGzWvHMPT+sAEUJOwOTtvITVY=
-github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks=
-github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o=
-github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
+github.com/labstack/echo/v4 v4.10.2 h1:n1jAhnq/elIFTHr1EYpiYtyKgx4RW9ccVgkqByZaN2M=
+github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k=
+github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8=
+github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
github.com/leaanthony/clir v1.0.4/go.mod h1:k/RBkdkFl18xkkACMCLt09bhiZnrGORoxmomeMvDpE0=
github.com/leaanthony/clir v1.3.0 h1:L9nPDWrmc/qU9UWZZvRaFajWYuO0np9V5p+5gxyYno0=
github.com/leaanthony/clir v1.3.0/go.mod h1:k/RBkdkFl18xkkACMCLt09bhiZnrGORoxmomeMvDpE0=
github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc=
github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA=
-github.com/leaanthony/go-ansi-parser v1.0.1 h1:97v6c5kYppVsbScf4r/VZdXyQ21KQIfeQOk2DgKxGG4=
-github.com/leaanthony/go-ansi-parser v1.0.1/go.mod h1:7arTzgVI47srICYhvgUV4CGd063sGEeoSlych5yeSPM=
+github.com/leaanthony/go-ansi-parser v1.6.0 h1:T8TuMhFB6TUMIUm0oRrSbgJudTFw9csT3ZK09w0t4Pg=
+github.com/leaanthony/go-ansi-parser v1.6.0/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ=
github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
+github.com/leaanthony/slicer v1.6.0 h1:1RFP5uiPJvT93TAHi+ipd3NACobkW53yUiBqZheE/Js=
+github.com/leaanthony/slicer v1.6.0/go.mod h1:o/Iz29g7LN0GqH3aMjWAe90381nyZlDNquK+mtH2Fj8=
+github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI=
+github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
github.com/leaanthony/winicon v1.0.0 h1:ZNt5U5dY71oEoKZ97UVwJRT4e+5xo5o/ieKuHuk8NqQ=
github.com/leaanthony/winicon v1.0.0/go.mod h1:en5xhijl92aphrJdmRPlh4NI1L6wq3gEm0LpXAPghjU=
github.com/lithammer/fuzzysearch v1.1.5 h1:Ag7aKU08wp0R9QCfF4GoGST9HbmAIeLP7xwMrOBEp1c=
@@ -126,11 +146,14 @@ github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
-github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs=
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
+github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
+github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
-github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
+github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
+github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
+github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
@@ -145,12 +168,14 @@ github.com/muesli/termenv v0.9.0 h1:wnbOaGz+LUR3jNT0zOzinPnyDaCZUQRZj9GxK8eRVl8=
github.com/muesli/termenv v0.9.0/go.mod h1:R/LzAKf+suGs4IsO95y7+7DpFHO0KABgnZqtlyx2mBw=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
-github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 h1:acNfDZXmm28D2Yg/c3ALnZStzNaZMSagpbr96vY6Zjc=
-github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
+github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
+github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
+github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
+github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
+github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -165,31 +190,32 @@ github.com/pterm/pterm v0.12.40/go.mod h1:ffwPLwlbXxP+rxT0GsgDTzS3y3rmpAO1NMjUkG
github.com/pterm/pterm v0.12.49 h1:qeNm0wTWawy6WhKoY8ZKq6qTXFr0s2UtUyRW0yVztEg=
github.com/pterm/pterm v0.12.49/go.mod h1:D4OBoWNqAfXkm5QLTjIgjNiMXPHemLJHnIreGUsWzWg=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
-github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
-github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
-github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
+github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
+github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
+github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
+github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
-github.com/samber/lo v1.27.1 h1:sTXwkRiIFIQG+G0HeAvOEnGjqWeWtI9cg5/n51KrxPg=
-github.com/samber/lo v1.27.1/go.mod h1:it33p9UtPMS7z72fP4gw/EIfQB2eI8ke7GR2wc6+Rhg=
-github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
+github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
+github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
-github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
+github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ=
+github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
-github.com/tc-hib/winres v0.1.5 h1:2dA5yfjdoEA3UyRaOC92HNMt3jap66pLzoW4MjpC/0M=
-github.com/tc-hib/winres v0.1.5/go.mod h1:pe6dOR40VOrGz8PkzreVKNvEKnlE8t4yR8A8naL+t7A=
-github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M=
+github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/tc-hib/winres v0.2.1 h1:YDE0FiP0VmtRaDn7+aaChp1KiF4owBiJa5l964l5ujA=
+github.com/tc-hib/winres v0.2.1/go.mod h1:C/JaNhH3KBvhNKVbvdlDWkbMDO9H4fKKDaN7/07SSuk=
github.com/tidwall/gjson v1.8.0/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk=
github.com/tidwall/gjson v1.9.3 h1:hqzS9wAHMO+KVBBkLxYdkEeeFHuqr95GfClRLKlgK0E=
github.com/tidwall/gjson v1.9.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
@@ -201,20 +227,23 @@ github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tidwall/sjson v1.1.7 h1:sgVPwu/yygHJ2m1pJDLgGM/h+1F5odx5Q9ljG3imRm8=
github.com/tidwall/sjson v1.1.7/go.mod h1:w/yG+ezBeTdUxiKs5NcPicO9diP38nk96QBAbIIGeFs=
-github.com/tkrajina/go-reflector v0.5.5 h1:gwoQFNye30Kk7NrExj8zm3zFtrGPqOkzFMLuQZg1DtQ=
-github.com/tkrajina/go-reflector v0.5.5/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
+github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE=
+github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
+github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
+github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
+github.com/wailsapp/go-webview2 v1.0.10 h1:PP5Hug6pnQEAhfRzLCoOh2jJaPdrqeRgJKZhyYyDV/w=
+github.com/wailsapp/go-webview2 v1.0.10/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
github.com/wzshiming/ctc v1.2.3 h1:q+hW3IQNsjIlOFBTGZZZeIXTElFM4grF4spW/errh/c=
github.com/wzshiming/ctc v1.2.3/go.mod h1:2tVAtIY7SUyraSk0JxvwmONNPFL4ARavPuEsg5+KA28=
github.com/wzshiming/winseq v0.0.0-20200112104235-db357dc107ae h1:tpXvBXC3hpQBDCc9OojJZCQMVRAbT3TTdUMP8WguXkY=
github.com/wzshiming/winseq v0.0.0-20200112104235-db357dc107ae/go.mod h1:VTAq37rkGeV+WOybvZwjXiJOicICdpLCN8ifpISjK20=
-github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
-github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
+github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
+github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -223,43 +252,47 @@ github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yuin/goldmark-emoji v1.0.1 h1:ctuWEyzGBwiucEqxzwe0SOYDXPAucOrE9NQC18Wa1os=
github.com/yuin/goldmark-emoji v1.0.1/go.mod h1:2w1E6FEWLcDQkoTE+7HU6QF1F6SLlNGjRIBbIZQFqkQ=
-golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
-golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
-golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM=
-golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
+golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
+golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
+golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
+golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
+golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
+golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/image v0.5.0 h1:5JMiNunQeQw++mMOz48/ISeNu3Iweh/JaZU8ZLqHRrI=
-golang.org/x/image v0.5.0/go.mod h1:FVC7BI/5Ym8R25iw5OLsgshdUBbT1h5jZTpA+mvAdZ4=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
+golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ=
+golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
+golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
+golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
+golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
+golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -270,42 +303,57 @@ golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
+golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
+golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
+golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
+golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
+golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
+golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
+golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
+golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
+golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
+golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
+golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
-gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
+gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
+howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
diff --git a/v2/internal/app/app.go b/v2/internal/app/app.go
index f2821aabaaa..0cd6bf614b8 100644
--- a/v2/internal/app/app.go
+++ b/v2/internal/app/app.go
@@ -2,6 +2,7 @@ package app
import (
"context"
+
"github.com/wailsapp/wails/v2/internal/frontend"
"github.com/wailsapp/wails/v2/internal/logger"
"github.com/wailsapp/wails/v2/internal/menumanager"
@@ -20,6 +21,9 @@ type App struct {
// Indicates if the app is in debug mode
debug bool
+ // Indicates if the devtools is enabled
+ devtoolsEnabled bool
+
// OnStartup/OnShutdown
startupCallback func(ctx context.Context)
shutdownCallback func(ctx context.Context)
diff --git a/v2/internal/app/app_bindings.go b/v2/internal/app/app_bindings.go
index d079790aa7f..be031819c65 100644
--- a/v2/internal/app/app_bindings.go
+++ b/v2/internal/app/app_bindings.go
@@ -31,6 +31,7 @@ func (a *App) Run() error {
var tsPrefixFlag *string
var tsPostfixFlag *string
+ var tsOutputTypeFlag *string
tsPrefix := os.Getenv("tsprefix")
if tsPrefix == "" {
@@ -42,6 +43,11 @@ func (a *App) Run() error {
tsPostfixFlag = bindingFlags.String("tssuffix", "", "Suffix for generated typescript entities")
}
+ tsOutputType := os.Getenv("tsoutputtype")
+ if tsOutputType == "" {
+ tsOutputTypeFlag = bindingFlags.String("tsoutputtype", "", "Output type for generated typescript entities (classes|interfaces)")
+ }
+
_ = bindingFlags.Parse(os.Args[1:])
if tsPrefixFlag != nil {
tsPrefix = *tsPrefixFlag
@@ -49,11 +55,15 @@ func (a *App) Run() error {
if tsPostfixFlag != nil {
tsSuffix = *tsPostfixFlag
}
+ if tsOutputTypeFlag != nil {
+ tsOutputType = *tsOutputTypeFlag
+ }
- appBindings := binding.NewBindings(a.logger, a.options.Bind, bindingExemptions, IsObfuscated())
+ appBindings := binding.NewBindings(a.logger, a.options.Bind, bindingExemptions, IsObfuscated(), a.options.EnumBind)
appBindings.SetTsPrefix(tsPrefix)
appBindings.SetTsSuffix(tsSuffix)
+ appBindings.SetOutputType(tsOutputType)
err := generateBindings(appBindings)
if err != nil {
diff --git a/v2/internal/app/app_dev.go b/v2/internal/app/app_dev.go
index 38aada6985c..58cd94ef0e0 100644
--- a/v2/internal/app/app_dev.go
+++ b/v2/internal/app/app_dev.go
@@ -42,7 +42,9 @@ func (a *App) Run() error {
func CreateApp(appoptions *options.App) (*App, error) {
var err error
- ctx := context.WithValue(context.Background(), "debug", true)
+ ctx := context.Background()
+ ctx = context.WithValue(ctx, "debug", true)
+ ctx = context.WithValue(ctx, "devtoolsEnabled", true)
// Set up logger
myLogger := logger.New(appoptions.Logger)
@@ -207,11 +209,11 @@ func CreateApp(appoptions *options.App) (*App, error) {
appoptions.OnDomReady,
appoptions.OnBeforeClose,
}
- appBindings := binding.NewBindings(myLogger, appoptions.Bind, bindingExemptions, false)
+ appBindings := binding.NewBindings(myLogger, appoptions.Bind, bindingExemptions, false, appoptions.EnumBind)
eventHandler := runtime.NewEvents(myLogger)
ctx = context.WithValue(ctx, "events", eventHandler)
- messageDispatcher := dispatcher.NewDispatcher(ctx, myLogger, appBindings, eventHandler)
+ messageDispatcher := dispatcher.NewDispatcher(ctx, myLogger, appBindings, eventHandler, appoptions.ErrorFormatter)
// Create the frontends and register to event handler
desktopFrontend := desktop.NewFrontend(ctx, appoptions, myLogger, appBindings, messageDispatcher)
@@ -228,6 +230,7 @@ func CreateApp(appoptions *options.App) (*App, error) {
startupCallback: appoptions.OnStartup,
shutdownCallback: appoptions.OnShutdown,
debug: true,
+ devtoolsEnabled: true,
}
result.options = appoptions
diff --git a/v2/internal/app/app_devtools.go b/v2/internal/app/app_devtools.go
new file mode 100644
index 00000000000..60b22109434
--- /dev/null
+++ b/v2/internal/app/app_devtools.go
@@ -0,0 +1,8 @@
+//go:build devtools
+
+package app
+
+// Note: devtools flag is also added in debug builds
+func IsDevtoolsEnabled() bool {
+ return true
+}
diff --git a/v2/internal/app/app_devtools_not.go b/v2/internal/app/app_devtools_not.go
new file mode 100644
index 00000000000..91267204864
--- /dev/null
+++ b/v2/internal/app/app_devtools_not.go
@@ -0,0 +1,9 @@
+//go:build !devtools
+
+package app
+
+// IsDevtoolsEnabled returns true if devtools should be enabled
+// Note: devtools flag is also added in debug builds
+func IsDevtoolsEnabled() bool {
+ return false
+}
diff --git a/v2/internal/app/app_production.go b/v2/internal/app/app_production.go
index afb67bdb313..4c217b17c4a 100644
--- a/v2/internal/app/app_production.go
+++ b/v2/internal/app/app_production.go
@@ -34,7 +34,9 @@ func CreateApp(appoptions *options.App) (*App, error) {
options.MergeDefaults(appoptions)
debug := IsDebug()
+ devtoolsEnabled := IsDevtoolsEnabled()
ctx = context.WithValue(ctx, "debug", debug)
+ ctx = context.WithValue(ctx, "devtoolsEnabled", devtoolsEnabled)
// Set up logger
myLogger := logger.New(appoptions.Logger)
@@ -70,7 +72,7 @@ func CreateApp(appoptions *options.App) (*App, error) {
appoptions.OnDomReady,
appoptions.OnBeforeClose,
}
- appBindings := binding.NewBindings(myLogger, appoptions.Bind, bindingExemptions, IsObfuscated())
+ appBindings := binding.NewBindings(myLogger, appoptions.Bind, bindingExemptions, IsObfuscated(), appoptions.EnumBind)
eventHandler := runtime.NewEvents(myLogger)
ctx = context.WithValue(ctx, "events", eventHandler)
// Attach logger to context
@@ -80,7 +82,7 @@ func CreateApp(appoptions *options.App) (*App, error) {
ctx = context.WithValue(ctx, "buildtype", "production")
}
- messageDispatcher := dispatcher.NewDispatcher(ctx, myLogger, appBindings, eventHandler)
+ messageDispatcher := dispatcher.NewDispatcher(ctx, myLogger, appBindings, eventHandler, appoptions.ErrorFormatter)
appFrontend := desktop.NewFrontend(ctx, appoptions, myLogger, appBindings, messageDispatcher)
eventHandler.AddFrontend(appFrontend)
@@ -93,6 +95,7 @@ func CreateApp(appoptions *options.App) (*App, error) {
startupCallback: appoptions.OnStartup,
shutdownCallback: appoptions.OnShutdown,
debug: debug,
+ devtoolsEnabled: devtoolsEnabled,
options: appoptions,
}
diff --git a/v2/internal/binding/binding.go b/v2/internal/binding/binding.go
old mode 100755
new mode 100644
index 75b821f29ca..568e11b0318
--- a/v2/internal/binding/binding.go
+++ b/v2/internal/binding/binding.go
@@ -23,17 +23,20 @@ type Bindings struct {
exemptions slicer.StringSlicer
structsToGenerateTS map[string]map[string]interface{}
+ enumsToGenerateTS map[string]map[string]interface{}
tsPrefix string
tsSuffix string
+ tsInterface bool
obfuscate bool
}
// NewBindings returns a new Bindings object
-func NewBindings(logger *logger.Logger, structPointersToBind []interface{}, exemptions []interface{}, obfuscate bool) *Bindings {
+func NewBindings(logger *logger.Logger, structPointersToBind []interface{}, exemptions []interface{}, obfuscate bool, enumsToBind []interface{}) *Bindings {
result := &Bindings{
db: newDB(),
logger: logger.CustomLogger("Bindings"),
structsToGenerateTS: make(map[string]map[string]interface{}),
+ enumsToGenerateTS: make(map[string]map[string]interface{}),
obfuscate: obfuscate,
}
@@ -47,6 +50,10 @@ func NewBindings(logger *logger.Logger, structPointersToBind []interface{}, exem
result.exemptions.Add(name)
}
+ for _, enum := range enumsToBind {
+ result.AddEnumToGenerateTS(enum)
+ }
+
// Add the structs to bind
for _, ptr := range structPointersToBind {
err := result.Add(ptr)
@@ -60,7 +67,6 @@ func NewBindings(logger *logger.Logger, structPointersToBind []interface{}, exem
// Add the given struct methods to the Bindings
func (b *Bindings) Add(structPtr interface{}) error {
-
methods, err := b.getMethods(structPtr)
if err != nil {
return fmt.Errorf("cannot bind value to app: %s", err.Error())
@@ -89,16 +95,21 @@ func (b *Bindings) ToJSON() (string, error) {
func (b *Bindings) GenerateModels() ([]byte, error) {
models := map[string]string{}
var seen slicer.StringSlicer
+ var seenEnumsPackages slicer.StringSlicer
allStructNames := b.getAllStructNames()
allStructNames.Sort()
+ allEnumNames := b.getAllEnumNames()
+ allEnumNames.Sort()
for packageName, structsToGenerate := range b.structsToGenerateTS {
thisPackageCode := ""
w := typescriptify.New()
w.WithPrefix(b.tsPrefix)
w.WithSuffix(b.tsSuffix)
+ w.WithInterface(b.tsInterface)
w.Namespace = packageName
w.WithBackupDir("")
w.KnownStructs = allStructNames
+ w.KnownEnums = allEnumNames
// sort the structs
var structNames []string
for structName := range structsToGenerate {
@@ -113,6 +124,20 @@ func (b *Bindings) GenerateModels() ([]byte, error) {
structInterface := structsToGenerate[structName]
w.Add(structInterface)
}
+
+ // if we have enums for this package, add them as well
+ var enums, enumsExist = b.enumsToGenerateTS[packageName]
+ if enumsExist {
+ for enumName, enum := range enums {
+ fqemumname := packageName + "." + enumName
+ if seen.Contains(fqemumname) {
+ continue
+ }
+ w.AddEnum(enum)
+ }
+ seenEnumsPackages.Add(packageName)
+ }
+
str, err := w.Convert(nil)
if err != nil {
return nil, err
@@ -122,6 +147,35 @@ func (b *Bindings) GenerateModels() ([]byte, error) {
models[packageName] = thisPackageCode
}
+ // Add outstanding enums to the models that were not in packages with structs
+ for packageName, enumsToGenerate := range b.enumsToGenerateTS {
+ if seenEnumsPackages.Contains(packageName) {
+ continue
+ }
+
+ thisPackageCode := ""
+ w := typescriptify.New()
+ w.WithPrefix(b.tsPrefix)
+ w.WithSuffix(b.tsSuffix)
+ w.WithInterface(b.tsInterface)
+ w.Namespace = packageName
+ w.WithBackupDir("")
+
+ for enumName, enum := range enumsToGenerate {
+ fqemumname := packageName + "." + enumName
+ if seen.Contains(fqemumname) {
+ continue
+ }
+ w.AddEnum(enum)
+ }
+ str, err := w.Convert(nil)
+ if err != nil {
+ return nil, err
+ }
+ thisPackageCode += str
+ models[packageName] = thisPackageCode
+ }
+
// Sort the package names first to make the output deterministic
sortedPackageNames := make([]string, 0)
for packageName := range models {
@@ -146,7 +200,6 @@ func (b *Bindings) GenerateModels() ([]byte, error) {
}
func (b *Bindings) WriteModels(modelsDir string) error {
-
modelsData, err := b.GenerateModels()
if err != nil {
return err
@@ -157,7 +210,7 @@ func (b *Bindings) WriteModels(modelsDir string) error {
}
filename := filepath.Join(modelsDir, "models.ts")
- err = os.WriteFile(filename, modelsData, 0755)
+ err = os.WriteFile(filename, modelsData, 0o755)
if err != nil {
return err
}
@@ -165,6 +218,39 @@ func (b *Bindings) WriteModels(modelsDir string) error {
return nil
}
+func (b *Bindings) AddEnumToGenerateTS(e interface{}) {
+ enumType := reflect.TypeOf(e)
+
+ var packageName string
+ var enumName string
+ // enums should be represented as array of all possible values
+ if hasElements(enumType) {
+ enum := enumType.Elem()
+ // simple enum represented by struct with Value/TSName fields
+ if enum.Kind() == reflect.Struct {
+ _, tsNamePresented := enum.FieldByName("TSName")
+ enumT, valuePresented := enum.FieldByName("Value")
+ if tsNamePresented && valuePresented {
+ packageName = getPackageName(enumT.Type.String())
+ enumName = enumT.Type.Name()
+ } else {
+ return
+ }
+ // otherwise expecting implementation with TSName() https://github.com/tkrajina/typescriptify-golang-structs#enums-with-tsname
+ } else {
+ packageName = getPackageName(enumType.Elem().String())
+ enumName = enumType.Elem().Name()
+ }
+ if b.enumsToGenerateTS[packageName] == nil {
+ b.enumsToGenerateTS[packageName] = make(map[string]interface{})
+ }
+ if b.enumsToGenerateTS[packageName][enumName] != nil {
+ return
+ }
+ b.enumsToGenerateTS[packageName][enumName] = e
+ }
+}
+
func (b *Bindings) AddStructToGenerateTS(packageName string, structName string, s interface{}) {
if b.structsToGenerateTS[packageName] == nil {
b.structsToGenerateTS[packageName] = make(map[string]interface{})
@@ -233,6 +319,13 @@ func (b *Bindings) SetTsSuffix(postfix string) *Bindings {
return b
}
+func (b *Bindings) SetOutputType(outputType string) *Bindings {
+ if outputType == "interfaces" {
+ b.tsInterface = true
+ }
+ return b
+}
+
func (b *Bindings) getAllStructNames() *slicer.StringSlicer {
var result slicer.StringSlicer
for packageName, structsToGenerate := range b.structsToGenerateTS {
@@ -243,6 +336,16 @@ func (b *Bindings) getAllStructNames() *slicer.StringSlicer {
return &result
}
+func (b *Bindings) getAllEnumNames() *slicer.StringSlicer {
+ var result slicer.StringSlicer
+ for packageName, enumsToGenerate := range b.enumsToGenerateTS {
+ for enumName := range enumsToGenerate {
+ result.Add(packageName + "." + enumName)
+ }
+ }
+ return &result
+}
+
func (b *Bindings) hasExportedJSONFields(typeOf reflect.Type) bool {
for i := 0; i < typeOf.NumField(); i++ {
jsonFieldName := ""
diff --git a/v2/internal/binding/binding_test/binding_anonymous_sub_struct_multi_level_test.go b/v2/internal/binding/binding_test/binding_anonymous_sub_struct_multi_level_test.go
index 3c888ab27d5..29777481ba3 100644
--- a/v2/internal/binding/binding_test/binding_anonymous_sub_struct_multi_level_test.go
+++ b/v2/internal/binding/binding_test/binding_anonymous_sub_struct_multi_level_test.go
@@ -45,7 +45,7 @@ export namespace binding_test {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
diff --git a/v2/internal/binding/binding_test/binding_anonymous_sub_struct_test.go b/v2/internal/binding/binding_test/binding_anonymous_sub_struct_test.go
index 53617efac45..11afe4f0d83 100644
--- a/v2/internal/binding/binding_test/binding_anonymous_sub_struct_test.go
+++ b/v2/internal/binding/binding_test/binding_anonymous_sub_struct_test.go
@@ -39,7 +39,7 @@ export namespace binding_test {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
diff --git a/v2/internal/binding/binding_test/binding_conflicting_package_name_test.go b/v2/internal/binding/binding_test/binding_conflicting_package_name_test.go
index 2309d6daf32..b37334ec325 100644
--- a/v2/internal/binding/binding_test/binding_conflicting_package_name_test.go
+++ b/v2/internal/binding/binding_test/binding_conflicting_package_name_test.go
@@ -42,7 +42,7 @@ func TestConflictingPackageName(t *testing.T) {
// setup
testLogger := &logger.Logger{}
- b := binding.NewBindings(testLogger, []interface{}{&HandlerTest{}}, []interface{}{}, false)
+ b := binding.NewBindings(testLogger, []interface{}{&HandlerTest{}}, []interface{}{}, false, []interface{}{})
// then
err := b.GenerateGoBindings(generationDir)
diff --git a/v2/internal/binding/binding_test/binding_emptystruct_test.go b/v2/internal/binding/binding_test/binding_emptystruct_test.go
index c36603e6439..ffb85e865b3 100644
--- a/v2/internal/binding/binding_test/binding_emptystruct_test.go
+++ b/v2/internal/binding/binding_test/binding_emptystruct_test.go
@@ -34,7 +34,7 @@ export namespace binding_test {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
diff --git a/v2/internal/binding/binding_test/binding_importedenum_test.go b/v2/internal/binding/binding_test/binding_importedenum_test.go
new file mode 100644
index 00000000000..5b5b4419edb
--- /dev/null
+++ b/v2/internal/binding/binding_test/binding_importedenum_test.go
@@ -0,0 +1,50 @@
+package binding_test
+
+import "github.com/wailsapp/wails/v2/internal/binding/binding_test/binding_test_import"
+
+type ImportedEnumStruct struct {
+ EnumValue binding_test_import.ImportedEnum `json:"EnumValue"`
+}
+
+func (s ImportedEnumStruct) Get() ImportedEnumStruct {
+ return s
+}
+
+var ImportedEnumTest = BindingTest{
+ name: "ImportedEnum",
+ structs: []interface{}{
+ &ImportedEnumStruct{},
+ },
+ enums: []interface{}{
+ binding_test_import.AllImportedEnumValues,
+ },
+ exemptions: nil,
+ shouldError: false,
+ want: `export namespace binding_test {
+
+ export class ImportedEnumStruct {
+ EnumValue: binding_test_import.ImportedEnum;
+
+ static createFrom(source: any = {}) {
+ return new ImportedEnumStruct(source);
+ }
+
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+ this.EnumValue = source["EnumValue"];
+ }
+ }
+
+ }
+
+ export namespace binding_test_import {
+
+ export enum ImportedEnum {
+ Value1 = "value1",
+ Value2 = "value2",
+ Value3 = "value3",
+ }
+
+ }
+`,
+}
diff --git a/v2/internal/binding/binding_test/binding_importedmap_test.go b/v2/internal/binding/binding_test/binding_importedmap_test.go
index 54fb261a8af..7fa11d54b0e 100644
--- a/v2/internal/binding/binding_test/binding_importedmap_test.go
+++ b/v2/internal/binding/binding_test/binding_importedmap_test.go
@@ -32,7 +32,7 @@ export namespace binding_test {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
@@ -62,7 +62,7 @@ export namespace binding_test_import {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
diff --git a/v2/internal/binding/binding_test/binding_importedslice_test.go b/v2/internal/binding/binding_test/binding_importedslice_test.go
index b4a63689c8b..5abf55b4331 100644
--- a/v2/internal/binding/binding_test/binding_importedslice_test.go
+++ b/v2/internal/binding/binding_test/binding_importedslice_test.go
@@ -32,7 +32,7 @@ export namespace binding_test {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
@@ -62,7 +62,7 @@ export namespace binding_test_import {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
diff --git a/v2/internal/binding/binding_test/binding_importedstruct_test.go b/v2/internal/binding/binding_test/binding_importedstruct_test.go
index 1629be9faeb..1e94453c231 100644
--- a/v2/internal/binding/binding_test/binding_importedstruct_test.go
+++ b/v2/internal/binding/binding_test/binding_importedstruct_test.go
@@ -33,7 +33,7 @@ export namespace binding_test {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
@@ -63,7 +63,7 @@ export namespace binding_test_import {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
diff --git a/v2/internal/binding/binding_test/binding_nestedfield_test.go b/v2/internal/binding/binding_test/binding_nestedfield_test.go
index c2e4fcf9f69..66dd11cbffe 100644
--- a/v2/internal/binding/binding_test/binding_nestedfield_test.go
+++ b/v2/internal/binding/binding_test/binding_nestedfield_test.go
@@ -44,7 +44,7 @@ export namespace binding_test {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
diff --git a/v2/internal/binding/binding_test/binding_returned_promises_test.go b/v2/internal/binding/binding_test/binding_returned_promises_test.go
index 837d5fad338..94941d0a390 100644
--- a/v2/internal/binding/binding_test/binding_returned_promises_test.go
+++ b/v2/internal/binding/binding_test/binding_returned_promises_test.go
@@ -59,7 +59,7 @@ func TestPromises(t *testing.T) {
// setup
testLogger := &logger.Logger{}
- b := binding.NewBindings(testLogger, []interface{}{&PromisesTest{}}, []interface{}{}, false)
+ b := binding.NewBindings(testLogger, []interface{}{&PromisesTest{}}, []interface{}{}, false, []interface{}{})
// then
err := b.GenerateGoBindings(generationDir)
diff --git a/v2/internal/binding/binding_test/binding_structwithoutfields_test.go b/v2/internal/binding/binding_test/binding_structwithoutfields_test.go
new file mode 100644
index 00000000000..4b2289b9891
--- /dev/null
+++ b/v2/internal/binding/binding_test/binding_structwithoutfields_test.go
@@ -0,0 +1,34 @@
+package binding_test
+
+type WithoutFields struct {
+}
+
+func (s WithoutFields) Get() WithoutFields {
+ return s
+}
+
+var WithoutFieldsTest = BindingTest{
+ name: "StructWithoutFields",
+ structs: []interface{}{
+ &WithoutFields{},
+ },
+ exemptions: nil,
+ shouldError: false,
+ want: `
+export namespace binding_test {
+
+ export class WithoutFields {
+
+
+ static createFrom(source: any = {}) {
+ return new WithoutFields(source);
+ }
+
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+
+ }
+ }
+
+}`,
+}
diff --git a/v2/internal/binding/binding_test/binding_test.go b/v2/internal/binding/binding_test/binding_test.go
index c2e35191517..a16dde5eadb 100644
--- a/v2/internal/binding/binding_test/binding_test.go
+++ b/v2/internal/binding/binding_test/binding_test.go
@@ -13,6 +13,7 @@ import (
type BindingTest struct {
name string
structs []interface{}
+ enums []interface{}
exemptions []interface{}
want string
shouldError bool
@@ -20,8 +21,9 @@ type BindingTest struct {
}
type TsGenerationOptionsTest struct {
- TsPrefix string
- TsSuffix string
+ TsPrefix string
+ TsSuffix string
+ TsOutputType string
}
func TestBindings_GenerateModels(t *testing.T) {
@@ -31,28 +33,36 @@ func TestBindings_GenerateModels(t *testing.T) {
ImportedStructTest,
ImportedSliceTest,
ImportedMapTest,
+ ImportedEnumTest,
NestedFieldTest,
NonStringMapKeyTest,
SingleFieldTest,
MultistructTest,
EmptyStructTest,
GeneratedJsEntityTest,
+ GeneratedJsEntityWithIntEnumTest,
+ GeneratedJsEntityWithStringEnumTest,
+ GeneratedJsEntityWithEnumTsName,
+ GeneratedJsEntityWithNestedStructInterfacesTest,
AnonymousSubStructTest,
AnonymousSubStructMultiLevelTest,
GeneratedJsEntityWithNestedStructTest,
- EntityWithDiffNamespaces,
+ EntityWithDiffNamespacesTest,
+ SpecialCharacterFieldTest,
+ WithoutFieldsTest,
}
testLogger := &logger.Logger{}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- b := binding.NewBindings(testLogger, tt.structs, tt.exemptions, false)
+ b := binding.NewBindings(testLogger, tt.structs, tt.exemptions, false, tt.enums)
for _, s := range tt.structs {
err := b.Add(s)
require.NoError(t, err)
}
b.SetTsPrefix(tt.TsPrefix)
b.SetTsSuffix(tt.TsSuffix)
+ b.SetOutputType(tt.TsOutputType)
got, err := b.GenerateModels()
if (err != nil) != tt.shouldError {
t.Errorf("GenerateModels() error = %v, shouldError %v", err, tt.shouldError)
diff --git a/v2/internal/binding/binding_test/binding_test_import/binding_test_import.go b/v2/internal/binding/binding_test/binding_test_import/binding_test_import.go
index 6b99d43bed3..e7080c6940e 100644
--- a/v2/internal/binding/binding_test/binding_test_import/binding_test_import.go
+++ b/v2/internal/binding/binding_test/binding_test_import/binding_test_import.go
@@ -13,3 +13,20 @@ type ASliceWrapper struct {
type AMapWrapper struct {
AMap map[string]binding_test_nestedimport.A `json:"AMap"`
}
+
+type ImportedEnum string
+
+const (
+ ImportedEnumValue1 ImportedEnum = "value1"
+ ImportedEnumValue2 ImportedEnum = "value2"
+ ImportedEnumValue3 ImportedEnum = "value3"
+)
+
+var AllImportedEnumValues = []struct {
+ Value ImportedEnum
+ TSName string
+}{
+ {ImportedEnumValue1, "Value1"},
+ {ImportedEnumValue2, "Value2"},
+ {ImportedEnumValue3, "Value3"},
+}
diff --git a/v2/internal/binding/binding_test/binding_tsgeneration_test.go b/v2/internal/binding/binding_test/binding_tsgeneration_test.go
index d2c5349c58a..850bc778afe 100644
--- a/v2/internal/binding/binding_test/binding_tsgeneration_test.go
+++ b/v2/internal/binding/binding_test/binding_tsgeneration_test.go
@@ -107,7 +107,7 @@ export namespace binding_test {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
@@ -140,7 +140,7 @@ type ChildPackageEntity struct {
ImportedPackage binding_test_import.AWrapper `json:"importedPackage"`
}
-var EntityWithDiffNamespaces = BindingTest{
+var EntityWithDiffNamespacesTest = BindingTest{
name: "EntityWithDiffNamespaces ",
structs: []interface{}{
&ParentPackageEntity{},
@@ -172,7 +172,7 @@ export namespace binding_test {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
@@ -204,7 +204,7 @@ export namespace binding_test {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
@@ -239,7 +239,7 @@ export namespace binding_test {
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
@@ -275,3 +275,235 @@ export namespace binding_test {
`,
}
+
+type IntEnum int
+
+const (
+ IntEnumValue1 IntEnum = iota
+ IntEnumValue2
+ IntEnumValue3
+)
+
+var AllIntEnumValues = []struct {
+ Value IntEnum
+ TSName string
+}{
+ {IntEnumValue1, "Value1"},
+ {IntEnumValue2, "Value2"},
+ {IntEnumValue3, "Value3"},
+}
+
+type EntityWithIntEnum struct {
+ Name string `json:"name"`
+ Enum IntEnum `json:"enum"`
+}
+
+func (e EntityWithIntEnum) Get() EntityWithIntEnum {
+ return e
+}
+
+var GeneratedJsEntityWithIntEnumTest = BindingTest{
+ name: "GeneratedJsEntityWithIntEnumTest",
+ structs: []interface{}{
+ &EntityWithIntEnum{},
+ },
+ enums: []interface{}{
+ AllIntEnumValues,
+ },
+ exemptions: nil,
+ shouldError: false,
+ TsGenerationOptionsTest: TsGenerationOptionsTest{
+ TsPrefix: "MY_PREFIX_",
+ TsSuffix: "_MY_SUFFIX",
+ },
+ want: `export namespace binding_test {
+
+ export enum MY_PREFIX_IntEnum_MY_SUFFIX {
+ Value1 = 0,
+ Value2 = 1,
+ Value3 = 2,
+ }
+ export class MY_PREFIX_EntityWithIntEnum_MY_SUFFIX {
+ name: string;
+ enum: MY_PREFIX_IntEnum_MY_SUFFIX;
+
+ static createFrom(source: any = {}) {
+ return new MY_PREFIX_EntityWithIntEnum_MY_SUFFIX(source);
+ }
+
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+ this.name = source["name"];
+ this.enum = source["enum"];
+ }
+ }
+
+ }
+`,
+}
+
+type StringEnum string
+
+const (
+ StringEnumValue1 StringEnum = "value1"
+ StringEnumValue2 StringEnum = "value2"
+ StringEnumValue3 StringEnum = "value3"
+)
+
+var AllStringEnumValues = []struct {
+ Value StringEnum
+ TSName string
+}{
+ {StringEnumValue1, "Value1"},
+ {StringEnumValue2, "Value2"},
+ {StringEnumValue3, "Value3"},
+}
+
+type EntityWithStringEnum struct {
+ Name string `json:"name"`
+ Enum StringEnum `json:"enum"`
+}
+
+func (e EntityWithStringEnum) Get() EntityWithStringEnum {
+ return e
+}
+
+var GeneratedJsEntityWithStringEnumTest = BindingTest{
+ name: "GeneratedJsEntityWithStringEnumTest",
+ structs: []interface{}{
+ &EntityWithStringEnum{},
+ },
+ enums: []interface{}{
+ AllStringEnumValues,
+ },
+ exemptions: nil,
+ shouldError: false,
+ TsGenerationOptionsTest: TsGenerationOptionsTest{
+ TsPrefix: "MY_PREFIX_",
+ TsSuffix: "_MY_SUFFIX",
+ },
+ want: `export namespace binding_test {
+
+ export enum MY_PREFIX_StringEnum_MY_SUFFIX {
+ Value1 = "value1",
+ Value2 = "value2",
+ Value3 = "value3",
+ }
+ export class MY_PREFIX_EntityWithStringEnum_MY_SUFFIX {
+ name: string;
+ enum: MY_PREFIX_StringEnum_MY_SUFFIX;
+
+ static createFrom(source: any = {}) {
+ return new MY_PREFIX_EntityWithStringEnum_MY_SUFFIX(source);
+ }
+
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+ this.name = source["name"];
+ this.enum = source["enum"];
+ }
+ }
+
+ }
+`,
+}
+
+type EnumWithTsName string
+
+const (
+ EnumWithTsName1 EnumWithTsName = "value1"
+ EnumWithTsName2 EnumWithTsName = "value2"
+ EnumWithTsName3 EnumWithTsName = "value3"
+)
+
+var AllEnumWithTsNameValues = []EnumWithTsName{EnumWithTsName1, EnumWithTsName2, EnumWithTsName3}
+
+func (v EnumWithTsName) TSName() string {
+ switch v {
+ case EnumWithTsName1:
+ return "TsName1"
+ case EnumWithTsName2:
+ return "TsName2"
+ case EnumWithTsName3:
+ return "TsName3"
+ default:
+ return "???"
+ }
+}
+
+type EntityWithEnumTsName struct {
+ Name string `json:"name"`
+ Enum EnumWithTsName `json:"enum"`
+}
+
+func (e EntityWithEnumTsName) Get() EntityWithEnumTsName {
+ return e
+}
+
+var GeneratedJsEntityWithEnumTsName = BindingTest{
+ name: "GeneratedJsEntityWithEnumTsName",
+ structs: []interface{}{
+ &EntityWithEnumTsName{},
+ },
+ enums: []interface{}{
+ AllEnumWithTsNameValues,
+ },
+ exemptions: nil,
+ shouldError: false,
+ TsGenerationOptionsTest: TsGenerationOptionsTest{
+ TsPrefix: "MY_PREFIX_",
+ TsSuffix: "_MY_SUFFIX",
+ },
+ want: `export namespace binding_test {
+
+ export enum MY_PREFIX_EnumWithTsName_MY_SUFFIX {
+ TsName1 = "value1",
+ TsName2 = "value2",
+ TsName3 = "value3",
+ }
+ export class MY_PREFIX_EntityWithEnumTsName_MY_SUFFIX {
+ name: string;
+ enum: MY_PREFIX_EnumWithTsName_MY_SUFFIX;
+
+ static createFrom(source: any = {}) {
+ return new MY_PREFIX_EntityWithEnumTsName_MY_SUFFIX(source);
+ }
+
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+ this.name = source["name"];
+ this.enum = source["enum"];
+ }
+ }
+
+ }
+`,
+}
+
+var GeneratedJsEntityWithNestedStructInterfacesTest = BindingTest{
+ name: "GeneratedJsEntityWithNestedStructInterfacesTest",
+ structs: []interface{}{
+ &ParentEntity{},
+ },
+ exemptions: nil,
+ shouldError: false,
+ TsGenerationOptionsTest: TsGenerationOptionsTest{
+ TsPrefix: "MY_PREFIX_",
+ TsSuffix: "_MY_SUFFIX",
+ TsOutputType: "interfaces",
+ },
+ want: `export namespace binding_test {
+
+ export interface MY_PREFIX_ChildEntity_MY_SUFFIX {
+ name: string;
+ childProp: number;
+ }
+ export interface MY_PREFIX_ParentEntity_MY_SUFFIX {
+ name: string;
+ ref: MY_PREFIX_ChildEntity_MY_SUFFIX;
+ parentProp: string;
+ }
+
+ }
+`,
+}
diff --git a/v2/internal/binding/binding_test/binding_type_alias_test.go b/v2/internal/binding/binding_test/binding_type_alias_test.go
index 8e7c7ca6de9..498c5976ceb 100644
--- a/v2/internal/binding/binding_test/binding_type_alias_test.go
+++ b/v2/internal/binding/binding_test/binding_type_alias_test.go
@@ -41,7 +41,7 @@ func TestAliases(t *testing.T) {
// setup
testLogger := &logger.Logger{}
- b := binding.NewBindings(testLogger, []interface{}{&AliasTest{}}, []interface{}{}, false)
+ b := binding.NewBindings(testLogger, []interface{}{&AliasTest{}}, []interface{}{}, false, []interface{}{})
// then
err := b.GenerateGoBindings(generationDir)
diff --git a/v2/internal/binding/binding_test/binding_variablespecialcharacter_test.go b/v2/internal/binding/binding_test/binding_variablespecialcharacter_test.go
new file mode 100644
index 00000000000..7dbe723509f
--- /dev/null
+++ b/v2/internal/binding/binding_test/binding_variablespecialcharacter_test.go
@@ -0,0 +1,32 @@
+package binding_test
+
+type SpecialCharacterField struct {
+ ID string `json:"@ID,omitempty"`
+}
+
+func (s SpecialCharacterField) Get() SpecialCharacterField {
+ return s
+}
+
+var SpecialCharacterFieldTest = BindingTest{
+ name: "SpecialCharacterField",
+ structs: []interface{}{
+ &SpecialCharacterField{},
+ },
+ exemptions: nil,
+ shouldError: false,
+ want: `
+export namespace binding_test {
+ export class SpecialCharacterField {
+ "@ID"?: string;
+ static createFrom(source: any = {}) {
+ return new SpecialCharacterField(source);
+ }
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+ this["@ID"] = source["@ID"];
+ }
+ }
+}
+`,
+}
diff --git a/v2/internal/binding/boundMethod.go b/v2/internal/binding/boundMethod.go
index f6ffdb600bc..c13e2ff37cc 100644
--- a/v2/internal/binding/boundMethod.go
+++ b/v2/internal/binding/boundMethod.go
@@ -28,7 +28,6 @@ func (b *BoundMethod) OutputCount() int {
// ParseArgs method converts the input json into the types expected by the method
func (b *BoundMethod) ParseArgs(args []json.RawMessage) ([]interface{}, error) {
-
result := make([]interface{}, b.InputCount())
if len(args) != b.InputCount() {
return nil, fmt.Errorf("received %d arguments to method '%s', expected %d", len(args), b.Name, b.InputCount())
diff --git a/v2/internal/binding/db.go b/v2/internal/binding/db.go
index f22798680ba..f7b793839d8 100644
--- a/v2/internal/binding/db.go
+++ b/v2/internal/binding/db.go
@@ -2,7 +2,6 @@ package binding
import (
"encoding/json"
- "sort"
"sync"
"unsafe"
)
@@ -17,24 +16,28 @@ type DB struct {
methodMap map[string]*BoundMethod
// This uses ids to reference bound methods at runtime
- obfuscatedMethodMap map[int]*BoundMethod
+ obfuscatedMethodArray []*ObfuscatedMethod
// Lock to ensure sync access to the data
lock sync.RWMutex
}
+type ObfuscatedMethod struct {
+ method *BoundMethod
+ methodName string
+}
+
func newDB() *DB {
return &DB{
- store: make(map[string]map[string]map[string]*BoundMethod),
- methodMap: make(map[string]*BoundMethod),
- obfuscatedMethodMap: make(map[int]*BoundMethod),
+ store: make(map[string]map[string]map[string]*BoundMethod),
+ methodMap: make(map[string]*BoundMethod),
+ obfuscatedMethodArray: []*ObfuscatedMethod{},
}
}
// GetMethodFromStore returns the method for the given package/struct/method names
// nil is returned if any one of those does not exist
func (d *DB) GetMethodFromStore(packageName string, structName string, methodName string) *BoundMethod {
-
// Lock the db whilst processing and unlock on return
d.lock.RLock()
defer d.lock.RUnlock()
@@ -53,7 +56,6 @@ func (d *DB) GetMethodFromStore(packageName string, structName string, methodNam
// GetMethod returns the method for the given qualified method name
// qualifiedMethodName is "packagename.structname.methodname"
func (d *DB) GetMethod(qualifiedMethodName string) *BoundMethod {
-
// Lock the db whilst processing and unlock on return
d.lock.RLock()
defer d.lock.RUnlock()
@@ -67,12 +69,15 @@ func (d *DB) GetObfuscatedMethod(id int) *BoundMethod {
d.lock.RLock()
defer d.lock.RUnlock()
- return d.obfuscatedMethodMap[id]
+ if len(d.obfuscatedMethodArray) <= id {
+ return nil
+ }
+
+ return d.obfuscatedMethodArray[id].method
}
// AddMethod adds the given method definition to the db using the given qualified path: packageName.structName.methodName
func (d *DB) AddMethod(packageName string, structName string, methodName string, methodDefinition *BoundMethod) {
-
// Lock the db whilst processing and unlock on return
d.lock.Lock()
defer d.lock.Unlock()
@@ -99,12 +104,11 @@ func (d *DB) AddMethod(packageName string, structName string, methodName string,
// Store in the methodMap
key := packageName + "." + structName + "." + methodName
d.methodMap[key] = methodDefinition
-
+ d.obfuscatedMethodArray = append(d.obfuscatedMethodArray, &ObfuscatedMethod{method: methodDefinition, methodName: key})
}
// ToJSON converts the method map to JSON
func (d *DB) ToJSON() (string, error) {
-
// Lock the db whilst processing and unlock on return
d.lock.RLock()
defer d.lock.RUnlock()
@@ -120,20 +124,11 @@ func (d *DB) ToJSON() (string, error) {
// UpdateObfuscatedCallMap sets up the secure call mappings
func (d *DB) UpdateObfuscatedCallMap() map[string]int {
+ mappings := make(map[string]int)
- var mappings = make(map[string]int)
-
- // Iterate map keys and sort them
- keys := make([]string, 0, len(d.methodMap))
- for k := range d.methodMap {
- keys = append(keys, k)
+ for id, k := range d.obfuscatedMethodArray {
+ mappings[k.methodName] = id
}
- sort.Strings(keys)
- // Iterate sorted keys and add to obfuscated method map
- for id, k := range keys {
- mappings[k] = id
- d.obfuscatedMethodMap[id] = d.methodMap[k]
- }
return mappings
}
diff --git a/v2/internal/binding/generate.go b/v2/internal/binding/generate.go
index 8416aade1ca..02a0bd29272 100644
--- a/v2/internal/binding/generate.go
+++ b/v2/internal/binding/generate.go
@@ -15,12 +15,14 @@ import (
"github.com/leaanthony/slicer"
)
-var mapRegex *regexp.Regexp
-var keyPackageIndex int
-var keyTypeIndex int
-var valueArrayIndex int
-var valuePackageIndex int
-var valueTypeIndex int
+var (
+ mapRegex *regexp.Regexp
+ keyPackageIndex int
+ keyTypeIndex int
+ valueArrayIndex int
+ valuePackageIndex int
+ valueTypeIndex int
+)
func init() {
mapRegex = regexp.MustCompile(`(?:map\[(?:(?P\w+)\.)?(?P\w+)])?(?P\[])?(?:\*?(?P\w+)\.)?(?P.+)`)
@@ -81,9 +83,7 @@ func (b *Bindings) GenerateGoBindings(baseDir string) error {
} else {
jsoutput.WriteString(fmt.Sprintf(" return window['go']['%s']['%s']['%s'](%s);", packageName, structName, methodName, argsString))
}
- jsoutput.WriteString("\n")
- jsoutput.WriteString(fmt.Sprintf("}"))
- jsoutput.WriteString("\n")
+ jsoutput.WriteString("\n}\n")
// Generate TS
tsBody.WriteString(fmt.Sprintf("\nexport function %s(", methodName))
@@ -127,12 +127,12 @@ func (b *Bindings) GenerateGoBindings(baseDir string) error {
tsContent.WriteString(tsBody.String())
jsfilename := filepath.Join(packageDir, structName+".js")
- err = os.WriteFile(jsfilename, jsoutput.Bytes(), 0755)
+ err = os.WriteFile(jsfilename, jsoutput.Bytes(), 0o755)
if err != nil {
return err
}
tsfilename := filepath.Join(packageDir, structName+".d.ts")
- err = os.WriteFile(tsfilename, tsContent.Bytes(), 0755)
+ err = os.WriteFile(tsfilename, tsContent.Bytes(), 0o755)
if err != nil {
return err
}
@@ -186,7 +186,7 @@ func goTypeToJSDocType(input string, importNamespaces *slicer.StringSlicer) stri
valueArray := matches[valueArrayIndex]
valuePackage := matches[valuePackageIndex]
valueType := matches[valueTypeIndex]
- //fmt.Printf("input=%s, keyPackage=%s, keyType=%s, valueArray=%s, valuePackage=%s, valueType=%s\n",
+ // fmt.Printf("input=%s, keyPackage=%s, keyType=%s, valueArray=%s, valuePackage=%s, valueType=%s\n",
// input,
// keyPackage,
// keyType,
diff --git a/v2/internal/binding/generate_test.go b/v2/internal/binding/generate_test.go
index 565fba31caa..8d6a833b817 100644
--- a/v2/internal/binding/generate_test.go
+++ b/v2/internal/binding/generate_test.go
@@ -25,7 +25,7 @@ type B struct {
func TestNestedStruct(t *testing.T) {
bind := &BindForTest{}
- testBindings := NewBindings(logger.New(nil), []interface{}{bind}, []interface{}{}, false)
+ testBindings := NewBindings(logger.New(nil), []interface{}{bind}, []interface{}{}, false, []interface{}{})
namesStrSlicer := testBindings.getAllStructNames()
names := []string{}
diff --git a/v2/internal/binding/reflect.go b/v2/internal/binding/reflect.go
old mode 100755
new mode 100644
index 66a9cf7bdea..57a6335bd5b
--- a/v2/internal/binding/reflect.go
+++ b/v2/internal/binding/reflect.go
@@ -19,13 +19,12 @@ func isFunction(value interface{}) bool {
return reflect.ValueOf(value).Kind() == reflect.Func
}
-// isStructPtr returns true if the value given is a struct
+// isStruct returns true if the value given is a struct
func isStruct(value interface{}) bool {
return reflect.ValueOf(value).Kind() == reflect.Struct
}
func (b *Bindings) getMethods(value interface{}) ([]*BoundMethod, error) {
-
// Create result placeholder
var result []*BoundMethod
@@ -169,7 +168,6 @@ func getPackageName(in string) string {
func getSplitReturn(in string) (string, string) {
result := strings.Split(in, ".")
return result[0], result[1]
-
}
func hasElements(typ reflect.Type) bool {
diff --git a/v2/internal/frontend/calls.go b/v2/internal/frontend/calls.go
index 3983c24bfcd..5401106bc5f 100644
--- a/v2/internal/frontend/calls.go
+++ b/v2/internal/frontend/calls.go
@@ -1,5 +1,5 @@
package frontend
type Calls interface {
- Callback(string)
+ Callback(message string)
}
diff --git a/v2/internal/frontend/desktop/darwin/AppDelegate.h b/v2/internal/frontend/desktop/darwin/AppDelegate.h
index e2dd841c91e..a8d10f647d9 100644
--- a/v2/internal/frontend/desktop/darwin/AppDelegate.h
+++ b/v2/internal/frontend/desktop/darwin/AppDelegate.h
@@ -11,13 +11,23 @@
#import
#import "WailsContext.h"
-@interface AppDelegate : NSResponder
+@interface AppDelegate : NSResponder
@property bool alwaysOnTop;
@property bool startHidden;
+@property (retain) NSString* singleInstanceUniqueId;
+@property bool singleInstanceLockEnabled;
@property bool startFullscreen;
@property (retain) WailsWindow* mainWindow;
@end
+extern void HandleOpenFile(char *);
+
+extern void HandleSecondInstanceData(char * message);
+
+void SendDataToFirstInstance(char * singleInstanceUniqueId, char * text);
+
+char* GetMacOsNativeTempDir();
+
#endif /* AppDelegate_h */
diff --git a/v2/internal/frontend/desktop/darwin/AppDelegate.m b/v2/internal/frontend/desktop/darwin/AppDelegate.m
index 6d46deae452..318c333d861 100644
--- a/v2/internal/frontend/desktop/darwin/AppDelegate.m
+++ b/v2/internal/frontend/desktop/darwin/AppDelegate.m
@@ -9,15 +9,29 @@
#import
#import "AppDelegate.h"
+#import "message.h"
@implementation AppDelegate
+-(BOOL)application:(NSApplication *)sender openFile:(NSString *)filename
+{
+ const char* utf8FileName = filename.UTF8String;
+ HandleOpenFile((char*)utf8FileName);
+ return YES;
+}
+
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {
- return NO;
+ return NO;
+}
+
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
+ processMessage("Q");
+ return NSTerminateCancel;
}
+
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
if (self.alwaysOnTop) {
- [self.mainWindow setLevel:NSStatusWindowLevel];
+ [self.mainWindow setLevel:NSFloatingWindowLevel];
}
if ( !self.startHidden ) {
[self.mainWindow makeKeyAndOrderFront:self];
@@ -32,6 +46,37 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[self.mainWindow setCollectionBehavior:behaviour];
[self.mainWindow toggleFullScreen:nil];
}
+
+ if ( self.singleInstanceLockEnabled ) {
+ [[NSDistributedNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(handleSecondInstanceNotification:) name:self.singleInstanceUniqueId object:nil];
+ }
+}
+
+void SendDataToFirstInstance(char * singleInstanceUniqueId, char * message) {
+ // we pass message in object because otherwise sandboxing will prevent us from sending it https://developer.apple.com/forums/thread/129437
+ NSString * myString = [NSString stringWithUTF8String:message];
+ [[NSDistributedNotificationCenter defaultCenter]
+ postNotificationName:[NSString stringWithUTF8String:singleInstanceUniqueId]
+ object:(__bridge const void *)(myString)
+ userInfo:nil
+ deliverImmediately:YES];
+}
+
+char* GetMacOsNativeTempDir() {
+ NSString *tempDir = NSTemporaryDirectory();
+ char *copy = strdup([tempDir UTF8String]);
+
+ return copy;
+}
+
+- (void)handleSecondInstanceNotification:(NSNotification *)note;
+{
+ if (note.object != nil) {
+ NSString * message = (__bridge NSString *)note.object;
+ const char* utf8Message = message.UTF8String;
+ HandleSecondInstanceData((char*)utf8Message);
+ }
}
- (void)dealloc {
diff --git a/v2/internal/frontend/desktop/darwin/Application.h b/v2/internal/frontend/desktop/darwin/Application.h
index e418168e6bb..2582eb6e894 100644
--- a/v2/internal/frontend/desktop/darwin/Application.h
+++ b/v2/internal/frontend/desktop/darwin/Application.h
@@ -17,7 +17,7 @@
#define WindowStartsMinimised 2
#define WindowStartsFullscreen 3
-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 debug, int windowStartState, int startsHidden, int minWidth, int minHeight, int maxWidth, int maxHeight, bool fraudulentWebsiteWarningEnabled);
+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, bool enableDragAndDrop, bool disableWebViewDragAndDrop);
void Run(void*, const char* url);
void SetTitle(void* ctx, const char *title);
@@ -41,6 +41,7 @@ void ShowApplication(void* ctx);
void SetBackgroundColour(void* ctx, int r, int g, int b, int a);
void ExecJS(void* ctx, const char*);
void Quit(void*);
+void WindowPrint(void* ctx);
const char* GetSize(void *ctx);
const char* GetPosition(void *ctx);
diff --git a/v2/internal/frontend/desktop/darwin/Application.m b/v2/internal/frontend/desktop/darwin/Application.m
index ab951714d4f..941e6e9223e 100644
--- a/v2/internal/frontend/desktop/darwin/Application.m
+++ b/v2/internal/frontend/desktop/darwin/Application.m
@@ -10,25 +10,27 @@
#import "WailsContext.h"
#import "Application.h"
#import "AppDelegate.h"
+#import "WindowDelegate.h"
#import "WailsMenu.h"
#import "WailsMenuItem.h"
-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 debug, int windowStartState, int startsHidden, int minWidth, int minHeight, int maxWidth, int maxHeight, bool fraudulentWebsiteWarningEnabled) {
-
+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, bool enableDragAndDrop, bool disableWebViewDragAndDrop) {
+
[NSApplication sharedApplication];
WailsContext *result = [WailsContext new];
- result.debug = debug;
-
+ result.devtoolsEnabled = devtoolsEnabled;
+ result.defaultContextMenuEnabled = defaultContextMenuEnabled;
+
if ( windowStartState == WindowStartsFullscreen ) {
fullscreen = 1;
}
- [result CreateWindow:width :height :frameless :resizable :fullscreen :fullSizeContent :hideTitleBar :titlebarAppearsTransparent :hideTitle :useToolbar :hideToolbarSeparator :webviewIsTransparent :hideWindowOnClose :safeInit(appearance) :windowIsTranslucent :minWidth :minHeight :maxWidth :maxHeight :fraudulentWebsiteWarningEnabled];
+ [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 :enableDragAndDrop :disableWebViewDragAndDrop];
[result SetTitle:safeInit(title)];
[result Center];
-
+
switch( windowStartState ) {
case WindowStartsMaximised:
[result.mainWindow zoom:nil];
@@ -41,14 +43,19 @@
if ( startsHidden == 1 ) {
result.startHidden = true;
}
-
+
if ( fullscreen == 1 ) {
result.startFullscreen = true;
}
-
+
+ if ( singleInstanceLockEnabled == 1 ) {
+ result.singleInstanceLockEnabled = true;
+ result.singleInstanceUniqueId = safeInit(singleInstanceUniqueId);
+ }
+
result.alwaysOnTop = alwaysOnTop;
result.hideOnClose = hideWindowOnClose;
-
+
return result;
}
@@ -179,7 +186,7 @@ void ToggleMaximise(void* inctx) {
NSString *result = [NSString stringWithFormat:@"%d,%d",x,y];
return [result UTF8String];
}
-
+
const bool IsFullScreen(void *inctx) {
WailsContext *ctx = (__bridge WailsContext*) inctx;
return [ctx IsFullScreen];
@@ -247,7 +254,7 @@ void ShowApplication(void *inctx) {
void MessageDialog(void *inctx, const char* dialogType, const char* title, const char* message, const char* button1, const char* button2, const char* button3, const char* button4, const char* defaultButton, const char* cancelButton, void* iconData, int iconDataLength) {
WailsContext *ctx = (__bridge WailsContext*) inctx;
-
+
NSString *_dialogType = safeInit(dialogType);
NSString *_title = safeInit(title);
NSString *_message = safeInit(message);
@@ -257,33 +264,33 @@ void MessageDialog(void *inctx, const char* dialogType, const char* title, const
NSString *_button4 = safeInit(button4);
NSString *_defaultButton = safeInit(defaultButton);
NSString *_cancelButton = safeInit(cancelButton);
-
+
ON_MAIN_THREAD(
[ctx MessageDialog:_dialogType :_title :_message :_button1 :_button2 :_button3 :_button4 :_defaultButton :_cancelButton :iconData :iconDataLength];
)
}
void OpenFileDialog(void *inctx, const char* title, const char* defaultFilename, const char* defaultDirectory, int allowDirectories, int allowFiles, int canCreateDirectories, int treatPackagesAsDirectories, int resolveAliases, int showHiddenFiles, int allowMultipleSelection, const char* filters) {
-
+
WailsContext *ctx = (__bridge WailsContext*) inctx;
NSString *_title = safeInit(title);
NSString *_defaultFilename = safeInit(defaultFilename);
NSString *_defaultDirectory = safeInit(defaultDirectory);
NSString *_filters = safeInit(filters);
-
+
ON_MAIN_THREAD(
[ctx OpenFileDialog:_title :_defaultFilename :_defaultDirectory :allowDirectories :allowFiles :canCreateDirectories :treatPackagesAsDirectories :resolveAliases :showHiddenFiles :allowMultipleSelection :_filters];
)
}
void SaveFileDialog(void *inctx, const char* title, const char* defaultFilename, const char* defaultDirectory, int canCreateDirectories, int treatPackagesAsDirectories, int showHiddenFiles, const char* filters) {
-
+
WailsContext *ctx = (__bridge WailsContext*) inctx;
NSString *_title = safeInit(title);
NSString *_defaultFilename = safeInit(defaultFilename);
NSString *_defaultDirectory = safeInit(defaultDirectory);
NSString *_filters = safeInit(filters);
-
+
ON_MAIN_THREAD(
[ctx SaveFileDialog:_title :_defaultFilename :_defaultDirectory :canCreateDirectories :treatPackagesAsDirectories :showHiddenFiles :_filters];
)
@@ -365,6 +372,8 @@ void Run(void *inctx, const char* url) {
delegate.mainWindow = ctx.mainWindow;
delegate.alwaysOnTop = ctx.alwaysOnTop;
delegate.startHidden = ctx.startHidden;
+ delegate.singleInstanceLockEnabled = ctx.singleInstanceLockEnabled;
+ delegate.singleInstanceUniqueId = ctx.singleInstanceUniqueId;
delegate.startFullscreen = ctx.startFullscreen;
NSString *_url = safeInit(url);
@@ -383,3 +392,37 @@ void ReleaseContext(void *inctx) {
WailsContext *ctx = (__bridge WailsContext*) inctx;
[ctx release];
}
+
+// Credit: https://stackoverflow.com/q/33319295
+void WindowPrint(void *inctx) {
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
+ if (@available(macOS 11.0, *)) {
+ ON_MAIN_THREAD(
+ WailsContext *ctx = (__bridge WailsContext*) inctx;
+ WKWebView* webView = ctx.webview;
+
+ // I think this should be exposed as a config
+ // It directly affects the printed output/PDF
+ NSPrintInfo *pInfo = [NSPrintInfo sharedPrintInfo];
+ pInfo.horizontalPagination = NSPrintingPaginationModeAutomatic;
+ pInfo.verticalPagination = NSPrintingPaginationModeAutomatic;
+ pInfo.verticallyCentered = YES;
+ pInfo.horizontallyCentered = YES;
+ pInfo.orientation = NSPaperOrientationLandscape;
+ pInfo.leftMargin = 0;
+ pInfo.rightMargin = 0;
+ pInfo.topMargin = 0;
+ pInfo.bottomMargin = 0;
+
+ NSPrintOperation *po = [webView printOperationWithPrintInfo:pInfo];
+ po.showsPrintPanel = YES;
+ po.showsProgressPanel = YES;
+
+ po.view.frame = webView.bounds;
+
+ [po runOperationModalForWindow:ctx.mainWindow delegate:ctx.mainWindow.delegate didRunSelector:nil contextInfo:nil];
+ )
+ }
+#endif
+}
diff --git a/v2/internal/frontend/desktop/darwin/CustomProtocol.h b/v2/internal/frontend/desktop/darwin/CustomProtocol.h
new file mode 100644
index 00000000000..da0e7079f1d
--- /dev/null
+++ b/v2/internal/frontend/desktop/darwin/CustomProtocol.h
@@ -0,0 +1,14 @@
+#ifndef CustomProtocol_h
+#define CustomProtocol_h
+
+#import
+
+extern void HandleCustomProtocol(char*);
+
+@interface CustomProtocolSchemeHandler : NSObject
++ (void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent;
+@end
+
+void StartCustomProtocolHandler(void);
+
+#endif /* CustomProtocol_h */
diff --git a/v2/internal/frontend/desktop/darwin/CustomProtocol.m b/v2/internal/frontend/desktop/darwin/CustomProtocol.m
new file mode 100644
index 00000000000..7365e4f5042
--- /dev/null
+++ b/v2/internal/frontend/desktop/darwin/CustomProtocol.m
@@ -0,0 +1,20 @@
+#include "CustomProtocol.h"
+
+@implementation CustomProtocolSchemeHandler
++ (void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent {
+ [event paramDescriptorForKeyword:keyDirectObject];
+
+ NSString *urlStr = [[event paramDescriptorForKeyword:keyDirectObject] stringValue];
+
+ HandleCustomProtocol((char*)[[[event paramDescriptorForKeyword:keyDirectObject] stringValue] UTF8String]);
+}
+@end
+
+void StartCustomProtocolHandler(void) {
+ NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager];
+
+ [appleEventManager setEventHandler:[CustomProtocolSchemeHandler class]
+ andSelector:@selector(handleGetURLEvent:withReplyEvent:)
+ forEventClass:kInternetEventClass
+ andEventID: kAEGetURL];
+}
diff --git a/v2/internal/frontend/desktop/darwin/WailsContext.h b/v2/internal/frontend/desktop/darwin/WailsContext.h
index 1e48b218267..2ec6d8707df 100644
--- a/v2/internal/frontend/desktop/darwin/WailsContext.h
+++ b/v2/internal/frontend/desktop/darwin/WailsContext.h
@@ -10,6 +10,7 @@
#import
#import
+#import "WailsWebView.h"
#if __has_include()
#define USE_NEW_FILTERS
@@ -32,7 +33,7 @@
@interface WailsContext : NSObject
@property (retain) WailsWindow* mainWindow;
-@property (retain) WKWebView* webview;
+@property (retain) WailsWebView* webview;
@property (nonatomic, assign) id appdelegate;
@property bool hideOnClose;
@@ -40,11 +41,15 @@
@property bool startHidden;
@property bool startFullscreen;
+@property bool singleInstanceLockEnabled;
+@property (retain) NSString* singleInstanceUniqueId;
+
@property (retain) NSEvent* mouseEvent;
@property bool alwaysOnTop;
-@property bool debug;
+@property bool devtoolsEnabled;
+@property bool defaultContextMenuEnabled;
@property (retain) WKUserContentController* userContentController;
@@ -54,7 +59,13 @@
@property (retain) NSString* aboutTitle;
@property (retain) NSString* aboutDescription;
-- (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 {
+ bool *tabFocusesLinks;
+ bool *textInteractionEnabled;
+ 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 :(bool)enableDragAndDrop :(bool)disableWebViewDragAndDrop;
- (void) SetSize:(int)width :(int)height;
- (void) SetPosition:(int)x :(int) y;
- (void) SetMinSize:(int)minWidth :(int)minHeight;
diff --git a/v2/internal/frontend/desktop/darwin/WailsContext.m b/v2/internal/frontend/desktop/darwin/WailsContext.m
index 29fa9931765..581a8c13885 100644
--- a/v2/internal/frontend/desktop/darwin/WailsContext.m
+++ b/v2/internal/frontend/desktop/darwin/WailsContext.m
@@ -1,4 +1,3 @@
-//go:build darwin
//
// WailsContext.m
// test
@@ -11,6 +10,7 @@
#import "WailsContext.h"
#import "WailsAlert.h"
#import "WailsMenu.h"
+#import "WailsWebView.h"
#import "WindowDelegate.h"
#import "message.h"
#import "Role.h"
@@ -39,9 +39,9 @@ - (void) disableWindowConstraints {
@implementation WailsContext
- (void) SetSize:(int)width :(int)height {
-
+
if (self.shuttingDown) return;
-
+
NSRect frame = [self.mainWindow frame];
frame.origin.y += frame.size.height - height;
frame.size.width = width;
@@ -50,22 +50,22 @@ - (void) SetSize:(int)width :(int)height {
}
- (void) SetPosition:(int)x :(int)y {
-
+
if (self.shuttingDown) return;
-
+
NSScreen* screen = [self getCurrentScreen];
NSRect windowFrame = [self.mainWindow frame];
- NSRect screenFrame = [screen frame];
+ NSRect screenFrame = [screen visibleFrame];
windowFrame.origin.x = screenFrame.origin.x + (float)x;
windowFrame.origin.y = (screenFrame.origin.y + screenFrame.size.height) - windowFrame.size.height - (float)y;
-
+
[self.mainWindow setFrame:windowFrame display:TRUE animate:FALSE];
}
- (void) SetMinSize:(int)minWidth :(int)minHeight {
-
+
if (self.shuttingDown) return;
-
+
NSSize size = { minWidth, minHeight };
self.mainWindow.userMinSize = size;
[self.mainWindow setMinSize:size];
@@ -74,14 +74,14 @@ - (void) SetMinSize:(int)minWidth :(int)minHeight {
- (void) SetMaxSize:(int)maxWidth :(int)maxHeight {
-
+
if (self.shuttingDown) return;
-
+
NSSize size = { FLT_MAX, FLT_MAX };
-
+
size.width = maxWidth > 0 ? maxWidth : FLT_MAX;
size.height = maxHeight > 0 ? maxHeight : FLT_MAX;
-
+
self.mainWindow.userMaxSize = size;
[self.mainWindow setMaxSize:size];
[self adjustWindowSize];
@@ -89,18 +89,18 @@ - (void) SetMaxSize:(int)maxWidth :(int)maxHeight {
- (void) adjustWindowSize {
-
+
if (self.shuttingDown) return;
-
+
NSRect currentFrame = [self.mainWindow frame];
-
+
if ( currentFrame.size.width > self.mainWindow.userMaxSize.width ) currentFrame.size.width = self.mainWindow.userMaxSize.width;
if ( currentFrame.size.width < self.mainWindow.userMinSize.width ) currentFrame.size.width = self.mainWindow.userMinSize.width;
if ( currentFrame.size.height > self.mainWindow.userMaxSize.height ) currentFrame.size.height = self.mainWindow.userMaxSize.height;
if ( currentFrame.size.height < self.mainWindow.userMinSize.height ) currentFrame.size.height = self.mainWindow.userMinSize.height;
[self.mainWindow setFrame:currentFrame display:YES animate:FALSE];
-
+
}
- (void) dealloc {
@@ -136,16 +136,16 @@ - (BOOL) isFullscreen {
return NO;
}
-- (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 {
+- (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 :(bool)enableDragAndDrop :(bool)disableWebViewDragAndDrop {
NSWindowStyleMask styleMask = 0;
-
+
if( !frameless ) {
if (!hideTitleBar) {
styleMask |= NSWindowStyleMaskTitled;
}
styleMask |= NSWindowStyleMaskClosable;
}
-
+
styleMask |= NSWindowStyleMaskMiniaturizable;
if( fullSizeContent || frameless || titlebarAppearsTransparent ) {
@@ -155,23 +155,22 @@ - (void) CreateWindow:(int)width :(int)height :(bool)frameless :(bool)resizable
if (resizable) {
styleMask |= NSWindowStyleMaskResizable;
}
-
+
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];
[toolbar setShowsBaselineSeparator:!hideToolbarSeparator];
[self.mainWindow setToolbar:toolbar];
-
+
}
-
+
[self.mainWindow setTitleVisibility:hideTitle];
[self.mainWindow setTitlebarAppearsTransparent:titlebarAppearsTransparent];
-
+
// [self.mainWindow canBecomeKeyWindow];
-
+
id contentView = [self.mainWindow contentView];
if (windowIsTranslucent) {
NSVisualEffectView *effectView = [NSVisualEffectView alloc];
@@ -182,12 +181,17 @@ - (void) CreateWindow:(int)width :(int)height :(bool)frameless :(bool)resizable
[effectView setState:NSVisualEffectStateActive];
[contentView addSubview:effectView positioned:NSWindowBelow relativeTo:nil];
}
-
+
if (appearance != nil) {
NSAppearance *nsAppearance = [NSAppearance appearanceNamed:appearance];
[self.mainWindow setAppearance:nsAppearance];
}
-
+
+ if (!zoomable && resizable) {
+ NSButton *button = [self.mainWindow standardWindowButton:NSWindowZoomButton];
+ [button setEnabled: NO];
+ }
+
NSSize minSize = { minWidth, minHeight };
NSSize maxSize = { maxWidth, maxHeight };
@@ -199,62 +203,87 @@ - (void) CreateWindow:(int)width :(int)height :(bool)frameless :(bool)resizable
}
self.mainWindow.userMaxSize = maxSize;
self.mainWindow.userMinSize = minSize;
-
+
if( !fullscreen ) {
[self.mainWindow applyWindowConstraints];
}
-
+
WindowDelegate *windowDelegate = [WindowDelegate new];
windowDelegate.hideOnClose = hideWindowOnClose;
windowDelegate.ctx = self;
[self.mainWindow setDelegate:windowDelegate];
-
+
// Webview stuff here!
WKWebViewConfiguration *config = [WKWebViewConfiguration new];
config.suppressesIncrementalRendering = true;
config.applicationNameForUserAgent = @"wails.io";
[config setURLSchemeHandler:self forURLScheme:@"wails"];
-
-// [config.preferences setValue:[NSNumber numberWithBool:true] forKey:@"developerExtrasEnabled"];
+ if (preferences.tabFocusesLinks != NULL) {
+ config.preferences.tabFocusesLinks = *preferences.tabFocusesLinks;
+ }
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110300
+ if (@available(macOS 11.3, *)) {
+ if (preferences.textInteractionEnabled != NULL) {
+ config.preferences.textInteractionEnabled = *preferences.textInteractionEnabled;
+ }
+ }
+#endif
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 120300
+ if (@available(macOS 12.3, *)) {
+ if (preferences.fullscreenEnabled != NULL) {
+ config.preferences.elementFullscreenEnabled = *preferences.fullscreenEnabled;
+ }
+ }
+#endif
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
if (@available(macOS 10.15, *)) {
config.preferences.fraudulentWebsiteWarningEnabled = fraudulentWebsiteWarningEnabled;
}
+#endif
WKUserContentController* userContentController = [WKUserContentController new];
[userContentController addScriptMessageHandler:self name:@"external"];
config.userContentController = userContentController;
self.userContentController = userContentController;
- if (self.debug) {
+
+ if (self.devtoolsEnabled) {
[config.preferences setValue:@YES forKey:@"developerExtrasEnabled"];
- } else {
+ }
+
+ if (!self.defaultContextMenuEnabled) {
// Disable default context menus
WKUserScript *initScript = [WKUserScript new];
- [initScript initWithSource:@"window.wails.flags.disableWailsDefaultContextMenu = true;"
+ [initScript initWithSource:@"window.wails.flags.disableDefaultContextMenu = true;"
injectionTime:WKUserScriptInjectionTimeAtDocumentEnd
forMainFrameOnly:false];
[userContentController addUserScript:initScript];
-
}
-
- self.webview = [WKWebView alloc];
+
+ self.webview = [WailsWebView alloc];
+ self.webview.enableDragAndDrop = enableDragAndDrop;
+ self.webview.disableWebViewDragAndDrop = disableWebViewDragAndDrop;
+
CGRect init = { 0,0,0,0 };
[self.webview initWithFrame:init configuration:config];
[contentView addSubview:self.webview];
[self.webview setAutoresizingMask: NSViewWidthSizable|NSViewHeightSizable];
CGRect contentViewBounds = [contentView bounds];
[self.webview setFrame:contentViewBounds];
-
+
if (webviewIsTransparent) {
[self.webview setValue:[NSNumber numberWithBool:!webviewIsTransparent] forKey:@"drawsBackground"];
}
-
+
[self.webview setNavigationDelegate:self];
self.webview.UIDelegate = self;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setBool:FALSE forKey:@"NSAutomaticQuoteSubstitutionEnabled"];
-
+
// Mouse monitors
[NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskLeftMouseDown handler:^NSEvent * _Nullable(NSEvent * _Nonnull event) {
id window = [event window];
@@ -263,7 +292,7 @@ - (void) CreateWindow:(int)width :(int)height :(bool)frameless :(bool)resizable
}
return event;
}];
-
+
[NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskLeftMouseUp handler:^NSEvent * _Nullable(NSEvent * _Nonnull event) {
id window = [event window];
if (window == self.mainWindow) {
@@ -272,9 +301,9 @@ - (void) CreateWindow:(int)width :(int)height :(bool)frameless :(bool)resizable
}
return event;
}];
-
+
self.applicationMenu = [NSMenu new];
-
+
}
- (NSMenuItem*) newMenuItem :(NSString*)title :(SEL)selector :(NSString*)key :(NSEventModifierFlags)flags {
@@ -310,9 +339,9 @@ - (void) SetBackgroundColour:(int)r :(int)g :(int)b :(int)a {
float green = g/255.0;
float blue = b/255.0;
float alpha = a/255.0;
-
+
id colour = [NSColor colorWithCalibratedRed:red green:green blue:blue alpha:alpha ];
-
+
[self.mainWindow setBackgroundColor:colour];
}
@@ -394,7 +423,7 @@ - (void) UnMaximise {
- (void) SetAlwaysOnTop:(int)onTop {
if (onTop) {
- [self.mainWindow setLevel:NSStatusWindowLevel];
+ [self.mainWindow setLevel:NSFloatingWindowLevel];
} else {
[self.mainWindow setLevel:NSNormalWindowLevel];
}
@@ -408,16 +437,17 @@ - (void) ExecJS:(NSString*)script {
[self.webview evaluateJavaScript:script completionHandler:nil];
}
-- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters
+- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters
initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSArray * URLs))completionHandler {
-
+
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
openPanel.allowsMultipleSelection = parameters.allowsMultipleSelection;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
if (@available(macOS 10.14, *)) {
openPanel.canChooseDirectories = parameters.allowsDirectories;
}
-
- [openPanel
+#endif
+ [openPanel
beginSheetModalForWindow:webView.window
completionHandler:^(NSInteger result) {
if (result == NSModalResponseOK)
@@ -448,7 +478,7 @@ - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigat
- (void)userContentController:(nonnull WKUserContentController *)userContentController didReceiveScriptMessage:(nonnull WKScriptMessage *)message {
NSString *m = message.body;
-
+
// Check for drag
if ( [m isEqualToString:@"drag"] ) {
if( [self IsFullScreen] ) {
@@ -459,9 +489,9 @@ - (void)userContentController:(nonnull WKUserContentController *)userContentCont
}
return;
}
-
+
const char *_m = [m UTF8String];
-
+
processMessage(_m);
}
@@ -470,7 +500,7 @@ - (void)userContentController:(nonnull WKUserContentController *)userContentCont
-(void) MessageDialog :(NSString*)dialogType :(NSString*)title :(NSString*)message :(NSString*)button1 :(NSString*)button2 :(NSString*)button3 :(NSString*)button4 :(NSString*)defaultButton :(NSString*)cancelButton :(void*)iconData :(int)iconDataLength {
WailsAlert *alert = [WailsAlert new];
-
+
int style = NSAlertStyleInformational;
if (dialogType != nil ) {
if( [dialogType isEqualToString:@"warning"] ) {
@@ -487,12 +517,12 @@ -(void) MessageDialog :(NSString*)dialogType :(NSString*)title :(NSString*)messa
if( message != nil ) {
[alert setInformativeText:message];
}
-
+
[alert addButton:button1 :defaultButton :cancelButton];
[alert addButton:button2 :defaultButton :cancelButton];
[alert addButton:button3 :defaultButton :cancelButton];
[alert addButton:button4 :defaultButton :cancelButton];
-
+
NSImage *icon = nil;
if (iconData != nil) {
NSData *imageData = [NSData dataWithBytes:iconData length:iconDataLength];
@@ -521,8 +551,8 @@ -(void) MessageDialog :(NSString*)dialogType :(NSString*)title :(NSString*)messa
}
-(void) OpenFileDialog :(NSString*)title :(NSString*)defaultFilename :(NSString*)defaultDirectory :(bool)allowDirectories :(bool)allowFiles :(bool)canCreateDirectories :(bool)treatPackagesAsDirectories :(bool)resolveAliases :(bool)showHiddenFiles :(bool)allowMultipleSelection :(NSString*)filters {
-
-
+
+
// Create the dialog
NSOpenPanel *dialog = [NSOpenPanel openPanel];
@@ -540,14 +570,18 @@ -(void) OpenFileDialog :(NSString*)title :(NSString*)defaultFilename :(NSString*
#ifdef USE_NEW_FILTERS
NSMutableArray *contentTypes = [[NSMutableArray new] autorelease];
for (NSString *filter in filterList) {
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
if (@available(macOS 11.0, *)) {
UTType *t = [UTType typeWithFilenameExtension:filter];
[contentTypes addObject:t];
}
+#endif
}
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
if (@available(macOS 11.0, *)) {
[dialog setAllowedContentTypes:contentTypes];
}
+#endif
#else
[dialog setAllowedFileTypes:filterList];
#endif
@@ -558,7 +592,7 @@ -(void) OpenFileDialog :(NSString*)title :(NSString*)defaultFilename :(NSString*
if( defaultFilename != nil ) {
[dialog setNameFieldStringValue:defaultFilename];
}
-
+
[dialog setAllowsMultipleSelection: allowMultipleSelection];
[dialog setShowsHiddenFiles: showHiddenFiles];
@@ -594,19 +628,19 @@ -(void) OpenFileDialog :(NSString*)title :(NSString*)defaultFilename :(NSString*
[nsjson release];
[arr release];
}];
-
+
}
-(void) SaveFileDialog :(NSString*)title :(NSString*)defaultFilename :(NSString*)defaultDirectory :(bool)canCreateDirectories :(bool)treatPackagesAsDirectories :(bool)showHiddenFiles :(NSString*)filters; {
-
-
+
+
// Create the dialog
NSSavePanel *dialog = [NSSavePanel savePanel];
// Do not hide extension
[dialog setExtensionHidden:false];
-
+
// Valid but appears to do nothing.... :/
if( title != nil ) {
[dialog setTitle:title];
@@ -620,17 +654,21 @@ -(void) SaveFileDialog :(NSString*)title :(NSString*)defaultFilename :(NSString*
#ifdef USE_NEW_FILTERS
NSMutableArray *contentTypes = [[NSMutableArray new] autorelease];
for (NSString *filter in filterList) {
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
if (@available(macOS 11.0, *)) {
UTType *t = [UTType typeWithFilenameExtension:filter];
[contentTypes addObject:t];
}
+#endif
}
if( contentTypes.count == 0) {
[dialog setAllowsOtherFileTypes:true];
} else {
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
if (@available(macOS 11.0, *)) {
[dialog setAllowedContentTypes:contentTypes];
}
+#endif
}
#else
@@ -643,7 +681,7 @@ -(void) SaveFileDialog :(NSString*)title :(NSString*)defaultFilename :(NSString*
if( defaultFilename != nil ) {
[dialog setNameFieldStringValue:defaultFilename];
}
-
+
// Default Directory
if( defaultDirectory != nil ) {
NSURL *url = [NSURL fileURLWithPath:defaultDirectory];
@@ -668,19 +706,19 @@ -(void) SaveFileDialog :(NSString*)title :(NSString*)defaultFilename :(NSString*
}
processSaveFileDialogResponse("");
}];
-
+
}
- (void) SetAbout :(NSString*)title :(NSString*)description :(void*)imagedata :(int)datalen {
self.aboutTitle = title;
self.aboutDescription = description;
-
+
NSData *imageData = [NSData dataWithBytes:imagedata length:datalen];
self.aboutImage = [[NSImage alloc] initWithData:imageData];
}
-(void) About {
-
+
WailsAlert *alert = [WailsAlert new];
[alert setAlertStyle:NSAlertStyleInformational];
if( self.aboutTitle != nil ) {
@@ -689,8 +727,8 @@ -(void) About {
if( self.aboutDescription != nil ) {
[alert setInformativeText:self.aboutDescription];
}
-
-
+
+
[alert.window setLevel:NSFloatingWindowLevel];
if ( self.aboutImage != nil) {
[alert setIcon:self.aboutImage];
diff --git a/v2/internal/frontend/desktop/darwin/WailsWebView.h b/v2/internal/frontend/desktop/darwin/WailsWebView.h
new file mode 100644
index 00000000000..b6f746cf217
--- /dev/null
+++ b/v2/internal/frontend/desktop/darwin/WailsWebView.h
@@ -0,0 +1,14 @@
+#ifndef WailsWebView_h
+#define WailsWebView_h
+
+#import
+#import
+
+// We will override WKWebView, so we can detect file drop in obj-c
+// and grab their file path, to then inject into JS
+@interface WailsWebView : WKWebView
+@property bool disableWebViewDragAndDrop;
+@property bool enableDragAndDrop;
+@end
+
+#endif /* WailsWebView_h */
diff --git a/v2/internal/frontend/desktop/darwin/WailsWebView.m b/v2/internal/frontend/desktop/darwin/WailsWebView.m
new file mode 100644
index 00000000000..de23ac79496
--- /dev/null
+++ b/v2/internal/frontend/desktop/darwin/WailsWebView.m
@@ -0,0 +1,122 @@
+#import "WailsWebView.h"
+#import "message.h"
+
+
+@implementation WailsWebView
+@synthesize disableWebViewDragAndDrop;
+@synthesize enableDragAndDrop;
+
+- (BOOL)prepareForDragOperation:(id)sender
+{
+ if ( !enableDragAndDrop ) {
+ return [super prepareForDragOperation: sender];
+ }
+
+ if ( disableWebViewDragAndDrop ) {
+ return YES;
+ }
+
+ return [super prepareForDragOperation: sender];
+}
+
+- (BOOL)performDragOperation:(id )sender
+{
+ if ( !enableDragAndDrop ) {
+ return [super performDragOperation: sender];
+ }
+
+ NSPasteboard *pboard = [sender draggingPasteboard];
+
+ // if no types, then we'll just let the WKWebView handle the drag-n-drop as normal
+ NSArray * types = [pboard types];
+ if( !types )
+ return [super performDragOperation: sender];
+
+ // getting all NSURL types
+ NSArray *url_class = @[[NSURL class]];
+ NSDictionary *options = @{};
+ NSArray *files = [pboard readObjectsForClasses:url_class options:options];
+
+ // collecting all file paths
+ NSMutableArray *files_strs = [[NSMutableArray alloc] init];
+ for (NSURL *url in files)
+ {
+ const char *fs_path = [url fileSystemRepresentation]; //Will be UTF-8 encoded
+ NSString *fs_path_str = [[NSString alloc] initWithCString:fs_path encoding:NSUTF8StringEncoding];
+ [files_strs addObject:fs_path_str];
+// NSLog( @"performDragOperation: file path: %s", fs_path );
+ }
+
+ NSString *joined=[files_strs componentsJoinedByString:@"\n"];
+
+ // Release the array of file paths
+ [files_strs release];
+
+ int dragXLocation = [sender draggingLocation].x - [self frame].origin.x;
+ int dragYLocation = [self frame].size.height - [sender draggingLocation].y; // Y coordinate is inverted, so we need to subtract from the height
+
+// NSLog( @"draggingUpdated: X coord: %d", dragXLocation );
+// NSLog( @"draggingUpdated: Y coord: %d", dragYLocation );
+
+ NSString *message = [NSString stringWithFormat:@"DD:%d:%d:%@", dragXLocation, dragYLocation, joined];
+
+ const char* res = message.UTF8String;
+
+ processMessage(res);
+
+ if ( disableWebViewDragAndDrop ) {
+ return YES;
+ }
+
+ return [super performDragOperation: sender];
+}
+
+- (NSDragOperation)draggingUpdated:(id )sender {
+ if ( !enableDragAndDrop ) {
+ return [super draggingUpdated: sender];
+ }
+
+ NSPasteboard *pboard = [sender draggingPasteboard];
+
+ // if no types, then we'll just let the WKWebView handle the drag-n-drop as normal
+ NSArray * types = [pboard types];
+ if( !types ) {
+ return [super draggingUpdated: sender];
+ }
+
+ if ( disableWebViewDragAndDrop ) {
+ // we should call supper as otherwise events will not pass
+ [super draggingUpdated: sender];
+
+ // pass NSDragOperationGeneric = 4 to show regular hover for drag and drop. As we want to ignore webkit behaviours that depends on webpage
+ return 4;
+ }
+
+ return [super draggingUpdated: sender];
+}
+
+- (NSDragOperation)draggingEntered:(id )sender {
+ if ( !enableDragAndDrop ) {
+ return [super draggingEntered: sender];
+ }
+
+ NSPasteboard *pboard = [sender draggingPasteboard];
+
+ // if no types, then we'll just let the WKWebView handle the drag-n-drop as normal
+ NSArray * types = [pboard types];
+ if( !types ) {
+ return [super draggingEntered: sender];
+ }
+
+ if ( disableWebViewDragAndDrop ) {
+ // we should call supper as otherwise events will not pass
+ [super draggingEntered: sender];
+
+ // pass NSDragOperationGeneric = 4 to show regular hover for drag and drop. As we want to ignore webkit behaviours that depends on webpage
+ return 4;
+ }
+
+ return [super draggingEntered: sender];
+}
+
+@end
diff --git a/v2/internal/frontend/desktop/darwin/browser.go b/v2/internal/frontend/desktop/darwin/browser.go
index 417501c8ea5..12b2bc8fc1b 100644
--- a/v2/internal/frontend/desktop/darwin/browser.go
+++ b/v2/internal/frontend/desktop/darwin/browser.go
@@ -10,5 +10,7 @@ import (
// BrowserOpenURL Use the default browser to open the url
func (f *Frontend) BrowserOpenURL(url string) {
// Specific method implementation
- _ = browser.OpenURL(url)
+ if err := browser.OpenURL(url); err != nil {
+ f.logger.Error("Unable to open default system browser")
+ }
}
diff --git a/v2/internal/frontend/desktop/darwin/callbacks.go b/v2/internal/frontend/desktop/darwin/callbacks.go
index 7d930a2f9e5..ab0d18e47ab 100644
--- a/v2/internal/frontend/desktop/darwin/callbacks.go
+++ b/v2/internal/frontend/desktop/darwin/callbacks.go
@@ -12,6 +12,7 @@ package darwin
#include
*/
import "C"
+
import (
"errors"
"strconv"
@@ -20,7 +21,6 @@ import (
)
func (f *Frontend) handleCallback(menuItemID uint) error {
-
menuItem := getMenuItemForID(menuItemID)
if menuItem == nil {
return errors.New("unknown menuItem ID: " + strconv.Itoa(int(menuItemID)))
diff --git a/v2/internal/frontend/desktop/darwin/clipboard.go b/v2/internal/frontend/desktop/darwin/clipboard.go
index eea6c79aedb..c40ba877175 100644
--- a/v2/internal/frontend/desktop/darwin/clipboard.go
+++ b/v2/internal/frontend/desktop/darwin/clipboard.go
@@ -16,7 +16,6 @@ func (f *Frontend) ClipboardGetText() (string, error) {
}
func (f *Frontend) ClipboardSetText(text string) error {
-
copyCmd := exec.Command("pbcopy")
in, err := copyCmd.StdinPipe()
if err != nil {
diff --git a/v2/internal/frontend/desktop/darwin/dialog.go b/v2/internal/frontend/desktop/darwin/dialog.go
index c6be559cbec..66bb2f13a6c 100644
--- a/v2/internal/frontend/desktop/darwin/dialog.go
+++ b/v2/internal/frontend/desktop/darwin/dialog.go
@@ -11,6 +11,7 @@ package darwin
#import "WailsContext.h"
*/
import "C"
+
import (
"encoding/json"
"fmt"
@@ -23,10 +24,12 @@ import (
)
// Obj-C dialog methods send the response to this channel
-var messageDialogResponse = make(chan int)
-var openFileDialogResponse = make(chan string)
-var saveFileDialogResponse = make(chan string)
-var dialogLock sync.Mutex
+var (
+ messageDialogResponse = make(chan int)
+ openFileDialogResponse = make(chan string)
+ saveFileDialogResponse = make(chan string)
+ dialogLock sync.Mutex
+)
// OpenDirectoryDialog prompts the user to select a directory
func (f *Frontend) OpenDirectoryDialog(options frontend.OpenDialogOptions) (string, error) {
@@ -74,7 +77,7 @@ func (f *Frontend) openDialog(options *frontend.OpenDialogOptions, multiple bool
filters := filterStrings.Join(";")
C.OpenFileDialog(f.mainWindow.context, title, defaultFilename, defaultDirectory, allowDirectories, allowFiles, canCreateDirectories, treatPackagesAsDirectories, resolveAliases, showHiddenFiles, allowMultipleFileSelection, c.String(filters))
- var result = <-openFileDialogResponse
+ result := <-openFileDialogResponse
var parsedResults []string
err := json.Unmarshal([]byte(result), &parsedResults)
@@ -130,7 +133,7 @@ func (f *Frontend) SaveFileDialog(options frontend.SaveDialogOptions) (string, e
filters := filterStrings.Join(";")
C.SaveFileDialog(f.mainWindow.context, title, defaultFilename, defaultDirectory, canCreateDirectories, treatPackagesAsDirectories, showHiddenFiles, c.String(filters))
- var result = <-saveFileDialogResponse
+ result := <-saveFileDialogResponse
return result, nil
}
@@ -165,7 +168,7 @@ func (f *Frontend) MessageDialog(options frontend.MessageDialogOptions) (string,
C.MessageDialog(f.mainWindow.context, dialogType, title, message, buttons[0], buttons[1], buttons[2], buttons[3], defaultButton, cancelButton, iconData, iconDataLength)
- var result = <-messageDialogResponse
+ result := <-messageDialogResponse
selectedC := buttons[result]
var selected string
diff --git a/v2/internal/frontend/desktop/darwin/frontend.go b/v2/internal/frontend/desktop/darwin/frontend.go
index b714a2c3b1d..ba00b02d99c 100644
--- a/v2/internal/frontend/desktop/darwin/frontend.go
+++ b/v2/internal/frontend/desktop/darwin/frontend.go
@@ -8,11 +8,13 @@ package darwin
#cgo LDFLAGS: -framework Foundation -framework Cocoa -framework WebKit
#import
#import "Application.h"
+#import "CustomProtocol.h"
#import "WailsContext.h"
#include
*/
import "C"
+
import (
"context"
"encoding/json"
@@ -21,6 +23,7 @@ import (
"log"
"net"
"net/url"
+ "os"
"unsafe"
"github.com/wailsapp/wails/v2/pkg/assetserver"
@@ -35,18 +38,26 @@ import (
const startURL = "wails://wails/"
-var messageBuffer = make(chan string, 100)
-var requestBuffer = make(chan webview.Request, 100)
-var callbackBuffer = make(chan uint, 10)
+var (
+ messageBuffer = make(chan string, 100)
+ requestBuffer = make(chan webview.Request, 100)
+ callbackBuffer = make(chan uint, 10)
+ openFilepathBuffer = make(chan string, 100)
+ openUrlBuffer = make(chan string, 100)
+ secondInstanceBuffer = make(chan options.SecondInstanceData, 1)
+)
type Frontend struct {
-
// Context
ctx context.Context
frontendOptions *options.App
logger *logger.Logger
debug bool
+ devtoolsEnabled bool
+
+ // Keep single instance lock file, so that it will not be GC and lock will exist while app is running
+ singleInstanceLockFile *os.File
// Assets
assets *assetserver.AssetServer
@@ -76,6 +87,9 @@ func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.
}
result.startURL, _ = url.Parse(startURL)
+ // this should be initialized as early as possible to handle first instance launch
+ C.StartCustomProtocolHandler()
+
if _starturl, _ := ctx.Value("starturl").(*url.URL); _starturl != nil {
result.startURL = _starturl
} else {
@@ -106,20 +120,46 @@ func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.
go result.startMessageProcessor()
go result.startCallbackProcessor()
+ go result.startFileOpenProcessor()
+ go result.startUrlOpenProcessor()
+ go result.startSecondInstanceProcessor()
return result
}
+func (f *Frontend) startFileOpenProcessor() {
+ for filePath := range openFilepathBuffer {
+ f.ProcessOpenFileEvent(filePath)
+ }
+}
+
+func (f *Frontend) startUrlOpenProcessor() {
+ for url := range openUrlBuffer {
+ f.ProcessOpenUrlEvent(url)
+ }
+}
+
+func (f *Frontend) startSecondInstanceProcessor() {
+ for secondInstanceData := range secondInstanceBuffer {
+ if f.frontendOptions.SingleInstanceLock != nil &&
+ f.frontendOptions.SingleInstanceLock.OnSecondInstanceLaunch != nil {
+ f.frontendOptions.SingleInstanceLock.OnSecondInstanceLaunch(secondInstanceData)
+ }
+ }
+}
+
func (f *Frontend) startMessageProcessor() {
for message := range messageBuffer {
f.processMessage(message)
}
}
+
func (f *Frontend) startRequestProcessor() {
for request := range requestBuffer {
f.assets.ServeWebViewRequest(request)
}
}
+
func (f *Frontend) startCallbackProcessor() {
for callback := range callbackBuffer {
err := f.handleCallback(callback)
@@ -138,25 +178,32 @@ func (f *Frontend) WindowReloadApp() {
}
func (f *Frontend) WindowSetSystemDefaultTheme() {
- return
}
func (f *Frontend) WindowSetLightTheme() {
- return
}
func (f *Frontend) WindowSetDarkTheme() {
- return
}
func (f *Frontend) Run(ctx context.Context) error {
f.ctx = ctx
- var _debug = ctx.Value("debug")
+
+ if f.frontendOptions.SingleInstanceLock != nil {
+ f.singleInstanceLockFile = SetupSingleInstance(f.frontendOptions.SingleInstanceLock.UniqueId)
+ }
+
+ _debug := ctx.Value("debug")
+ _devtoolsEnabled := ctx.Value("devtoolsEnabled")
+
if _debug != nil {
f.debug = _debug.(bool)
}
+ if _devtoolsEnabled != nil {
+ f.devtoolsEnabled = _devtoolsEnabled.(bool)
+ }
- mainWindow := NewWindow(f.frontendOptions, f.debug)
+ mainWindow := NewWindow(f.frontendOptions, f.debug, f.devtoolsEnabled)
f.mainWindow = mainWindow
f.mainWindow.Center()
@@ -172,6 +219,7 @@ func (f *Frontend) Run(ctx context.Context) error {
func (f *Frontend) WindowCenter() {
f.mainWindow.Center()
}
+
func (f *Frontend) WindowSetAlwaysOnTop(onTop bool) {
f.mainWindow.SetAlwaysOnTop(onTop)
}
@@ -179,6 +227,7 @@ func (f *Frontend) WindowSetAlwaysOnTop(onTop bool) {
func (f *Frontend) WindowSetPosition(x, y int) {
f.mainWindow.SetPosition(x, y)
}
+
func (f *Frontend) WindowGetPosition() (int, int) {
return f.mainWindow.GetPosition()
}
@@ -210,6 +259,7 @@ func (f *Frontend) WindowShow() {
func (f *Frontend) WindowHide() {
f.mainWindow.Hide()
}
+
func (f *Frontend) Show() {
f.mainWindow.ShowApplication()
}
@@ -217,18 +267,23 @@ func (f *Frontend) Show() {
func (f *Frontend) Hide() {
f.mainWindow.HideApplication()
}
+
func (f *Frontend) WindowMaximise() {
f.mainWindow.Maximise()
}
+
func (f *Frontend) WindowToggleMaximise() {
f.mainWindow.ToggleMaximise()
}
+
func (f *Frontend) WindowUnmaximise() {
f.mainWindow.UnMaximise()
}
+
func (f *Frontend) WindowMinimise() {
f.mainWindow.Minimise()
}
+
func (f *Frontend) WindowUnminimise() {
f.mainWindow.UnMinimise()
}
@@ -236,6 +291,7 @@ func (f *Frontend) WindowUnminimise() {
func (f *Frontend) WindowSetMinSize(width int, height int) {
f.mainWindow.SetMinSize(width, height)
}
+
func (f *Frontend) WindowSetMaxSize(width int, height int) {
f.mainWindow.SetMaxSize(width, height)
}
@@ -279,6 +335,10 @@ func (f *Frontend) Quit() {
f.mainWindow.Quit()
}
+func (f *Frontend) WindowPrint() {
+ f.mainWindow.Print()
+}
+
type EventNotify struct {
Name string `json:"name"`
Data []interface{} `json:"data"`
@@ -298,7 +358,6 @@ func (f *Frontend) Notify(name string, data ...interface{}) {
}
func (f *Frontend) processMessage(message string) {
-
if message == "DomReady" {
if f.frontendOptions.OnDomReady != nil {
f.frontendOptions.OnDomReady(f.ctx)
@@ -309,6 +368,16 @@ func (f *Frontend) processMessage(message string) {
if message == "runtime:ready" {
cmd := fmt.Sprintf("window.wails.setCSSDragProperties('%s', '%s');", f.frontendOptions.CSSDragProperty, f.frontendOptions.CSSDragValue)
f.ExecJS(cmd)
+
+ if f.frontendOptions.DragAndDrop != nil && f.frontendOptions.DragAndDrop.EnableFileDrop {
+ f.ExecJS("window.wails.flags.enableWailsDragAndDrop = true;")
+ }
+
+ return
+ }
+
+ if message == "wails:openInspector" {
+ showInspector(f.mainWindow.context)
return
}
@@ -336,7 +405,18 @@ func (f *Frontend) processMessage(message string) {
f.logger.Info("Unknown message returned from dispatcher: %+v", result)
}
}()
+}
+
+func (f *Frontend) ProcessOpenFileEvent(filePath string) {
+ if f.frontendOptions.Mac != nil && f.frontendOptions.Mac.OnFileOpen != nil {
+ f.frontendOptions.Mac.OnFileOpen(filePath)
+ }
+}
+func (f *Frontend) ProcessOpenUrlEvent(url string) {
+ if f.frontendOptions.Mac != nil && f.frontendOptions.Mac.OnUrlOpen != nil {
+ f.frontendOptions.Mac.OnUrlOpen(url)
+ }
}
func (f *Frontend) Callback(message string) {
@@ -379,6 +459,18 @@ func processCallback(callbackID uint) {
}
//export processURLRequest
-func processURLRequest(ctx unsafe.Pointer, wkURLSchemeTask unsafe.Pointer) {
+func processURLRequest(_ unsafe.Pointer, wkURLSchemeTask unsafe.Pointer) {
requestBuffer <- webview.NewRequest(wkURLSchemeTask)
}
+
+//export HandleOpenFile
+func HandleOpenFile(filePath *C.char) {
+ goFilepath := C.GoString(filePath)
+ openFilepathBuffer <- goFilepath
+}
+
+//export HandleCustomProtocol
+func HandleCustomProtocol(url *C.char) {
+ goUrl := C.GoString(url)
+ openUrlBuffer <- goUrl
+}
diff --git a/v2/internal/frontend/desktop/darwin/inspector.go b/v2/internal/frontend/desktop/darwin/inspector.go
index 3021c5c1614..dc3f08969a0 100644
--- a/v2/internal/frontend/desktop/darwin/inspector.go
+++ b/v2/internal/frontend/desktop/darwin/inspector.go
@@ -1,4 +1,4 @@
-//go:build darwin && !(dev || debug)
+//go:build darwin && !(dev || debug || devtools)
package darwin
@@ -6,6 +6,5 @@ import (
"unsafe"
)
-func showInspector(context unsafe.Pointer) {
-
+func showInspector(_ unsafe.Pointer) {
}
diff --git a/v2/internal/frontend/desktop/darwin/inspector_dev.go b/v2/internal/frontend/desktop/darwin/inspector_dev.go
index e948435cbe8..e79b9c3e7ea 100644
--- a/v2/internal/frontend/desktop/darwin/inspector_dev.go
+++ b/v2/internal/frontend/desktop/darwin/inspector_dev.go
@@ -1,4 +1,4 @@
-//go:build darwin && (dev || debug)
+//go:build darwin && (dev || debug || devtools)
package darwin
@@ -11,6 +11,8 @@ package darwin
#import
#import "WailsContext.h"
+extern void processMessage(const char *message);
+
@interface _WKInspector : NSObject
- (void)show;
- (void)detach;
@@ -21,28 +23,45 @@ package darwin
@end
void showInspector(void *inctx) {
- if (@available(macOS 12.0, *)) {
- WailsContext *ctx = (__bridge WailsContext*) inctx;
-
- @try {
- [ctx.webview._inspector show];
- } @catch (NSException *exception) {
- NSLog(@"Opening the inspector failed: %@", exception.reason);
- return;
- }
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
+ ON_MAIN_THREAD(
+ if (@available(macOS 12.0, *)) {
+ WailsContext *ctx = (__bridge WailsContext*) inctx;
- dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC);
- dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
- // Detach must be deferred a little bit and is ignored directly after a show.
@try {
- [ctx.webview._inspector detach];
+ [ctx.webview._inspector show];
} @catch (NSException *exception) {
- NSLog(@"Detaching the inspector failed: %@", exception.reason);
+ NSLog(@"Opening the inspector failed: %@", exception.reason);
+ return;
}
- });
- } else {
- NSLog(@"Opening the inspector needs at least MacOS 12");
- }
+
+ dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC);
+ dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
+ // Detach must be deferred a little bit and is ignored directly after a show.
+ @try {
+ [ctx.webview._inspector detach];
+ } @catch (NSException *exception) {
+ NSLog(@"Detaching the inspector failed: %@", exception.reason);
+ }
+ });
+ } else {
+ NSLog(@"Opening the inspector needs at least MacOS 12");
+ }
+ );
+#endif
+}
+
+void setupF12hotkey() {
+ [NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskKeyDown handler:^NSEvent * _Nullable(NSEvent * _Nonnull event) {
+ if (event.keyCode == 111 &&
+ event.modifierFlags & NSEventModifierFlagFunction &&
+ event.modifierFlags & NSEventModifierFlagCommand &&
+ event.modifierFlags & NSEventModifierFlagShift) {
+ processMessage("wails:openInspector");
+ return nil;
+ }
+ return event;
+ }];
}
*/
import "C"
@@ -50,6 +69,10 @@ import (
"unsafe"
)
+func init() {
+ C.setupF12hotkey()
+}
+
func showInspector(context unsafe.Pointer) {
C.showInspector(context)
}
diff --git a/v2/internal/frontend/desktop/darwin/main.m b/v2/internal/frontend/desktop/darwin/main.m
index d2f39bccbfa..75a84dc764f 100644
--- a/v2/internal/frontend/desktop/darwin/main.m
+++ b/v2/internal/frontend/desktop/darwin/main.m
@@ -203,6 +203,7 @@ 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;
@@ -215,10 +216,11 @@ int main(int argc, const char * argv[]) {
int hideWindowOnClose = 0;
const char* appearance = "NSAppearanceNameDarkAqua";
int windowIsTranslucent = 1;
- int debug = 1;
+ int devtoolsEnabled = 1;
+ int defaultContextMenuEnabled = 1;
int windowStartState = 0;
int startsHidden = 0;
- WailsContext *result = Create("OI OI!",400,400, frameless, resizable, fullscreen, fullSizeContent, hideTitleBar, titlebarAppearsTransparent, hideTitle, useToolbar, hideToolbarSeparator, webviewIsTransparent, alwaysOnTop, hideWindowOnClose, appearance, windowIsTranslucent, debug, windowStartState,
+ 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,
startsHidden, 400, 400, 600, 600, false);
SetBackgroundColour(result, 255, 0, 0, 255);
void *m = NewMenu("");
diff --git a/v2/internal/frontend/desktop/darwin/menu.go b/v2/internal/frontend/desktop/darwin/menu.go
index 08090f89a2c..24dbe32017d 100644
--- a/v2/internal/frontend/desktop/darwin/menu.go
+++ b/v2/internal/frontend/desktop/darwin/menu.go
@@ -13,6 +13,7 @@ package darwin
#include
*/
import "C"
+
import (
"unsafe"
@@ -122,7 +123,6 @@ func processMenuItem(parent *NSMenu, menuItem *menu.MenuItem) *MenuItem {
}
return parent.AddMenuItem(menuItem)
-
}
func (f *Frontend) MenuSetApplicationMenu(menu *menu.Menu) {
diff --git a/v2/internal/frontend/desktop/darwin/menuitem.go b/v2/internal/frontend/desktop/darwin/menuitem.go
index 00ad57aa37f..64aab84a9a7 100644
--- a/v2/internal/frontend/desktop/darwin/menuitem.go
+++ b/v2/internal/frontend/desktop/darwin/menuitem.go
@@ -13,16 +13,19 @@ package darwin
#include
*/
import "C"
+
import (
"log"
"math"
"sync"
)
-var menuItemToID = make(map[*MenuItem]uint)
-var idToMenuItem = make(map[uint]*MenuItem)
-var menuItemLock sync.Mutex
-var menuItemIDCounter uint = 0
+var (
+ menuItemToID = make(map[*MenuItem]uint)
+ idToMenuItem = make(map[uint]*MenuItem)
+ menuItemLock sync.Mutex
+ menuItemIDCounter uint = 0
+)
func createMenuItemID(item *MenuItem) uint {
menuItemLock.Lock()
diff --git a/v2/internal/frontend/desktop/darwin/screen.go b/v2/internal/frontend/desktop/darwin/screen.go
index 7b552065a2d..bd64a31f9eb 100644
--- a/v2/internal/frontend/desktop/darwin/screen.go
+++ b/v2/internal/frontend/desktop/darwin/screen.go
@@ -18,6 +18,8 @@ typedef struct Screen {
int isPrimary;
int height;
int width;
+ int pHeight;
+ int pWidth;
} Screen;
@@ -48,14 +50,43 @@ Screen GetNthScreen(int nth, void *inctx){
returnScreen.isPrimary = nth==0;
returnScreen.height = (int) nthScreen.frame.size.height;
returnScreen.width = (int) nthScreen.frame.size.width;
+
+ returnScreen.pWidth = 0;
+ returnScreen.pHeight = 0;
+
+ // https://stackoverflow.com/questions/13859109/how-to-programmatically-determine-native-pixel-resolution-of-retina-macbook-pro
+ CGDirectDisplayID sid = ((NSNumber *)[nthScreen.deviceDescription
+ objectForKey:@"NSScreenNumber"]).unsignedIntegerValue;
+
+ CFArrayRef ms = CGDisplayCopyAllDisplayModes(sid, NULL);
+ CFIndex n = CFArrayGetCount(ms);
+ for (int i = 0; i < n; i++) {
+ CGDisplayModeRef m = (CGDisplayModeRef) CFArrayGetValueAtIndex(ms, i);
+ if (CGDisplayModeGetIOFlags(m) & kDisplayModeNativeFlag) {
+ // This corresponds with "System Settings" -> General -> About -> Displays
+ returnScreen.pWidth = CGDisplayModeGetPixelWidth(m);
+ returnScreen.pHeight = CGDisplayModeGetPixelHeight(m);
+ break;
+ }
+ }
+ CFRelease(ms);
+
+ if (returnScreen.pWidth == 0 || returnScreen.pHeight == 0) {
+ // If there was no native resolution take a best fit approach and use the backing pixel size.
+ NSRect pSize = [nthScreen convertRectToBacking:nthScreen.frame];
+ returnScreen.pHeight = (int) pSize.size.height;
+ returnScreen.pWidth = (int) pSize.size.width;
+ }
return returnScreen;
}
*/
import "C"
+
import (
- "github.com/wailsapp/wails/v2/internal/frontend"
"unsafe"
+
+ "github.com/wailsapp/wails/v2/internal/frontend"
)
func GetAllScreens(wailsContext unsafe.Pointer) ([]frontend.Screen, error) {
@@ -65,11 +96,21 @@ func GetAllScreens(wailsContext unsafe.Pointer) ([]frontend.Screen, error) {
for screeNum := 0; screeNum < numScreens; screeNum++ {
screenNumC := C.int(screeNum)
cScreen := C.GetNthScreen(screenNumC, wailsContext)
+
screen := frontend.Screen{
Height: int(cScreen.height),
Width: int(cScreen.width),
IsCurrent: cScreen.isCurrent == C.int(1),
IsPrimary: cScreen.isPrimary == C.int(1),
+
+ Size: frontend.ScreenSize{
+ Height: int(cScreen.height),
+ Width: int(cScreen.width),
+ },
+ PhysicalSize: frontend.ScreenSize{
+ Height: int(cScreen.pHeight),
+ Width: int(cScreen.pWidth),
+ },
}
screens = append(screens, screen)
}
diff --git a/v2/internal/frontend/desktop/darwin/single_instance.go b/v2/internal/frontend/desktop/darwin/single_instance.go
new file mode 100644
index 00000000000..02a5c78ee5b
--- /dev/null
+++ b/v2/internal/frontend/desktop/darwin/single_instance.go
@@ -0,0 +1,95 @@
+//go:build darwin
+// +build darwin
+
+package darwin
+
+/*
+#cgo CFLAGS: -x objective-c
+#cgo LDFLAGS: -framework Foundation -framework Cocoa
+#import "AppDelegate.h"
+
+*/
+import "C"
+
+import (
+ "encoding/json"
+ "fmt"
+ "os"
+ "strings"
+ "syscall"
+ "unsafe"
+
+ "github.com/wailsapp/wails/v2/pkg/options"
+)
+
+func SetupSingleInstance(uniqueID string) *os.File {
+ lockFilePath := getTempDir()
+ lockFileName := uniqueID + ".lock"
+ file, err := createLockFile(lockFilePath + "/" + lockFileName)
+ // if lockFile exist – send notification to second instance
+ if err != nil {
+ c := NewCalloc()
+ defer c.Free()
+ singleInstanceUniqueId := c.String(uniqueID)
+
+ data, err := options.NewSecondInstanceData()
+ if err != nil {
+ return nil
+ }
+
+ serialized, err := json.Marshal(data)
+ if err != nil {
+ return nil
+ }
+
+ C.SendDataToFirstInstance(singleInstanceUniqueId, c.String(string(serialized)))
+
+ os.Exit(0)
+ }
+
+ return file
+}
+
+//export HandleSecondInstanceData
+func HandleSecondInstanceData(secondInstanceMessage *C.char) {
+ message := C.GoString(secondInstanceMessage)
+
+ var secondInstanceData options.SecondInstanceData
+
+ err := json.Unmarshal([]byte(message), &secondInstanceData)
+ if err == nil {
+ secondInstanceBuffer <- secondInstanceData
+ }
+}
+
+// CreateLockFile tries to create a file with given name and acquire an
+// exclusive lock on it. If the file already exists AND is still locked, it will
+// fail.
+func createLockFile(filename string) (*os.File, error) {
+ file, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE, 0o600)
+ if err != nil {
+ fmt.Printf("Failed to open lockfile %s: %s", filename, err)
+ return nil, err
+ }
+
+ err = syscall.Flock(int(file.Fd()), syscall.LOCK_EX|syscall.LOCK_NB)
+ if err != nil {
+ // Flock failed for some other reason than other instance already lock it. Print it in logs for possible debugging.
+ if !strings.Contains(err.Error(), "resource temporarily unavailable") {
+ fmt.Printf("Failed to lock lockfile %s: %s", filename, err)
+ }
+ file.Close()
+ return nil, err
+ }
+
+ return file, nil
+}
+
+// If app is sandboxed, golang os.TempDir() will return path that will not be accessible. So use native macOS temp dir function.
+func getTempDir() string {
+ cstring := C.GetMacOsNativeTempDir()
+ path := C.GoString(cstring)
+ C.free(unsafe.Pointer(cstring))
+
+ return path
+}
diff --git a/v2/internal/frontend/desktop/darwin/window.go b/v2/internal/frontend/desktop/darwin/window.go
index 8b4c77799f6..121533a3393 100644
--- a/v2/internal/frontend/desktop/darwin/window.go
+++ b/v2/internal/frontend/desktop/darwin/window.go
@@ -13,6 +13,7 @@ package darwin
#include
*/
import "C"
+
import (
"log"
"runtime"
@@ -40,8 +41,12 @@ func bool2Cint(value bool) C.int {
return C.int(0)
}
-func NewWindow(frontendOptions *options.App, debugMode bool) *Window {
+func bool2CboolPtr(value bool) *C.bool {
+ v := C.bool(value)
+ return &v
+}
+func NewWindow(frontendOptions *options.App, debug bool, devtools bool) *Window {
c := NewCalloc()
defer c.Free()
@@ -51,11 +56,14 @@ func NewWindow(frontendOptions *options.App, debugMode bool) *Window {
alwaysOnTop := bool2Cint(frontendOptions.AlwaysOnTop)
hideWindowOnClose := bool2Cint(frontendOptions.HideWindowOnClose)
startsHidden := bool2Cint(frontendOptions.StartHidden)
- debug := bool2Cint(debugMode)
+ devtoolsEnabled := bool2Cint(devtools)
+ defaultContextMenuEnabled := bool2Cint(debug || frontendOptions.EnableDefaultContextMenu)
+ singleInstanceEnabled := bool2Cint(frontendOptions.SingleInstanceLock != nil)
- var fullSizeContent, hideTitleBar, hideTitle, useToolbar, webviewIsTransparent C.int
+ var fullSizeContent, hideTitleBar, zoomable, hideTitle, useToolbar, webviewIsTransparent C.int
var titlebarAppearsTransparent, hideToolbarSeparator, windowIsTranslucent C.int
var appearance, title *C.char
+ var preferences C.struct_Preferences
width := C.int(frontendOptions.Width)
height := C.int(frontendOptions.Height)
@@ -67,8 +75,17 @@ func NewWindow(frontendOptions *options.App, debugMode bool) *Window {
title = c.String(frontendOptions.Title)
+ singleInstanceUniqueIdStr := ""
+ if frontendOptions.SingleInstanceLock != nil {
+ singleInstanceUniqueIdStr = frontendOptions.SingleInstanceLock.UniqueId
+ }
+ singleInstanceUniqueId := c.String(singleInstanceUniqueIdStr)
+
enableFraudulentWebsiteWarnings := C.bool(frontendOptions.EnableFraudulentWebsiteDetection)
+ enableDragAndDrop := C.bool(frontendOptions.DragAndDrop != nil && frontendOptions.DragAndDrop.EnableFileDrop)
+ disableWebViewDragAndDrop := C.bool(frontendOptions.DragAndDrop != nil && frontendOptions.DragAndDrop.DisableWebViewDrop)
+
if frontendOptions.Mac != nil {
mac := frontendOptions.Mac
if mac.TitleBar != nil {
@@ -79,15 +96,34 @@ func NewWindow(frontendOptions *options.App, debugMode bool) *Window {
titlebarAppearsTransparent = bool2Cint(mac.TitleBar.TitlebarAppearsTransparent)
hideToolbarSeparator = bool2Cint(mac.TitleBar.HideToolbarSeparator)
}
+
+ if mac.Preferences != nil {
+ if mac.Preferences.TabFocusesLinks.IsSet() {
+ preferences.tabFocusesLinks = bool2CboolPtr(mac.Preferences.TabFocusesLinks.Get())
+ }
+
+ if mac.Preferences.TextInteractionEnabled.IsSet() {
+ preferences.textInteractionEnabled = bool2CboolPtr(mac.Preferences.TextInteractionEnabled.Get())
+ }
+
+ if mac.Preferences.FullscreenEnabled.IsSet() {
+ preferences.fullscreenEnabled = bool2CboolPtr(mac.Preferences.FullscreenEnabled.Get())
+ }
+ }
+
+ 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, fullscreen, fullSizeContent,
+ var context *C.WailsContext = C.Create(title, width, height, frameless, resizable, zoomable, fullscreen, fullSizeContent,
hideTitleBar, titlebarAppearsTransparent, hideTitle, useToolbar, hideToolbarSeparator, webviewIsTransparent,
- alwaysOnTop, hideWindowOnClose, appearance, windowIsTranslucent, debug, windowStartState, startsHidden,
- minWidth, minHeight, maxWidth, maxHeight, enableFraudulentWebsiteWarnings)
+ alwaysOnTop, hideWindowOnClose, appearance, windowIsTranslucent, devtoolsEnabled, defaultContextMenuEnabled,
+ windowStartState, startsHidden, minWidth, minHeight, maxWidth, maxHeight, enableFraudulentWebsiteWarnings,
+ preferences, singleInstanceEnabled, singleInstanceUniqueId, enableDragAndDrop, disableWebViewDragAndDrop,
+ )
// Create menu
result := &Window{
@@ -114,7 +150,7 @@ func NewWindow(frontendOptions *options.App, debugMode bool) *Window {
result.SetApplicationMenu(frontendOptions.Menu)
}
- if debugMode && frontendOptions.Debug.OpenInspectorOnStartup {
+ if debug && frontendOptions.Debug.OpenInspectorOnStartup {
showInspector(result.context)
}
return result
@@ -165,6 +201,7 @@ func (w *Window) SetTitle(title string) {
func (w *Window) Maximise() {
C.Maximise(w.context)
}
+
func (w *Window) ToggleMaximise() {
C.ToggleMaximise(w.context)
}
@@ -220,6 +257,7 @@ func (w *Window) Show() {
func (w *Window) Hide() {
C.Hide(w.context)
}
+
func (w *Window) ShowApplication() {
C.ShowApplication(w.context)
}
@@ -262,3 +300,7 @@ func (w *Window) SetApplicationMenu(inMenu *menu.Menu) {
func (w *Window) UpdateApplicationMenu() {
C.UpdateApplicationMenu(w.context)
}
+
+func (w Window) Print() {
+ C.WindowPrint(w.context)
+}
diff --git a/v2/internal/frontend/desktop/linux/browser.go b/v2/internal/frontend/desktop/linux/browser.go
index 47bf0ba5db7..30ca9620c47 100644
--- a/v2/internal/frontend/desktop/linux/browser.go
+++ b/v2/internal/frontend/desktop/linux/browser.go
@@ -8,5 +8,7 @@ import "github.com/pkg/browser"
// BrowserOpenURL Use the default browser to open the url
func (f *Frontend) BrowserOpenURL(url string) {
// Specific method implementation
- _ = browser.OpenURL(url)
+ if err := browser.OpenURL(url); err != nil {
+ f.logger.Error("Unable to open default system browser")
+ }
}
diff --git a/v2/internal/frontend/desktop/linux/clipboard.go b/v2/internal/frontend/desktop/linux/clipboard.go
index 88b8c713f3b..a2a46dacc34 100644
--- a/v2/internal/frontend/desktop/linux/clipboard.go
+++ b/v2/internal/frontend/desktop/linux/clipboard.go
@@ -4,7 +4,9 @@
package linux
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
+#cgo linux pkg-config: gtk+-3.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
diff --git a/v2/internal/frontend/desktop/linux/frontend.go b/v2/internal/frontend/desktop/linux/frontend.go
index 58b8d746b77..3bc81649f59 100644
--- a/v2/internal/frontend/desktop/linux/frontend.go
+++ b/v2/internal/frontend/desktop/linux/frontend.go
@@ -4,7 +4,9 @@
package linux
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
+#cgo linux pkg-config: gtk+-3.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
@@ -76,6 +78,7 @@ import "C"
import (
"context"
"encoding/json"
+ "errors"
"fmt"
"log"
"net"
@@ -83,6 +86,7 @@ import (
"os"
"runtime"
"strings"
+ "sync"
"text/template"
"unsafe"
@@ -96,8 +100,12 @@ import (
"github.com/wailsapp/wails/v2/pkg/options"
)
+var initOnce = sync.Once{}
+
const startURL = "wails://wails/"
+var secondInstanceBuffer = make(chan options.SecondInstanceData, 1)
+
type Frontend struct {
// Context
@@ -106,6 +114,7 @@ type Frontend struct {
frontendOptions *options.App
logger *logger.Logger
debug bool
+ devtoolsEnabled bool
// Assets
assets *assetserver.AssetServer
@@ -125,18 +134,19 @@ func (f *Frontend) WindowClose() {
f.mainWindow.Destroy()
}
-func init() {
- runtime.LockOSThread()
-
- // Set GDK_BACKEND=x11 if currently unset and XDG_SESSION_TYPE is unset, unspecified or x11 to prevent warnings
- if os.Getenv("GDK_BACKEND") == "" && (os.Getenv("XDG_SESSION_TYPE") == "" || os.Getenv("XDG_SESSION_TYPE") == "unspecified" || os.Getenv("XDG_SESSION_TYPE") == "x11") {
- _ = os.Setenv("GDK_BACKEND", "x11")
- }
+func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.Logger, appBindings *binding.Bindings, dispatcher frontend.Dispatcher) *Frontend {
+ initOnce.Do(func() {
+ runtime.LockOSThread()
- C.gtk_init(nil, nil)
-}
+ // Set GDK_BACKEND=x11 if currently unset and XDG_SESSION_TYPE is unset, unspecified or x11 to prevent warnings
+ if os.Getenv("GDK_BACKEND") == "" && (os.Getenv("XDG_SESSION_TYPE") == "" || os.Getenv("XDG_SESSION_TYPE") == "unspecified" || os.Getenv("XDG_SESSION_TYPE") == "x11") {
+ _ = os.Setenv("GDK_BACKEND", "x11")
+ }
-func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.Logger, appBindings *binding.Bindings, dispatcher frontend.Dispatcher) *Frontend {
+ if ok := C.gtk_init_check(nil, nil); ok != 1 {
+ panic(errors.New("failed to init GTK"))
+ }
+ })
result := &Frontend{
frontendOptions: appoptions,
@@ -176,13 +186,27 @@ func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.
go result.startMessageProcessor()
var _debug = ctx.Value("debug")
+ var _devtoolsEnabled = ctx.Value("devtoolsEnabled")
+
if _debug != nil {
result.debug = _debug.(bool)
}
- result.mainWindow = NewWindow(appoptions, result.debug)
+ if _devtoolsEnabled != nil {
+ result.devtoolsEnabled = _devtoolsEnabled.(bool)
+ }
+
+ result.mainWindow = NewWindow(appoptions, result.debug, result.devtoolsEnabled)
C.install_signal_handlers()
+ if appoptions.Linux != nil && appoptions.Linux.ProgramName != "" {
+ prgname := C.CString(appoptions.Linux.ProgramName)
+ C.g_set_prgname(prgname)
+ C.free(unsafe.Pointer(prgname))
+ }
+
+ go result.startSecondInstanceProcessor()
+
return result
}
@@ -217,6 +241,10 @@ func (f *Frontend) Run(ctx context.Context) error {
}
}()
+ if f.frontendOptions.SingleInstanceLock != nil {
+ SetupSingleInstance(f.frontendOptions.SingleInstanceLock.UniqueId)
+ }
+
f.mainWindow.Run(f.startURL.String())
return nil
@@ -344,6 +372,10 @@ func (f *Frontend) Quit() {
f.mainWindow.Quit()
}
+func (f *Frontend) WindowPrint() {
+ f.ExecJS("window.print();")
+}
+
type EventNotify struct {
Name string `json:"name"`
Data []interface{} `json:"data"`
@@ -388,6 +420,11 @@ func (f *Frontend) processMessage(message string) {
return
}
+ if message == "wails:showInspector" {
+ f.mainWindow.ShowInspector()
+ return
+ }
+
if strings.HasPrefix(message, "resize:") {
if !f.mainWindow.IsFullScreen() {
sl := strings.Split(message, ":")
@@ -407,12 +444,24 @@ func (f *Frontend) processMessage(message string) {
if message == "runtime:ready" {
cmd := fmt.Sprintf(
"window.wails.setCSSDragProperties('%s', '%s');\n"+
- "window.wails.flags.deferDragToMouseMove = true;", f.frontendOptions.CSSDragProperty, f.frontendOptions.CSSDragValue)
+ "window.wails.setCSSDropProperties('%s', '%s');\n"+
+ "window.wails.flags.deferDragToMouseMove = true;",
+ f.frontendOptions.CSSDragProperty,
+ f.frontendOptions.CSSDragValue,
+ f.frontendOptions.DragAndDrop.CSSDropProperty,
+ f.frontendOptions.DragAndDrop.CSSDropValue,
+ )
+
f.ExecJS(cmd)
if f.frontendOptions.Frameless && f.frontendOptions.DisableResize == false {
f.ExecJS("window.wails.flags.enableResize = true;")
}
+
+ if f.frontendOptions.DragAndDrop.EnableFileDrop {
+ f.ExecJS("window.wails.flags.enableWailsDragAndDrop = true;")
+ }
+
return
}
@@ -478,3 +527,12 @@ func (f *Frontend) startRequestProcessor() {
func processURLRequest(request unsafe.Pointer) {
requestBuffer <- webview.NewRequest(request)
}
+
+func (f *Frontend) startSecondInstanceProcessor() {
+ for secondInstanceData := range secondInstanceBuffer {
+ if f.frontendOptions.SingleInstanceLock != nil &&
+ f.frontendOptions.SingleInstanceLock.OnSecondInstanceLaunch != nil {
+ f.frontendOptions.SingleInstanceLock.OnSecondInstanceLaunch(secondInstanceData)
+ }
+ }
+}
diff --git a/v2/internal/frontend/desktop/linux/gtk.go b/v2/internal/frontend/desktop/linux/gtk.go
index f4bc531b3de..67a38c7a045 100644
--- a/v2/internal/frontend/desktop/linux/gtk.go
+++ b/v2/internal/frontend/desktop/linux/gtk.go
@@ -4,7 +4,9 @@
package linux
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
+#cgo linux pkg-config: gtk+-3.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
diff --git a/v2/internal/frontend/desktop/linux/keys.go b/v2/internal/frontend/desktop/linux/keys.go
index 36486ea7b4e..e5a127dbdfc 100644
--- a/v2/internal/frontend/desktop/linux/keys.go
+++ b/v2/internal/frontend/desktop/linux/keys.go
@@ -4,7 +4,10 @@
package linux
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
+#cgo linux pkg-config: gtk+-3.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
+
#include "gtk/gtk.h"
@@ -81,7 +84,8 @@ func parseKey(key string) C.guint {
return result
}
// Check for unknown namedkeys
- if len(key) > 1 {
+ // Check if we only have a single character
+ if len(key) != 1 {
return C.guint(0)
}
keyval := rune(key[0])
diff --git a/v2/internal/frontend/desktop/linux/menu.go b/v2/internal/frontend/desktop/linux/menu.go
index bc3d2740b18..557a24b376d 100644
--- a/v2/internal/frontend/desktop/linux/menu.go
+++ b/v2/internal/frontend/desktop/linux/menu.go
@@ -4,7 +4,9 @@
package linux
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
+#cgo linux pkg-config: gtk+-3.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
diff --git a/v2/internal/frontend/desktop/linux/screen.go b/v2/internal/frontend/desktop/linux/screen.go
index bd186363b21..0a05074256c 100644
--- a/v2/internal/frontend/desktop/linux/screen.go
+++ b/v2/internal/frontend/desktop/linux/screen.go
@@ -4,7 +4,10 @@
package linux
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
+#cgo linux pkg-config: gtk+-3.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
+
#cgo CFLAGS: -w
#include
#include "webkit2/webkit2.h"
@@ -16,6 +19,7 @@ typedef struct Screen {
int isPrimary;
int height;
int width;
+ int scale;
} Screen;
int GetNMonitors(GtkWindow *window){
@@ -36,14 +40,16 @@ Screen GetNThMonitor(int monitor_num, GtkWindow *window){
screen.isPrimary = gdk_monitor_is_primary(monitor);
screen.height = geometry.height;
screen.width = geometry.width;
+ screen.scale = gdk_monitor_get_scale_factor(monitor);
return screen;
}
*/
import "C"
import (
+ "sync"
+
"github.com/pkg/errors"
"github.com/wailsapp/wails/v2/internal/frontend"
- "sync"
)
type Screen = frontend.Screen
@@ -59,11 +65,21 @@ func GetAllScreens(window *C.GtkWindow) ([]Screen, error) {
numMonitors := C.GetNMonitors(window)
for i := 0; i < int(numMonitors); i++ {
cMonitor := C.GetNThMonitor(C.int(i), window)
+
screen := Screen{
IsCurrent: cMonitor.isCurrent == 1,
IsPrimary: cMonitor.isPrimary == 1,
Width: int(cMonitor.width),
Height: int(cMonitor.height),
+
+ Size: frontend.ScreenSize{
+ Width: int(cMonitor.width),
+ Height: int(cMonitor.height),
+ },
+ PhysicalSize: frontend.ScreenSize{
+ Width: int(cMonitor.width * cMonitor.scale),
+ Height: int(cMonitor.height * cMonitor.scale),
+ },
}
screens = append(screens, screen)
}
diff --git a/v2/internal/frontend/desktop/linux/single_instance.go b/v2/internal/frontend/desktop/linux/single_instance.go
new file mode 100644
index 00000000000..0317dee4912
--- /dev/null
+++ b/v2/internal/frontend/desktop/linux/single_instance.go
@@ -0,0 +1,77 @@
+//go:build linux
+// +build linux
+
+package linux
+
+import (
+ "encoding/json"
+ "github.com/godbus/dbus/v5"
+ "github.com/wailsapp/wails/v2/pkg/options"
+ "log"
+ "os"
+ "strings"
+)
+
+type dbusHandler func(string)
+
+func (f dbusHandler) SendMessage(message string) *dbus.Error {
+ f(message)
+ return nil
+}
+
+func SetupSingleInstance(uniqueID string) {
+ id := "wails_app_" + strings.ReplaceAll(strings.ReplaceAll(uniqueID, "-", "_"), ".", "_")
+
+ dbusName := "org." + id + ".SingleInstance"
+ dbusPath := "/org/" + id + "/SingleInstance"
+
+ conn, err := dbus.ConnectSessionBus()
+ // if we will reach any error during establishing connection or sending message we will just continue.
+ // It should not be the case that such thing will happen actually, but just in case.
+ if err != nil {
+ return
+ }
+
+ f := dbusHandler(func(message string) {
+ var secondInstanceData options.SecondInstanceData
+
+ err := json.Unmarshal([]byte(message), &secondInstanceData)
+ if err == nil {
+ secondInstanceBuffer <- secondInstanceData
+ }
+ })
+
+ err = conn.Export(f, dbus.ObjectPath(dbusPath), dbusName)
+ if err != nil {
+ return
+ }
+
+ reply, err := conn.RequestName(dbusName, dbus.NameFlagDoNotQueue)
+ if err != nil {
+ return
+ }
+
+ // if name already taken, try to send args to existing instance, if no success just launch new instance
+ if reply == dbus.RequestNameReplyExists {
+ data := options.SecondInstanceData{
+ Args: os.Args[1:],
+ }
+ data.WorkingDirectory, err = os.Getwd()
+ if err != nil {
+ log.Printf("Failed to get working directory: %v", err)
+ return
+ }
+
+ serialized, err := json.Marshal(data)
+ if err != nil {
+ log.Printf("Failed to marshal data: %v", err)
+ return
+ }
+
+ err = conn.Object(dbusName, dbus.ObjectPath(dbusPath)).Call(dbusName+".SendMessage", 0, string(serialized)).Store()
+ if err != nil {
+ return
+ }
+ os.Exit(1)
+ }
+}
diff --git a/v2/internal/frontend/desktop/linux/webkit2.go b/v2/internal/frontend/desktop/linux/webkit2.go
index 843b72604d8..06e0c782484 100644
--- a/v2/internal/frontend/desktop/linux/webkit2.go
+++ b/v2/internal/frontend/desktop/linux/webkit2.go
@@ -3,7 +3,8 @@
package linux
/*
-#cgo linux pkg-config: webkit2gtk-4.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "webkit2/webkit2.h"
*/
import "C"
diff --git a/v2/internal/frontend/desktop/linux/window.c b/v2/internal/frontend/desktop/linux/window.c
index 1e7d5aa735b..0dee24f4256 100644
--- a/v2/internal/frontend/desktop/linux/window.c
+++ b/v2/internal/frontend/desktop/linux/window.c
@@ -4,6 +4,8 @@
#include
#include
#include
+#include
+#include
#include "window.h"
// These are the x,y,time & button of the last mouse down event
@@ -139,11 +141,50 @@ void SetWindowTransparency(GtkWidget *widget)
}
}
+static GtkCssProvider *windowCssProvider = NULL;
+
void SetBackgroundColour(void *data)
{
+ // set webview's background color
RGBAOptions *options = (RGBAOptions *)data;
+
GdkRGBA colour = {options->r / 255.0, options->g / 255.0, options->b / 255.0, options->a / 255.0};
+ if (options->windowIsTranslucent != NULL && options->windowIsTranslucent == TRUE)
+ {
+ colour.alpha = 0.0;
+ }
webkit_web_view_set_background_color(WEBKIT_WEB_VIEW(options->webview), &colour);
+
+ // set window's background color
+ // Get the name of the current locale
+ char *old_locale, *saved_locale;
+ old_locale = setlocale(LC_ALL, NULL);
+
+ // Copy the name so it won’t be clobbered by setlocale.
+ saved_locale = strdup(old_locale);
+ if (saved_locale == NULL)
+ return;
+
+ //Now change the locale to english for so printf always converts floats with a dot decimal separator
+ setlocale(LC_ALL, "en_US.UTF-8");
+ gchar *str = g_strdup_printf("#webview-box {background-color: rgba(%d, %d, %d, %1.1f);}", options->r, options->g, options->b, options->a / 255.0);
+
+ //Restore the original locale.
+ setlocale(LC_ALL, saved_locale);
+ free(saved_locale);
+
+ if (windowCssProvider == NULL)
+ {
+ windowCssProvider = gtk_css_provider_new();
+ gtk_style_context_add_provider(
+ gtk_widget_get_style_context(GTK_WIDGET(options->webviewBox)),
+ GTK_STYLE_PROVIDER(windowCssProvider),
+ GTK_STYLE_PROVIDER_PRIORITY_USER);
+ g_object_unref(windowCssProvider);
+ }
+
+ gtk_css_provider_load_from_data(windowCssProvider, str, -1, NULL);
+ g_free(str);
}
static gboolean setTitle(gpointer data)
@@ -205,7 +246,7 @@ void SetMinMaxSize(GtkWindow *window, int min_width, int min_height, int max_wid
gtk_window_set_geometry_hints(window, NULL, &size, flags);
}
-// function to disable the context menu but propogate the event
+// function to disable the context menu but propagate the event
static gboolean disableContextMenu(GtkWidget *widget, WebKitContextMenu *context_menu, GdkEvent *event, WebKitHitTestResult *hit_test_result, gpointer data)
{
// return true to disable the context menu
@@ -214,7 +255,7 @@ static gboolean disableContextMenu(GtkWidget *widget, WebKitContextMenu *context
void DisableContextMenu(void *webview)
{
- // Disable the context menu but propogate the event
+ // Disable the context menu but propagate the event
g_signal_connect(WEBKIT_WEB_VIEW(webview), "context-menu", G_CALLBACK(disableContextMenu), NULL);
}
@@ -389,14 +430,92 @@ gboolean close_button_pressed(GtkWidget *widget, GdkEvent *event, void *data)
return TRUE;
}
+char *droppedFiles = NULL;
+
+static void onDragDataReceived(GtkWidget *self, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint target_type, guint time, gpointer data)
+{
+ if(selection_data == NULL || (gtk_selection_data_get_length(selection_data) <= 0) || target_type != 2)
+ {
+ return;
+ }
+
+ if(droppedFiles != NULL) {
+ free(droppedFiles);
+ droppedFiles = NULL;
+ }
+
+ gchar **filenames = NULL;
+ filenames = g_uri_list_extract_uris((const gchar *)gtk_selection_data_get_data(selection_data));
+ if (filenames == NULL) // If unable to retrieve filenames:
+ {
+ g_strfreev(filenames);
+ return;
+ }
+
+ droppedFiles = calloc((size_t)gtk_selection_data_get_length(selection_data), 1);
+
+ int iter = 0;
+ while(filenames[iter] != NULL) // The last URI list element is NULL.
+ {
+ if(iter != 0)
+ {
+ strncat(droppedFiles, "\n", 1);
+ }
+ char *filename = g_filename_from_uri(filenames[iter], NULL, NULL);
+ if (filename == NULL)
+ {
+ break;
+ }
+ strncat(droppedFiles, filename, strlen(filename));
+
+ free(filename);
+ iter++;
+ }
+
+ g_strfreev(filenames);
+}
+
+static gboolean onDragDrop(GtkWidget* self, GdkDragContext* context, gint x, gint y, guint time, gpointer user_data)
+{
+ if(droppedFiles == NULL)
+ {
+ return FALSE;
+ }
+
+ size_t resLen = strlen(droppedFiles)+(sizeof(gint)*2)+6;
+ char *res = calloc(resLen, 1);
+
+ snprintf(res, resLen, "DD:%d:%d:%s", x, y, droppedFiles);
+
+ if(droppedFiles != NULL) {
+ free(droppedFiles);
+ droppedFiles = NULL;
+ }
+
+ processMessage(res);
+ return FALSE;
+}
+
// WebView
-GtkWidget *SetupWebview(void *contentManager, GtkWindow *window, int hideWindowOnClose, int gpuPolicy)
+GtkWidget *SetupWebview(void *contentManager, GtkWindow *window, int hideWindowOnClose, int gpuPolicy, int disableWebViewDragAndDrop, int enableDragAndDrop)
{
GtkWidget *webview = webkit_web_view_new_with_user_content_manager((WebKitUserContentManager *)contentManager);
// gtk_container_add(GTK_CONTAINER(window), webview);
WebKitWebContext *context = webkit_web_context_get_default();
webkit_web_context_register_uri_scheme(context, "wails", (WebKitURISchemeRequestCallback)processURLRequest, NULL, NULL);
g_signal_connect(G_OBJECT(webview), "load-changed", G_CALLBACK(webviewLoadChanged), NULL);
+
+ if(disableWebViewDragAndDrop)
+ {
+ gtk_drag_dest_unset(webview);
+ }
+
+ if(enableDragAndDrop)
+ {
+ g_signal_connect(G_OBJECT(webview), "drag-data-received", G_CALLBACK(onDragDataReceived), NULL);
+ g_signal_connect(G_OBJECT(webview), "drag-drop", G_CALLBACK(onDragDrop), NULL);
+ }
+
if (hideWindowOnClose)
{
g_signal_connect(GTK_WIDGET(window), "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
@@ -434,8 +553,7 @@ void DevtoolsEnabled(void *webview, int enabled, bool showInspector)
if (genabled && showInspector)
{
- WebKitWebInspector *inspector = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(webview));
- webkit_web_inspector_show(WEBKIT_WEB_INSPECTOR(inspector));
+ ShowInspector(webview);
}
}
@@ -692,3 +810,21 @@ GtkFileFilter *newFileFilter()
g_object_ref(result);
return result;
}
+
+void ShowInspector(void *webview) {
+ WebKitWebInspector *inspector = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(webview));
+ webkit_web_inspector_show(WEBKIT_WEB_INSPECTOR(inspector));
+}
+
+void sendShowInspectorMessage() {
+ processMessage("wails:showInspector");
+}
+
+void InstallF12Hotkey(void *window)
+{
+ // When the user presses Ctrl+Shift+F12, call ShowInspector
+ GtkAccelGroup *accel_group = gtk_accel_group_new();
+ gtk_window_add_accel_group(GTK_WINDOW(window), accel_group);
+ GClosure *closure = g_cclosure_new(G_CALLBACK(sendShowInspectorMessage), window, NULL);
+ gtk_accel_group_connect(accel_group, GDK_KEY_F12, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_ACCEL_VISIBLE, closure);
+}
\ No newline at end of file
diff --git a/v2/internal/frontend/desktop/linux/window.go b/v2/internal/frontend/desktop/linux/window.go
index 9cc86afbb59..0bf5ac51d1f 100644
--- a/v2/internal/frontend/desktop/linux/window.go
+++ b/v2/internal/frontend/desktop/linux/window.go
@@ -4,7 +4,9 @@
package linux
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0
+#cgo linux pkg-config: gtk+-3.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include
#include
@@ -25,6 +27,7 @@ import (
"github.com/wailsapp/wails/v2/internal/frontend"
"github.com/wailsapp/wails/v2/pkg/menu"
"github.com/wailsapp/wails/v2/pkg/options"
+ "github.com/wailsapp/wails/v2/pkg/options/linux"
)
func gtkBool(input bool) C.gboolean {
@@ -37,11 +40,13 @@ func gtkBool(input bool) C.gboolean {
type Window struct {
appoptions *options.App
debug bool
+ devtoolsEnabled bool
gtkWindow unsafe.Pointer
contentManager unsafe.Pointer
webview unsafe.Pointer
applicationMenu *menu.Menu
menubar *C.GtkWidget
+ webviewBox *C.GtkWidget
vbox *C.GtkWidget
accels *C.GtkAccelGroup
minWidth, minHeight, maxWidth, maxHeight int
@@ -54,22 +59,28 @@ func bool2Cint(value bool) C.int {
return C.int(0)
}
-func NewWindow(appoptions *options.App, debug bool) *Window {
+func NewWindow(appoptions *options.App, debug bool, devtoolsEnabled bool) *Window {
validateWebKit2Version(appoptions)
result := &Window{
- appoptions: appoptions,
- debug: debug,
- minHeight: appoptions.MinHeight,
- minWidth: appoptions.MinWidth,
- maxHeight: appoptions.MaxHeight,
- maxWidth: appoptions.MaxWidth,
+ appoptions: appoptions,
+ debug: debug,
+ devtoolsEnabled: devtoolsEnabled,
+ minHeight: appoptions.MinHeight,
+ minWidth: appoptions.MinWidth,
+ maxHeight: appoptions.MaxHeight,
+ maxWidth: appoptions.MaxWidth,
}
gtkWindow := C.gtk_window_new(C.GTK_WINDOW_TOPLEVEL)
C.g_object_ref_sink(C.gpointer(gtkWindow))
result.gtkWindow = unsafe.Pointer(gtkWindow)
+ webviewName := C.CString("webview-box")
+ defer C.free(unsafe.Pointer(webviewName))
+ result.webviewBox = C.gtk_box_new(C.GTK_ORIENTATION_VERTICAL, 0)
+ C.gtk_widget_set_name(result.webviewBox, webviewName)
+
result.vbox = C.gtk_box_new(C.GTK_ORIENTATION_VERTICAL, 0)
C.gtk_container_add(result.asGTKContainer(), result.vbox)
@@ -82,6 +93,9 @@ func NewWindow(appoptions *options.App, debug bool) *Window {
var webviewGpuPolicy int
if appoptions.Linux != nil {
webviewGpuPolicy = int(appoptions.Linux.WebviewGpuPolicy)
+ } else {
+ // workaround for https://github.com/wailsapp/wails/issues/2977
+ webviewGpuPolicy = int(linux.WebviewGpuPolicyNever)
}
webview := C.SetupWebview(
@@ -89,15 +103,21 @@ func NewWindow(appoptions *options.App, debug bool) *Window {
result.asGTKWindow(),
bool2Cint(appoptions.HideWindowOnClose),
C.int(webviewGpuPolicy),
+ bool2Cint(appoptions.DragAndDrop != nil && appoptions.DragAndDrop.DisableWebViewDrop),
+ bool2Cint(appoptions.DragAndDrop != nil && appoptions.DragAndDrop.EnableFileDrop),
)
result.webview = unsafe.Pointer(webview)
buttonPressedName := C.CString("button-press-event")
defer C.free(unsafe.Pointer(buttonPressedName))
C.ConnectButtons(unsafe.Pointer(webview))
- if debug {
- C.DevtoolsEnabled(unsafe.Pointer(webview), C.int(1), C.bool(appoptions.Debug.OpenInspectorOnStartup))
- } else {
+ if devtoolsEnabled {
+ C.DevtoolsEnabled(unsafe.Pointer(webview), C.int(1), C.bool(debug && appoptions.Debug.OpenInspectorOnStartup))
+ // Install Ctrl-Shift-F12 hotkey to call ShowInspector
+ C.InstallF12Hotkey(unsafe.Pointer(gtkWindow))
+ }
+
+ if !(debug || appoptions.EnableDefaultContextMenu) {
C.DisableContextMenu(unsafe.Pointer(webview))
}
@@ -108,7 +128,7 @@ func NewWindow(appoptions *options.App, debug bool) *Window {
// Setup window
result.SetKeepAbove(appoptions.AlwaysOnTop)
result.SetResizable(!appoptions.DisableResize)
- result.SetSize(appoptions.Width, appoptions.Height)
+ result.SetDefaultSize(appoptions.Width, appoptions.Height)
result.SetDecorated(!appoptions.Frameless)
result.SetTitle(appoptions.Title)
result.SetMinSize(appoptions.MinWidth, appoptions.MinHeight)
@@ -171,7 +191,9 @@ func (w *Window) Center() {
}
func (w *Window) SetPosition(x int, y int) {
- C.SetPosition(unsafe.Pointer(w.asGTKWindow()), C.int(x), C.int(y))
+ invokeOnMainThread(func() {
+ C.SetPosition(unsafe.Pointer(w.asGTKWindow()), C.int(x), C.int(y))
+ })
}
func (w *Window) Size() (int, int) {
@@ -261,12 +283,18 @@ func (w *Window) IsNormal() bool {
}
func (w *Window) SetBackgroundColour(r uint8, g uint8, b uint8, a uint8) {
+ windowIsTranslucent := false
+ if w.appoptions.Linux != nil && w.appoptions.Linux.WindowIsTranslucent {
+ windowIsTranslucent = true
+ }
data := C.RGBAOptions{
- r: C.uchar(r),
- g: C.uchar(g),
- b: C.uchar(b),
- a: C.uchar(a),
- webview: w.webview,
+ r: C.uchar(r),
+ g: C.uchar(g),
+ b: C.uchar(b),
+ a: C.uchar(a),
+ webview: w.webview,
+ webviewBox: unsafe.Pointer(w.webviewBox),
+ windowIsTranslucent: gtkBool(windowIsTranslucent),
}
invokeOnMainThread(func() { C.SetBackgroundColour(unsafe.Pointer(&data)) })
@@ -283,7 +311,9 @@ func (w *Window) Run(url string) {
if w.menubar != nil {
C.gtk_box_pack_start(C.GTKBOX(unsafe.Pointer(w.vbox)), w.menubar, 0, 0, 0)
}
- C.gtk_box_pack_start(C.GTKBOX(unsafe.Pointer(w.vbox)), C.GTKWIDGET(w.webview), 1, 1, 0)
+
+ C.gtk_box_pack_start(C.GTKBOX(unsafe.Pointer(w.webviewBox)), C.GTKWIDGET(w.webview), 1, 1, 0)
+ C.gtk_box_pack_start(C.GTKBOX(unsafe.Pointer(w.vbox)), w.webviewBox, 1, 1, 0)
_url := C.CString(url)
C.LoadIndex(w.webview, _url)
defer C.free(unsafe.Pointer(_url))
@@ -310,6 +340,10 @@ func (w *Window) SetResizable(resizable bool) {
C.gtk_window_set_resizable(w.asGTKWindow(), gtkBool(resizable))
}
+func (w *Window) SetDefaultSize(width int, height int) {
+ C.gtk_window_set_default_size(w.asGTKWindow(), C.int(width), C.int(height))
+}
+
func (w *Window) SetSize(width int, height int) {
C.gtk_window_resize(w.asGTKWindow(), C.gint(width), C.gint(height))
}
@@ -424,6 +458,10 @@ func (w *Window) ToggleMaximise() {
}
}
+func (w *Window) ShowInspector() {
+ invokeOnMainThread(func() { C.ShowInspector(w.webview) })
+}
+
// showModalDialogAndExit shows a modal dialog and exits the app.
func showModalDialogAndExit(title, message string) {
go func() {
diff --git a/v2/internal/frontend/desktop/linux/window.h b/v2/internal/frontend/desktop/linux/window.h
index f02542febbb..04410959a9a 100644
--- a/v2/internal/frontend/desktop/linux/window.h
+++ b/v2/internal/frontend/desktop/linux/window.h
@@ -55,6 +55,8 @@ typedef struct RGBAOptions
uint8_t b;
uint8_t a;
void *webview;
+ void *webviewBox;
+ gboolean windowIsTranslucent;
} RGBAOptions;
typedef struct SetTitleArgs
@@ -104,7 +106,7 @@ gboolean Fullscreen(gpointer data);
gboolean UnFullscreen(gpointer data);
// WebView
-GtkWidget *SetupWebview(void *contentManager, GtkWindow *window, int hideWindowOnClose, int gpuPolicy);
+GtkWidget *SetupWebview(void *contentManager, GtkWindow *window, int hideWindowOnClose, int gpuPolicy, int disableWebViewDragAndDrop, int enableDragAndDrop);
void LoadIndex(void *webview, char *url);
void DevtoolsEnabled(void *webview, int enabled, bool showInspector);
void ExecuteJS(void *data);
@@ -118,4 +120,9 @@ void MessageDialog(void *data);
GtkFileFilter **AllocFileFilterArray(size_t ln);
void Opendialog(void *data);
+// Inspector
+void sendShowInspectorMessage();
+void ShowInspector(void *webview);
+void InstallF12Hotkey(void *window);
+
#endif /* window_h */
diff --git a/v2/internal/frontend/desktop/windows/browser.go b/v2/internal/frontend/desktop/windows/browser.go
index f23b04dbe3b..2b058fedaf9 100644
--- a/v2/internal/frontend/desktop/windows/browser.go
+++ b/v2/internal/frontend/desktop/windows/browser.go
@@ -5,10 +5,31 @@ package windows
import (
"github.com/pkg/browser"
+ "golang.org/x/sys/windows"
)
+var fallbackBrowserPaths = []string{
+ `\Program Files (x86)\Microsoft\Edge\Application\msedge.exe`,
+ `\Program Files\Google\Chrome\Application\chrome.exe`,
+ `\Program Files (x86)\Google\Chrome\Application\chrome.exe`,
+ `\Program Files\Mozilla Firefox\firefox.exe`,
+}
+
// BrowserOpenURL Use the default browser to open the url
func (f *Frontend) BrowserOpenURL(url string) {
// Specific method implementation
- _ = browser.OpenURL(url)
+ err := browser.OpenURL(url)
+ if err == nil {
+ return
+ }
+ for _, fallback := range fallbackBrowserPaths {
+ if err := openBrowser(fallback, url); err == nil {
+ return
+ }
+ }
+ f.logger.Error("Unable to open default system browser")
+}
+
+func openBrowser(path, url string) error {
+ return windows.ShellExecute(0, nil, windows.StringToUTF16Ptr(path), windows.StringToUTF16Ptr(url), nil, windows.SW_SHOWNORMAL)
}
diff --git a/v2/internal/frontend/desktop/windows/dialog.go b/v2/internal/frontend/desktop/windows/dialog.go
index 1ca422b7199..573325886a1 100644
--- a/v2/internal/frontend/desktop/windows/dialog.go
+++ b/v2/internal/frontend/desktop/windows/dialog.go
@@ -47,7 +47,7 @@ func (f *Frontend) OpenDirectoryDialog(options frontend.OpenDialogOptions) (stri
return cfd.NewSelectFolderDialog(config)
}, false)
- if err != nil && err != cfd.ErrorCancelled {
+ if err != nil && err != cfd.ErrCancelled {
return "", err
}
return result.(string), nil
@@ -72,7 +72,7 @@ func (f *Frontend) OpenFileDialog(options frontend.OpenDialogOptions) (string, e
return cfd.NewOpenFileDialog(config)
}, false)
- if err != nil && err != cfd.ErrorCancelled {
+ if err != nil && err != cfd.ErrCancelled {
return "", err
}
return result.(string), nil
@@ -99,7 +99,7 @@ func (f *Frontend) OpenMultipleFilesDialog(options frontend.OpenDialogOptions) (
return cfd.NewOpenMultipleFilesDialog(config)
}, true)
- if err != nil && err != cfd.ErrorCancelled {
+ if err != nil && err != cfd.ErrCancelled {
return nil, err
}
return result.([]string), nil
@@ -121,12 +121,16 @@ func (f *Frontend) SaveFileDialog(options frontend.SaveDialogOptions) (string, e
Folder: defaultFolder,
}
+ if len(options.Filters) > 0 {
+ config.DefaultExtension = strings.TrimPrefix(strings.Split(options.Filters[0].Pattern, ";")[0], "*")
+ }
+
result, err := f.showCfdDialog(
func() (cfd.Dialog, error) {
return cfd.NewSaveFileDialog(config)
}, false)
- if err != nil && err != cfd.ErrorCancelled {
+ if err != nil && err != cfd.ErrCancelled {
return "", err
}
return result.(string), nil
diff --git a/v2/internal/frontend/desktop/windows/frontend.go b/v2/internal/frontend/desktop/windows/frontend.go
index 82289e054f0..71e90e8e5c6 100644
--- a/v2/internal/frontend/desktop/windows/frontend.go
+++ b/v2/internal/frontend/desktop/windows/frontend.go
@@ -7,11 +7,8 @@ import (
"context"
"encoding/json"
"fmt"
- "io"
"log"
"net"
- "net/http"
- "net/http/httptest"
"net/url"
"os"
"runtime"
@@ -19,11 +16,12 @@ import (
"sync"
"text/template"
"time"
+ "unsafe"
"github.com/bep/debounce"
+ "github.com/wailsapp/go-webview2/pkg/edge"
"github.com/wailsapp/wails/v2/internal/binding"
"github.com/wailsapp/wails/v2/internal/frontend"
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge"
"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/win32"
"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc"
"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc/w32"
@@ -31,12 +29,15 @@ import (
"github.com/wailsapp/wails/v2/internal/logger"
"github.com/wailsapp/wails/v2/internal/system/operatingsystem"
"github.com/wailsapp/wails/v2/pkg/assetserver"
+ "github.com/wailsapp/wails/v2/pkg/assetserver/webview"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/windows"
)
const startURL = "http://wails.localhost/"
+var secondInstanceBuffer = make(chan options.SecondInstanceData, 1)
+
type Screen = frontend.Screen
type Frontend struct {
@@ -48,6 +49,7 @@ type Frontend struct {
logger *logger.Logger
chromium *edge.Chromium
debug bool
+ devtoolsEnabled bool
// Assets
assets *assetserver.AssetServer
@@ -114,6 +116,8 @@ func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.
}
result.assets = assets
+ go result.startSecondInstanceProcessor()
+
return result
}
@@ -138,13 +142,22 @@ func (f *Frontend) Run(ctx context.Context) error {
f.chromium = edge.NewChromium()
+ if f.frontendOptions.SingleInstanceLock != nil {
+ SetupSingleInstance(f.frontendOptions.SingleInstanceLock.UniqueId)
+ }
+
mainWindow := NewWindow(nil, f.frontendOptions, f.versionInfo, f.chromium)
f.mainWindow = mainWindow
var _debug = ctx.Value("debug")
+ var _devtoolsEnabled = ctx.Value("devtoolsEnabled")
+
if _debug != nil {
f.debug = _debug.(bool)
}
+ if _devtoolsEnabled != nil {
+ f.devtoolsEnabled = _devtoolsEnabled.(bool)
+ }
f.WindowCenter()
f.setupChromium()
@@ -207,6 +220,7 @@ func (f *Frontend) WindowCenter() {
func (f *Frontend) WindowSetAlwaysOnTop(b bool) {
runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
f.mainWindow.SetAlwaysOnTop(b)
}
@@ -419,6 +433,10 @@ func (f *Frontend) Quit() {
f.mainWindow.Invoke(winc.Exit)
}
+func (f *Frontend) WindowPrint() {
+ f.ExecJS("window.print();")
+}
+
func (f *Frontend) setupChromium() {
chromium := f.chromium
@@ -444,10 +462,29 @@ func (f *Frontend) setupChromium() {
chromium.AdditionalBrowserArgs = append(chromium.AdditionalBrowserArgs, arg)
}
+ if f.frontendOptions.DragAndDrop != nil && f.frontendOptions.DragAndDrop.DisableWebViewDrop {
+ if err := chromium.AllowExternalDrag(false); err != nil {
+ f.logger.Warning("WebView failed to set AllowExternalDrag to false!")
+ }
+ }
+
chromium.MessageCallback = f.processMessage
+ chromium.MessageWithAdditionalObjectsCallback = f.processMessageWithAdditionalObjects
chromium.WebResourceRequestedCallback = f.processRequest
chromium.NavigationCompletedCallback = f.navigationCompleted
chromium.AcceleratorKeyCallback = func(vkey uint) bool {
+ if vkey == w32.VK_F12 && f.devtoolsEnabled {
+ var keyState [256]byte
+ if w32.GetKeyboardState(keyState[:]) {
+ // Check if CTRL is pressed
+ if keyState[w32.VK_CONTROL]&0x80 != 0 && keyState[w32.VK_SHIFT]&0x80 != 0 {
+ chromium.OpenDevToolsWindow()
+ return true
+ }
+ } else {
+ f.logger.Error("Call to GetKeyboardState failed")
+ }
+ }
w32.PostMessage(f.mainWindow.Handle(), w32.WM_KEYDOWN, uintptr(vkey), 0)
return false
}
@@ -484,16 +521,24 @@ func (f *Frontend) setupChromium() {
}
chromium.Embed(f.mainWindow.Handle())
+
+ if chromium.HasCapability(edge.SwipeNavigation) {
+ swipeGesturesEnabled := f.frontendOptions.Windows != nil && f.frontendOptions.Windows.EnableSwipeGestures
+ err := chromium.PutIsSwipeNavigationEnabled(swipeGesturesEnabled)
+ if err != nil {
+ log.Fatal(err)
+ }
+ }
chromium.Resize()
settings, err := chromium.GetSettings()
if err != nil {
log.Fatal(err)
}
- err = settings.PutAreDefaultContextMenusEnabled(f.debug)
+ err = settings.PutAreDefaultContextMenusEnabled(f.debug || f.frontendOptions.EnableDefaultContextMenu)
if err != nil {
log.Fatal(err)
}
- err = settings.PutAreDevToolsEnabled(f.debug)
+ err = settings.PutAreDevToolsEnabled(f.devtoolsEnabled)
if err != nil {
log.Fatal(err)
}
@@ -506,6 +551,10 @@ func (f *Frontend) setupChromium() {
if err != nil {
log.Fatal(err)
}
+ err = settings.PutIsPinchZoomEnabled(!opts.DisablePinchZoom)
+ if err != nil {
+ log.Fatal(err)
+ }
}
err = settings.PutIsStatusBarEnabled(false)
@@ -516,10 +565,6 @@ func (f *Frontend) setupChromium() {
if err != nil {
log.Fatal(err)
}
- err = settings.PutIsSwipeNavigationEnabled(false)
- if err != nil {
- log.Fatal(err)
- }
if f.debug && f.frontendOptions.Debug.OpenInspectorOnStartup {
chromium.OpenDevToolsWindow()
@@ -586,36 +631,31 @@ func (f *Frontend) processRequest(req *edge.ICoreWebView2WebResourceRequest, arg
return
}
- rw := httptest.NewRecorder()
- f.assets.ProcessHTTPRequestLegacy(rw, coreWebview2RequestToHttpRequest(req))
-
- headers := []string{}
- for k, v := range rw.Header() {
- headers = append(headers, fmt.Sprintf("%s: %s", k, strings.Join(v, ",")))
- }
-
- code := rw.Code
- if code == http.StatusNotModified {
- // WebView2 has problems when a request returns a 304 status code and the WebView2 is going to hang for other
- // requests including IPC calls.
- f.logger.Error("%s: AssetServer returned 304 - StatusNotModified which are going to hang WebView2, changed code to 505 - StatusInternalServerError", uri)
- code = http.StatusInternalServerError
- }
+ webviewRequest, err := webview.NewRequest(
+ f.chromium.Environment(),
+ args,
+ func(fn func()) {
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ if f.mainWindow.InvokeRequired() {
+ var wg sync.WaitGroup
+ wg.Add(1)
+ f.mainWindow.Invoke(func() {
+ fn()
+ wg.Done()
+ })
+ wg.Wait()
+ } else {
+ fn()
+ }
+ })
- env := f.chromium.Environment()
- response, err := env.CreateWebResourceResponse(rw.Body.Bytes(), code, http.StatusText(code), strings.Join(headers, "\n"))
if err != nil {
- f.logger.Error("CreateWebResourceResponse Error: %s", err)
+ f.logger.Error("%s: NewRequest failed: %s", uri, err)
return
}
- defer response.Release()
- // Send response back
- err = args.PutResponse(response)
- if err != nil {
- f.logger.Error("PutResponse Error: %s", err)
- return
- }
+ f.assets.ServeWebViewRequest(webviewRequest)
}
var edgeMap = map[string]uintptr{
@@ -641,7 +681,15 @@ func (f *Frontend) processMessage(message string) {
}
if message == "runtime:ready" {
- cmd := fmt.Sprintf("window.wails.setCSSDragProperties('%s', '%s');", f.frontendOptions.CSSDragProperty, f.frontendOptions.CSSDragValue)
+ cmd := fmt.Sprintf(
+ "window.wails.setCSSDragProperties('%s', '%s');\n"+
+ "window.wails.setCSSDropProperties('%s', '%s');",
+ f.frontendOptions.CSSDragProperty,
+ f.frontendOptions.CSSDragValue,
+ f.frontendOptions.DragAndDrop.CSSDropProperty,
+ f.frontendOptions.DragAndDrop.CSSDropValue,
+ )
+
f.ExecJS(cmd)
return
}
@@ -662,25 +710,81 @@ func (f *Frontend) processMessage(message string) {
return
}
- go func() {
- result, err := f.dispatcher.ProcessMessage(message, f)
+ go f.dispatchMessage(message)
+}
+
+func (f *Frontend) processMessageWithAdditionalObjects(message string, sender *edge.ICoreWebView2, args *edge.ICoreWebView2WebMessageReceivedEventArgs) {
+ if strings.HasPrefix(message, "file:drop") {
+ if !f.frontendOptions.DragAndDrop.EnableFileDrop {
+ return
+ }
+ objs, err := args.GetAdditionalObjects()
if err != nil {
f.logger.Error(err.Error())
- f.Callback(result)
return
}
- if result == "" {
+
+ defer objs.Release()
+
+ count, err := objs.GetCount()
+ if err != nil {
+ f.logger.Error(err.Error())
return
}
- switch result[0] {
- case 'c':
- // Callback from a method call
- f.Callback(result[1:])
- default:
- f.logger.Info("Unknown message returned from dispatcher: %+v", result)
+ files := make([]string, count)
+ for i := uint32(0); i < count; i++ {
+ _file, err := objs.GetValueAtIndex(i)
+ if err != nil {
+ f.logger.Error("cannot get value at %d : %s", i, err.Error())
+ return
+ }
+
+ file := (*edge.ICoreWebView2File)(unsafe.Pointer(_file))
+ defer file.Release()
+
+ filepath, err := file.GetPath()
+ if err != nil {
+ f.logger.Error("cannot get path for object at %d : %s", i, err.Error())
+ return
+ }
+
+ files[i] = filepath
}
- }()
+
+ var (
+ x = "0"
+ y = "0"
+ )
+ coords := strings.SplitN(message[10:], ":", 2)
+ if len(coords) == 2 {
+ x = coords[0]
+ y = coords[1]
+ }
+
+ go f.dispatchMessage(fmt.Sprintf("DD:%s:%s:%s", x, y, strings.Join(files, "\n")))
+ return
+ }
+}
+
+func (f *Frontend) dispatchMessage(message string) {
+ result, err := f.dispatcher.ProcessMessage(message, f)
+ if err != nil {
+ f.logger.Error(err.Error())
+ f.Callback(result)
+ return
+ }
+ if result == "" {
+ return
+ }
+
+ switch result[0] {
+ case 'c':
+ // Callback from a method call
+ f.Callback(result[1:])
+ default:
+ f.logger.Info("Unknown message returned from dispatcher: %+v", result)
+ }
}
func (f *Frontend) Callback(message string) {
@@ -726,6 +830,10 @@ func (f *Frontend) navigationCompleted(sender *edge.ICoreWebView2, args *edge.IC
f.ExecJS("window.wails.flags.enableResize = true;")
}
+ if f.frontendOptions.DragAndDrop != nil && f.frontendOptions.DragAndDrop.EnableFileDrop {
+ f.ExecJS("window.wails.flags.enableWailsDragAndDrop = true;")
+ }
+
if f.hasStarted {
return
}
@@ -807,92 +915,11 @@ func (f *Frontend) onFocus(arg *winc.Event) {
f.chromium.Focus()
}
-func coreWebview2RequestToHttpRequest(coreReq *edge.ICoreWebView2WebResourceRequest) func() (*http.Request, error) {
- return func() (r *http.Request, err error) {
- header := http.Header{}
- headers, err := coreReq.GetHeaders()
- if err != nil {
- return nil, fmt.Errorf("GetHeaders Error: %s", err)
- }
- defer headers.Release()
-
- headersIt, err := headers.GetIterator()
- if err != nil {
- return nil, fmt.Errorf("GetIterator Error: %s", err)
+func (f *Frontend) startSecondInstanceProcessor() {
+ for secondInstanceData := range secondInstanceBuffer {
+ if f.frontendOptions.SingleInstanceLock != nil &&
+ f.frontendOptions.SingleInstanceLock.OnSecondInstanceLaunch != nil {
+ f.frontendOptions.SingleInstanceLock.OnSecondInstanceLaunch(secondInstanceData)
}
- defer headersIt.Release()
-
- for {
- has, err := headersIt.HasCurrentHeader()
- if err != nil {
- return nil, fmt.Errorf("HasCurrentHeader Error: %s", err)
- }
- if !has {
- break
- }
-
- name, value, err := headersIt.GetCurrentHeader()
- if err != nil {
- return nil, fmt.Errorf("GetCurrentHeader Error: %s", err)
- }
-
- header.Set(name, value)
- if _, err := headersIt.MoveNext(); err != nil {
- return nil, fmt.Errorf("MoveNext Error: %s", err)
- }
- }
-
- // WebView2 has problems when a request returns a 304 status code and the WebView2 is going to hang for other
- // requests including IPC calls.
- // So prevent 304 status codes by removing the headers that are used in combinationwith caching.
- header.Del("If-Modified-Since")
- header.Del("If-None-Match")
-
- method, err := coreReq.GetMethod()
- if err != nil {
- return nil, fmt.Errorf("GetMethod Error: %s", err)
- }
-
- uri, err := coreReq.GetUri()
- if err != nil {
- return nil, fmt.Errorf("GetUri Error: %s", err)
- }
-
- var body io.ReadCloser
- if content, err := coreReq.GetContent(); err != nil {
- return nil, fmt.Errorf("GetContent Error: %s", err)
- } else if content != nil {
- body = &iStreamReleaseCloser{stream: content}
- }
-
- req, err := http.NewRequest(method, uri, body)
- if err != nil {
- if body != nil {
- body.Close()
- }
- return nil, err
- }
- req.Header = header
- return req, nil
- }
-}
-
-type iStreamReleaseCloser struct {
- stream *edge.IStream
- closed bool
-}
-
-func (i *iStreamReleaseCloser) Read(p []byte) (int, error) {
- if i.closed {
- return 0, io.ErrClosedPipe
- }
- return i.stream.Read(p)
-}
-
-func (i *iStreamReleaseCloser) Close() error {
- if i.closed {
- return nil
}
- i.closed = true
- return i.stream.Release()
}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/LICENSE b/v2/internal/frontend/desktop/windows/go-webview2/LICENSE
deleted file mode 100644
index ef2a0f48558..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-MIT License
-
-Copyright (c) 2020 John Chadwick
-Some portions Copyright (c) 2017 Serge Zaitsev
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/README.md b/v2/internal/frontend/desktop/windows/go-webview2/README.md
deleted file mode 100644
index 7379b302576..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# go-webview2
-
-This is a proof of concept for embedding Webview2 into Go without CGo. It is based
-on [webview/webview](https://github.com/webview/webview) and provides a compatible API.
-
-## Notice
-
-Because this version doesn't currently have an EdgeHTML fallback, it will not work unless you have a Webview2 runtime
-installed. In addition, it requires the Webview2Loader DLL in order to function. Adding an EdgeHTML fallback should be
-technically possible but will likely require much worse hacks since the API is not strictly COM to my knowledge.
-
-## Demo
-
-For now, you'll need to install the Webview2 runtime, as it does not ship with Windows.
-
-[WebView2 runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)
-
-After that, you should be able to run go-webview2 directly:
-
-```
-go run go-webview2/cmd/demo
-```
-
-This will use go-winloader to load an embedded copy of WebView2Loader.dll.
-
-If this does not work, please try running from a directory that has an appropriate copy of `WebView2Loader.dll` for your
-GOARCH. If _that_ worked, *please* file a bug so we can figure out what's wrong with go-winloader :)
\ No newline at end of file
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/internal/w32/w32.go b/v2/internal/frontend/desktop/windows/go-webview2/internal/w32/w32.go
deleted file mode 100644
index 2b564173fc5..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/internal/w32/w32.go
+++ /dev/null
@@ -1,157 +0,0 @@
-//go:build windows
-
-package w32
-
-import (
- "syscall"
- "unicode/utf16"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-var (
- ole32 = windows.NewLazySystemDLL("ole32")
- Ole32CoInitializeEx = ole32.NewProc("CoInitializeEx")
-
- kernel32 = windows.NewLazySystemDLL("kernel32")
- Kernel32GetCurrentThreadID = kernel32.NewProc("GetCurrentThreadId")
-
- shlwapi = windows.NewLazySystemDLL("shlwapi")
- shlwapiSHCreateMemStream = shlwapi.NewProc("SHCreateMemStream")
-
- user32 = windows.NewLazySystemDLL("user32")
- User32LoadImageW = user32.NewProc("LoadImageW")
- User32GetSystemMetrics = user32.NewProc("GetSystemMetrics")
- User32RegisterClassExW = user32.NewProc("RegisterClassExW")
- User32CreateWindowExW = user32.NewProc("CreateWindowExW")
- User32DestroyWindow = user32.NewProc("DestroyWindow")
- User32ShowWindow = user32.NewProc("ShowWindow")
- User32UpdateWindow = user32.NewProc("UpdateWindow")
- User32SetFocus = user32.NewProc("SetFocus")
- User32GetMessageW = user32.NewProc("GetMessageW")
- User32TranslateMessage = user32.NewProc("TranslateMessage")
- User32DispatchMessageW = user32.NewProc("DispatchMessageW")
- User32DefWindowProcW = user32.NewProc("DefWindowProcW")
- User32GetClientRect = user32.NewProc("GetClientRect")
- User32PostQuitMessage = user32.NewProc("PostQuitMessage")
- User32SetWindowTextW = user32.NewProc("SetWindowTextW")
- User32PostThreadMessageW = user32.NewProc("PostThreadMessageW")
- User32GetWindowLongPtrW = user32.NewProc("GetWindowLongPtrW")
- User32SetWindowLongPtrW = user32.NewProc("SetWindowLongPtrW")
- User32AdjustWindowRect = user32.NewProc("AdjustWindowRect")
- User32SetWindowPos = user32.NewProc("SetWindowPos")
-)
-
-const (
- SystemMetricsCxIcon = 11
- SystemMetricsCyIcon = 12
-)
-
-const (
- SWShow = 5
-)
-
-const (
- SWPNoZOrder = 0x0004
- SWPNoActivate = 0x0010
- SWPNoMove = 0x0002
- SWPFrameChanged = 0x0020
-)
-
-const (
- WMDestroy = 0x0002
- WMMove = 0x0003
- WMSize = 0x0005
- WMClose = 0x0010
- WMQuit = 0x0012
- WMGetMinMaxInfo = 0x0024
- WMNCLButtonDown = 0x00A1
- WMMoving = 0x0216
- WMApp = 0x8000
-)
-
-const (
- GWLStyle = -16
-)
-
-const (
- WSOverlapped = 0x00000000
- WSMaximizeBox = 0x00020000
- WSThickFrame = 0x00040000
- WSCaption = 0x00C00000
- WSSysMenu = 0x00080000
- WSMinimizeBox = 0x00020000
- WSOverlappedWindow = (WSOverlapped | WSCaption | WSSysMenu | WSThickFrame | WSMinimizeBox | WSMaximizeBox)
-)
-
-type WndClassExW struct {
- CbSize uint32
- Style uint32
- LpfnWndProc uintptr
- CnClsExtra int32
- CbWndExtra int32
- HInstance windows.Handle
- HIcon windows.Handle
- HCursor windows.Handle
- HbrBackground windows.Handle
- LpszMenuName *uint16
- LpszClassName *uint16
- HIconSm windows.Handle
-}
-
-type Rect struct {
- Left int32
- Top int32
- Right int32
- Bottom int32
-}
-
-type MinMaxInfo struct {
- PtReserved Point
- PtMaxSize Point
- PtMaxPosition Point
- PtMinTrackSize Point
- PtMaxTrackSize Point
-}
-
-type Point struct {
- X, Y int32
-}
-
-type Msg struct {
- Hwnd syscall.Handle
- Message uint32
- WParam uintptr
- LParam uintptr
- Time uint32
- Pt Point
- LPrivate uint32
-}
-
-func Utf16PtrToString(p *uint16) string {
- if p == nil {
- return ""
- }
- // Find NUL terminator.
- end := unsafe.Pointer(p)
- n := 0
- for *(*uint16)(end) != 0 {
- end = unsafe.Pointer(uintptr(end) + unsafe.Sizeof(*p))
- n++
- }
- s := (*[(1 << 30) - 1]uint16)(unsafe.Pointer(p))[:n:n]
- return string(utf16.Decode(s))
-}
-
-func SHCreateMemStream(data []byte) (uintptr, error) {
- ret, _, err := shlwapiSHCreateMemStream.Call(
- uintptr(unsafe.Pointer(&data[0])),
- uintptr(len(data)),
- )
- if ret == 0 {
- return 0, err
- }
-
- return ret, nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/bridge.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/bridge.go
deleted file mode 100644
index ccf04243f02..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/bridge.go
+++ /dev/null
@@ -1,239 +0,0 @@
-//go:build windows
-
-package combridge
-
-import (
- "fmt"
- "runtime"
- "sync"
- "sync/atomic"
-)
-
-var (
- comIfcePointersL sync.RWMutex
- comIfcePointers = map[uintptr]*comObject{} // Map from ComInterfacePointer to the Go ComObject
-)
-
-// Resolve the GoInterface of the specified ComInterfacePointer
-func Resolve[T IUnknown](ifceP uintptr) T {
- comIfcePointersL.RLock()
- comObj := comIfcePointers[ifceP]
- comIfcePointersL.RUnlock()
-
- var n T
- if comObj != nil {
- t := comObj.resolve(ifceP)
- if t != nil {
- n = t.(T)
- }
- }
-
- return n
-}
-
-// New returns a new ComObject which implements the specified Com Interface, com calls will be redirected
-// to the specified go interface.
-func New[T IUnknown](obj T) *ComObject[T] {
- cObj := new(
- ifceDef[T]{obj},
- )
- return newComObject[T](cObj)
-}
-
-// New2 returns a new ComObject which implements the two specified Com Interfaces, com calls will be redirected
-// to those interfaces accordingly.
-// This is needed if a ComObject should implement two interfaces that are not descendants of each other,
-// then you get multiple inheritance.
-func New2[T IUnknown, T2 IUnknown](obj T, obj2 T2) *ComObject[T] {
- cObj := new(
- ifceDef[T]{obj},
- ifceDef[T2]{obj2},
- )
- return newComObject[T](cObj)
-}
-
-// new returns a new ComObject which implements multiple specified Com Interfaces, com calls will be redirected
-// to the specified go interfaces accordingly.
-// This is needed if a ComObject should implement multiple interfaces that are not descendants of each other,
-// then you get multiple inheritance.
-func new(impls ...ifceImpl) *comObject {
- impls = append([]ifceImpl{ifceDef[IUnknown]{}}, impls...)
-
- cObj := &comObject{
- refCount: 1,
- ifces: map[string]int{},
- ifcesImpl: make([]comInterfaceDesc, len(impls)),
- }
-
- for i, ifceDef := range impls {
- vtable, err := ifceDef.ifce()
- if err != nil {
- panic(err)
- }
-
- needsImplement := false
- for table := vtable; table != nil; table = table.Parent {
- guid := table.ComGUID
- if i, found := cObj.ifces[guid]; found {
- // This Interface is already implemented
- if guid == iUnknownGUID {
- // IUnknown is a special interface and never has an user specific implementation
- } else if cObj.ifcesImpl[i].impl != ifceDef.impl() {
- panic(fmt.Sprintf("Interface '%s' is already implemented by another object", table.Name))
- }
-
- break
- }
-
- needsImplement = true
- cObj.ifces[guid] = i
- }
-
- if !needsImplement {
- continue
- }
-
- ifceP, ifcePSlice := allocUintptrObject(1)
- ifcePSlice[0] = vtable.ComVTable
- cObj.ifcesImpl[i] = comInterfaceDesc{ifceP, ifceDef.impl()}
- }
-
- comIfcePointersL.Lock()
- for _, ifceImpl := range cObj.ifcesImpl {
- comIfcePointers[ifceImpl.ref] = cObj
- }
- comIfcePointersL.Unlock()
-
- return cObj
-}
-
-func newComObject[T IUnknown](comObj *comObject) *ComObject[T] {
- c := &ComObject[T]{obj: comObj}
- // Make sure to async release since release needs locks and might block the finalizer goroutine for a longer period
- runtime.SetFinalizer(c, func(obj *ComObject[T]) { obj.close(true) })
- return c
-}
-
-// ComObject describes an exported go instance to be used as a ComObject which implements
-// the specified Interface.
-type ComObject[T IUnknown] struct {
- obj *comObject
- closed int32
-}
-
-// Ref returns the native uintptr that points to the ComObject that is an interface pointer to T.
-// This can be used in native calls. If the object has been closed this function will panic.
-func (o *ComObject[T]) Ref() uintptr {
- if atomic.LoadInt32(&o.closed) != 0 {
- panic("ComObject has been released")
- }
- return o.obj.queryInterface(guidOf[T](), false)
-}
-
-// Close releases the native com object from the go side. It will only be destroyed if the ref counter
-// reaches zero.
-// After closing `Ref()` will panic.
-func (o *ComObject[T]) Close() error {
- o.close(false)
- return nil
-}
-
-// close releases the native com object from the go side. It will only be destroyed if the ref counter
-// reaches zero.
-// After closing `Ref()` will panic.
-func (o *ComObject[T]) close(asyncRelease bool) {
- if atomic.CompareAndSwapInt32(&o.closed, 0, 1) {
- runtime.SetFinalizer(o, nil)
- if asyncRelease {
- go o.obj.release()
- } else {
- o.obj.release()
- }
- }
-}
-
-type comInterfaceDesc struct {
- ref uintptr // The native Com InterfacePointer
- impl any // The golang target object
-}
-
-type comObject struct {
- l sync.Mutex
-
- refCount int32
- ifces map[string]int // Map of ComInterfaceGUID to Interface Slots
- ifcesImpl []comInterfaceDesc // Slots with InterfaceDescriptors
-}
-
-func (c *comObject) queryInterface(ifceGUID string, withAddRef bool) uintptr {
- c.l.Lock()
- defer c.l.Unlock()
- if c.refCount <= 0 {
- panic("call on released com object")
- }
-
- i, found := c.ifces[ifceGUID]
- if !found {
- return 0
- }
-
- if withAddRef {
- c.refCount++
- }
- return c.ifcesImpl[i].ref
-}
-
-func (c *comObject) resolve(ifceP uintptr) any {
- c.l.Lock()
- defer c.l.Unlock()
- if c.refCount <= 0 {
- panic("call on destroyed com object")
- }
-
- for _, ifce := range c.ifcesImpl {
- if ifce.ref != ifceP {
- continue
- }
-
- return ifce.impl
- }
- return nil
-}
-
-func (c *comObject) addRef() int32 {
- c.l.Lock()
- defer c.l.Unlock()
- if c.refCount <= 0 {
- panic("call on destroyed com object")
- }
-
- c.refCount++
- return c.refCount
-}
-
-func (c *comObject) release() int32 {
- c.l.Lock()
- defer c.l.Unlock()
- if c.refCount <= 0 {
- panic("call on destroyed com object")
- }
-
- if c.refCount--; c.refCount == 0 {
- comIfcePointersL.Lock()
- for _, ref := range c.ifcesImpl {
- delete(comIfcePointers, ref.ref)
- }
- comIfcePointersL.Unlock()
-
- for _, impl := range c.ifcesImpl {
- ref := impl.ref
- if ref == 0 {
- continue
- }
-
- globalFree(ref)
- }
- }
-
- return c.refCount
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/iunknown.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/iunknown.go
deleted file mode 100644
index 90d7247fe87..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/iunknown.go
+++ /dev/null
@@ -1,56 +0,0 @@
-//go:build windows
-
-package combridge
-
-import (
- "golang.org/x/sys/windows"
-)
-
-const iUnknownGUID = "{00000000-0000-0000-C000-000000000046}"
-
-func init() {
- registerVTableInternal[IUnknown, IUnknown](
- iUnknownGUID,
- true,
- iUnknownQueryInterface,
- iUnknownAddRef,
- iUnknownRelease,
- )
-}
-
-type IUnknown interface{}
-
-func iUnknownQueryInterface(this uintptr, refiid *windows.GUID, ppvObject *uintptr) uintptr {
- if refiid == nil || ppvObject == nil {
- return uintptr(windows.E_INVALIDARG)
- }
-
- comIfcePointersL.RLock()
- obj := comIfcePointers[this]
- comIfcePointersL.RUnlock()
-
- ref := obj.queryInterface(refiid.String(), true)
- if ref != 0 {
- *ppvObject = ref
- return windows.NO_ERROR
- }
-
- *ppvObject = 0
- return uintptr(windows.E_NOINTERFACE)
-}
-
-func iUnknownAddRef(this uintptr) uintptr {
- comIfcePointersL.RLock()
- obj := comIfcePointers[this]
- comIfcePointersL.RUnlock()
-
- return uintptr(obj.addRef())
-}
-
-func iUnknownRelease(this uintptr) uintptr {
- comIfcePointersL.RLock()
- obj := comIfcePointers[this]
- comIfcePointersL.RUnlock()
-
- return uintptr(obj.release())
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/iunknown_impl.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/iunknown_impl.go
deleted file mode 100644
index 4c748d46135..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/iunknown_impl.go
+++ /dev/null
@@ -1,74 +0,0 @@
-//go:build windows
-
-package combridge
-
-import (
- "syscall"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-// IUnknownFromPointer cast a generic pointer into a IUnknownImpl pointer
-func IUnknownFromPointer(ref unsafe.Pointer) *IUnknownImpl {
- return (*IUnknownImpl)(ref)
-}
-
-// IUnknownFromPointer cast native pointer into a IUnknownImpl pointer
-func IUnknownFromUintptr(ref uintptr) *IUnknownImpl {
- return IUnknownFromPointer(unsafe.Pointer(ref))
-}
-
-type IUnknownVtbl struct {
- queryInterface uintptr
- addRef uintptr
- release uintptr
-}
-
-func (i *IUnknownVtbl) QueryInterface(this unsafe.Pointer, refiid *windows.GUID, ppvObject **IUnknownImpl) error {
- r, _, _ := syscall.SyscallN(
- i.queryInterface,
- uintptr(this),
- uintptr(unsafe.Pointer(refiid)),
- uintptr(unsafe.Pointer(ppvObject)),
- )
-
- if r != uintptr(windows.S_OK) {
- return syscall.Errno(r)
- }
-
- return nil
-}
-
-func (i *IUnknownVtbl) AddRef(this unsafe.Pointer) uint32 {
- r, _, _ := syscall.SyscallN(
- i.addRef,
- uintptr(this),
- )
- return uint32(r)
-}
-
-func (i *IUnknownVtbl) Release(this unsafe.Pointer) uint32 {
- r, _, _ := syscall.SyscallN(
- i.release,
- uintptr(this),
- )
-
- return uint32(r)
-}
-
-type IUnknownImpl struct {
- vtbl *IUnknownVtbl
-}
-
-func (i *IUnknownImpl) QueryInterface(refiid *windows.GUID, ppvObject **IUnknownImpl) error {
- return i.vtbl.QueryInterface(unsafe.Pointer(i), refiid, ppvObject)
-}
-
-func (i *IUnknownImpl) AddRef() uint32 {
- return i.vtbl.AddRef(unsafe.Pointer(i))
-}
-
-func (i *IUnknownImpl) Release() uint32 {
- return i.vtbl.Release(unsafe.Pointer(i))
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/syscall.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/syscall.go
deleted file mode 100644
index 17b7f500e7d..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/syscall.go
+++ /dev/null
@@ -1,39 +0,0 @@
-//go:build windows
-
-package combridge
-
-import (
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-var (
- modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
- procGlobalAlloc = modkernel32.NewProc("GlobalAlloc")
- procGlobalFree = modkernel32.NewProc("GlobalFree")
-
- uintptrSize = unsafe.Sizeof(uintptr(0))
-)
-
-func allocUintptrObject(size int) (uintptr, []uintptr) {
- v := globalAlloc(uintptr(size) * uintptrSize)
- slice := unsafe.Slice((*uintptr)(unsafe.Pointer(v)), size)
- return v, slice
-}
-
-func globalAlloc(dwBytes uintptr) uintptr {
- ret, _, _ := procGlobalAlloc.Call(uintptr(0), dwBytes)
- if ret == 0 {
- panic("globalAlloc failed")
- }
-
- return ret
-}
-
-func globalFree(data uintptr) {
- ret, _, _ := procGlobalFree.Call(data)
- if ret != 0 {
- panic("globalFree failed")
- }
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/vtables.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/vtables.go
deleted file mode 100644
index b099a784868..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge/vtables.go
+++ /dev/null
@@ -1,147 +0,0 @@
-//go:build windows
-
-package combridge
-
-import (
- "fmt"
- "reflect"
- "sync"
-
- "golang.org/x/sys/windows"
-)
-
-var (
- vTablesL sync.Mutex
- vTables = make(map[string]*vTable)
-)
-
-// RegisterVTable registers the vtable trampoline methods for the specified ComInterface
-// TBase is the base interface of T, and must be another ComInterface which roots in IUnknown or IUnknown itself.
-// The first paramter of the fn is always the uintptr of the ComObject and the GoObject can be resolved with Resolve().
-// After having resolved the GoObject the call must be redirected to the GoObject.
-// Typically a trampoline FN looks like this.
-//
-// func _ICoreWebView2NavigationCompletedEventHandlerInvoke(this uintptr, sender *ICoreWebView2, args *ICoreWebView2NavigationCompletedEventArgs) uintptr {
-// return combridge.Resolve[_ICoreWebView2NavigationCompletedEventHandler](this).NavigationCompleted(sender, args)
-// }
-//
-// The order of registration must be in the correct order as specified in the IDL of the interface.
-func RegisterVTable[TParent, T IUnknown](guid string, fns ...interface{}) {
- registerVTableInternal[TParent, T](guid, false, fns...)
-}
-
-type vTable struct {
- Parent *vTable
-
- Name string
- ComGUID string
- ComVTable uintptr
- ComProcs []uintptr
-}
-
-func registerVTableInternal[TParent, T IUnknown](guid string, isInternal bool, fns ...interface{}) {
- vTablesL.Lock()
- defer vTablesL.Unlock()
-
- t, tName := typeInterfaceToString[T]()
- tParent, tParentName := typeInterfaceToString[TParent]()
- if !t.Implements(tParent) {
- panic(fmt.Errorf("RegisterVTable '%s': '%s' must implement '%s'", tName, tName, tParentName))
- }
-
- if !isInternal {
- if t == reflect.TypeOf((*IUnknown)(nil)).Elem() {
- panic(fmt.Errorf("RegisterVTable '%s' IUnknown can't be registered", tName))
- }
-
- if t == tParent {
- panic(fmt.Errorf("RegisterVTable '%s': T and TParent can't be the same type", tName))
- }
- }
-
- var parent *vTable
- var parentProcs []uintptr
- var parentProcsCount int
- if t != tParent {
- parent = vTables[tParentName]
- if parent == nil {
- panic(fmt.Errorf("RegisterVTable '%s': Parent VTable '%s' not registered", tName, tParentName))
- }
-
- parentProcs = parent.ComProcs
- parentProcsCount = len(parentProcs)
- }
-
- comGuid, err := windows.GUIDFromString(guid)
- if err != nil {
- panic(fmt.Errorf("RegisterVTable '%s': invalid guid: %s", tName, err))
- }
-
- vTable := &vTable{
- Parent: parent,
- Name: tName,
- ComGUID: comGuid.String(),
- }
- vTable.ComVTable, vTable.ComProcs = allocUintptrObject(parentProcsCount + len(fns))
-
- for i, proc := range parentProcs {
- vTable.ComProcs[i] = proc
- }
-
- for i, fn := range fns {
- vTable.ComProcs[parentProcsCount+i] = windows.NewCallback(fn)
- }
-
- vTables[tName] = vTable
-}
-
-func typeInterfaceToString[T any]() (reflect.Type, string) {
- t := reflect.TypeOf((*T)(nil))
- if t.Kind() != reflect.Pointer {
- panic("must be a (*yourInterfaceType)(nil)")
- }
- t = t.Elem()
- return t, t.PkgPath() + "/" + t.Name()
-}
-
-func typeInterfaceToStringOnly[T any]() string {
- _, nane := typeInterfaceToString[T]()
- return nane
-}
-
-func guidOf[T any]() string {
- vtable := vTableOf[T]()
- if vtable == nil {
- return ""
- }
- return vtable.ComGUID
-}
-
-func vTableOf[T any]() *vTable {
- name := typeInterfaceToStringOnly[T]()
- vTablesL.Lock()
- defer vTablesL.Unlock()
-
- return vTables[name]
-}
-
-type ifceImpl interface {
- impl() any
- ifce() (*vTable, error)
-}
-
-type ifceDef[T any] struct {
- objImpl any
-}
-
-func (i ifceDef[T]) impl() any {
- return i.objImpl
-}
-
-func (i ifceDef[T]) ifce() (*vTable, error) {
- vtable := vTableOf[T]()
- if vtable == nil {
- return nil, fmt.Errorf("Unable to find vTable for %s", typeInterfaceToStringOnly[T]())
- }
- return vtable, nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_COLOR.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_COLOR.go
deleted file mode 100644
index 429ecef2423..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_COLOR.go
+++ /dev/null
@@ -1,10 +0,0 @@
-//go:build windows
-
-package edge
-
-type COREWEBVIEW2_COLOR struct {
- A uint8
- R uint8
- G uint8
- B uint8
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND.go
deleted file mode 100644
index ed106ed4493..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND.go
+++ /dev/null
@@ -1,11 +0,0 @@
-//go:build windows
-
-package edge
-
-type COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND uint32
-
-const (
- COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY = iota
- COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW
- COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY_CORS
-)
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_KEY_EVENT_KIND.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_KEY_EVENT_KIND.go
deleted file mode 100644
index 607147535d1..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_KEY_EVENT_KIND.go
+++ /dev/null
@@ -1,12 +0,0 @@
-//go:build windows
-
-package edge
-
-type COREWEBVIEW2_KEY_EVENT_KIND uint32
-
-const (
- COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN = 0
- COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP = 1
- COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN = 2
- COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP = 3
-)
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_MOVE_FOCUS_REASON.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_MOVE_FOCUS_REASON.go
deleted file mode 100644
index c1679cc3726..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_MOVE_FOCUS_REASON.go
+++ /dev/null
@@ -1,11 +0,0 @@
-//go:build windows
-
-package edge
-
-type COREWEBVIEW2_MOVE_FOCUS_REASON uint32
-
-const (
- COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC = 0
- COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT = 1
- COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS = 2
-)
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_PHYSICAL_KEY_STATUS.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_PHYSICAL_KEY_STATUS.go
deleted file mode 100644
index dd883425562..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_PHYSICAL_KEY_STATUS.go
+++ /dev/null
@@ -1,12 +0,0 @@
-//go:build windows
-
-package edge
-
-type COREWEBVIEW2_PHYSICAL_KEY_STATUS struct {
- RepeatCount uint32
- ScanCode uint32
- IsExtendedKey bool
- IsMenuKeyDown bool
- WasKeyDown bool
- IsKeyReleased bool
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_PROCESS_FAILED_KIND.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_PROCESS_FAILED_KIND.go
deleted file mode 100644
index a7e9aa33985..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_PROCESS_FAILED_KIND.go
+++ /dev/null
@@ -1,49 +0,0 @@
-//go:build windows
-
-package edge
-
-type COREWEBVIEW2_PROCESS_FAILED_KIND uint32
-
-const (
- // Indicates that the browser process ended unexpectedly. The WebView
- // automatically moves to the Closed state. The app has to recreate a new
- // WebView to recover from this failure.
- COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED = 0
-
- // Indicates that the main frame's render process ended unexpectedly. A new
- // render process is created automatically and navigated to an error page.
- // You can use the `Reload` method to try to reload the page that failed.
- COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED = 1
-
- // Indicates that the main frame's render process is unresponsive.
- //
- // Note that this does not seem to work right now.
- // Does not fire for simple long running script case, the only related test
- // SitePerProcessBrowserTest::NoCommitTimeoutForInvisibleWebContents is
- // disabled.
- COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE = 2
-
- // Indicates that a frame-only render process ended unexpectedly. The process
- // exit does not affect the top-level document, only a subset of the
- // subframes within it. The content in these frames is replaced with an error
- // page in the frame.
- COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED = 3
-
- // Indicates that a utility process ended unexpectedly.
- COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED = 4
-
- // Indicates that a sandbox helper process ended unexpectedly.
- COREWEBVIEW2_PROCESS_FAILED_KIND_SANDBOX_HELPER_PROCESS_EXITED = 5
-
- // Indicates that the GPU process ended unexpectedly.
- COREWEBVIEW2_PROCESS_FAILED_KIND_GPU_PROCESS_EXITED = 6
-
- // Indicates that a PPAPI plugin process ended unexpectedly.
- COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_PLUGIN_PROCESS_EXITED = 7
-
- // Indicates that a PPAPI plugin broker process ended unexpectedly.
- COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_BROKER_PROCESS_EXITED = 8
-
- // Indicates that a process of unspecified kind ended unexpectedly.
- COREWEBVIEW2_PROCESS_FAILED_KIND_UNKNOWN_PROCESS_EXITED = 9
-)
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_WEB_RESOURCE_CONTEXT.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_WEB_RESOURCE_CONTEXT.go
deleted file mode 100644
index 2e9261d0eec..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/COREWEBVIEW2_WEB_RESOURCE_CONTEXT.go
+++ /dev/null
@@ -1,25 +0,0 @@
-//go:build windows
-
-package edge
-
-type COREWEBVIEW2_WEB_RESOURCE_CONTEXT uint32
-
-const (
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL = 0
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT = 1
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET = 2
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE = 3
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA = 4
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT = 5
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT = 6
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST = 7
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH = 8
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK = 9
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE = 10
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET = 11
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST = 12
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE = 13
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING = 14
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT = 15
- COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER = 16
-)
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2AcceleratorKeyPressedEventArgs.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2AcceleratorKeyPressedEventArgs.go
deleted file mode 100644
index 2a3a9c82311..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2AcceleratorKeyPressedEventArgs.go
+++ /dev/null
@@ -1,79 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-type _ICoreWebView2AcceleratorKeyPressedEventArgsVtbl struct {
- _IUnknownVtbl
- GetKeyEventKind ComProc
- GetVirtualKey ComProc
- GetKeyEventLParam ComProc
- GetPhysicalKeyStatus ComProc
- GetHandled ComProc
- PutHandled ComProc
-}
-
-type ICoreWebView2AcceleratorKeyPressedEventArgs struct {
- vtbl *_ICoreWebView2AcceleratorKeyPressedEventArgsVtbl
-}
-
-func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) AddRef() uintptr {
- return i.AddRef()
-}
-
-func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) GetKeyEventKind() (COREWEBVIEW2_KEY_EVENT_KIND, error) {
- var err error
- var keyEventKind COREWEBVIEW2_KEY_EVENT_KIND
- _, _, err = i.vtbl.GetKeyEventKind.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&keyEventKind)),
- )
- if err != windows.ERROR_SUCCESS {
- return 0, err
- }
- return keyEventKind, nil
-}
-
-func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) GetVirtualKey() (uint, error) {
- var err error
- var virtualKey uint
- _, _, err = i.vtbl.GetVirtualKey.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&virtualKey)),
- )
- if err != windows.ERROR_SUCCESS {
- return 0, err
- }
- return virtualKey, nil
-}
-
-func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) GetPhysicalKeyStatus() (COREWEBVIEW2_PHYSICAL_KEY_STATUS, error) {
- var err error
- var physicalKeyStatus COREWEBVIEW2_PHYSICAL_KEY_STATUS
- _, _, err = i.vtbl.GetPhysicalKeyStatus.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&physicalKeyStatus)),
- )
- if err != windows.ERROR_SUCCESS {
- return COREWEBVIEW2_PHYSICAL_KEY_STATUS{}, err
- }
- return physicalKeyStatus, nil
-}
-
-func (i *ICoreWebView2AcceleratorKeyPressedEventArgs) PutHandled(handled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutHandled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(handled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2AcceleratorKeyPressedEventHandler.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2AcceleratorKeyPressedEventHandler.go
deleted file mode 100644
index 2c276560b09..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2AcceleratorKeyPressedEventHandler.go
+++ /dev/null
@@ -1,53 +0,0 @@
-//go:build windows
-
-package edge
-
-type _ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl struct {
- _IUnknownVtbl
- Invoke ComProc
-}
-
-type ICoreWebView2AcceleratorKeyPressedEventHandler struct {
- vtbl *_ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl
- impl _ICoreWebView2AcceleratorKeyPressedEventHandlerImpl
-}
-
-func (i *ICoreWebView2AcceleratorKeyPressedEventHandler) AddRef() uintptr {
- return i.AddRef()
-}
-func _ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownQueryInterface(this *ICoreWebView2AcceleratorKeyPressedEventHandler, refiid, object uintptr) uintptr {
- return this.impl.QueryInterface(refiid, object)
-}
-
-func _ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownAddRef(this *ICoreWebView2AcceleratorKeyPressedEventHandler) uintptr {
- return this.impl.AddRef()
-}
-
-func _ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownRelease(this *ICoreWebView2AcceleratorKeyPressedEventHandler) uintptr {
- return this.impl.Release()
-}
-
-func _ICoreWebView2AcceleratorKeyPressedEventHandlerInvoke(this *ICoreWebView2AcceleratorKeyPressedEventHandler, sender *ICoreWebView2Controller, args *ICoreWebView2AcceleratorKeyPressedEventArgs) uintptr {
- return this.impl.AcceleratorKeyPressed(sender, args)
-}
-
-type _ICoreWebView2AcceleratorKeyPressedEventHandlerImpl interface {
- _IUnknownImpl
- AcceleratorKeyPressed(sender *ICoreWebView2Controller, args *ICoreWebView2AcceleratorKeyPressedEventArgs) uintptr
-}
-
-var _ICoreWebView2AcceleratorKeyPressedEventHandlerFn = _ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl{
- _IUnknownVtbl{
- NewComProc(_ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownQueryInterface),
- NewComProc(_ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownAddRef),
- NewComProc(_ICoreWebView2AcceleratorKeyPressedEventHandlerIUnknownRelease),
- },
- NewComProc(_ICoreWebView2AcceleratorKeyPressedEventHandlerInvoke),
-}
-
-func newICoreWebView2AcceleratorKeyPressedEventHandler(impl _ICoreWebView2AcceleratorKeyPressedEventHandlerImpl) *ICoreWebView2AcceleratorKeyPressedEventHandler {
- return &ICoreWebView2AcceleratorKeyPressedEventHandler{
- vtbl: &_ICoreWebView2AcceleratorKeyPressedEventHandlerFn,
- impl: impl,
- }
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2Controller.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2Controller.go
deleted file mode 100644
index c95a00ade91..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2Controller.go
+++ /dev/null
@@ -1,160 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "math"
- "unsafe"
-
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/internal/w32"
- "golang.org/x/sys/windows"
-)
-
-type _ICoreWebView2ControllerVtbl struct {
- _IUnknownVtbl
- GetIsVisible ComProc
- PutIsVisible ComProc
- GetBounds ComProc
- PutBounds ComProc
- GetZoomFactor ComProc
- PutZoomFactor ComProc
- AddZoomFactorChanged ComProc
- RemoveZoomFactorChanged ComProc
- SetBoundsAndZoomFactor ComProc
- MoveFocus ComProc
- AddMoveFocusRequested ComProc
- RemoveMoveFocusRequested ComProc
- AddGotFocus ComProc
- RemoveGotFocus ComProc
- AddLostFocus ComProc
- RemoveLostFocus ComProc
- AddAcceleratorKeyPressed ComProc
- RemoveAcceleratorKeyPressed ComProc
- GetParentWindow ComProc
- PutParentWindow ComProc
- NotifyParentWindowPositionChanged ComProc
- Close ComProc
- GetCoreWebView2 ComProc
-}
-
-type ICoreWebView2Controller struct {
- vtbl *_ICoreWebView2ControllerVtbl
-}
-
-func (i *ICoreWebView2Controller) AddRef() uintptr {
- return i.AddRef()
-}
-
-func (i *ICoreWebView2Controller) GetBounds() (*w32.Rect, error) {
- var err error
- var bounds w32.Rect
- _, _, err = i.vtbl.GetBounds.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&bounds)),
- )
- if err != windows.ERROR_SUCCESS {
- return nil, err
- }
- return &bounds, nil
-}
-
-func (i *ICoreWebView2Controller) PutBounds(bounds w32.Rect) error {
- var err error
-
- _, _, err = i.vtbl.PutBounds.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&bounds)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Controller) MoveFocus(reason COREWEBVIEW2_MOVE_FOCUS_REASON) error {
- var err error
-
- _, _, err = i.vtbl.MoveFocus.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(reason),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Controller) AddAcceleratorKeyPressed(eventHandler *ICoreWebView2AcceleratorKeyPressedEventHandler, token *_EventRegistrationToken) error {
- var err error
- _, _, err = i.vtbl.AddAcceleratorKeyPressed.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(eventHandler)),
- uintptr(unsafe.Pointer(&token)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Controller) PutIsVisible(isVisible bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsVisible.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(isVisible)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Controller) GetICoreWebView2Controller2() *ICoreWebView2Controller2 {
-
- var result *ICoreWebView2Controller2
-
- iidICoreWebView2Controller2 := NewGUID("{c979903e-d4ca-4228-92eb-47ee3fa96eab}")
- i.vtbl.QueryInterface.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(iidICoreWebView2Controller2)),
- uintptr(unsafe.Pointer(&result)))
-
- return result
-}
-
-func (i *ICoreWebView2Controller) NotifyParentWindowPositionChanged() error {
- var err error
- _, _, err = i.vtbl.NotifyParentWindowPositionChanged.Call(
- uintptr(unsafe.Pointer(i)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Controller) PutZoomFactor(zoomFactor float64) error {
- var err error
- _, _, err = i.vtbl.PutZoomFactor.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(math.Float64bits(zoomFactor)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Controller) GetZoomFactor() (float64, error) {
- var err error
- var zoomFactorUint64 uint64
- _, _, err = i.vtbl.GetZoomFactor.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&zoomFactorUint64)),
- )
- if err != windows.ERROR_SUCCESS {
- return 0.0, err
- }
- return math.Float64frombits(zoomFactorUint64), nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2Controller2.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2Controller2.go
deleted file mode 100644
index eff315a9181..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2Controller2.go
+++ /dev/null
@@ -1,75 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-type _ICoreWebView2Controller2Vtbl struct {
- _IUnknownVtbl
- GetIsVisible ComProc
- PutIsVisible ComProc
- GetBounds ComProc
- PutBounds ComProc
- GetZoomFactor ComProc
- PutZoomFactor ComProc
- AddZoomFactorChanged ComProc
- RemoveZoomFactorChanged ComProc
- SetBoundsAndZoomFactor ComProc
- MoveFocus ComProc
- AddMoveFocusRequested ComProc
- RemoveMoveFocusRequested ComProc
- AddGotFocus ComProc
- RemoveGotFocus ComProc
- AddLostFocus ComProc
- RemoveLostFocus ComProc
- AddAcceleratorKeyPressed ComProc
- RemoveAcceleratorKeyPressed ComProc
- GetParentWindow ComProc
- PutParentWindow ComProc
- NotifyParentWindowPositionChanged ComProc
- Close ComProc
- GetCoreWebView2 ComProc
- GetDefaultBackgroundColor ComProc
- PutDefaultBackgroundColor ComProc
-}
-
-type ICoreWebView2Controller2 struct {
- vtbl *_ICoreWebView2Controller2Vtbl
-}
-
-func (i *ICoreWebView2Controller2) AddRef() uintptr {
- return i.AddRef()
-}
-
-func (i *ICoreWebView2Controller2) GetDefaultBackgroundColor() (*COREWEBVIEW2_COLOR, error) {
- var err error
- var backgroundColor *COREWEBVIEW2_COLOR
- _, _, err = i.vtbl.GetDefaultBackgroundColor.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&backgroundColor)),
- )
- if err != windows.ERROR_SUCCESS {
- return nil, err
- }
- return backgroundColor, nil
-}
-
-func (i *ICoreWebView2Controller2) PutDefaultBackgroundColor(backgroundColor COREWEBVIEW2_COLOR) error {
- var err error
-
- // Cast to a uint32 as that's what the call is expecting
- col := *(*uint32)(unsafe.Pointer(&backgroundColor))
-
- _, _, err = i.vtbl.PutDefaultBackgroundColor.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(col),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2CreateCoreWebView2ControllerCompletedHandler.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2CreateCoreWebView2ControllerCompletedHandler.go
deleted file mode 100644
index c0e4d13b765..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2CreateCoreWebView2ControllerCompletedHandler.go
+++ /dev/null
@@ -1,53 +0,0 @@
-//go:build windows
-
-package edge
-
-type _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl struct {
- _IUnknownVtbl
- Invoke ComProc
-}
-
-type iCoreWebView2CreateCoreWebView2ControllerCompletedHandler struct {
- vtbl *_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl
- impl _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerImpl
-}
-
-func (i *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler) AddRef() uintptr {
- return i.AddRef()
-}
-func _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownQueryInterface(this *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler, refiid, object uintptr) uintptr {
- return this.impl.QueryInterface(refiid, object)
-}
-
-func _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownAddRef(this *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler) uintptr {
- return this.impl.AddRef()
-}
-
-func _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownRelease(this *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler) uintptr {
- return this.impl.Release()
-}
-
-func _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerInvoke(this *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler, errorCode uintptr, createdController *ICoreWebView2Controller) uintptr {
- return this.impl.CreateCoreWebView2ControllerCompleted(errorCode, createdController)
-}
-
-type _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerImpl interface {
- _IUnknownImpl
- CreateCoreWebView2ControllerCompleted(errorCode uintptr, createdController *ICoreWebView2Controller) uintptr
-}
-
-var _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerFn = _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl{
- _IUnknownVtbl{
- NewComProc(_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownQueryInterface),
- NewComProc(_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownAddRef),
- NewComProc(_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerIUnknownRelease),
- },
- NewComProc(_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerInvoke),
-}
-
-func newICoreWebView2CreateCoreWebView2ControllerCompletedHandler(impl _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerImpl) *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler {
- return &iCoreWebView2CreateCoreWebView2ControllerCompletedHandler{
- vtbl: &_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerFn,
- impl: impl,
- }
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2HttpHeadersCollectionIterator.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2HttpHeadersCollectionIterator.go
deleted file mode 100644
index 0c9eacb4672..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2HttpHeadersCollectionIterator.go
+++ /dev/null
@@ -1,78 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "syscall"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-type _ICoreWebView2HttpHeadersCollectionIteratorVtbl struct {
- _IUnknownVtbl
- GetCurrentHeader ComProc
- GetHasCurrentHeader ComProc
- MoveNext ComProc
-}
-
-type ICoreWebView2HttpHeadersCollectionIterator struct {
- vtbl *_ICoreWebView2HttpHeadersCollectionIteratorVtbl
-}
-
-func (i *ICoreWebView2HttpHeadersCollectionIterator) Release() error {
- return i.vtbl.CallRelease(unsafe.Pointer(i))
-}
-
-func (i *ICoreWebView2HttpHeadersCollectionIterator) HasCurrentHeader() (bool, error) {
- var hasHeader int32
- res, _, err := i.vtbl.GetHasCurrentHeader.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&hasHeader)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- if windows.Handle(res) != windows.S_OK {
- return false, syscall.Errno(res)
- }
- return hasHeader != 0, nil
-}
-
-func (i *ICoreWebView2HttpHeadersCollectionIterator) GetCurrentHeader() (string, string, error) {
- // Create *uint16 to hold result
- var _name *uint16
- var _value *uint16
- res, _, err := i.vtbl.GetCurrentHeader.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&_name)),
- uintptr(unsafe.Pointer(&_value)),
- )
- if err != windows.ERROR_SUCCESS {
- return "", "", err
- }
- if windows.Handle(res) != windows.S_OK {
- return "", "", syscall.Errno(res)
- }
- // Get result and cleanup
- name := windows.UTF16PtrToString(_name)
- windows.CoTaskMemFree(unsafe.Pointer(_name))
- value := windows.UTF16PtrToString(_value)
- windows.CoTaskMemFree(unsafe.Pointer(_value))
- return name, value, nil
-}
-
-func (i *ICoreWebView2HttpHeadersCollectionIterator) MoveNext() (bool, error) {
- var next int32
- res, _, err := i.vtbl.MoveNext.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&next)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- if windows.Handle(res) != windows.S_OK {
- return false, syscall.Errno(res)
- }
- return next != 0, nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2HttpRequestHeaders.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2HttpRequestHeaders.go
deleted file mode 100644
index 5a147b29935..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2HttpRequestHeaders.go
+++ /dev/null
@@ -1,101 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "syscall"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-const (
- ERROR_ELEMENT_NOT_FOUND syscall.Errno = 0x80070490
-)
-
-type _ICoreWebView2HttpRequestHeadersVtbl struct {
- _IUnknownVtbl
- GetHeader ComProc
- GetHeaders ComProc
- Contains ComProc
- SetHeader ComProc
- RemoveHeader ComProc
- GetIterator ComProc
-}
-
-type ICoreWebView2HttpRequestHeaders struct {
- vtbl *_ICoreWebView2HttpRequestHeadersVtbl
-}
-
-func (i *ICoreWebView2HttpRequestHeaders) Release() error {
- return i.vtbl.CallRelease(unsafe.Pointer(i))
-}
-
-// GetHeader returns the value of the specified header. If the header is not found
-// ERROR_ELEMENT_NOT_FOUND is returned as error.
-func (i *ICoreWebView2HttpRequestHeaders) GetHeader(name string) (string, error) {
- _name, err := windows.UTF16PtrFromString(name)
- if err != nil {
- return "", nil
- }
-
- var _value *uint16
- res, _, err := i.vtbl.GetHeader.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(_name)),
- uintptr(unsafe.Pointer(&_value)),
- )
- if err != windows.ERROR_SUCCESS {
- return "", err
- }
- if windows.Handle(res) != windows.S_OK {
- return "", syscall.Errno(res)
- }
-
- value := windows.UTF16PtrToString(_value)
- windows.CoTaskMemFree(unsafe.Pointer(_value))
- return value, nil
-}
-
-// SetHeader sets the specified header to the value.
-func (i *ICoreWebView2HttpRequestHeaders) SetHeader(name, value string) error {
- _name, err := windows.UTF16PtrFromString(name)
- if err != nil {
- return nil
- }
-
- _value, err := windows.UTF16PtrFromString(value)
- if err != nil {
- return nil
- }
-
- res, _, err := i.vtbl.SetHeader.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(_name)),
- uintptr(unsafe.Pointer(_value)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- if windows.Handle(res) != windows.S_OK {
- return syscall.Errno(res)
- }
- return nil
-}
-
-// GetIterator returns an iterator over the collection of request headers. Make sure to call
-// Release on the returned Object after finished using it.
-func (i *ICoreWebView2HttpRequestHeaders) GetIterator() (*ICoreWebView2HttpHeadersCollectionIterator, error) {
- var headers *ICoreWebView2HttpHeadersCollectionIterator
- res, _, err := i.vtbl.GetIterator.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&headers)),
- )
- if err != windows.ERROR_SUCCESS {
- return nil, err
- }
- if windows.Handle(res) != windows.S_OK {
- return nil, syscall.Errno(res)
- }
- return headers, nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2NavigationCompletedEventArgs.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2NavigationCompletedEventArgs.go
deleted file mode 100644
index c3998e0a2ed..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2NavigationCompletedEventArgs.go
+++ /dev/null
@@ -1,18 +0,0 @@
-//go:build windows
-
-package edge
-
-type _ICoreWebView2NavigationCompletedEventArgsVtbl struct {
- _IUnknownVtbl
- GetIsSuccess ComProc
- GetWebErrorStatus ComProc
- GetNavigationId ComProc
-}
-
-type ICoreWebView2NavigationCompletedEventArgs struct {
- vtbl *_ICoreWebView2NavigationCompletedEventArgsVtbl
-}
-
-func (i *ICoreWebView2NavigationCompletedEventArgs) AddRef() uintptr {
- return i.AddRef()
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2NavigationCompletedEventHandler.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2NavigationCompletedEventHandler.go
deleted file mode 100644
index 456da50743d..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2NavigationCompletedEventHandler.go
+++ /dev/null
@@ -1,53 +0,0 @@
-//go:build windows
-
-package edge
-
-type _ICoreWebView2NavigationCompletedEventHandlerVtbl struct {
- _IUnknownVtbl
- Invoke ComProc
-}
-
-type ICoreWebView2NavigationCompletedEventHandler struct {
- vtbl *_ICoreWebView2NavigationCompletedEventHandlerVtbl
- impl _ICoreWebView2NavigationCompletedEventHandlerImpl
-}
-
-func (i *ICoreWebView2NavigationCompletedEventHandler) AddRef() uintptr {
- return i.AddRef()
-}
-func _ICoreWebView2NavigationCompletedEventHandlerIUnknownQueryInterface(this *ICoreWebView2NavigationCompletedEventHandler, refiid, object uintptr) uintptr {
- return this.impl.QueryInterface(refiid, object)
-}
-
-func _ICoreWebView2NavigationCompletedEventHandlerIUnknownAddRef(this *ICoreWebView2NavigationCompletedEventHandler) uintptr {
- return this.impl.AddRef()
-}
-
-func _ICoreWebView2NavigationCompletedEventHandlerIUnknownRelease(this *ICoreWebView2NavigationCompletedEventHandler) uintptr {
- return this.impl.Release()
-}
-
-func _ICoreWebView2NavigationCompletedEventHandlerInvoke(this *ICoreWebView2NavigationCompletedEventHandler, sender *ICoreWebView2, args *ICoreWebView2NavigationCompletedEventArgs) uintptr {
- return this.impl.NavigationCompleted(sender, args)
-}
-
-type _ICoreWebView2NavigationCompletedEventHandlerImpl interface {
- _IUnknownImpl
- NavigationCompleted(sender *ICoreWebView2, args *ICoreWebView2NavigationCompletedEventArgs) uintptr
-}
-
-var _ICoreWebView2NavigationCompletedEventHandlerFn = _ICoreWebView2NavigationCompletedEventHandlerVtbl{
- _IUnknownVtbl{
- NewComProc(_ICoreWebView2NavigationCompletedEventHandlerIUnknownQueryInterface),
- NewComProc(_ICoreWebView2NavigationCompletedEventHandlerIUnknownAddRef),
- NewComProc(_ICoreWebView2NavigationCompletedEventHandlerIUnknownRelease),
- },
- NewComProc(_ICoreWebView2NavigationCompletedEventHandlerInvoke),
-}
-
-func newICoreWebView2NavigationCompletedEventHandler(impl _ICoreWebView2NavigationCompletedEventHandlerImpl) *ICoreWebView2NavigationCompletedEventHandler {
- return &ICoreWebView2NavigationCompletedEventHandler{
- vtbl: &_ICoreWebView2NavigationCompletedEventHandlerFn,
- impl: impl,
- }
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2ProcessFailedEventArgs.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2ProcessFailedEventArgs.go
deleted file mode 100644
index b6d3cda1bcd..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2ProcessFailedEventArgs.go
+++ /dev/null
@@ -1,41 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "fmt"
- "syscall"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-type _ICoreWebView2ProcessFailedEventArgsVtbl struct {
- _IUnknownVtbl
- GetProcessFailedKind ComProc
-}
-
-type ICoreWebView2ProcessFailedEventArgs struct {
- vtbl *_ICoreWebView2ProcessFailedEventArgsVtbl
-}
-
-func (i *ICoreWebView2ProcessFailedEventArgs) GetProcessFailedKind() (COREWEBVIEW2_PROCESS_FAILED_KIND, error) {
- kind := COREWEBVIEW2_PROCESS_FAILED_KIND(0xffffffff)
- hr, _, err := i.vtbl.GetProcessFailedKind.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&kind)),
- )
-
- if windows.Handle(hr) != windows.S_OK {
- return 0, syscall.Errno(hr)
- }
-
- if kind == 0xffffffff {
- if err == nil {
- err = fmt.Errorf("unknown error")
- }
- return 0, err
- }
-
- return kind, nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2ProcessFailedEventHandler.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2ProcessFailedEventHandler.go
deleted file mode 100644
index fc8c7369c2c..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2ProcessFailedEventHandler.go
+++ /dev/null
@@ -1,53 +0,0 @@
-//go:build windows
-
-package edge
-
-type _ICoreWebView2ProcessFailedEventHandlerVtbl struct {
- _IUnknownVtbl
- Invoke ComProc
-}
-
-type ICoreWebView2ProcessFailedEventHandler struct {
- vtbl *_ICoreWebView2ProcessFailedEventHandlerVtbl
- impl _ICoreWebView2ProcessFailedEventHandlerImpl
-}
-
-func (i *ICoreWebView2ProcessFailedEventHandler) AddRef() uintptr {
- return i.AddRef()
-}
-func _ICoreWebView2ProcessFailedEventHandlerIUnknownQueryInterface(this *ICoreWebView2ProcessFailedEventHandler, refiid, object uintptr) uintptr {
- return this.impl.QueryInterface(refiid, object)
-}
-
-func _ICoreWebView2ProcessFailedEventHandlerIUnknownAddRef(this *ICoreWebView2ProcessFailedEventHandler) uintptr {
- return this.impl.AddRef()
-}
-
-func _ICoreWebView2ProcessFailedEventHandlerIUnknownRelease(this *ICoreWebView2ProcessFailedEventHandler) uintptr {
- return this.impl.Release()
-}
-
-func _ICoreWebView2ProcessFailedEventHandlerInvoke(this *ICoreWebView2ProcessFailedEventHandler, sender *ICoreWebView2, args *ICoreWebView2ProcessFailedEventArgs) uintptr {
- return this.impl.ProcessFailed(sender, args)
-}
-
-type _ICoreWebView2ProcessFailedEventHandlerImpl interface {
- _IUnknownImpl
- ProcessFailed(sender *ICoreWebView2, args *ICoreWebView2ProcessFailedEventArgs) uintptr
-}
-
-var _ICoreWebView2ProcessFailedEventHandlerFn = _ICoreWebView2ProcessFailedEventHandlerVtbl{
- _IUnknownVtbl{
- NewComProc(_ICoreWebView2ProcessFailedEventHandlerIUnknownQueryInterface),
- NewComProc(_ICoreWebView2ProcessFailedEventHandlerIUnknownAddRef),
- NewComProc(_ICoreWebView2ProcessFailedEventHandlerIUnknownRelease),
- },
- NewComProc(_ICoreWebView2ProcessFailedEventHandlerInvoke),
-}
-
-func newICoreWebView2ProcessFailedEventHandler(impl _ICoreWebView2ProcessFailedEventHandlerImpl) *ICoreWebView2ProcessFailedEventHandler {
- return &ICoreWebView2ProcessFailedEventHandler{
- vtbl: &_ICoreWebView2ProcessFailedEventHandlerFn,
- impl: impl,
- }
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2Settings.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2Settings.go
deleted file mode 100644
index a4ba613d2bf..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2Settings.go
+++ /dev/null
@@ -1,271 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-type _ICoreWebView2SettingsVtbl struct {
- _IUnknownVtbl
- GetIsScriptEnabled ComProc
- PutIsScriptEnabled ComProc
- GetIsWebMessageEnabled ComProc
- PutIsWebMessageEnabled ComProc
- GetAreDefaultScriptDialogsEnabled ComProc
- PutAreDefaultScriptDialogsEnabled ComProc
- GetIsStatusBarEnabled ComProc
- PutIsStatusBarEnabled ComProc
- GetAreDevToolsEnabled ComProc
- PutAreDevToolsEnabled ComProc
- GetAreDefaultContextMenusEnabled ComProc
- PutAreDefaultContextMenusEnabled ComProc
- GetAreHostObjectsAllowed ComProc
- PutAreHostObjectsAllowed ComProc
- GetIsZoomControlEnabled ComProc
- PutIsZoomControlEnabled ComProc
- GetIsBuiltInErrorPageEnabled ComProc
- PutIsBuiltInErrorPageEnabled ComProc
-}
-
-type ICoreWebView2Settings struct {
- vtbl *_ICoreWebView2SettingsVtbl
-}
-
-func (i *ICoreWebView2Settings) AddRef() uintptr {
- return i.AddRef()
-}
-
-func (i *ICoreWebView2Settings) GetIsScriptEnabled() (bool, error) {
- var err error
- var isScriptEnabled bool
- _, _, err = i.vtbl.GetIsScriptEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&isScriptEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return isScriptEnabled, nil
-}
-
-func (i *ICoreWebView2Settings) PutIsScriptEnabled(isScriptEnabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsScriptEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(isScriptEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Settings) GetIsWebMessageEnabled() (bool, error) {
- var err error
- var isWebMessageEnabled bool
- _, _, err = i.vtbl.GetIsWebMessageEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&isWebMessageEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return isWebMessageEnabled, nil
-}
-
-func (i *ICoreWebView2Settings) PutIsWebMessageEnabled(isWebMessageEnabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsWebMessageEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(isWebMessageEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Settings) GetAreDefaultScriptDialogsEnabled() (bool, error) {
- var err error
- var areDefaultScriptDialogsEnabled bool
- _, _, err = i.vtbl.GetAreDefaultScriptDialogsEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&areDefaultScriptDialogsEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return areDefaultScriptDialogsEnabled, nil
-}
-
-func (i *ICoreWebView2Settings) PutAreDefaultScriptDialogsEnabled(areDefaultScriptDialogsEnabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutAreDefaultScriptDialogsEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(areDefaultScriptDialogsEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Settings) GetIsStatusBarEnabled() (bool, error) {
- var err error
- var isStatusBarEnabled bool
- _, _, err = i.vtbl.GetIsStatusBarEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&isStatusBarEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return isStatusBarEnabled, nil
-}
-
-func (i *ICoreWebView2Settings) PutIsStatusBarEnabled(isStatusBarEnabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsStatusBarEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(isStatusBarEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Settings) GetAreDevToolsEnabled() (bool, error) {
- var err error
- var areDevToolsEnabled bool
- _, _, err = i.vtbl.GetAreDevToolsEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&areDevToolsEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return areDevToolsEnabled, nil
-}
-
-func (i *ICoreWebView2Settings) PutAreDevToolsEnabled(areDevToolsEnabled bool) error {
- var err error
- _, _, err = i.vtbl.PutAreDevToolsEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(areDevToolsEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Settings) GetAreDefaultContextMenusEnabled() (bool, error) {
- var err error
- var enabled bool
- _, _, err = i.vtbl.GetAreDefaultContextMenusEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return enabled, nil
-}
-
-func (i *ICoreWebView2Settings) PutAreDefaultContextMenusEnabled(enabled bool) error {
- var err error
- _, _, err = i.vtbl.PutAreDefaultContextMenusEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Settings) GetAreHostObjectsAllowed() (bool, error) {
- var err error
- var allowed bool
- _, _, err = i.vtbl.GetAreHostObjectsAllowed.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&allowed)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return allowed, nil
-}
-
-func (i *ICoreWebView2Settings) PutAreHostObjectsAllowed(allowed bool) error {
- var err error
-
- _, _, err = i.vtbl.PutAreHostObjectsAllowed.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(allowed)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Settings) GetIsZoomControlEnabled() (bool, error) {
- var err error
- var enabled bool
- _, _, err = i.vtbl.GetIsZoomControlEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return enabled, nil
-}
-
-func (i *ICoreWebView2Settings) PutIsZoomControlEnabled(enabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsZoomControlEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2Settings) GetIsBuiltInErrorPageEnabled() (bool, error) {
- var err error
- var enabled bool
- _, _, err = i.vtbl.GetIsBuiltInErrorPageEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return enabled, nil
-}
-
-func (i *ICoreWebView2Settings) PutIsBuiltInErrorPageEnabled(enabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsBuiltInErrorPageEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceRequest.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceRequest.go
deleted file mode 100644
index fe7f2cfa277..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceRequest.go
+++ /dev/null
@@ -1,102 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "syscall"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-type _ICoreWebView2WebResourceRequestVtbl struct {
- _IUnknownVtbl
- GetUri ComProc
- PutUri ComProc
- GetMethod ComProc
- PutMethod ComProc
- GetContent ComProc
- PutContent ComProc
- GetHeaders ComProc
-}
-
-type ICoreWebView2WebResourceRequest struct {
- vtbl *_ICoreWebView2WebResourceRequestVtbl
-}
-
-func (i *ICoreWebView2WebResourceRequest) AddRef() uintptr {
- return i.AddRef()
-}
-
-func (i *ICoreWebView2WebResourceRequest) GetMethod() (string, error) {
- // Create *uint16 to hold result
- var _method *uint16
- res, _, err := i.vtbl.GetMethod.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&_method)),
- )
- if err != windows.ERROR_SUCCESS {
- return "", err
- }
- if windows.Handle(res) != windows.S_OK {
- return "", syscall.Errno(res)
- }
- // Get result and cleanup
- uri := windows.UTF16PtrToString(_method)
- windows.CoTaskMemFree(unsafe.Pointer(_method))
- return uri, nil
-}
-
-func (i *ICoreWebView2WebResourceRequest) GetUri() (string, error) {
- var err error
- // Create *uint16 to hold result
- var _uri *uint16
- _, _, err = i.vtbl.GetUri.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&_uri)),
- )
- if err != windows.ERROR_SUCCESS {
- return "", err
- } // Get result and cleanup
- uri := windows.UTF16PtrToString(_uri)
- windows.CoTaskMemFree(unsafe.Pointer(_uri))
- return uri, nil
-}
-
-// GetContent returns the body of the request. Returns nil if there's no body. Make sure to call
-// Release on the returned IStream after finished using it.
-func (i *ICoreWebView2WebResourceRequest) GetContent() (*IStream, error) {
- var stream *IStream
- res, _, err := i.vtbl.GetContent.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&stream)),
- )
- if err != windows.ERROR_SUCCESS {
- return nil, err
- }
- if windows.Handle(res) != windows.S_OK {
- return nil, syscall.Errno(res)
- }
- return stream, nil
-}
-
-// GetHeaders returns the mutable HTTP request headers. Make sure to call
-// Release on the returned Object after finished using it.
-func (i *ICoreWebView2WebResourceRequest) GetHeaders() (*ICoreWebView2HttpRequestHeaders, error) {
- var headers *ICoreWebView2HttpRequestHeaders
- res, _, err := i.vtbl.GetHeaders.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&headers)),
- )
- if err != windows.ERROR_SUCCESS {
- return nil, err
- }
- if windows.Handle(res) != windows.S_OK {
- return nil, syscall.Errno(res)
- }
- return headers, nil
-}
-
-func (i *ICoreWebView2WebResourceRequest) Release() error {
- return i.vtbl.CallRelease(unsafe.Pointer(i))
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceRequestedEventArgs.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceRequestedEventArgs.go
deleted file mode 100644
index 614594e878e..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceRequestedEventArgs.go
+++ /dev/null
@@ -1,52 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-type _ICoreWebView2WebResourceRequestedEventArgsVtbl struct {
- _IUnknownVtbl
- GetRequest ComProc
- GetResponse ComProc
- PutResponse ComProc
- GetDeferral ComProc
- GetResourceContext ComProc
-}
-
-type ICoreWebView2WebResourceRequestedEventArgs struct {
- vtbl *_ICoreWebView2WebResourceRequestedEventArgsVtbl
-}
-
-func (i *ICoreWebView2WebResourceRequestedEventArgs) AddRef() uintptr {
- return i.AddRef()
-}
-
-func (i *ICoreWebView2WebResourceRequestedEventArgs) PutResponse(response *ICoreWebView2WebResourceResponse) error {
- var err error
-
- _, _, err = i.vtbl.PutResponse.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(response)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2WebResourceRequestedEventArgs) GetRequest() (*ICoreWebView2WebResourceRequest, error) {
- var err error
- var request *ICoreWebView2WebResourceRequest
- _, _, err = i.vtbl.GetRequest.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&request)),
- )
- if err != windows.ERROR_SUCCESS {
- return nil, err
- }
- return request, nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceRequestedEventHandler.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceRequestedEventHandler.go
deleted file mode 100644
index d0860c3be12..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceRequestedEventHandler.go
+++ /dev/null
@@ -1,50 +0,0 @@
-//go:build windows
-
-package edge
-
-type _ICoreWebView2WebResourceRequestedEventHandlerVtbl struct {
- _IUnknownVtbl
- Invoke ComProc
-}
-
-type iCoreWebView2WebResourceRequestedEventHandler struct {
- vtbl *_ICoreWebView2WebResourceRequestedEventHandlerVtbl
- impl _ICoreWebView2WebResourceRequestedEventHandlerImpl
-}
-
-func _ICoreWebView2WebResourceRequestedEventHandlerIUnknownQueryInterface(this *iCoreWebView2WebResourceRequestedEventHandler, refiid, object uintptr) uintptr {
- return this.impl.QueryInterface(refiid, object)
-}
-
-func _ICoreWebView2WebResourceRequestedEventHandlerIUnknownAddRef(this *iCoreWebView2WebResourceRequestedEventHandler) uintptr {
- return this.impl.AddRef()
-}
-
-func _ICoreWebView2WebResourceRequestedEventHandlerIUnknownRelease(this *iCoreWebView2WebResourceRequestedEventHandler) uintptr {
- return this.impl.Release()
-}
-
-func _ICoreWebView2WebResourceRequestedEventHandlerInvoke(this *iCoreWebView2WebResourceRequestedEventHandler, sender *ICoreWebView2, args *ICoreWebView2WebResourceRequestedEventArgs) uintptr {
- return this.impl.WebResourceRequested(sender, args)
-}
-
-type _ICoreWebView2WebResourceRequestedEventHandlerImpl interface {
- _IUnknownImpl
- WebResourceRequested(sender *ICoreWebView2, args *ICoreWebView2WebResourceRequestedEventArgs) uintptr
-}
-
-var _ICoreWebView2WebResourceRequestedEventHandlerFn = _ICoreWebView2WebResourceRequestedEventHandlerVtbl{
- _IUnknownVtbl{
- NewComProc(_ICoreWebView2WebResourceRequestedEventHandlerIUnknownQueryInterface),
- NewComProc(_ICoreWebView2WebResourceRequestedEventHandlerIUnknownAddRef),
- NewComProc(_ICoreWebView2WebResourceRequestedEventHandlerIUnknownRelease),
- },
- NewComProc(_ICoreWebView2WebResourceRequestedEventHandlerInvoke),
-}
-
-func newICoreWebView2WebResourceRequestedEventHandler(impl _ICoreWebView2WebResourceRequestedEventHandlerImpl) *iCoreWebView2WebResourceRequestedEventHandler {
- return &iCoreWebView2WebResourceRequestedEventHandler{
- vtbl: &_ICoreWebView2WebResourceRequestedEventHandlerFn,
- impl: impl,
- }
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceResponse.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceResponse.go
deleted file mode 100644
index dd02e608954..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2WebResourceResponse.go
+++ /dev/null
@@ -1,28 +0,0 @@
-//go:build windows
-
-package edge
-
-import "unsafe"
-
-type _ICoreWebView2WebResourceResponseVtbl struct {
- _IUnknownVtbl
- GetContent ComProc
- PutContent ComProc
- GetHeaders ComProc
- GetStatusCode ComProc
- PutStatusCode ComProc
- GetReasonPhrase ComProc
- PutReasonPhrase ComProc
-}
-
-type ICoreWebView2WebResourceResponse struct {
- vtbl *_ICoreWebView2WebResourceResponseVtbl
-}
-
-func (i *ICoreWebView2WebResourceResponse) AddRef() uintptr {
- return i.AddRef()
-}
-
-func (i *ICoreWebView2WebResourceResponse) Release() error {
- return i.vtbl.CallRelease(unsafe.Pointer(i))
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2_2.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2_2.go
deleted file mode 100644
index 85a4f71fa26..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2_2.go
+++ /dev/null
@@ -1,18 +0,0 @@
-//go:build windows
-
-package edge
-
-type iCoreWebView2_2Vtbl struct {
- iCoreWebView2Vtbl
- AddWebResourceResponseReceived ComProc
- RemoveWebResourceResponseReceived ComProc
- NavigateWithWebResourceRequest ComProc
- AddDomContentLoaded ComProc
- RemoveDomContentLoaded ComProc
- GetCookieManager ComProc
- GetEnvironment ComProc
-}
-
-type ICoreWebView2_2 struct {
- vtbl *iCoreWebView2_2Vtbl
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2_3.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2_3.go
deleted file mode 100644
index 58424bd6a2b..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebView2_3.go
+++ /dev/null
@@ -1,62 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-type iCoreWebView2_3Vtbl struct {
- iCoreWebView2_2Vtbl
- TrySuspend ComProc
- Resume ComProc
- GetIsSuspended ComProc
- SetVirtualHostNameToFolderMapping ComProc
- ClearVirtualHostNameToFolderMapping ComProc
-}
-
-type ICoreWebView2_3 struct {
- vtbl *iCoreWebView2_3Vtbl
-}
-
-func (i *ICoreWebView2_3) SetVirtualHostNameToFolderMapping(hostName, folderPath string, accessKind COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND) error {
- _hostName, err := windows.UTF16PtrFromString(hostName)
- if err != nil {
- return err
- }
-
- _folderPath, err := windows.UTF16PtrFromString(folderPath)
- if err != nil {
- return err
- }
-
- _, _, err = i.vtbl.SetVirtualHostNameToFolderMapping.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(_hostName)),
- uintptr(unsafe.Pointer(_folderPath)),
- uintptr(accessKind),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
-
- return nil
-}
-
-func (i *ICoreWebView2) GetICoreWebView2_3() *ICoreWebView2_3 {
- var result *ICoreWebView2_3
-
- iidICoreWebView2_3 := NewGUID("{A0D6DF20-3B92-416D-AA0C-437A9C727857}")
- _, _, _ = i.vtbl.QueryInterface.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(iidICoreWebView2_3)),
- uintptr(unsafe.Pointer(&result)))
-
- return result
-}
-
-func (e *Chromium) GetICoreWebView2_3() *ICoreWebView2_3 {
- return e.webview.GetICoreWebView2_3()
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebViewSettings.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebViewSettings.go
deleted file mode 100644
index 6c6b16d7430..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/ICoreWebViewSettings.go
+++ /dev/null
@@ -1,397 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-// ICoreWebviewSettings is the merged settings class
-
-type _ICoreWebViewSettingsVtbl struct {
- _IUnknownVtbl
- GetIsScriptEnabled ComProc
- PutIsScriptEnabled ComProc
- GetIsWebMessageEnabled ComProc
- PutIsWebMessageEnabled ComProc
- GetAreDefaultScriptDialogsEnabled ComProc
- PutAreDefaultScriptDialogsEnabled ComProc
- GetIsStatusBarEnabled ComProc
- PutIsStatusBarEnabled ComProc
- GetAreDevToolsEnabled ComProc
- PutAreDevToolsEnabled ComProc
- GetAreDefaultContextMenusEnabled ComProc
- PutAreDefaultContextMenusEnabled ComProc
- GetAreHostObjectsAllowed ComProc
- PutAreHostObjectsAllowed ComProc
- GetIsZoomControlEnabled ComProc
- PutIsZoomControlEnabled ComProc
- GetIsBuiltInErrorPageEnabled ComProc
- PutIsBuiltInErrorPageEnabled ComProc
- GetUserAgent ComProc // ICoreWebView2Settings2: SDK 1.0.864.35
- PutUserAgent ComProc
- GetAreBrowserAcceleratorKeysEnabled ComProc // ICoreWebView2Settings3: SDK 1.0.864.35
- PutAreBrowserAcceleratorKeysEnabled ComProc
- GetIsPasswordAutosaveEnabled ComProc // ICoreWebView2Settings4: SDK 1.0.902.49
- PutIsPasswordAutosaveEnabled ComProc
- GetIsGeneralAutofillEnabled ComProc
- PutIsGeneralAutofillEnabled ComProc
- GetIsPinchZoomEnabled ComProc // ICoreWebView2Settings5: SDK 1.0.902.49
- PutIsPinchZoomEnabled ComProc
- GetIsSwipeNavigationEnabled ComProc // ICoreWebView2Settings6: SDK 1.0.992.28
- PutIsSwipeNavigationEnabled ComProc
-}
-
-type ICoreWebViewSettings struct {
- vtbl *_ICoreWebViewSettingsVtbl
-}
-
-func (i *ICoreWebViewSettings) AddRef() uintptr {
- return i.AddRef()
-}
-
-func (i *ICoreWebViewSettings) GetIsScriptEnabled() (bool, error) {
- var err error
- var isScriptEnabled bool
- _, _, err = i.vtbl.GetIsScriptEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&isScriptEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return isScriptEnabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutIsScriptEnabled(isScriptEnabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsScriptEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(isScriptEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetIsWebMessageEnabled() (bool, error) {
- var err error
- var isWebMessageEnabled bool
- _, _, err = i.vtbl.GetIsWebMessageEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&isWebMessageEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return isWebMessageEnabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutIsWebMessageEnabled(isWebMessageEnabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsWebMessageEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(isWebMessageEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetAreDefaultScriptDialogsEnabled() (bool, error) {
- var err error
- var areDefaultScriptDialogsEnabled bool
- _, _, err = i.vtbl.GetAreDefaultScriptDialogsEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&areDefaultScriptDialogsEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return areDefaultScriptDialogsEnabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutAreDefaultScriptDialogsEnabled(areDefaultScriptDialogsEnabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutAreDefaultScriptDialogsEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(areDefaultScriptDialogsEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetIsStatusBarEnabled() (bool, error) {
- var err error
- var isStatusBarEnabled bool
- _, _, err = i.vtbl.GetIsStatusBarEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&isStatusBarEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return isStatusBarEnabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutIsStatusBarEnabled(isStatusBarEnabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsStatusBarEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(isStatusBarEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetAreDevToolsEnabled() (bool, error) {
- var err error
- var areDevToolsEnabled bool
- _, _, err = i.vtbl.GetAreDevToolsEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&areDevToolsEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return areDevToolsEnabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutAreDevToolsEnabled(areDevToolsEnabled bool) error {
- var err error
- _, _, err = i.vtbl.PutAreDevToolsEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(areDevToolsEnabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetAreDefaultContextMenusEnabled() (bool, error) {
- var err error
- var enabled bool
- _, _, err = i.vtbl.GetAreDefaultContextMenusEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return enabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutAreDefaultContextMenusEnabled(enabled bool) error {
- var err error
- _, _, err = i.vtbl.PutAreDefaultContextMenusEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetAreHostObjectsAllowed() (bool, error) {
- var err error
- var allowed bool
- _, _, err = i.vtbl.GetAreHostObjectsAllowed.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&allowed)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return allowed, nil
-}
-
-func (i *ICoreWebViewSettings) PutAreHostObjectsAllowed(allowed bool) error {
- var err error
-
- _, _, err = i.vtbl.PutAreHostObjectsAllowed.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(allowed)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetIsZoomControlEnabled() (bool, error) {
- var err error
- var enabled bool
- _, _, err = i.vtbl.GetIsZoomControlEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return enabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutIsZoomControlEnabled(enabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsZoomControlEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetIsBuiltInErrorPageEnabled() (bool, error) {
- var err error
- var enabled bool
- _, _, err = i.vtbl.GetIsBuiltInErrorPageEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return enabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutIsBuiltInErrorPageEnabled(enabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsBuiltInErrorPageEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetUserAgent() (string, error) {
- var err error
- // Create *uint16 to hold result
- var _userAgent *uint16
- _, _, err = i.vtbl.GetUserAgent.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(_userAgent)),
- )
- if err != windows.ERROR_SUCCESS {
- return "", err
- } // Get result and cleanup
- userAgent := windows.UTF16PtrToString(_userAgent)
- windows.CoTaskMemFree(unsafe.Pointer(_userAgent))
- return userAgent, nil
-}
-
-func (i *ICoreWebViewSettings) PutUserAgent(userAgent string) error {
- var err error
- // Convert string 'userAgent' to *uint16
- _userAgent, err := windows.UTF16PtrFromString(userAgent)
- if err != nil {
- return err
- }
-
- _, _, err = i.vtbl.PutUserAgent.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(_userAgent)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetAreBrowserAcceleratorKeysEnabled() (bool, error) {
- var err error
- var enabled bool
- _, _, err = i.vtbl.GetAreBrowserAcceleratorKeysEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return enabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutAreBrowserAcceleratorKeysEnabled(enabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutAreBrowserAcceleratorKeysEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetIsPinchZoomEnabled() (bool, error) {
- var err error
- var enabled bool
- _, _, err = i.vtbl.GetIsPinchZoomEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return enabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutIsPinchZoomEnabled(enabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsPinchZoomEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebViewSettings) GetIsSwipeNavigationEnabled() (bool, error) {
- var err error
- var enabled bool
- _, _, err = i.vtbl.GetIsSwipeNavigationEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return false, err
- }
- return enabled, nil
-}
-
-func (i *ICoreWebViewSettings) PutIsSwipeNavigationEnabled(enabled bool) error {
- var err error
-
- _, _, err = i.vtbl.PutIsSwipeNavigationEnabled.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(boolToInt(enabled)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/IStream.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/IStream.go
deleted file mode 100644
index 9e29ca4f06c..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/IStream.go
+++ /dev/null
@@ -1,54 +0,0 @@
-//go:build windows
-
-package edge
-
-import (
- "io"
- "syscall"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-type _IStreamVtbl struct {
- _IUnknownVtbl
- Read ComProc
- Write ComProc
-}
-
-type IStream struct {
- vtbl *_IStreamVtbl
-}
-
-func (i *IStream) Release() error {
- return i.vtbl.CallRelease(unsafe.Pointer(i))
-}
-
-func (i *IStream) Read(p []byte) (int, error) {
- bufLen := len(p)
- if bufLen == 0 {
- return 0, nil
- }
-
- var n int
- res, _, err := i.vtbl.Read.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&p[0])),
- uintptr(bufLen),
- uintptr(unsafe.Pointer(&n)),
- )
- if err != windows.ERROR_SUCCESS {
- return 0, err
- }
-
- switch windows.Handle(res) {
- case windows.S_OK:
- // The buffer has been completely filled
- return n, nil
- case windows.S_FALSE:
- // The buffer has been filled with less than len data and the stream is EOF
- return n, io.EOF
- default:
- return 0, syscall.Errno(res)
- }
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium.go
deleted file mode 100644
index 376891bb1cf..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium.go
+++ /dev/null
@@ -1,419 +0,0 @@
-//go:build windows
-// +build windows
-
-package edge
-
-import (
- "errors"
- "log"
- "os"
- "path/filepath"
- "strings"
- "sync/atomic"
- "syscall"
- "unsafe"
-
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/internal/w32"
- "golang.org/x/sys/windows"
-)
-
-type Rect = w32.Rect
-
-type Chromium struct {
- hwnd uintptr
- controller *ICoreWebView2Controller
- webview *ICoreWebView2
- inited uintptr
- envCompleted *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler
- controllerCompleted *iCoreWebView2CreateCoreWebView2ControllerCompletedHandler
- webMessageReceived *iCoreWebView2WebMessageReceivedEventHandler
- permissionRequested *iCoreWebView2PermissionRequestedEventHandler
- webResourceRequested *iCoreWebView2WebResourceRequestedEventHandler
- acceleratorKeyPressed *ICoreWebView2AcceleratorKeyPressedEventHandler
- navigationCompleted *ICoreWebView2NavigationCompletedEventHandler
- processFailed *ICoreWebView2ProcessFailedEventHandler
-
- environment *ICoreWebView2Environment
-
- padding Rect
-
- // Settings
- Debug bool
- DataPath string
- BrowserPath string
- AdditionalBrowserArgs []string
-
- // permissions
- permissions map[CoreWebView2PermissionKind]CoreWebView2PermissionState
- globalPermission *CoreWebView2PermissionState
-
- // Callbacks
- MessageCallback func(string)
- WebResourceRequestedCallback func(request *ICoreWebView2WebResourceRequest, args *ICoreWebView2WebResourceRequestedEventArgs)
- NavigationCompletedCallback func(sender *ICoreWebView2, args *ICoreWebView2NavigationCompletedEventArgs)
- ProcessFailedCallback func(sender *ICoreWebView2, args *ICoreWebView2ProcessFailedEventArgs)
- AcceleratorKeyCallback func(uint) bool
-}
-
-func NewChromium() *Chromium {
- e := &Chromium{}
- /*
- All these handlers are passed to native code through syscalls with 'uintptr(unsafe.Pointer(handler))' and we know
- that a pointer to those will be kept in the native code. Furthermore these handlers als contain pointer to other Go
- structs like the vtable.
- This violates the unsafe.Pointer rule '(4) Conversion of a Pointer to a uintptr when calling syscall.Syscall.' because
- theres no guarantee that Go doesn't move these objects.
- AFAIK currently the Go runtime doesn't move HEAP objects, so we should be safe with these handlers. But they don't
- guarantee it, because in the future Go might use a compacting GC.
- There's a proposal to add a runtime.Pin function, to prevent moving pinned objects, which would allow to easily fix
- this issue by just pinning the handlers. The https://go-review.googlesource.com/c/go/+/367296/ should land in Go 1.19.
- */
- e.envCompleted = newICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler(e)
- e.controllerCompleted = newICoreWebView2CreateCoreWebView2ControllerCompletedHandler(e)
- e.webMessageReceived = newICoreWebView2WebMessageReceivedEventHandler(e)
- e.permissionRequested = newICoreWebView2PermissionRequestedEventHandler(e)
- e.webResourceRequested = newICoreWebView2WebResourceRequestedEventHandler(e)
- e.acceleratorKeyPressed = newICoreWebView2AcceleratorKeyPressedEventHandler(e)
- e.navigationCompleted = newICoreWebView2NavigationCompletedEventHandler(e)
- e.processFailed = newICoreWebView2ProcessFailedEventHandler(e)
- e.permissions = make(map[CoreWebView2PermissionKind]CoreWebView2PermissionState)
-
- return e
-}
-
-func (e *Chromium) Embed(hwnd uintptr) bool {
- e.hwnd = hwnd
-
- dataPath := e.DataPath
- if dataPath == "" {
- currentExePath := make([]uint16, windows.MAX_PATH)
- _, err := windows.GetModuleFileName(windows.Handle(0), ¤tExePath[0], windows.MAX_PATH)
- if err != nil {
- // What to do here?
- return false
- }
- currentExeName := filepath.Base(windows.UTF16ToString(currentExePath))
- dataPath = filepath.Join(os.Getenv("AppData"), currentExeName)
- }
-
- if e.BrowserPath != "" {
- if _, err := os.Stat(e.BrowserPath); errors.Is(err, os.ErrNotExist) {
- log.Printf("Browser path %s does not exist", e.BrowserPath)
- return false
- }
- }
-
- browserArgs := strings.Join(e.AdditionalBrowserArgs, " ")
- if err := createCoreWebView2EnvironmentWithOptions(e.BrowserPath, dataPath, e.envCompleted, browserArgs); err != nil {
- log.Printf("Error calling Webview2Loader: %v", err)
- return false
- }
-
- var msg w32.Msg
- for {
- if atomic.LoadUintptr(&e.inited) != 0 {
- break
- }
- r, _, _ := w32.User32GetMessageW.Call(
- uintptr(unsafe.Pointer(&msg)),
- 0,
- 0,
- 0,
- )
- if r == 0 {
- break
- }
- w32.User32TranslateMessage.Call(uintptr(unsafe.Pointer(&msg)))
- w32.User32DispatchMessageW.Call(uintptr(unsafe.Pointer(&msg)))
- }
- e.Init("window.external={invoke:s=>window.chrome.webview.postMessage(s)}")
- return true
-}
-
-func (e *Chromium) SetPadding(padding Rect) {
- if e.padding.Top == padding.Top && e.padding.Bottom == padding.Bottom &&
- e.padding.Left == padding.Left && e.padding.Right == padding.Right {
-
- return
- }
-
- e.padding = padding
- e.Resize()
-}
-
-func (e *Chromium) Resize() {
- if e.hwnd == 0 {
- return
- }
-
- var bounds w32.Rect
- w32.User32GetClientRect.Call(e.hwnd, uintptr(unsafe.Pointer(&bounds)))
-
- bounds.Top += e.padding.Top
- bounds.Bottom -= e.padding.Bottom
- bounds.Left += e.padding.Left
- bounds.Right -= e.padding.Right
-
- e.SetSize(bounds)
-}
-
-func (e *Chromium) Navigate(url string) {
- e.webview.vtbl.Navigate.Call(
- uintptr(unsafe.Pointer(e.webview)),
- uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(url))),
- )
-}
-
-func (e *Chromium) Init(script string) {
- e.webview.vtbl.AddScriptToExecuteOnDocumentCreated.Call(
- uintptr(unsafe.Pointer(e.webview)),
- uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(script))),
- 0,
- )
-}
-
-func (e *Chromium) Eval(script string) {
-
- _script, err := windows.UTF16PtrFromString(script)
- if err != nil {
- log.Fatal(err)
- }
-
- e.webview.vtbl.ExecuteScript.Call(
- uintptr(unsafe.Pointer(e.webview)),
- uintptr(unsafe.Pointer(_script)),
- 0,
- )
-}
-
-func (e *Chromium) Show() error {
- return e.controller.PutIsVisible(true)
-}
-
-func (e *Chromium) Hide() error {
- return e.controller.PutIsVisible(false)
-}
-
-func (e *Chromium) QueryInterface(_, _ uintptr) uintptr {
- return 0
-}
-
-func (e *Chromium) AddRef() uintptr {
- return 1
-}
-
-func (e *Chromium) Release() uintptr {
- return 1
-}
-
-func (e *Chromium) EnvironmentCompleted(res uintptr, env *ICoreWebView2Environment) uintptr {
- if int32(res) < 0 {
- log.Fatalf("Creating environment failed with %08x: %s", res, syscall.Errno(res))
- }
- env.vtbl.AddRef.Call(uintptr(unsafe.Pointer(env)))
- e.environment = env
-
- env.vtbl.CreateCoreWebView2Controller.Call(
- uintptr(unsafe.Pointer(env)),
- e.hwnd,
- uintptr(unsafe.Pointer(e.controllerCompleted)),
- )
- return 0
-}
-
-func (e *Chromium) CreateCoreWebView2ControllerCompleted(res uintptr, controller *ICoreWebView2Controller) uintptr {
- if int32(res) < 0 {
- log.Fatalf("Creating controller failed with %08x: %s", res, syscall.Errno(res))
- }
- controller.vtbl.AddRef.Call(uintptr(unsafe.Pointer(controller)))
- e.controller = controller
-
- var token _EventRegistrationToken
- controller.vtbl.GetCoreWebView2.Call(
- uintptr(unsafe.Pointer(controller)),
- uintptr(unsafe.Pointer(&e.webview)),
- )
- e.webview.vtbl.AddRef.Call(
- uintptr(unsafe.Pointer(e.webview)),
- )
- e.webview.vtbl.AddWebMessageReceived.Call(
- uintptr(unsafe.Pointer(e.webview)),
- uintptr(unsafe.Pointer(e.webMessageReceived)),
- uintptr(unsafe.Pointer(&token)),
- )
- e.webview.vtbl.AddPermissionRequested.Call(
- uintptr(unsafe.Pointer(e.webview)),
- uintptr(unsafe.Pointer(e.permissionRequested)),
- uintptr(unsafe.Pointer(&token)),
- )
- e.webview.vtbl.AddWebResourceRequested.Call(
- uintptr(unsafe.Pointer(e.webview)),
- uintptr(unsafe.Pointer(e.webResourceRequested)),
- uintptr(unsafe.Pointer(&token)),
- )
- e.webview.vtbl.AddNavigationCompleted.Call(
- uintptr(unsafe.Pointer(e.webview)),
- uintptr(unsafe.Pointer(e.navigationCompleted)),
- uintptr(unsafe.Pointer(&token)),
- )
- e.webview.vtbl.AddProcessFailed.Call(
- uintptr(unsafe.Pointer(e.webview)),
- uintptr(unsafe.Pointer(e.processFailed)),
- uintptr(unsafe.Pointer(&token)),
- )
-
- e.controller.AddAcceleratorKeyPressed(e.acceleratorKeyPressed, &token)
-
- atomic.StoreUintptr(&e.inited, 1)
-
- return 0
-}
-
-func (e *Chromium) MessageReceived(sender *ICoreWebView2, args *iCoreWebView2WebMessageReceivedEventArgs) uintptr {
- var message *uint16
- args.vtbl.TryGetWebMessageAsString.Call(
- uintptr(unsafe.Pointer(args)),
- uintptr(unsafe.Pointer(&message)),
- )
- if e.MessageCallback != nil {
- e.MessageCallback(w32.Utf16PtrToString(message))
- }
- sender.vtbl.PostWebMessageAsString.Call(
- uintptr(unsafe.Pointer(sender)),
- uintptr(unsafe.Pointer(message)),
- )
- windows.CoTaskMemFree(unsafe.Pointer(message))
- return 0
-}
-
-func (e *Chromium) SetPermission(kind CoreWebView2PermissionKind, state CoreWebView2PermissionState) {
- e.permissions[kind] = state
-}
-
-func (e *Chromium) SetGlobalPermission(state CoreWebView2PermissionState) {
- e.globalPermission = &state
-}
-
-func (e *Chromium) PermissionRequested(_ *ICoreWebView2, args *iCoreWebView2PermissionRequestedEventArgs) uintptr {
- var kind CoreWebView2PermissionKind
- args.vtbl.GetPermissionKind.Call(
- uintptr(unsafe.Pointer(args)),
- uintptr(kind),
- )
- var result CoreWebView2PermissionState
- if e.globalPermission != nil {
- result = *e.globalPermission
- } else {
- var ok bool
- result, ok = e.permissions[kind]
- if !ok {
- result = CoreWebView2PermissionStateDefault
- }
- }
- args.vtbl.PutState.Call(
- uintptr(unsafe.Pointer(args)),
- uintptr(result),
- )
- return 0
-}
-
-func (e *Chromium) WebResourceRequested(sender *ICoreWebView2, args *ICoreWebView2WebResourceRequestedEventArgs) uintptr {
- req, err := args.GetRequest()
- if err != nil {
- log.Fatal(err)
- }
- defer req.Release()
-
- if e.WebResourceRequestedCallback != nil {
- e.WebResourceRequestedCallback(req, args)
- }
- return 0
-}
-
-func (e *Chromium) AddWebResourceRequestedFilter(filter string, ctx COREWEBVIEW2_WEB_RESOURCE_CONTEXT) {
- err := e.webview.AddWebResourceRequestedFilter(filter, ctx)
- if err != nil {
- log.Fatal(err)
- }
-}
-
-func (e *Chromium) Environment() *ICoreWebView2Environment {
- return e.environment
-}
-
-// AcceleratorKeyPressed is called when an accelerator key is pressed.
-// If the AcceleratorKeyCallback method has been set, it will defer handling of the keypress
-// to the callback. That callback returns a bool indicating if the event was handled.
-func (e *Chromium) AcceleratorKeyPressed(sender *ICoreWebView2Controller, args *ICoreWebView2AcceleratorKeyPressedEventArgs) uintptr {
- if e.AcceleratorKeyCallback == nil {
- return 0
- }
- eventKind, _ := args.GetKeyEventKind()
- if eventKind == COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN ||
- eventKind == COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN {
- virtualKey, _ := args.GetVirtualKey()
- status, _ := args.GetPhysicalKeyStatus()
- if !status.WasKeyDown {
- args.PutHandled(e.AcceleratorKeyCallback(virtualKey))
- return 0
- }
- }
- args.PutHandled(false)
- return 0
-}
-
-func (e *Chromium) GetSettings() (*ICoreWebViewSettings, error) {
- return e.webview.GetSettings()
-}
-
-func (e *Chromium) GetController() *ICoreWebView2Controller {
- return e.controller
-}
-
-func boolToInt(input bool) int {
- if input {
- return 1
- }
- return 0
-}
-
-func (e *Chromium) NavigationCompleted(sender *ICoreWebView2, args *ICoreWebView2NavigationCompletedEventArgs) uintptr {
- if e.NavigationCompletedCallback != nil {
- e.NavigationCompletedCallback(sender, args)
- }
- return 0
-}
-
-func (e *Chromium) ProcessFailed(sender *ICoreWebView2, args *ICoreWebView2ProcessFailedEventArgs) uintptr {
- if e.ProcessFailedCallback != nil {
- e.ProcessFailedCallback(sender, args)
- }
- return 0
-}
-
-func (e *Chromium) NotifyParentWindowPositionChanged() error {
- //It looks like the wndproc function is called before the controller initialization is complete.
- //Because of this the controller is nil
- if e.controller == nil {
- return nil
- }
- return e.controller.NotifyParentWindowPositionChanged()
-}
-
-func (e *Chromium) Focus() {
- err := e.controller.MoveFocus(COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC)
- if err != nil {
- log.Fatal(err)
- }
-}
-
-func (e *Chromium) PutZoomFactor(zoomFactor float64) {
- err := e.controller.PutZoomFactor(zoomFactor)
- if err != nil {
- log.Fatal(err)
- }
-}
-
-func (e *Chromium) OpenDevToolsWindow() {
- e.webview.OpenDevToolsWindow()
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium_386.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium_386.go
deleted file mode 100644
index 00f6f42fbee..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium_386.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build windows
-// +build windows
-
-package edge
-
-import (
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/internal/w32"
- "unsafe"
-)
-
-func (e *Chromium) SetSize(bounds w32.Rect) {
- if e.controller == nil {
- return
- }
-
- e.controller.vtbl.PutBounds.Call(
- uintptr(unsafe.Pointer(e.controller)),
- uintptr(bounds.Left),
- uintptr(bounds.Top),
- uintptr(bounds.Right),
- uintptr(bounds.Bottom),
- )
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium_amd64.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium_amd64.go
deleted file mode 100644
index 858b93f17fa..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium_amd64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-//go:build windows
-// +build windows
-
-package edge
-
-import (
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/internal/w32"
- "unsafe"
-)
-
-func (e *Chromium) SetSize(bounds w32.Rect) {
- if e.controller == nil {
- return
- }
-
- e.controller.vtbl.PutBounds.Call(
- uintptr(unsafe.Pointer(e.controller)),
- uintptr(unsafe.Pointer(&bounds)),
- )
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium_arm64.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium_arm64.go
deleted file mode 100644
index b237792e4b3..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/chromium_arm64.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build windows
-// +build windows
-
-package edge
-
-import (
- "unsafe"
-
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/internal/w32"
-)
-
-func (e *Chromium) SetSize(bounds w32.Rect) {
- if e.controller == nil {
- return
- }
-
- words := (*[2]uintptr)(unsafe.Pointer(&bounds))
- e.controller.vtbl.PutBounds.Call(
- uintptr(unsafe.Pointer(e.controller)),
- words[0],
- words[1],
- )
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/corewebview2.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/corewebview2.go
deleted file mode 100644
index 6f1afbd87e7..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/corewebview2.go
+++ /dev/null
@@ -1,503 +0,0 @@
-//go:build windows
-// +build windows
-
-package edge
-
-import (
- "fmt"
- "log"
- "runtime"
- "syscall"
- "unsafe"
-
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/internal/w32"
-
- "golang.org/x/sys/windows"
-)
-
-func init() {
- runtime.LockOSThread()
-
- r, _, _ := w32.Ole32CoInitializeEx.Call(0, 2)
- if int(r) < 0 {
- log.Printf("Warning: CoInitializeEx call failed: E=%08x", r)
- }
-}
-
-type _EventRegistrationToken struct {
- value int64
-}
-
-type CoreWebView2PermissionKind uint32
-
-const (
- CoreWebView2PermissionKindUnknownPermission CoreWebView2PermissionKind = iota
- CoreWebView2PermissionKindMicrophone
- CoreWebView2PermissionKindCamera
- CoreWebView2PermissionKindGeolocation
- CoreWebView2PermissionKindNotifications
- CoreWebView2PermissionKindOtherSensors
- CoreWebView2PermissionKindClipboardRead
-)
-
-type CoreWebView2PermissionState uint32
-
-const (
- CoreWebView2PermissionStateDefault CoreWebView2PermissionState = iota
- CoreWebView2PermissionStateAllow
- CoreWebView2PermissionStateDeny
-)
-
-// ComProc stores a COM procedure.
-type ComProc uintptr
-
-// NewComProc creates a new COM proc from a Go function.
-func NewComProc(fn interface{}) ComProc {
- return ComProc(windows.NewCallback(fn))
-}
-
-// Call calls a COM procedure.
-//
-//go:uintptrescapes
-func (p ComProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
- // The magic uintptrescapes comment is needed to prevent moving uintptr(unsafe.Pointer(p)) so calls to .Call() also
- // satisfy the unsafe.Pointer rule "(4) Conversion of a Pointer to a uintptr when calling syscall.Syscall."
- // Otherwise it might be that pointers get moved, especially pointer onto the Go stack which might grow dynamically.
- // See https://pkg.go.dev/unsafe#Pointer and https://github.com/golang/go/issues/34474
- switch len(a) {
- case 0:
- return syscall.Syscall(uintptr(p), 0, 0, 0, 0)
- case 1:
- return syscall.Syscall(uintptr(p), 1, a[0], 0, 0)
- case 2:
- return syscall.Syscall(uintptr(p), 2, a[0], a[1], 0)
- case 3:
- return syscall.Syscall(uintptr(p), 3, a[0], a[1], a[2])
- case 4:
- return syscall.Syscall6(uintptr(p), 4, a[0], a[1], a[2], a[3], 0, 0)
- case 5:
- return syscall.Syscall6(uintptr(p), 5, a[0], a[1], a[2], a[3], a[4], 0)
- case 6:
- return syscall.Syscall6(uintptr(p), 6, a[0], a[1], a[2], a[3], a[4], a[5])
- case 7:
- return syscall.Syscall9(uintptr(p), 7, a[0], a[1], a[2], a[3], a[4], a[5], a[6], 0, 0)
- case 8:
- return syscall.Syscall9(uintptr(p), 8, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], 0)
- case 9:
- return syscall.Syscall9(uintptr(p), 9, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8])
- case 10:
- return syscall.Syscall12(uintptr(p), 10, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], 0, 0)
- case 11:
- return syscall.Syscall12(uintptr(p), 11, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], 0)
- case 12:
- return syscall.Syscall12(uintptr(p), 12, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11])
- case 13:
- return syscall.Syscall15(uintptr(p), 13, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], 0, 0)
- case 14:
- return syscall.Syscall15(uintptr(p), 14, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], 0)
- case 15:
- return syscall.Syscall15(uintptr(p), 15, a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14])
- default:
- panic("too many arguments")
- }
-}
-
-// IUnknown
-
-type _IUnknownVtbl struct {
- QueryInterface ComProc
- AddRef ComProc
- Release ComProc
-}
-
-func (i *_IUnknownVtbl) CallRelease(this unsafe.Pointer) error {
- _, _, err := i.Release.Call(
- uintptr(this),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-type _IUnknownImpl interface {
- QueryInterface(refiid, object uintptr) uintptr
- AddRef() uintptr
- Release() uintptr
-}
-
-// ICoreWebView2
-
-type iCoreWebView2Vtbl struct {
- _IUnknownVtbl
- GetSettings ComProc
- GetSource ComProc
- Navigate ComProc
- NavigateToString ComProc
- AddNavigationStarting ComProc
- RemoveNavigationStarting ComProc
- AddContentLoading ComProc
- RemoveContentLoading ComProc
- AddSourceChanged ComProc
- RemoveSourceChanged ComProc
- AddHistoryChanged ComProc
- RemoveHistoryChanged ComProc
- AddNavigationCompleted ComProc
- RemoveNavigationCompleted ComProc
- AddFrameNavigationStarting ComProc
- RemoveFrameNavigationStarting ComProc
- AddFrameNavigationCompleted ComProc
- RemoveFrameNavigationCompleted ComProc
- AddScriptDialogOpening ComProc
- RemoveScriptDialogOpening ComProc
- AddPermissionRequested ComProc
- RemovePermissionRequested ComProc
- AddProcessFailed ComProc
- RemoveProcessFailed ComProc
- AddScriptToExecuteOnDocumentCreated ComProc
- RemoveScriptToExecuteOnDocumentCreated ComProc
- ExecuteScript ComProc
- CapturePreview ComProc
- Reload ComProc
- PostWebMessageAsJSON ComProc
- PostWebMessageAsString ComProc
- AddWebMessageReceived ComProc
- RemoveWebMessageReceived ComProc
- CallDevToolsProtocolMethod ComProc
- GetBrowserProcessID ComProc
- GetCanGoBack ComProc
- GetCanGoForward ComProc
- GoBack ComProc
- GoForward ComProc
- GetDevToolsProtocolEventReceiver ComProc
- Stop ComProc
- AddNewWindowRequested ComProc
- RemoveNewWindowRequested ComProc
- AddDocumentTitleChanged ComProc
- RemoveDocumentTitleChanged ComProc
- GetDocumentTitle ComProc
- AddHostObjectToScript ComProc
- RemoveHostObjectFromScript ComProc
- OpenDevToolsWindow ComProc
- AddContainsFullScreenElementChanged ComProc
- RemoveContainsFullScreenElementChanged ComProc
- GetContainsFullScreenElement ComProc
- AddWebResourceRequested ComProc
- RemoveWebResourceRequested ComProc
- AddWebResourceRequestedFilter ComProc
- RemoveWebResourceRequestedFilter ComProc
- AddWindowCloseRequested ComProc
- RemoveWindowCloseRequested ComProc
-}
-
-type ICoreWebView2 struct {
- vtbl *iCoreWebView2Vtbl
-}
-
-func (i *ICoreWebView2) GetSettings() (*ICoreWebViewSettings, error) {
- var err error
- var settings *ICoreWebViewSettings
- _, _, err = i.vtbl.GetSettings.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(&settings)),
- )
- if err != windows.ERROR_SUCCESS {
- return nil, err
- }
- return settings, nil
-}
-
-// ICoreWebView2Environment
-
-type iCoreWebView2EnvironmentVtbl struct {
- _IUnknownVtbl
- CreateCoreWebView2Controller ComProc
- CreateWebResourceResponse ComProc
- GetBrowserVersionString ComProc
- AddNewBrowserVersionAvailable ComProc
- RemoveNewBrowserVersionAvailable ComProc
-}
-
-type ICoreWebView2Environment struct {
- vtbl *iCoreWebView2EnvironmentVtbl
-}
-
-// CreateWebResourceResponse creates a new ICoreWebView2WebResourceResponse, it must be released after finishing using it.
-func (e *ICoreWebView2Environment) CreateWebResourceResponse(content []byte, statusCode int, reasonPhrase string, headers string) (*ICoreWebView2WebResourceResponse, error) {
- var err error
- var stream uintptr
-
- if len(content) > 0 {
- // Create stream for response
- stream, err = w32.SHCreateMemStream(content)
- if err != nil {
- return nil, err
- }
-
- // Release the IStream after we are finished, CreateWebResourceResponse Call will increase the reference
- // count on IStream and therefore it won't be freed until the reference count of the response is 0.
- defer (*IStream)(unsafe.Pointer(stream)).Release()
- }
-
- // Convert string 'uri' to *uint16
- _reason, err := windows.UTF16PtrFromString(reasonPhrase)
- if err != nil {
- return nil, err
- }
- // Convert string 'uri' to *uint16
- _headers, err := windows.UTF16PtrFromString(headers)
- if err != nil {
- return nil, err
- }
- var response *ICoreWebView2WebResourceResponse
- hr, _, err := e.vtbl.CreateWebResourceResponse.Call(
- uintptr(unsafe.Pointer(e)),
- stream,
- uintptr(statusCode),
- uintptr(unsafe.Pointer(_reason)),
- uintptr(unsafe.Pointer(_headers)),
- uintptr(unsafe.Pointer(&response)),
- )
- if windows.Handle(hr) != windows.S_OK {
- return nil, syscall.Errno(hr)
- }
-
- if response == nil {
- if err == nil {
- err = fmt.Errorf("unknown error")
- }
- return nil, err
- }
- return response, nil
-
-}
-
-// ICoreWebView2WebMessageReceivedEventArgs
-
-type iCoreWebView2WebMessageReceivedEventArgsVtbl struct {
- _IUnknownVtbl
- GetSource ComProc
- GetWebMessageAsJSON ComProc
- TryGetWebMessageAsString ComProc
-}
-
-type iCoreWebView2WebMessageReceivedEventArgs struct {
- vtbl *iCoreWebView2WebMessageReceivedEventArgsVtbl
-}
-
-// ICoreWebView2PermissionRequestedEventArgs
-
-type iCoreWebView2PermissionRequestedEventArgsVtbl struct {
- _IUnknownVtbl
- GetURI ComProc
- GetPermissionKind ComProc
- GetIsUserInitiated ComProc
- GetState ComProc
- PutState ComProc
- GetDeferral ComProc
-}
-
-type iCoreWebView2PermissionRequestedEventArgs struct {
- vtbl *iCoreWebView2PermissionRequestedEventArgsVtbl
-}
-
-// ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler
-
-type iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerImpl interface {
- _IUnknownImpl
- EnvironmentCompleted(res uintptr, env *ICoreWebView2Environment) uintptr
-}
-
-type iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl struct {
- _IUnknownVtbl
- Invoke ComProc
-}
-
-type iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler struct {
- vtbl *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl
- impl iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerImpl
-}
-
-func _ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerIUnknownQueryInterface(this *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, refiid, object uintptr) uintptr {
- return this.impl.QueryInterface(refiid, object)
-}
-
-func _ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerIUnknownAddRef(this *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler) uintptr {
- return this.impl.AddRef()
-}
-
-func _ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerIUnknownRelease(this *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler) uintptr {
- return this.impl.Release()
-}
-
-func _ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerInvoke(this *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, res uintptr, env *ICoreWebView2Environment) uintptr {
- return this.impl.EnvironmentCompleted(res, env)
-}
-
-var iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerFn = iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl{
- _IUnknownVtbl{
- NewComProc(_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerIUnknownQueryInterface),
- NewComProc(_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerIUnknownAddRef),
- NewComProc(_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerIUnknownRelease),
- },
- NewComProc(_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerInvoke),
-}
-
-func newICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler(impl iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerImpl) *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {
- return &iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler{
- vtbl: &iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerFn,
- impl: impl,
- }
-}
-
-// ICoreWebView2WebMessageReceivedEventHandler
-
-type iCoreWebView2WebMessageReceivedEventHandlerImpl interface {
- _IUnknownImpl
- MessageReceived(sender *ICoreWebView2, args *iCoreWebView2WebMessageReceivedEventArgs) uintptr
-}
-
-type iCoreWebView2WebMessageReceivedEventHandlerVtbl struct {
- _IUnknownVtbl
- Invoke ComProc
-}
-
-type iCoreWebView2WebMessageReceivedEventHandler struct {
- vtbl *iCoreWebView2WebMessageReceivedEventHandlerVtbl
- impl iCoreWebView2WebMessageReceivedEventHandlerImpl
-}
-
-func _ICoreWebView2WebMessageReceivedEventHandlerIUnknownQueryInterface(this *iCoreWebView2WebMessageReceivedEventHandler, refiid, object uintptr) uintptr {
- return this.impl.QueryInterface(refiid, object)
-}
-
-func _ICoreWebView2WebMessageReceivedEventHandlerIUnknownAddRef(this *iCoreWebView2WebMessageReceivedEventHandler) uintptr {
- return this.impl.AddRef()
-}
-
-func _ICoreWebView2WebMessageReceivedEventHandlerIUnknownRelease(this *iCoreWebView2WebMessageReceivedEventHandler) uintptr {
- return this.impl.Release()
-}
-
-func _ICoreWebView2WebMessageReceivedEventHandlerInvoke(this *iCoreWebView2WebMessageReceivedEventHandler, sender *ICoreWebView2, args *iCoreWebView2WebMessageReceivedEventArgs) uintptr {
- return this.impl.MessageReceived(sender, args)
-}
-
-var iCoreWebView2WebMessageReceivedEventHandlerFn = iCoreWebView2WebMessageReceivedEventHandlerVtbl{
- _IUnknownVtbl{
- NewComProc(_ICoreWebView2WebMessageReceivedEventHandlerIUnknownQueryInterface),
- NewComProc(_ICoreWebView2WebMessageReceivedEventHandlerIUnknownAddRef),
- NewComProc(_ICoreWebView2WebMessageReceivedEventHandlerIUnknownRelease),
- },
- NewComProc(_ICoreWebView2WebMessageReceivedEventHandlerInvoke),
-}
-
-func newICoreWebView2WebMessageReceivedEventHandler(impl iCoreWebView2WebMessageReceivedEventHandlerImpl) *iCoreWebView2WebMessageReceivedEventHandler {
- return &iCoreWebView2WebMessageReceivedEventHandler{
- vtbl: &iCoreWebView2WebMessageReceivedEventHandlerFn,
- impl: impl,
- }
-}
-
-// ICoreWebView2PermissionRequestedEventHandler
-
-type iCoreWebView2PermissionRequestedEventHandlerImpl interface {
- _IUnknownImpl
- PermissionRequested(sender *ICoreWebView2, args *iCoreWebView2PermissionRequestedEventArgs) uintptr
-}
-
-type iCoreWebView2PermissionRequestedEventHandlerVtbl struct {
- _IUnknownVtbl
- Invoke ComProc
-}
-
-type iCoreWebView2PermissionRequestedEventHandler struct {
- vtbl *iCoreWebView2PermissionRequestedEventHandlerVtbl
- impl iCoreWebView2PermissionRequestedEventHandlerImpl
-}
-
-func _ICoreWebView2PermissionRequestedEventHandlerIUnknownQueryInterface(this *iCoreWebView2PermissionRequestedEventHandler, refiid, object uintptr) uintptr {
- return this.impl.QueryInterface(refiid, object)
-}
-
-func _ICoreWebView2PermissionRequestedEventHandlerIUnknownAddRef(this *iCoreWebView2PermissionRequestedEventHandler) uintptr {
- return this.impl.AddRef()
-}
-
-func _ICoreWebView2PermissionRequestedEventHandlerIUnknownRelease(this *iCoreWebView2PermissionRequestedEventHandler) uintptr {
- return this.impl.Release()
-}
-
-func _ICoreWebView2PermissionRequestedEventHandlerInvoke(this *iCoreWebView2PermissionRequestedEventHandler, sender *ICoreWebView2, args *iCoreWebView2PermissionRequestedEventArgs) uintptr {
- return this.impl.PermissionRequested(sender, args)
-}
-
-var iCoreWebView2PermissionRequestedEventHandlerFn = iCoreWebView2PermissionRequestedEventHandlerVtbl{
- _IUnknownVtbl{
- NewComProc(_ICoreWebView2PermissionRequestedEventHandlerIUnknownQueryInterface),
- NewComProc(_ICoreWebView2PermissionRequestedEventHandlerIUnknownAddRef),
- NewComProc(_ICoreWebView2PermissionRequestedEventHandlerIUnknownRelease),
- },
- NewComProc(_ICoreWebView2PermissionRequestedEventHandlerInvoke),
-}
-
-func newICoreWebView2PermissionRequestedEventHandler(impl iCoreWebView2PermissionRequestedEventHandlerImpl) *iCoreWebView2PermissionRequestedEventHandler {
- return &iCoreWebView2PermissionRequestedEventHandler{
- vtbl: &iCoreWebView2PermissionRequestedEventHandlerFn,
- impl: impl,
- }
-}
-
-func (i *ICoreWebView2) AddWebResourceRequestedFilter(uri string, resourceContext COREWEBVIEW2_WEB_RESOURCE_CONTEXT) error {
- var err error
- // Convert string 'uri' to *uint16
- _uri, err := windows.UTF16PtrFromString(uri)
- if err != nil {
- return err
- }
- _, _, err = i.vtbl.AddWebResourceRequestedFilter.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(_uri)),
- uintptr(resourceContext),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-func (i *ICoreWebView2) AddNavigationCompleted(eventHandler *ICoreWebView2NavigationCompletedEventHandler, token *_EventRegistrationToken) error {
- var err error
- _, _, err = i.vtbl.AddNavigationCompleted.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(eventHandler)),
- uintptr(unsafe.Pointer(&token)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2) AddProcessFailed(eventHandler *ICoreWebView2ProcessFailedEventHandler, token *_EventRegistrationToken) error {
- var err error
- _, _, err = i.vtbl.AddProcessFailed.Call(
- uintptr(unsafe.Pointer(i)),
- uintptr(unsafe.Pointer(eventHandler)),
- uintptr(unsafe.Pointer(&token)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
-
-func (i *ICoreWebView2) OpenDevToolsWindow() error {
- var err error
- _, _, err = i.vtbl.OpenDevToolsWindow.Call(
- uintptr(unsafe.Pointer(i)),
- )
- if err != windows.ERROR_SUCCESS {
- return err
- }
- return nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/create_env_go.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/create_env_go.go
deleted file mode 100644
index a3b7374cace..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/create_env_go.go
+++ /dev/null
@@ -1,29 +0,0 @@
-//go:build windows && !native_webview2loader
-
-package edge
-
-import (
- "unsafe"
-
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/webviewloader"
-)
-
-func createCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataFolder string, environmentCompletedHandle *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, additionalBrowserArgs string) error {
- e := &environmentCreatedHandler{environmentCompletedHandle}
- return webviewloader.CreateCoreWebView2EnvironmentWithOptions(
- e,
- webviewloader.WithBrowserExecutableFolder(browserExecutableFolder),
- webviewloader.WithUserDataFolder(userDataFolder),
- webviewloader.WithAdditionalBrowserArguments(additionalBrowserArgs),
- )
-}
-
-type environmentCreatedHandler struct {
- originalHandler *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler
-}
-
-func (r *environmentCreatedHandler) EnvironmentCompleted(errorCode webviewloader.HRESULT, createdEnvironment *webviewloader.ICoreWebView2Environment) webviewloader.HRESULT {
- env := (*ICoreWebView2Environment)(unsafe.Pointer(createdEnvironment))
- res := r.originalHandler.impl.EnvironmentCompleted(uintptr(errorCode), env)
- return webviewloader.HRESULT(res)
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/create_env_native.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/create_env_native.go
deleted file mode 100644
index 9b4f02bfd0d..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/create_env_native.go
+++ /dev/null
@@ -1,41 +0,0 @@
-//go:build windows && native_webview2loader
-
-package edge
-
-import (
- "fmt"
- "syscall"
- "unsafe"
-
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/webviewloader"
-
- "golang.org/x/sys/windows"
-)
-
-func createCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataFolder string, environmentCompletedHandle *iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, additionalBrowserArgs string) error {
- browserPathPtr, err := windows.UTF16PtrFromString(browserExecutableFolder)
- if err != nil {
- return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", browserExecutableFolder, err)
- }
-
- userPathPtr, err := windows.UTF16PtrFromString(userDataFolder)
- if err != nil {
- return fmt.Errorf("Error calling UTF16PtrFromString for %s: %v", userDataFolder, err)
- }
-
- hr, err := webviewloader.CreateCoreWebView2EnvironmentWithOptions(
- browserPathPtr,
- userPathPtr,
- uintptr(unsafe.Pointer(environmentCompletedHandle)),
- additionalBrowserArgs,
- )
-
- if hr != 0 {
- if err == nil || err == windows.ERROR_SUCCESS {
- err = syscall.Errno(hr)
- }
- return err
- }
-
- return nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/guid.go b/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/guid.go
deleted file mode 100644
index 007e60586be..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge/guid.go
+++ /dev/null
@@ -1,225 +0,0 @@
-//go:build windows
-
-package edge
-
-// This code has been adapted from: https://github.com/go-ole/go-ole
-
-/*
-
-The MIT License (MIT)
-
-Copyright © 2013-2017 Yasuhiro Matsumoto,
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the “Software”), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-*/
-
-const hextable = "0123456789ABCDEF"
-const emptyGUID = "{00000000-0000-0000-0000-000000000000}"
-
-// GUID is Windows API specific GUID type.
-//
-// This exists to match Windows GUID type for direct passing for COM.
-// Format is in xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx.
-type GUID struct {
- Data1 uint32
- Data2 uint16
- Data3 uint16
- Data4 [8]byte
-}
-
-// NewGUID converts the given string into a globally unique identifier that is
-// compliant with the Windows API.
-//
-// The supplied string may be in any of these formats:
-//
-// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-// XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
-// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
-//
-// The conversion of the supplied string is not case-sensitive.
-func NewGUID(guid string) *GUID {
- d := []byte(guid)
- var d1, d2, d3, d4a, d4b []byte
-
- switch len(d) {
- case 38:
- if d[0] != '{' || d[37] != '}' {
- return nil
- }
- d = d[1:37]
- fallthrough
- case 36:
- if d[8] != '-' || d[13] != '-' || d[18] != '-' || d[23] != '-' {
- return nil
- }
- d1 = d[0:8]
- d2 = d[9:13]
- d3 = d[14:18]
- d4a = d[19:23]
- d4b = d[24:36]
- case 32:
- d1 = d[0:8]
- d2 = d[8:12]
- d3 = d[12:16]
- d4a = d[16:20]
- d4b = d[20:32]
- default:
- return nil
- }
-
- var g GUID
- var ok1, ok2, ok3, ok4 bool
- g.Data1, ok1 = decodeHexUint32(d1)
- g.Data2, ok2 = decodeHexUint16(d2)
- g.Data3, ok3 = decodeHexUint16(d3)
- g.Data4, ok4 = decodeHexByte64(d4a, d4b)
- if ok1 && ok2 && ok3 && ok4 {
- return &g
- }
- return nil
-}
-
-func decodeHexUint32(src []byte) (value uint32, ok bool) {
- var b1, b2, b3, b4 byte
- var ok1, ok2, ok3, ok4 bool
- b1, ok1 = decodeHexByte(src[0], src[1])
- b2, ok2 = decodeHexByte(src[2], src[3])
- b3, ok3 = decodeHexByte(src[4], src[5])
- b4, ok4 = decodeHexByte(src[6], src[7])
- value = (uint32(b1) << 24) | (uint32(b2) << 16) | (uint32(b3) << 8) | uint32(b4)
- ok = ok1 && ok2 && ok3 && ok4
- return
-}
-
-func decodeHexUint16(src []byte) (value uint16, ok bool) {
- var b1, b2 byte
- var ok1, ok2 bool
- b1, ok1 = decodeHexByte(src[0], src[1])
- b2, ok2 = decodeHexByte(src[2], src[3])
- value = (uint16(b1) << 8) | uint16(b2)
- ok = ok1 && ok2
- return
-}
-
-func decodeHexByte64(s1 []byte, s2 []byte) (value [8]byte, ok bool) {
- var ok1, ok2, ok3, ok4, ok5, ok6, ok7, ok8 bool
- value[0], ok1 = decodeHexByte(s1[0], s1[1])
- value[1], ok2 = decodeHexByte(s1[2], s1[3])
- value[2], ok3 = decodeHexByte(s2[0], s2[1])
- value[3], ok4 = decodeHexByte(s2[2], s2[3])
- value[4], ok5 = decodeHexByte(s2[4], s2[5])
- value[5], ok6 = decodeHexByte(s2[6], s2[7])
- value[6], ok7 = decodeHexByte(s2[8], s2[9])
- value[7], ok8 = decodeHexByte(s2[10], s2[11])
- ok = ok1 && ok2 && ok3 && ok4 && ok5 && ok6 && ok7 && ok8
- return
-}
-
-func decodeHexByte(c1, c2 byte) (value byte, ok bool) {
- var n1, n2 byte
- var ok1, ok2 bool
- n1, ok1 = decodeHexChar(c1)
- n2, ok2 = decodeHexChar(c2)
- value = (n1 << 4) | n2
- ok = ok1 && ok2
- return
-}
-
-func decodeHexChar(c byte) (byte, bool) {
- switch {
- case '0' <= c && c <= '9':
- return c - '0', true
- case 'a' <= c && c <= 'f':
- return c - 'a' + 10, true
- case 'A' <= c && c <= 'F':
- return c - 'A' + 10, true
- }
-
- return 0, false
-}
-
-// String converts the GUID to string form. It will adhere to this pattern:
-//
-// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
-//
-// If the GUID is nil, the string representation of an empty GUID is returned:
-//
-// {00000000-0000-0000-0000-000000000000}
-func (guid *GUID) String() string {
- if guid == nil {
- return emptyGUID
- }
-
- var c [38]byte
- c[0] = '{'
- putUint32Hex(c[1:9], guid.Data1)
- c[9] = '-'
- putUint16Hex(c[10:14], guid.Data2)
- c[14] = '-'
- putUint16Hex(c[15:19], guid.Data3)
- c[19] = '-'
- putByteHex(c[20:24], guid.Data4[0:2])
- c[24] = '-'
- putByteHex(c[25:37], guid.Data4[2:8])
- c[37] = '}'
- return string(c[:])
-}
-
-func putUint32Hex(b []byte, v uint32) {
- b[0] = hextable[byte(v>>24)>>4]
- b[1] = hextable[byte(v>>24)&0x0f]
- b[2] = hextable[byte(v>>16)>>4]
- b[3] = hextable[byte(v>>16)&0x0f]
- b[4] = hextable[byte(v>>8)>>4]
- b[5] = hextable[byte(v>>8)&0x0f]
- b[6] = hextable[byte(v)>>4]
- b[7] = hextable[byte(v)&0x0f]
-}
-
-func putUint16Hex(b []byte, v uint16) {
- b[0] = hextable[byte(v>>8)>>4]
- b[1] = hextable[byte(v>>8)&0x0f]
- b[2] = hextable[byte(v)>>4]
- b[3] = hextable[byte(v)&0x0f]
-}
-
-func putByteHex(dst, src []byte) {
- for i := 0; i < len(src); i++ {
- dst[i*2] = hextable[src[i]>>4]
- dst[i*2+1] = hextable[src[i]&0x0f]
- }
-}
-
-// IsEqualGUID compares two GUID.
-//
-// Not constant time comparison.
-func IsEqualGUID(guid1 *GUID, guid2 *GUID) bool {
- return guid1.Data1 == guid2.Data1 &&
- guid1.Data2 == guid2.Data2 &&
- guid1.Data3 == guid2.Data3 &&
- guid1.Data4[0] == guid2.Data4[0] &&
- guid1.Data4[1] == guid2.Data4[1] &&
- guid1.Data4[2] == guid2.Data4[2] &&
- guid1.Data4[3] == guid2.Data4[3] &&
- guid1.Data4[4] == guid2.Data4[4] &&
- guid1.Data4[5] == guid2.Data4[5] &&
- guid1.Data4[6] == guid2.Data4[6] &&
- guid1.Data4[7] == guid2.Data4[7]
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/LICENSE b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/LICENSE
deleted file mode 100644
index af1894c8727..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/LICENSE
+++ /dev/null
@@ -1,16 +0,0 @@
-ISC License (ISC)
-
-Copyright (c) 2020 John Chadwick
-Copyright (c) 2022 Wails Project Developers
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/README.md b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/README.md
deleted file mode 100644
index f3e020ec44b..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Webviewloader
-
-Webviewloader is a port of [OpenWebView2Loader](https://github.com/jchv/OpenWebView2Loader) to Go.
-
-It is intended to be feature-complete with the original WebView2Loader distributed with
-the WebView2 NuGet package, but some features are intentionally not implemented.
-
-## Status
-
-- [x] CompareBrowserVersions
-- [x] CreateCoreWebView2Environment
-- [x] CreateCoreWebView2EnvironmentWithOptions
-- [x] GetAvailableCoreWebView2BrowserVersionString
-
-## Not implemented features
-
-- Registry Overrides of Parameters
-- Env Variable Overrides of Parameters
-- Does not incorporate `GetCurrentPackageInfo` to search for an installed runtime
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/arm64/WebView2Loader.dll b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/arm64/WebView2Loader.dll
deleted file mode 100644
index cd1c694b845..00000000000
Binary files a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/arm64/WebView2Loader.dll and /dev/null differ
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create.go
deleted file mode 100644
index 892189a4a07..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create.go
+++ /dev/null
@@ -1,176 +0,0 @@
-//go:build windows && !native_webview2loader
-
-package webviewloader
-
-import (
- "fmt"
- "os"
- "path/filepath"
- "syscall"
- "unsafe"
-
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge"
- "golang.org/x/sys/windows"
-)
-
-func init() {
- fmt.Println("DEB | Using go webview2loader")
- preventEnvAndRegistryOverrides()
-}
-
-type webView2RunTimeType int32
-
-const (
- webView2RunTimeTypeInstalled webView2RunTimeType = 0x00
- webView2RunTimeTypeRedistributable webView2RunTimeType = 0x01
-)
-
-// CreateCoreWebView2Environment creates an evergreen WebView2 Environment using the installed WebView2 Runtime version.
-//
-// This is equivalent to running CreateCoreWebView2EnvironmentWithOptions without any options.
-// For more information, see CreateCoreWebView2EnvironmentWithOptions.
-func CreateCoreWebView2Environment(environmentCompletedHandler ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler) error {
- return CreateCoreWebView2EnvironmentWithOptions(environmentCompletedHandler)
-}
-
-// CreateCoreWebView2EnvironmentWithOptions creates an environment with a custom version of WebView2 Runtime,
-// user data folder, and with or without additional options.
-//
-// See https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?#createcorewebview2environmentwithoptions
-func CreateCoreWebView2EnvironmentWithOptions(environmentCompletedHandler ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, opts ...option) error {
- var params environmentOptions
- for _, opt := range opts {
- opt(¶ms)
- }
-
- var err error
- var dllPath string
- var runtimeType webView2RunTimeType
- if browserExecutableFolder := params.browserExecutableFolder; browserExecutableFolder != "" {
- runtimeType = webView2RunTimeTypeRedistributable
- dllPath, err = findEmbeddedClientDll(browserExecutableFolder)
- } else {
- runtimeType = webView2RunTimeTypeInstalled
- dllPath, _, err = findInstalledClientDll(params.preferCanary)
- }
-
- if err != nil {
- return err
- }
-
- return createWebViewEnvironmentWithClientDll(dllPath, runtimeType, params.userDataFolder,
- ¶ms, environmentCompletedHandler)
-}
-
-func createWebViewEnvironmentWithClientDll(lpLibFileName string, runtimeType webView2RunTimeType, userDataFolder string,
- envOptions *environmentOptions, envCompletedHandler ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler) error {
-
- if !filepath.IsAbs(lpLibFileName) {
- return fmt.Errorf("lpLibFileName must be absolute")
- }
-
- dll, err := windows.LoadDLL(lpLibFileName)
- if err != nil {
- return fmt.Errorf("Loading DLL failed: %w", err)
- }
-
- defer func() {
- canUnloadProc, err := dll.FindProc("DllCanUnloadNow")
- if err != nil {
- return
- }
-
- if r1, _, _ := canUnloadProc.Call(); r1 != windows.NO_ERROR {
- return
- }
-
- dll.Release()
- }()
-
- createProc, err := dll.FindProc("CreateWebViewEnvironmentWithOptionsInternal")
- if err != nil {
- return fmt.Errorf("Unable to find CreateWebViewEnvironmentWithOptionsInternal entrypoint: %w", err)
- }
-
- userDataPtr, err := windows.UTF16PtrFromString(userDataFolder)
- if err != nil {
- return err
- }
-
- envOptionsCom := combridge.New2[iCoreWebView2EnvironmentOptions, iCoreWebView2EnvironmentOptions2](
- envOptions, envOptions)
-
- defer envOptionsCom.Close()
-
- envCompletedHandler = &environmentCreatedHandler{envCompletedHandler}
- envCompletedCom := combridge.New[iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler](envCompletedHandler)
- defer envCompletedCom.Close()
-
- preventEnvAndRegistryOverrides()
-
- const unknown = 1
- hr, _, err := createProc.Call(
- uintptr(unknown),
- uintptr(runtimeType),
- uintptr(unsafe.Pointer(userDataPtr)),
- uintptr(envOptionsCom.Ref()),
- uintptr(envCompletedCom.Ref()))
-
- if hr != 0 {
- if err == nil || err == windows.ERROR_SUCCESS {
- err = syscall.Errno(hr)
- }
- return err
- }
-
- return nil
-}
-
-type environmentCreatedHandler struct {
- originalHandler ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler
-}
-
-func (r *environmentCreatedHandler) EnvironmentCompleted(errorCode HRESULT, createdEnvironment *ICoreWebView2Environment) HRESULT {
- // The OpenWebview2Loader has some retry logic and retries once, didn't encounter any case when this would have been
- // needed during the development: https://github.com/jchv/OpenWebView2Loader/blob/master/Source/WebView2Loader.cpp#L202
-
- if createdEnvironment != nil {
- // May or may not be necessary, but the official WebView2Loader seems to do it.
- iidICoreWebView2Environment := windows.GUID{
- Data1: 0xb96d755e,
- Data2: 0x0319,
- Data3: 0x4e92,
- Data4: [8]byte{0xa2, 0x96, 0x23, 0x43, 0x6f, 0x46, 0xa1, 0xfc},
- }
-
- if err := createdEnvironment.QueryInterface(&iidICoreWebView2Environment, &createdEnvironment); err != nil {
- createdEnvironment = nil
- errNo, ok := err.(syscall.Errno)
- if !ok {
- errNo = syscall.Errno(windows.E_FAIL)
- }
- errorCode = HRESULT(errNo)
- }
- }
-
- r.originalHandler.EnvironmentCompleted(errorCode, createdEnvironment)
-
- if createdEnvironment != nil {
- createdEnvironment.Release()
- }
-
- return HRESULT(windows.S_OK)
-}
-
-func preventEnvAndRegistryOverrides() {
- // Setting these env variables to empty string also prevents registry overrides because webview2
- // checks for existence and not for empty value
- os.Setenv("WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER", "")
- os.Setenv("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "")
- os.Setenv("WEBVIEW2_RELEASE_CHANNEL_PREFERENCE", "0")
-
- // The following seems not be be required because those are only used by the webview2loader which
- // in this case is implemented on our own. But nevertheless set them to empty to be consistent.
- os.Setenv("WEBVIEW2_BROWSER_EXECUTABLE_FOLDER", "")
- os.Setenv("WEBVIEW2_USER_DATA_FOLDER", "")
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create_completed.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create_completed.go
deleted file mode 100644
index 223c77e85e0..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create_completed.go
+++ /dev/null
@@ -1,42 +0,0 @@
-//go:build windows && !native_webview2loader
-
-package webviewloader
-
-import (
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge"
-)
-
-// HRESULT
-//
-// See https://docs.microsoft.com/en-us/windows/win32/seccrypto/common-hresult-values
-type HRESULT int32
-
-// ICoreWebView2Environment Represents the WebView2 Environment
-//
-// See https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environment
-type ICoreWebView2Environment = combridge.IUnknownImpl
-
-// ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler receives the WebView2Environment created using CreateCoreWebView2Environment.
-type ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler interface {
- // EnvironmentCompleted is invoked to receive the created WebView2Environment
- //
- // See https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2createcorewebview2environmentcompletedhandler?#invoke
- EnvironmentCompleted(errorCode HRESULT, createdEnvironment *ICoreWebView2Environment) HRESULT
-}
-
-type iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler interface {
- combridge.IUnknown
- ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler
-}
-
-func init() {
- combridge.RegisterVTable[combridge.IUnknown, iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler](
- "{4e8a3389-c9d8-4bd2-b6b5-124fee6cc14d}",
- _iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerInvoke,
- )
-}
-
-func _iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerInvoke(this uintptr, errorCode HRESULT, env *combridge.IUnknownImpl) uintptr {
- res := combridge.Resolve[iCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler](this).EnvironmentCompleted(errorCode, env)
- return uintptr(res)
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create_options.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create_options.go
deleted file mode 100644
index 4bae6064a11..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/env_create_options.go
+++ /dev/null
@@ -1,276 +0,0 @@
-//go:build windows && !native_webview2loader
-
-package webviewloader
-
-import (
- "unicode/utf16"
- "unsafe"
-
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/pkg/combridge"
- "golang.org/x/sys/windows"
-)
-
-// WithBrowserExecutableFolder to specify whether WebView2 controls use a fixed or installed version
-// of the WebView2 Runtime that exists on a user machine.
-//
-// To use a fixed version of the WebView2 Runtime,
-// pass the folder path that contains the fixed version of the WebView2 Runtime.
-// BrowserExecutableFolder supports both relative (to the application's executable) and absolute files paths.
-// To create WebView2 controls that use the installed version of the WebView2 Runtime that exists on user
-// machines, pass a empty string to WithBrowserExecutableFolder. In this scenario, the API tries to find a
-// compatible version of the WebView2 Runtime that is installed on the user machine (first at the machine level,
-// and then per user) using the selected channel preference. The path of fixed version of the WebView2 Runtime
-// should not contain \Edge\Application\. When such a path is used, the API fails with HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED).
-func WithBrowserExecutableFolder(folder string) option {
- return func(wvep *environmentOptions) {
- wvep.browserExecutableFolder = folder
- }
-}
-
-// WithUserDataFolder specifies to user data folder location for WebView2
-//
-// You may specify the userDataFolder to change the default user data folder location for WebView2.
-// The path is either an absolute file path or a relative file path that is interpreted as relative
-// to the compiled code for the current process.
-// Dhe default user data ({Executable File Name}.WebView2) folder is created in the same directory
-// next to the compiled code for the app. WebView2 creation fails if the compiled code is running
-// in a directory in which the process does not have permission to create a new directory.
-// The app is responsible to clean up the associated user data folder when it is done.
-func WithUserDataFolder(folder string) option {
- return func(wvep *environmentOptions) {
- wvep.userDataFolder = folder
- }
-}
-
-// WithAdditionalBrowserArguments changes the behavior of the WebView.
-//
-// The arguments are passed to the
-// browser process as part of the command. For more information about
-// using command-line switches with Chromium browser processes, navigate to
-// [Run Chromium with Flags][ChromiumDevelopersHowTosRunWithFlags].
-// The value appended to a switch is appended to the browser process, for
-// example, in `--edge-webview-switches=xxx` the value is `xxx`. If you
-// specify a switch that is important to WebView functionality, it is
-// ignored, for example, `--user-data-dir`. Specific features are disabled
-// internally and blocked from being enabled. If a switch is specified
-// multiple times, only the last instance is used.
-//
-// \> [!NOTE]\n\> A merge of the different values of the same switch is not attempted,
-// except for disabled and enabled features. The features specified by
-// `--enable-features` and `--disable-features` are merged with simple
-// logic.\n\> * The features is the union of the specified features
-// and built-in features. If a feature is disabled, it is removed from the
-// enabled features list.
-//
-// If you specify command-line switches and use the
-// `additionalBrowserArguments` parameter, the `--edge-webview-switches`
-// value takes precedence and is processed last. If a switch fails to
-// parse, the switch is ignored. The default state for the operation is
-// to run the browser process with no extra flags.
-//
-// [ChromiumDevelopersHowTosRunWithFlags]: https://www.chromium.org/developers/how-tos/run-chromium-with-flags "Run Chromium with flags | The Chromium Projects"
-func WithAdditionalBrowserArguments(args string) option {
- return func(wvep *environmentOptions) {
- wvep.additionalBrowserArguments = args
- }
-}
-
-// WithLanguage sets the default display language for WebView.
-//
-// It applies to browser UI such as
-// context menu and dialogs. It also applies to the `accept-languages` HTTP
-// header that WebView sends to websites. It is in the format of
-//
-// `language[-country]` where `language` is the 2-letter code from
-// [ISO 639][ISO639LanguageCodesHtml]
-// and `country` is the
-// 2-letter code from
-// [ISO 3166][ISOStandard72482Html].
-//
-// [ISO639LanguageCodesHtml]: https://www.iso.org/iso-639-language-codes.html "ISO 639 | ISO"
-// [ISOStandard72482Html]: https://www.iso.org/standard/72482.html "ISO 3166-1:2020 | ISO"
-func WithLanguage(lang string) option {
- return func(wvep *environmentOptions) {
- wvep.language = lang
- }
-}
-
-// WithTargetCompatibleBrowserVersion secifies the version of the WebView2 Runtime binaries required to be
-// compatible with your app.
-//
-// This defaults to the WebView2 Runtime version
-// that corresponds with the version of the SDK the app is using. The
-// format of this value is the same as the format of the
-// `BrowserVersionString` property and other `BrowserVersion` values. Only
-// the version part of the `BrowserVersion` value is respected. The channel
-// suffix, if it exists, is ignored. The version of the WebView2 Runtime
-// binaries actually used may be different from the specified
-// `TargetCompatibleBrowserVersion`. The binaries are only guaranteed to be
-// compatible. Verify the actual version on the `BrowserVersionString`
-// property on the `ICoreWebView2Environment`.
-func WithTargetCompatibleBrowserVersion(version string) option {
- return func(wvep *environmentOptions) {
- wvep.targetCompatibleBrowserVersion = version
- }
-}
-
-// WithAllowSingleSignOnUsingOSPrimaryAccount is used to enable
-// single sign on with Azure Active Directory (AAD) and personal Microsoft
-// Account (MSA) resources inside WebView. All AAD accounts, connected to
-// Windows and shared for all apps, are supported. For MSA, SSO is only enabled
-// for the account associated for Windows account login, if any.
-// Default is disabled. Universal Windows Platform apps must also declare
-// `enterpriseCloudSSO`
-// [Restricted capabilities][WindowsUwpPackagingAppCapabilityDeclarationsRestrictedCapabilities]
-// for the single sign on (SSO) to work.
-//
-// [WindowsUwpPackagingAppCapabilityDeclarationsRestrictedCapabilities]: /windows/uwp/packaging/app-capability-declarations\#restricted-capabilities "Restricted capabilities - App capability declarations | Microsoft Docs"
-func WithAllowSingleSignOnUsingOSPrimaryAccount(allow bool) option {
- return func(wvep *environmentOptions) {
- wvep.allowSingleSignOnUsingOSPrimaryAccount = allow
- }
-}
-
-// WithExclusiveUserDataFolderAccess specifies that the WebView environment
-// obtains exclusive access to the user data folder.
-//
-// If the user data folder is already being used by another WebView environment with a
-// different value for `ExclusiveUserDataFolderAccess` property, the creation of a WebView2Controller
-// using the environment object will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
-// When set as TRUE, no other WebView can be created from other processes using WebView2Environment
-// objects with the same UserDataFolder. This prevents other processes from creating WebViews
-// which share the same browser process instance, since sharing is performed among
-// WebViews that have the same UserDataFolder. When another process tries to create a
-// WebView2Controller from an WebView2Environment object created with the same user data folder,
-// it will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`.
-func WithExclusiveUserDataFolderAccess(exclusive bool) option {
- return func(wvep *environmentOptions) {
- wvep.exclusiveUserDataFolderAccess = exclusive
- }
-}
-
-type option func(*environmentOptions)
-
-var _ iCoreWebView2EnvironmentOptions = &environmentOptions{}
-var _ iCoreWebView2EnvironmentOptions2 = &environmentOptions{}
-
-type environmentOptions struct {
- browserExecutableFolder string
- userDataFolder string
- preferCanary bool
-
- additionalBrowserArguments string
- language string
- targetCompatibleBrowserVersion string
- allowSingleSignOnUsingOSPrimaryAccount bool
- exclusiveUserDataFolderAccess bool
-}
-
-func (o *environmentOptions) AdditionalBrowserArguments() string {
- return o.additionalBrowserArguments
-}
-
-func (o *environmentOptions) Language() string {
- return o.language
-}
-
-func (o *environmentOptions) TargetCompatibleBrowserVersion() string {
- v := o.targetCompatibleBrowserVersion
- if v == "" {
- v = kMinimumCompatibleVersion
- }
- return v
-}
-
-func (o *environmentOptions) AllowSingleSignOnUsingOSPrimaryAccount() bool {
- return o.allowSingleSignOnUsingOSPrimaryAccount
-}
-
-func (o *environmentOptions) ExclusiveUserDataFolderAccess() bool {
- return o.exclusiveUserDataFolderAccess
-}
-
-type iCoreWebView2EnvironmentOptions interface {
- combridge.IUnknown
-
- AdditionalBrowserArguments() string
- Language() string
- TargetCompatibleBrowserVersion() string
- AllowSingleSignOnUsingOSPrimaryAccount() bool
-}
-
-type iCoreWebView2EnvironmentOptions2 interface {
- combridge.IUnknown
-
- ExclusiveUserDataFolderAccess() bool
-}
-
-func init() {
- combridge.RegisterVTable[combridge.IUnknown, iCoreWebView2EnvironmentOptions](
- "{2fde08a8-1e9a-4766-8c05-95a9ceb9d1c5}",
- _iCoreWebView2EnvironmentOptionsAdditionalBrowserArguments,
- _iCoreWebView2EnvironmentOptionsNOP,
- _iCoreWebView2EnvironmentOptionsLanguage,
- _iCoreWebView2EnvironmentOptionsNOP,
- _iCoreWebView2EnvironmentTargetCompatibleBrowserVersion,
- _iCoreWebView2EnvironmentOptionsNOP,
- _iCoreWebView2EnvironmentOptionsAllowSingleSignOnUsingOSPrimaryAccount,
- _iCoreWebView2EnvironmentOptionsNOP,
- )
-
- combridge.RegisterVTable[combridge.IUnknown, iCoreWebView2EnvironmentOptions2](
- "{ff85c98a-1ba7-4a6b-90c8-2b752c89e9e2}",
- _iCoreWebView2EnvironmentOptions2ExclusiveUserDataFolderAccess,
- _iCoreWebView2EnvironmentOptionsNOP,
- )
-}
-func _iCoreWebView2EnvironmentOptionsNOP(this uintptr) uintptr {
- return uintptr(windows.S_FALSE)
-}
-
-func _iCoreWebView2EnvironmentOptionsAdditionalBrowserArguments(this uintptr, value **uint16) uintptr {
- v := combridge.Resolve[iCoreWebView2EnvironmentOptions](this).AdditionalBrowserArguments()
- *value = stringToOleString(v)
- return uintptr(windows.S_OK)
-}
-
-func _iCoreWebView2EnvironmentOptionsLanguage(this uintptr, value **uint16) uintptr {
- args := combridge.Resolve[iCoreWebView2EnvironmentOptions](this).Language()
- *value = stringToOleString(args)
- return uintptr(windows.S_OK)
-}
-
-func _iCoreWebView2EnvironmentTargetCompatibleBrowserVersion(this uintptr, value **uint16) uintptr {
- args := combridge.Resolve[iCoreWebView2EnvironmentOptions](this).TargetCompatibleBrowserVersion()
- *value = stringToOleString(args)
- return uintptr(windows.S_OK)
-}
-
-func _iCoreWebView2EnvironmentOptionsAllowSingleSignOnUsingOSPrimaryAccount(this uintptr, value *int32) uintptr {
- v := combridge.Resolve[iCoreWebView2EnvironmentOptions](this).AllowSingleSignOnUsingOSPrimaryAccount()
- *value = boolToInt(v)
- return uintptr(windows.S_OK)
-}
-
-func _iCoreWebView2EnvironmentOptions2ExclusiveUserDataFolderAccess(this uintptr, value *int32) uintptr {
- v := combridge.Resolve[iCoreWebView2EnvironmentOptions2](this).ExclusiveUserDataFolderAccess()
- *value = boolToInt(v)
- return uintptr(windows.S_OK)
-}
-
-func stringToOleString(v string) *uint16 {
- wstr := utf16.Encode([]rune(v + "\x00"))
- lwstr := len(wstr)
- ptr := (*uint16)(coTaskMemAlloc(2 * lwstr))
-
- copy(unsafe.Slice(ptr, lwstr), wstr)
-
- return ptr
-}
-
-func boolToInt(v bool) int32 {
- if v {
- return 1
- }
- return 0
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/find_dll.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/find_dll.go
deleted file mode 100644
index da9472ff1d7..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/find_dll.go
+++ /dev/null
@@ -1,74 +0,0 @@
-//go:build windows
-
-package webviewloader
-
-import (
- "errors"
- "fmt"
- "os"
- "path/filepath"
- "runtime"
-
- "golang.org/x/sys/windows/registry"
-)
-
-var (
- errNoClientDLLFound = errors.New("no webview2 found")
-)
-
-func findEmbeddedBrowserVersion(filename string) (string, error) {
- block, err := getFileVersionInfo(filename)
- if err != nil {
- return "", err
- }
-
- info, err := verQueryValueString(block, "\\StringFileInfo\\040904B0\\ProductVersion")
- if err != nil {
- return "", err
- }
-
- return info, nil
-}
-
-func findEmbeddedClientDll(embeddedEdgeSubFolder string) (outClientPath string, err error) {
- if !filepath.IsAbs(embeddedEdgeSubFolder) {
- exe, err := os.Executable()
- if err != nil {
- return "", err
- }
-
- embeddedEdgeSubFolder = filepath.Join(filepath.Dir(exe), embeddedEdgeSubFolder)
- }
-
- return findClientDllInFolder(embeddedEdgeSubFolder)
-}
-
-func findClientDllInFolder(folder string) (string, error) {
- arch := ""
- switch runtime.GOARCH {
- case "arm64":
- arch = "arm64"
- case "amd64":
- arch = "x64"
- case "386":
- arch = "x86"
- default:
- return "", fmt.Errorf("Unsupported architecture")
- }
-
- dllPath := filepath.Join(folder, "EBWebView", arch, "EmbeddedBrowserWebView.dll")
- if _, err := os.Stat(dllPath); err != nil {
- return "", mapFindErr(err)
- }
- return dllPath, nil
-}
-
-func mapFindErr(err error) error {
- if errors.Is(err, registry.ErrNotExist) {
- return errNoClientDLLFound
- }
- if errors.Is(err, os.ErrNotExist) {
- return errNoClientDLLFound
- }
- return err
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/find_dll_installed.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/find_dll_installed.go
deleted file mode 100644
index 7ee171b2ad1..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/find_dll_installed.go
+++ /dev/null
@@ -1,94 +0,0 @@
-//go:build windows && !native_webview2loader
-
-package webviewloader
-
-import (
- "path/filepath"
-
- "golang.org/x/sys/windows/registry"
-)
-
-const (
- kNumChannels = 4
- kInstallKeyPath = "Software\\Microsoft\\EdgeUpdate\\ClientState\\"
- kMinimumCompatibleVersion = "86.0.616.0"
-)
-
-var (
- kChannelName = [kNumChannels]string{
- "", "beta", "dev", "canary", // "internal"
- }
-
- kChannelUuid = [kNumChannels]string{
- "{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}",
- "{2CD8A007-E189-409D-A2C8-9AF4EF3C72AA}",
- "{0D50BFEC-CD6A-4F9A-964C-C7416E3ACB10}",
- "{65C35B14-6C1D-4122-AC46-7148CC9D6497}",
- //"{BE59E8FD-089A-411B-A3B0-051D9E417818}",
- }
-
- minimumCompatibleVersion, _ = parseVersion(kMinimumCompatibleVersion)
-)
-
-func findInstalledClientDll(preferCanary bool) (clientPath string, version *version, err error) {
- for i := 0; i < kNumChannels; i++ {
- channel := i
- if preferCanary {
- channel = (kNumChannels - 1) - i
- }
-
- key := kInstallKeyPath + kChannelUuid[channel]
- for _, checkSystem := range []bool{true, false} {
- clientPath, version, err := findInstalledClientDllForChannel(key, checkSystem)
- if err == errNoClientDLLFound {
- continue
- }
- if err != nil {
- return "", nil, err
- }
-
- version.channel = kChannelName[channel]
- return clientPath, version, nil
- }
- }
- return "", nil, errNoClientDLLFound
-}
-
-func findInstalledClientDllForChannel(subKey string, system bool) (clientPath string, clientVersion *version, err error) {
- key := registry.LOCAL_MACHINE
- if !system {
- key = registry.CURRENT_USER
- }
-
- regKey, err := registry.OpenKey(key, subKey, registry.READ|registry.WOW64_32KEY)
- if err != nil {
- return "", nil, mapFindErr(err)
- }
- defer regKey.Close()
-
- embeddedEdgeSubFolder, _, err := regKey.GetStringValue("EBWebView")
- if err != nil {
- return "", nil, mapFindErr(err)
- }
-
- if embeddedEdgeSubFolder == "" {
- return "", nil, errNoClientDLLFound
- }
-
- versionString := filepath.Base(embeddedEdgeSubFolder)
- version, err := parseVersion(versionString)
- if err != nil {
- return "", nil, errNoClientDLLFound
- }
-
- if version.compare(minimumCompatibleVersion) < 0 {
- return "", nil, errNoClientDLLFound
- }
-
- dllPath, err := findEmbeddedClientDll(embeddedEdgeSubFolder)
- if err != nil {
- return "", nil, mapFindErr(err)
- }
-
- return dllPath, &version, nil
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module.go
deleted file mode 100644
index 3e02fe985e7..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module.go
+++ /dev/null
@@ -1,173 +0,0 @@
-//go:build windows && native_webview2loader
-
-package webviewloader
-
-import (
- "errors"
- "fmt"
- "os"
- "sync"
- "unsafe"
-
- "github.com/jchv/go-winloader"
-
- "golang.org/x/sys/windows"
-)
-
-func init() {
- preventEnvAndRegistryOverrides(nil, nil, "")
-}
-
-var (
- memOnce sync.Once
- memModule winloader.Module
- memCreate winloader.Proc
- memCompareBrowserVersions winloader.Proc
- memGetAvailableCoreWebView2BrowserVersionString winloader.Proc
- memErr error
-)
-
-const (
- // https://referencesource.microsoft.com/#system.web/Util/hresults.cs,20
- E_FILENOTFOUND = 0x80070002
-)
-
-// CompareBrowserVersions will compare the 2 given versions and return:
-//
-// Less than zero: v1 < v2
-// zero: v1 == v2
-// Greater than zero: v1 > v2
-func CompareBrowserVersions(v1 string, v2 string) (int, error) {
- _v1, err := windows.UTF16PtrFromString(v1)
- if err != nil {
- return 0, err
- }
- _v2, err := windows.UTF16PtrFromString(v2)
- if err != nil {
- return 0, err
- }
-
- err = loadFromMemory()
- if err != nil {
- return 0, err
- }
-
- var result int32
- _, _, err = memCompareBrowserVersions.Call(
- uint64(uintptr(unsafe.Pointer(_v1))),
- uint64(uintptr(unsafe.Pointer(_v2))),
- uint64(uintptr(unsafe.Pointer(&result))))
-
- if err != windows.ERROR_SUCCESS {
- return 0, err
- }
- return int(result), nil
-}
-
-// GetAvailableCoreWebView2BrowserVersionString returns version of the webview2 runtime.
-// If path is empty, it will try to find installed webview2 is the system.
-// If there is no version installed, a blank string is returned.
-func GetAvailableCoreWebView2BrowserVersionString(path string) (string, error) {
- if path != "" {
- // The default implementation fails if CGO and a fixed browser path is used. It's caused by the go-winloader
- // which loads the native DLL from memory.
- // Use the new GoWebView2Loader in this case, in the future we will make GoWebView2Loader
- // feature-complete and remove the use of the native DLL and go-winloader.
- version, err := goGetAvailableCoreWebView2BrowserVersionString(path)
- if errors.Is(err, errNoClientDLLFound) {
- // WebView2 is not found
- return "", nil
- } else if err != nil {
- return "", err
- }
-
- return version, nil
- }
-
- err := loadFromMemory()
- if err != nil {
- return "", err
- }
-
- var browserPath *uint16 = nil
- if path != "" {
- browserPath, err = windows.UTF16PtrFromString(path)
- if err != nil {
- return "", fmt.Errorf("error calling UTF16PtrFromString for %s: %v", path, err)
- }
- }
-
- preventEnvAndRegistryOverrides(browserPath, nil, "")
- var result *uint16
- res, _, err := memGetAvailableCoreWebView2BrowserVersionString.Call(
- uint64(uintptr(unsafe.Pointer(browserPath))),
- uint64(uintptr(unsafe.Pointer(&result))))
-
- if res != 0 {
- if res == E_FILENOTFOUND {
- // WebView2 is not installed
- return "", nil
- }
-
- return "", fmt.Errorf("Unable to call GetAvailableCoreWebView2BrowserVersionString (%x): %w", res, err)
- }
-
- version := windows.UTF16PtrToString(result)
- windows.CoTaskMemFree(unsafe.Pointer(result))
- return version, nil
-}
-
-// CreateCoreWebView2EnvironmentWithOptions tries to load WebviewLoader2 and
-// call the CreateCoreWebView2EnvironmentWithOptions routine.
-func CreateCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataFolder *uint16, environmentCompletedHandle uintptr, additionalBrowserArgs string) (uintptr, error) {
- err := loadFromMemory()
- if err != nil {
- return 0, err
- }
-
- preventEnvAndRegistryOverrides(browserExecutableFolder, userDataFolder, additionalBrowserArgs)
- res, _, _ := memCreate.Call(
- uint64(uintptr(unsafe.Pointer(browserExecutableFolder))),
- uint64(uintptr(unsafe.Pointer(userDataFolder))),
- 0,
- uint64(environmentCompletedHandle),
- )
- return uintptr(res), nil
-}
-
-func loadFromMemory() error {
- var err error
- // DLL is not available natively. Try loading embedded copy.
- memOnce.Do(func() {
- memModule, memErr = winloader.LoadFromMemory(WebView2Loader)
- if memErr != nil {
- err = fmt.Errorf("Unable to load WebView2Loader.dll from memory: %w", memErr)
- return
- }
- memCreate = memModule.Proc("CreateCoreWebView2EnvironmentWithOptions")
- memCompareBrowserVersions = memModule.Proc("CompareBrowserVersions")
- memGetAvailableCoreWebView2BrowserVersionString = memModule.Proc("GetAvailableCoreWebView2BrowserVersionString")
- })
- return err
-}
-
-func preventEnvAndRegistryOverrides(browserFolder, userDataFolder *uint16, additionalBrowserArgs string) {
- // Setting these env variables to empty string also prevents registry overrides because webview2loader
- // checks for existence and not for empty value
- os.Setenv("WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER", "")
-
- // Set these overrides to the values or empty to prevent registry and external env overrides
- os.Setenv("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", additionalBrowserArgs)
- os.Setenv("WEBVIEW2_RELEASE_CHANNEL_PREFERENCE", "0")
- os.Setenv("WEBVIEW2_BROWSER_EXECUTABLE_FOLDER", windows.UTF16PtrToString(browserFolder))
- os.Setenv("WEBVIEW2_USER_DATA_FOLDER", windows.UTF16PtrToString(userDataFolder))
-}
-
-func goGetAvailableCoreWebView2BrowserVersionString(browserExecutableFolder string) (string, error) {
- clientPath, err := findEmbeddedClientDll(browserExecutableFolder)
- if err != nil {
- return "", err
- }
-
- return findEmbeddedBrowserVersion(clientPath)
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module_386.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module_386.go
deleted file mode 100644
index e4ff44ff312..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module_386.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build windows && native_webview2loader
-
-package webviewloader
-
-import _ "embed"
-
-//go:embed x86/WebView2Loader.dll
-var WebView2Loader []byte
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module_amd64.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module_amd64.go
deleted file mode 100644
index 27423ae8aa8..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module_amd64.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build windows && native_webview2loader
-
-package webviewloader
-
-import _ "embed"
-
-//go:embed x64/WebView2Loader.dll
-var WebView2Loader []byte
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module_arm64.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module_arm64.go
deleted file mode 100644
index bba6a88cb1e..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/native_module_arm64.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build windows && native_webview2loader
-
-package webviewloader
-
-import _ "embed"
-
-//go:embed arm64/WebView2Loader.dll
-var WebView2Loader []byte
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/syscall.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/syscall.go
deleted file mode 100644
index 24d0856a5db..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/syscall.go
+++ /dev/null
@@ -1,143 +0,0 @@
-//go:build windows
-
-package webviewloader
-
-import (
- "fmt"
- "syscall"
- "unicode/utf16"
- "unsafe"
-
- "golang.org/x/sys/windows"
-)
-
-var (
- modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
- procGlobalAlloc = modkernel32.NewProc("GlobalAlloc")
- procGlobalFree = modkernel32.NewProc("GlobalFree")
-
- modversion = windows.NewLazySystemDLL("version.dll")
- procGetFileVersionInfoSize = modversion.NewProc("GetFileVersionInfoSizeW")
- procGetFileVersionInfo = modversion.NewProc("GetFileVersionInfoW")
- procVerQueryValue = modversion.NewProc("VerQueryValueW")
-
- modole32 = windows.NewLazySystemDLL("ole32.dll")
- procCoTaskMemAlloc = modole32.NewProc("CoTaskMemAlloc")
-)
-
-func getFileVersionInfo(path string) ([]byte, error) {
- lptstrFilename, err := syscall.UTF16PtrFromString(path)
- if err != nil {
- return nil, err
- }
-
- size, _, err := procGetFileVersionInfoSize.Call(
- uintptr(unsafe.Pointer(lptstrFilename)),
- 0,
- )
-
- err = maskErrorSuccess(err)
- if size == 0 && err == nil {
- err = fmt.Errorf("GetFileVersionInfoSize failed")
- }
-
- if err != nil {
- return nil, err
- }
-
- data := make([]byte, size)
- ret, _, err := procGetFileVersionInfo.Call(
- uintptr(unsafe.Pointer(lptstrFilename)),
- 0,
- uintptr(size),
- uintptr(unsafe.Pointer(&data[0])),
- )
-
- err = maskErrorSuccess(err)
- if ret == 0 && err == nil {
- err = fmt.Errorf("GetFileVersionInfo failed")
- }
-
- if err != nil {
- return nil, err
- }
- return data, nil
-}
-
-func verQueryValueString(block []byte, subBlock string) (string, error) {
- // Allocate memory from native side to make sure the block doesn't get moved
- // because we get a pointer into that memory block from the native verQueryValue
- // call back.
- pBlock := globalAlloc(0, uint32(len(block)))
- defer globalFree(unsafe.Pointer(pBlock))
-
- // Copy the memory region into native side memory
- copy(unsafe.Slice((*byte)(pBlock), len(block)), block)
-
- lpSubBlock, err := syscall.UTF16PtrFromString(subBlock)
- if err != nil {
- return "", err
- }
-
- var lplpBuffer unsafe.Pointer
- var puLen uint
- ret, _, err := procVerQueryValue.Call(
- uintptr(pBlock),
- uintptr(unsafe.Pointer(lpSubBlock)),
- uintptr(unsafe.Pointer(&lplpBuffer)),
- uintptr(unsafe.Pointer(&puLen)),
- )
-
- err = maskErrorSuccess(err)
- if ret == 0 && err == nil {
- err = fmt.Errorf("VerQueryValue failed")
- }
-
- if err != nil {
- return "", err
- }
-
- if puLen <= 1 {
- return "", nil
- }
- puLen -= 1 // Remove Null-Terminator
-
- wchar := unsafe.Slice((*uint16)(lplpBuffer), puLen)
- return string(utf16.Decode(wchar)), nil
-}
-
-func globalAlloc(uFlags uint, dwBytes uint32) unsafe.Pointer {
- ret, _, _ := procGlobalAlloc.Call(
- uintptr(uFlags),
- uintptr(dwBytes))
-
- if ret == 0 {
- panic("globalAlloc failed")
- }
-
- return unsafe.Pointer(ret)
-}
-
-func globalFree(data unsafe.Pointer) {
- ret, _, _ := procGlobalFree.Call(uintptr(data))
- if ret != 0 {
- panic("globalFree failed")
- }
-}
-
-func maskErrorSuccess(err error) error {
- if err == windows.ERROR_SUCCESS {
- return nil
- }
- return err
-}
-
-func coTaskMemAlloc(size int) unsafe.Pointer {
- ret, _, _ := procCoTaskMemAlloc.Call(
- uintptr(size))
-
- if ret == 0 {
- panic("coTaskMemAlloc failed")
- }
- return unsafe.Pointer(ret)
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/version.go b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/version.go
deleted file mode 100644
index cf278d950bb..00000000000
--- a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/version.go
+++ /dev/null
@@ -1,147 +0,0 @@
-//go:build windows && !native_webview2loader
-
-package webviewloader
-
-import (
- "errors"
- "fmt"
- "strconv"
- "strings"
-)
-
-// CompareBrowserVersions will compare the 2 given versions and return:
-//
-// -1 = v1 < v2
-// 0 = v1 == v2
-// 1 = v1 > v2
-func CompareBrowserVersions(v1 string, v2 string) (int, error) {
- v, err := parseVersion(v1)
- if err != nil {
- return 0, fmt.Errorf("v1 invalid: %w", err)
- }
-
- w, err := parseVersion(v2)
- if err != nil {
- return 0, fmt.Errorf("v2 invalid: %w", err)
- }
-
- return v.compare(w), nil
-}
-
-// GetAvailableCoreWebView2BrowserVersionString get the browser version info including channel name
-// if it is the WebView2 Runtime.
-// Channel names are Beta, Dev, and Canary.
-func GetAvailableCoreWebView2BrowserVersionString(browserExecutableFolder string) (string, error) {
- if browserExecutableFolder != "" {
- clientPath, err := findEmbeddedClientDll(browserExecutableFolder)
- if errors.Is(err, errNoClientDLLFound) {
- // WebView2 is not found
- return "", nil
- } else if err != nil {
- return "", err
- }
-
- return findEmbeddedBrowserVersion(clientPath)
- }
-
- _, version, err := findInstalledClientDll(false)
- if errors.Is(err, errNoClientDLLFound) {
- return "", nil
- } else if err != nil {
- return "", err
- }
-
- return version.String(), nil
-}
-
-type version struct {
- major int
- minor int
- patch int
- build int
-
- channel string
-}
-
-func (v version) String() string {
- vv := fmt.Sprintf("%d.%d.%d.%d", v.major, v.minor, v.patch, v.build)
- if v.channel != "" {
- vv += " " + v.channel
- }
-
- return vv
-}
-
-func (v version) compare(o version) int {
- if c := compareInt(v.major, o.major); c != 0 {
- return c
- }
- if c := compareInt(v.minor, o.minor); c != 0 {
- return c
- }
- if c := compareInt(v.patch, o.patch); c != 0 {
- return c
- }
- return compareInt(v.build, o.build)
-}
-
-func parseVersion(v string) (version, error) {
- var p version
-
- // Split away channel information...
- if i := strings.Index(v, " "); i > 0 {
- p.channel = v[i+1:]
- v = v[:i]
- }
-
- vv := strings.Split(v, ".")
- if len(vv) > 4 {
- return p, fmt.Errorf("too many version parts")
- }
-
- var err error
- vv, p.major, err = parseInt(vv)
- if err != nil {
- return p, fmt.Errorf("bad major version: %w", err)
- }
-
- vv, p.minor, err = parseInt(vv)
- if err != nil {
- return p, fmt.Errorf("bad minor version: %w", err)
- }
-
- vv, p.patch, err = parseInt(vv)
- if err != nil {
- return p, fmt.Errorf("bad patch version: %w", err)
- }
-
- _, p.build, err = parseInt(vv)
- if err != nil {
- return p, fmt.Errorf("bad build version: %w", err)
- }
-
- return p, nil
-}
-
-func parseInt(v []string) ([]string, int, error) {
- if len(v) == 0 {
- return nil, 0, nil
- }
-
- p, err := strconv.ParseInt(v[0], 10, 32)
- if err != nil {
- return nil, 0, err
- }
- return v[1:], int(p), nil
-}
-
-func compareInt(v1, v2 int) int {
- if v1 == v2 {
- return 0
- }
- if v1 < v2 {
- return -1
- } else {
- return +1
- }
-}
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/x64/WebView2Loader.dll b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/x64/WebView2Loader.dll
deleted file mode 100644
index ab15cffb45a..00000000000
Binary files a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/x64/WebView2Loader.dll and /dev/null differ
diff --git a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/x86/WebView2Loader.dll b/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/x86/WebView2Loader.dll
deleted file mode 100644
index 8609d58ee56..00000000000
Binary files a/v2/internal/frontend/desktop/windows/go-webview2/webviewloader/x86/WebView2Loader.dll and /dev/null differ
diff --git a/v2/internal/frontend/desktop/windows/screen.go b/v2/internal/frontend/desktop/windows/screen.go
index e9e9cd603d5..f6e12bcce03 100644
--- a/v2/internal/frontend/desktop/windows/screen.go
+++ b/v2/internal/frontend/desktop/windows/screen.go
@@ -5,10 +5,12 @@ package windows
import (
"fmt"
- "github.com/pkg/errors"
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc/w32"
"syscall"
"unsafe"
+
+ "github.com/pkg/errors"
+ "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc"
+ "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc/w32"
)
func MonitorsEqual(first w32.MONITORINFO, second w32.MONITORINFO) bool {
@@ -66,13 +68,26 @@ func EnumProc(hMonitor w32.HMONITOR, hdcMonitor w32.HDC, lprcMonitor *w32.RECT,
return w32.TRUE
}
- height := lprcMonitor.Right - lprcMonitor.Left
- width := lprcMonitor.Bottom - lprcMonitor.Top
+ width := lprcMonitor.Right - lprcMonitor.Left
+ height := lprcMonitor.Bottom - lprcMonitor.Top
ourMonitorData.IsPrimary = monInfo.DwFlags&w32.MONITORINFOF_PRIMARY == 1
- ourMonitorData.Height = int(width)
- ourMonitorData.Width = int(height)
+ ourMonitorData.Height = int(height)
+ ourMonitorData.Width = int(width)
ourMonitorData.IsCurrent = MonitorsEqual(*currentMonInfo, *monInfo)
+ ourMonitorData.PhysicalSize.Width = int(width)
+ ourMonitorData.PhysicalSize.Height = int(height)
+
+ var dpiX, dpiY uint
+ w32.GetDPIForMonitor(hMonitor, w32.MDT_EFFECTIVE_DPI, &dpiX, &dpiY)
+ if dpiX == 0 || dpiY == 0 {
+ screenContainer.errors = append(screenContainer.errors, fmt.Errorf("unable to get DPI for screen"))
+ screenContainer.monitors = append(screenContainer.monitors, Screen{})
+ return w32.TRUE
+ }
+ ourMonitorData.Size.Width = winc.ScaleToDefaultDPI(ourMonitorData.PhysicalSize.Width, dpiX)
+ ourMonitorData.Size.Height = winc.ScaleToDefaultDPI(ourMonitorData.PhysicalSize.Height, dpiY)
+
// the reason we need a container is that we have don't know how many times this function will be called
// this "append" call could potentially do an allocation and rewrite the pointer to monitors. So we save the pointer in screenContainer.monitors
// and retrieve the values after all EnumProc calls
diff --git a/v2/internal/frontend/desktop/windows/single_instance.go b/v2/internal/frontend/desktop/windows/single_instance.go
new file mode 100644
index 00000000000..a02b7edb926
--- /dev/null
+++ b/v2/internal/frontend/desktop/windows/single_instance.go
@@ -0,0 +1,136 @@
+//go:build windows
+
+package windows
+
+import (
+ "encoding/json"
+ "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc/w32"
+ "github.com/wailsapp/wails/v2/pkg/options"
+ "golang.org/x/sys/windows"
+ "log"
+ "os"
+ "syscall"
+ "unsafe"
+)
+
+type COPYDATASTRUCT struct {
+ dwData uintptr
+ cbData uint32
+ lpData uintptr
+}
+
+// WMCOPYDATA_SINGLE_INSTANCE_DATA we define our own type for WM_COPYDATA message
+const WMCOPYDATA_SINGLE_INSTANCE_DATA = 1542
+
+func SendMessage(hwnd w32.HWND, data string) {
+ arrUtf16, _ := syscall.UTF16FromString(data)
+
+ pCopyData := new(COPYDATASTRUCT)
+ pCopyData.dwData = WMCOPYDATA_SINGLE_INSTANCE_DATA
+ pCopyData.cbData = uint32(len(arrUtf16)*2 + 1)
+ pCopyData.lpData = uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(data)))
+
+ w32.SendMessage(hwnd, w32.WM_COPYDATA, 0, uintptr(unsafe.Pointer(pCopyData)))
+}
+
+// SetupSingleInstance single instance Windows app
+func SetupSingleInstance(uniqueId string) {
+ id := "wails-app-" + uniqueId
+
+ className := id + "-sic"
+ windowName := id + "-siw"
+ mutexName := id + "sim"
+
+ _, err := windows.CreateMutex(nil, false, windows.StringToUTF16Ptr(mutexName))
+
+ if err != nil {
+ if err == windows.ERROR_ALREADY_EXISTS {
+ // app is already running
+ hwnd := w32.FindWindowW(windows.StringToUTF16Ptr(className), windows.StringToUTF16Ptr(windowName))
+
+ if hwnd != 0 {
+ data := options.SecondInstanceData{
+ Args: os.Args[1:],
+ }
+ data.WorkingDirectory, err = os.Getwd()
+ if err != nil {
+ log.Printf("Failed to get working directory: %v", err)
+ return
+ }
+ serialized, err := json.Marshal(data)
+ if err != nil {
+ log.Printf("Failed to marshal data: %v", err)
+ return
+ }
+
+ SendMessage(hwnd, string(serialized))
+ // exit second instance of app after sending message
+ os.Exit(0)
+ }
+ // if we got any other unknown error we will just start new application instance
+ }
+ } else {
+ createEventTargetWindow(className, windowName)
+ }
+}
+
+func createEventTargetWindow(className string, windowName string) w32.HWND {
+ // callback handler in the event target window
+ wndProc := func(
+ hwnd w32.HWND, msg uint32, wparam w32.WPARAM, lparam w32.LPARAM,
+ ) w32.LRESULT {
+ if msg == w32.WM_COPYDATA {
+ ldata := (*COPYDATASTRUCT)(unsafe.Pointer(lparam))
+
+ if ldata.dwData == WMCOPYDATA_SINGLE_INSTANCE_DATA {
+ serialized := windows.UTF16PtrToString((*uint16)(unsafe.Pointer(ldata.lpData)))
+
+ var secondInstanceData options.SecondInstanceData
+
+ err := json.Unmarshal([]byte(serialized), &secondInstanceData)
+
+ if err == nil {
+ secondInstanceBuffer <- secondInstanceData
+ }
+ }
+
+ return w32.LRESULT(0)
+ }
+
+ return w32.DefWindowProc(hwnd, msg, wparam, lparam)
+ }
+
+ var class w32.WNDCLASSEX
+ class.Size = uint32(unsafe.Sizeof(class))
+ class.Style = 0
+ class.WndProc = syscall.NewCallback(wndProc)
+ class.ClsExtra = 0
+ class.WndExtra = 0
+ class.Instance = w32.GetModuleHandle("")
+ class.Icon = 0
+ class.Cursor = 0
+ class.Background = 0
+ class.MenuName = nil
+ class.ClassName = windows.StringToUTF16Ptr(className)
+ class.IconSm = 0
+
+ w32.RegisterClassEx(&class)
+
+ // create event window that will not be visible for user
+ hwnd := w32.CreateWindowEx(
+ 0,
+ windows.StringToUTF16Ptr(className),
+ windows.StringToUTF16Ptr(windowName),
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ w32.HWND_MESSAGE,
+ 0,
+ w32.GetModuleHandle(""),
+ nil,
+ )
+
+ return hwnd
+}
diff --git a/v2/internal/frontend/desktop/windows/winc/app.go b/v2/internal/frontend/desktop/windows/winc/app.go
index 52b30f5910d..9738804444f 100644
--- a/v2/internal/frontend/desktop/windows/winc/app.go
+++ b/v2/internal/frontend/desktop/windows/winc/app.go
@@ -37,7 +37,7 @@ func init() {
w32.InitCommonControlsEx(&initCtrls)
}
-// SetAppIconID sets recource icon ID for the apps windows.
+// SetAppIcon sets resource icon ID for the apps windows.
func SetAppIcon(appIconID int) {
AppIconID = appIconID
}
diff --git a/v2/internal/frontend/desktop/windows/winc/combobox.go b/v2/internal/frontend/desktop/windows/winc/combobox.go
index 3b4348acbfb..380ea88d82b 100644
--- a/v2/internal/frontend/desktop/windows/winc/combobox.go
+++ b/v2/internal/frontend/desktop/windows/winc/combobox.go
@@ -54,7 +54,7 @@ func (cb *ComboBox) OnSelectedChange() *EventManager {
return &cb.onSelectedChange
}
-// Message processer
+// Message processor
func (cb *ComboBox) WndProc(msg uint32, wparam, lparam uintptr) uintptr {
switch msg {
case w32.WM_COMMAND:
diff --git a/v2/internal/frontend/desktop/windows/winc/controlbase.go b/v2/internal/frontend/desktop/windows/winc/controlbase.go
index b745cb1b01e..086609aedde 100644
--- a/v2/internal/frontend/desktop/windows/winc/controlbase.go
+++ b/v2/internal/frontend/desktop/windows/winc/controlbase.go
@@ -334,7 +334,23 @@ func (cba *ControlBase) ClientHeight() int {
}
func (cba *ControlBase) Show() {
- w32.ShowWindow(cba.hwnd, w32.SW_SHOWDEFAULT)
+ // WindowPos is used with HWND_TOPMOST to guarantee bring our app on top
+ // force set our main window on top
+ w32.SetWindowPos(
+ cba.hwnd,
+ w32.HWND_TOPMOST,
+ 0, 0, 0, 0,
+ w32.SWP_SHOWWINDOW|w32.SWP_NOSIZE|w32.SWP_NOMOVE,
+ )
+ // remove topmost to allow normal windows manipulations
+ w32.SetWindowPos(
+ cba.hwnd,
+ w32.HWND_NOTOPMOST,
+ 0, 0, 0, 0,
+ w32.SWP_SHOWWINDOW|w32.SWP_NOSIZE|w32.SWP_NOMOVE,
+ )
+ // put main window on tops foreground
+ w32.SetForegroundWindow(cba.hwnd)
}
func (cba *ControlBase) Hide() {
diff --git a/v2/internal/frontend/desktop/windows/winc/form.go b/v2/internal/frontend/desktop/windows/winc/form.go
index 9b9cadb2ce4..8a42d63f399 100644
--- a/v2/internal/frontend/desktop/windows/winc/form.go
+++ b/v2/internal/frontend/desktop/windows/winc/form.go
@@ -136,6 +136,15 @@ func (fm *Form) Minimise() {
}
func (fm *Form) Restore() {
+ // SC_RESTORE param for WM_SYSCOMMAND to restore app if it is minimized
+ const SC_RESTORE = 0xF120
+ // restore the minimized window, if it is
+ w32.SendMessage(
+ fm.hwnd,
+ w32.WM_SYSCOMMAND,
+ SC_RESTORE,
+ 0,
+ )
w32.ShowWindow(fm.hwnd, w32.SW_RESTORE)
}
diff --git a/v2/internal/frontend/desktop/windows/winc/layout.go b/v2/internal/frontend/desktop/windows/winc/layout.go
index da9895205eb..7962dc72609 100644
--- a/v2/internal/frontend/desktop/windows/winc/layout.go
+++ b/v2/internal/frontend/desktop/windows/winc/layout.go
@@ -65,7 +65,7 @@ type SimpleDock struct {
loadedState bool
}
-// DockState gets saved and loaded from json
+// CtlState gets saved and loaded from json
type CtlState struct {
X, Y, Width, Height int
}
diff --git a/v2/internal/frontend/desktop/windows/winc/listview.go b/v2/internal/frontend/desktop/windows/winc/listview.go
index c98fc4c6273..8edfd1c1170 100644
--- a/v2/internal/frontend/desktop/windows/winc/listview.go
+++ b/v2/internal/frontend/desktop/windows/winc/listview.go
@@ -438,7 +438,7 @@ func (lv *ListView) OnEndScroll() *EventManager {
return &lv.onEndScroll
}
-// Message processer
+// Message processor
func (lv *ListView) WndProc(msg uint32, wparam, lparam uintptr) uintptr {
switch msg {
/*case w32.WM_ERASEBKGND:
diff --git a/v2/internal/frontend/desktop/windows/winc/treeview.go b/v2/internal/frontend/desktop/windows/winc/treeview.go
index 9118f3d0569..2cdc0e9364b 100644
--- a/v2/internal/frontend/desktop/windows/winc/treeview.go
+++ b/v2/internal/frontend/desktop/windows/winc/treeview.go
@@ -248,7 +248,7 @@ func (tv *TreeView) OnViewChange() *EventManager {
return &tv.onViewChange
}
-// Message processer
+// Message processor
func (tv *TreeView) WndProc(msg uint32, wparam, lparam uintptr) uintptr {
switch msg {
case w32.WM_NOTIFY:
diff --git a/v2/internal/frontend/desktop/windows/winc/w32/user32.go b/v2/internal/frontend/desktop/windows/winc/w32/user32.go
index 17e0d999143..8ca72ce4b44 100644
--- a/v2/internal/frontend/desktop/windows/winc/w32/user32.go
+++ b/v2/internal/frontend/desktop/windows/winc/w32/user32.go
@@ -24,6 +24,7 @@ var (
procShowWindowAsync = moduser32.NewProc("ShowWindowAsync")
procUpdateWindow = moduser32.NewProc("UpdateWindow")
procCreateWindowEx = moduser32.NewProc("CreateWindowExW")
+ procFindWindowW = moduser32.NewProc("FindWindowW")
procAdjustWindowRect = moduser32.NewProc("AdjustWindowRect")
procAdjustWindowRectEx = moduser32.NewProc("AdjustWindowRectEx")
procDestroyWindow = moduser32.NewProc("DestroyWindow")
@@ -263,6 +264,14 @@ func CreateWindowEx(exStyle uint, className, windowName *uint16,
return HWND(ret)
}
+func FindWindowW(className, windowName *uint16) HWND {
+ ret, _, _ := procFindWindowW.Call(
+ uintptr(unsafe.Pointer(className)),
+ uintptr(unsafe.Pointer(windowName)))
+
+ return HWND(ret)
+}
+
func AdjustWindowRectEx(rect *RECT, style uint, menu bool, exStyle uint) bool {
ret, _, _ := procAdjustWindowRectEx.Call(
uintptr(unsafe.Pointer(rect)),
@@ -1023,9 +1032,11 @@ func EndPaint(hwnd HWND, paint *PAINTSTRUCT) {
uintptr(unsafe.Pointer(paint)))
}
-func GetKeyboardState(lpKeyState *[]byte) bool {
- ret, _, _ := procGetKeyboardState.Call(
- uintptr(unsafe.Pointer(&(*lpKeyState)[0])))
+func GetKeyboardState(keyState []byte) bool {
+ if len(keyState) != 256 {
+ panic("keyState slice must have a size of 256 bytes")
+ }
+ ret, _, _ := procGetKeyboardState.Call(uintptr(unsafe.Pointer(&keyState[0])))
return ret != 0
}
diff --git a/v2/internal/frontend/desktop/windows/window.go b/v2/internal/frontend/desktop/windows/window.go
index 43ec57c7250..a513e875a92 100644
--- a/v2/internal/frontend/desktop/windows/window.go
+++ b/v2/internal/frontend/desktop/windows/window.go
@@ -3,11 +3,10 @@
package windows
import (
+ "github.com/wailsapp/go-webview2/pkg/edge"
"sync"
"unsafe"
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/pkg/edge"
-
"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/win32"
"github.com/wailsapp/wails/v2/internal/system/operatingsystem"
diff --git a/v2/internal/frontend/dispatcher/calls.go b/v2/internal/frontend/dispatcher/calls.go
index ef19c6030a3..ba10629137f 100644
--- a/v2/internal/frontend/dispatcher/calls.go
+++ b/v2/internal/frontend/dispatcher/calls.go
@@ -3,8 +3,9 @@ package dispatcher
import (
"encoding/json"
"fmt"
- "github.com/wailsapp/wails/v2/internal/frontend"
"strings"
+
+ "github.com/wailsapp/wails/v2/internal/frontend"
)
type callMessage struct {
@@ -14,7 +15,6 @@ type callMessage struct {
}
func (d *Dispatcher) processCallMessage(message string, sender frontend.Frontend) (string, error) {
-
var payload callMessage
err := json.Unmarshal([]byte(message[1:]), &payload)
if err != nil {
@@ -49,7 +49,12 @@ func (d *Dispatcher) processCallMessage(message string, sender frontend.Frontend
CallbackID: payload.CallbackID,
}
if err != nil {
- callbackMessage.Err = err.Error()
+ // Use the error formatter if one was provided
+ if d.errfmt != nil {
+ callbackMessage.Err = d.errfmt(err)
+ } else {
+ callbackMessage.Err = err.Error()
+ }
} else {
callbackMessage.Result = result
}
@@ -66,7 +71,7 @@ func (d *Dispatcher) processCallMessage(message string, sender frontend.Frontend
// CallbackMessage defines a message that contains the result of a call
type CallbackMessage struct {
Result interface{} `json:"result"`
- Err string `json:"error"`
+ Err any `json:"error"`
CallbackID string `json:"callbackid"`
}
diff --git a/v2/internal/frontend/dispatcher/dispatcher.go b/v2/internal/frontend/dispatcher/dispatcher.go
index 44a8886e5be..97d9b32e951 100644
--- a/v2/internal/frontend/dispatcher/dispatcher.go
+++ b/v2/internal/frontend/dispatcher/dispatcher.go
@@ -2,11 +2,11 @@ package dispatcher
import (
"context"
-
"github.com/pkg/errors"
"github.com/wailsapp/wails/v2/internal/binding"
"github.com/wailsapp/wails/v2/internal/frontend"
"github.com/wailsapp/wails/v2/internal/logger"
+ "github.com/wailsapp/wails/v2/pkg/options"
)
type Dispatcher struct {
@@ -15,15 +15,17 @@ type Dispatcher struct {
events frontend.Events
bindingsDB *binding.DB
ctx context.Context
+ errfmt options.ErrorFormatter
}
-func NewDispatcher(ctx context.Context, log *logger.Logger, bindings *binding.Bindings, events frontend.Events) *Dispatcher {
+func NewDispatcher(ctx context.Context, log *logger.Logger, bindings *binding.Bindings, events frontend.Events, errfmt options.ErrorFormatter) *Dispatcher {
return &Dispatcher{
log: log,
bindings: bindings,
events: events,
bindingsDB: bindings.DB(),
ctx: ctx,
+ errfmt: errfmt,
}
}
@@ -44,6 +46,8 @@ func (d *Dispatcher) ProcessMessage(message string, sender frontend.Frontend) (s
return d.processWindowMessage(message, sender)
case 'B':
return d.processBrowserMessage(message, sender)
+ case 'D':
+ return d.processDragAndDropMessage(message)
case 'Q':
sender.Quit()
return "", nil
diff --git a/v2/internal/frontend/dispatcher/draganddrop.go b/v2/internal/frontend/dispatcher/draganddrop.go
new file mode 100644
index 00000000000..8266ec712f7
--- /dev/null
+++ b/v2/internal/frontend/dispatcher/draganddrop.go
@@ -0,0 +1,38 @@
+package dispatcher
+
+import (
+ "errors"
+ "strconv"
+ "strings"
+)
+
+func (d *Dispatcher) processDragAndDropMessage(message string) (string, error) {
+ switch message[1] {
+ case 'D':
+ msg := strings.SplitN(message[3:], ":", 3)
+ if len(msg) != 3 {
+ return "", errors.New("Invalid drag and drop Message: " + message)
+ }
+
+ x, err := strconv.Atoi(msg[0])
+ if err != nil {
+ return "", errors.New("Invalid x coordinate in drag and drop Message: " + message)
+ }
+
+ y, err := strconv.Atoi(msg[1])
+ if err != nil {
+ return "", errors.New("Invalid y coordinate in drag and drop Message: " + message)
+ }
+
+ paths := strings.Split(msg[2], "\n")
+ if len(paths) < 1 {
+ return "", errors.New("Invalid drag and drop Message: " + message)
+ }
+
+ d.events.Emit("wails:file-drop", x, y, paths)
+ default:
+ return "", errors.New("Invalid drag and drop Message: " + message)
+ }
+
+ return "", nil
+}
diff --git a/v2/internal/frontend/dispatcher/events.go b/v2/internal/frontend/dispatcher/events.go
index 11680651bb1..12fe7b89e04 100644
--- a/v2/internal/frontend/dispatcher/events.go
+++ b/v2/internal/frontend/dispatcher/events.go
@@ -3,6 +3,7 @@ package dispatcher
import (
"encoding/json"
"errors"
+
"github.com/wailsapp/wails/v2/internal/frontend"
)
diff --git a/v2/internal/frontend/dispatcher/securecalls.go b/v2/internal/frontend/dispatcher/securecalls.go
index 40accaa26e6..8cdcdfb8507 100644
--- a/v2/internal/frontend/dispatcher/securecalls.go
+++ b/v2/internal/frontend/dispatcher/securecalls.go
@@ -3,6 +3,7 @@ package dispatcher
import (
"encoding/json"
"fmt"
+
"github.com/wailsapp/wails/v2/internal/frontend"
)
@@ -13,7 +14,6 @@ type secureCallMessage struct {
}
func (d *Dispatcher) processSecureCallMessage(message string, sender frontend.Frontend) (string, error) {
-
var payload secureCallMessage
err := json.Unmarshal([]byte(message[1:]), &payload)
if err != nil {
diff --git a/v2/internal/frontend/dispatcher/systemcalls.go b/v2/internal/frontend/dispatcher/systemcalls.go
index b810d9beaf1..b090a416ef6 100644
--- a/v2/internal/frontend/dispatcher/systemcalls.go
+++ b/v2/internal/frontend/dispatcher/systemcalls.go
@@ -4,9 +4,10 @@ import (
"encoding/json"
"errors"
"fmt"
- "github.com/wailsapp/wails/v2/pkg/runtime"
"strings"
+ "github.com/wailsapp/wails/v2/pkg/runtime"
+
"github.com/wailsapp/wails/v2/internal/frontend"
)
@@ -23,7 +24,6 @@ type size struct {
}
func (d *Dispatcher) processSystemCall(payload callMessage, sender frontend.Frontend) (interface{}, error) {
-
// Strip prefix
name := strings.TrimPrefix(payload.Name, systemCallPrefix)
@@ -64,5 +64,4 @@ func (d *Dispatcher) processSystemCall(payload callMessage, sender frontend.Fron
default:
return nil, fmt.Errorf("unknown systemcall message: %s", payload.Name)
}
-
}
diff --git a/v2/internal/frontend/frontend.go b/v2/internal/frontend/frontend.go
index 79ee254c241..6b2ccbcae41 100644
--- a/v2/internal/frontend/frontend.go
+++ b/v2/internal/frontend/frontend.go
@@ -48,8 +48,21 @@ const (
type Screen struct {
IsCurrent bool `json:"isCurrent"`
IsPrimary bool `json:"isPrimary"`
- Width int `json:"width"`
- Height int `json:"height"`
+
+ // Deprecated: Please use Size and PhysicalSize
+ Width int `json:"width"`
+ // Deprecated: Please use Size and PhysicalSize
+ Height int `json:"height"`
+
+ // Size is the size of the screen in logical pixel space, used when setting sizes in Wails
+ Size ScreenSize `json:"size"`
+ // PhysicalSize is the physical size of the screen in pixels
+ PhysicalSize ScreenSize `json:"physicalSize"`
+}
+
+type ScreenSize struct {
+ Width int `json:"width"`
+ Height int `json:"height"`
}
// MessageDialogOptions contains the options for the Message dialogs, EG Info, Warning, etc runtime methods
@@ -64,7 +77,7 @@ type MessageDialogOptions struct {
}
type Frontend interface {
- Run(context.Context) error
+ Run(ctx context.Context) error
RunMainLoop()
ExecJS(js string)
Hide()
@@ -108,8 +121,9 @@ type Frontend interface {
WindowIsNormal() bool
WindowIsFullscreen() bool
WindowClose()
+ WindowPrint()
- //Screen
+ // Screen
ScreenGetAll() ([]Screen, error)
// Menus
diff --git a/v2/internal/frontend/runtime/desktop/contextmenu.js b/v2/internal/frontend/runtime/desktop/contextmenu.js
new file mode 100644
index 00000000000..b9c397546e9
--- /dev/null
+++ b/v2/internal/frontend/runtime/desktop/contextmenu.js
@@ -0,0 +1,50 @@
+/*
+--default-contextmenu: auto; (default) will show the default context menu if contentEditable is true OR text has been selected OR element is input or textarea
+--default-contextmenu: show; will always show the default context menu
+--default-contextmenu: hide; will always hide the default context menu
+
+This rule is inherited like normal CSS rules, so nesting works as expected
+*/
+export function processDefaultContextMenu(event) {
+ // Process default context menu
+ const element = event.target;
+ const computedStyle = window.getComputedStyle(element);
+ const defaultContextMenuAction = computedStyle.getPropertyValue("--default-contextmenu").trim();
+ switch (defaultContextMenuAction) {
+ case "show":
+ return;
+ case "hide":
+ event.preventDefault();
+ return;
+ default:
+ // Check if contentEditable is true
+ if (element.isContentEditable) {
+ return;
+ }
+
+ // Check if text has been selected and action is on the selected elements
+ const selection = window.getSelection();
+ const hasSelection = (selection.toString().length > 0)
+ if (hasSelection) {
+ for (let i = 0; i < selection.rangeCount; i++) {
+ const range = selection.getRangeAt(i);
+ const rects = range.getClientRects();
+ for (let j = 0; j < rects.length; j++) {
+ const rect = rects[j];
+ if (document.elementFromPoint(rect.left, rect.top) === element) {
+ return;
+ }
+ }
+ }
+ }
+ // Check if tagname is input or textarea
+ if (element.tagName === "INPUT" || element.tagName === "TEXTAREA") {
+ if (hasSelection || (!element.readOnly && !element.disabled)) {
+ return;
+ }
+ }
+
+ // hide default context menu
+ event.preventDefault();
+ }
+}
diff --git a/v2/internal/frontend/runtime/desktop/draganddrop.js b/v2/internal/frontend/runtime/desktop/draganddrop.js
new file mode 100644
index 00000000000..1582df6d44c
--- /dev/null
+++ b/v2/internal/frontend/runtime/desktop/draganddrop.js
@@ -0,0 +1,243 @@
+/*
+ _ __ _ __
+| | / /___ _(_) /____
+| | /| / / __ `/ / / ___/
+| |/ |/ / /_/ / / (__ )
+|__/|__/\__,_/_/_/____/
+The electron alternative for Go
+(c) Lea Anthony 2019-present
+*/
+
+/* jshint esversion: 9 */
+
+import {EventsOn, EventsOff} from "./events";
+
+const flags = {
+ registered: false,
+ defaultUseDropTarget: true,
+ useDropTarget: true,
+ nextDeactivate: null,
+ nextDeactivateTimeout: null,
+};
+
+const DROP_TARGET_ACTIVE = "wails-drop-target-active";
+
+/**
+ * checkStyleDropTarget checks if the style has the drop target attribute
+ *
+ * @param {CSSStyleDeclaration} style
+ * @returns
+ */
+function checkStyleDropTarget(style) {
+ const cssDropValue = style.getPropertyValue(window.wails.flags.cssDropProperty).trim();
+ if (cssDropValue) {
+ if (cssDropValue === window.wails.flags.cssDropValue) {
+ return true;
+ }
+ // if the element has the drop target attribute, but
+ // the value is not correct, terminate finding process.
+ // This can be useful to block some child elements from being drop targets.
+ return false;
+ }
+ return false;
+}
+
+/**
+ * onDragOver is called when the dragover event is emitted.
+ * @param {DragEvent} e
+ * @returns
+ */
+function onDragOver(e) {
+ if (!window.wails.flags.enableWailsDragAndDrop) {
+ return;
+ }
+ e.preventDefault();
+
+ if (!flags.useDropTarget) {
+ return;
+ }
+
+ const element = e.target;
+
+ // Trigger debounce function to deactivate drop targets
+ if(flags.nextDeactivate) flags.nextDeactivate();
+
+ // if the element is null or element is not child of drop target element
+ if (!element || !checkStyleDropTarget(getComputedStyle(element))) {
+ return;
+ }
+
+ let currentElement = element;
+ while (currentElement) {
+ // check if currentElement is drop target element
+ if (checkStyleDropTarget(currentElement.style)) {
+ currentElement.classList.add(DROP_TARGET_ACTIVE);
+ }
+ currentElement = currentElement.parentElement;
+ }
+}
+
+/**
+ * onDragLeave is called when the dragleave event is emitted.
+ * @param {DragEvent} e
+ * @returns
+ */
+function onDragLeave(e) {
+ if (!window.wails.flags.enableWailsDragAndDrop) {
+ return;
+ }
+ e.preventDefault();
+
+ if (!flags.useDropTarget) {
+ return;
+ }
+
+ // Find the close drop target element
+ if (!e.target || !checkStyleDropTarget(getComputedStyle(e.target))) {
+ return null;
+ }
+
+ // Trigger debounce function to deactivate drop targets
+ if(flags.nextDeactivate) flags.nextDeactivate();
+
+ // Use debounce technique to tacle dragleave events on overlapping elements and drop target elements
+ flags.nextDeactivate = () => {
+ // Deactivate all drop targets, new drop target will be activated on next dragover event
+ Array.from(document.getElementsByClassName(DROP_TARGET_ACTIVE)).forEach(el => el.classList.remove(DROP_TARGET_ACTIVE));
+ // Reset nextDeactivate
+ flags.nextDeactivate = null;
+ // Clear timeout
+ if (flags.nextDeactivateTimeout) {
+ clearTimeout(flags.nextDeactivateTimeout);
+ flags.nextDeactivateTimeout = null;
+ }
+ }
+
+ // Set timeout to deactivate drop targets if not triggered by next drag event
+ flags.nextDeactivateTimeout = setTimeout(() => {
+ if(flags.nextDeactivate) flags.nextDeactivate();
+ }, 50);
+}
+
+/**
+ * onDrop is called when the drop event is emitted.
+ * @param {DragEvent} e
+ * @returns
+ */
+function onDrop(e) {
+ if (!window.wails.flags.enableWailsDragAndDrop) {
+ return;
+ }
+ e.preventDefault();
+
+ if (CanResolveFilePaths()) {
+ // process files
+ let files = [];
+ if (e.dataTransfer.items) {
+ files = [...e.dataTransfer.items].map((item, i) => {
+ if (item.kind === 'file') {
+ return item.getAsFile();
+ }
+ });
+ } else {
+ files = [...e.dataTransfer.files];
+ }
+ window.runtime.ResolveFilePaths(e.x, e.y, files);
+ }
+
+ if (!flags.useDropTarget) {
+ return;
+ }
+
+ // Trigger debounce function to deactivate drop targets
+ if(flags.nextDeactivate) flags.nextDeactivate();
+
+ // Deactivate all drop targets
+ Array.from(document.getElementsByClassName(DROP_TARGET_ACTIVE)).forEach(el => el.classList.remove(DROP_TARGET_ACTIVE));
+}
+
+/**
+ * postMessageWithAdditionalObjects checks the browser's capability of sending postMessageWithAdditionalObjects
+ *
+ * @returns {boolean}
+ * @constructor
+ */
+export function CanResolveFilePaths() {
+ return window.chrome?.webview?.postMessageWithAdditionalObjects != null;
+}
+
+/**
+ * ResolveFilePaths sends drop events to the GO side to resolve file paths on windows.
+ *
+ * @param {number} x
+ * @param {number} y
+ * @param {any[]} files
+ * @constructor
+ */
+export function ResolveFilePaths(x, y, files) {
+ // Only for windows webview2 >= 1.0.1774.30
+ // https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2webmessagereceivedeventargs2?view=webview2-1.0.1823.32#applies-to
+ if (window.chrome?.webview?.postMessageWithAdditionalObjects) {
+ chrome.webview.postMessageWithAdditionalObjects(`file:drop:${x}:${y}`, files);
+ }
+}
+
+/**
+ * Callback for OnFileDrop returns a slice of file path strings when a drop is finished.
+ *
+ * @export
+ * @callback OnFileDropCallback
+ * @param {number} x - x coordinate of the drop
+ * @param {number} y - y coordinate of the drop
+ * @param {string[]} paths - A list of file paths.
+ */
+
+/**
+ * OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings.
+ *
+ * @export
+ * @param {OnFileDropCallback} callback - Callback for OnFileDrop returns a slice of file path strings when a drop is finished.
+ * @param {boolean} [useDropTarget=true] - Only call the callback when the drop finished on an element that has the drop target style. (--wails-drop-target)
+ */
+export function OnFileDrop(callback, useDropTarget) {
+ if (typeof callback !== "function") {
+ console.error("DragAndDropCallback is not a function");
+ return;
+ }
+
+ if (flags.registered) {
+ return;
+ }
+ flags.registered = true;
+
+ const uDTPT = typeof useDropTarget;
+ flags.useDropTarget = uDTPT === "undefined" || uDTPT !== "boolean" ? flags.defaultUseDropTarget : useDropTarget;
+ window.addEventListener('dragover', onDragOver);
+ window.addEventListener('dragleave', onDragLeave);
+ window.addEventListener('drop', onDrop);
+
+ let cb = callback;
+ if (flags.useDropTarget) {
+ cb = function (x, y, paths) {
+ const element = document.elementFromPoint(x, y)
+ // if the element is null or element is not child of drop target element, return null
+ if (!element || !checkStyleDropTarget(getComputedStyle(element))) {
+ return null;
+ }
+ callback(x, y, paths);
+ }
+ }
+
+ EventsOn("wails:file-drop", cb);
+}
+
+/**
+ * OnFileDropOff removes the drag and drop listeners and handlers.
+ */
+export function OnFileDropOff() {
+ window.removeEventListener('dragover', onDragOver);
+ window.removeEventListener('dragleave', onDragLeave);
+ window.removeEventListener('drop', onDrop);
+ EventsOff("wails:file-drop");
+ flags.registered = false;
+}
diff --git a/v2/internal/frontend/runtime/desktop/main.js b/v2/internal/frontend/runtime/desktop/main.js
index 9ec68acd6b8..ae31744ccb7 100644
--- a/v2/internal/frontend/runtime/desktop/main.js
+++ b/v2/internal/frontend/runtime/desktop/main.js
@@ -16,7 +16,8 @@ import * as Window from "./window";
import * as Screen from "./screen";
import * as Browser from "./browser";
import * as Clipboard from "./clipboard";
-
+import * as DragAndDrop from "./draganddrop";
+import * as ContextMenu from "./contextmenu";
export function Quit() {
window.WailsInvoke('Q');
@@ -41,6 +42,7 @@ window.runtime = {
...Browser,
...Screen,
...Clipboard,
+ ...DragAndDrop,
EventsOn,
EventsOnce,
EventsOnMultiple,
@@ -61,7 +63,7 @@ window.wails = {
callbacks,
flags: {
disableScrollbarDrag: false,
- disableWailsDefaultContextMenu: false,
+ disableDefaultContextMenu: false,
enableResize: false,
defaultCursor: null,
borderThickness: 6,
@@ -69,6 +71,9 @@ window.wails = {
deferDragToMouseMove: true,
cssDragProperty: "--wails-draggable",
cssDragValue: "drag",
+ cssDropProperty: "--wails-drop-target",
+ cssDropValue: "drop",
+ enableWailsDragAndDrop: false,
}
};
@@ -78,10 +83,8 @@ if (window.wailsbindings) {
delete window.wails.SetBindings;
}
-// This is evaluated at build time in package.json
-// const dev = 0;
-// const production = 1;
-if (ENV === 1) {
+// (bool) This is evaluated at build time in package.json
+if (!DEBUG) {
delete window.wailsbindings;
}
@@ -113,8 +116,12 @@ window.wails.setCSSDragProperties = function (property, value) {
window.wails.flags.cssDragValue = value;
}
-window.addEventListener('mousedown', (e) => {
+window.wails.setCSSDropProperties = function (property, value) {
+ window.wails.flags.cssDropProperty = property;
+ window.wails.flags.cssDropValue = value;
+}
+window.addEventListener('mousedown', (e) => {
// Check for resizing
if (window.wails.flags.resizeEdge) {
window.WailsInvoke("resize:" + window.wails.flags.resizeEdge);
@@ -189,8 +196,13 @@ window.addEventListener('mousemove', function (e) {
// Setup context menu hook
window.addEventListener('contextmenu', function (e) {
- if (window.wails.flags.disableWailsDefaultContextMenu) {
+ // always show the contextmenu in debug & dev
+ if (DEBUG) return;
+
+ if (window.wails.flags.disableDefaultContextMenu) {
e.preventDefault();
+ } else {
+ ContextMenu.processDefaultContextMenu(e);
}
});
diff --git a/v2/internal/frontend/runtime/dev/main.js b/v2/internal/frontend/runtime/dev/main.js
index e6e05be54d6..c7f31b0f27d 100644
--- a/v2/internal/frontend/runtime/dev/main.js
+++ b/v2/internal/frontend/runtime/dev/main.js
@@ -80,7 +80,7 @@ function handleDisconnect() {
function _connect() {
if (websocket == null) {
- websocket = new WebSocket('ws://' + window.location.host + '/wails/ipc');
+ websocket = new WebSocket((window.location.protocol.startsWith("https") ? "wss://" : "ws://") + window.location.host + "/wails/ipc");
websocket.onopen = handleConnect;
websocket.onerror = function (e) {
e.stopImmediatePropagation();
diff --git a/v2/internal/frontend/runtime/events.go b/v2/internal/frontend/runtime/events.go
index ac9d6299c3f..1f2e0a6e4b7 100644
--- a/v2/internal/frontend/runtime/events.go
+++ b/v2/internal/frontend/runtime/events.go
@@ -143,7 +143,7 @@ func (e *Events) notifyBackend(eventName string, data ...interface{}) {
}
// Do we have items to delete?
- if itemsToDelete == true {
+ if itemsToDelete {
// Create a new Listeners slice
var newListeners []*eventListener
diff --git a/v2/internal/frontend/runtime/ipc_websocket.js b/v2/internal/frontend/runtime/ipc_websocket.js
index d5dca66af51..a0d6b4a7026 100644
--- a/v2/internal/frontend/runtime/ipc_websocket.js
+++ b/v2/internal/frontend/runtime/ipc_websocket.js
@@ -1,10 +1,10 @@
-(()=>{function D(t){console.log("%c wails dev %c "+t+" ","background: #aa0000; color: #fff; border-radius: 3px 0px 0px 3px; padding: 1px; font-size: 0.7rem","background: #009900; color: #fff; border-radius: 0px 3px 3px 0px; padding: 1px; font-size: 0.7rem")}function p(){}var A=t=>t;function N(t){return t()}function it(){return Object.create(null)}function b(t){t.forEach(N)}function w(t){return typeof t=="function"}function L(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function ot(t){return Object.keys(t).length===0}function rt(t,...e){if(t==null)return p;let n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function st(t,e,n){t.$$.on_destroy.push(rt(e,n))}var ct=typeof window!="undefined",Ot=ct?()=>window.performance.now():()=>Date.now(),P=ct?t=>requestAnimationFrame(t):p;var x=new Set;function lt(t){x.forEach(e=>{e.c(t)||(x.delete(e),e.f())}),x.size!==0&&P(lt)}function Dt(t){let e;return x.size===0&&P(lt),{promise:new Promise(n=>{x.add(e={c:t,f:n})}),abort(){x.delete(e)}}}var ut=!1;function At(){ut=!0}function Lt(){ut=!1}function Bt(t,e){t.appendChild(e)}function at(t,e,n){let i=R(t);if(!i.getElementById(e)){let o=B("style");o.id=e,o.textContent=n,ft(i,o)}}function R(t){if(!t)return document;let e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Tt(t){let e=B("style");return ft(R(t),e),e.sheet}function ft(t,e){return Bt(t.head||t,e),e.sheet}function W(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function B(t){return document.createElement(t)}function Jt(t){return document.createTextNode(t)}function dt(){return Jt("")}function ht(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function zt(t){return Array.from(t.childNodes)}function Ht(t,e,{bubbles:n=!1,cancelable:i=!1}={}){let o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,i,e),o}var T=new Map,J=0;function Gt(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function qt(t,e){let n={stylesheet:Tt(e),rules:{}};return T.set(t,n),n}function _t(t,e,n,i,o,c,s,l=0){let f=16.666/i,r=`{
+(()=>{function D(t){console.log("%c wails dev %c "+t+" ","background: #aa0000; color: #fff; border-radius: 3px 0px 0px 3px; padding: 1px; font-size: 0.7rem","background: #009900; color: #fff; border-radius: 0px 3px 3px 0px; padding: 1px; font-size: 0.7rem")}function _(){}var A=t=>t;function N(t){return t()}function it(){return Object.create(null)}function b(t){t.forEach(N)}function w(t){return typeof t=="function"}function L(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function ot(t){return Object.keys(t).length===0}function rt(t,...e){if(t==null)return _;let n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function st(t,e,n){t.$$.on_destroy.push(rt(e,n))}var ct=typeof window!="undefined",Ot=ct?()=>window.performance.now():()=>Date.now(),P=ct?t=>requestAnimationFrame(t):_;var x=new Set;function lt(t){x.forEach(e=>{e.c(t)||(x.delete(e),e.f())}),x.size!==0&&P(lt)}function Dt(t){let e;return x.size===0&&P(lt),{promise:new Promise(n=>{x.add(e={c:t,f:n})}),abort(){x.delete(e)}}}var ut=!1;function At(){ut=!0}function Lt(){ut=!1}function Bt(t,e){t.appendChild(e)}function at(t,e,n){let i=R(t);if(!i.getElementById(e)){let o=B("style");o.id=e,o.textContent=n,ft(i,o)}}function R(t){if(!t)return document;let e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Tt(t){let e=B("style");return ft(R(t),e),e.sheet}function ft(t,e){return Bt(t.head||t,e),e.sheet}function W(t,e,n){t.insertBefore(e,n||null)}function S(t){t.parentNode.removeChild(t)}function B(t){return document.createElement(t)}function Jt(t){return document.createTextNode(t)}function dt(){return Jt("")}function ht(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function zt(t){return Array.from(t.childNodes)}function Ht(t,e,{bubbles:n=!1,cancelable:i=!1}={}){let o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,i,e),o}var T=new Map,J=0;function Gt(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function qt(t,e){let n={stylesheet:Tt(e),rules:{}};return T.set(t,n),n}function pt(t,e,n,i,o,c,s,l=0){let f=16.666/i,r=`{
`;for(let g=0;g<=1;g+=f){let F=e+(n-e)*c(g);r+=g*100+`%{${s(F,1-F)}}
`}let y=r+`100% {${s(n,1-n)}}
-}`,a=`__svelte_${Gt(y)}_${l}`,u=R(t),{stylesheet:h,rules:_}=T.get(u)||qt(u,t);_[a]||(_[a]=!0,h.insertRule(`@keyframes ${a} ${y}`,h.cssRules.length));let v=t.style.animation||"";return t.style.animation=`${v?`${v}, `:""}${a} ${i}ms linear ${o}ms 1 both`,J+=1,a}function Kt(t,e){let n=(t.style.animation||"").split(", "),i=n.filter(e?c=>c.indexOf(e)<0:c=>c.indexOf("__svelte")===-1),o=n.length-i.length;o&&(t.style.animation=i.join(", "),J-=o,J||Nt())}function Nt(){P(()=>{J||(T.forEach(t=>{let{ownerNode:e}=t.stylesheet;e&&S(e)}),T.clear())})}var V;function C(t){V=t}var k=[];var pt=[],z=[],mt=[],Pt=Promise.resolve(),U=!1;function Rt(){U||(U=!0,Pt.then(yt))}function $(t){z.push(t)}var X=new Set,H=0;function yt(){let t=V;do{for(;H{E=null})),E}function Z(t,e,n){t.dispatchEvent(Ht(`${e?"intro":"outro"}${n}`))}var G=new Set,m;function gt(){m={r:0,c:[],p:m}}function bt(){m.r||b(m.c),m=m.p}function I(t,e){t&&t.i&&(G.delete(t),t.i(e))}function Q(t,e,n,i){if(t&&t.o){if(G.has(t))return;G.add(t),m.c.push(()=>{G.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}var Ut={duration:0};function Y(t,e,n,i){let o=e(t,n),c=i?0:1,s=null,l=null,f=null;function r(){f&&Kt(t,f)}function y(u,h){let _=u.b-c;return h*=Math.abs(_),{a:c,b:u.b,d:_,duration:h,start:u.start,end:u.start+h,group:u.group}}function a(u){let{delay:h=0,duration:_=300,easing:v=A,tick:g=p,css:F}=o||Ut,K={start:Ot()+h,b:u};u||(K.group=m,m.r+=1),s||l?l=K:(F&&(r(),f=_t(t,c,u,_,h,v,F)),u&&g(0,1),s=y(K,_),$(()=>Z(t,u,"start")),Dt(O=>{if(l&&O>l.start&&(s=y(l,_),l=null,Z(t,s.b,"start"),F&&(r(),f=_t(t,c,s.b,s.duration,0,v,o.css))),s){if(O>=s.end)g(c=s.b,1-c),Z(t,s.b,"end"),l||(s.b?r():--s.group.r||b(s.group.c)),s=null;else if(O>=s.start){let jt=O-s.start;c=s.a+s.d*v(jt/s.duration),g(c,1-c)}}return!!(s||l)}))}return{run(u){w(o)?Vt().then(()=>{o=o(),a(u)}):a(u)},end(){r(),s=l=null}}}var le=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var ue=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);function Xt(t,e,n,i){let{fragment:o,after_update:c}=t.$$;o&&o.m(e,n),i||$(()=>{let s=t.$$.on_mount.map(N).filter(w);t.$$.on_destroy?t.$$.on_destroy.push(...s):b(s),t.$$.on_mount=[]}),c.forEach($)}function wt(t,e){let n=t.$$;n.fragment!==null&&(b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Zt(t,e){t.$$.dirty[0]===-1&&(k.push(t),Rt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{let _=h.length?h[0]:u;return r.ctx&&o(r.ctx[a],r.ctx[a]=_)&&(!r.skip_bound&&r.bound[a]&&r.bound[a](_),y&&Zt(t,a)),u}):[],r.update(),y=!0,b(r.before_update),r.fragment=i?i(r.ctx):!1,e.target){if(e.hydrate){At();let a=zt(e.target);r.fragment&&r.fragment.l(a),a.forEach(S)}else r.fragment&&r.fragment.c();e.intro&&I(t.$$.fragment),Xt(t,e.target,e.anchor,e.customElement),Lt(),yt()}C(f)}var Qt;typeof HTMLElement=="function"&&(Qt=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(N).filter(w);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){b(this.$$.on_disconnect)}$destroy(){wt(this,1),this.$destroy=p}$on(t,e){if(!w(e))return p;let n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{let i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!ot(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var tt=class{$destroy(){wt(this,1),this.$destroy=p}$on(e,n){if(!w(n))return p;let i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(e){this.$$set&&!ot(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var M=[];function Ft(t,e=p){let n,i=new Set;function o(l){if(L(t,l)&&(t=l,n)){let f=!M.length;for(let r of i)r[1](),M.push(r,t);if(f){for(let r=0;r{i.delete(r),i.size===0&&(n(),n=null)}}return{set:o,update:c,subscribe:s}}var q=Ft(!1);function xt(){q.set(!0)}function $t(){q.set(!1)}function et(t,{delay:e=0,duration:n=400,easing:i=A}={}){let o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:i,css:c=>`opacity: ${c*o}`}}function Yt(t){at(t,"svelte-181h7z",`.wails-reconnect-overlay.svelte-181h7z{position:fixed;top:0;left:0;width:100%;height:100%;backdrop-filter:blur(2px) saturate(0%) contrast(50%) brightness(25%);z-index:999999
+}`,a=`__svelte_${Gt(y)}_${l}`,u=R(t),{stylesheet:h,rules:p}=T.get(u)||qt(u,t);p[a]||(p[a]=!0,h.insertRule(`@keyframes ${a} ${y}`,h.cssRules.length));let v=t.style.animation||"";return t.style.animation=`${v?`${v}, `:""}${a} ${i}ms linear ${o}ms 1 both`,J+=1,a}function Kt(t,e){let n=(t.style.animation||"").split(", "),i=n.filter(e?c=>c.indexOf(e)<0:c=>c.indexOf("__svelte")===-1),o=n.length-i.length;o&&(t.style.animation=i.join(", "),J-=o,J||Nt())}function Nt(){P(()=>{J||(T.forEach(t=>{let{ownerNode:e}=t.stylesheet;e&&S(e)}),T.clear())})}var V;function C(t){V=t}var k=[];var _t=[],z=[],mt=[],Pt=Promise.resolve(),U=!1;function Rt(){U||(U=!0,Pt.then(yt))}function $(t){z.push(t)}var X=new Set,H=0;function yt(){let t=V;do{for(;H{E=null})),E}function Z(t,e,n){t.dispatchEvent(Ht(`${e?"intro":"outro"}${n}`))}var G=new Set,m;function gt(){m={r:0,c:[],p:m}}function bt(){m.r||b(m.c),m=m.p}function I(t,e){t&&t.i&&(G.delete(t),t.i(e))}function Q(t,e,n,i){if(t&&t.o){if(G.has(t))return;G.add(t),m.c.push(()=>{G.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}var Ut={duration:0};function Y(t,e,n,i){let o=e(t,n),c=i?0:1,s=null,l=null,f=null;function r(){f&&Kt(t,f)}function y(u,h){let p=u.b-c;return h*=Math.abs(p),{a:c,b:u.b,d:p,duration:h,start:u.start,end:u.start+h,group:u.group}}function a(u){let{delay:h=0,duration:p=300,easing:v=A,tick:g=_,css:F}=o||Ut,K={start:Ot()+h,b:u};u||(K.group=m,m.r+=1),s||l?l=K:(F&&(r(),f=pt(t,c,u,p,h,v,F)),u&&g(0,1),s=y(K,p),$(()=>Z(t,u,"start")),Dt(O=>{if(l&&O>l.start&&(s=y(l,p),l=null,Z(t,s.b,"start"),F&&(r(),f=pt(t,c,s.b,s.duration,0,v,o.css))),s){if(O>=s.end)g(c=s.b,1-c),Z(t,s.b,"end"),l||(s.b?r():--s.group.r||b(s.group.c)),s=null;else if(O>=s.start){let jt=O-s.start;c=s.a+s.d*v(jt/s.duration),g(c,1-c)}}return!!(s||l)}))}return{run(u){w(o)?Vt().then(()=>{o=o(),a(u)}):a(u)},end(){r(),s=l=null}}}var le=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var ue=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);function Xt(t,e,n,i){let{fragment:o,after_update:c}=t.$$;o&&o.m(e,n),i||$(()=>{let s=t.$$.on_mount.map(N).filter(w);t.$$.on_destroy?t.$$.on_destroy.push(...s):b(s),t.$$.on_mount=[]}),c.forEach($)}function wt(t,e){let n=t.$$;n.fragment!==null&&(b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Zt(t,e){t.$$.dirty[0]===-1&&(k.push(t),Rt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{let p=h.length?h[0]:u;return r.ctx&&o(r.ctx[a],r.ctx[a]=p)&&(!r.skip_bound&&r.bound[a]&&r.bound[a](p),y&&Zt(t,a)),u}):[],r.update(),y=!0,b(r.before_update),r.fragment=i?i(r.ctx):!1,e.target){if(e.hydrate){At();let a=zt(e.target);r.fragment&&r.fragment.l(a),a.forEach(S)}else r.fragment&&r.fragment.c();e.intro&&I(t.$$.fragment),Xt(t,e.target,e.anchor,e.customElement),Lt(),yt()}C(f)}var Qt;typeof HTMLElement=="function"&&(Qt=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(N).filter(w);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){b(this.$$.on_disconnect)}$destroy(){wt(this,1),this.$destroy=_}$on(t,e){if(!w(e))return _;let n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{let i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!ot(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var tt=class{$destroy(){wt(this,1),this.$destroy=_}$on(e,n){if(!w(n))return _;let i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(e){this.$$set&&!ot(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var M=[];function Ft(t,e=_){let n,i=new Set;function o(l){if(L(t,l)&&(t=l,n)){let f=!M.length;for(let r of i)r[1](),M.push(r,t);if(f){for(let r=0;r{i.delete(r),i.size===0&&(n(),n=null)}}return{set:o,update:c,subscribe:s}}var q=Ft(!1);function xt(){q.set(!0)}function $t(){q.set(!1)}function et(t,{delay:e=0,duration:n=400,easing:i=A}={}){let o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:i,css:c=>`opacity: ${c*o}`}}function Yt(t){at(t,"svelte-181h7z",`.wails-reconnect-overlay.svelte-181h7z{position:fixed;top:0;left:0;width:100%;height:100%;backdrop-filter:blur(2px) saturate(0%) contrast(50%) brightness(25%);z-index:999999
}.wails-reconnect-overlay-content.svelte-181h7z{position:relative;top:50%;transform:translateY(-50%);margin:0;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAAA7CAMAAAAEsocZAAAC91BMVEUAAACzQ0PjMjLkMjLZLS7XLS+vJCjkMjKlEx6uGyHjMDGiFx7GJyrAISjUKy3mMz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sHNzy+U7IlCYROxtMpIjR0ceoQVnowracLLpAQWETqV361bPoFo3cEbz2zYLZM7t3HWXcxmiBOgttS1ycWkTXMWh4mGigdug9DFdttqCFgTN6nD0q1XEVSoCxEjyFCi2eNC6Z69MRVIImJ6JQSf5gcFVCuF+aDhCa1F6MJFDaiNBQAh2TMfWBjhmLsAxUjG/fmjs0qjJck8D0GPBcuUuZW1LS/tIsPzqmQt17PvZQknlwnf4tHDBc+7t5VV3QQCkdc+Ur8/hdrz0but0RCumWiYbiKmLJ7EVbRomj4Q7+y5wsaXvfTGFpQcHB7n2WbG4MGdniw2Tm8xl5Yhr7MrSYHQ3uampz10aWyHyuzxvqaW/6W4MjXAUD3QV2aw97ZxhGjxCohYf5TpTHMXU1BbsAuoFnkRygVieIGAbqiF7rrH4rfWpKJouBCtyHJF8ctEyGubBa+C6NsMYEUonJFITHZqWBxXUA12Dv76Tf/PgOBmeNiiLG1pcKo1HAq8jLpY4JU1yWEixVNaOgoRJAKBSZHTZTU+wJOMtUDZvlVITC6FTlksyrEBoPHXpxxbzdaqzigUtVDkJVIOtVQ9UEOR4VGUh/kHWq0edJ6CxnZ+eePXva2bnY/cF/I1RLLf8vvwDANdMSMegxcAAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:center
}.wails-reconnect-overlay-loadingspinner.svelte-181h7z{pointer-events:none;width:2.5em;height:2.5em;border:.4em solid transparent;border-color:#f00 #eee0 #f00 #eee0;border-radius:50%;animation:svelte-181h7z-loadingspin 1s linear infinite;margin:auto;padding:2.5em
- }@keyframes svelte-181h7z-loadingspin{100%{transform:rotate(360deg)}}`)}function Mt(t){let e,n,i;return{c(){e=B("div"),e.innerHTML='',ht(e,"class","wails-reconnect-overlay svelte-181h7z")},m(o,c){W(o,e,c),i=!0},i(o){i||($(()=>{n||(n=Y(e,et,{duration:300},!0)),n.run(1)}),i=!0)},o(o){n||(n=Y(e,et,{duration:300},!1)),n.run(0),i=!1},d(o){o&&S(e),o&&n&&n.end()}}}function te(t){let e,n,i=t[0]&&Mt(t);return{c(){i&&i.c(),e=dt()},m(o,c){i&&i.m(o,c),W(o,e,c),n=!0},p(o,[c]){o[0]?i?c&1&&I(i,1):(i=Mt(o),i.c(),I(i,1),i.m(e.parentNode,e)):i&&(gt(),Q(i,1,1,()=>{i=null}),bt())},i(o){n||(I(i),n=!0)},o(o){Q(i),n=!1},d(o){i&&i.d(o),o&&S(e)}}}function ee(t,e,n){let i;return st(t,q,o=>n(0,i=o)),[i]}var St=class extends tt{constructor(e){super();vt(this,e,ee,te,L,{},Yt)}},Ct=St;var ne={},nt=null,j=[];window.WailsInvoke=t=>{if(!nt){console.log("Queueing: "+t),j.push(t);return}nt(t)};window.addEventListener("DOMContentLoaded",()=>{ne.overlay=new Ct({target:document.body,anchor:document.querySelector("#wails-spinner")})});var d=null,kt;window.onbeforeunload=function(){d&&(d.onclose=function(){},d.close(),d=null)};It();function ie(){nt=t=>{d.send(t)};for(let t=0;t
',ht(e,"class","wails-reconnect-overlay svelte-181h7z")},m(o,c){W(o,e,c),i=!0},i(o){i||($(()=>{n||(n=Y(e,et,{duration:300},!0)),n.run(1)}),i=!0)},o(o){n||(n=Y(e,et,{duration:300},!1)),n.run(0),i=!1},d(o){o&&S(e),o&&n&&n.end()}}}function te(t){let e,n,i=t[0]&&Mt(t);return{c(){i&&i.c(),e=dt()},m(o,c){i&&i.m(o,c),W(o,e,c),n=!0},p(o,[c]){o[0]?i?c&1&&I(i,1):(i=Mt(o),i.c(),I(i,1),i.m(e.parentNode,e)):i&&(gt(),Q(i,1,1,()=>{i=null}),bt())},i(o){n||(I(i),n=!0)},o(o){Q(i),n=!1},d(o){i&&i.d(o),o&&S(e)}}}function ee(t,e,n){let i;return st(t,q,o=>n(0,i=o)),[i]}var St=class extends tt{constructor(e){super();vt(this,e,ee,te,L,{},Yt)}},Ct=St;var ne={},nt=null,j=[];window.WailsInvoke=t=>{if(!nt){console.log("Queueing: "+t),j.push(t);return}nt(t)};window.addEventListener("DOMContentLoaded",()=>{ne.overlay=new Ct({target:document.body,anchor:document.querySelector("#wails-spinner")})});var d=null,kt;window.onbeforeunload=function(){d&&(d.onclose=function(){},d.close(),d=null)};It();function ie(){nt=t=>{d.send(t)};for(let t=0;t= 14",
"less": "*",
"sass": "*",
"stylus": "*",
+ "sugarss": "*",
"terser": "^5.4.0"
},
"peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
"less": {
"optional": true
},
@@ -1890,6 +1905,9 @@
"stylus": {
"optional": true
},
+ "sugarss": {
+ "optional": true
+ },
"terser": {
"optional": true
}
@@ -2518,9 +2536,9 @@
}
},
"fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
"optional": true
},
@@ -2829,9 +2847,9 @@
"dev": true
},
"nanoid": {
- "version": "3.3.4",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
- "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"dev": true
},
"nice-try": {
@@ -2964,12 +2982,12 @@
"dev": true
},
"postcss": {
- "version": "8.4.18",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz",
- "integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==",
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"dev": true,
"requires": {
- "nanoid": "^3.3.4",
+ "nanoid": "^3.3.6",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
}
@@ -3036,9 +3054,9 @@
}
},
"rollup": {
- "version": "2.78.1",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz",
- "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==",
+ "version": "2.79.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz",
+ "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
"dev": true,
"requires": {
"fsevents": "~2.3.2"
@@ -3057,9 +3075,9 @@
"dev": true
},
"semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true
},
"shebang-command": {
@@ -3320,16 +3338,16 @@
}
},
"vite": {
- "version": "3.1.8",
- "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.8.tgz",
- "integrity": "sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg==",
+ "version": "3.2.10",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.10.tgz",
+ "integrity": "sha512-Dx3olBo/ODNiMVk/cA5Yft9Ws+snLOXrhLtrI3F4XLt4syz2Yg8fayZMWScPKoz12v5BUv7VEmQHnsfpY80fYw==",
"dev": true,
"requires": {
"esbuild": "^0.15.9",
"fsevents": "~2.3.2",
- "postcss": "^8.4.16",
+ "postcss": "^8.4.18",
"resolve": "^1.22.1",
- "rollup": "~2.78.0"
+ "rollup": "^2.79.1"
}
},
"vitest": {
diff --git a/v2/internal/frontend/runtime/package.json b/v2/internal/frontend/runtime/package.json
index aa6c3aad5be..09ff4d50f83 100644
--- a/v2/internal/frontend/runtime/package.json
+++ b/v2/internal/frontend/runtime/package.json
@@ -7,8 +7,8 @@
"build": "run-p build:*",
"build:ipc-desktop": "npx esbuild desktop/ipc.js --bundle --minify --outfile=ipc.js",
"build:ipc-dev": "cd dev && npm install && npm run build",
- "build:runtime-desktop-prod": "npx esbuild desktop/main.js --bundle --minify --outfile=runtime_prod_desktop.js --define:ENV=1",
- "build:runtime-desktop-dev": "npx esbuild desktop/main.js --bundle --sourcemap=inline --outfile=runtime_dev_desktop.js --define:ENV=0",
+ "build:runtime-desktop-prod": "npx esbuild desktop/main.js --bundle --minify --outfile=runtime_prod_desktop.js --define:DEBUG=false",
+ "build:runtime-desktop-debug": "npx esbuild desktop/main.js --bundle --sourcemap=inline --outfile=runtime_debug_desktop.js --define:DEBUG=true",
"test": "vitest"
},
"author": "Lea Anthony ",
diff --git a/v2/internal/frontend/runtime/runtime_debug_desktop.go b/v2/internal/frontend/runtime/runtime_debug_desktop.go
new file mode 100644
index 00000000000..8dff343c05d
--- /dev/null
+++ b/v2/internal/frontend/runtime/runtime_debug_desktop.go
@@ -0,0 +1,8 @@
+//go:build debug || !production
+
+package runtime
+
+import _ "embed"
+
+//go:embed runtime_debug_desktop.js
+var RuntimeDesktopJS []byte
diff --git a/v2/internal/frontend/runtime/runtime_debug_desktop.js b/v2/internal/frontend/runtime/runtime_debug_desktop.js
new file mode 100644
index 00000000000..bd8c27bed8e
--- /dev/null
+++ b/v2/internal/frontend/runtime/runtime_debug_desktop.js
@@ -0,0 +1,770 @@
+(() => {
+ var __defProp = Object.defineProperty;
+ var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+ };
+
+ // desktop/log.js
+ var log_exports = {};
+ __export(log_exports, {
+ LogDebug: () => LogDebug,
+ LogError: () => LogError,
+ LogFatal: () => LogFatal,
+ LogInfo: () => LogInfo,
+ LogLevel: () => LogLevel,
+ LogPrint: () => LogPrint,
+ LogTrace: () => LogTrace,
+ LogWarning: () => LogWarning,
+ SetLogLevel: () => SetLogLevel
+ });
+ function sendLogMessage(level, message) {
+ window.WailsInvoke("L" + level + message);
+ }
+ function LogTrace(message) {
+ sendLogMessage("T", message);
+ }
+ function LogPrint(message) {
+ sendLogMessage("P", message);
+ }
+ function LogDebug(message) {
+ sendLogMessage("D", message);
+ }
+ function LogInfo(message) {
+ sendLogMessage("I", message);
+ }
+ function LogWarning(message) {
+ sendLogMessage("W", message);
+ }
+ function LogError(message) {
+ sendLogMessage("E", message);
+ }
+ function LogFatal(message) {
+ sendLogMessage("F", message);
+ }
+ function SetLogLevel(loglevel) {
+ sendLogMessage("S", loglevel);
+ }
+ var LogLevel = {
+ TRACE: 1,
+ DEBUG: 2,
+ INFO: 3,
+ WARNING: 4,
+ ERROR: 5
+ };
+
+ // desktop/events.js
+ var Listener = class {
+ constructor(eventName, callback, maxCallbacks) {
+ this.eventName = eventName;
+ this.maxCallbacks = maxCallbacks || -1;
+ this.Callback = (data) => {
+ callback.apply(null, data);
+ if (this.maxCallbacks === -1) {
+ return false;
+ }
+ this.maxCallbacks -= 1;
+ return this.maxCallbacks === 0;
+ };
+ }
+ };
+ var eventListeners = {};
+ function EventsOnMultiple(eventName, callback, maxCallbacks) {
+ eventListeners[eventName] = eventListeners[eventName] || [];
+ const thisListener = new Listener(eventName, callback, maxCallbacks);
+ eventListeners[eventName].push(thisListener);
+ return () => listenerOff(thisListener);
+ }
+ function EventsOn(eventName, callback) {
+ return EventsOnMultiple(eventName, callback, -1);
+ }
+ function EventsOnce(eventName, callback) {
+ return EventsOnMultiple(eventName, callback, 1);
+ }
+ function notifyListeners(eventData) {
+ let eventName = eventData.name;
+ if (eventListeners[eventName]) {
+ const newEventListenerList = eventListeners[eventName].slice();
+ for (let count = eventListeners[eventName].length - 1; count >= 0; count -= 1) {
+ const listener = eventListeners[eventName][count];
+ let data = eventData.data;
+ const destroy = listener.Callback(data);
+ if (destroy) {
+ newEventListenerList.splice(count, 1);
+ }
+ }
+ if (newEventListenerList.length === 0) {
+ removeListener(eventName);
+ } else {
+ eventListeners[eventName] = newEventListenerList;
+ }
+ }
+ }
+ function EventsNotify(notifyMessage) {
+ let message;
+ try {
+ message = JSON.parse(notifyMessage);
+ } catch (e) {
+ const error = "Invalid JSON passed to Notify: " + notifyMessage;
+ throw new Error(error);
+ }
+ notifyListeners(message);
+ }
+ function EventsEmit(eventName) {
+ const payload = {
+ name: eventName,
+ data: [].slice.apply(arguments).slice(1)
+ };
+ notifyListeners(payload);
+ window.WailsInvoke("EE" + JSON.stringify(payload));
+ }
+ function removeListener(eventName) {
+ delete eventListeners[eventName];
+ window.WailsInvoke("EX" + eventName);
+ }
+ function EventsOff(eventName, ...additionalEventNames) {
+ removeListener(eventName);
+ if (additionalEventNames.length > 0) {
+ additionalEventNames.forEach((eventName2) => {
+ removeListener(eventName2);
+ });
+ }
+ }
+ function listenerOff(listener) {
+ const eventName = listener.eventName;
+ eventListeners[eventName] = eventListeners[eventName].filter((l) => l !== listener);
+ if (eventListeners[eventName].length === 0) {
+ removeListener(eventName);
+ }
+ }
+
+ // desktop/calls.js
+ var callbacks = {};
+ function cryptoRandom() {
+ var array = new Uint32Array(1);
+ return window.crypto.getRandomValues(array)[0];
+ }
+ function basicRandom() {
+ return Math.random() * 9007199254740991;
+ }
+ var randomFunc;
+ if (window.crypto) {
+ randomFunc = cryptoRandom;
+ } else {
+ randomFunc = basicRandom;
+ }
+ function Call(name, args, timeout) {
+ if (timeout == null) {
+ timeout = 0;
+ }
+ return new Promise(function(resolve, reject) {
+ var callbackID;
+ do {
+ callbackID = name + "-" + randomFunc();
+ } while (callbacks[callbackID]);
+ var timeoutHandle;
+ if (timeout > 0) {
+ timeoutHandle = setTimeout(function() {
+ reject(Error("Call to " + name + " timed out. Request ID: " + callbackID));
+ }, timeout);
+ }
+ callbacks[callbackID] = {
+ timeoutHandle,
+ reject,
+ resolve
+ };
+ try {
+ const payload = {
+ name,
+ args,
+ callbackID
+ };
+ window.WailsInvoke("C" + JSON.stringify(payload));
+ } catch (e) {
+ console.error(e);
+ }
+ });
+ }
+ window.ObfuscatedCall = (id, args, timeout) => {
+ if (timeout == null) {
+ timeout = 0;
+ }
+ return new Promise(function(resolve, reject) {
+ var callbackID;
+ do {
+ callbackID = id + "-" + randomFunc();
+ } while (callbacks[callbackID]);
+ var timeoutHandle;
+ if (timeout > 0) {
+ timeoutHandle = setTimeout(function() {
+ reject(Error("Call to method " + id + " timed out. Request ID: " + callbackID));
+ }, timeout);
+ }
+ callbacks[callbackID] = {
+ timeoutHandle,
+ reject,
+ resolve
+ };
+ try {
+ const payload = {
+ id,
+ args,
+ callbackID
+ };
+ window.WailsInvoke("c" + JSON.stringify(payload));
+ } catch (e) {
+ console.error(e);
+ }
+ });
+ };
+ function Callback(incomingMessage) {
+ let message;
+ try {
+ message = JSON.parse(incomingMessage);
+ } catch (e) {
+ const error = `Invalid JSON passed to callback: ${e.message}. Message: ${incomingMessage}`;
+ runtime.LogDebug(error);
+ throw new Error(error);
+ }
+ let callbackID = message.callbackid;
+ let callbackData = callbacks[callbackID];
+ if (!callbackData) {
+ const error = `Callback '${callbackID}' not registered!!!`;
+ console.error(error);
+ throw new Error(error);
+ }
+ clearTimeout(callbackData.timeoutHandle);
+ delete callbacks[callbackID];
+ if (message.error) {
+ callbackData.reject(message.error);
+ } else {
+ callbackData.resolve(message.result);
+ }
+ }
+
+ // desktop/bindings.js
+ window.go = {};
+ function SetBindings(bindingsMap) {
+ try {
+ bindingsMap = JSON.parse(bindingsMap);
+ } catch (e) {
+ console.error(e);
+ }
+ window.go = window.go || {};
+ Object.keys(bindingsMap).forEach((packageName) => {
+ window.go[packageName] = window.go[packageName] || {};
+ Object.keys(bindingsMap[packageName]).forEach((structName) => {
+ window.go[packageName][structName] = window.go[packageName][structName] || {};
+ Object.keys(bindingsMap[packageName][structName]).forEach((methodName) => {
+ window.go[packageName][structName][methodName] = function() {
+ let timeout = 0;
+ function dynamic() {
+ const args = [].slice.call(arguments);
+ return Call([packageName, structName, methodName].join("."), args, timeout);
+ }
+ dynamic.setTimeout = function(newTimeout) {
+ timeout = newTimeout;
+ };
+ dynamic.getTimeout = function() {
+ return timeout;
+ };
+ return dynamic;
+ }();
+ });
+ });
+ });
+ }
+
+ // desktop/window.js
+ var window_exports = {};
+ __export(window_exports, {
+ WindowCenter: () => WindowCenter,
+ WindowFullscreen: () => WindowFullscreen,
+ WindowGetPosition: () => WindowGetPosition,
+ WindowGetSize: () => WindowGetSize,
+ WindowHide: () => WindowHide,
+ WindowIsFullscreen: () => WindowIsFullscreen,
+ WindowIsMaximised: () => WindowIsMaximised,
+ WindowIsMinimised: () => WindowIsMinimised,
+ WindowIsNormal: () => WindowIsNormal,
+ WindowMaximise: () => WindowMaximise,
+ WindowMinimise: () => WindowMinimise,
+ WindowReload: () => WindowReload,
+ WindowReloadApp: () => WindowReloadApp,
+ WindowSetAlwaysOnTop: () => WindowSetAlwaysOnTop,
+ WindowSetBackgroundColour: () => WindowSetBackgroundColour,
+ WindowSetDarkTheme: () => WindowSetDarkTheme,
+ WindowSetLightTheme: () => WindowSetLightTheme,
+ WindowSetMaxSize: () => WindowSetMaxSize,
+ WindowSetMinSize: () => WindowSetMinSize,
+ WindowSetPosition: () => WindowSetPosition,
+ WindowSetSize: () => WindowSetSize,
+ WindowSetSystemDefaultTheme: () => WindowSetSystemDefaultTheme,
+ WindowSetTitle: () => WindowSetTitle,
+ WindowShow: () => WindowShow,
+ WindowToggleMaximise: () => WindowToggleMaximise,
+ WindowUnfullscreen: () => WindowUnfullscreen,
+ WindowUnmaximise: () => WindowUnmaximise,
+ WindowUnminimise: () => WindowUnminimise
+ });
+ function WindowReload() {
+ window.location.reload();
+ }
+ function WindowReloadApp() {
+ window.WailsInvoke("WR");
+ }
+ function WindowSetSystemDefaultTheme() {
+ window.WailsInvoke("WASDT");
+ }
+ function WindowSetLightTheme() {
+ window.WailsInvoke("WALT");
+ }
+ function WindowSetDarkTheme() {
+ window.WailsInvoke("WADT");
+ }
+ function WindowCenter() {
+ window.WailsInvoke("Wc");
+ }
+ function WindowSetTitle(title) {
+ window.WailsInvoke("WT" + title);
+ }
+ function WindowFullscreen() {
+ window.WailsInvoke("WF");
+ }
+ function WindowUnfullscreen() {
+ window.WailsInvoke("Wf");
+ }
+ function WindowIsFullscreen() {
+ return Call(":wails:WindowIsFullscreen");
+ }
+ function WindowSetSize(width, height) {
+ window.WailsInvoke("Ws:" + width + ":" + height);
+ }
+ function WindowGetSize() {
+ return Call(":wails:WindowGetSize");
+ }
+ function WindowSetMaxSize(width, height) {
+ window.WailsInvoke("WZ:" + width + ":" + height);
+ }
+ function WindowSetMinSize(width, height) {
+ window.WailsInvoke("Wz:" + width + ":" + height);
+ }
+ function WindowSetAlwaysOnTop(b) {
+ window.WailsInvoke("WATP:" + (b ? "1" : "0"));
+ }
+ function WindowSetPosition(x, y) {
+ window.WailsInvoke("Wp:" + x + ":" + y);
+ }
+ function WindowGetPosition() {
+ return Call(":wails:WindowGetPos");
+ }
+ function WindowHide() {
+ window.WailsInvoke("WH");
+ }
+ function WindowShow() {
+ window.WailsInvoke("WS");
+ }
+ function WindowMaximise() {
+ window.WailsInvoke("WM");
+ }
+ function WindowToggleMaximise() {
+ window.WailsInvoke("Wt");
+ }
+ function WindowUnmaximise() {
+ window.WailsInvoke("WU");
+ }
+ function WindowIsMaximised() {
+ return Call(":wails:WindowIsMaximised");
+ }
+ function WindowMinimise() {
+ window.WailsInvoke("Wm");
+ }
+ function WindowUnminimise() {
+ window.WailsInvoke("Wu");
+ }
+ function WindowIsMinimised() {
+ return Call(":wails:WindowIsMinimised");
+ }
+ function WindowIsNormal() {
+ return Call(":wails:WindowIsNormal");
+ }
+ function WindowSetBackgroundColour(R, G, B, A) {
+ let rgba = JSON.stringify({ r: R || 0, g: G || 0, b: B || 0, a: A || 255 });
+ window.WailsInvoke("Wr:" + rgba);
+ }
+
+ // desktop/screen.js
+ var screen_exports = {};
+ __export(screen_exports, {
+ ScreenGetAll: () => ScreenGetAll
+ });
+ function ScreenGetAll() {
+ return Call(":wails:ScreenGetAll");
+ }
+
+ // desktop/browser.js
+ var browser_exports = {};
+ __export(browser_exports, {
+ BrowserOpenURL: () => BrowserOpenURL
+ });
+ function BrowserOpenURL(url) {
+ window.WailsInvoke("BO:" + url);
+ }
+
+ // desktop/clipboard.js
+ var clipboard_exports = {};
+ __export(clipboard_exports, {
+ ClipboardGetText: () => ClipboardGetText,
+ ClipboardSetText: () => ClipboardSetText
+ });
+ function ClipboardSetText(text) {
+ return Call(":wails:ClipboardSetText", [text]);
+ }
+ function ClipboardGetText() {
+ return Call(":wails:ClipboardGetText");
+ }
+
+ // desktop/draganddrop.js
+ var draganddrop_exports = {};
+ __export(draganddrop_exports, {
+ CanResolveFilePaths: () => CanResolveFilePaths,
+ OnFileDrop: () => OnFileDrop,
+ OnFileDropOff: () => OnFileDropOff,
+ ResolveFilePaths: () => ResolveFilePaths
+ });
+ var flags = {
+ registered: false,
+ defaultUseDropTarget: true,
+ useDropTarget: true,
+ nextDeactivate: null,
+ nextDeactivateTimeout: null
+ };
+ var DROP_TARGET_ACTIVE = "wails-drop-target-active";
+ function checkStyleDropTarget(style) {
+ const cssDropValue = style.getPropertyValue(window.wails.flags.cssDropProperty).trim();
+ if (cssDropValue) {
+ if (cssDropValue === window.wails.flags.cssDropValue) {
+ return true;
+ }
+ return false;
+ }
+ return false;
+ }
+ function onDragOver(e) {
+ if (!window.wails.flags.enableWailsDragAndDrop) {
+ return;
+ }
+ e.preventDefault();
+ if (!flags.useDropTarget) {
+ return;
+ }
+ const element = e.target;
+ if (flags.nextDeactivate)
+ flags.nextDeactivate();
+ if (!element || !checkStyleDropTarget(getComputedStyle(element))) {
+ return;
+ }
+ let currentElement = element;
+ while (currentElement) {
+ if (checkStyleDropTarget(currentElement.style)) {
+ currentElement.classList.add(DROP_TARGET_ACTIVE);
+ }
+ currentElement = currentElement.parentElement;
+ }
+ }
+ function onDragLeave(e) {
+ if (!window.wails.flags.enableWailsDragAndDrop) {
+ return;
+ }
+ e.preventDefault();
+ if (!flags.useDropTarget) {
+ return;
+ }
+ if (!e.target || !checkStyleDropTarget(getComputedStyle(e.target))) {
+ return null;
+ }
+ if (flags.nextDeactivate)
+ flags.nextDeactivate();
+ flags.nextDeactivate = () => {
+ Array.from(document.getElementsByClassName(DROP_TARGET_ACTIVE)).forEach((el) => el.classList.remove(DROP_TARGET_ACTIVE));
+ flags.nextDeactivate = null;
+ if (flags.nextDeactivateTimeout) {
+ clearTimeout(flags.nextDeactivateTimeout);
+ flags.nextDeactivateTimeout = null;
+ }
+ };
+ flags.nextDeactivateTimeout = setTimeout(() => {
+ if (flags.nextDeactivate)
+ flags.nextDeactivate();
+ }, 50);
+ }
+ function onDrop(e) {
+ if (!window.wails.flags.enableWailsDragAndDrop) {
+ return;
+ }
+ e.preventDefault();
+ if (CanResolveFilePaths()) {
+ let files = [];
+ if (e.dataTransfer.items) {
+ files = [...e.dataTransfer.items].map((item, i) => {
+ if (item.kind === "file") {
+ return item.getAsFile();
+ }
+ });
+ } else {
+ files = [...e.dataTransfer.files];
+ }
+ window.runtime.ResolveFilePaths(e.x, e.y, files);
+ }
+ if (!flags.useDropTarget) {
+ return;
+ }
+ if (flags.nextDeactivate)
+ flags.nextDeactivate();
+ Array.from(document.getElementsByClassName(DROP_TARGET_ACTIVE)).forEach((el) => el.classList.remove(DROP_TARGET_ACTIVE));
+ }
+ function CanResolveFilePaths() {
+ return window.chrome?.webview?.postMessageWithAdditionalObjects != null;
+ }
+ function ResolveFilePaths(x, y, files) {
+ if (window.chrome?.webview?.postMessageWithAdditionalObjects) {
+ chrome.webview.postMessageWithAdditionalObjects(`file:drop:${x}:${y}`, files);
+ }
+ }
+ function OnFileDrop(callback, useDropTarget) {
+ if (typeof callback !== "function") {
+ console.error("DragAndDropCallback is not a function");
+ return;
+ }
+ if (flags.registered) {
+ return;
+ }
+ flags.registered = true;
+ const uDTPT = typeof useDropTarget;
+ flags.useDropTarget = uDTPT === "undefined" || uDTPT !== "boolean" ? flags.defaultUseDropTarget : useDropTarget;
+ window.addEventListener("dragover", onDragOver);
+ window.addEventListener("dragleave", onDragLeave);
+ window.addEventListener("drop", onDrop);
+ let cb = callback;
+ if (flags.useDropTarget) {
+ cb = function(x, y, paths) {
+ const element = document.elementFromPoint(x, y);
+ if (!element || !checkStyleDropTarget(getComputedStyle(element))) {
+ return null;
+ }
+ callback(x, y, paths);
+ };
+ }
+ EventsOn("wails:file-drop", cb);
+ }
+ function OnFileDropOff() {
+ window.removeEventListener("dragover", onDragOver);
+ window.removeEventListener("dragleave", onDragLeave);
+ window.removeEventListener("drop", onDrop);
+ EventsOff("wails:file-drop");
+ flags.registered = false;
+ }
+
+ // desktop/contextmenu.js
+ function processDefaultContextMenu(event) {
+ const element = event.target;
+ const computedStyle = window.getComputedStyle(element);
+ const defaultContextMenuAction = computedStyle.getPropertyValue("--default-contextmenu").trim();
+ switch (defaultContextMenuAction) {
+ case "show":
+ return;
+ case "hide":
+ event.preventDefault();
+ return;
+ default:
+ if (element.isContentEditable) {
+ return;
+ }
+ const selection = window.getSelection();
+ const hasSelection = selection.toString().length > 0;
+ if (hasSelection) {
+ for (let i = 0; i < selection.rangeCount; i++) {
+ const range = selection.getRangeAt(i);
+ const rects = range.getClientRects();
+ for (let j = 0; j < rects.length; j++) {
+ const rect = rects[j];
+ if (document.elementFromPoint(rect.left, rect.top) === element) {
+ return;
+ }
+ }
+ }
+ }
+ if (element.tagName === "INPUT" || element.tagName === "TEXTAREA") {
+ if (hasSelection || !element.readOnly && !element.disabled) {
+ return;
+ }
+ }
+ event.preventDefault();
+ }
+ }
+
+ // desktop/main.js
+ function Quit() {
+ window.WailsInvoke("Q");
+ }
+ function Show() {
+ window.WailsInvoke("S");
+ }
+ function Hide() {
+ window.WailsInvoke("H");
+ }
+ function Environment() {
+ return Call(":wails:Environment");
+ }
+ window.runtime = {
+ ...log_exports,
+ ...window_exports,
+ ...browser_exports,
+ ...screen_exports,
+ ...clipboard_exports,
+ ...draganddrop_exports,
+ EventsOn,
+ EventsOnce,
+ EventsOnMultiple,
+ EventsEmit,
+ EventsOff,
+ Environment,
+ Show,
+ Hide,
+ Quit
+ };
+ window.wails = {
+ Callback,
+ EventsNotify,
+ SetBindings,
+ eventListeners,
+ callbacks,
+ flags: {
+ disableScrollbarDrag: false,
+ disableDefaultContextMenu: false,
+ enableResize: false,
+ defaultCursor: null,
+ borderThickness: 6,
+ shouldDrag: false,
+ deferDragToMouseMove: true,
+ cssDragProperty: "--wails-draggable",
+ cssDragValue: "drag",
+ cssDropProperty: "--wails-drop-target",
+ cssDropValue: "drop",
+ enableWailsDragAndDrop: false
+ }
+ };
+ if (window.wailsbindings) {
+ window.wails.SetBindings(window.wailsbindings);
+ delete window.wails.SetBindings;
+ }
+ if (false) {
+ delete window.wailsbindings;
+ }
+ var dragTest = function(e) {
+ var val = window.getComputedStyle(e.target).getPropertyValue(window.wails.flags.cssDragProperty);
+ if (val) {
+ val = val.trim();
+ }
+ if (val !== window.wails.flags.cssDragValue) {
+ return false;
+ }
+ if (e.buttons !== 1) {
+ return false;
+ }
+ if (e.detail !== 1) {
+ return false;
+ }
+ return true;
+ };
+ window.wails.setCSSDragProperties = function(property, value) {
+ window.wails.flags.cssDragProperty = property;
+ window.wails.flags.cssDragValue = value;
+ };
+ window.wails.setCSSDropProperties = function(property, value) {
+ window.wails.flags.cssDropProperty = property;
+ window.wails.flags.cssDropValue = value;
+ };
+ window.addEventListener("mousedown", (e) => {
+ if (window.wails.flags.resizeEdge) {
+ window.WailsInvoke("resize:" + window.wails.flags.resizeEdge);
+ e.preventDefault();
+ return;
+ }
+ if (dragTest(e)) {
+ if (window.wails.flags.disableScrollbarDrag) {
+ if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
+ return;
+ }
+ }
+ if (window.wails.flags.deferDragToMouseMove) {
+ window.wails.flags.shouldDrag = true;
+ } else {
+ e.preventDefault();
+ window.WailsInvoke("drag");
+ }
+ return;
+ } else {
+ window.wails.flags.shouldDrag = false;
+ }
+ });
+ window.addEventListener("mouseup", () => {
+ window.wails.flags.shouldDrag = false;
+ });
+ function setResize(cursor) {
+ document.documentElement.style.cursor = cursor || window.wails.flags.defaultCursor;
+ window.wails.flags.resizeEdge = cursor;
+ }
+ window.addEventListener("mousemove", function(e) {
+ if (window.wails.flags.shouldDrag) {
+ window.wails.flags.shouldDrag = false;
+ let mousePressed = e.buttons !== void 0 ? e.buttons : e.which;
+ if (mousePressed > 0) {
+ window.WailsInvoke("drag");
+ return;
+ }
+ }
+ if (!window.wails.flags.enableResize) {
+ return;
+ }
+ if (window.wails.flags.defaultCursor == null) {
+ window.wails.flags.defaultCursor = document.documentElement.style.cursor;
+ }
+ if (window.outerWidth - e.clientX < window.wails.flags.borderThickness && window.outerHeight - e.clientY < window.wails.flags.borderThickness) {
+ document.documentElement.style.cursor = "se-resize";
+ }
+ let rightBorder = window.outerWidth - e.clientX < window.wails.flags.borderThickness;
+ let leftBorder = e.clientX < window.wails.flags.borderThickness;
+ let topBorder = e.clientY < window.wails.flags.borderThickness;
+ let bottomBorder = window.outerHeight - e.clientY < window.wails.flags.borderThickness;
+ if (!leftBorder && !rightBorder && !topBorder && !bottomBorder && window.wails.flags.resizeEdge !== void 0) {
+ setResize();
+ } else if (rightBorder && bottomBorder)
+ setResize("se-resize");
+ else if (leftBorder && bottomBorder)
+ setResize("sw-resize");
+ else if (leftBorder && topBorder)
+ setResize("nw-resize");
+ else if (topBorder && rightBorder)
+ setResize("ne-resize");
+ else if (leftBorder)
+ setResize("w-resize");
+ else if (topBorder)
+ setResize("n-resize");
+ else if (bottomBorder)
+ setResize("s-resize");
+ else if (rightBorder)
+ setResize("e-resize");
+ });
+ window.addEventListener("contextmenu", function(e) {
+ if (true)
+ return;
+ if (window.wails.flags.disableDefaultContextMenu) {
+ e.preventDefault();
+ } else {
+ processDefaultContextMenu(e);
+ }
+ });
+ window.WailsInvoke("runtime:ready");
+})();
+//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZGVza3RvcC9sb2cuanMiLCAiZGVza3RvcC9ldmVudHMuanMiLCAiZGVza3RvcC9jYWxscy5qcyIsICJkZXNrdG9wL2JpbmRpbmdzLmpzIiwgImRlc2t0b3Avd2luZG93LmpzIiwgImRlc2t0b3Avc2NyZWVuLmpzIiwgImRlc2t0b3AvYnJvd3Nlci5qcyIsICJkZXNrdG9wL2NsaXBib2FyZC5qcyIsICJkZXNrdG9wL2RyYWdhbmRkcm9wLmpzIiwgImRlc2t0b3AvY29udGV4dG1lbnUuanMiLCAiZGVza3RvcC9tYWluLmpzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKlxyXG4gXyAgICAgICBfXyAgICAgIF8gX19cclxufCB8ICAgICAvIC9fX18gXyhfKSAvX19fX1xyXG58IHwgL3wgLyAvIF9fIGAvIC8gLyBfX18vXHJcbnwg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29uc3QgaGFzU2VsZWN0aW9uID0gKHNlbGVjdGlvbi50b1N0cmluZygpLmxlbmd0aCA+IDApXHJcbiAgICAgICAgICAgIGlmIChoYXNTZWxlY3Rpb24pIHtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc2VsZWN0aW9uLnJhbmdlQ291bnQ7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhbmdlID0gc2VsZWN0aW9uLmdldFJhbmdlQXQoaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVjdHMgPSByYW5nZS5nZXRDbGllbnRSZWN0cygpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgcmVjdHMubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVjdCA9IHJlY3RzW2pdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQuZWxlbWVudEZyb21Qb2ludChyZWN0LmxlZnQsIHJlY3QudG9wKSA9PT0gZWxlbWVudCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRhZ25hbWUgaXMgaW5wdXQgb3IgdGV4dGFyZWFcclxuICAgICAgICAgICAgaWYgKGVsZW1lbnQudGFnTmFtZSA9PT0gXCJJTlBVVFwiIHx8IGVsZW1lbnQudGFnTmFtZSA9PT0gXCJURVhUQVJFQVwiKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoaGFzU2VsZWN0aW9uIHx8ICghZWxlbWVudC5yZWFkT25seSAmJiAhZWxlbWVudC5kaXNhYmxlZCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBy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ryb3BQcm9wZXJ0aWVzID0gZnVuY3Rpb24gKHByb3BlcnR5LCB2YWx1ZSkge1xyXG4gICAgd2luZG93LndhaWxzLmZsYWdzLmNzc0Ryb3BQcm9wZXJ0eSA9IHByb3BlcnR5O1xyXG4gICAgd2luZG93LndhaWxzLmZsYWdzLmNzc0Ryb3BWYWx1ZSA9IHZhbHVlO1xyXG59XHJcblxyXG53aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbW91c2Vkb3duJywgKGUpID0+IHtcclxuICAgIC8vIENoZWNrIGZvciByZXNpemluZ1xyXG4gICAgaWYgKHdpbmRvdy53YWlscy5mbGFncy5yZXNpemVFZGdlKSB7XHJcbiAgICAgICAgd2luZG93LldhaWxzSW52b2tlKFwicmVzaXplOlwiICsgd2luZG93LndhaWxzLmZsYWdzLnJlc2l6ZUVkZ2UpO1xyXG4gICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICByZXR1cm47XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKGRyYWdUZXN0KGUpKSB7XHJcbiAgICAgICAgaWYgKHdpbmRvdy53YWlscy5mbGFncy5kaXNhYmxlU2Nyb2xsYmFyRHJhZykge1xyXG4gICAgICAgICAgICAvLyBUaGlzIGNoZWNrcyBmb3IgY2xpY2tzIG9uIHRoZSBzY3JvbGwgYmFyXHJcbiAgICAgICAgICAgIGlmIChlLm9mZnNldFggPiBlLnRhcmdldC5jbGllbnRXaWR0aCB8fCBlLm9mZnNldFkgPiBlLnRhcmdldC5jbGllbnRIZWlnaHQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAod2luZG93LndhaWxzLmZsYWdzLmRlZmVyRHJhZ1RvTW91c2VNb3ZlKSB7XHJcbiAgICAgICAgICAgIHdpbmRvdy53YWlscy5mbGFncy5zaG91bGREcmFnID0gdHJ1ZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gIC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U0FBTyxZQUFZLGVBQWU7IiwKICAibmFtZXMiOiBbImV2ZW50TmFtZSJdCn0K
diff --git a/v2/internal/frontend/runtime/runtime_dev_desktop.go b/v2/internal/frontend/runtime/runtime_dev_desktop.go
deleted file mode 100644
index c0dcb1fc57e..00000000000
--- a/v2/internal/frontend/runtime/runtime_dev_desktop.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build dev || bindings || (!dev && !production && !bindings)
-
-package runtime
-
-import _ "embed"
-
-//go:embed runtime_dev_desktop.js
-var RuntimeDesktopJS []byte
diff --git a/v2/internal/frontend/runtime/runtime_dev_desktop.js b/v2/internal/frontend/runtime/runtime_dev_desktop.js
deleted file mode 100644
index 6bfce9f5bf6..00000000000
--- a/v2/internal/frontend/runtime/runtime_dev_desktop.js
+++ /dev/null
@@ -1,586 +0,0 @@
-(() => {
- var __defProp = Object.defineProperty;
- var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
- };
-
- // desktop/log.js
- var log_exports = {};
- __export(log_exports, {
- LogDebug: () => LogDebug,
- LogError: () => LogError,
- LogFatal: () => LogFatal,
- LogInfo: () => LogInfo,
- LogLevel: () => LogLevel,
- LogPrint: () => LogPrint,
- LogTrace: () => LogTrace,
- LogWarning: () => LogWarning,
- SetLogLevel: () => SetLogLevel
- });
- function sendLogMessage(level, message) {
- window.WailsInvoke("L" + level + message);
- }
- function LogTrace(message) {
- sendLogMessage("T", message);
- }
- function LogPrint(message) {
- sendLogMessage("P", message);
- }
- function LogDebug(message) {
- sendLogMessage("D", message);
- }
- function LogInfo(message) {
- sendLogMessage("I", message);
- }
- function LogWarning(message) {
- sendLogMessage("W", message);
- }
- function LogError(message) {
- sendLogMessage("E", message);
- }
- function LogFatal(message) {
- sendLogMessage("F", message);
- }
- function SetLogLevel(loglevel) {
- sendLogMessage("S", loglevel);
- }
- var LogLevel = {
- TRACE: 1,
- DEBUG: 2,
- INFO: 3,
- WARNING: 4,
- ERROR: 5
- };
-
- // desktop/events.js
- var Listener = class {
- /**
- * Creates an instance of Listener.
- * @param {string} eventName
- * @param {function} callback
- * @param {number} maxCallbacks
- * @memberof Listener
- */
- constructor(eventName, callback, maxCallbacks) {
- this.eventName = eventName;
- this.maxCallbacks = maxCallbacks || -1;
- this.Callback = (data) => {
- callback.apply(null, data);
- if (this.maxCallbacks === -1) {
- return false;
- }
- this.maxCallbacks -= 1;
- return this.maxCallbacks === 0;
- };
- }
- };
- var eventListeners = {};
- function EventsOnMultiple(eventName, callback, maxCallbacks) {
- eventListeners[eventName] = eventListeners[eventName] || [];
- const thisListener = new Listener(eventName, callback, maxCallbacks);
- eventListeners[eventName].push(thisListener);
- return () => listenerOff(thisListener);
- }
- function EventsOn(eventName, callback) {
- return EventsOnMultiple(eventName, callback, -1);
- }
- function EventsOnce(eventName, callback) {
- return EventsOnMultiple(eventName, callback, 1);
- }
- function notifyListeners(eventData) {
- let eventName = eventData.name;
- if (eventListeners[eventName]) {
- const newEventListenerList = eventListeners[eventName].slice();
- for (let count = eventListeners[eventName].length - 1; count >= 0; count -= 1) {
- const listener = eventListeners[eventName][count];
- let data = eventData.data;
- const destroy = listener.Callback(data);
- if (destroy) {
- newEventListenerList.splice(count, 1);
- }
- }
- if (newEventListenerList.length === 0) {
- removeListener(eventName);
- } else {
- eventListeners[eventName] = newEventListenerList;
- }
- }
- }
- function EventsNotify(notifyMessage) {
- let message;
- try {
- message = JSON.parse(notifyMessage);
- } catch (e) {
- const error = "Invalid JSON passed to Notify: " + notifyMessage;
- throw new Error(error);
- }
- notifyListeners(message);
- }
- function EventsEmit(eventName) {
- const payload = {
- name: eventName,
- data: [].slice.apply(arguments).slice(1)
- };
- notifyListeners(payload);
- window.WailsInvoke("EE" + JSON.stringify(payload));
- }
- function removeListener(eventName) {
- delete eventListeners[eventName];
- window.WailsInvoke("EX" + eventName);
- }
- function EventsOff(eventName, ...additionalEventNames) {
- removeListener(eventName);
- if (additionalEventNames.length > 0) {
- additionalEventNames.forEach((eventName2) => {
- removeListener(eventName2);
- });
- }
- }
- function listenerOff(listener) {
- const eventName = listener.eventName;
- eventListeners[eventName] = eventListeners[eventName].filter((l) => l !== listener);
- if (eventListeners[eventName].length === 0) {
- removeListener(eventName);
- }
- }
-
- // desktop/calls.js
- var callbacks = {};
- function cryptoRandom() {
- var array = new Uint32Array(1);
- return window.crypto.getRandomValues(array)[0];
- }
- function basicRandom() {
- return Math.random() * 9007199254740991;
- }
- var randomFunc;
- if (window.crypto) {
- randomFunc = cryptoRandom;
- } else {
- randomFunc = basicRandom;
- }
- function Call(name, args, timeout) {
- if (timeout == null) {
- timeout = 0;
- }
- return new Promise(function(resolve, reject) {
- var callbackID;
- do {
- callbackID = name + "-" + randomFunc();
- } while (callbacks[callbackID]);
- var timeoutHandle;
- if (timeout > 0) {
- timeoutHandle = setTimeout(function() {
- reject(Error("Call to " + name + " timed out. Request ID: " + callbackID));
- }, timeout);
- }
- callbacks[callbackID] = {
- timeoutHandle,
- reject,
- resolve
- };
- try {
- const payload = {
- name,
- args,
- callbackID
- };
- window.WailsInvoke("C" + JSON.stringify(payload));
- } catch (e) {
- console.error(e);
- }
- });
- }
- window.ObfuscatedCall = (id, args, timeout) => {
- if (timeout == null) {
- timeout = 0;
- }
- return new Promise(function(resolve, reject) {
- var callbackID;
- do {
- callbackID = id + "-" + randomFunc();
- } while (callbacks[callbackID]);
- var timeoutHandle;
- if (timeout > 0) {
- timeoutHandle = setTimeout(function() {
- reject(Error("Call to method " + id + " timed out. Request ID: " + callbackID));
- }, timeout);
- }
- callbacks[callbackID] = {
- timeoutHandle,
- reject,
- resolve
- };
- try {
- const payload = {
- id,
- args,
- callbackID
- };
- window.WailsInvoke("c" + JSON.stringify(payload));
- } catch (e) {
- console.error(e);
- }
- });
- };
- function Callback(incomingMessage) {
- let message;
- try {
- message = JSON.parse(incomingMessage);
- } catch (e) {
- const error = `Invalid JSON passed to callback: ${e.message}. Message: ${incomingMessage}`;
- runtime.LogDebug(error);
- throw new Error(error);
- }
- let callbackID = message.callbackid;
- let callbackData = callbacks[callbackID];
- if (!callbackData) {
- const error = `Callback '${callbackID}' not registered!!!`;
- console.error(error);
- throw new Error(error);
- }
- clearTimeout(callbackData.timeoutHandle);
- delete callbacks[callbackID];
- if (message.error) {
- callbackData.reject(message.error);
- } else {
- callbackData.resolve(message.result);
- }
- }
-
- // desktop/bindings.js
- window.go = {};
- function SetBindings(bindingsMap) {
- try {
- bindingsMap = JSON.parse(bindingsMap);
- } catch (e) {
- console.error(e);
- }
- window.go = window.go || {};
- Object.keys(bindingsMap).forEach((packageName) => {
- window.go[packageName] = window.go[packageName] || {};
- Object.keys(bindingsMap[packageName]).forEach((structName) => {
- window.go[packageName][structName] = window.go[packageName][structName] || {};
- Object.keys(bindingsMap[packageName][structName]).forEach((methodName) => {
- window.go[packageName][structName][methodName] = function() {
- let timeout = 0;
- function dynamic() {
- const args = [].slice.call(arguments);
- return Call([packageName, structName, methodName].join("."), args, timeout);
- }
- dynamic.setTimeout = function(newTimeout) {
- timeout = newTimeout;
- };
- dynamic.getTimeout = function() {
- return timeout;
- };
- return dynamic;
- }();
- });
- });
- });
- }
-
- // desktop/window.js
- var window_exports = {};
- __export(window_exports, {
- WindowCenter: () => WindowCenter,
- WindowFullscreen: () => WindowFullscreen,
- WindowGetPosition: () => WindowGetPosition,
- WindowGetSize: () => WindowGetSize,
- WindowHide: () => WindowHide,
- WindowIsFullscreen: () => WindowIsFullscreen,
- WindowIsMaximised: () => WindowIsMaximised,
- WindowIsMinimised: () => WindowIsMinimised,
- WindowIsNormal: () => WindowIsNormal,
- WindowMaximise: () => WindowMaximise,
- WindowMinimise: () => WindowMinimise,
- WindowReload: () => WindowReload,
- WindowReloadApp: () => WindowReloadApp,
- WindowSetAlwaysOnTop: () => WindowSetAlwaysOnTop,
- WindowSetBackgroundColour: () => WindowSetBackgroundColour,
- WindowSetDarkTheme: () => WindowSetDarkTheme,
- WindowSetLightTheme: () => WindowSetLightTheme,
- WindowSetMaxSize: () => WindowSetMaxSize,
- WindowSetMinSize: () => WindowSetMinSize,
- WindowSetPosition: () => WindowSetPosition,
- WindowSetSize: () => WindowSetSize,
- WindowSetSystemDefaultTheme: () => WindowSetSystemDefaultTheme,
- WindowSetTitle: () => WindowSetTitle,
- WindowShow: () => WindowShow,
- WindowToggleMaximise: () => WindowToggleMaximise,
- WindowUnfullscreen: () => WindowUnfullscreen,
- WindowUnmaximise: () => WindowUnmaximise,
- WindowUnminimise: () => WindowUnminimise
- });
- function WindowReload() {
- window.location.reload();
- }
- function WindowReloadApp() {
- window.WailsInvoke("WR");
- }
- function WindowSetSystemDefaultTheme() {
- window.WailsInvoke("WASDT");
- }
- function WindowSetLightTheme() {
- window.WailsInvoke("WALT");
- }
- function WindowSetDarkTheme() {
- window.WailsInvoke("WADT");
- }
- function WindowCenter() {
- window.WailsInvoke("Wc");
- }
- function WindowSetTitle(title) {
- window.WailsInvoke("WT" + title);
- }
- function WindowFullscreen() {
- window.WailsInvoke("WF");
- }
- function WindowUnfullscreen() {
- window.WailsInvoke("Wf");
- }
- function WindowIsFullscreen() {
- return Call(":wails:WindowIsFullscreen");
- }
- function WindowSetSize(width, height) {
- window.WailsInvoke("Ws:" + width + ":" + height);
- }
- function WindowGetSize() {
- return Call(":wails:WindowGetSize");
- }
- function WindowSetMaxSize(width, height) {
- window.WailsInvoke("WZ:" + width + ":" + height);
- }
- function WindowSetMinSize(width, height) {
- window.WailsInvoke("Wz:" + width + ":" + height);
- }
- function WindowSetAlwaysOnTop(b) {
- window.WailsInvoke("WATP:" + (b ? "1" : "0"));
- }
- function WindowSetPosition(x, y) {
- window.WailsInvoke("Wp:" + x + ":" + y);
- }
- function WindowGetPosition() {
- return Call(":wails:WindowGetPos");
- }
- function WindowHide() {
- window.WailsInvoke("WH");
- }
- function WindowShow() {
- window.WailsInvoke("WS");
- }
- function WindowMaximise() {
- window.WailsInvoke("WM");
- }
- function WindowToggleMaximise() {
- window.WailsInvoke("Wt");
- }
- function WindowUnmaximise() {
- window.WailsInvoke("WU");
- }
- function WindowIsMaximised() {
- return Call(":wails:WindowIsMaximised");
- }
- function WindowMinimise() {
- window.WailsInvoke("Wm");
- }
- function WindowUnminimise() {
- window.WailsInvoke("Wu");
- }
- function WindowIsMinimised() {
- return Call(":wails:WindowIsMinimised");
- }
- function WindowIsNormal() {
- return Call(":wails:WindowIsNormal");
- }
- function WindowSetBackgroundColour(R, G, B, A) {
- let rgba = JSON.stringify({ r: R || 0, g: G || 0, b: B || 0, a: A || 255 });
- window.WailsInvoke("Wr:" + rgba);
- }
-
- // desktop/screen.js
- var screen_exports = {};
- __export(screen_exports, {
- ScreenGetAll: () => ScreenGetAll
- });
- function ScreenGetAll() {
- return Call(":wails:ScreenGetAll");
- }
-
- // desktop/browser.js
- var browser_exports = {};
- __export(browser_exports, {
- BrowserOpenURL: () => BrowserOpenURL
- });
- function BrowserOpenURL(url) {
- window.WailsInvoke("BO:" + url);
- }
-
- // desktop/clipboard.js
- var clipboard_exports = {};
- __export(clipboard_exports, {
- ClipboardGetText: () => ClipboardGetText,
- ClipboardSetText: () => ClipboardSetText
- });
- function ClipboardSetText(text) {
- return Call(":wails:ClipboardSetText", [text]);
- }
- function ClipboardGetText() {
- return Call(":wails:ClipboardGetText");
- }
-
- // desktop/main.js
- function Quit() {
- window.WailsInvoke("Q");
- }
- function Show() {
- window.WailsInvoke("S");
- }
- function Hide() {
- window.WailsInvoke("H");
- }
- function Environment() {
- return Call(":wails:Environment");
- }
- window.runtime = {
- ...log_exports,
- ...window_exports,
- ...browser_exports,
- ...screen_exports,
- ...clipboard_exports,
- EventsOn,
- EventsOnce,
- EventsOnMultiple,
- EventsEmit,
- EventsOff,
- Environment,
- Show,
- Hide,
- Quit
- };
- window.wails = {
- Callback,
- EventsNotify,
- SetBindings,
- eventListeners,
- callbacks,
- flags: {
- disableScrollbarDrag: false,
- disableWailsDefaultContextMenu: false,
- enableResize: false,
- defaultCursor: null,
- borderThickness: 6,
- shouldDrag: false,
- deferDragToMouseMove: true,
- cssDragProperty: "--wails-draggable",
- cssDragValue: "drag"
- }
- };
- if (window.wailsbindings) {
- window.wails.SetBindings(window.wailsbindings);
- delete window.wails.SetBindings;
- }
- if (false) {
- delete window.wailsbindings;
- }
- var dragTest = function(e) {
- var val = window.getComputedStyle(e.target).getPropertyValue(window.wails.flags.cssDragProperty);
- if (val) {
- val = val.trim();
- }
- if (val !== window.wails.flags.cssDragValue) {
- return false;
- }
- if (e.buttons !== 1) {
- return false;
- }
- if (e.detail !== 1) {
- return false;
- }
- return true;
- };
- window.wails.setCSSDragProperties = function(property, value) {
- window.wails.flags.cssDragProperty = property;
- window.wails.flags.cssDragValue = value;
- };
- window.addEventListener("mousedown", (e) => {
- if (window.wails.flags.resizeEdge) {
- window.WailsInvoke("resize:" + window.wails.flags.resizeEdge);
- e.preventDefault();
- return;
- }
- if (dragTest(e)) {
- if (window.wails.flags.disableScrollbarDrag) {
- if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) {
- return;
- }
- }
- if (window.wails.flags.deferDragToMouseMove) {
- window.wails.flags.shouldDrag = true;
- } else {
- e.preventDefault();
- window.WailsInvoke("drag");
- }
- return;
- } else {
- window.wails.flags.shouldDrag = false;
- }
- });
- window.addEventListener("mouseup", () => {
- window.wails.flags.shouldDrag = false;
- });
- function setResize(cursor) {
- document.documentElement.style.cursor = cursor || window.wails.flags.defaultCursor;
- window.wails.flags.resizeEdge = cursor;
- }
- window.addEventListener("mousemove", function(e) {
- if (window.wails.flags.shouldDrag) {
- window.wails.flags.shouldDrag = false;
- let mousePressed = e.buttons !== void 0 ? e.buttons : e.which;
- if (mousePressed > 0) {
- window.WailsInvoke("drag");
- return;
- }
- }
- if (!window.wails.flags.enableResize) {
- return;
- }
- if (window.wails.flags.defaultCursor == null) {
- window.wails.flags.defaultCursor = document.documentElement.style.cursor;
- }
- if (window.outerWidth - e.clientX < window.wails.flags.borderThickness && window.outerHeight - e.clientY < window.wails.flags.borderThickness) {
- document.documentElement.style.cursor = "se-resize";
- }
- let rightBorder = window.outerWidth - e.clientX < window.wails.flags.borderThickness;
- let leftBorder = e.clientX < window.wails.flags.borderThickness;
- let topBorder = e.clientY < window.wails.flags.borderThickness;
- let bottomBorder = window.outerHeight - e.clientY < window.wails.flags.borderThickness;
- if (!leftBorder && !rightBorder && !topBorder && !bottomBorder && window.wails.flags.resizeEdge !== void 0) {
- setResize();
- } else if (rightBorder && bottomBorder)
- setResize("se-resize");
- else if (leftBorder && bottomBorder)
- setResize("sw-resize");
- else if (leftBorder && topBorder)
- setResize("nw-resize");
- else if (topBorder && rightBorder)
- setResize("ne-resize");
- else if (leftBorder)
- setResize("w-resize");
- else if (topBorder)
- setResize("n-resize");
- else if (bottomBorder)
- setResize("s-resize");
- else if (rightBorder)
- setResize("e-resize");
- });
- window.addEventListener("contextmenu", function(e) {
- if (window.wails.flags.disableWailsDefaultContextMenu) {
- e.preventDefault();
- }
- });
- window.WailsInvoke("runtime:ready");
-})();
-//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZGVza3RvcC9sb2cuanMiLCAiZGVza3RvcC9ldmVudHMuanMiLCAiZGVza3RvcC9jYWxscy5qcyIsICJkZXNrdG9wL2JpbmRpbmdzLmpzIiwgImRlc2t0b3Avd2luZG93LmpzIiwgImRlc2t0b3Avc2NyZWVuLmpzIiwgImRlc2t0b3AvYnJvd3Nlci5qcyIsICJkZXNrdG9wL2NsaXBib2FyZC5qcyIsICJkZXNrdG9wL21haW4uanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qXG4gXyAgICAgICBfXyAgICAgIF8gX19cbnwgfCAgICAgLyAvX19fIF8oXykgL19fX19cbnwgfCAvfCAvIC8gX18gYC8gLyAvIF9fXy9cbnwgfC8gfC8gLyAvXy8gLyAvIChfXyAgKVxufF9fL3xfXy9cXF9fLF8vXy9fL19fX18vXG5UaGUgZWxlY3Ryb24gYWx0ZXJuYXRpdmUgZm9yIEdvXG4oYyk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21pc2VcbiAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24gKHJlc29sdmUsIHJlamVjdCkge1xuXG4gICAgICAgIC8vIENyZWF0ZSBhIHVuaXF1ZSBjYWxsYmFja0lEXG4gICAgICAgIHZhciBjYWxsYmFja0lEO1xuICAgICAgICBkbyB7XG4gICAgICAgICAgICBjYWxsYmFja0lEID0gaWQgKyAnLScgKyByYW5kb21GdW5jKCk7XG4gICAgICAgIH0gd2hpbGUgKGNhbGxiYWNrc1tjYWxsYmFja0lEXSk7XG5cbiAgICAgICAgdmFyIHRpbWVvdXRIYW5kbGU7XG4gICAgICAgIC8vIFNldCB0aW1lb3V0XG4gICAgICAgIGlmICh0aW1lb3V0ID4gMCkge1xuICAgICAgICAgICAgdGltZW91dEhhbmRsZSA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHJlamVjdChFcnJvcignQ2FsbCB0byBtZXRob2QgJyArIGlkICsgJyB0aW1lZCBvdXQuIFJlcXVlc3QgSUQ6ICcgKyBjYWxsYmFja0lEKSk7XG4gICAgICAgICAgICB9LCB0aW1lb3V0KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFN0b3JlIGNhbGxiYWNrXG4gICAgICAgIGNhbGxiYWNrc1tjYWxsYmFja0lEXSA9IHtcbiAgICAgICAgICAgIHRpbWVvdXRIYW5kbGU6IHRpbWVvdXRIYW5kbGUsXG4gICAgICAgICAgICByZWplY3Q6IHJlamVjdCxcbiAgICAgICAgICAgIHJlc29sdmU6IHJlc29sdmVcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3QgcGF5bG9hZCA9IHtcblx0XHRcdFx0aWQsXG5cdFx0XHRcdGFyZ3MsXG5cdFx0XHRcdGNhbGxiYWNrSUQsXG5cdFx0XHR9O1xuXG4gICAgICAgICAgICAvLyBNYWtlIHRoZSBjYWxsXG4gICAgICAgICAgICB3aW5kb3cuV2FpbHNJ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FpbHMuZmxhZ3MucmVzaXplRWRnZSk7XG4gICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIGlmIChkcmFnVGVzdChlKSkge1xuICAgICAgICBpZiAod2luZG93LndhaWxzLmZsYWdzLmRpc2FibGVTY3JvbGxiYXJEcmFnKSB7XG4gICAgICAgICAgICAvLyBUaGlzIGNoZWNrcyBmb3IgY2xpY2tzIG9uIHRoZSBzY3JvbGwgYmFyXG4gICAgICAgICAgICBpZiAoZS5vZmZzZXRYID4gZS50YXJnZXQuY2xpZW50V2lkdGggfHwgZS5vZmZzZXRZID4gZS50YXJnZXQuY2xpZW50SGVpZ2h0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh3aW5kb3cud2FpbHMuZmxhZ3MuZGVmZXJEcmFnVG9Nb3VzZU1vdmUpIHtcbiAgICAgICAgICAgIHdpbmRvdy53YWlscy5mbGFncy5zaG91bGREcmFnID0gdHJ1ZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKVxuICAgICAgICAgICAgd2luZG93LldhaWxzSW52b2tlKFwiZHJhZ1wiKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm47XG4gICAgfSBlbHNlIHtcbiAgICAgICAgd2luZG93LndhaWxzLmZsYWdzLnNob3VsZERyYWcgPSBmYWxzZTtcbiAgICB9XG59KTtcblxud2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNldXAnLCAoKSA9PiB7XG4gICAgd2luZG93LndhaWxzLmZsYWdzLnNob3VsZERyYWcgPSBmYWxzZTtcbn0pO1xuXG5mdW5jdGlvbiBzZXRSZXNpemUoY3Vyc29yKSB7XG4gICAgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnN0eWxlLmN1cnNvciA9IGN1cnNvciB8fCB3aW5kb3cud2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FZLEVBQUUsVUFBVSxPQUFPLE1BQU0sTUFBTTtBQUMvQyxRQUFJLGVBQWUsT0FBTyxjQUFjLEVBQUUsVUFBVSxPQUFPLE1BQU0sTUFBTTtBQUd2RSxRQUFJLENBQUMsY0FBYyxDQUFDLGVBQWUsQ0FBQyxhQUFhLENBQUMsZ0JBQWdCLE9BQU8sTUFBTSxNQUFNLGVBQWUsUUFBVztBQUMzRyxnQkFBVTtBQUFBLElBQ2QsV0FBVyxlQUFlO0FBQWMsZ0JBQVUsV0FBVztBQUFBLGFBQ3BELGNBQWM7QUFBYyxnQkFBVSxXQUFXO0FBQUEsYUFDakQsY0FBYztBQUFXLGdCQUFVLFdBQVc7QUFBQSxhQUM5QyxhQUFhO0FBQWEsZ0JBQVUsV0FBVztBQUFBLGFBQy9DO0FBQVksZ0JBQVUsVUFBVTtBQUFBLGFBQ2hDO0FBQVcsZ0JBQVUsVUFBVTtBQUFBLGFBQy9CO0FBQWMsZ0JBQVUsVUFBVTtBQUFBLGFBQ2xDO0FBQWEsZ0JBQVUsVUFBVTtBQUFBLEVBRTlDLENBQUM7QUFHRCxTQUFPLGlCQUFpQixlQUFlLFNBQVUsR0FBRztBQUNoRCxRQUFJLE9BQU8sTUFBTSxNQUFNLGdDQUFnQztBQUNuRCxRQUFFLGVBQWU7QUFBQSxJQUNyQjtBQUFBLEVBQ0osQ0FBQztBQUVELFNBQU8sWUFBWSxlQUFlOyIsCiAgIm5hbWVzIjogWyJldmVudE5hbWUiXQp9Cg==
diff --git a/v2/internal/frontend/runtime/runtime_prod_desktop.go b/v2/internal/frontend/runtime/runtime_prod_desktop.go
index 4fd8aaa5827..7336f0102e9 100644
--- a/v2/internal/frontend/runtime/runtime_prod_desktop.go
+++ b/v2/internal/frontend/runtime/runtime_prod_desktop.go
@@ -1,4 +1,4 @@
-//go:build production
+//go:build production && !debug
package runtime
diff --git a/v2/internal/frontend/runtime/runtime_prod_desktop.js b/v2/internal/frontend/runtime/runtime_prod_desktop.js
index 23b66953bfb..430bedfefc3 100644
--- a/v2/internal/frontend/runtime/runtime_prod_desktop.js
+++ b/v2/internal/frontend/runtime/runtime_prod_desktop.js
@@ -1 +1 @@
-(()=>{var L=Object.defineProperty;var c=(e,n)=>{for(var o in n)L(e,o,{get:n[o],enumerable:!0})};var m={};c(m,{LogDebug:()=>M,LogError:()=>A,LogFatal:()=>H,LogInfo:()=>P,LogLevel:()=>J,LogPrint:()=>R,LogTrace:()=>z,LogWarning:()=>B,SetLogLevel:()=>G});function d(e,n){window.WailsInvoke("L"+e+n)}function z(e){d("T",e)}function R(e){d("P",e)}function M(e){d("D",e)}function P(e){d("I",e)}function B(e){d("W",e)}function A(e){d("E",e)}function H(e){d("F",e)}function G(e){d("S",e)}var J={TRACE:1,DEBUG:2,INFO:3,WARNING:4,ERROR:5};var v=class{constructor(n,o,i){this.eventName=n,this.maxCallbacks=i||-1,this.Callback=t=>(o.apply(null,t),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},l={};function p(e,n,o){l[e]=l[e]||[];let i=new v(e,n,o);return l[e].push(i),()=>F(i)}function b(e,n){return p(e,n,-1)}function E(e,n){return p(e,n,1)}function S(e){let n=e.name;if(l[n]){let o=l[n].slice();for(let i=l[n].length-1;i>=0;i-=1){let t=l[n][i],r=e.data;t.Callback(r)&&o.splice(i,1)}o.length===0?g(n):l[n]=o}}function y(e){let n;try{n=JSON.parse(e)}catch{let i="Invalid JSON passed to Notify: "+e;throw new Error(i)}S(n)}function C(e){let n={name:e,data:[].slice.apply(arguments).slice(1)};S(n),window.WailsInvoke("EE"+JSON.stringify(n))}function g(e){delete l[e],window.WailsInvoke("EX"+e)}function D(e,...n){g(e),n.length>0&&n.forEach(o=>{g(o)})}function F(e){let n=e.eventName;l[n]=l[n].filter(o=>o!==e),l[n].length===0&&g(n)}var f={};function U(){var e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0]}function j(){return Math.random()*9007199254740991}var W;window.crypto?W=U:W=j;function s(e,n,o){return o==null&&(o=0),new Promise(function(i,t){var r;do r=e+"-"+W();while(f[r]);var a;o>0&&(a=setTimeout(function(){t(Error("Call to "+e+" timed out. Request ID: "+r))},o)),f[r]={timeoutHandle:a,reject:t,resolve:i};try{let u={name:e,args:n,callbackID:r};window.WailsInvoke("C"+JSON.stringify(u))}catch(u){console.error(u)}})}window.ObfuscatedCall=(e,n,o)=>(o==null&&(o=0),new Promise(function(i,t){var r;do r=e+"-"+W();while(f[r]);var a;o>0&&(a=setTimeout(function(){t(Error("Call to method "+e+" timed out. Request ID: "+r))},o)),f[r]={timeoutHandle:a,reject:t,resolve:i};try{let u={id:e,args:n,callbackID:r};window.WailsInvoke("c"+JSON.stringify(u))}catch(u){console.error(u)}}));function T(e){let n;try{n=JSON.parse(e)}catch(t){let r=`Invalid JSON passed to callback: ${t.message}. Message: ${e}`;throw runtime.LogDebug(r),new Error(r)}let o=n.callbackid,i=f[o];if(!i){let t=`Callback '${o}' not registered!!!`;throw console.error(t),new Error(t)}clearTimeout(i.timeoutHandle),delete f[o],n.error?i.reject(n.error):i.resolve(n.result)}window.go={};function O(e){try{e=JSON.parse(e)}catch(n){console.error(n)}window.go=window.go||{},Object.keys(e).forEach(n=>{window.go[n]=window.go[n]||{},Object.keys(e[n]).forEach(o=>{window.go[n][o]=window.go[n][o]||{},Object.keys(e[n][o]).forEach(i=>{window.go[n][o][i]=function(){let t=0;function r(){let a=[].slice.call(arguments);return s([n,o,i].join("."),a,t)}return r.setTimeout=function(a){t=a},r.getTimeout=function(){return t},r}()})})})}var x={};c(x,{WindowCenter:()=>q,WindowFullscreen:()=>Z,WindowGetPosition:()=>se,WindowGetSize:()=>ne,WindowHide:()=>le,WindowIsFullscreen:()=>_,WindowIsMaximised:()=>ue,WindowIsMinimised:()=>pe,WindowIsNormal:()=>We,WindowMaximise:()=>we,WindowMinimise:()=>ce,WindowReload:()=>N,WindowReloadApp:()=>V,WindowSetAlwaysOnTop:()=>te,WindowSetBackgroundColour:()=>me,WindowSetDarkTheme:()=>$,WindowSetLightTheme:()=>Y,WindowSetMaxSize:()=>oe,WindowSetMinSize:()=>ie,WindowSetPosition:()=>re,WindowSetSize:()=>ee,WindowSetSystemDefaultTheme:()=>X,WindowSetTitle:()=>Q,WindowShow:()=>ae,WindowToggleMaximise:()=>de,WindowUnfullscreen:()=>K,WindowUnmaximise:()=>fe,WindowUnminimise:()=>ge});function N(){window.location.reload()}function V(){window.WailsInvoke("WR")}function X(){window.WailsInvoke("WASDT")}function Y(){window.WailsInvoke("WALT")}function $(){window.WailsInvoke("WADT")}function q(){window.WailsInvoke("Wc")}function Q(e){window.WailsInvoke("WT"+e)}function Z(){window.WailsInvoke("WF")}function K(){window.WailsInvoke("Wf")}function _(){return s(":wails:WindowIsFullscreen")}function ee(e,n){window.WailsInvoke("Ws:"+e+":"+n)}function ne(){return s(":wails:WindowGetSize")}function oe(e,n){window.WailsInvoke("WZ:"+e+":"+n)}function ie(e,n){window.WailsInvoke("Wz:"+e+":"+n)}function te(e){window.WailsInvoke("WATP:"+(e?"1":"0"))}function re(e,n){window.WailsInvoke("Wp:"+e+":"+n)}function se(){return s(":wails:WindowGetPos")}function le(){window.WailsInvoke("WH")}function ae(){window.WailsInvoke("WS")}function we(){window.WailsInvoke("WM")}function de(){window.WailsInvoke("Wt")}function fe(){window.WailsInvoke("WU")}function ue(){return s(":wails:WindowIsMaximised")}function ce(){window.WailsInvoke("Wm")}function ge(){window.WailsInvoke("Wu")}function pe(){return s(":wails:WindowIsMinimised")}function We(){return s(":wails:WindowIsNormal")}function me(e,n,o,i){let t=JSON.stringify({r:e||0,g:n||0,b:o||0,a:i||255});window.WailsInvoke("Wr:"+t)}var k={};c(k,{ScreenGetAll:()=>ve});function ve(){return s(":wails:ScreenGetAll")}var h={};c(h,{BrowserOpenURL:()=>xe});function xe(e){window.WailsInvoke("BO:"+e)}var I={};c(I,{ClipboardGetText:()=>he,ClipboardSetText:()=>ke});function ke(e){return s(":wails:ClipboardSetText",[e])}function he(){return s(":wails:ClipboardGetText")}function Ie(){window.WailsInvoke("Q")}function be(){window.WailsInvoke("S")}function Ee(){window.WailsInvoke("H")}function Se(){return s(":wails:Environment")}window.runtime={...m,...x,...h,...k,...I,EventsOn:b,EventsOnce:E,EventsOnMultiple:p,EventsEmit:C,EventsOff:D,Environment:Se,Show:be,Hide:Ee,Quit:Ie};window.wails={Callback:T,EventsNotify:y,SetBindings:O,eventListeners:l,callbacks:f,flags:{disableScrollbarDrag:!1,disableWailsDefaultContextMenu:!1,enableResize:!1,defaultCursor:null,borderThickness:6,shouldDrag:!1,deferDragToMouseMove:!0,cssDragProperty:"--wails-draggable",cssDragValue:"drag"}};window.wailsbindings&&(window.wails.SetBindings(window.wailsbindings),delete window.wails.SetBindings);delete window.wailsbindings;var ye=function(e){var n=window.getComputedStyle(e.target).getPropertyValue(window.wails.flags.cssDragProperty);return n&&(n=n.trim()),!(n!==window.wails.flags.cssDragValue||e.buttons!==1||e.detail!==1)};window.wails.setCSSDragProperties=function(e,n){window.wails.flags.cssDragProperty=e,window.wails.flags.cssDragValue=n};window.addEventListener("mousedown",e=>{if(window.wails.flags.resizeEdge){window.WailsInvoke("resize:"+window.wails.flags.resizeEdge),e.preventDefault();return}if(ye(e)){if(window.wails.flags.disableScrollbarDrag&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight))return;window.wails.flags.deferDragToMouseMove?window.wails.flags.shouldDrag=!0:(e.preventDefault(),window.WailsInvoke("drag"));return}else window.wails.flags.shouldDrag=!1});window.addEventListener("mouseup",()=>{window.wails.flags.shouldDrag=!1});function w(e){document.documentElement.style.cursor=e||window.wails.flags.defaultCursor,window.wails.flags.resizeEdge=e}window.addEventListener("mousemove",function(e){if(window.wails.flags.shouldDrag&&(window.wails.flags.shouldDrag=!1,(e.buttons!==void 0?e.buttons:e.which)>0)){window.WailsInvoke("drag");return}if(!window.wails.flags.enableResize)return;window.wails.flags.defaultCursor==null&&(window.wails.flags.defaultCursor=document.documentElement.style.cursor),window.outerWidth-e.clientX{var j=Object.defineProperty;var g=(e,t)=>{for(var n in t)j(e,n,{get:t[n],enumerable:!0})};var b={};g(b,{LogDebug:()=>X,LogError:()=>q,LogFatal:()=>Q,LogInfo:()=>$,LogLevel:()=>Z,LogPrint:()=>J,LogTrace:()=>N,LogWarning:()=>Y,SetLogLevel:()=>_});function u(e,t){window.WailsInvoke("L"+e+t)}function N(e){u("T",e)}function J(e){u("P",e)}function X(e){u("D",e)}function $(e){u("I",e)}function Y(e){u("W",e)}function q(e){u("E",e)}function Q(e){u("F",e)}function _(e){u("S",e)}var Z={TRACE:1,DEBUG:2,INFO:3,WARNING:4,ERROR:5};var y=class{constructor(t,n,o){this.eventName=t,this.maxCallbacks=o||-1,this.Callback=i=>(n.apply(null,i),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},w={};function v(e,t,n){w[e]=w[e]||[];let o=new y(e,t,n);return w[e].push(o),()=>K(o)}function W(e,t){return v(e,t,-1)}function A(e,t){return v(e,t,1)}function P(e){let t=e.name;if(w[t]){let n=w[t].slice();for(let o=w[t].length-1;o>=0;o-=1){let i=w[t][o],r=e.data;i.Callback(r)&&n.splice(o,1)}n.length===0?m(t):w[t]=n}}function R(e){let t;try{t=JSON.parse(e)}catch{let o="Invalid JSON passed to Notify: "+e;throw new Error(o)}P(t)}function M(e){let t={name:e,data:[].slice.apply(arguments).slice(1)};P(t),window.WailsInvoke("EE"+JSON.stringify(t))}function m(e){delete w[e],window.WailsInvoke("EX"+e)}function x(e,...t){m(e),t.length>0&&t.forEach(n=>{m(n)})}function K(e){let t=e.eventName;w[t]=w[t].filter(n=>n!==e),w[t].length===0&&m(t)}var c={};function ee(){var e=new Uint32Array(1);return window.crypto.getRandomValues(e)[0]}function te(){return Math.random()*9007199254740991}var D;window.crypto?D=ee:D=te;function a(e,t,n){return n==null&&(n=0),new Promise(function(o,i){var r;do r=e+"-"+D();while(c[r]);var l;n>0&&(l=setTimeout(function(){i(Error("Call to "+e+" timed out. Request ID: "+r))},n)),c[r]={timeoutHandle:l,reject:i,resolve:o};try{let d={name:e,args:t,callbackID:r};window.WailsInvoke("C"+JSON.stringify(d))}catch(d){console.error(d)}})}window.ObfuscatedCall=(e,t,n)=>(n==null&&(n=0),new Promise(function(o,i){var r;do r=e+"-"+D();while(c[r]);var l;n>0&&(l=setTimeout(function(){i(Error("Call to method "+e+" timed out. Request ID: "+r))},n)),c[r]={timeoutHandle:l,reject:i,resolve:o};try{let d={id:e,args:t,callbackID:r};window.WailsInvoke("c"+JSON.stringify(d))}catch(d){console.error(d)}}));function z(e){let t;try{t=JSON.parse(e)}catch(i){let r=`Invalid JSON passed to callback: ${i.message}. Message: ${e}`;throw runtime.LogDebug(r),new Error(r)}let n=t.callbackid,o=c[n];if(!o){let i=`Callback '${n}' not registered!!!`;throw console.error(i),new Error(i)}clearTimeout(o.timeoutHandle),delete c[n],t.error?o.reject(t.error):o.resolve(t.result)}window.go={};function B(e){try{e=JSON.parse(e)}catch(t){console.error(t)}window.go=window.go||{},Object.keys(e).forEach(t=>{window.go[t]=window.go[t]||{},Object.keys(e[t]).forEach(n=>{window.go[t][n]=window.go[t][n]||{},Object.keys(e[t][n]).forEach(o=>{window.go[t][n][o]=function(){let i=0;function r(){let l=[].slice.call(arguments);return a([t,n,o].join("."),l,i)}return r.setTimeout=function(l){i=l},r.getTimeout=function(){return i},r}()})})})}var T={};g(T,{WindowCenter:()=>le,WindowFullscreen:()=>we,WindowGetPosition:()=>We,WindowGetSize:()=>ce,WindowHide:()=>xe,WindowIsFullscreen:()=>fe,WindowIsMaximised:()=>ye,WindowIsMinimised:()=>Se,WindowIsNormal:()=>Ie,WindowMaximise:()=>he,WindowMinimise:()=>Te,WindowReload:()=>ne,WindowReloadApp:()=>oe,WindowSetAlwaysOnTop:()=>me,WindowSetBackgroundColour:()=>Ce,WindowSetDarkTheme:()=>se,WindowSetLightTheme:()=>re,WindowSetMaxSize:()=>ge,WindowSetMinSize:()=>pe,WindowSetPosition:()=>ve,WindowSetSize:()=>ue,WindowSetSystemDefaultTheme:()=>ie,WindowSetTitle:()=>ae,WindowShow:()=>De,WindowToggleMaximise:()=>Ee,WindowUnfullscreen:()=>de,WindowUnmaximise:()=>be,WindowUnminimise:()=>ke});function ne(){window.location.reload()}function oe(){window.WailsInvoke("WR")}function ie(){window.WailsInvoke("WASDT")}function re(){window.WailsInvoke("WALT")}function se(){window.WailsInvoke("WADT")}function le(){window.WailsInvoke("Wc")}function ae(e){window.WailsInvoke("WT"+e)}function we(){window.WailsInvoke("WF")}function de(){window.WailsInvoke("Wf")}function fe(){return a(":wails:WindowIsFullscreen")}function ue(e,t){window.WailsInvoke("Ws:"+e+":"+t)}function ce(){return a(":wails:WindowGetSize")}function ge(e,t){window.WailsInvoke("WZ:"+e+":"+t)}function pe(e,t){window.WailsInvoke("Wz:"+e+":"+t)}function me(e){window.WailsInvoke("WATP:"+(e?"1":"0"))}function ve(e,t){window.WailsInvoke("Wp:"+e+":"+t)}function We(){return a(":wails:WindowGetPos")}function xe(){window.WailsInvoke("WH")}function De(){window.WailsInvoke("WS")}function he(){window.WailsInvoke("WM")}function Ee(){window.WailsInvoke("Wt")}function be(){window.WailsInvoke("WU")}function ye(){return a(":wails:WindowIsMaximised")}function Te(){window.WailsInvoke("Wm")}function ke(){window.WailsInvoke("Wu")}function Se(){return a(":wails:WindowIsMinimised")}function Ie(){return a(":wails:WindowIsNormal")}function Ce(e,t,n,o){let i=JSON.stringify({r:e||0,g:t||0,b:n||0,a:o||255});window.WailsInvoke("Wr:"+i)}var k={};g(k,{ScreenGetAll:()=>Oe});function Oe(){return a(":wails:ScreenGetAll")}var S={};g(S,{BrowserOpenURL:()=>Le});function Le(e){window.WailsInvoke("BO:"+e)}var I={};g(I,{ClipboardGetText:()=>Pe,ClipboardSetText:()=>Ae});function Ae(e){return a(":wails:ClipboardSetText",[e])}function Pe(){return a(":wails:ClipboardGetText")}var C={};g(C,{CanResolveFilePaths:()=>U,OnFileDrop:()=>Me,OnFileDropOff:()=>ze,ResolveFilePaths:()=>Re});var s={registered:!1,defaultUseDropTarget:!0,useDropTarget:!0,nextDeactivate:null,nextDeactivateTimeout:null},p="wails-drop-target-active";function h(e){let t=e.getPropertyValue(window.wails.flags.cssDropProperty).trim();return t?t===window.wails.flags.cssDropValue:!1}function F(e){if(!window.wails.flags.enableWailsDragAndDrop||(e.preventDefault(),!s.useDropTarget))return;let t=e.target;if(s.nextDeactivate&&s.nextDeactivate(),!t||!h(getComputedStyle(t)))return;let n=t;for(;n;)h(n.style)&&n.classList.add(p),n=n.parentElement}function G(e){if(!!window.wails.flags.enableWailsDragAndDrop&&(e.preventDefault(),!!s.useDropTarget)){if(!e.target||!h(getComputedStyle(e.target)))return null;s.nextDeactivate&&s.nextDeactivate(),s.nextDeactivate=()=>{Array.from(document.getElementsByClassName(p)).forEach(t=>t.classList.remove(p)),s.nextDeactivate=null,s.nextDeactivateTimeout&&(clearTimeout(s.nextDeactivateTimeout),s.nextDeactivateTimeout=null)},s.nextDeactivateTimeout=setTimeout(()=>{s.nextDeactivate&&s.nextDeactivate()},50)}}function H(e){if(!!window.wails.flags.enableWailsDragAndDrop){if(e.preventDefault(),U()){let t=[];e.dataTransfer.items?t=[...e.dataTransfer.items].map((n,o)=>{if(n.kind==="file")return n.getAsFile()}):t=[...e.dataTransfer.files],window.runtime.ResolveFilePaths(e.x,e.y,t)}!s.useDropTarget||(s.nextDeactivate&&s.nextDeactivate(),Array.from(document.getElementsByClassName(p)).forEach(t=>t.classList.remove(p)))}}function U(){return window.chrome?.webview?.postMessageWithAdditionalObjects!=null}function Re(e,t,n){window.chrome?.webview?.postMessageWithAdditionalObjects&&chrome.webview.postMessageWithAdditionalObjects(`file:drop:${e}:${t}`,n)}function Me(e,t){if(typeof e!="function"){console.error("DragAndDropCallback is not a function");return}if(s.registered)return;s.registered=!0;let n=typeof t;s.useDropTarget=n==="undefined"||n!=="boolean"?s.defaultUseDropTarget:t,window.addEventListener("dragover",F),window.addEventListener("dragleave",G),window.addEventListener("drop",H);let o=e;s.useDropTarget&&(o=function(i,r,l){let d=document.elementFromPoint(i,r);if(!d||!h(getComputedStyle(d)))return null;e(i,r,l)}),W("wails:file-drop",o)}function ze(){window.removeEventListener("dragover",F),window.removeEventListener("dragleave",G),window.removeEventListener("drop",H),x("wails:file-drop"),s.registered=!1}function V(e){let t=e.target;switch(window.getComputedStyle(t).getPropertyValue("--default-contextmenu").trim()){case"show":return;case"hide":e.preventDefault();return;default:if(t.isContentEditable)return;let i=window.getSelection(),r=i.toString().length>0;if(r)for(let l=0;l{if(window.wails.flags.resizeEdge){window.WailsInvoke("resize:"+window.wails.flags.resizeEdge),e.preventDefault();return}if(Ve(e)){if(window.wails.flags.disableScrollbarDrag&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight))return;window.wails.flags.deferDragToMouseMove?window.wails.flags.shouldDrag=!0:(e.preventDefault(),window.WailsInvoke("drag"));return}else window.wails.flags.shouldDrag=!1});window.addEventListener("mouseup",()=>{window.wails.flags.shouldDrag=!1});function f(e){document.documentElement.style.cursor=e||window.wails.flags.defaultCursor,window.wails.flags.resizeEdge=e}window.addEventListener("mousemove",function(e){if(window.wails.flags.shouldDrag&&(window.wails.flags.shouldDrag=!1,(e.buttons!==void 0?e.buttons:e.which)>0)){window.WailsInvoke("drag");return}if(!window.wails.flags.enableResize)return;window.wails.flags.defaultCursor==null&&(window.wails.flags.defaultCursor=document.documentElement.style.cursor),window.outerWidth-e.clientX;
// [ClipboardSetText](https://wails.io/docs/reference/runtime/clipboard#clipboardsettext)
// Sets a text on the clipboard
export function ClipboardSetText(text: string): Promise;
+
+// [OnFileDrop](https://wails.io/docs/reference/runtime/draganddrop#onfiledrop)
+// OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings.
+export function OnFileDrop(callback: (x: number, y: number ,paths: string[]) => void, useDropTarget: boolean) :void
+
+// [OnFileDropOff](https://wails.io/docs/reference/runtime/draganddrop#dragandddropoff)
+// OnFileDropOff removes the drag and drop listeners and handlers.
+export function OnFileDropOff() :void
+
+// Check if the file path resolver is available
+export function CanResolveFilePaths(): boolean;
+
+// Resolves file paths for an array of files
+export function ResolveFilePaths(files: File[]): void
\ No newline at end of file
diff --git a/v2/internal/frontend/runtime/wrapper/runtime.js b/v2/internal/frontend/runtime/wrapper/runtime.js
index bd4f371ae1d..623397b0ba0 100644
--- a/v2/internal/frontend/runtime/wrapper/runtime.js
+++ b/v2/internal/frontend/runtime/wrapper/runtime.js
@@ -199,4 +199,40 @@ export function ClipboardGetText() {
export function ClipboardSetText(text) {
return window.runtime.ClipboardSetText(text);
+}
+
+/**
+ * Callback for OnFileDrop returns a slice of file path strings when a drop is finished.
+ *
+ * @export
+ * @callback OnFileDropCallback
+ * @param {number} x - x coordinate of the drop
+ * @param {number} y - y coordinate of the drop
+ * @param {string[]} paths - A list of file paths.
+ */
+
+/**
+ * OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings.
+ *
+ * @export
+ * @param {OnFileDropCallback} callback - Callback for OnFileDrop returns a slice of file path strings when a drop is finished.
+ * @param {boolean} [useDropTarget=true] - Only call the callback when the drop finished on an element that has the drop target style. (--wails-drop-target)
+ */
+export function OnFileDrop(callback, useDropTarget) {
+ return window.runtime.OnFileDrop(callback, useDropTarget);
+}
+
+/**
+ * OnFileDropOff removes the drag and drop listeners and handlers.
+ */
+export function OnFileDropOff() {
+ return window.runtime.OnFileDropOff();
+}
+
+export function CanResolveFilePaths() {
+ return window.runtime.CanResolveFilePaths();
+}
+
+export function ResolveFilePaths(files) {
+ return window.runtime.ResolveFilePaths(files);
}
\ No newline at end of file
diff --git a/v2/internal/fs/fs.go b/v2/internal/fs/fs.go
index 5bfa71b1c0f..5662c020c01 100644
--- a/v2/internal/fs/fs.go
+++ b/v2/internal/fs/fs.go
@@ -2,6 +2,7 @@ package fs
import (
"crypto/md5"
+ "encoding/hex"
"fmt"
"io"
"io/fs"
@@ -27,14 +28,14 @@ func RelativeToCwd(relativePath string) (string, error) {
// Mkdir will create the given directory
func Mkdir(dirname string) error {
- return os.Mkdir(dirname, 0755)
+ return os.Mkdir(dirname, 0o755)
}
// MkDirs creates the given nested directories.
// Returns error on failure
func MkDirs(fullPath string, mode ...os.FileMode) error {
var perms os.FileMode
- perms = 0755
+ perms = 0o755
if len(mode) == 1 {
perms = mode[0]
}
@@ -111,7 +112,7 @@ func RelativePath(relativepath string, optionalpaths ...string) string {
// I'm allowing this for 1 reason only: It's fatal if the path
// supplied is wrong as it's only used internally in Wails. If we get
// that path wrong, we should know about it immediately. The other reason is
- // that it cuts down a ton of unnecassary error handling.
+ // that it cuts down a ton of unnecessary error handling.
panic(err)
}
return result
@@ -141,7 +142,7 @@ func MD5File(filename string) (string, error) {
return "", err
}
- return fmt.Sprintf("%x", h.Sum(nil)), nil
+ return hex.EncodeToString(h.Sum(nil)), nil
}
// MustMD5File will call MD5File and abort the program on error
@@ -157,7 +158,7 @@ func MustMD5File(filename string) string {
// MustWriteString will attempt to write the given data to the given filename
// It will abort the program in the event of a failure
func MustWriteString(filename string, data string) {
- err := os.WriteFile(filename, []byte(data), 0755)
+ err := os.WriteFile(filename, []byte(data), 0o755)
if err != nil {
fatal("Unable to write file", filename, ":", err.Error())
os.Exit(1)
@@ -194,7 +195,6 @@ func GetSubdirectories(rootDir string) (*slicer.StringSlicer, error) {
}
func DirIsEmpty(dir string) (bool, error) {
-
// CREDIT: https://stackoverflow.com/a/30708914/8325411
f, err := os.Open(dir)
if err != nil {
@@ -284,7 +284,6 @@ func SetPermissions(dir string, perm os.FileMode) error {
// Symlinks are ignored and skipped.
// Credit: https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04
func CopyDirExtended(src string, dst string, ignore []string) (err error) {
-
ignoreList := slicer.String(ignore)
src = filepath.Clean(src)
dst = filepath.Clean(dst)
@@ -382,7 +381,6 @@ func FindPathToFile(fsys fs.FS, file string) (string, error) {
// FindFileInParents searches for a file in the current directory and all parent directories.
// Returns the absolute path to the file if found, otherwise an empty string
func FindFileInParents(path string, filename string) string {
-
// Check for bad paths
if _, err := os.Stat(path); err != nil {
return ""
diff --git a/v2/internal/github/github.go b/v2/internal/github/github.go
index db3b70c5850..c16e1d9dda4 100644
--- a/v2/internal/github/github.go
+++ b/v2/internal/github/github.go
@@ -3,13 +3,14 @@ package github
import (
"encoding/json"
"fmt"
- "github.com/charmbracelet/glamour"
"io"
"net/http"
"net/url"
"runtime"
"sort"
"strings"
+
+ "github.com/charmbracelet/glamour"
)
func GetReleaseNotes(tagVersion string, noColour bool) string {
@@ -57,7 +58,6 @@ func GetReleaseNotes(tagVersion string, noColour bool) string {
// GetVersionTags gets the list of tags on the Wails repo
// It returns a list of sorted tags in descending order
func GetVersionTags() ([]*SemanticVersion, error) {
-
result := []*SemanticVersion{}
var err error
@@ -97,7 +97,6 @@ func GetVersionTags() ([]*SemanticVersion, error) {
// GetLatestStableRelease gets the latest stable release on GitHub
func GetLatestStableRelease() (result *SemanticVersion, err error) {
-
tags, err := GetVersionTags()
if err != nil {
return nil, err
@@ -114,7 +113,6 @@ func GetLatestStableRelease() (result *SemanticVersion, err error) {
// GetLatestPreRelease gets the latest prerelease on GitHub
func GetLatestPreRelease() (result *SemanticVersion, err error) {
-
tags, err := GetVersionTags()
if err != nil {
return nil, err
diff --git a/v2/internal/go-common-file-dialog/cfd/CommonFileDialog_nonWindows.go b/v2/internal/go-common-file-dialog/cfd/CommonFileDialog_nonWindows.go
index 3ab96985059..04c7cbcfef2 100644
--- a/v2/internal/go-common-file-dialog/cfd/CommonFileDialog_nonWindows.go
+++ b/v2/internal/go-common-file-dialog/cfd/CommonFileDialog_nonWindows.go
@@ -5,24 +5,24 @@ package cfd
import "fmt"
-var unsupportedError = fmt.Errorf("common file dialogs are only available on windows")
+var errUnsupported = fmt.Errorf("common file dialogs are only available on windows")
// TODO doc
func NewOpenFileDialog(config DialogConfig) (OpenFileDialog, error) {
- return nil, unsupportedError
+ return nil, errUnsupported
}
// TODO doc
func NewOpenMultipleFilesDialog(config DialogConfig) (OpenMultipleFilesDialog, error) {
- return nil, unsupportedError
+ return nil, errUnsupported
}
// TODO doc
func NewSelectFolderDialog(config DialogConfig) (SelectFolderDialog, error) {
- return nil, unsupportedError
+ return nil, errUnsupported
}
// TODO doc
func NewSaveFileDialog(config DialogConfig) (SaveFileDialog, error) {
- return nil, unsupportedError
+ return nil, errUnsupported
}
diff --git a/v2/internal/go-common-file-dialog/cfd/errors.go b/v2/internal/go-common-file-dialog/cfd/errors.go
index c097c8eb2f4..6f21fedbfb1 100644
--- a/v2/internal/go-common-file-dialog/cfd/errors.go
+++ b/v2/internal/go-common-file-dialog/cfd/errors.go
@@ -2,6 +2,4 @@ package cfd
import "errors"
-var (
- ErrorCancelled = errors.New("cancelled by user")
-)
+var ErrCancelled = errors.New("cancelled by user")
diff --git a/v2/internal/go-common-file-dialog/cfd/iFileOpenDialog.go b/v2/internal/go-common-file-dialog/cfd/iFileOpenDialog.go
index 8c82cda2c6d..4c080c916d4 100644
--- a/v2/internal/go-common-file-dialog/cfd/iFileOpenDialog.go
+++ b/v2/internal/go-common-file-dialog/cfd/iFileOpenDialog.go
@@ -178,7 +178,7 @@ func (vtbl *iFileOpenDialogVtbl) getResultsStrings(objPtr unsafe.Pointer) ([]str
return nil, err
}
if shellItemArray == nil {
- return nil, ErrorCancelled
+ return nil, ErrCancelled
}
defer shellItemArray.vtbl.release(unsafe.Pointer(shellItemArray))
count, err := shellItemArray.vtbl.getCount(unsafe.Pointer(shellItemArray))
diff --git a/v2/internal/go-common-file-dialog/cfd/iShellItemArray.go b/v2/internal/go-common-file-dialog/cfd/iShellItemArray.go
index 84f26fa2008..d904e72b21c 100644
--- a/v2/internal/go-common-file-dialog/cfd/iShellItemArray.go
+++ b/v2/internal/go-common-file-dialog/cfd/iShellItemArray.go
@@ -60,7 +60,7 @@ func (vtbl *iShellItemArrayVtbl) getItemAt(objPtr unsafe.Pointer, index uintptr)
return "", err
}
if shellItem == nil {
- return "", ErrorCancelled
+ return "", ErrCancelled
}
defer shellItem.vtbl.release(unsafe.Pointer(shellItem))
return shellItem.vtbl.getDisplayName(unsafe.Pointer(shellItem))
diff --git a/v2/internal/go-common-file-dialog/cfd/vtblCommonFunc.go b/v2/internal/go-common-file-dialog/cfd/vtblCommonFunc.go
index a9210001017..929d5a2b7ac 100644
--- a/v2/internal/go-common-file-dialog/cfd/vtblCommonFunc.go
+++ b/v2/internal/go-common-file-dialog/cfd/vtblCommonFunc.go
@@ -179,7 +179,7 @@ func (vtbl *iFileDialogVtbl) getResultString(objPtr unsafe.Pointer) (string, err
return "", err
}
if shellItem == nil {
- return "", ErrorCancelled
+ return "", ErrCancelled
}
defer shellItem.vtbl.release(unsafe.Pointer(shellItem))
return shellItem.vtbl.getDisplayName(unsafe.Pointer(shellItem))
diff --git a/v2/internal/go-common-file-dialog/cfdutil/CFDUtil.go b/v2/internal/go-common-file-dialog/cfdutil/CFDUtil.go
index bde52d7439a..655266bc3fb 100644
--- a/v2/internal/go-common-file-dialog/cfdutil/CFDUtil.go
+++ b/v2/internal/go-common-file-dialog/cfdutil/CFDUtil.go
@@ -10,7 +10,9 @@ func ShowOpenFileDialog(config cfd.DialogConfig) (string, error) {
if err != nil {
return "", err
}
- defer dialog.Release()
+ defer func() {
+ _ = dialog.Release()
+ }()
return dialog.ShowAndGetResult()
}
@@ -20,7 +22,9 @@ func ShowOpenMultipleFilesDialog(config cfd.DialogConfig) ([]string, error) {
if err != nil {
return nil, err
}
- defer dialog.Release()
+ defer func() {
+ _ = dialog.Release()
+ }()
return dialog.ShowAndGetResults()
}
@@ -30,7 +34,9 @@ func ShowPickFolderDialog(config cfd.DialogConfig) (string, error) {
if err != nil {
return "", err
}
- defer dialog.Release()
+ defer func() {
+ _ = dialog.Release()
+ }()
return dialog.ShowAndGetResult()
}
@@ -40,6 +46,8 @@ func ShowSaveFileDialog(config cfd.DialogConfig) (string, error) {
if err != nil {
return "", err
}
- defer dialog.Release()
+ defer func() {
+ _ = dialog.Release()
+ }()
return dialog.ShowAndGetResult()
}
diff --git a/v2/internal/gomod/gomod.go b/v2/internal/gomod/gomod.go
index 8ab7e0b6654..c38e60f0bac 100644
--- a/v2/internal/gomod/gomod.go
+++ b/v2/internal/gomod/gomod.go
@@ -2,6 +2,7 @@ package gomod
import (
"fmt"
+
"github.com/Masterminds/semver"
"golang.org/x/mod/modfile"
)
diff --git a/v2/internal/gomod/gomod_data_unix.go b/v2/internal/gomod/gomod_data_unix.go
index f3a5e04c347..c6004f4862f 100644
--- a/v2/internal/gomod/gomod_data_unix.go
+++ b/v2/internal/gomod/gomod_data_unix.go
@@ -10,6 +10,7 @@ require github.com/wailsapp/wails/v2 v2.0.0-beta.7
//replace github.com/wailsapp/wails/v2 v2.0.0-beta.7 => /home/lea/wails/v2
`
+
const basicUpdated string = `module changeme
go 1.17
@@ -29,6 +30,7 @@ require (
//replace github.com/wailsapp/wails/v2 v2.0.0-beta.7 => /home/lea/wails/v2
`
+
const multilineReplace = `module changeme
go 1.17
@@ -98,6 +100,7 @@ require (
replace github.com/wailsapp/wails/v2 v2.0.0-beta.20 => /home/lea/wails/v2
`
+
const multilineReplaceNoVersionUpdated = `module changeme
go 1.17
@@ -108,6 +111,7 @@ require (
replace github.com/wailsapp/wails/v2 => /home/lea/wails/v2
`
+
const multilineReplaceNoVersionBlockUpdated = `module changeme
go 1.17
diff --git a/v2/internal/goversion/min.go b/v2/internal/goversion/min.go
index 17edc0c94f9..8c057b3c224 100644
--- a/v2/internal/goversion/min.go
+++ b/v2/internal/goversion/min.go
@@ -1,3 +1,3 @@
package goversion
-const MinRequirement string = "1.18"
+const MinRequirement string = "1.20"
diff --git a/v2/internal/logger/custom_logger.go b/v2/internal/logger/custom_logger.go
index 5e24aa0938d..51e07c0fc3d 100644
--- a/v2/internal/logger/custom_logger.go
+++ b/v2/internal/logger/custom_logger.go
@@ -86,7 +86,6 @@ func (l *customLogger) Warning(format string, args ...interface{}) {
func (l *customLogger) Error(format string, args ...interface{}) {
format = fmt.Sprintf("%s | %s", l.name, format)
l.logger.Error(format, args...)
-
}
// Fatal level logging. Works like Sprintf.
diff --git a/v2/internal/logger/default_logger.go b/v2/internal/logger/default_logger.go
index fe5c0538793..5c72ae20988 100644
--- a/v2/internal/logger/default_logger.go
+++ b/v2/internal/logger/default_logger.go
@@ -84,7 +84,6 @@ func (l *Logger) Info(format string, args ...interface{}) {
if l.logLevel <= logger.INFO {
l.output.Info(fmt.Sprintf(format, args...))
}
-
}
// Warning level logging. Works like Sprintf.
@@ -99,7 +98,6 @@ func (l *Logger) Error(format string, args ...interface{}) {
if l.logLevel <= logger.ERROR {
l.output.Error(fmt.Sprintf(format, args...))
}
-
}
// Fatal level logging. Works like Sprintf.
diff --git a/v2/internal/menumanager/applicationmenu.go b/v2/internal/menumanager/applicationmenu.go
index 424834e5351..4446a00cbf7 100644
--- a/v2/internal/menumanager/applicationmenu.go
+++ b/v2/internal/menumanager/applicationmenu.go
@@ -3,7 +3,6 @@ package menumanager
import "github.com/wailsapp/wails/v2/pkg/menu"
func (m *Manager) SetApplicationMenu(applicationMenu *menu.Menu) error {
-
if applicationMenu == nil {
return nil
}
@@ -38,7 +37,6 @@ func (m *Manager) UpdateApplicationMenu() (string, error) {
}
func (m *Manager) processApplicationMenu() error {
-
// Process the menu
m.processedApplicationMenu = NewWailsMenu(m.applicationMenuItemMap, m.applicationMenu)
m.processRadioGroups(m.processedApplicationMenu, m.applicationMenuItemMap)
diff --git a/v2/internal/menumanager/contextmenu.go b/v2/internal/menumanager/contextmenu.go
index 77c47891c00..f05bcdc49b8 100644
--- a/v2/internal/menumanager/contextmenu.go
+++ b/v2/internal/menumanager/contextmenu.go
@@ -23,7 +23,6 @@ func (t *ContextMenu) AsJSON() (string, error) {
}
func NewContextMenu(contextMenu *menu.ContextMenu) *ContextMenu {
-
result := &ContextMenu{
ID: contextMenu.ID,
menu: contextMenu.Menu,
@@ -37,7 +36,6 @@ func NewContextMenu(contextMenu *menu.ContextMenu) *ContextMenu {
}
func (m *Manager) AddContextMenu(contextMenu *menu.ContextMenu) {
-
newContextMenu := NewContextMenu(contextMenu)
// Save the references
diff --git a/v2/internal/menumanager/menuitemmap.go b/v2/internal/menumanager/menuitemmap.go
index 790d5d06d6c..e4e291be6bb 100644
--- a/v2/internal/menumanager/menuitemmap.go
+++ b/v2/internal/menumanager/menuitemmap.go
@@ -2,8 +2,10 @@ package menumanager
import (
"fmt"
- "github.com/wailsapp/wails/v2/pkg/menu"
+ "strconv"
"sync"
+
+ "github.com/wailsapp/wails/v2/pkg/menu"
)
// MenuItemMap holds a mapping between menuIDs and menu items
@@ -48,14 +50,13 @@ func (m *MenuItemMap) Dump() {
// GenerateMenuID returns a unique string ID for a menu item
func (m *MenuItemMap) generateMenuID() string {
m.menuIDCounterMutex.Lock()
- result := fmt.Sprintf("%d", m.menuIDCounter)
+ result := strconv.FormatInt(m.menuIDCounter, 10)
m.menuIDCounter++
m.menuIDCounterMutex.Unlock()
return result
}
func (m *MenuItemMap) processMenuItem(item *menu.MenuItem) {
-
if item.SubMenu != nil {
for _, submenuitem := range item.SubMenu.Items {
m.processMenuItem(submenuitem)
diff --git a/v2/internal/menumanager/menumanager.go b/v2/internal/menumanager/menumanager.go
index ea793941591..0c6be0df234 100644
--- a/v2/internal/menumanager/menumanager.go
+++ b/v2/internal/menumanager/menumanager.go
@@ -2,11 +2,11 @@ package menumanager
import (
"fmt"
+
"github.com/wailsapp/wails/v2/pkg/menu"
)
type Manager struct {
-
// The application menu.
applicationMenu *menu.Menu
applicationMenuJSON string
@@ -43,7 +43,6 @@ func (m *Manager) getMenuItemByID(menuMap *MenuItemMap, menuId string) *menu.Men
}
func (m *Manager) ProcessClick(menuID string, data string, menuType string, parentID string) error {
-
var menuItemMap *MenuItemMap
switch menuType {
@@ -93,7 +92,7 @@ func (m *Manager) ProcessClick(menuID string, data string, menuType string, pare
// Create new Callback struct
callbackData := &menu.CallbackData{
MenuItem: menuItem,
- //ContextData: data,
+ // ContextData: data,
}
// Call back!
diff --git a/v2/internal/menumanager/processedMenu.go b/v2/internal/menumanager/processedMenu.go
index 8d886e19e89..0f2351846ab 100644
--- a/v2/internal/menumanager/processedMenu.go
+++ b/v2/internal/menumanager/processedMenu.go
@@ -2,6 +2,7 @@ package menumanager
import (
"encoding/json"
+
"github.com/wailsapp/wails/v2/pkg/menu"
"github.com/wailsapp/wails/v2/pkg/menu/keys"
)
@@ -11,7 +12,7 @@ type ProcessedMenuItem struct {
// Label is what appears as the menu text
Label string `json:",omitempty"`
// Role is a predefined menu type
- //Role menu.Role `json:",omitempty"`
+ // Role menu.Role `json:",omitempty"`
// Accelerator holds a representation of a key binding
Accelerator *keys.Accelerator `json:",omitempty"`
// Type of MenuItem, EG: Checkbox, Text, Separator, Radio, Submenu
@@ -23,7 +24,7 @@ type ProcessedMenuItem struct {
// Checked indicates if the item is selected (used by Checkbox and Radio types only)
Checked bool `json:",omitempty"`
// Submenu contains a list of menu items that will be shown as a submenu
- //SubMenu []*MenuItem `json:"SubMenu,omitempty"`
+ // SubMenu []*MenuItem `json:"SubMenu,omitempty"`
SubMenu *ProcessedMenu `json:",omitempty"`
/*
// Colour
@@ -47,7 +48,6 @@ type ProcessedMenuItem struct {
}
func NewProcessedMenuItem(menuItemMap *MenuItemMap, menuItem *menu.MenuItem) *ProcessedMenuItem {
-
ID := menuItemMap.menuItemToIDMap[menuItem]
// Parse ANSI text
@@ -63,21 +63,21 @@ func NewProcessedMenuItem(menuItemMap *MenuItemMap, menuItem *menu.MenuItem) *Pr
result := &ProcessedMenuItem{
ID: ID,
Label: menuItem.Label,
- //Role: menuItem.Role,
+ // Role: menuItem.Role,
Accelerator: menuItem.Accelerator,
Type: menuItem.Type,
Disabled: menuItem.Disabled,
Hidden: menuItem.Hidden,
Checked: menuItem.Checked,
SubMenu: nil,
- //BackgroundColour: menuItem.BackgroundColour,
- //FontSize: menuItem.FontSize,
- //FontName: menuItem.FontName,
- //Image: menuItem.Image,
- //MacTemplateImage: menuItem.MacTemplateImage,
- //MacAlternate: menuItem.MacAlternate,
- //Tooltip: menuItem.Tooltip,
- //StyledLabel: styledLabel,
+ // BackgroundColour: menuItem.BackgroundColour,
+ // FontSize: menuItem.FontSize,
+ // FontName: menuItem.FontName,
+ // Image: menuItem.Image,
+ // MacTemplateImage: menuItem.MacTemplateImage,
+ // MacAlternate: menuItem.MacAlternate,
+ // Tooltip: menuItem.Tooltip,
+ // StyledLabel: styledLabel,
}
if menuItem.SubMenu != nil {
@@ -92,7 +92,6 @@ type ProcessedMenu struct {
}
func NewProcessedMenu(menuItemMap *MenuItemMap, menu *menu.Menu) *ProcessedMenu {
-
result := &ProcessedMenu{}
if menu != nil {
for _, item := range menu.Items {
@@ -131,7 +130,6 @@ func NewWailsMenu(menuItemMap *MenuItemMap, menu *menu.Menu) *WailsMenu {
}
func (w *WailsMenu) AsJSON() (string, error) {
-
menuAsJSON, err := json.Marshal(w)
if err != nil {
return "", err
@@ -150,7 +148,6 @@ func (w *WailsMenu) processRadioGroups() {
}
func (w *WailsMenu) processMenuItem(item *ProcessedMenuItem) {
-
switch item.Type {
// We need to recurse submenus
@@ -172,7 +169,6 @@ func (w *WailsMenu) processMenuItem(item *ProcessedMenuItem) {
}
func (w *WailsMenu) finaliseRadioGroup() {
-
// If we were processing a radio group, fix up the references
if len(w.currentRadioGroup) > 0 {
diff --git a/v2/internal/menumanager/traymenu.go b/v2/internal/menumanager/traymenu.go
index aed5b05ace6..5efc4a86192 100644
--- a/v2/internal/menumanager/traymenu.go
+++ b/v2/internal/menumanager/traymenu.go
@@ -13,8 +13,10 @@ import (
"github.com/wailsapp/wails/v2/pkg/menu"
)
-var trayMenuID int
-var trayMenuIDMutex sync.Mutex
+var (
+ trayMenuID int
+ trayMenuIDMutex sync.Mutex
+)
func generateTrayID() string {
var idStr string
@@ -51,7 +53,6 @@ func (t *TrayMenu) AsJSON() (string, error) {
}
func NewTrayMenu(trayMenu *menu.TrayMenu) *TrayMenu {
-
// Parse ANSI text
var styledLabel []*ansi.StyledText
tempLabel := trayMenu.Label
@@ -205,7 +206,6 @@ func (m *Manager) UpdateTrayMenuLabel(trayMenu *menu.TrayMenu) (string, error) {
}
return string(data), nil
-
}
func (m *Manager) GetContextMenus() ([]string, error) {
diff --git a/v2/internal/process/process.go b/v2/internal/process/process.go
index 6d497ed8e67..18c9f45da36 100644
--- a/v2/internal/process/process.go
+++ b/v2/internal/process/process.go
@@ -25,7 +25,6 @@ func NewProcess(cmd string, args ...string) *Process {
// Start the process
func (p *Process) Start(exitCodeChannel chan int) error {
-
err := p.cmd.Start()
if err != nil {
return err
diff --git a/v2/internal/project/project.go b/v2/internal/project/project.go
index 023ca1dfed2..a1de1b9433c 100644
--- a/v2/internal/project/project.go
+++ b/v2/internal/project/project.go
@@ -12,7 +12,6 @@ import (
// Project holds the data related to a Wails project
type Project struct {
-
/*** Application Data ***/
Name string `json:"name"`
AssetDirectory string `json:"assetdir,omitempty"`
@@ -81,7 +80,7 @@ type Project struct {
// The address to bind the wails dev server to. Default "localhost:34115"
DevServer string `json:"devServer"`
- // Arguments that are forwared to the application in dev mode
+ // Arguments that are forward to the application in dev mode
AppArgs string `json:"appargs"`
// NSISType to be build
@@ -144,11 +143,10 @@ func (p *Project) Save() error {
if err != nil {
return err
}
- return os.WriteFile(p.filename, data, 0755)
+ return os.WriteFile(p.filename, data, 0o755)
}
func (p *Project) setDefaults() {
-
if p.Path == "" {
p.Path = lo.Must(os.Getwd())
}
@@ -216,11 +214,27 @@ type Author struct {
}
type Info struct {
- CompanyName string `json:"companyName"`
- ProductName string `json:"productName"`
- ProductVersion string `json:"productVersion"`
- Copyright *string `json:"copyright"`
- Comments *string `json:"comments"`
+ CompanyName string `json:"companyName"`
+ ProductName string `json:"productName"`
+ ProductVersion string `json:"productVersion"`
+ Copyright *string `json:"copyright"`
+ Comments *string `json:"comments"`
+ FileAssociations []FileAssociation `json:"fileAssociations"`
+ Protocols []Protocol `json:"protocols"`
+}
+
+type FileAssociation struct {
+ Ext string `json:"ext"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ IconName string `json:"iconName"`
+ Role string `json:"role"`
+}
+
+type Protocol struct {
+ Scheme string `json:"scheme"`
+ Description string `json:"description"`
+ Role string `json:"role"`
}
type Bindings struct {
@@ -228,8 +242,9 @@ type Bindings struct {
}
type TsGeneration struct {
- Prefix string `json:"prefix"`
- Suffix string `json:"suffix"`
+ Prefix string `json:"prefix"`
+ Suffix string `json:"suffix"`
+ OutputType string `json:"outputType"`
}
// Parse the given JSON data into a Project struct
diff --git a/v2/internal/s/s.go b/v2/internal/s/s.go
index 86536e24c0c..5ba0d2eaacf 100644
--- a/v2/internal/s/s.go
+++ b/v2/internal/s/s.go
@@ -2,6 +2,7 @@ package s
import (
"crypto/md5"
+ "encoding/hex"
"fmt"
"io"
"io/ioutil"
@@ -74,9 +75,10 @@ func CD(dir string) {
checkError(err)
log("CD %s [%s]", dir, CWD())
}
+
func MKDIR(path string, mode ...os.FileMode) {
var perms os.FileMode
- perms = 0755
+ perms = 0o755
if len(mode) == 1 {
perms = mode[0]
}
@@ -88,7 +90,7 @@ func MKDIR(path string, mode ...os.FileMode) {
// ENDIR ensures that the path gets created if it doesn't exist
func ENDIR(path string, mode ...os.FileMode) {
var perms os.FileMode
- perms = 0755
+ perms = 0o755
if len(mode) == 1 {
perms = mode[0]
}
@@ -150,6 +152,7 @@ func COPY(source string, target string) {
defer closefile(src)
d, err := os.Create(target)
checkError(err)
+ defer closefile(d)
_, err = io.Copy(d, src)
checkError(err)
}
@@ -210,17 +213,13 @@ func ISDIR(path string) bool {
// ISDIREMPTY returns true if the given directory is empty
func ISDIREMPTY(dir string) bool {
-
// CREDIT: https://stackoverflow.com/a/30708914/8325411
f, err := os.Open(dir)
checkError(err)
defer closefile(f)
_, err = f.Readdirnames(1) // Or f.Readdir(1)
- if err == io.EOF {
- return true
- }
- return false
+ return err == io.EOF
}
// ISFILE returns true if the given file exists
@@ -270,7 +269,7 @@ func LOADSTRING(filename string) string {
// SAVEBYTES will create a file with the given string
func SAVEBYTES(filename string, data []byte) {
log("SAVEBYTES %s", filename)
- err := os.WriteFile(filename, data, 0755)
+ err := os.WriteFile(filename, data, 0o755)
checkError(err)
}
@@ -297,7 +296,7 @@ func MD5FILE(filename string) string {
_, err = io.Copy(h, f)
checkError(err)
- return fmt.Sprintf("%x", h.Sum(nil))
+ return hex.EncodeToString(h.Sum(nil))
}
// Sub is the substitution type
diff --git a/v2/internal/shell/shell.go b/v2/internal/shell/shell.go
index e16b96ca40c..349e27bff7e 100644
--- a/v2/internal/shell/shell.go
+++ b/v2/internal/shell/shell.go
@@ -42,14 +42,13 @@ func (c *Command) Run() error {
func (c *Command) Stdout() string {
return c.stdo.String()
}
+
func (c *Command) Stderr() string {
return c.stde.String()
}
func (c *Command) AddArgs(args []string) {
- for _, arg := range args {
- c.args = append(c.args, arg)
- }
+ c.args = append(c.args, args...)
}
// CreateCommand returns a *Cmd struct that when run, will run the given command + args in the given directory
@@ -95,8 +94,5 @@ func RunCommandVerbose(directory string, command string, args ...string) error {
// CommandExists returns true if the given command can be found on the shell
func CommandExists(name string) bool {
_, err := exec.LookPath(name)
- if err != nil {
- return false
- }
- return true
+ return err == nil
}
diff --git a/v2/internal/signal/signal.go b/v2/internal/signal/signal.go
index 96e10bee683..fa797453f85 100644
--- a/v2/internal/signal/signal.go
+++ b/v2/internal/signal/signal.go
@@ -9,8 +9,10 @@ import (
var signalChannel = make(chan os.Signal, 2)
-var callbacks []func()
-var lock sync.Mutex
+var (
+ callbacks []func()
+ lock sync.Mutex
+)
func OnShutdown(callback func()) {
lock.Lock()
@@ -20,20 +22,17 @@ func OnShutdown(callback func()) {
// Start the Signal Manager
func Start() {
-
// Hook into interrupts
gosignal.Notify(signalChannel, os.Interrupt, syscall.SIGTERM, syscall.SIGINT)
// Spin off signal listener and wait for either a cancellation
// or signal
go func() {
- select {
- case <-signalChannel:
- println("")
- println("Ctrl+C detected. Shutting down...")
- for _, callback := range callbacks {
- callback()
- }
+ <-signalChannel
+ println("")
+ println("Ctrl+C detected. Shutting down...")
+ for _, callback := range callbacks {
+ callback()
}
}()
}
diff --git a/v2/internal/staticanalysis/staticanalysis.go b/v2/internal/staticanalysis/staticanalysis.go
index 0d8fb92d3f0..cde4366330b 100644
--- a/v2/internal/staticanalysis/staticanalysis.go
+++ b/v2/internal/staticanalysis/staticanalysis.go
@@ -2,9 +2,10 @@ package staticanalysis
import (
"go/ast"
- "golang.org/x/tools/go/packages"
"path/filepath"
"strings"
+
+ "golang.org/x/tools/go/packages"
)
type EmbedDetails struct {
@@ -51,24 +52,31 @@ func GetEmbedDetailsForFile(file *ast.File, baseDir string) []*EmbedDetails {
for _, c := range comment.List {
if strings.HasPrefix(c.Text, "//go:embed") {
sl := strings.Split(c.Text, " ")
- path := ""
- all := false
if len(sl) == 1 {
continue
}
- embedPath := strings.TrimSpace(sl[1])
- switch true {
- case strings.HasPrefix(embedPath, "all:"):
- path = strings.TrimPrefix(embedPath, "all:")
- all = true
- default:
- path = embedPath
+ // support for multiple paths in one comment
+ for _, arg := range sl[1:] {
+ embedPath := strings.TrimSpace(arg)
+ // ignores all pattern matching characters except escape sequence
+ if strings.Contains(embedPath, "*") || strings.Contains(embedPath, "?") || strings.Contains(embedPath, "[") {
+ continue
+ }
+ if strings.HasPrefix(embedPath, "all:") {
+ result = append(result, &EmbedDetails{
+ EmbedPath: strings.TrimPrefix(embedPath, "all:"),
+ All: true,
+ BaseDir: baseDir,
+ })
+ } else {
+ result = append(result, &EmbedDetails{
+ EmbedPath: embedPath,
+ All: false,
+ BaseDir: baseDir,
+ })
+ }
+
}
- result = append(result, &EmbedDetails{
- EmbedPath: path,
- All: all,
- BaseDir: baseDir,
- })
}
}
}
diff --git a/v2/internal/staticanalysis/staticanalysis_test.go b/v2/internal/staticanalysis/staticanalysis_test.go
index 17599676e01..77ad2fa6c04 100644
--- a/v2/internal/staticanalysis/staticanalysis_test.go
+++ b/v2/internal/staticanalysis/staticanalysis_test.go
@@ -1,8 +1,9 @@
package staticanalysis
import (
- "github.com/stretchr/testify/require"
"testing"
+
+ "github.com/stretchr/testify/require"
)
func TestGetEmbedDetails(t *testing.T) {
@@ -25,6 +26,10 @@ func TestGetEmbedDetails(t *testing.T) {
EmbedPath: "frontend/dist",
All: true,
},
+ {
+ EmbedPath: "frontend/static",
+ All: false,
+ },
},
wantErr: false,
},
diff --git a/v2/internal/staticanalysis/test/standard/go.mod b/v2/internal/staticanalysis/test/standard/go.mod
index 56184c62ded..80e64f9cff3 100644
--- a/v2/internal/staticanalysis/test/standard/go.mod
+++ b/v2/internal/staticanalysis/test/standard/go.mod
@@ -25,11 +25,11 @@ require (
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/wailsapp/mimetype v1.4.1 // indirect
- golang.org/x/crypto v0.0.0-20221012134737-56aed061732a // indirect
+ golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
- golang.org/x/net v0.7.0 // indirect
- golang.org/x/sys v0.5.0 // indirect
- golang.org/x/text v0.7.0 // indirect
+ golang.org/x/net v0.17.0 // indirect
+ golang.org/x/sys v0.15.0 // indirect
+ golang.org/x/text v0.14.0 // indirect
)
// replace github.com/wailsapp/wails/v2 v2.0.0 => C:\Users\leaan
diff --git a/v2/internal/staticanalysis/test/standard/go.sum b/v2/internal/staticanalysis/test/standard/go.sum
index 54b3fbb032f..0517c288845 100644
--- a/v2/internal/staticanalysis/test/standard/go.sum
+++ b/v2/internal/staticanalysis/test/standard/go.sum
@@ -57,13 +57,13 @@ github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhw
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
github.com/wailsapp/wails/v2 v2.3.1 h1:ZJz+pyIBKyASkgO8JO31NuHO1gTTHmvwiHYHwei1CqM=
github.com/wailsapp/wails/v2 v2.3.1/go.mod h1:zlNLI0E2c2qA6miiuAHtp0Bac8FaGH0tlhA19OssR/8=
-golang.org/x/crypto v0.0.0-20221012134737-56aed061732a h1:NmSIgad6KjE6VvHciPZuNRTKxGhlPfD6OA87W/PLkqg=
-golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
+golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM=
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
+golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -73,12 +73,12 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
+golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
-golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/v2/internal/staticanalysis/test/standard/main.go b/v2/internal/staticanalysis/test/standard/main.go
index 3f735d6405f..2b6ab33b625 100644
--- a/v2/internal/staticanalysis/test/standard/main.go
+++ b/v2/internal/staticanalysis/test/standard/main.go
@@ -8,9 +8,12 @@ import (
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
)
-//go:embed all:frontend/dist
+//go:embed all:frontend/dist frontend/static
var assets embed.FS
+//go:embed frontend/src/*.json
+var srcjson embed.FS
+
func main() {
// Create an instance of the app structure
app := NewApp()
diff --git a/v2/internal/system/packagemanager/dnf.go b/v2/internal/system/packagemanager/dnf.go
index d9eaf8062a9..fec676f1111 100644
--- a/v2/internal/system/packagemanager/dnf.go
+++ b/v2/internal/system/packagemanager/dnf.go
@@ -44,6 +44,7 @@ func (y *Dnf) Packages() packagemap {
},
"npm": []*Package{
{Name: "npm", SystemPackage: true},
+ {Name: "nodejs-npm", SystemPackage: true},
},
"upx": []*Package{
{Name: "upx", SystemPackage: true, Optional: true},
@@ -57,6 +58,7 @@ func (y *Dnf) Packages() packagemap {
"fedora": "Follow the guide: https://docs.docker.com/engine/install/fedora/",
},
},
+ {Name: "moby-engine", SystemPackage: true, Optional: true},
},
}
}
diff --git a/v2/internal/system/packagemanager/pm.go b/v2/internal/system/packagemanager/pm.go
index dfd39429984..bba45cd05ea 100644
--- a/v2/internal/system/packagemanager/pm.go
+++ b/v2/internal/system/packagemanager/pm.go
@@ -16,9 +16,9 @@ type packagemap = map[string][]*Package
type PackageManager interface {
Name() string
Packages() packagemap
- PackageInstalled(*Package) (bool, error)
- PackageAvailable(*Package) (bool, error)
- InstallCommand(*Package) string
+ PackageInstalled(pkg *Package) (bool, error)
+ PackageAvailable(pkg *Package) (bool, error)
+ InstallCommand(pkg *Package) string
}
// Dependency represents a system package that we require
@@ -37,7 +37,6 @@ type DependencyList []*Dependency
// InstallAllRequiredCommand returns the command you need to use to install all required dependencies
func (d DependencyList) InstallAllRequiredCommand() string {
-
result := ""
for _, dependency := range d {
if !dependency.Installed && !dependency.Optional {
@@ -50,7 +49,6 @@ func (d DependencyList) InstallAllRequiredCommand() string {
// InstallAllOptionalCommand returns the command you need to use to install all optional dependencies
func (d DependencyList) InstallAllOptionalCommand() string {
-
result := ""
for _, dependency := range d {
if !dependency.Installed && dependency.Optional {
diff --git a/v2/internal/system/packagemanager/zypper.go b/v2/internal/system/packagemanager/zypper.go
index c486b53e1c3..efaeb0b1b8d 100644
--- a/v2/internal/system/packagemanager/zypper.go
+++ b/v2/internal/system/packagemanager/zypper.go
@@ -45,6 +45,7 @@ func (z *Zypper) Packages() packagemap {
},
"npm": []*Package{
{Name: "npm10", SystemPackage: true},
+ {Name: "npm20", SystemPackage: true},
},
"docker": []*Package{
{Name: "docker", SystemPackage: true, Optional: true},
diff --git a/v2/internal/system/system.go b/v2/internal/system/system.go
index a633989efc5..67453538fc0 100644
--- a/v2/internal/system/system.go
+++ b/v2/internal/system/system.go
@@ -9,12 +9,10 @@ import (
"github.com/wailsapp/wails/v2/internal/system/packagemanager"
)
-var (
- IsAppleSilicon bool
-)
+var IsAppleSilicon bool
// Info holds information about the current operating system,
-// package manager and required dependancies
+// package manager and required dependencies
type Info struct {
OS *operatingsystem.OS
PM packagemanager.PackageManager
@@ -23,7 +21,7 @@ type Info struct {
// GetInfo scans the system for operating system details,
// the system package manager and the status of required
-// dependancies.
+// dependencies.
func GetInfo() (*Info, error) {
var result Info
err := result.discover()
@@ -34,7 +32,6 @@ func GetInfo() (*Info, error) {
}
func checkNodejs() *packagemanager.Dependency {
-
// Check for Nodejs
output, err := exec.Command("node", "-v").Output()
installed := true
@@ -58,7 +55,6 @@ func checkNodejs() *packagemanager.Dependency {
}
func checkNPM() *packagemanager.Dependency {
-
// Check for npm
output, err := exec.Command("npm", "-version").Output()
installed := true
@@ -80,7 +76,6 @@ func checkNPM() *packagemanager.Dependency {
}
func checkUPX() *packagemanager.Dependency {
-
// Check for npm
output, err := exec.Command("upx", "-V").Output()
installed := true
@@ -102,7 +97,6 @@ func checkUPX() *packagemanager.Dependency {
}
func checkNSIS() *packagemanager.Dependency {
-
// Check for nsis installer
output, err := exec.Command("makensis", "-VERSION").Output()
installed := true
@@ -141,7 +135,6 @@ func checkLibrary(name string) func() *packagemanager.Dependency {
}
func checkDocker() *packagemanager.Dependency {
-
// Check for npm
output, err := exec.Command("docker", "version").Output()
installed := true
diff --git a/v2/internal/system/system_windows.go b/v2/internal/system/system_windows.go
index 1ef076cd8da..40b8f034074 100644
--- a/v2/internal/system/system_windows.go
+++ b/v2/internal/system/system_windows.go
@@ -4,7 +4,7 @@
package system
import (
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/webviewloader"
+ "github.com/wailsapp/go-webview2/webviewloader"
"github.com/wailsapp/wails/v2/internal/system/operatingsystem"
"github.com/wailsapp/wails/v2/internal/system/packagemanager"
)
diff --git a/v2/internal/typescriptify/typescriptify.go b/v2/internal/typescriptify/typescriptify.go
index b14059a51af..85fea9c42d5 100644
--- a/v2/internal/typescriptify/typescriptify.go
+++ b/v2/internal/typescriptify/typescriptify.go
@@ -3,7 +3,7 @@ package typescriptify
import (
"bufio"
"fmt"
- "io/ioutil"
+ "io"
"log"
"os"
"path"
@@ -24,7 +24,7 @@ const (
if (!a) {
return a;
}
- if (a.slice) {
+ if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
@@ -104,6 +104,7 @@ type TypeScriptify struct {
Namespace string
KnownStructs *slicer.StringSlicer
+ KnownEnums *slicer.StringSlicer
}
func New() *TypeScriptify {
@@ -156,10 +157,10 @@ func (t *TypeScriptify) deepFields(typeOf reflect.Type) []reflect.StructField {
kind := f.Type.Kind()
isPointer := kind == reflect.Ptr && f.Type.Elem().Kind() == reflect.Struct
if f.Anonymous && kind == reflect.Struct {
- //fmt.Println(v.Interface())
+ // fmt.Println(v.Interface())
fields = append(fields, t.deepFields(f.Type)...)
} else if f.Anonymous && isPointer {
- //fmt.Println(v.Interface())
+ // fmt.Println(v.Interface())
fields = append(fields, t.deepFields(f.Type.Elem())...)
} else {
// Check we have a json tag
@@ -393,7 +394,7 @@ func loadCustomCode(fileName string) (map[string]string, error) {
}
defer f.Close()
- bytes, err := ioutil.ReadAll(f)
+ bytes, err := io.ReadAll(f)
if err != nil {
return result, err
}
@@ -429,7 +430,7 @@ func (t TypeScriptify) backup(fileName string) error {
}
defer fileIn.Close()
- bytes, err := ioutil.ReadAll(fileIn)
+ bytes, err := io.ReadAll(fileIn)
if err != nil {
return err
}
@@ -439,7 +440,7 @@ func (t TypeScriptify) backup(fileName string) error {
backupFn = path.Join(t.BackupDir, backupFn)
}
- return ioutil.WriteFile(backupFn, bytes, os.FileMode(0700))
+ return os.WriteFile(backupFn, bytes, os.FileMode(0o700))
}
func (t TypeScriptify) ConvertToFile(fileName string, packageName string) error {
@@ -585,9 +586,6 @@ func (t *TypeScriptify) convertType(depth int, typeOf reflect.Type, customCode m
return "", nil
}
fields := t.deepFields(typeOf)
- if len(fields) == 0 {
- return "", nil
- }
t.logf(depth, "Converting type %s", typeOf.String())
if differentNamespaces(t.Namespace, typeOf) {
return "", nil
@@ -697,7 +695,7 @@ func (t *TypeScriptify) convertType(depth int, typeOf reflect.Type, customCode m
builder.AddMapField(jsonFieldName, field)
} else if field.Type.Kind() == reflect.Slice || field.Type.Kind() == reflect.Array { // Slice:
- if field.Type.Elem().Kind() == reflect.Ptr { //extract ptr type
+ if field.Type.Elem().Kind() == reflect.Ptr { // extract ptr type
field.Type = field.Type.Elem()
}
@@ -723,7 +721,16 @@ func (t *TypeScriptify) convertType(depth int, typeOf reflect.Type, customCode m
}
} else { // Simple field:
t.logf(depth, "- simple field %s.%s", typeOf.Name(), field.Name)
- err = builder.AddSimpleField(jsonFieldName, field, fldOpts)
+ // check if type is in known enum. If so, then replace TStype with enum name to avoid missing types
+ isKnownEnum := t.KnownEnums.Contains(getStructFQN(field.Type.String()))
+ if isKnownEnum {
+ err = builder.AddSimpleField(jsonFieldName, field, TypeOptions{
+ TSType: getStructFQN(field.Type.String()),
+ TSTransform: fldOpts.TSTransform,
+ })
+ } else {
+ err = builder.AddSimpleField(jsonFieldName, field, fldOpts)
+ }
}
if err != nil {
return "", err
@@ -884,7 +891,7 @@ func (t *typeScriptClassBuilder) addField(fld, fldType string, isAnyType bool) {
isOptional := strings.HasSuffix(fld, "?")
strippedFieldName := strings.ReplaceAll(fld, "?", "")
if !regexp.MustCompile(jsVariableNameRegex).Match([]byte(strippedFieldName)) {
- fld = fmt.Sprintf(`"%s"`, fld)
+ fld = fmt.Sprintf(`"%s"`, strippedFieldName)
if isOptional {
fld += "?"
}
@@ -935,6 +942,6 @@ func typeClashWithReservedKeyword(input string) bool {
func warnAboutTypesClash(entity string) {
// TODO: Refactor logging
l := log.New(os.Stderr, "", 0)
- l.Println(fmt.Sprintf("Usage of reserved keyword found and not supported: %s", entity))
+ l.Printf("Usage of reserved keyword found and not supported: %s", entity)
log.Println("Please rename returned type or consider adding bindings config to your wails.json")
}
diff --git a/v2/internal/webview2runtime/webview2installer.go b/v2/internal/webview2runtime/webview2installer.go
index a2a2922dc20..3645dae02c3 100644
--- a/v2/internal/webview2runtime/webview2installer.go
+++ b/v2/internal/webview2runtime/webview2installer.go
@@ -11,7 +11,7 @@ var setupexe []byte
// WriteInstallerToFile writes the installer file to the given file.
func WriteInstallerToFile(targetFile string) error {
- return os.WriteFile(targetFile, setupexe, 0755)
+ return os.WriteFile(targetFile, setupexe, 0o755)
}
// WriteInstaller writes the installer exe file to the given directory and returns the path to it.
diff --git a/v2/internal/wv2installer/wv2installer.go b/v2/internal/wv2installer/wv2installer.go
index ce754cee70d..c89ad196f23 100644
--- a/v2/internal/wv2installer/wv2installer.go
+++ b/v2/internal/wv2installer/wv2installer.go
@@ -5,7 +5,7 @@ package wv2installer
import (
"fmt"
- "github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/webviewloader"
+ "github.com/wailsapp/go-webview2/webviewloader"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/windows"
)
diff --git a/v2/pkg/application/application.go b/v2/pkg/application/application.go
index 8d8d72ef6ab..8ba5869699a 100644
--- a/v2/pkg/application/application.go
+++ b/v2/pkg/application/application.go
@@ -2,11 +2,12 @@ package application
import (
"context"
+ "sync"
+
"github.com/wailsapp/wails/v2/internal/app"
"github.com/wailsapp/wails/v2/internal/signal"
"github.com/wailsapp/wails/v2/pkg/menu"
"github.com/wailsapp/wails/v2/pkg/options"
- "sync"
)
// Application is the main Wails application
@@ -86,7 +87,6 @@ func (a *Application) Bind(boundStruct any) {
}
func (a *Application) On(eventType EventType, callback func()) {
-
c := func(ctx context.Context) {
callback()
}
diff --git a/v2/pkg/assetserver/assethandler.go b/v2/pkg/assetserver/assethandler.go
index c85bf81e65d..b8e2df076c8 100644
--- a/v2/pkg/assetserver/assethandler.go
+++ b/v2/pkg/assetserver/assethandler.go
@@ -10,6 +10,7 @@ import (
"net/http"
"os"
"path"
+ "strconv"
"strings"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
@@ -37,7 +38,6 @@ type assetHandler struct {
}
func NewAssetHandler(options assetserver.Options, log Logger) (http.Handler, error) {
-
vfs := options.Assets
if vfs != nil {
if _, err := vfs.Open("."); err != nil {
@@ -110,7 +110,7 @@ func (d *assetHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
}
}
-// serveFile will try to load the file from the fs.FS and write it to the response
+// serveFSFile will try to load the file from the fs.FS and write it to the response
func (d *assetHandler) serveFSFile(rw http.ResponseWriter, req *http.Request, filename string) error {
if d.fs == nil {
return os.ErrNotExist
@@ -178,7 +178,8 @@ func (d *assetHandler) serveFSFile(rw http.ResponseWriter, req *http.Request, fi
return nil
}
- rw.Header().Set(HeaderContentLength, fmt.Sprintf("%d", statInfo.Size()))
+ size := strconv.FormatInt(statInfo.Size(), 10)
+ rw.Header().Set(HeaderContentLength, size)
// Write the first 512 bytes used for MimeType sniffing
_, err = io.Copy(rw, bytes.NewReader(buf[:n]))
diff --git a/v2/pkg/assetserver/assethandler_external.go b/v2/pkg/assetserver/assethandler_external.go
index 588b350f531..98b3404e9f6 100644
--- a/v2/pkg/assetserver/assethandler_external.go
+++ b/v2/pkg/assetserver/assethandler_external.go
@@ -1,18 +1,22 @@
-//go:build dev
-// +build dev
-
package assetserver
import (
"errors"
"fmt"
+ "github.com/wailsapp/wails/v2/pkg/options/assetserver"
"net/http"
"net/http/httputil"
"net/url"
-
- "github.com/wailsapp/wails/v2/pkg/options/assetserver"
)
+func NewProxyServer(proxyURL string) http.Handler {
+ parsedURL, err := url.Parse(proxyURL)
+ if err != nil {
+ panic(err)
+ }
+ return httputil.NewSingleHostReverseProxy(parsedURL)
+}
+
func NewExternalAssetsHandler(logger Logger, options assetserver.Options, url *url.URL) http.Handler {
baseHandler := options.Handler
@@ -46,7 +50,7 @@ func NewExternalAssetsHandler(logger Logger, options assetserver.Options, url *u
proxy.ErrorHandler = func(rw http.ResponseWriter, r *http.Request, err error) {
if baseHandler != nil && errors.Is(err, errSkipProxy) {
if logger != nil {
- logger.Debug("[ExternalAssetHandler] Loading '%s' failed, using original AssetHandler", r.URL)
+ logger.Debug("[ExternalAssetHandler] '%s' returned not found, using AssetHandler", r.URL)
}
baseHandler.ServeHTTP(rw, r)
} else {
diff --git a/v2/pkg/assetserver/assetserver.go b/v2/pkg/assetserver/assetserver.go
index 625c3f24509..59665c09165 100644
--- a/v2/pkg/assetserver/assetserver.go
+++ b/v2/pkg/assetserver/assetserver.go
@@ -5,10 +5,10 @@ import (
"fmt"
"math/rand"
"net/http"
- "net/http/httptest"
"strings"
"golang.org/x/net/html"
+ "html/template"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
@@ -68,9 +68,11 @@ func NewAssetServer(bindingsJSON string, options assetserver.Options, servingFro
}
func NewAssetServerWithHandler(handler http.Handler, bindingsJSON string, servingFromDisk bool, logger Logger, runtime RuntimeAssets) (*AssetServer, error) {
+
var buffer bytes.Buffer
if bindingsJSON != "" {
- buffer.WriteString(`window.wailsbindings='` + bindingsJSON + `';` + "\n")
+ escapedBindingsJSON := template.JSEscapeString(bindingsJSON)
+ buffer.WriteString(`window.wailsbindings='` + escapedBindingsJSON + `';` + "\n")
}
buffer.Write(runtime.RuntimeDesktopJS())
@@ -111,23 +113,58 @@ func (d *AssetServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
return
}
- header := rw.Header()
if d.servingFromDisk {
- header.Add(HeaderCacheControl, "no-cache")
+ rw.Header().Add(HeaderCacheControl, "no-cache")
+ }
+
+ handler := d.handler
+ if req.Method != http.MethodGet {
+ handler.ServeHTTP(rw, req)
+ return
}
path := req.URL.Path
- switch path {
- case "", "/", "/index.html":
- recorder := httptest.NewRecorder()
- d.handler.ServeHTTP(recorder, req)
- for k, v := range recorder.HeaderMap {
- header[k] = v
+ if path == runtimeJSPath {
+ d.writeBlob(rw, path, d.runtimeJS)
+ } else if path == runtimePath && d.runtimeHandler != nil {
+ d.runtimeHandler.HandleRuntimeCall(rw, req)
+ } else if path == ipcJSPath {
+ content := d.runtime.DesktopIPC()
+ if d.ipcJS != nil {
+ content = d.ipcJS(req)
}
+ d.writeBlob(rw, path, content)
+
+ } else if script, ok := d.pluginScripts[path]; ok {
+ d.writeBlob(rw, path, []byte(script))
+ } else if d.isRuntimeInjectionMatch(path) {
+ recorder := &bodyRecorder{
+ ResponseWriter: rw,
+ doRecord: func(code int, h http.Header) bool {
+ if code == http.StatusNotFound {
+ return true
+ }
+
+ if code != http.StatusOK {
+ return false
+ }
+
+ return strings.Contains(h.Get(HeaderContentType), "text/html")
+ },
+ }
+
+ handler.ServeHTTP(recorder, req)
- switch recorder.Code {
+ body := recorder.Body()
+ if body == nil {
+ // The body has been streamed and not recorded, we are finished
+ return
+ }
+
+ code := recorder.Code()
+ switch code {
case http.StatusOK:
- content, err := d.processIndexHTML(recorder.Body.Bytes())
+ content, err := d.processIndexHTML(body.Bytes())
if err != nil {
d.serveError(rw, err, "Unable to processIndexHTML")
return
@@ -138,34 +175,12 @@ func (d *AssetServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
d.writeBlob(rw, indexHTML, defaultHTML)
default:
- rw.WriteHeader(recorder.Code)
+ rw.WriteHeader(code)
}
- case runtimeJSPath:
- d.writeBlob(rw, path, d.runtimeJS)
-
- case runtimePath:
- if d.runtimeHandler != nil {
- d.runtimeHandler.HandleRuntimeCall(rw, req)
- } else {
- d.handler.ServeHTTP(rw, req)
- }
-
- case ipcJSPath:
- content := d.runtime.DesktopIPC()
- if d.ipcJS != nil {
- content = d.ipcJS(req)
- }
- d.writeBlob(rw, path, content)
-
- default:
- // Check if this is a plugin script
- if script, ok := d.pluginScripts[path]; ok {
- d.writeBlob(rw, path, []byte(script))
- return
- }
- d.handler.ServeHTTP(rw, req)
+ } else {
+ handler.ServeHTTP(rw, req)
}
}
@@ -229,3 +244,12 @@ func (d *AssetServer) logError(message string, args ...interface{}) {
d.logger.Error("[AssetServer] "+message, args...)
}
}
+
+func (AssetServer) isRuntimeInjectionMatch(path string) bool {
+ if path == "" {
+ path = "/"
+ }
+
+ return strings.HasSuffix(path, "/") ||
+ strings.HasSuffix(path, "/"+indexHTML)
+}
diff --git a/v2/pkg/assetserver/assetserver_legacy.go b/v2/pkg/assetserver/assetserver_legacy.go
deleted file mode 100644
index 4df671bc2ee..00000000000
--- a/v2/pkg/assetserver/assetserver_legacy.go
+++ /dev/null
@@ -1,78 +0,0 @@
-package assetserver
-
-import (
- "io"
- "net/http"
-
- "github.com/wailsapp/wails/v2/pkg/assetserver/webview"
-)
-
-// ProcessHTTPRequest processes the HTTP Request by faking a golang HTTP Server.
-// The request will be finished with a StatusNotImplemented code if no handler has written to the response.
-func (d *AssetServer) ProcessHTTPRequestLegacy(rw http.ResponseWriter, reqGetter func() (*http.Request, error)) {
- d.processWebViewRequest(&legacyRequest{reqGetter: reqGetter, rw: rw})
-}
-
-type legacyRequest struct {
- req *http.Request
- rw http.ResponseWriter
-
- reqGetter func() (*http.Request, error)
-}
-
-func (r *legacyRequest) URL() (string, error) {
- req, err := r.request()
- if err != nil {
- return "", err
- }
- return req.URL.String(), nil
-}
-
-func (r *legacyRequest) Method() (string, error) {
- req, err := r.request()
- if err != nil {
- return "", err
- }
- return req.Method, nil
-}
-
-func (r *legacyRequest) Header() (http.Header, error) {
- req, err := r.request()
- if err != nil {
- return nil, err
- }
- return req.Header, nil
-}
-
-func (r *legacyRequest) Body() (io.ReadCloser, error) {
- req, err := r.request()
- if err != nil {
- return nil, err
- }
- return req.Body, nil
-}
-
-func (r legacyRequest) Response() webview.ResponseWriter {
- return &legacyRequestNoOpCloserResponseWriter{r.rw}
-}
-
-func (r legacyRequest) Close() error { return nil }
-
-func (r *legacyRequest) request() (*http.Request, error) {
- if r.req != nil {
- return r.req, nil
- }
-
- req, err := r.reqGetter()
- if err != nil {
- return nil, err
- }
- r.req = req
- return req, nil
-}
-
-type legacyRequestNoOpCloserResponseWriter struct {
- http.ResponseWriter
-}
-
-func (*legacyRequestNoOpCloserResponseWriter) Finish() {}
diff --git a/v2/pkg/assetserver/assetserver_webview.go b/v2/pkg/assetserver/assetserver_webview.go
index ae85f2513ab..63f80f0aece 100644
--- a/v2/pkg/assetserver/assetserver_webview.go
+++ b/v2/pkg/assetserver/assetserver_webview.go
@@ -26,19 +26,15 @@ type assetServerWebView struct {
func (d *AssetServer) ServeWebViewRequest(req webview.Request) {
d.dispatchInit.Do(func() {
workers := d.dispatchWorkers
- if workers == 0 {
- workers = 10
+ if workers <= 0 {
+ return
}
workerC := make(chan webview.Request, workers*2)
for i := 0; i < workers; i++ {
go func() {
for req := range workerC {
- uri, _ := req.URL()
d.processWebViewRequest(req)
- if err := req.Close(); err != nil {
- d.logError("Unable to call close for request for uri '%s'", uri)
- }
}
}()
}
@@ -49,19 +45,38 @@ func (d *AssetServer) ServeWebViewRequest(req webview.Request) {
d.dispatchReqC = dispatchC
})
- d.dispatchReqC <- req
+ if d.dispatchReqC == nil {
+ go d.processWebViewRequest(req)
+ } else {
+ d.dispatchReqC <- req
+ }
}
-// processHTTPRequest processes the HTTP Request by faking a golang HTTP Server.
-// The request will be finished with a StatusNotImplemented code if no handler has written to the response.
func (d *AssetServer) processWebViewRequest(r webview.Request) {
+ uri, _ := r.URL()
+ d.processWebViewRequestInternal(r)
+ if err := r.Close(); err != nil {
+ d.logError("Unable to call close for request for uri '%s'", uri)
+ }
+}
+
+// processWebViewRequestInternal processes the HTTP Request by faking a golang HTTP Server.
+// The request will be finished with a StatusNotImplemented code if no handler has written to the response.
+func (d *AssetServer) processWebViewRequestInternal(r webview.Request) {
+ uri := "unknown"
+ var err error
+
wrw := r.Response()
- defer wrw.Finish()
+ defer func() {
+ if err := wrw.Finish(); err != nil {
+ d.logError("Error finishing request '%s': %s", uri, err)
+ }
+ }()
var rw http.ResponseWriter = &contentTypeSniffer{rw: wrw} // Make sure we have a Content-Type sniffer
defer rw.WriteHeader(http.StatusNotImplemented) // This is a NOP when a handler has already written and set the status
- uri, err := r.URL()
+ uri, err = r.URL()
if err != nil {
d.logError("Error processing request, unable to get URL: %s (HttpResponse=500)", err)
http.Error(rw, err.Error(), http.StatusInternalServerError)
@@ -96,6 +111,18 @@ func (d *AssetServer) processWebViewRequest(r webview.Request) {
d.webviewRequestErrorHandler(uri, rw, fmt.Errorf("HTTP-Request: %w", err))
return
}
+
+ // For server requests, the URL is parsed from the URI supplied on the Request-Line as stored in RequestURI. For
+ // most requests, fields other than Path and RawQuery will be empty. (See RFC 7230, Section 5.3)
+ req.URL.Scheme = ""
+ req.URL.Host = ""
+ req.URL.Fragment = ""
+ req.URL.RawFragment = ""
+
+ if url := req.URL; req.RequestURI == "" && url != nil {
+ req.RequestURI = url.String()
+ }
+
req.Header = header
if req.RemoteAddr == "" {
@@ -103,14 +130,11 @@ func (d *AssetServer) processWebViewRequest(r webview.Request) {
req.RemoteAddr = "192.0.2.1:1234"
}
- if req.RequestURI == "" && req.URL != nil {
- req.RequestURI = req.URL.String()
- }
-
if req.ContentLength == 0 {
- req.ContentLength, _ = strconv.ParseInt(req.Header.Get(HeaderContentLength), 10, 64)
+ req.ContentLength = -1
} else {
- req.Header.Set(HeaderContentLength, fmt.Sprintf("%d", req.ContentLength))
+ size := strconv.FormatInt(req.ContentLength, 10)
+ req.Header.Set(HeaderContentLength, size)
}
if host := req.Header.Get(HeaderHost); host != "" {
diff --git a/v2/pkg/assetserver/body_recorder.go b/v2/pkg/assetserver/body_recorder.go
new file mode 100644
index 00000000000..fa3bc1e7cb3
--- /dev/null
+++ b/v2/pkg/assetserver/body_recorder.go
@@ -0,0 +1,61 @@
+package assetserver
+
+import (
+ "bytes"
+ "net/http"
+)
+
+type bodyRecorder struct {
+ http.ResponseWriter
+ doRecord func(code int, header http.Header) bool
+
+ body *bytes.Buffer
+ code int
+ wroteHeader bool
+}
+
+func (rw *bodyRecorder) Write(buf []byte) (int, error) {
+ rw.writeHeader(buf, http.StatusOK)
+ if rw.body != nil {
+ return rw.body.Write(buf)
+ }
+ return rw.ResponseWriter.Write(buf)
+}
+
+func (rw *bodyRecorder) WriteHeader(code int) {
+ rw.writeHeader(nil, code)
+}
+
+func (rw *bodyRecorder) Code() int {
+ return rw.code
+}
+
+func (rw *bodyRecorder) Body() *bytes.Buffer {
+ return rw.body
+}
+
+func (rw *bodyRecorder) writeHeader(buf []byte, code int) {
+ if rw.wroteHeader {
+ return
+ }
+
+ if rw.doRecord != nil {
+ header := rw.Header()
+ if len(buf) != 0 {
+ if _, hasType := header[HeaderContentType]; !hasType {
+ header.Set(HeaderContentType, http.DetectContentType(buf))
+ }
+ }
+
+ if rw.doRecord(code, header) {
+ rw.body = bytes.NewBuffer(nil)
+ }
+ }
+
+ if rw.body == nil {
+ rw.ResponseWriter.WriteHeader(code)
+ }
+
+ rw.code = code
+ rw.wroteHeader = true
+}
diff --git a/v2/pkg/assetserver/common.go b/v2/pkg/assetserver/common.go
index 01e51f2be82..57934e08e14 100644
--- a/v2/pkg/assetserver/common.go
+++ b/v2/pkg/assetserver/common.go
@@ -3,9 +3,9 @@ package assetserver
import (
"bytes"
"errors"
- "fmt"
"io"
"net/http"
+ "strconv"
"strings"
"github.com/wailsapp/wails/v2/pkg/options"
@@ -44,7 +44,7 @@ const (
func serveFile(rw http.ResponseWriter, filename string, blob []byte) error {
header := rw.Header()
- header.Set(HeaderContentLength, fmt.Sprintf("%d", len(blob)))
+ header.Set(HeaderContentLength, strconv.Itoa(len(blob)))
if mimeType := header.Get(HeaderContentType); mimeType == "" {
mimeType = GetMimetype(filename, blob)
header.Set(HeaderContentType, mimeType)
diff --git a/v2/pkg/assetserver/webview/request_darwin.go b/v2/pkg/assetserver/webview/request_darwin.go
index f0e85780b3d..c44e5f1969d 100644
--- a/v2/pkg/assetserver/webview/request_darwin.go
+++ b/v2/pkg/assetserver/webview/request_darwin.go
@@ -197,7 +197,10 @@ func (r *request) Close() error {
if r.body != nil {
err = r.body.Close()
}
- r.Response().Finish()
+ err = r.Response().Finish()
+ if err != nil {
+ return err
+ }
C.URLSchemeTaskRelease(r.task)
return err
}
diff --git a/v2/pkg/assetserver/webview/request_linux.go b/v2/pkg/assetserver/webview/request_linux.go
index 101ee12fbc6..c6785fb1cb4 100644
--- a/v2/pkg/assetserver/webview/request_linux.go
+++ b/v2/pkg/assetserver/webview/request_linux.go
@@ -4,7 +4,9 @@
package webview
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0
+#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
diff --git a/v2/pkg/assetserver/webview/request_windows.go b/v2/pkg/assetserver/webview/request_windows.go
new file mode 100644
index 00000000000..fa83cd8d75a
--- /dev/null
+++ b/v2/pkg/assetserver/webview/request_windows.go
@@ -0,0 +1,217 @@
+//go:build windows
+// +build windows
+
+package webview
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+ "strings"
+
+ "github.com/wailsapp/go-webview2/pkg/edge"
+)
+
+// NewRequest creates as new WebViewRequest for chromium. This Method must be called from the Main-Thread!
+func NewRequest(env *edge.ICoreWebView2Environment, args *edge.ICoreWebView2WebResourceRequestedEventArgs, invokeSync func(fn func())) (Request, error) {
+ req, err := args.GetRequest()
+ if err != nil {
+ return nil, fmt.Errorf("GetRequest failed: %s", err)
+ }
+ defer req.Release()
+
+ r := &request{
+ invokeSync: invokeSync,
+ }
+
+ code := http.StatusInternalServerError
+ r.response, err = env.CreateWebResourceResponse(nil, code, http.StatusText(code), "")
+ if err != nil {
+ return nil, fmt.Errorf("CreateWebResourceResponse failed: %s", err)
+ }
+
+ if err := args.PutResponse(r.response); err != nil {
+ r.finishResponse()
+ return nil, fmt.Errorf("PutResponse failed: %s", err)
+ }
+
+ r.deferral, err = args.GetDeferral()
+ if err != nil {
+ r.finishResponse()
+ return nil, fmt.Errorf("GetDeferral failed: %s", err)
+ }
+
+ r.url, r.urlErr = req.GetUri()
+ r.method, r.methodErr = req.GetMethod()
+ r.header, r.headerErr = getHeaders(req)
+
+ if content, err := req.GetContent(); err != nil {
+ r.bodyErr = err
+ } else if content != nil {
+ // It is safe to access Content from another Thread: https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/threading-model#thread-safety
+ r.body = &iStreamReleaseCloser{stream: content}
+ }
+
+ return r, nil
+}
+
+var _ Request = &request{}
+
+type request struct {
+ response *edge.ICoreWebView2WebResourceResponse
+ deferral *edge.ICoreWebView2Deferral
+
+ url string
+ urlErr error
+
+ method string
+ methodErr error
+
+ header http.Header
+ headerErr error
+
+ body io.ReadCloser
+ bodyErr error
+ rw *responseWriter
+
+ invokeSync func(fn func())
+}
+
+func (r *request) URL() (string, error) {
+ return r.url, r.urlErr
+}
+
+func (r *request) Method() (string, error) {
+ return r.method, r.methodErr
+}
+
+func (r *request) Header() (http.Header, error) {
+ return r.header, r.headerErr
+}
+
+func (r *request) Body() (io.ReadCloser, error) {
+ return r.body, r.bodyErr
+}
+
+func (r *request) Response() ResponseWriter {
+ if r.rw != nil {
+ return r.rw
+ }
+
+ r.rw = &responseWriter{req: r}
+ return r.rw
+}
+
+func (r *request) Close() error {
+ var errs []error
+ if r.body != nil {
+ if err := r.body.Close(); err != nil {
+ errs = append(errs, err)
+ }
+ r.body = nil
+ }
+
+ if err := r.Response().Finish(); err != nil {
+ errs = append(errs, err)
+ }
+
+ return combineErrs(errs)
+}
+
+// finishResponse must be called on the main-thread
+func (r *request) finishResponse() error {
+ var errs []error
+ if r.response != nil {
+ if err := r.response.Release(); err != nil {
+ errs = append(errs, err)
+ }
+ r.response = nil
+ }
+ if r.deferral != nil {
+ if err := r.deferral.Complete(); err != nil {
+ errs = append(errs, err)
+ }
+
+ if err := r.deferral.Release(); err != nil {
+ errs = append(errs, err)
+ }
+ r.deferral = nil
+ }
+ return combineErrs(errs)
+}
+
+type iStreamReleaseCloser struct {
+ stream *edge.IStream
+ closed bool
+}
+
+func (i *iStreamReleaseCloser) Read(p []byte) (int, error) {
+ if i.closed {
+ return 0, io.ErrClosedPipe
+ }
+ return i.stream.Read(p)
+}
+
+func (i *iStreamReleaseCloser) Close() error {
+ if i.closed {
+ return nil
+ }
+ i.closed = true
+ return i.stream.Release()
+}
+
+func getHeaders(req *edge.ICoreWebView2WebResourceRequest) (http.Header, error) {
+ header := http.Header{}
+ headers, err := req.GetHeaders()
+ if err != nil {
+ return nil, fmt.Errorf("GetHeaders Error: %s", err)
+ }
+ defer headers.Release()
+
+ headersIt, err := headers.GetIterator()
+ if err != nil {
+ return nil, fmt.Errorf("GetIterator Error: %s", err)
+ }
+ defer headersIt.Release()
+
+ for {
+ has, err := headersIt.HasCurrentHeader()
+ if err != nil {
+ return nil, fmt.Errorf("HasCurrentHeader Error: %s", err)
+ }
+ if !has {
+ break
+ }
+
+ name, value, err := headersIt.GetCurrentHeader()
+ if err != nil {
+ return nil, fmt.Errorf("GetCurrentHeader Error: %s", err)
+ }
+
+ header.Set(name, value)
+ if _, err := headersIt.MoveNext(); err != nil {
+ return nil, fmt.Errorf("MoveNext Error: %s", err)
+ }
+ }
+
+ // WebView2 has problems when a request returns a 304 status code and the WebView2 is going to hang for other
+ // requests including IPC calls.
+ // So prevent 304 status codes by removing the headers that are used in combinationwith caching.
+ header.Del("If-Modified-Since")
+ header.Del("If-None-Match")
+ return header, nil
+}
+
+func combineErrs(errs []error) error {
+ // TODO use Go1.20 errors.Join
+ if len(errs) == 0 {
+ return nil
+ }
+
+ errStrings := make([]string, len(errs))
+ for i, err := range errs {
+ errStrings[i] = err.Error()
+ }
+
+ return fmt.Errorf(strings.Join(errStrings, "\n"))
+}
diff --git a/v2/pkg/assetserver/webview/responsewriter.go b/v2/pkg/assetserver/webview/responsewriter.go
index d67802a056c..dacbb567de9 100644
--- a/v2/pkg/assetserver/webview/responsewriter.go
+++ b/v2/pkg/assetserver/webview/responsewriter.go
@@ -21,5 +21,5 @@ type ResponseWriter interface {
http.ResponseWriter
// Finish the response and flush all data. A Finish after the request has already been finished has no effect.
- Finish()
+ Finish() error
}
diff --git a/v2/pkg/assetserver/webview/responsewriter_darwin.go b/v2/pkg/assetserver/webview/responsewriter_darwin.go
index 1c0cbee7224..77de3c4554f 100644
--- a/v2/pkg/assetserver/webview/responsewriter_darwin.go
+++ b/v2/pkg/assetserver/webview/responsewriter_darwin.go
@@ -133,15 +133,16 @@ func (rw *responseWriter) WriteHeader(code int) {
C.URLSchemeTaskDidReceiveResponse(rw.r.task, C.int(code), headers, C.int(headersLen))
}
-func (rw *responseWriter) Finish() {
+func (rw *responseWriter) Finish() error {
if !rw.wroteHeader {
rw.WriteHeader(http.StatusNotImplemented)
}
if rw.finished {
- return
+ return nil
}
rw.finished = true
C.URLSchemeTaskDidFinish(rw.r.task)
+ return nil
}
diff --git a/v2/pkg/assetserver/webview/responsewriter_linux.go b/v2/pkg/assetserver/webview/responsewriter_linux.go
index 9b3f53a78c4..59646ce29b3 100644
--- a/v2/pkg/assetserver/webview/responsewriter_linux.go
+++ b/v2/pkg/assetserver/webview/responsewriter_linux.go
@@ -4,7 +4,9 @@
package webview
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0
+#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
@@ -84,18 +86,19 @@ func (rw *responseWriter) WriteHeader(code int) {
}
}
-func (rw *responseWriter) Finish() {
+func (rw *responseWriter) Finish() error {
if !rw.wroteHeader {
rw.WriteHeader(http.StatusNotImplemented)
}
if rw.finished {
- return
+ return nil
}
rw.finished = true
if rw.w != nil {
rw.w.Close()
}
+ return nil
}
func (rw *responseWriter) finishWithError(code int, err error) {
diff --git a/v2/pkg/assetserver/webview/responsewriter_windows.go b/v2/pkg/assetserver/webview/responsewriter_windows.go
new file mode 100644
index 00000000000..748d9511b48
--- /dev/null
+++ b/v2/pkg/assetserver/webview/responsewriter_windows.go
@@ -0,0 +1,105 @@
+//go:build windows
+// +build windows
+
+package webview
+
+import (
+ "bytes"
+ "fmt"
+ "net/http"
+ "strings"
+)
+
+var _ http.ResponseWriter = &responseWriter{}
+
+type responseWriter struct {
+ req *request
+
+ header http.Header
+ wroteHeader bool
+ code int
+ body *bytes.Buffer
+
+ finished bool
+}
+
+func (rw *responseWriter) Header() http.Header {
+ if rw.header == nil {
+ rw.header = http.Header{}
+ }
+ return rw.header
+}
+
+func (rw *responseWriter) Write(buf []byte) (int, error) {
+ if rw.finished {
+ return 0, errResponseFinished
+ }
+
+ rw.WriteHeader(http.StatusOK)
+
+ return rw.body.Write(buf)
+}
+
+func (rw *responseWriter) WriteHeader(code int) {
+ if rw.wroteHeader || rw.finished {
+ return
+ }
+ rw.wroteHeader = true
+
+ if rw.body == nil {
+ rw.body = &bytes.Buffer{}
+ }
+
+ rw.code = code
+}
+
+func (rw *responseWriter) Finish() error {
+ if !rw.wroteHeader {
+ rw.WriteHeader(http.StatusNotImplemented)
+ }
+
+ if rw.finished {
+ return nil
+ }
+ rw.finished = true
+
+ var errs []error
+
+ code := rw.code
+ if code == http.StatusNotModified {
+ // WebView2 has problems when a request returns a 304 status code and the WebView2 is going to hang for other
+ // requests including IPC calls.
+ errs = append(errs, fmt.Errorf("AssetServer returned 304 - StatusNotModified which are going to hang WebView2, changed code to 505 - StatusInternalServerError"))
+ code = http.StatusInternalServerError
+ }
+
+ rw.req.invokeSync(func() {
+ resp := rw.req.response
+
+ hdrs, err := resp.GetHeaders()
+ if err != nil {
+ errs = append(errs, fmt.Errorf("Resp.GetHeaders failed: %s", err))
+ } else {
+ for k, v := range rw.header {
+ if err := hdrs.AppendHeader(k, strings.Join(v, ",")); err != nil {
+ errs = append(errs, fmt.Errorf("Resp.AppendHeader failed: %s", err))
+ }
+ }
+ hdrs.Release()
+ }
+
+ if err := resp.PutStatusCode(code); err != nil {
+ errs = append(errs, fmt.Errorf("Resp.PutStatusCode failed: %s", err))
+ }
+
+ if err := resp.PutByteContent(rw.body.Bytes()); err != nil {
+ errs = append(errs, fmt.Errorf("Resp.PutByteContent failed: %s", err))
+ }
+
+ if err := rw.req.finishResponse(); err != nil {
+ errs = append(errs, fmt.Errorf("Resp.finishResponse failed: %s", err))
+ }
+ })
+
+ return combineErrs(errs)
+}
diff --git a/v2/pkg/assetserver/webview/webkit2_36+.go b/v2/pkg/assetserver/webview/webkit2_36+.go
index 2c1a79c4331..1f0db3c8950 100644
--- a/v2/pkg/assetserver/webview/webkit2_36+.go
+++ b/v2/pkg/assetserver/webview/webkit2_36+.go
@@ -1,9 +1,11 @@
-//go:build linux && (webkit2_36 || webkit2_40)
+//go:build linux && (webkit2_36 || webkit2_40 || webkit2_41 )
package webview
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 libsoup-2.4
+#cgo linux pkg-config: gtk+-3.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0 libsoup-2.4
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1 libsoup-3.0
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
diff --git a/v2/pkg/assetserver/webview/webkit2_40+.go b/v2/pkg/assetserver/webview/webkit2_40+.go
index dceb0803d5d..eb3e439f224 100644
--- a/v2/pkg/assetserver/webview/webkit2_40+.go
+++ b/v2/pkg/assetserver/webview/webkit2_40+.go
@@ -1,9 +1,11 @@
-//go:build linux && webkit2_40
+//go:build linux && (webkit2_40 || webkit2_41)
package webview
/*
-#cgo linux pkg-config: gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0
+#cgo linux pkg-config: gtk+-3.0 gio-unix-2.0
+#cgo !webkit2_41 pkg-config: webkit2gtk-4.0
+#cgo webkit2_41 pkg-config: webkit2gtk-4.1
#include "gtk/gtk.h"
#include "webkit2/webkit2.h"
diff --git a/v2/pkg/assetserver/webview/webkit2_41.go b/v2/pkg/assetserver/webview/webkit2_41.go
new file mode 100644
index 00000000000..82f948d06c0
--- /dev/null
+++ b/v2/pkg/assetserver/webview/webkit2_41.go
@@ -0,0 +1,5 @@
+//go:build linux && webkit2_41
+
+package webview
+
+const Webkit2MinMinorVersion = 41
diff --git a/v2/pkg/assetserver/webview/webkit2_legacy.go b/v2/pkg/assetserver/webview/webkit2_legacy.go
index 1a87fe96aeb..1d1cf7c2b69 100644
--- a/v2/pkg/assetserver/webview/webkit2_legacy.go
+++ b/v2/pkg/assetserver/webview/webkit2_legacy.go
@@ -1,4 +1,4 @@
-//go:build linux && !(webkit2_36 || webkit2_40)
+//go:build linux && !(webkit2_36 || webkit2_40 || webkit2_41)
package webview
diff --git a/v2/pkg/buildassets/build/darwin/Info.dev.plist b/v2/pkg/buildassets/build/darwin/Info.dev.plist
index 02e7358ee86..04727c23f95 100644
--- a/v2/pkg/buildassets/build/darwin/Info.dev.plist
+++ b/v2/pkg/buildassets/build/darwin/Info.dev.plist
@@ -23,10 +23,46 @@
true
NSHumanReadableCopyright
{{.Info.Copyright}}
+ {{if .Info.FileAssociations}}
+ CFBundleDocumentTypes
+
+ {{range .Info.FileAssociations}}
+
+ CFBundleTypeExtensions
+
+ {{.Ext}}
+
+ CFBundleTypeName
+ {{.Name}}
+ CFBundleTypeRole
+ {{.Role}}
+ CFBundleTypeIconFile
+ {{.IconName}}
+
+ {{end}}
+
+ {{end}}
+ {{if .Info.Protocols}}
+ CFBundleURLTypes
+
+ {{range .Info.Protocols}}
+
+ CFBundleURLName
+ com.wails.{{.Scheme}}
+ CFBundleURLSchemes
+
+ {{.Scheme}}
+
+ CFBundleTypeRole
+ {{.Role}}
+
+ {{end}}
+
+ {{end}}
NSAppTransportSecurity
NSAllowsLocalNetworking
-
\ No newline at end of file
+
diff --git a/v2/pkg/buildassets/build/darwin/Info.plist b/v2/pkg/buildassets/build/darwin/Info.plist
index e7819a7e877..19cc9370cb8 100644
--- a/v2/pkg/buildassets/build/darwin/Info.plist
+++ b/v2/pkg/buildassets/build/darwin/Info.plist
@@ -23,5 +23,41 @@
true
NSHumanReadableCopyright
{{.Info.Copyright}}
+ {{if .Info.FileAssociations}}
+ CFBundleDocumentTypes
+
+ {{range .Info.FileAssociations}}
+
+ CFBundleTypeExtensions
+
+ {{.Ext}}
+
+ CFBundleTypeName
+ {{.Name}}
+ CFBundleTypeRole
+ {{.Role}}
+ CFBundleTypeIconFile
+ {{.IconName}}
+
+ {{end}}
+
+ {{end}}
+ {{if .Info.Protocols}}
+ CFBundleURLTypes
+
+ {{range .Info.Protocols}}
+
+ CFBundleURLName
+ com.wails.{{.Scheme}}
+ CFBundleURLSchemes
+
+ {{.Scheme}}
+
+ CFBundleTypeRole
+ {{.Role}}
+
+ {{end}}
+
+ {{end}}
-
\ No newline at end of file
+
diff --git a/v2/pkg/buildassets/build/windows/installer/project.nsi b/v2/pkg/buildassets/build/windows/installer/project.nsi
index c6054b89147..1988bfe0536 100644
--- a/v2/pkg/buildassets/build/windows/installer/project.nsi
+++ b/v2/pkg/buildassets/build/windows/installer/project.nsi
@@ -3,10 +3,10 @@ Unicode true
####
## Please note: Template replacements don't work in this file. They are provided with default defines like
## mentioned underneath.
-## If the keyword is not defined, "wails_tools.nsh" will populate them with the values from ProjectInfo.
-## If they are defined here, "wails_tools.nsh" will not touch them. This allows to use this project.nsi manually
+## If the keyword is not defined, "wails_tools.nsh" will populate them with the values from ProjectInfo.
+## If they are defined here, "wails_tools.nsh" will not touch them. This allows to use this project.nsi manually
## from outside of Wails for debugging and development of the installer.
-##
+##
## For development first make a wails nsis build to populate the "wails_tools.nsh":
## > wails build --target windows/amd64 --nsis
## Then you can call makensis on this file with specifying the path to your binary:
@@ -19,7 +19,7 @@ Unicode true
## For a installer with both architectures:
## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app-amd64.exe -DARG_WAILS_ARM64_BINARY=..\..\bin\app-arm64.exe -DARG_WAILS_386_BINARY=..\..\bin\app-win32.exe
####
-## The following information is taken from the ProjectInfo file, but they can be overwritten here.
+## The following information is taken from the ProjectInfo file, but they can be overwritten here.
####
## !define INFO_PROJECTNAME "MyProject" # Default "{{.Name}}"
## !define INFO_COMPANYNAME "MyCompany" # Default "{{.Info.CompanyName}}"
@@ -47,6 +47,9 @@ VIAddVersionKey "FileVersion" "${INFO_PRODUCTVERSION}"
VIAddVersionKey "LegalCopyright" "${INFO_COPYRIGHT}"
VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}"
+# Enable HiDPI support. https://nsis.sourceforge.io/Reference/ManifestDPIAware
+ManifestDPIAware true
+
!include "MUI.nsh"
!define MUI_ICON "..\icon.ico"
@@ -105,6 +108,9 @@ Section
CreateShortcut "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
CreateShortCut "$DESKTOP\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
+ !insertmacro wails.associateFiles
+ !insertmacro wails.associateCustomProtocols
+
!insertmacro wails.writeUninstaller
SectionEnd
@@ -120,6 +126,9 @@ Section "uninstall"
Delete "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk"
Delete "$DESKTOP\${INFO_PRODUCTNAME}.lnk"
+ !insertmacro wails.unassociateFiles
+ !insertmacro wails.unassociateCustomProtocols
+
!insertmacro wails.deleteUninstaller
SectionEnd
;function要写字section之后
diff --git a/v2/pkg/buildassets/build/windows/installer/wails_tools.nsh b/v2/pkg/buildassets/build/windows/installer/wails_tools.nsh
index dac8a35e04d..1da09c4ddfd 100644
--- a/v2/pkg/buildassets/build/windows/installer/wails_tools.nsh
+++ b/v2/pkg/buildassets/build/windows/installer/wails_tools.nsh
@@ -193,17 +193,87 @@ RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
Goto ok
${EndIf}
${EndIf}
-
+
SetDetailsPrint both
DetailPrint "${WAILS_INSTALL_WEBVIEW_DETAILPRINT}"
SetDetailsPrint listonly
-
+
InitPluginsDir
CreateDirectory "$pluginsdir\webview2bootstrapper"
SetOutPath "$pluginsdir\webview2bootstrapper"
File "tmp\MicrosoftEdgeWebview2Setup.exe"
ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install'
-
+
SetDetailsPrint both
ok:
-!macroend
\ No newline at end of file
+!macroend
+
+# Copy of APP_ASSOCIATE and APP_UNASSOCIATE macros from here https://gist.github.com/nikku/281d0ef126dbc215dd58bfd5b3a5cd5b
+!macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION ICON COMMANDTEXT COMMAND
+ ; Backup the previously associated file class
+ ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" ""
+ WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "${FILECLASS}_backup" "$R0"
+
+ WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "${FILECLASS}"
+
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}" "" `${DESCRIPTION}`
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\DefaultIcon" "" `${ICON}`
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell" "" "open"
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open" "" `${COMMANDTEXT}`
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open\command" "" `${COMMAND}`
+!macroend
+
+!macro APP_UNASSOCIATE EXT FILECLASS
+ ; Backup the previously associated file class
+ ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" `${FILECLASS}_backup`
+ WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "$R0"
+
+ DeleteRegKey SHELL_CONTEXT `Software\Classes\${FILECLASS}`
+!macroend
+
+!macro wails.associateFiles
+ ; Create file associations
+ {{range .Info.FileAssociations}}
+ !insertmacro APP_ASSOCIATE "{{.Ext}}" "{{.Name}}" "{{.Description}}" "$INSTDIR\{{.IconName}}.ico" "Open with ${INFO_PRODUCTNAME}" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\""
+
+ File "..\{{.IconName}}.ico"
+ {{end}}
+!macroend
+
+!macro wails.unassociateFiles
+ ; Delete app associations
+ {{range .Info.FileAssociations}}
+ !insertmacro APP_UNASSOCIATE "{{.Ext}}" "{{.Name}}"
+
+ Delete "$INSTDIR\{{.IconName}}.ico"
+ {{end}}
+!macroend
+
+!macro CUSTOM_PROTOCOL_ASSOCIATE PROTOCOL DESCRIPTION ICON COMMAND
+ DeleteRegKey SHELL_CONTEXT "Software\Classes\${PROTOCOL}"
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}" "" "${DESCRIPTION}"
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}" "URL Protocol" ""
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\DefaultIcon" "" "${ICON}"
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell" "" ""
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell\open" "" ""
+ WriteRegStr SHELL_CONTEXT "Software\Classes\${PROTOCOL}\shell\open\command" "" "${COMMAND}"
+!macroend
+
+!macro CUSTOM_PROTOCOL_UNASSOCIATE PROTOCOL
+ DeleteRegKey SHELL_CONTEXT "Software\Classes\${PROTOCOL}"
+!macroend
+
+!macro wails.associateCustomProtocols
+ ; Create custom protocols associations
+ {{range .Info.Protocols}}
+ !insertmacro CUSTOM_PROTOCOL_ASSOCIATE "{{.Scheme}}" "{{.Description}}" "$INSTDIR\${PRODUCT_EXECUTABLE},0" "$INSTDIR\${PRODUCT_EXECUTABLE} $\"%1$\""
+
+ {{end}}
+!macroend
+
+!macro wails.unassociateCustomProtocols
+ ; Delete app custom protocol associations
+ {{range .Info.Protocols}}
+ !insertmacro CUSTOM_PROTOCOL_UNASSOCIATE "{{.Scheme}}"
+ {{end}}
+!macroend
diff --git a/v2/pkg/buildassets/buildassets.go b/v2/pkg/buildassets/buildassets.go
index 26401745db3..778d97fbfd5 100644
--- a/v2/pkg/buildassets/buildassets.go
+++ b/v2/pkg/buildassets/buildassets.go
@@ -128,12 +128,12 @@ func writeFileSystemFile(projectData *project.Project, file string, content []by
targetPath := GetLocalPath(projectData, file)
if dir := filepath.Dir(targetPath); !fs.DirExists(dir) {
- if err := fs.MkDirs(dir, 0755); err != nil {
+ if err := fs.MkDirs(dir, 0o755); err != nil {
return fmt.Errorf("Unable to create directory: %w", err)
}
}
- if err := os.WriteFile(targetPath, content, 0644); err != nil {
+ if err := os.WriteFile(targetPath, content, 0o644); err != nil {
return err
}
return nil
diff --git a/v2/pkg/commands/bindings/bindings.go b/v2/pkg/commands/bindings/bindings.go
index 71c1747b736..a4a84e1be66 100644
--- a/v2/pkg/commands/bindings/bindings.go
+++ b/v2/pkg/commands/bindings/bindings.go
@@ -18,15 +18,16 @@ type Options struct {
Filename string
Tags []string
ProjectDirectory string
+ Compiler string
GoModTidy bool
TsPrefix string
TsSuffix string
+ TsOutputType string
}
// GenerateBindings generates bindings for the Wails project in the given ProjectDirectory.
// If no project directory is given then the current working directory is used.
func GenerateBindings(options Options) (string, error) {
-
filename, _ := lo.Coalesce(options.Filename, "wailsbindings")
if runtime.GOOS == "windows" {
filename += ".exe"
@@ -46,17 +47,25 @@ func GenerateBindings(options Options) (string, error) {
tagString := buildtags.Stringify(genModuleTags)
if options.GoModTidy {
- stdout, stderr, err = shell.RunCommand(workingDirectory, "go", "mod", "tidy")
+ stdout, stderr, err = shell.RunCommand(workingDirectory, options.Compiler, "mod", "tidy")
if err != nil {
return stdout, fmt.Errorf("%s\n%s\n%s", stdout, stderr, err)
}
}
- stdout, stderr, err = shell.RunCommand(workingDirectory, "go", "build", "-tags", tagString, "-o", filename)
+ stdout, stderr, err = shell.RunCommand(workingDirectory, options.Compiler, "build", "-tags", tagString, "-o", filename)
if err != nil {
return stdout, fmt.Errorf("%s\n%s\n%s", stdout, stderr, err)
}
+ if runtime.GOOS == "darwin" {
+ // Remove quarantine attribute
+ stdout, stderr, err = shell.RunCommand(workingDirectory, "/usr/bin/xattr", "-rc", filename)
+ if err != nil {
+ return stdout, fmt.Errorf("%s\n%s\n%s", stdout, stderr, err)
+ }
+ }
+
defer func() {
// Best effort removal of temp file
_ = os.Remove(filename)
@@ -66,6 +75,7 @@ func GenerateBindings(options Options) (string, error) {
env := os.Environ()
env = shell.SetEnv(env, "tsprefix", options.TsPrefix)
env = shell.SetEnv(env, "tssuffix", options.TsSuffix)
+ env = shell.SetEnv(env, "tsoutputtype", options.TsOutputType)
stdout, stderr, err = shell.RunCommandWithEnv(env, workingDirectory, filename)
if err != nil {
diff --git a/v2/pkg/commands/bindings/bindings_test.go b/v2/pkg/commands/bindings/bindings_test.go
index a2cbed43697..53f42f2c78d 100644
--- a/v2/pkg/commands/bindings/bindings_test.go
+++ b/v2/pkg/commands/bindings/bindings_test.go
@@ -1,13 +1,14 @@
package bindings
import (
- "github.com/matryer/is"
- "github.com/wailsapp/wails/v2/pkg/templates"
"os"
"path/filepath"
"runtime"
"strings"
"testing"
+
+ "github.com/matryer/is"
+ "github.com/wailsapp/wails/v2/pkg/templates"
)
const standardBindings = `// @ts-check
@@ -80,6 +81,7 @@ func TestGenerateBindings(t *testing.T) {
name: "should generate standard bindings with no user tags",
options: Options{
ProjectDirectory: projectDir,
+ Compiler: "go",
GoModTidy: true,
},
expectedBindings: standardBindings,
@@ -90,6 +92,7 @@ func TestGenerateBindings(t *testing.T) {
name: "should generate bindings when given tags",
options: Options{
ProjectDirectory: projectDir,
+ Compiler: "go",
Tags: []string{"test"},
GoModTidy: true,
},
@@ -101,6 +104,7 @@ func TestGenerateBindings(t *testing.T) {
name: "should generate obfuscated bindings",
options: Options{
ProjectDirectory: projectDir,
+ Compiler: "go",
Tags: []string{"obfuscated"},
GoModTidy: true,
},
diff --git a/v2/pkg/commands/build/base.go b/v2/pkg/commands/build/base.go
index fbae6ce7eab..6595aff0f6b 100644
--- a/v2/pkg/commands/build/base.go
+++ b/v2/pkg/commands/build/base.go
@@ -74,7 +74,6 @@ func (b *BaseBuilder) convertFileToIntegerString(filename string) (string, error
}
func (b *BaseBuilder) convertByteSliceToIntegerString(data []byte) string {
-
// Create string builder
var result strings.Builder
@@ -85,8 +84,7 @@ func (b *BaseBuilder) convertByteSliceToIntegerString(data []byte) string {
result.WriteString(fmt.Sprintf("%v,", data[i]))
}
- result.WriteString(fmt.Sprintf("%v", data[len(data)-1]))
-
+ result.WriteString(strconv.FormatUint(uint64(data[len(data)-1]), 10))
}
return result.String()
@@ -94,10 +92,8 @@ func (b *BaseBuilder) convertByteSliceToIntegerString(data []byte) string {
// CleanUp does post-build housekeeping
func (b *BaseBuilder) CleanUp() {
-
// Delete all the files
b.filesToDelete.Each(func(filename string) {
-
// if file doesn't exist, ignore
if !b.fileExists(filename) {
return
@@ -106,7 +102,6 @@ func (b *BaseBuilder) CleanUp() {
// Delete file. We ignore errors because these files will be overwritten
// by the next build anyway.
_ = os.Remove(filename)
-
})
}
@@ -159,7 +154,6 @@ func (b *BaseBuilder) OutputFilename(options *Options) string {
// CompileProject compiles the project
func (b *BaseBuilder) CompileProject(options *Options) error {
-
// Check if the runtime wrapper exists
err := generateRuntimeWrapper(options)
if err != nil {
@@ -234,6 +228,11 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
tags.Add("debug")
}
+ // This options allows you to enable devtools in production build (not dev build as it's always enabled there)
+ if options.Devtools {
+ tags.Add("devtools")
+ }
+
if options.Obfuscated {
tags.Add("obfuscated")
}
@@ -397,7 +396,7 @@ Please reinstall by doing the following:
return nil
}
- var args = []string{"--best", "--no-color", "--no-progress", options.CompiledBinary}
+ args := []string{"--best", "--no-color", "--no-progress", options.CompiledBinary}
if options.CompressFlags != "" {
args = strings.Split(options.CompressFlags, " ")
@@ -421,7 +420,6 @@ Please reinstall by doing the following:
}
func generateRuntimeWrapper(options *Options) error {
-
if options.WailsJSDir == "" {
cwd, err := os.Getwd()
if err != nil {
@@ -447,7 +445,6 @@ func (b *BaseBuilder) NpmInstall(sourceDir string, verbose bool) error {
// NpmInstallUsingCommand runs the given install command in the specified npm project directory
func (b *BaseBuilder) NpmInstallUsingCommand(sourceDir string, installCommand string, verbose bool) error {
-
packageJSON := filepath.Join(sourceDir, "package.json")
// Check package.json exists
@@ -487,7 +484,7 @@ func (b *BaseBuilder) NpmInstallUsingCommand(sourceDir string, installCommand st
}
// Shortcut installation
- if install == false {
+ if !install {
if verbose {
pterm.Println("Skipping npm install")
}
@@ -544,7 +541,6 @@ func (b *BaseBuilder) NpmRunWithEnvironment(projectDir, buildTarget string, verb
// BuildFrontend executes the `npm build` command for the frontend directory
func (b *BaseBuilder) BuildFrontend(outputLogger *clilogger.CLILogger) error {
-
verbose := b.options.Verbosity == VERBOSE
frontendDir := b.projectData.GetFrontendDir()
diff --git a/v2/pkg/commands/build/build.go b/v2/pkg/commands/build/build.go
index cad768fa2d7..261f4c6d7ff 100644
--- a/v2/pkg/commands/build/build.go
+++ b/v2/pkg/commands/build/build.go
@@ -7,6 +7,7 @@ import (
"runtime"
"strings"
+ "github.com/google/shlex"
"github.com/pterm/pterm"
"github.com/samber/lo"
@@ -40,6 +41,7 @@ type Options struct {
Logger *clilogger.CLILogger // All output to the logger
OutputType string // EG: desktop, server....
Mode Mode // release or dev
+ Devtools bool // Enable devtools in production
ProjectData *project.Project // The project data
Pack bool // Create a package for the app after building
Platform string // The platform to build for
@@ -71,7 +73,6 @@ type Options struct {
// Build the project!
func Build(options *Options) (string, error) {
-
// Extract logger
outputLogger := options.Logger
@@ -144,15 +145,15 @@ func Build(options *Options) (string, error) {
if err != nil {
return "", err
}
- }
- hookArgs["${bin}"] = compileBinary
- for _, hook := range []string{options.Platform + "/" + options.Arch, options.Platform + "/*", "*/*"} {
- if err := execPostBuildHook(outputLogger, options, hook, hookArgs); err != nil {
- return "", err
+ hookArgs["${bin}"] = compileBinary
+ for _, hook := range []string{options.Platform + "/" + options.Arch, options.Platform + "/*", "*/*"} {
+ if err := execPostBuildHook(outputLogger, options, hook, hookArgs); err != nil {
+ return "", err
+ }
}
- }
+ }
return compileBinary, nil
}
@@ -168,21 +169,23 @@ func CreateEmbedDirectories(cwd string, buildOptions *Options) error {
for _, embedDetail := range embedDetails {
fullPath := embedDetail.GetFullPath()
- if _, err := os.Stat(fullPath); os.IsNotExist(err) {
- err := os.MkdirAll(fullPath, 0755)
- if err != nil {
- return err
- }
- f, err := os.Create(filepath.Join(fullPath, "gitkeep"))
- if err != nil {
- return err
+ // assumes path is directory only if it has no extension
+ if filepath.Ext(fullPath) == "" {
+ if _, err := os.Stat(fullPath); os.IsNotExist(err) {
+ err := os.MkdirAll(fullPath, 0o755)
+ if err != nil {
+ return err
+ }
+ f, err := os.Create(filepath.Join(fullPath, "gitkeep"))
+ if err != nil {
+ return err
+ }
+ _ = f.Close()
}
- _ = f.Close()
}
}
return nil
-
}
func fatal(message string) {
@@ -207,11 +210,10 @@ func printBulletPoint(text string, args ...any) {
fatal(err.Error())
}
t = strings.Trim(t, "\n\r")
- pterm.Printfln(t, args...)
+ pterm.Printf(t, args...)
}
func GenerateBindings(buildOptions *Options) error {
-
obfuscated := buildOptions.Obfuscated
if obfuscated {
printBulletPoint("Generating obfuscated bindings: ")
@@ -220,12 +222,18 @@ func GenerateBindings(buildOptions *Options) error {
printBulletPoint("Generating bindings: ")
}
+ if buildOptions.ProjectData.Bindings.TsGeneration.OutputType == "" {
+ buildOptions.ProjectData.Bindings.TsGeneration.OutputType = "classes"
+ }
+
// Generate Bindings
output, err := bindings.GenerateBindings(bindings.Options{
- Tags: buildOptions.UserTags,
- GoModTidy: !buildOptions.SkipModTidy,
- TsPrefix: buildOptions.ProjectData.Bindings.TsGeneration.Prefix,
- TsSuffix: buildOptions.ProjectData.Bindings.TsGeneration.Suffix,
+ Compiler: buildOptions.Compiler,
+ Tags: buildOptions.UserTags,
+ GoModTidy: !buildOptions.SkipModTidy,
+ TsPrefix: buildOptions.ProjectData.Bindings.TsGeneration.Prefix,
+ TsSuffix: buildOptions.ProjectData.Bindings.TsGeneration.Suffix,
+ TsOutputType: buildOptions.ProjectData.Bindings.TsGeneration.OutputType,
})
if err != nil {
return err
@@ -253,7 +261,7 @@ func execBuildApplication(builder Builder, options *Options) (string, error) {
// When we finish, we will want to remove the syso file
defer func() {
- err := os.Remove(filepath.Join(options.ProjectData.Path, options.ProjectData.Name+"-res.syso"))
+ err := os.Remove(filepath.Join(options.ProjectData.Path, strings.ReplaceAll(options.ProjectData.Name, " ", "_")+"-res.syso"))
if err != nil {
fatal(err.Error())
}
@@ -317,6 +325,20 @@ func execBuildApplication(builder Builder, options *Options) (string, error) {
}
}
+ if runtime.GOOS == "darwin" {
+ // Remove quarantine attribute
+ if _, err := os.Stat(options.CompiledBinary); os.IsNotExist(err) {
+ return "", fmt.Errorf("compiled binary does not exist at path: %s", options.CompiledBinary)
+ }
+ stdout, stderr, err := shell.RunCommand(options.BinDirectory, "/usr/bin/xattr", "-rc", options.CompiledBinary)
+ if err != nil {
+ return "", fmt.Errorf("%s - %s", err.Error(), stderr)
+ }
+ if options.Verbosity == VERBOSE && stdout != "" {
+ pterm.Info.Println(stdout)
+ }
+ }
+
pterm.Println("Done.")
// Do we need to pack the app for non-windows?
@@ -346,8 +368,8 @@ func execBuildApplication(builder Builder, options *Options) (string, error) {
}
}
- if options.Platform == "darwin" && options.Mode == Debug {
- pterm.Warning.Println("A darwin debug build contains private APIs, please don't distribute this build. Please use it only as a test build for testing and debug purposes.")
+ if options.Platform == "darwin" && (options.Mode == Debug || options.Devtools) {
+ pterm.Warning.Println("This darwin build contains the use of private APIs. This will not pass Apple's AppStore approval process. Please use it only as a test build for testing and debug purposes.")
}
return options.CompiledBinary, nil
@@ -369,10 +391,9 @@ func execPostBuildHook(outputLogger *clilogger.CLILogger, options *Options, hook
}
return executeBuildHook(outputLogger, options, hookIdentifier, argReplacements, postBuildHook, "post")
-
}
-func executeBuildHook(outputLogger *clilogger.CLILogger, options *Options, hookIdentifier string, argReplacements map[string]string, buildHook string, hookName string) error {
+func executeBuildHook(_ *clilogger.CLILogger, options *Options, hookIdentifier string, argReplacements map[string]string, buildHook string, hookName string) error {
if !options.ProjectData.RunNonNativeBuildHooks {
if hookIdentifier == "" {
// That's the global hook
@@ -391,7 +412,10 @@ func executeBuildHook(outputLogger *clilogger.CLILogger, options *Options, hookI
}
printBulletPoint("Executing %s build hook '%s': ", hookName, hookIdentifier)
- args := strings.Split(buildHook, " ")
+ args, err := shlex.Split(buildHook)
+ if err != nil {
+ return fmt.Errorf("could not parse %s build hook command: %w", hookName, err)
+ }
for i, arg := range args {
newArg := argReplacements[arg]
if newArg == "" {
@@ -402,7 +426,6 @@ func executeBuildHook(outputLogger *clilogger.CLILogger, options *Options, hookI
if options.Verbosity == VERBOSE {
pterm.Info.Println(strings.Join(args, " "))
-
}
if !fs.DirExists(options.BinDirectory) {
diff --git a/v2/pkg/commands/build/builder.go b/v2/pkg/commands/build/builder.go
index 4840341c031..6a220c530bd 100644
--- a/v2/pkg/commands/build/builder.go
+++ b/v2/pkg/commands/build/builder.go
@@ -8,8 +8,8 @@ import (
// Builder defines a builder that can build Wails applications
type Builder interface {
SetProjectData(projectData *project.Project)
- BuildFrontend(*clilogger.CLILogger) error
- CompileProject(*Options) error
- OutputFilename(*Options) string
+ BuildFrontend(logger *clilogger.CLILogger) error
+ CompileProject(options *Options) error
+ OutputFilename(options *Options) string
CleanUp()
}
diff --git a/v2/pkg/commands/build/nsis_installer.go b/v2/pkg/commands/build/nsis_installer.go
index fbc186475e7..49dba07dd1e 100644
--- a/v2/pkg/commands/build/nsis_installer.go
+++ b/v2/pkg/commands/build/nsis_installer.go
@@ -41,7 +41,7 @@ func GenerateNSISInstaller(options *Options, amd64Binary string, arm64Binary str
// Write the WebView2 SetupFile
webviewSetup := buildassets.GetLocalPath(options.ProjectData, path.Join(nsisFolder, nsisWebView2SetupFile))
if dir := filepath.Dir(webviewSetup); !fs.DirExists(dir) {
- if err := fs.MkDirs(dir, 0755); err != nil {
+ if err := fs.MkDirs(dir, 0o755); err != nil {
return err
}
}
@@ -98,7 +98,7 @@ func makeNSIS(options *Options, installerKind string, amd64Binary string, arm64B
outputLogger := options.Logger
outputLogger.Print(" - Building '%s' installer: ", installerKind)
- var args = []string{}
+ args := []string{}
if amd64Binary != "" {
args = append(args, "-DARG_WAILS_AMD64_BINARY="+amd64Binary)
}
diff --git a/v2/pkg/commands/build/packager.go b/v2/pkg/commands/build/packager.go
index 92ce37e9056..d406256f9d3 100644
--- a/v2/pkg/commands/build/packager.go
+++ b/v2/pkg/commands/build/packager.go
@@ -3,12 +3,15 @@ package build
import (
"bytes"
"fmt"
- "github.com/leaanthony/winicon"
- "github.com/tc-hib/winres"
- "github.com/tc-hib/winres/version"
"image"
"os"
"path/filepath"
+ "strings"
+
+ "github.com/leaanthony/winicon"
+ "github.com/tc-hib/winres"
+ "github.com/tc-hib/winres/version"
+ "github.com/wailsapp/wails/v2/internal/project"
"github.com/jackmordaunt/icns"
"github.com/pkg/errors"
@@ -19,7 +22,6 @@ import (
// PackageProject packages the application
func packageProject(options *Options, platform string) error {
-
var err error
switch platform {
case "darwin":
@@ -41,7 +43,6 @@ func packageProject(options *Options, platform string) error {
// cleanBinDirectory will remove an existing bin directory and recreate it
func cleanBinDirectory(options *Options) error {
-
buildDirectory := options.BinDirectory
// Clear out old builds
@@ -53,7 +54,7 @@ func cleanBinDirectory(options *Options) error {
}
// Create clean directory
- err := os.MkdirAll(buildDirectory, 0700)
+ err := os.MkdirAll(buildDirectory, 0o700)
if err != nil {
return err
}
@@ -62,7 +63,6 @@ func cleanBinDirectory(options *Options) error {
}
func packageApplicationForDarwin(options *Options) error {
-
var err error
// Create directory structure
@@ -73,20 +73,20 @@ func packageApplicationForDarwin(options *Options) error {
contentsDirectory := filepath.Join(options.BinDirectory, bundlename, "/Contents")
exeDir := filepath.Join(contentsDirectory, "/MacOS")
- err = fs.MkDirs(exeDir, 0755)
+ err = fs.MkDirs(exeDir, 0o755)
if err != nil {
return err
}
resourceDir := filepath.Join(contentsDirectory, "/Resources")
- err = fs.MkDirs(resourceDir, 0755)
+ err = fs.MkDirs(resourceDir, 0o755)
if err != nil {
return err
}
// Copy binary
- packedBinaryPath := filepath.Join(exeDir, options.ProjectData.Name)
+ packedBinaryPath := filepath.Join(exeDir, options.ProjectData.OutputFilename)
err = fs.MoveFile(options.CompiledBinary, packedBinaryPath)
if err != nil {
- return errors.Wrap(err, "Cannot move file: "+options.ProjectData.OutputFilename)
+ return errors.Wrap(err, "Cannot move file: "+options.CompiledBinary)
}
// Generate Info.plist
@@ -95,19 +95,26 @@ func packageApplicationForDarwin(options *Options) error {
return err
}
- // Generate Icons
- err = processApplicationIcon(options, resourceDir)
+ // Generate App Icon
+ err = processDarwinIcon(options.ProjectData, "appicon", resourceDir, "iconfile")
if err != nil {
return err
}
+ // Generate FileAssociation Icons
+ for _, fileAssociation := range options.ProjectData.Info.FileAssociations {
+ err = processDarwinIcon(options.ProjectData, fileAssociation.IconName, resourceDir, "")
+ if err != nil {
+ return err
+ }
+ }
+
options.CompiledBinary = packedBinaryPath
return nil
}
func processPList(options *Options, contentsDirectory string) error {
-
sourcePList := "Info.plist"
if options.Mode == Dev {
// Use Info.dev.plist if using build mode
@@ -121,11 +128,11 @@ func processPList(options *Options, contentsDirectory string) error {
}
targetFile := filepath.Join(contentsDirectory, "Info.plist")
- return os.WriteFile(targetFile, content, 0644)
+ return os.WriteFile(targetFile, content, 0o644)
}
-func processApplicationIcon(options *Options, resourceDir string) (err error) {
- appIcon, err := buildassets.ReadFile(options.ProjectData, "appicon.png")
+func processDarwinIcon(projectData *project.Project, iconName string, resourceDir string, destIconName string) (err error) {
+ appIcon, err := buildassets.ReadFile(projectData, iconName+".png")
if err != nil {
return err
}
@@ -135,11 +142,14 @@ func processApplicationIcon(options *Options, resourceDir string) (err error) {
return err
}
- tgtBundle := filepath.Join(resourceDir, "iconfile.icns")
+ if destIconName == "" {
+ destIconName = iconName
+ }
+
+ tgtBundle := filepath.Join(resourceDir, destIconName+".icns")
dest, err := os.Create(tgtBundle)
if err != nil {
return err
-
}
defer func() {
err = dest.Close()
@@ -151,13 +161,21 @@ func processApplicationIcon(options *Options, resourceDir string) (err error) {
}
func packageApplicationForWindows(options *Options) error {
- // Generate icon
+ // Generate app icon
var err error
- err = generateIcoFile(options)
+ err = generateIcoFile(options, "appicon", "icon")
if err != nil {
return err
}
+ // Generate FileAssociation Icons
+ for _, fileAssociation := range options.ProjectData.Info.FileAssociations {
+ err = generateIcoFile(options, fileAssociation.IconName, "")
+ if err != nil {
+ return err
+ }
+ }
+
// Create syso file
err = compileResources(options)
if err != nil {
@@ -171,21 +189,26 @@ func packageApplicationForLinux(_ *Options) error {
return nil
}
-func generateIcoFile(options *Options) error {
- content, err := buildassets.ReadFile(options.ProjectData, "appicon.png")
+func generateIcoFile(options *Options, iconName string, destIconName string) error {
+ content, err := buildassets.ReadFile(options.ProjectData, iconName+".png")
if err != nil {
return err
}
+
+ if destIconName == "" {
+ destIconName = iconName
+ }
+
// Check ico file exists already
- icoFile := buildassets.GetLocalPath(options.ProjectData, "windows/icon.ico")
+ icoFile := buildassets.GetLocalPath(options.ProjectData, "windows/"+destIconName+".ico")
if !fs.FileExists(icoFile) {
if dir := filepath.Dir(icoFile); !fs.DirExists(dir) {
- if err := fs.MkDirs(dir, 0755); err != nil {
+ if err := fs.MkDirs(dir, 0o755); err != nil {
return err
}
}
- output, err := os.OpenFile(icoFile, os.O_CREATE|os.O_WRONLY, 0644)
+ output, err := os.OpenFile(icoFile, os.O_CREATE|os.O_WRONLY, 0o644)
if err != nil {
return err
}
@@ -200,13 +223,12 @@ func generateIcoFile(options *Options) error {
}
func compileResources(options *Options) error {
-
currentDir, err := os.Getwd()
if err != nil {
return err
}
defer func() {
- os.Chdir(currentDir)
+ _ = os.Chdir(currentDir)
}()
windowsDir := filepath.Join(options.ProjectData.GetBuildDir(), "windows")
err = os.Chdir(windowsDir)
@@ -253,7 +275,8 @@ func compileResources(options *Options) error {
rs.SetVersionInfo(v)
}
- targetFile := filepath.Join(options.ProjectData.Path, options.ProjectData.Name+"-res.syso")
+ // replace spaces with underscores as go build behaves weirdly with spaces in syso filename
+ targetFile := filepath.Join(options.ProjectData.Path, strings.ReplaceAll(options.ProjectData.Name, " ", "_")+"-res.syso")
fout, err := os.Create(targetFile)
if err != nil {
return err
diff --git a/v2/pkg/git/git.go b/v2/pkg/git/git.go
index 319c5672b75..a0ac68ca95e 100644
--- a/v2/pkg/git/git.go
+++ b/v2/pkg/git/git.go
@@ -1,7 +1,8 @@
package git
import (
- "html/template"
+ "encoding/json"
+ "fmt"
"runtime"
"strings"
@@ -30,9 +31,31 @@ func Email() (string, error) {
// Name tries to retrieve the
func Name() (string, error) {
+ errMsg := "failed to retrieve git user name: %w"
stdout, _, err := shell.RunCommand(".", gitcommand(), "config", "user.name")
- name := template.JSEscapeString(strings.TrimSpace(stdout))
- return name, err
+ if err != nil {
+ return "", fmt.Errorf(errMsg, err)
+ }
+ name := strings.TrimSpace(stdout)
+ return EscapeName(name)
+}
+
+func EscapeName(str string) (string, error) {
+ b, err := json.Marshal(str)
+ if err != nil {
+ return "", err
+ }
+ // Remove the surrounding quotes
+ escaped := string(b[1 : len(b)-1])
+
+ // Check if username is JSON compliant
+ var js json.RawMessage
+ jsonVal := fmt.Sprintf(`{"name": "%s"}`, escaped)
+ err = json.Unmarshal([]byte(jsonVal), &js)
+ if err != nil {
+ return "", fmt.Errorf("failed to retrieve git user name: %w", err)
+ }
+ return escaped, nil
}
func InitRepo(projectDir string) error {
diff --git a/v2/pkg/git/git_test.go b/v2/pkg/git/git_test.go
new file mode 100644
index 00000000000..238008ec3cc
--- /dev/null
+++ b/v2/pkg/git/git_test.go
@@ -0,0 +1,44 @@
+package git
+
+import (
+ "testing"
+)
+
+func TestEscapeName1(t *testing.T) {
+ type args struct {
+ str string
+ }
+ tests := []struct {
+ name string
+ args args
+ want string
+ wantErr bool
+ }{
+ {
+ name: "Escape Apostrophe",
+ args: args{
+ str: `John O'Keefe`,
+ },
+ want: `John O'Keefe`,
+ },
+ {
+ name: "Escape backslash",
+ args: args{
+ str: `MYDOMAIN\USER`,
+ },
+ want: `MYDOMAIN\\USER`,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ got, err := EscapeName(tt.args.str)
+ if (err != nil) != tt.wantErr {
+ t.Errorf("EscapeName() error = %v, wantErr %v", err, tt.wantErr)
+ return
+ }
+ if got != tt.want {
+ t.Errorf("EscapeName() got = %v, want %v", got, tt.want)
+ }
+ })
+ }
+}
diff --git a/v2/pkg/logger/filelogger.go b/v2/pkg/logger/filelogger.go
index 5cf68fc1a55..954c46f599b 100644
--- a/v2/pkg/logger/filelogger.go
+++ b/v2/pkg/logger/filelogger.go
@@ -19,7 +19,7 @@ func NewFileLogger(filename string) Logger {
// Print works like Sprintf.
func (l *FileLogger) Print(message string) {
- f, err := os.OpenFile(l.filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
+ f, err := os.OpenFile(l.filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644)
if err != nil {
log.Fatal(err)
}
diff --git a/v2/pkg/mac/login_darwin.go b/v2/pkg/mac/login_darwin.go
index 2ff49be83b5..b2390e3059d 100644
--- a/v2/pkg/mac/login_darwin.go
+++ b/v2/pkg/mac/login_darwin.go
@@ -33,7 +33,7 @@ func StartAtLogin(enabled bool) error {
}
_, stde, err := shell.RunCommand("/tmp", "osascript", "-e", command)
if err != nil {
- errors.Wrap(err, stde)
+ return errors.Wrap(err, stde)
}
return nil
}
diff --git a/v2/pkg/mac/notification_darwin.go b/v2/pkg/mac/notification_darwin.go
index a06ecb53ad7..243f07c78df 100644
--- a/v2/pkg/mac/notification_darwin.go
+++ b/v2/pkg/mac/notification_darwin.go
@@ -8,7 +8,7 @@ import (
"github.com/wailsapp/wails/v2/internal/shell"
)
-// StartAtLogin will either add or remove this application to/from the login
+// ShowNotification will either add or remove this application to/from the login
// items, depending on the given boolean flag. The limitation is that the
// currently running app must be in an app bundle.
func ShowNotification(title string, subtitle string, message string, sound string) error {
@@ -24,7 +24,7 @@ func ShowNotification(title string, subtitle string, message string, sound strin
}
_, stde, err := shell.RunCommand("/tmp", "osascript", "-e", command)
if err != nil {
- errors.Wrap(err, stde)
+ return errors.Wrap(err, stde)
}
return nil
}
diff --git a/v2/pkg/menu/callback.go b/v2/pkg/menu/callback.go
index fe616036147..a02664ac099 100644
--- a/v2/pkg/menu/callback.go
+++ b/v2/pkg/menu/callback.go
@@ -2,7 +2,7 @@ package menu
type CallbackData struct {
MenuItem *MenuItem
- //ContextData string
+ // ContextData string
}
type Callback func(*CallbackData)
diff --git a/v2/pkg/menu/colours/colours.go b/v2/pkg/menu/colours/colours.go
index 28564a09e24..5fb74eabd0b 100644
--- a/v2/pkg/menu/colours/colours.go
+++ b/v2/pkg/menu/colours/colours.go
@@ -36,7 +36,6 @@ type InputCol struct {
var Template string
func main() {
-
var Cols []InputCol
resp, err := http.Get("https://jonasjacek.github.io/colors/data.json")
@@ -62,5 +61,8 @@ func main() {
if err != nil {
log.Fatal(err)
}
- os.WriteFile(filepath.Join("..", "cols.go"), buffer.Bytes(), 0755)
+ err = os.WriteFile(filepath.Join("..", "cols.go"), buffer.Bytes(), 0o755)
+ if err != nil {
+ log.Fatal(err)
+ }
}
diff --git a/v2/pkg/menu/keys/keys.go b/v2/pkg/menu/keys/keys.go
index 73bc9414f49..961edab2d8e 100644
--- a/v2/pkg/menu/keys/keys.go
+++ b/v2/pkg/menu/keys/keys.go
@@ -16,7 +16,7 @@ const (
// ShiftKey represents the shift key on all systems
ShiftKey Modifier = "shift"
// SuperKey represents Command on Mac and the Windows key on the other platforms
- //SuperKey Modifier = "super"
+ // SuperKey Modifier = "super"
// ControlKey represents the control key on all systems
ControlKey Modifier = "ctrl"
)
@@ -99,8 +99,6 @@ func Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)
Key: key,
Modifiers: []Modifier{modifier1, modifier2},
}
- for _, extra := range rest {
- result.Modifiers = append(result.Modifiers, extra)
- }
+ result.Modifiers = append(result.Modifiers, rest...)
return result
}
diff --git a/v2/pkg/menu/keys/parser.go b/v2/pkg/menu/keys/parser.go
index 91a05783d41..6e8e123766e 100644
--- a/v2/pkg/menu/keys/parser.go
+++ b/v2/pkg/menu/keys/parser.go
@@ -11,7 +11,6 @@ import (
var namedKeys = slicer.String([]string{"backspace", "tab", "return", "enter", "escape", "left", "right", "up", "down", "space", "delete", "home", "end", "page up", "page down", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", "f32", "f33", "f34", "f35", "numlock"})
func parseKey(key string) (string, bool) {
-
// Lowercase!
key = strings.ToLower(key)
@@ -38,11 +37,9 @@ func parseKey(key string) (string, bool) {
}
return "", false
-
}
func Parse(shortcut string) (*Accelerator, error) {
-
var result Accelerator
// Split the shortcut by +
diff --git a/v2/pkg/menu/keys/stringify.go b/v2/pkg/menu/keys/stringify.go
index ccc8c5e9e70..92498f5d49c 100644
--- a/v2/pkg/menu/keys/stringify.go
+++ b/v2/pkg/menu/keys/stringify.go
@@ -1,8 +1,9 @@
package keys
import (
- "github.com/leaanthony/slicer"
"strings"
+
+ "github.com/leaanthony/slicer"
)
var modifierStringMap = map[string]map[Modifier]string{
@@ -11,21 +12,21 @@ var modifierStringMap = map[string]map[Modifier]string{
ControlKey: "Ctrl",
OptionOrAltKey: "Alt",
ShiftKey: "Shift",
- //SuperKey: "Win",
+ // SuperKey: "Win",
},
"darwin": {
CmdOrCtrlKey: "Cmd",
ControlKey: "Ctrl",
OptionOrAltKey: "Option",
ShiftKey: "Shift",
- //SuperKey: "Cmd",
+ // SuperKey: "Cmd",
},
"linux": {
CmdOrCtrlKey: "Ctrl",
ControlKey: "Ctrl",
OptionOrAltKey: "Alt",
ShiftKey: "Shift",
- //SuperKey: "Super",
+ // SuperKey: "Super",
},
}
diff --git a/v2/pkg/menu/menu.go b/v2/pkg/menu/menu.go
index 0c3ddb6187f..86acbd1d098 100644
--- a/v2/pkg/menu/menu.go
+++ b/v2/pkg/menu/menu.go
@@ -17,9 +17,7 @@ func (m *Menu) Append(item *MenuItem) {
// Merge will append the items in the given menu
// into this menu
func (m *Menu) Merge(menu *Menu) {
- for _, item := range menu.Items {
- m.Items = append(m.Items, item)
- }
+ m.Items = append(m.Items, menu.Items...)
}
// AddText adds a TextMenu item to the menu
@@ -61,8 +59,7 @@ func (m *Menu) Prepend(item *MenuItem) {
}
func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu {
-
- var result = NewMenu()
+ result := NewMenu()
result.Append(first)
for _, item := range rest {
result.Append(item)
diff --git a/v2/pkg/menu/menuitem.go b/v2/pkg/menu/menuitem.go
index f6ea681d7ad..264b2ebd41a 100644
--- a/v2/pkg/menu/menuitem.go
+++ b/v2/pkg/menu/menuitem.go
@@ -23,7 +23,7 @@ type MenuItem struct {
// Checked indicates if the item is selected (used by Checkbox and Radio types only)
Checked bool
// Submenu contains a list of menu items that will be shown as a submenu
- //SubMenu []*MenuItem `json:"SubMenu,omitempty"`
+ // SubMenu []*MenuItem `json:"SubMenu,omitempty"`
SubMenu *Menu
// Callback function when menu clicked
@@ -106,7 +106,6 @@ func (m *MenuItem) removeChild(item *MenuItem) {
// menu. If there is no parent menu (we are a top level menu) then false is
// returned
func (m *MenuItem) InsertAfter(item *MenuItem) bool {
-
// We need to find my parent
if m.parent == nil {
return false
@@ -120,7 +119,6 @@ func (m *MenuItem) InsertAfter(item *MenuItem) bool {
// menu. If there is no parent menu (we are a top level menu) then false is
// returned
func (m *MenuItem) InsertBefore(item *MenuItem) bool {
-
// We need to find my parent
if m.parent == nil {
return false
@@ -134,8 +132,8 @@ func (m *MenuItem) InsertBefore(item *MenuItem) bool {
// in this item's submenu. If we are not a submenu,
// then something bad has happened :/
func (m *MenuItem) insertNewItemAfterGivenItem(target *MenuItem,
- newItem *MenuItem) bool {
-
+ newItem *MenuItem,
+) bool {
if !m.isSubMenu() {
return false
}
@@ -154,8 +152,8 @@ func (m *MenuItem) insertNewItemAfterGivenItem(target *MenuItem,
// target in this item's submenu. If we are not a submenu, then something bad
// has happened :/
func (m *MenuItem) insertNewItemBeforeGivenItem(target *MenuItem,
- newItem *MenuItem) bool {
-
+ newItem *MenuItem,
+) bool {
if !m.isSubMenu() {
return false
}
@@ -176,7 +174,6 @@ func (m *MenuItem) isSubMenu() bool {
// getItemIndex returns the index of the given target relative to this menu
func (m *MenuItem) getItemIndex(target *MenuItem) int {
-
// This should only be called on submenus
if !m.isSubMenu() {
return -1
@@ -196,7 +193,6 @@ func (m *MenuItem) getItemIndex(target *MenuItem) int {
// the given index
// Credit: https://stackoverflow.com/a/61822301
func (m *MenuItem) insertItemAtIndex(index int, target *MenuItem) bool {
-
// If index is OOB, return false
if index > len(m.SubMenu.Items) {
return false
diff --git a/v2/pkg/menu/menuroles.go b/v2/pkg/menu/menuroles.go
index e6b15b2433b..bcc0657fc81 100644
--- a/v2/pkg/menu/menuroles.go
+++ b/v2/pkg/menu/menuroles.go
@@ -11,29 +11,29 @@ const (
AppMenuRole Role = 1
EditMenuRole = 2
WindowMenuRole = 3
- //AboutRole Role = "about"
- //UndoRole Role = "undo"
- //RedoRole Role = "redo"
- //CutRole Role = "cut"
- //CopyRole Role = "copy"
- //PasteRole Role = "paste"
- //PasteAndMatchStyleRole Role = "pasteAndMatchStyle"
- //SelectAllRole Role = "selectAll"
- //DeleteRole Role = "delete"
- //MinimizeRole Role = "minimize"
- //QuitRole Role = "quit"
- //TogglefullscreenRole Role = "togglefullscreen"
- //FileMenuRole Role = "fileMenu"
- //ViewMenuRole Role = "viewMenu"
- //WindowMenuRole Role = "windowMenu"
- //HideRole Role = "hide"
- //HideOthersRole Role = "hideOthers"
- //UnhideRole Role = "unhide"
- //FrontRole Role = "front"
- //ZoomRole Role = "zoom"
- //WindowSubMenuRole Role = "windowSubMenu"
- //HelpSubMenuRole Role = "helpSubMenu"
- //SeparatorItemRole Role = "separatorItem"
+ // AboutRole Role = "about"
+ // UndoRole Role = "undo"
+ // RedoRole Role = "redo"
+ // CutRole Role = "cut"
+ // CopyRole Role = "copy"
+ // PasteRole Role = "paste"
+ // PasteAndMatchStyleRole Role = "pasteAndMatchStyle"
+ // SelectAllRole Role = "selectAll"
+ // DeleteRole Role = "delete"
+ // MinimizeRole Role = "minimize"
+ // QuitRole Role = "quit"
+ // TogglefullscreenRole Role = "togglefullscreen"
+ // FileMenuRole Role = "fileMenu"
+ // ViewMenuRole Role = "viewMenu"
+ // WindowMenuRole Role = "windowMenu"
+ // HideRole Role = "hide"
+ // HideOthersRole Role = "hideOthers"
+ // UnhideRole Role = "unhide"
+ // FrontRole Role = "front"
+ // ZoomRole Role = "zoom"
+ // WindowSubMenuRole Role = "windowSubMenu"
+ // HelpSubMenuRole Role = "helpSubMenu"
+ // SeparatorItemRole Role = "separatorItem"
)
/*
diff --git a/v2/pkg/menu/styledlabel.go b/v2/pkg/menu/styledlabel.go
index 11a0254c9e6..1e996b9717d 100644
--- a/v2/pkg/menu/styledlabel.go
+++ b/v2/pkg/menu/styledlabel.go
@@ -29,24 +29,31 @@ type StyledText struct {
func (s *StyledText) Bold() bool {
return s.Style&Bold == Bold
}
+
func (s *StyledText) Faint() bool {
return s.Style&Faint == Faint
}
+
func (s *StyledText) Italic() bool {
return s.Style&Italic == Italic
}
+
func (s *StyledText) Blinking() bool {
return s.Style&Blinking == Blinking
}
+
func (s *StyledText) Inversed() bool {
return s.Style&Inversed == Inversed
}
+
func (s *StyledText) Invisible() bool {
return s.Style&Invisible == Invisible
}
+
func (s *StyledText) Underlined() bool {
return s.Style&Underlined == Underlined
}
+
func (s *StyledText) Strikethrough() bool {
return s.Style&Strikethrough == Strikethrough
}
diff --git a/v2/pkg/menu/tray.go b/v2/pkg/menu/tray.go
index 7554795ada4..c8728f1f7f1 100644
--- a/v2/pkg/menu/tray.go
+++ b/v2/pkg/menu/tray.go
@@ -2,7 +2,6 @@ package menu
// TrayMenu are the options
type TrayMenu struct {
-
// Label is the text we wish to display in the tray
Label string
@@ -27,7 +26,7 @@ type TrayMenu struct {
Tooltip string
// Callback function when menu clicked
- //Click Callback `json:"-"`
+ // Click Callback `json:"-"`
// Disabled makes the item unselectable
Disabled bool
diff --git a/v2/pkg/options/linux/linux.go b/v2/pkg/options/linux/linux.go
index 3726297c4ee..797450c2725 100644
--- a/v2/pkg/options/linux/linux.go
+++ b/v2/pkg/options/linux/linux.go
@@ -28,7 +28,21 @@ type Options struct {
// - WebviewGpuPolicyAlways
// - WebviewGpuPolicyOnDemand
// - WebviewGpuPolicyNever
+ //
+ // Due to https://github.com/wailsapp/wails/issues/2977, if options.Linux is nil
+ // in the call to wails.Run(), WebviewGpuPolicy is set by default to WebviewGpuPolicyNever.
+ // Client code may override this behavior by passing a non-nil Options and set
+ // WebviewGpuPolicy as needed.
WebviewGpuPolicy WebviewGpuPolicy
+
+ // ProgramName is used to set the program's name for the window manager via GTK's g_set_prgname().
+ //This name should not be localized. [see the docs]
+ //
+ //When a .desktop file is created this value helps with window grouping and desktop icons when the .desktop file's Name
+ //property differs form the executable's filename.
+ //
+ //[see the docs]: https://docs.gtk.org/glib/func.set_prgname.html
+ ProgramName string
}
type Messages struct {
diff --git a/v2/pkg/options/mac/mac.go b/v2/pkg/options/mac/mac.go
index 033cfd1a294..85e52755bd1 100644
--- a/v2/pkg/options/mac/mac.go
+++ b/v2/pkg/options/mac/mac.go
@@ -20,7 +20,11 @@ type Options struct {
Appearance AppearanceType
WebviewIsTransparent bool
WindowIsTranslucent bool
- //ActivationPolicy ActivationPolicy
- About *AboutInfo
- //URLHandlers map[string]func(string)
+ Preferences *Preferences
+ DisableZoom bool
+ // ActivationPolicy ActivationPolicy
+ About *AboutInfo
+ OnFileOpen func(filePath string) `json:"-"`
+ OnUrlOpen func(filePath string) `json:"-"`
+ // URLHandlers map[string]func(string)
}
diff --git a/v2/pkg/options/mac/preferences.go b/v2/pkg/options/mac/preferences.go
new file mode 100644
index 00000000000..0749ccb18f5
--- /dev/null
+++ b/v2/pkg/options/mac/preferences.go
@@ -0,0 +1,21 @@
+package mac
+
+import "github.com/leaanthony/u"
+
+var (
+ Enabled = u.True
+ Disabled = u.False
+)
+
+// Preferences allows to set webkit preferences
+type Preferences struct {
+ // A Boolean value that indicates whether pressing the tab key changes the focus to links and form controls.
+ // Set to false by default.
+ TabFocusesLinks u.Bool
+ // A Boolean value that indicates whether to allow people to select or otherwise interact with text.
+ // Set to true by default.
+ TextInteractionEnabled u.Bool
+ // A Boolean value that indicates whether a web view can display content full screen.
+ // Set to false by default
+ FullscreenEnabled u.Bool
+}
diff --git a/v2/pkg/options/mac/titlebar.go b/v2/pkg/options/mac/titlebar.go
index c18c4eea8ca..51e0832cab5 100644
--- a/v2/pkg/options/mac/titlebar.go
+++ b/v2/pkg/options/mac/titlebar.go
@@ -41,7 +41,6 @@ func TitleBarHidden() *TitleBar {
// TitleBarHiddenInset results in a hidden title bar with an alternative look where
// the traffic light buttons are slightly more inset from the window edge.
func TitleBarHiddenInset() *TitleBar {
-
return &TitleBar{
TitlebarAppearsTransparent: true,
HideTitle: true,
@@ -50,5 +49,4 @@ func TitleBarHiddenInset() *TitleBar {
UseToolbar: true,
HideToolbarSeparator: true,
}
-
}
diff --git a/v2/pkg/options/options.go b/v2/pkg/options/options.go
index 74b2aef72ae..282a25691ac 100644
--- a/v2/pkg/options/options.go
+++ b/v2/pkg/options/options.go
@@ -5,6 +5,8 @@ import (
"html"
"io/fs"
"net/http"
+ "os"
+ "path/filepath"
"runtime"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
@@ -26,8 +28,7 @@ const (
Fullscreen WindowStartState = 3
)
-type Experimental struct {
-}
+type Experimental struct{}
// App contains options for creating the App
type App struct {
@@ -62,19 +63,29 @@ type App struct {
OnShutdown func(ctx context.Context) `json:"-"`
OnBeforeClose func(ctx context.Context) (prevent bool) `json:"-"`
Bind []interface{}
+ EnumBind []interface{}
WindowStartState WindowStartState
+ // ErrorFormatter overrides the formatting of errors returned by backend methods
+ ErrorFormatter ErrorFormatter
+
// CSS property to test for draggable elements. Default "--wails-draggable"
CSSDragProperty string
// The CSS Value that the CSSDragProperty must have to be draggable, EG: "drag"
CSSDragValue string
+ // EnableDefaultContextMenu enables the browser's default context-menu in production
+ // This menu is already enabled in development and debug builds
+ EnableDefaultContextMenu bool
+
// EnableFraudulentWebsiteDetection enables scan services for fraudulent content, such as malware or phishing attempts.
// These services might send information from your app like URLs navigated to and possibly other content to cloud
// services of Apple and Microsoft.
EnableFraudulentWebsiteDetection bool
+ SingleInstanceLock *SingleInstanceLock
+
Windows *windows.Options
Mac *mac.Options
Linux *linux.Options
@@ -84,8 +95,13 @@ type App struct {
// Debug options for debug builds. These options will be ignored in a production build.
Debug Debug
+
+ // DragAndDrop options for drag and drop behavior
+ DragAndDrop *DragAndDrop
}
+type ErrorFormatter func(error) any
+
type RGBA struct {
R uint8 `json:"r"`
G uint8 `json:"g"`
@@ -137,6 +153,15 @@ func MergeDefaults(appoptions *App) {
if appoptions.CSSDragValue == "" {
appoptions.CSSDragValue = "drag"
}
+ if appoptions.DragAndDrop == nil {
+ appoptions.DragAndDrop = &DragAndDrop{}
+ }
+ if appoptions.DragAndDrop.CSSDropProperty == "" {
+ appoptions.DragAndDrop.CSSDropProperty = "--wails-drop-target"
+ }
+ if appoptions.DragAndDrop.CSSDropValue == "" {
+ appoptions.DragAndDrop.CSSDropValue = "drop"
+ }
if appoptions.BackgroundColour == nil {
appoptions.BackgroundColour = &RGBA{
R: 255,
@@ -156,6 +181,47 @@ func MergeDefaults(appoptions *App) {
processDragOptions(appoptions)
}
+type SingleInstanceLock struct {
+ // uniqueId that will be used for setting up messaging between instances
+ UniqueId string
+ OnSecondInstanceLaunch func(secondInstanceData SecondInstanceData)
+}
+
+type SecondInstanceData struct {
+ Args []string
+ WorkingDirectory string
+}
+
+type DragAndDrop struct {
+
+ // EnableFileDrop enables wails' drag and drop functionality that returns the dropped in files' absolute paths.
+ EnableFileDrop bool
+
+ // Disable webview's drag and drop functionality.
+ //
+ // It can be used to prevent accidental file opening of dragged in files in the webview, when there is no need for drag and drop.
+ DisableWebViewDrop bool
+
+ // CSS property to test for drag and drop target elements. Default "--wails-drop-target"
+ CSSDropProperty string
+
+ // The CSS Value that the CSSDropProperty must have to be a valid drop target. Default "drop"
+ CSSDropValue string
+}
+
+func NewSecondInstanceData() (*SecondInstanceData, error) {
+ ex, err := os.Executable()
+ if err != nil {
+ return nil, err
+ }
+ workingDirectory := filepath.Dir(ex)
+
+ return &SecondInstanceData{
+ Args: os.Args[1:],
+ WorkingDirectory: workingDirectory,
+ }, nil
+}
+
func processMenus(appoptions *App) {
switch runtime.GOOS {
case "darwin":
diff --git a/v2/pkg/options/systemtray.go b/v2/pkg/options/systemtray.go
deleted file mode 100644
index 117abb4d657..00000000000
--- a/v2/pkg/options/systemtray.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package options
-
-import (
- "github.com/wailsapp/wails/v2/pkg/menu"
-)
-
-// SystemTray contains options for the system tray
-type SystemTray struct {
- LightModeIcon *SystemTrayIcon
- DarkModeIcon *SystemTrayIcon
- Title string
- Tooltip string
- StartHidden bool
- Menu *menu.Menu
- OnLeftClick func()
- OnRightClick func()
- OnLeftDoubleClick func()
- OnRightDoubleClick func()
- OnMenuClose func()
- OnMenuOpen func()
-}
-
-// SystemTrayIcon represents a system tray icon
-type SystemTrayIcon struct {
- Data []byte
-}
diff --git a/v2/pkg/options/windows/windows.go b/v2/pkg/options/windows/windows.go
index ea6fdc35e1d..39b91ee8def 100644
--- a/v2/pkg/options/windows/windows.go
+++ b/v2/pkg/options/windows/windows.go
@@ -36,7 +36,7 @@ const (
)
func RGB(r, g, b uint8) int32 {
- var col = int32(b)
+ col := int32(b)
col = col<<8 | int32(g)
col = col<<8 | int32(r)
return col
@@ -68,6 +68,8 @@ type Options struct {
IsZoomControlEnabled bool
ZoomFactor float64
+ DisablePinchZoom bool
+
// Disable all window decorations in Frameless mode, which means no "Aero Shadow" and no "Rounded Corner" will be shown.
// "Rounded Corners" are only available on Windows 11.
DisableFramelessWindowDecorations bool
@@ -113,6 +115,9 @@ type Options struct {
//
// !! Please keep in mind when disabling this feature, this also allows malicious software to inject into the WebView2 !!
WebviewDisableRendererCodeIntegrity bool
+
+ // Configure whether swipe gestures should be enabled
+ EnableSwipeGestures bool
}
func DefaultMessages() *Messages {
diff --git a/v2/pkg/runtime/dialog.go b/v2/pkg/runtime/dialog.go
index d53a89c1557..16ae659e106 100644
--- a/v2/pkg/runtime/dialog.go
+++ b/v2/pkg/runtime/dialog.go
@@ -3,6 +3,7 @@ package runtime
import (
"context"
"fmt"
+
"github.com/wailsapp/wails/v2/internal/frontend"
"github.com/wailsapp/wails/v2/internal/fs"
)
diff --git a/v2/pkg/runtime/draganddrop.go b/v2/pkg/runtime/draganddrop.go
new file mode 100644
index 00000000000..2db9c773ced
--- /dev/null
+++ b/v2/pkg/runtime/draganddrop.go
@@ -0,0 +1,37 @@
+package runtime
+
+import (
+ "context"
+ "fmt"
+)
+
+// OnFileDrop returns a slice of file path strings when a drop is finished.
+func OnFileDrop(ctx context.Context, callback func(x, y int, paths []string)) {
+ if callback == nil {
+ LogError(ctx, "OnFileDrop called with a nil callback")
+ return
+ }
+ EventsOn(ctx, "wails:file-drop", func(optionalData ...interface{}) {
+ if len(optionalData) != 3 {
+ callback(0, 0, nil)
+ }
+ x, ok := optionalData[0].(int)
+ if !ok {
+ LogError(ctx, fmt.Sprintf("invalid x coordinate in drag and drop: %v", optionalData[0]))
+ }
+ y, ok := optionalData[1].(int)
+ if !ok {
+ LogError(ctx, fmt.Sprintf("invalid y coordinate in drag and drop: %v", optionalData[1]))
+ }
+ paths, ok := optionalData[2].([]string)
+ if !ok {
+ LogError(ctx, fmt.Sprintf("invalid path data in drag and drop: %v", optionalData[2]))
+ }
+ callback(x, y, paths)
+ })
+}
+
+// OnFileDropOff removes the drag and drop listeners and handlers.
+func OnFileDropOff(ctx context.Context) {
+ EventsOff(ctx, "wails:file-drop")
+}
diff --git a/v2/pkg/runtime/events.go b/v2/pkg/runtime/events.go
index 493d811689a..84aff7d7407 100644
--- a/v2/pkg/runtime/events.go
+++ b/v2/pkg/runtime/events.go
@@ -10,7 +10,7 @@ func EventsOn(ctx context.Context, eventName string, callback func(optionalData
return events.On(eventName, callback)
}
-// EventsOff unregisters a listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`
+// EventsOff unregisters a listener for the given event name, optionally multiple listeners can be unregistered via `additionalEventNames`
func EventsOff(ctx context.Context, eventName string, additionalEventNames ...string) {
events := getEvents(ctx)
events.Off(eventName)
@@ -22,7 +22,7 @@ func EventsOff(ctx context.Context, eventName string, additionalEventNames ...st
}
}
-// EventsOff unregisters a listener for the given event name, optionally multiple listeneres can be unregistered via `additionalEventNames`
+// EventsOff unregisters a listener for the given event name, optionally multiple listeners can be unregistered via `additionalEventNames`
func EventsOffAll(ctx context.Context) {
events := getEvents(ctx)
events.OffAll()
diff --git a/v2/pkg/runtime/log.go b/v2/pkg/runtime/log.go
index 4d3f56d3f20..3c2756f06ca 100644
--- a/v2/pkg/runtime/log.go
+++ b/v2/pkg/runtime/log.go
@@ -3,6 +3,7 @@ package runtime
import (
"context"
"fmt"
+
"github.com/wailsapp/wails/v2/pkg/logger"
)
diff --git a/v2/pkg/runtime/menu.go b/v2/pkg/runtime/menu.go
index 176c9bb1db9..09bd640c5e9 100644
--- a/v2/pkg/runtime/menu.go
+++ b/v2/pkg/runtime/menu.go
@@ -2,6 +2,7 @@ package runtime
import (
"context"
+
"github.com/wailsapp/wails/v2/pkg/menu"
)
diff --git a/v2/pkg/runtime/runtime.go b/v2/pkg/runtime/runtime.go
index 4702b439a8a..6de5ea79892 100644
--- a/v2/pkg/runtime/runtime.go
+++ b/v2/pkg/runtime/runtime.go
@@ -27,6 +27,7 @@ func getFrontend(ctx context.Context) frontend.Frontend {
log.Fatalf("cannot call '%s': %s", funcName, contextError)
return nil
}
+
func getLogger(ctx context.Context) *logger.Logger {
if ctx == nil {
pc, _, _, _ := goruntime.Caller(1)
diff --git a/v2/pkg/runtime/screen.go b/v2/pkg/runtime/screen.go
index d92ed8308c5..c4d52669206 100644
--- a/v2/pkg/runtime/screen.go
+++ b/v2/pkg/runtime/screen.go
@@ -1,11 +1,14 @@
package runtime
-import "context"
-import "github.com/wailsapp/wails/v2/internal/frontend"
+import (
+ "context"
+
+ "github.com/wailsapp/wails/v2/internal/frontend"
+)
type Screen = frontend.Screen
-// ScreenGetAllScreens returns all screens
+// ScreenGetAll returns all screens
func ScreenGetAll(ctx context.Context) ([]Screen, error) {
appFrontend := getFrontend(ctx)
return appFrontend.ScreenGetAll()
diff --git a/v2/pkg/runtime/window.go b/v2/pkg/runtime/window.go
index ca28e9d30fa..62345e2e463 100644
--- a/v2/pkg/runtime/window.go
+++ b/v2/pkg/runtime/window.go
@@ -179,3 +179,8 @@ func WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8) {
}
appFrontend.WindowSetBackgroundColour(col)
}
+
+func WindowPrint(ctx context.Context) {
+ appFrontend := getFrontend(ctx)
+ appFrontend.WindowPrint()
+}
diff --git a/v2/pkg/templates/generate/assets/lit-ts/frontend/index.tmpl.html b/v2/pkg/templates/generate/assets/lit-ts/frontend/index.tmpl.html
index 4944992b592..febcb76cb29 100644
--- a/v2/pkg/templates/generate/assets/lit-ts/frontend/index.tmpl.html
+++ b/v2/pkg/templates/generate/assets/lit-ts/frontend/index.tmpl.html
@@ -4,7 +4,6 @@
{{.ProjectName}}
-
diff --git a/v2/pkg/templates/generate/assets/lit/frontend/index.tmpl.html b/v2/pkg/templates/generate/assets/lit/frontend/index.tmpl.html
index e2db01c7d66..fbe3eb240aa 100644
--- a/v2/pkg/templates/generate/assets/lit/frontend/index.tmpl.html
+++ b/v2/pkg/templates/generate/assets/lit/frontend/index.tmpl.html
@@ -4,7 +4,6 @@
{{.ProjectName}}
-
diff --git a/v2/pkg/templates/generate/assets/svelte-ts/frontend/index.tmpl.html b/v2/pkg/templates/generate/assets/svelte-ts/frontend/index.tmpl.html
index e88b655ef7c..3dd212f2d0e 100644
--- a/v2/pkg/templates/generate/assets/svelte-ts/frontend/index.tmpl.html
+++ b/v2/pkg/templates/generate/assets/svelte-ts/frontend/index.tmpl.html
@@ -3,7 +3,6 @@
-
{{.ProjectName}}
diff --git a/v2/pkg/templates/generate/assets/vue-ts/frontend/index.tmpl.html b/v2/pkg/templates/generate/assets/vue-ts/frontend/index.tmpl.html
index 5c0949b5ee6..cc259435b6b 100644
--- a/v2/pkg/templates/generate/assets/vue-ts/frontend/index.tmpl.html
+++ b/v2/pkg/templates/generate/assets/vue-ts/frontend/index.tmpl.html
@@ -4,7 +4,6 @@
{{.ProjectName}}
-
diff --git a/v2/pkg/templates/generate/assets/vue/frontend/index.tmpl.html b/v2/pkg/templates/generate/assets/vue/frontend/index.tmpl.html
index b3d4289c394..d45b7a8c43e 100644
--- a/v2/pkg/templates/generate/assets/vue/frontend/index.tmpl.html
+++ b/v2/pkg/templates/generate/assets/vue/frontend/index.tmpl.html
@@ -4,7 +4,6 @@
{{.ProjectName}}
-
diff --git a/v2/pkg/templates/generate/generate.go b/v2/pkg/templates/generate/generate.go
index 3b01e5f2a67..6842dc19678 100644
--- a/v2/pkg/templates/generate/generate.go
+++ b/v2/pkg/templates/generate/generate.go
@@ -159,7 +159,6 @@ var templates = []*template{
}
func main() {
-
rebuildRuntime()
for _, t := range templates {
diff --git a/v2/pkg/templates/templates.go b/v2/pkg/templates/templates.go
index d982454d04d..9b42ef36559 100644
--- a/v2/pkg/templates/templates.go
+++ b/v2/pkg/templates/templates.go
@@ -72,7 +72,6 @@ type Options struct {
// Template holds data relating to a template
// including the metadata stored in template.json
type Template struct {
-
// Template details
Name string `json:"name"`
ShortName string `json:"shortname"`
@@ -100,7 +99,6 @@ func parseTemplate(template gofs.FS) (Template, error) {
// List returns the list of available templates
func List() ([]Template, error) {
-
// If the cache isn't loaded, load it
if templateCache == nil {
err := loadTemplateCache()
@@ -114,7 +112,6 @@ func List() ([]Template, error) {
// getTemplateByShortname returns the template with the given short name
func getTemplateByShortname(shortname string) (Template, error) {
-
var result Template
// If the cache isn't loaded, load it
@@ -136,7 +133,6 @@ func getTemplateByShortname(shortname string) (Template, error) {
// Loads the template cache
func loadTemplateCache() error {
-
templatesFS, err := debme.FS(templates, "templates")
if err != nil {
return err
@@ -309,11 +305,9 @@ func gitclone(options *Options) (string, error) {
_, err = git.PlainClone(dirname, false, cloneOption)
return dirname, err
-
}
func generateIDEFiles(options *Options) error {
-
switch options.IDE {
case "vscode":
return generateVSCodeFiles(options)
@@ -361,7 +355,6 @@ func generateVSCodeFiles(options *Options) error {
options: options,
}
return installIDEFiles(ideoptions)
-
}
func installIDEFiles(o ideOptions) error {
diff --git a/v2/pkg/templates/templates/lit-ts/frontend/index.tmpl.html b/v2/pkg/templates/templates/lit-ts/frontend/index.tmpl.html
index 4944992b592..febcb76cb29 100644
--- a/v2/pkg/templates/templates/lit-ts/frontend/index.tmpl.html
+++ b/v2/pkg/templates/templates/lit-ts/frontend/index.tmpl.html
@@ -4,7 +4,6 @@
{{.ProjectName}}
-
diff --git a/v2/pkg/templates/templates/lit-ts/frontend/src/my-element.ts b/v2/pkg/templates/templates/lit-ts/frontend/src/my-element.ts
index 27fd71e4529..af4e9ce20f7 100644
--- a/v2/pkg/templates/templates/lit-ts/frontend/src/my-element.ts
+++ b/v2/pkg/templates/templates/lit-ts/frontend/src/my-element.ts
@@ -2,6 +2,7 @@ import {css, html, LitElement} from 'lit'
import logo from './assets/images/logo-universal.png'
import {Greet} from "../wailsjs/go/main/App";
import {customElement, property} from 'lit/decorators.js'
+import './style.css';
/**
* An example element.
diff --git a/v2/pkg/templates/templates/lit/frontend/index.tmpl.html b/v2/pkg/templates/templates/lit/frontend/index.tmpl.html
index e2db01c7d66..fbe3eb240aa 100644
--- a/v2/pkg/templates/templates/lit/frontend/index.tmpl.html
+++ b/v2/pkg/templates/templates/lit/frontend/index.tmpl.html
@@ -4,7 +4,6 @@
{{.ProjectName}}
-
diff --git a/v2/pkg/templates/templates/lit/frontend/src/my-element.js b/v2/pkg/templates/templates/lit/frontend/src/my-element.js
index ed65e22256e..017632c09cb 100644
--- a/v2/pkg/templates/templates/lit/frontend/src/my-element.js
+++ b/v2/pkg/templates/templates/lit/frontend/src/my-element.js
@@ -1,6 +1,7 @@
import {css, html, LitElement} from 'lit'
import logo from './assets/images/logo-universal.png'
import {Greet} from "../wailsjs/go/main/App";
+import './style.css';
/**
* An example element.
diff --git a/v2/pkg/templates/templates/plain/frontend/src/main.js b/v2/pkg/templates/templates/plain/frontend/src/main.js
index 3346d59ff60..e4945441dbd 100644
--- a/v2/pkg/templates/templates/plain/frontend/src/main.js
+++ b/v2/pkg/templates/templates/plain/frontend/src/main.js
@@ -1,6 +1,7 @@
// Get input + focus
let nameElement = document.getElementById("name");
nameElement.focus();
+import './main.css';
// Setup the greet function
window.greet = function () {
diff --git a/v2/pkg/templates/templates/preact/frontend/src/assets/preact.svg b/v2/pkg/templates/templates/preact/frontend/src/assets/preact.svg
index 8d4155b1d88..23433fcf8e3 100644
--- a/v2/pkg/templates/templates/preact/frontend/src/assets/preact.svg
+++ b/v2/pkg/templates/templates/preact/frontend/src/assets/preact.svg
@@ -1,10 +1 @@
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/v2/pkg/templates/templates/svelte-ts/frontend/index.tmpl.html b/v2/pkg/templates/templates/svelte-ts/frontend/index.tmpl.html
index e88b655ef7c..3dd212f2d0e 100644
--- a/v2/pkg/templates/templates/svelte-ts/frontend/index.tmpl.html
+++ b/v2/pkg/templates/templates/svelte-ts/frontend/index.tmpl.html
@@ -3,7 +3,6 @@
-
{{.ProjectName}}
diff --git a/v2/pkg/templates/templates/vue-ts/frontend/index.tmpl.html b/v2/pkg/templates/templates/vue-ts/frontend/index.tmpl.html
index 5c0949b5ee6..cc259435b6b 100644
--- a/v2/pkg/templates/templates/vue-ts/frontend/index.tmpl.html
+++ b/v2/pkg/templates/templates/vue-ts/frontend/index.tmpl.html
@@ -4,7 +4,6 @@
{{.ProjectName}}
-
diff --git a/v2/pkg/templates/templates/vue-ts/frontend/package.json b/v2/pkg/templates/templates/vue-ts/frontend/package.json
index c06165c24e2..e65d0eff441 100644
--- a/v2/pkg/templates/templates/vue-ts/frontend/package.json
+++ b/v2/pkg/templates/templates/vue-ts/frontend/package.json
@@ -15,7 +15,7 @@
"@vitejs/plugin-vue": "^3.0.3",
"typescript": "^4.6.4",
"vite": "^3.0.7",
- "vue-tsc": "^0.39.5",
+ "vue-tsc": "^1.8.27",
"@babel/types": "^7.18.10"
}
-}
\ No newline at end of file
+}
diff --git a/v2/pkg/templates/templates/vue-ts/frontend/src/main.ts b/v2/pkg/templates/templates/vue-ts/frontend/src/main.ts
index e57db59486e..f9754fe1958 100644
--- a/v2/pkg/templates/templates/vue-ts/frontend/src/main.ts
+++ b/v2/pkg/templates/templates/vue-ts/frontend/src/main.ts
@@ -1,4 +1,5 @@
import {createApp} from 'vue'
import App from './App.vue'
+import './style.css';
createApp(App).mount('#app')
diff --git a/v2/pkg/templates/templates/vue/frontend/index.tmpl.html b/v2/pkg/templates/templates/vue/frontend/index.tmpl.html
index b3d4289c394..d45b7a8c43e 100644
--- a/v2/pkg/templates/templates/vue/frontend/index.tmpl.html
+++ b/v2/pkg/templates/templates/vue/frontend/index.tmpl.html
@@ -4,7 +4,6 @@
{{.ProjectName}}
-
diff --git a/v2/pkg/templates/templates/vue/frontend/src/main.js b/v2/pkg/templates/templates/vue/frontend/src/main.js
index e57db59486e..f9754fe1958 100644
--- a/v2/pkg/templates/templates/vue/frontend/src/main.js
+++ b/v2/pkg/templates/templates/vue/frontend/src/main.js
@@ -1,4 +1,5 @@
import {createApp} from 'vue'
import App from './App.vue'
+import './style.css';
createApp(App).mount('#app')
diff --git a/v2/tools/release/release.go b/v2/tools/release/release.go
index a09fa7a3b14..4178fcc950f 100644
--- a/v2/tools/release/release.go
+++ b/v2/tools/release/release.go
@@ -2,13 +2,14 @@ package main
import (
"encoding/json"
- "github.com/samber/lo"
"os"
"os/exec"
"strconv"
"strings"
"time"
+ "github.com/samber/lo"
+
"github.com/wailsapp/wails/v2/internal/s"
)
@@ -32,7 +33,7 @@ func updateVersion() string {
minorVersion++
vsplit[len(vsplit)-1] = strconv.Itoa(minorVersion)
newVersion := strings.Join(vsplit, ".")
- err = os.WriteFile(versionFile, []byte(newVersion), 0755)
+ err = os.WriteFile(versionFile, []byte(newVersion), 0o755)
checkError(err)
return newVersion
}
@@ -67,7 +68,7 @@ func main() {
newVersion = os.Args[1]
currentVersion, err := os.ReadFile(versionFile)
checkError(err)
- err = os.WriteFile(versionFile, []byte(newVersion), 0755)
+ err = os.WriteFile(versionFile, []byte(newVersion), 0o755)
checkError(err)
isPointRelease = IsPointRelease(string(currentVersion), newVersion)
} else {
@@ -86,9 +87,9 @@ func main() {
// Get today's date in YYYY-MM-DD format
today := time.Now().Format("2006-01-02")
// Add the new version to the top of the changelog
- newChangelog := changelogSplit[0] + "## [Unreleased]\n\n## [" + newVersion + "] - " + today + changelogSplit[1]
+ newChangelog := changelogSplit[0] + "## [Unreleased]\n\n## " + newVersion + " - " + today + changelogSplit[1]
// Write the changelog back
- err = os.WriteFile("src/pages/changelog.mdx", []byte(newChangelog), 0755)
+ err = os.WriteFile("src/pages/changelog.mdx", []byte(newChangelog), 0o755)
checkError(err)
if !isPointRelease {
@@ -111,7 +112,7 @@ func main() {
versions = versions[0 : len(versions)-1]
newVersions, err := json.Marshal(&versions)
checkError(err)
- err = os.WriteFile("versions.json", newVersions, 0755)
+ err = os.WriteFile("versions.json", newVersions, 0o755)
checkError(err)
s.ECHO("Removing old version: " + oldestVersion)
diff --git a/v3/.gitignore b/v3/.gitignore
deleted file mode 100644
index cc164c024b7..00000000000
--- a/v3/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-examples/kitchensink/kitchensink
-cmd/wails/wails
-/examples/systray/systray
-/examples/window/window
-/examples/dialogs/dialogs
-/examples/menu/menu
-/examples/clipboard/clipboard
-/examples/plain/plain
diff --git a/v3/README.md b/v3/README.md
deleted file mode 100644
index 1c1f25fdef9..00000000000
--- a/v3/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# v3
-
-This directory is experimental. It probably won't work for you. There's no support for this directory. Dragons be here. You have been warned!
\ No newline at end of file
diff --git a/v3/TODO.md b/v3/TODO.md
deleted file mode 100644
index eb099a96d7d..00000000000
--- a/v3/TODO.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# TODO
-
-Informal and incomplete list of things needed in v3.
-
-## General
-
-- [x] Generate Bindings
-- [x] Generate TS Models
-- [ ] Dev Mode
-- [ ] Generate Info.Plist from `info.json`
-
-- [ ] Windows Port
-- [ ] Linux Port
-
-## Runtime
-
-- [x] Pass window ID with window calls in JS
-- [x] Implement alias for `window` in JS
-- [x] Implement runtime dispatcher
- - [x] Log
- - [x] Same Window
- - [ ] Other Window
- - [x] Dialogs
- - [x] Info
- - [x] Warning
- - [x] Error
- - [x] Question
- - [x] OpenFile
- - [x] SaveFile
- - [x] Events
- - [x] Screens
- - [x] Clipboard
- - [x] Application
-- [ ] Create `.d.ts` file
-
-## Templates
-
-- [ ] Create plain template
-- [ ] Improve default template
-
-## Runtime
-
-- [ ] To log or not to log?
-- [ ] Unify cross-platform events, eg. `onClose`
-
-## Plugins
-
-- [ ] Move logins to `v3/plugins`
-- [ ] Expose application logger to plugins
\ No newline at end of file
diff --git a/v3/Taskfile.yaml b/v3/Taskfile.yaml
deleted file mode 100644
index 27c63dbab1b..00000000000
--- a/v3/Taskfile.yaml
+++ /dev/null
@@ -1,202 +0,0 @@
-# https://taskfile.dev
-
-version: '3'
-
-tasks:
-
- build-runtime-debug:
- dir: internal/runtime
- internal: true
- cmds:
- - npx esbuild desktop/main.js --bundle --sourcemap=inline --outfile=runtime_debug_desktop_{{.PLATFORM}}.js --define:DEBUG=true --define:WINDOWS={{.WINDOWS}} --define:DARWIN={{.DARWIN}} --define:LINUX={{.LINUX}} --define:PLATFORM={{.PLATFORM}}
-
- build-runtime-debug-windows:
- cmds:
- - task: build-runtime-debug
- vars:
- WINDOWS: true
- DARWIN: false
- LINUX: false
- PLATFORM: windows
-
- build-runtime-debug-linux:
- cmds:
- - task: build-runtime-debug
- vars:
- WINDOWS: false
- DARWIN: false
- LINUX: true
- PLATFORM: linux
-
- build-runtime-debug-darwin:
- cmds:
- - task: build-runtime-debug
- vars:
- WINDOWS: false
- DARWIN: true
- LINUX: false
- PLATFORM: darwin
-
- build-runtime-production:
- dir: internal/runtime
- internal: true
- cmds:
- - npx esbuild desktop/main.js --bundle --minify --outfile=runtime_production_desktop_{{.PLATFORM}}.js --define:DEBUG=true --define:WINDOWS={{.WINDOWS}} --define:DARWIN={{.DARWIN}} --define:LINUX={{.LINUX}} --define:PLATFORM={{.PLATFORM}}
-
- build-runtime-production-windows:
- cmds:
- - task: build-runtime-production
- vars:
- WINDOWS: true
- DARWIN: false
- LINUX: false
- PLATFORM: windows
-
- build-runtime-production-linux:
- cmds:
- - task: build-runtime-production
- vars:
- WINDOWS: false
- DARWIN: false
- LINUX: true
- PLATFORM: linux
-
- build-runtime-production-darwin:
- cmds:
- - task: build-runtime-production
- vars:
- WINDOWS: false
- DARWIN: true
- LINUX: false
- PLATFORM: darwin
-
- install-runtime-dev-deps:
- dir: internal/runtime/dev
- internal: true
- sources:
- - package.json
- cmds:
- - npm install
-
-
- install-runtime-deps:
- dir: internal/runtime
- internal: true
- sources:
- - package.json
- cmds:
- - npm install
-
- test-runtime:
- dir: internal/runtime
- cmds:
- - npx vitest run
-
- update-runtime:
- dir: internal/runtime
- cmds:
- - npx npm-check-updates -u
-
- build-runtime-all:
- dir: internal/runtime
- deps:
- - build-runtime-production-darwin
- - build-runtime-production-windows
- - build-runtime-production-linux
- - build-runtime-debug-darwin
- - build-runtime-debug-windows
- - build-runtime-debug-linux
-
- cmds:
- - cmd: echo "build complete"
-
- build-runtime:
- dir: internal/runtime
- deps:
- - install-runtime-deps
- cmds:
- - task: build-runtime-all
-
- recreate-template-dir:
- dir: internal/templates
- internal: true
- silent: true
- cmds:
- - rm -rf {{.TEMPLATE_DIR}}
- - mkdir -p {{.TEMPLATE_DIR}}
-
- generate-template:
- dir: internal/templates/{{.TEMPLATE}}
- deps:
- - task: recreate-template-dir
- vars:
- TEMPLATE_DIR: "{{.TEMPLATE}}"
- silent: true
- cmds:
- - cmd: pnpm create vite frontend --template {{.TEMPLATE}}
- - cmd: cp -rf ../_base/{{.TEMPLATE}}/* .
- ignore_error: true
- - cmd: cp -rf ../_base/default/* .
- ignore_error: true
- - cmd: rm frontend/public/vite.svg
- - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old Vite -new Wails -ext .ts,.js,.html -ignore vite.config.js,vite.config.ts,vite-env.d.ts
- - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old vite -new wails -ext .ts,.js,.html -ignore vite.config.js,vite.config.ts,vite-env.d.ts
- - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old wails.svg -new wails.png -ext .ts,.js,.html -ignore vite.config.js,vite.config.ts,vite-env.d.ts
- - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old wailsjs.dev -new wails.io -ext .ts,.js,.html -ignore vite.config.js,vite.config.ts,vite-env.d.ts
- - cmd: go run ../../../tasks/sed/sed.go replace -dir frontend -old "framework powered by Wails" -new "framework powered by Vite" -ext .ts,.js,.html,.svelte -ignore vite.config.js,vite.config.ts,vite-env.d.ts
-
- reinstall-cli:
- dir: cmd/wails
- internal: true
- cmds:
- - go install
- - echo "Reinstalled wails CLI"
-
- generate-templates:
- dir: internal/templates/
- deps:
- - task: generate-template
- vars:
- TEMPLATE: svelte
- - task: generate-template
- vars:
- TEMPLATE: svelte-ts
- - task: generate-template
- vars:
- TEMPLATE: vue
- - task: generate-template
- vars:
- TEMPLATE: vue-ts
- - task: generate-template
- vars:
- TEMPLATE: react
- - task: generate-template
- vars:
- TEMPLATE: react-ts
- - task: generate-template
- vars:
- TEMPLATE: preact
- - task: generate-template
- vars:
- TEMPLATE: preact-ts
- - task: generate-template
- vars:
- TEMPLATE: lit
- - task: generate-template
- vars:
- TEMPLATE: lit-ts
- - task: generate-template
- vars:
- TEMPLATE: vanilla
- - task: generate-template
- vars:
- TEMPLATE: vanilla-ts
- - task: generate-template
- vars:
- TEMPLATE: react-swc
- - task: generate-template
- vars:
- TEMPLATE: react-swc-ts
- cmds:
- - task: reinstall-cli
- - echo "Generated templates"
diff --git a/v3/V3 Changes.md b/v3/V3 Changes.md
deleted file mode 100644
index a002af2d564..00000000000
--- a/v3/V3 Changes.md
+++ /dev/null
@@ -1,182 +0,0 @@
-# Changes for v3
-
-## Events
-
-In v3, there are 3 types of events:
-
-- Application Events
-- Window Events
-- Custom Events
-
-### Application Events
-
-Application events are events that are emitted by the application. These events include native events such as `ApplicationDidFinishLaunching` on macOS.
-
-### Window Events
-
-Window events are events that are emitted by a window. These events include native events such as `WindowDidBecomeMain` on macOS.
-
-### Custom Events
-
-Events that the user defines are called `WailsEvents`. This is to differentiate them from the `Event` object that is used to communicate with the browser. WailsEvents are now objects that encapsulate all the details of an event. This includes the event name, the data, and the source of the event.
-
-The data associated with a WailsEvent is now a single value. If multiple values are required, then a struct can be used.
-
-### Event callbacks and `Emit` function signature
-
-The signatures events callbacks (as used by `On`, `Once` & `OnMultiple`) have changed. In v2, the callback function received optional data. In v3, the callback function receives a `WailsEvent` object that contains all data related to the event.
-
-Similarly, the `Emit` function has changed. Instead of taking a name and optional data, it now takes a single `WailsEvent` object that it will emit.
-
-### `Off` and `OffAll`
-
-In v2, `Off` and `OffAll` calls would remove events in both JS and Go. Due to the multi-window nature of v3, this has been changed so that these methods only apply to the context they are called in. For example, if you call `Off` in a window, it will only remove events for that window. If you use `Off` in Go, it will only remove events for Go.
-
-### Logging
-
-There was a lot of requests for different types of logging in v2 so for v3 we have simplified things to make it as customisable as you want. There is now a single call `Log` that takes a LogMessage object. This object contains the message, the level, and the source, the log message and any data to be printed out. The default logger is the Console logger, however any number of outputs to log to can be added. Simply add custom loggers to the `options.Application.Logger.CustomLoggers` slice. The default logger does not have log level filtering, however custom loggers can be added that do.
-
-### Developer notes
-
-When emitting an event in Go, it will dispatch the event to local Go listeners and also each window in the application.
-When emitting an event in JS, it now sends the event to the application. This will be processed as if it was emitted in Go, however the sender ID will be that of the window.
-
-## Window
-
-The Window API has largely remained the same, however the methods are now on an instance of a window rather than the runtime.
-Some notable differences are:
-- Windows now have a Name that identifies them. This is used to identify the window when emitting events.
-
-## ClipBoard
-
-The clipboard API has been simplified. There is now a single `Clipboard` object that can be used to read and write to the clipboard. The `Clipboard` object is available in both Go and JS. `SetText()` to set the text and `Text()` to get the text.
-
-## Bindings
-
-TBD
-
-## Dialogs
-
-Dialogs are now available in JavaScript!
-
-## Drag and Drop
-
-Native drag and drop can be enabled per-window. Simply set the `EnableDragAndDrop` window config option to `true` and the window will allow files to be dragged onto it. When this happens, the `events.FilesDropped` event will be emitted. The filenames can then be retrieved from the WindowEventContext using the `DroppedFiles()` method. This returns a slice of strings containing the filenames.
-
-## Context Menus
-
-Context menus are contextual menus that are shown when the user right-clicks on an element. Creating a context menu is the same as creating a standard menu , by using `app.NewMenu()`. To make the context menu available to a window, call `window.RegisterContextMenu(name, menu)`. The name will be the id of the context menu and used by the frontend.
-
-To indicate that an element has a context menu, add the `data-contextmenu` attribute to the element. The value of this attribute should be the name of a context menu previously registered with the window.
-
-It is possible to register a context menu at the application level, making it available to all windows. This can be done using `app.RegisterContextMenu(name, menu)`. If a context menu cannot be found at the window level, the application context menus will be checked. A demo of this can be found in `v3/examples/contextmenus`.
-
-## Wails Markup Language (WML)
-
-The Wails Markup Language is a simple markup language that allows you to add functionality to standard HTML elements without the use of Javascript.
-
-The following tags are currently supported:
-
-### `data-wml-event`
-
-This specifies that a Wails event will be emitted when the element is clicked. The value of the attribute should be the name of the event to emit.
-
-Example:
-```html
-Click Me
-```
-Sometimes you need the user to confirm an action. This can be done by adding the `data-wml-confirm` attribute to the element. The value of this attribute will be the message to display to the user.
-
-Example:
-```html
-Delete All Items
-```
-
-### `data-wml-window`
-
-Any `wails.window` method can be called by adding the `data-wml-window` attribute to an element. The value of the attribute should be the name of the method to call. The method name should be in the same case as the method.
-
-```html
-Close Window
-```
-
-### `data-wml-trigger`
-
-This attribute specifies which javascript event should trigger the action. The default is `click`.
-
-```html
-Hover over me!
-```
-
-## Plugins
-
-Plugins are a way to extend the functionality of your Wails application.
-
-### Creating a plugin
-
-Plugins are standard Go structure that adhere to the following interface:
-
-```go
-type Plugin interface {
- Name() string
- Init(*application.App) error
- Shutdown()
- CallableByJS() []string
- InjectJS() string
-}
-```
-
-The `Name()` method returns the name of the plugin. This is used for logging purposes.
-
-The `Init(*application.App) error` method is called when the plugin is loaded. The `*application.App`
-parameter is the application that the plugin is being loaded into. Any errors will prevent
-the application from starting.
-
-The `Shutdown()` method is called when the application is shutting down.
-
-The `CallableByJS()` method returns a list of exported functions that can be called from
-the frontend. These method names must exactly match the names of the methods exported
-by the plugin.
-
-The `InjectJS()` method returns JavaScript that should be injected into all windows as they are created. This is useful for adding custom JavaScript functions that complement the plugin.
-
-### Tips
-
-#### Enums
-
-In Go, enums are often defined as a type and a set of constants. For example:
-
-```go
-type MyEnum int
-
-const (
- MyEnumOne MyEnum = iota
- MyEnumTwo
- MyEnumThree
-)
-```
-
-Due to incompatibility between Go and JavaScript, custom types cannot be used in this way. The best strategy is to use a type alias for float64:
-
-```go
-type MyEnum = float64
-
-const (
- MyEnumOne MyEnum = iota
- MyEnumTwo
- MyEnumThree
-)
-```
-
-In Javascript, you can then use the following:
-
-```js
-const MyEnum = {
- MyEnumOne: 0,
- MyEnumTwo: 1,
- MyEnumThree: 2
-}
-```
-
-- Why use `float64`? Can't we use `int`?
- - Because JavaScript doesn't have a concept of `int`. Everything is a `number`, which translates to `float64` in Go. There are also restrictions on casting types in Go's reflection package, which means using `int` doesn't work.
diff --git a/v3/cmd/wails/README.md b/v3/cmd/wails/README.md
deleted file mode 100644
index 2d9af27d850..00000000000
--- a/v3/cmd/wails/README.md
+++ /dev/null
@@ -1,87 +0,0 @@
-# The Wails CLI
-
-The Wails CLI is a command line tool that allows you to create, build and run Wails applications.
-There are a number of commands related to tooling, such as icon generation and asset bundling.
-
-## Commands
-
-### run
-
-The run command is for running tasks defined in `Taskfile.yml`.
-
-| Flag | Type | Description | Default |
-|--------------------|--------|------------------------------------------------------|-----------------------|
-| `-t` | string | The name of the task to run | |
-
-### generate
-
-The `generate` command is used to generate resources and assets for your Wails project.
-It can be used to generate many things including:
- - application icons,
- - resource files for Windows applications
- - Info.plist files for macOS deployments
-
-#### icon
-
-The `icon` command generates icons for your project.
-
-| Flag | Type | Description | Default |
-|--------------------|--------|------------------------------------------------------|-----------------------|
-| `-example` | bool | Generates example icon file (appicon.png) | |
-| `-input` | string | The input image file | |
-| `-sizes` | string | The sizes to generate in .ico file (comma separated) | "256,128,64,48,32,16" |
-| `-windowsFilename` | string | The output filename for the Windows icon | icons.ico |
-| `-macFilename` | string | The output filename for the Mac icon bundle | icons.icns |
-
-```bash
-wails generate icon -input myicon.png -sizes "32,64,128" -windowsFilename myicon.ico -macFilename myicon.icns
-```
-
-This will generate icons for mac and windows and save them in the current directory as `myicon.ico`
-and `myicons.icns`.
-
-#### syso
-
-The `syso` command generates a Windows resource file (aka `.syso`).
-
-```bash
-wails generate syso
-```
-
-| Flag | Type | Description | Default |
-|-------------|--------|--------------------------------------------|------------------|
-| `-example` | bool | Generates example manifest & info files | |
-| `-manifest` | string | The manifest file | |
-| `-info` | string | The info.json file | |
-| `-icon` | string | The icon file | |
-| `-out` | string | The output filename for the syso file | `wails.exe.syso` |
-| `-arch` | string | The target architecture (amd64,arm64,386) | `runtime.GOOS` |
-
-If `-example` is provided, the command will generate example manifest and info files
-in the current directory and exit.
-
-If `-manifest` is provided, the command will use the provided manifest file to generate
-the syso file.
-
-If `-info` is provided, the command will use the provided info.json file to set the version
-information in the syso file.
-
-NOTE: We use [winres](https://github.com/tc-hib/winres) to generate the syso file. Please
-refer to the winres documentation for more information.
-
-NOTE: Whilst the tool will work for 32-bit Windows, it is not supported. Please use 64-bit.
-
-#### defaults
-
-```bash
-wails generate defaults
-```
-This will generate all the default assets and resources in the current directory.
-
-#### bindings
-
-```bash
-wails generate bindings
-```
-
-Generates bindings and models for your bound Go methods and structs.
\ No newline at end of file
diff --git a/v3/cmd/wails/main.go b/v3/cmd/wails/main.go
deleted file mode 100644
index 31002f6e0f7..00000000000
--- a/v3/cmd/wails/main.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package main
-
-import (
- "os"
-
- "github.com/pterm/pterm"
-
- "github.com/leaanthony/clir"
- "github.com/wailsapp/wails/v3/internal/commands"
-)
-
-func main() {
- app := clir.NewCli("wails", "The Wails CLI", "v3")
- app.NewSubCommandFunction("build", "Build the project", commands.Build)
- app.NewSubCommandFunction("init", "Initialise a new project", commands.Init)
- task := app.NewSubCommand("task", "Run and list tasks")
- var taskFlags commands.RunTaskOptions
- task.AddFlags(&taskFlags)
- task.Action(func() error {
- return commands.RunTask(&taskFlags, task.OtherArgs())
- })
- task.LongDescription("\nUsage: wails task [taskname] [flags]\n\nTasks are defined in the `Taskfile.yaml` file. See https://taskfile.dev for more information.")
- generate := app.NewSubCommand("generate", "Generation tools")
- generate.NewSubCommandFunction("defaults", "Generate default build assets", commands.Defaults)
- generate.NewSubCommandFunction("icons", "Generate icons", commands.GenerateIcons)
- generate.NewSubCommandFunction("syso", "Generate Windows .syso file", commands.GenerateSyso)
- generate.NewSubCommandFunction("bindings", "Generate bindings + models", commands.GenerateBindings)
- plugin := app.NewSubCommand("plugin", "Plugin tools")
- //plugin.NewSubCommandFunction("list", "List plugins", commands.PluginList)
- plugin.NewSubCommandFunction("init", "Initialise a new plugin", commands.PluginInit)
- //plugin.NewSubCommandFunction("add", "Add a plugin", commands.PluginAdd)
-
- err := app.Run()
- if err != nil {
- pterm.Error.Println(err)
- os.Exit(1)
- }
-}
diff --git a/v3/examples/binding/GreetService.go b/v3/examples/binding/GreetService.go
deleted file mode 100644
index 389b51c0914..00000000000
--- a/v3/examples/binding/GreetService.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package main
-
-type Person struct {
- name string
-}
-
-type GreetService struct {
-}
-
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
-
-func (*GreetService) GreetPerson(person Person) string {
- return "Hello " + person.name
-}
diff --git a/v3/examples/binding/assets/index.html b/v3/examples/binding/assets/index.html
deleted file mode 100644
index f77c1829456..00000000000
--- a/v3/examples/binding/assets/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- Title
-
-
-HELLO!
-
-
\ No newline at end of file
diff --git a/v3/examples/binding/bindings_main.js b/v3/examples/binding/bindings_main.js
deleted file mode 100644
index 064a7c1354f..00000000000
--- a/v3/examples/binding/bindings_main.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-import {main} from './models';
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.Greet
- *
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-
-/**
- * GreetService.GreetPerson
- *
- * @param person {main.Person}
- * @returns {Promise}
- **/
-function GreetPerson(person) {
- return wails.Call(GreetService("GreetPerson", person));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- Greet,
- GreetPerson,
- },
-};
-
diff --git a/v3/examples/binding/go.mod b/v3/examples/binding/go.mod
deleted file mode 100644
index affecaa9f10..00000000000
--- a/v3/examples/binding/go.mod
+++ /dev/null
@@ -1,21 +0,0 @@
-module binding
-
-go 1.20
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-
-replace github.com/wailsapp/wails/v3 => ../..
-
-replace github.com/wailsapp/wails/v2 => ../../../v2
diff --git a/v3/examples/binding/go.sum b/v3/examples/binding/go.sum
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/examples/binding/go.sum
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/examples/binding/main.go b/v3/examples/binding/main.go
deleted file mode 100644
index ed0bd6331b3..00000000000
--- a/v3/examples/binding/main.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed assets
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Bind: []interface{}{
- &GreetService{},
- },
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
-
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/examples/binding/models.ts b/v3/examples/binding/models.ts
deleted file mode 100644
index 5d00fe3c292..00000000000
--- a/v3/examples/binding/models.ts
+++ /dev/null
@@ -1,24 +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; // Warning: this is unexported in the Go struct.
-
- static createFrom(source: any = {}) {
- return new Person(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.name = source["name"]
-
- }
- }
-
-}
diff --git a/v3/examples/build/README.md b/v3/examples/build/README.md
deleted file mode 100644
index bb2b1761e92..00000000000
--- a/v3/examples/build/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Build
-
-Wails has adopted [Taskfile](https://taskfile.dev) as its build tool. This is optional
-and any build tool can be used. However, Taskfile is a great tool, and we recommend it.
-
-The Wails CLI has built-in integration with Taskfile so the standalone version is not a
-requirement.
-
-## Building
-
-To build the example, run:
-
-```bash
-wails run -t build
-```
diff --git a/v3/examples/build/Taskfile.yml b/v3/examples/build/Taskfile.yml
deleted file mode 100644
index 67e1db61864..00000000000
--- a/v3/examples/build/Taskfile.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-version: '3'
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - go build -gcflags=all="-N -l" -o bin/testapp main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-prod:
- summary: Creates a production build of the application
- cmds:
- - go build -tags production -ldflags="-w -s" -o bin/testapp
-
- package-darwin:
- summary: Packages a production build of the application into a `.app` bundle
- deps:
- - build-prod
- - generate-icons
- cmds:
- - mkdir -p buildtest.app/Contents/{MacOS,Resources}
- - cp build/icons.icns buildtest.app/Contents/Resources
- - cp bin/testapp buildtest.app/Contents/MacOS
- - cp build/Info.plist buildtest.app/Contents
\ No newline at end of file
diff --git a/v3/examples/build/build/Info.dev.plist b/v3/examples/build/build/Info.dev.plist
deleted file mode 100644
index d6d28b179b1..00000000000
--- a/v3/examples/build/build/Info.dev.plist
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My App
- CFBundleExecutable
- app
- CFBundleIdentifier
- com.wails.app
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- The ultimate thing
- CFBundleShortVersionString
- v1
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) Me
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/v3/examples/build/build/Info.plist b/v3/examples/build/build/Info.plist
deleted file mode 100644
index 7f03f54e9aa..00000000000
--- a/v3/examples/build/build/Info.plist
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My App
- CFBundleExecutable
- app
- CFBundleIdentifier
- com.wails.app
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- The ultimate thing
- CFBundleShortVersionString
- v1
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) Me
-
-
\ No newline at end of file
diff --git a/v3/examples/build/build/appicon.png b/v3/examples/build/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/examples/build/build/appicon.png and /dev/null differ
diff --git a/v3/examples/build/build/icons.icns b/v3/examples/build/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/examples/build/build/icons.icns and /dev/null differ
diff --git a/v3/examples/build/build/icons.ico b/v3/examples/build/build/icons.ico
deleted file mode 100644
index bfa0690b7f8..00000000000
Binary files a/v3/examples/build/build/icons.ico and /dev/null differ
diff --git a/v3/examples/build/build/info.json b/v3/examples/build/build/info.json
deleted file mode 100644
index 1005eb5cb85..00000000000
--- a/v3/examples/build/build/info.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "fixed": {
- "file_version": "v1.0.0"
- },
- "info": {
- "0000": {
- "ProductVersion": "v1.0.0",
- "CompanyName": "My Company Name",
- "FileDescription": "A thing that does a thing",
- "LegalCopyright": "(c) 2023 My Company Name",
- "ProductName": "My Product Name",
- "Comments": "This is a comment"
- }
- }
-}
\ No newline at end of file
diff --git a/v3/examples/build/build/wails.exe.manifest b/v3/examples/build/build/wails.exe.manifest
deleted file mode 100644
index fb1ce5bde73..00000000000
--- a/v3/examples/build/build/wails.exe.manifest
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- true/pm
- permonitorv2,permonitor
-
-
-
\ No newline at end of file
diff --git a/v3/examples/build/buildtest.app/Contents/Info.plist b/v3/examples/build/buildtest.app/Contents/Info.plist
deleted file mode 100644
index 7f03f54e9aa..00000000000
--- a/v3/examples/build/buildtest.app/Contents/Info.plist
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My App
- CFBundleExecutable
- app
- CFBundleIdentifier
- com.wails.app
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- The ultimate thing
- CFBundleShortVersionString
- v1
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) Me
-
-
\ No newline at end of file
diff --git a/v3/examples/build/buildtest.app/Contents/Resources/icons.icns b/v3/examples/build/buildtest.app/Contents/Resources/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/examples/build/buildtest.app/Contents/Resources/icons.icns and /dev/null differ
diff --git a/v3/examples/build/main.go b/v3/examples/build/main.go
deleted file mode 100755
index 48ba24088e2..00000000000
--- a/v3/examples/build/main.go
+++ /dev/null
@@ -1,273 +0,0 @@
-package main
-
-import (
- _ "embed"
- "fmt"
- "log"
- "math/rand"
- "runtime"
- "strconv"
- "time"
-
- "github.com/wailsapp/wails/v3/pkg/events"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-func main() {
- app := application.New(application.Options{
- Name: "WebviewWindow Demo",
- Description: "A demo of the WebviewWindow API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- app.On(events.Mac.ApplicationDidFinishLaunching, func() {
- log.Println("ApplicationDidFinishLaunching")
- })
-
- currentWindow := func(fn func(window *application.WebviewWindow)) {
- if app.CurrentWindow() != nil {
- fn(app.CurrentWindow())
- } else {
- println("Current WebviewWindow is nil")
- }
- }
-
- // Create a custom menu
- menu := app.NewMenu()
- menu.AddRole(application.AppMenu)
-
- windowCounter := 1
-
- // Let's make a "Demo" menu
- myMenu := menu.AddSubmenu("New")
-
- myMenu.Add("New WebviewWindow").
- SetAccelerator("CmdOrCtrl+N").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindow().
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetURL("https://wails.io").
- Show()
- windowCounter++
- })
- myMenu.Add("New Frameless WebviewWindow").
- SetAccelerator("CmdOrCtrl+F").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindow().
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetURL("https://wails.io").
- SetFrameless(true).
- Show()
- windowCounter++
- })
- if runtime.GOOS == "darwin" {
- myMenu.Add("New WebviewWindow (MacTitleBarHiddenInset)").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Mac: application.MacWindow{
- TitleBar: application.MacTitleBarHiddenInset,
- InvisibleTitleBarHeight: 25,
- },
- }).
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetHTML("A MacTitleBarHiddenInset WebviewWindow example
").
- Show()
- windowCounter++
- })
- myMenu.Add("New WebviewWindow (MacTitleBarHiddenInsetUnified)").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Mac: application.MacWindow{
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- InvisibleTitleBarHeight: 50,
- },
- }).
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetHTML("A MacTitleBarHiddenInsetUnified WebviewWindow example
").
- Show()
- windowCounter++
- })
- myMenu.Add("New WebviewWindow (MacTitleBarHidden)").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Mac: application.MacWindow{
- TitleBar: application.MacTitleBarHidden,
- InvisibleTitleBarHeight: 25,
- },
- }).
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetHTML("A MacTitleBarHidden WebviewWindow example
").
- Show()
- windowCounter++
- })
- }
-
- sizeMenu := menu.AddSubmenu("Size")
- sizeMenu.Add("Set Size (800,600)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetSize(800, 600)
- })
- })
-
- sizeMenu.Add("Set Size (Random)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetSize(rand.Intn(800)+200, rand.Intn(600)+200)
- })
- })
- sizeMenu.Add("Set Min Size (200,200)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetMinSize(200, 200)
- })
- })
- sizeMenu.Add("Set Max Size (600,600)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetFullscreenButtonEnabled(false)
- w.SetMaxSize(600, 600)
- })
- })
- sizeMenu.Add("Get Current WebviewWindow Size").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- width, height := w.Size()
- app.InfoDialog().SetTitle("Current WebviewWindow Size").SetMessage("Width: " + strconv.Itoa(width) + " Height: " + strconv.Itoa(height)).Show()
- })
- })
-
- sizeMenu.Add("Reset Min Size").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetMinSize(0, 0)
- })
- })
-
- sizeMenu.Add("Reset Max Size").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetMaxSize(0, 0)
- w.SetFullscreenButtonEnabled(true)
- })
- })
- positionMenu := menu.AddSubmenu("Position")
- positionMenu.Add("Set Position (0,0)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetPosition(0, 0)
- })
- })
- positionMenu.Add("Set Position (Random)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetPosition(rand.Intn(1000), rand.Intn(800))
- })
- })
-
- positionMenu.Add("Get Position").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- x, y := w.Position()
- app.InfoDialog().SetTitle("Current WebviewWindow Position").SetMessage("X: " + strconv.Itoa(x) + " Y: " + strconv.Itoa(y)).Show()
- })
- })
-
- positionMenu.Add("Center").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Center()
- })
- })
- stateMenu := menu.AddSubmenu("State")
- stateMenu.Add("Minimise (for 2 secs)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Minimise()
- time.Sleep(2 * time.Second)
- w.Restore()
- })
- })
- stateMenu.Add("Maximise").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Maximise()
- })
- })
- stateMenu.Add("Fullscreen").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Fullscreen()
- })
- })
- stateMenu.Add("UnFullscreen").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.UnFullscreen()
- })
- })
- stateMenu.Add("Restore").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Restore()
- })
- })
- stateMenu.Add("Hide (for 2 seconds)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Hide()
- time.Sleep(2 * time.Second)
- w.Show()
- })
- })
- stateMenu.Add("Always on Top").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetAlwaysOnTop(true)
- })
- })
- stateMenu.Add("Not always on Top").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetAlwaysOnTop(false)
- })
- })
- stateMenu.Add("Google.com").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetURL("https://google.com")
- })
- })
- stateMenu.Add("wails.io").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetURL("https://wails.io")
- })
- })
- stateMenu.Add("Get Primary Screen").OnClick(func(ctx *application.Context) {
- screen, err := app.GetPrimaryScreen()
- if err != nil {
- app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show()
- return
- }
- msg := fmt.Sprintf("Screen: %+v", screen)
- app.InfoDialog().SetTitle("Primary Screen").SetMessage(msg).Show()
- })
- stateMenu.Add("Get Screens").OnClick(func(ctx *application.Context) {
- screens, err := app.GetScreens()
- if err != nil {
- app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show()
- return
- }
- for _, screen := range screens {
- msg := fmt.Sprintf("Screen: %+v", screen)
- app.InfoDialog().SetTitle(fmt.Sprintf("Screen %s", screen.ID)).SetMessage(msg).Show()
- }
- })
- stateMenu.Add("Get Screen for WebviewWindow").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- screen, err := w.GetScreen()
- if err != nil {
- app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show()
- return
- }
- msg := fmt.Sprintf("Screen: %+v", screen)
- app.InfoDialog().SetTitle(fmt.Sprintf("Screen %s", screen.ID)).SetMessage(msg).Show()
- })
- })
- app.NewWebviewWindow()
-
- app.SetMenu(menu)
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/examples/clipboard/main.go b/v3/examples/clipboard/main.go
deleted file mode 100644
index c8e0e465bd4..00000000000
--- a/v3/examples/clipboard/main.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
- "time"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-func main() {
-
- app := application.New(application.Options{
- Name: "Clipboard Demo",
- Description: "A demo of the clipboard API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
-
- // Create a custom menu
- menu := app.NewMenu()
- menu.AddRole(application.AppMenu)
-
- setClipboardMenu := menu.AddSubmenu("Set Clipboard")
- setClipboardMenu.Add("Set Text 'Hello'").OnClick(func(ctx *application.Context) {
- success := app.Clipboard().SetText("Hello")
- if !success {
- app.InfoDialog().SetMessage("Failed to set clipboard text").Show()
- }
- })
- setClipboardMenu.Add("Set Text 'World'").OnClick(func(ctx *application.Context) {
- success := app.Clipboard().SetText("World")
- if !success {
- app.InfoDialog().SetMessage("Failed to set clipboard text").Show()
- }
- })
- setClipboardMenu.Add("Set Text (current time)").OnClick(func(ctx *application.Context) {
- success := app.Clipboard().SetText(time.Now().String())
- if !success {
- app.InfoDialog().SetMessage("Failed to set clipboard text").Show()
- }
- })
- getClipboardMenu := menu.AddSubmenu("Get Clipboard")
- getClipboardMenu.Add("Get Text").OnClick(func(ctx *application.Context) {
- result := app.Clipboard().Text()
- app.InfoDialog().SetMessage("Got:\n\n" + result).Show()
- })
-
- clearClipboardMenu := menu.AddSubmenu("Clear Clipboard")
- clearClipboardMenu.Add("Clear Text").OnClick(func(ctx *application.Context) {
- success := app.Clipboard().SetText("")
- if success {
- app.InfoDialog().SetMessage("Clipboard text cleared").Show()
- } else {
- app.InfoDialog().SetMessage("Clipboard text not cleared").Show()
- }
- })
-
- app.SetMenu(menu)
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err.Error())
- }
-}
diff --git a/v3/examples/contextmenus/assets/index.html b/v3/examples/contextmenus/assets/index.html
deleted file mode 100644
index adb32d775fd..00000000000
--- a/v3/examples/contextmenus/assets/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- Title
-
-
-
-
-Events Demo
-
-
-
1
-
-
-
2
-
-
-
3
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/v3/examples/contextmenus/main.go b/v3/examples/contextmenus/main.go
deleted file mode 100644
index a94b9d340c0..00000000000
--- a/v3/examples/contextmenus/main.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "fmt"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed assets
-var assets embed.FS
-
-func main() {
-
- app := application.New(application.Options{
- Name: "Context Menu Demo",
- Description: "A demo of the Context Menu API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- mainWindow := app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Context Menu Demo",
- Mac: application.MacWindow{
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- InvisibleTitleBarHeight: 50,
- },
- })
-
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Context Menu Demo",
- Mac: application.MacWindow{
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- InvisibleTitleBarHeight: 50,
- },
- })
-
- contextMenu := app.NewMenu()
- contextMenu.Add("Click Me").OnClick(func(data *application.Context) {
- fmt.Printf("Context menu data: %+v\n", data.ContextMenuData())
- })
-
- globalContextMenu := app.NewMenu()
- globalContextMenu.Add("Default context menu item").OnClick(func(data *application.Context) {
- fmt.Printf("Context menu data: %+v\n", data.ContextMenuData())
- })
-
- // Registering the menu with a window will make it available to that window only
- mainWindow.RegisterContextMenu("test", contextMenu)
-
- // Registering the menu with the app will make it available to all windows
- app.RegisterContextMenu("test", globalContextMenu)
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err.Error())
- }
-}
diff --git a/v3/examples/dialogs/main.go b/v3/examples/dialogs/main.go
deleted file mode 100644
index ff55949ae26..00000000000
--- a/v3/examples/dialogs/main.go
+++ /dev/null
@@ -1,333 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
- "os"
- "runtime"
- "strings"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-func main() {
-
- app := application.New(application.Options{
- Name: "Dialogs Demo",
- Description: "A demo of the dialogs API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create a custom menu
- menu := app.NewMenu()
- menu.AddRole(application.AppMenu)
-
- // Let's make a "Demo" menu
- infoMenu := menu.AddSubmenu("Info")
- infoMenu.Add("Info").OnClick(func(ctx *application.Context) {
- dialog := app.InfoDialog()
- dialog.SetTitle("Custom Title")
- dialog.SetMessage("This is a custom message")
- dialog.Show()
- })
- infoMenu.Add("Info (Title only)").OnClick(func(ctx *application.Context) {
- dialog := app.InfoDialog()
- dialog.SetTitle("Custom Title")
- dialog.Show()
- })
- infoMenu.Add("Info (Message only)").OnClick(func(ctx *application.Context) {
- dialog := app.InfoDialog()
- dialog.SetMessage("This is a custom message")
- dialog.Show()
- })
- infoMenu.Add("Info (Custom Icon)").OnClick(func(ctx *application.Context) {
- dialog := app.InfoDialog()
- dialog.SetTitle("Custom Icon Example")
- dialog.SetMessage("Using a custom icon")
- dialog.SetIcon(application.DefaultApplicationIcon)
- dialog.Show()
- })
-
- questionMenu := menu.AddSubmenu("Question")
- questionMenu.Add("Question (No default)").OnClick(func(ctx *application.Context) {
- dialog := app.QuestionDialog()
- dialog.SetMessage("No default button")
- dialog.AddButton("Yes")
- dialog.AddButton("No")
- dialog.Show()
- })
- questionMenu.Add("Question (With Default)").OnClick(func(ctx *application.Context) {
- dialog := app.QuestionDialog()
- dialog.SetTitle("Quit")
- dialog.SetMessage("You have unsaved work. Are you sure you want to quit?")
- dialog.AddButton("Yes").OnClick(func() {
- app.Quit()
- })
- no := dialog.AddButton("No")
- dialog.SetDefaultButton(no)
- dialog.Show()
- })
- questionMenu.Add("Question (With Cancel)").OnClick(func(ctx *application.Context) {
- dialog := app.QuestionDialog().
- SetTitle("Update").
- SetMessage("The cancel button is selected when pressing escape")
- download := dialog.AddButton("📥 Download")
- download.OnClick(func() {
- app.InfoDialog().SetMessage("Downloading...").Show()
- })
- no := dialog.AddButton("Cancel")
- dialog.SetDefaultButton(download)
- dialog.SetCancelButton(no)
- dialog.Show()
- })
- questionMenu.Add("Question (Custom Icon)").OnClick(func(ctx *application.Context) {
- dialog := app.QuestionDialog()
- dialog.SetTitle("Custom Icon Example")
- dialog.SetMessage("Using a custom icon")
- dialog.SetIcon(application.WailsLogoWhiteTransparent)
- dialog.SetDefaultButton(dialog.AddButton("I like it!"))
- dialog.AddButton("Not so keen...")
- dialog.Show()
- })
-
- warningMenu := menu.AddSubmenu("Warning")
- warningMenu.Add("Warning").OnClick(func(ctx *application.Context) {
- dialog := app.WarningDialog()
- dialog.SetTitle("Custom Title")
- dialog.SetMessage("This is a custom message")
- dialog.Show()
- })
- warningMenu.Add("Warning (Title only)").OnClick(func(ctx *application.Context) {
- dialog := app.WarningDialog()
- dialog.SetTitle("Custom Title")
- dialog.Show()
- })
- warningMenu.Add("Warning (Message only)").OnClick(func(ctx *application.Context) {
- dialog := app.WarningDialog()
- dialog.SetMessage("This is a custom message")
- dialog.Show()
- })
- warningMenu.Add("Warning (Custom Icon)").OnClick(func(ctx *application.Context) {
- dialog := app.WarningDialog()
- dialog.SetTitle("Custom Icon Example")
- dialog.SetMessage("Using a custom icon")
- dialog.SetIcon(application.DefaultApplicationIcon)
- dialog.Show()
- })
-
- errorMenu := menu.AddSubmenu("Error")
- errorMenu.Add("Error").OnClick(func(ctx *application.Context) {
- dialog := app.ErrorDialog()
- dialog.SetTitle("Ooops")
- dialog.SetMessage("I accidentally the whole of Twitter")
- dialog.Show()
- })
- errorMenu.Add("Error (Title Only)").OnClick(func(ctx *application.Context) {
- dialog := app.ErrorDialog()
- dialog.SetTitle("Custom Title")
- dialog.Show()
- })
- errorMenu.Add("Error (Custom Message)").OnClick(func(ctx *application.Context) {
- dialog := app.ErrorDialog()
- dialog.SetMessage("This is a custom message")
- dialog.Show()
- })
- errorMenu.Add("Error (Custom Icon)").OnClick(func(ctx *application.Context) {
- dialog := app.ErrorDialog()
- dialog.SetTitle("Custom Icon Example")
- dialog.SetMessage("Using a custom icon")
- dialog.SetIcon(application.WailsLogoWhite)
- dialog.Show()
- })
-
- openMenu := menu.AddSubmenu("Open")
- openMenu.Add("Open File").OnClick(func(ctx *application.Context) {
- result, _ := app.OpenFileDialog().
- CanChooseFiles(true).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- } else {
- app.InfoDialog().SetMessage("No file selected").Show()
- }
- })
- openMenu.Add("Open File (Show Hidden Files)").OnClick(func(ctx *application.Context) {
- result, _ := app.OpenFileDialog().
- CanChooseFiles(true).
- CanCreateDirectories(true).
- ShowHiddenFiles(true).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- } else {
- app.InfoDialog().SetMessage("No file selected").Show()
- }
- })
- openMenu.Add("Open File (Attach to window)").OnClick(func(ctx *application.Context) {
- result, _ := app.OpenFileDialog().
- CanChooseFiles(true).
- CanCreateDirectories(true).
- ShowHiddenFiles(true).
- AttachToWindow(app.CurrentWindow()).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- } else {
- app.InfoDialog().SetMessage("No file selected").Show()
- }
- })
- openMenu.Add("Open Multiple Files (Show Hidden Files)").OnClick(func(ctx *application.Context) {
- result, _ := app.OpenFileDialog().
- CanChooseFiles(true).
- CanCreateDirectories(true).
- ShowHiddenFiles(true).
- PromptForMultipleSelection()
- if len(result) > 0 {
- app.InfoDialog().SetMessage(strings.Join(result, ",")).Show()
- } else {
- app.InfoDialog().SetMessage("No file selected").Show()
- }
- })
- openMenu.Add("Open Directory").OnClick(func(ctx *application.Context) {
- result, _ := app.OpenFileDialog().
- CanChooseDirectories(true).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- } else {
- app.InfoDialog().SetMessage("No directory selected").Show()
- }
- })
- openMenu.Add("Open Directory (Create Directories)").OnClick(func(ctx *application.Context) {
- result, _ := app.OpenFileDialog().
- CanChooseDirectories(true).
- CanCreateDirectories(true).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- } else {
- app.InfoDialog().SetMessage("No directory selected").Show()
- }
- })
- openMenu.Add("Open Directory (Resolves Aliases)").OnClick(func(ctx *application.Context) {
- result, _ := app.OpenFileDialog().
- CanChooseDirectories(true).
- CanCreateDirectories(true).
- ResolvesAliases(true).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- } else {
- app.InfoDialog().SetMessage("No directory selected").Show()
- }
- })
- openMenu.Add("Open File/Directory (Set Title)").OnClick(func(ctx *application.Context) {
- dialog := app.OpenFileDialog().
- CanChooseDirectories(true).
- CanCreateDirectories(true).
- ResolvesAliases(true)
- if runtime.GOOS == "darwin" {
- dialog.SetMessage("Select a file/directory")
- } else {
- dialog.SetTitle("Select a file/directory")
- }
-
- result, _ := dialog.PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- } else {
- app.InfoDialog().SetMessage("No file/directory selected").Show()
- }
- })
- openMenu.Add("Open (Full Example)").OnClick(func(ctx *application.Context) {
- cwd, _ := os.Getwd()
- dialog := app.OpenFileDialog().
- SetTitle("Select a file").
- SetMessage("Select a file to open").
- SetButtonText("Let's do this!").
- SetDirectory(cwd).
- CanCreateDirectories(true).
- ResolvesAliases(true).
- AllowsOtherFileTypes(true).
- TreatsFilePackagesAsDirectories(true).
- ShowHiddenFiles(true).
- CanSelectHiddenExtension(true).
- AddFilter("Text Files", "*.txt; *.md").
- AddFilter("Video Files", "*.mov; *.mp4; *.avi")
-
- if runtime.GOOS == "darwin" {
- dialog.SetMessage("Select a file")
- } else {
- dialog.SetTitle("Select a file")
- }
-
- result, _ := dialog.PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- } else {
- app.InfoDialog().SetMessage("No file selected").Show()
- }
- })
-
- saveMenu := menu.AddSubmenu("Save")
- saveMenu.Add("Select File (Defaults)").OnClick(func(ctx *application.Context) {
- result, _ := app.SaveFileDialog().
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- }
- })
- saveMenu.Add("Select File (Attach To WebviewWindow)").OnClick(func(ctx *application.Context) {
- result, _ := app.SaveFileDialog().
- AttachToWindow(app.CurrentWindow()).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- }
- })
- saveMenu.Add("Select File (Show Hidden Files)").OnClick(func(ctx *application.Context) {
- result, _ := app.SaveFileDialog().
- ShowHiddenFiles(true).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- }
- })
- saveMenu.Add("Select File (Cannot Create Directories)").OnClick(func(ctx *application.Context) {
- result, _ := app.SaveFileDialog().
- CanCreateDirectories(false).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- }
- })
- saveMenu.Add("Select File (Full Example)").OnClick(func(ctx *application.Context) {
- result, _ := app.SaveFileDialog().
- CanCreateDirectories(false).
- ShowHiddenFiles(true).
- SetMessage("Select a file").
- SetDirectory("/Applications").
- SetButtonText("Let's do this!").
- SetFilename("README.md").
- HideExtension(true).
- AllowsOtherFileTypes(true).
- TreatsFilePackagesAsDirectories(true).
- ShowHiddenFiles(true).
- PromptForSingleSelection()
- if result != "" {
- app.InfoDialog().SetMessage(result).Show()
- }
- })
-
- app.SetMenu(menu)
-
- app.NewWebviewWindow()
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err.Error())
- }
-}
diff --git a/v3/examples/drag-n-drop/assets/index.html b/v3/examples/drag-n-drop/assets/index.html
deleted file mode 100644
index 1ec2339dd26..00000000000
--- a/v3/examples/drag-n-drop/assets/index.html
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
- Title
-
-
-
-Drag-n-drop Demo
-
-Drop Files onto this window...
-
-
-
-
-
-
\ No newline at end of file
diff --git a/v3/examples/drag-n-drop/main.go b/v3/examples/drag-n-drop/main.go
deleted file mode 100644
index 1346a2bac19..00000000000
--- a/v3/examples/drag-n-drop/main.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
- "github.com/wailsapp/wails/v3/pkg/events"
-)
-
-//go:embed assets
-var assets embed.FS
-
-func main() {
-
- app := application.New(application.Options{
- Name: "Drag-n-drop Demo",
- Description: "A demo of the Drag-n-drop API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- window := app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Drag-n-drop Demo",
- Mac: application.MacWindow{
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- InvisibleTitleBarHeight: 50,
- },
- EnableDragAndDrop: true,
- })
-
- window.On(events.FilesDropped, func(ctx *application.WindowEventContext) {
- files := ctx.DroppedFiles()
- app.Events.Emit(&application.WailsEvent{
- Name: "files",
- Data: files,
- })
- log.Printf("[Go] FilesDropped received: %+v\n", files)
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err.Error())
- }
-}
diff --git a/v3/examples/events/assets/index.html b/v3/examples/events/assets/index.html
deleted file mode 100644
index 20993e735db..00000000000
--- a/v3/examples/events/assets/index.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
- Title
-
-
-
-Events Demo
-
-The main program emits an event every 10s which will be displayed in the section below.
-To send an event from this window, click here: Send Event
-
-
-
-
-
-
\ No newline at end of file
diff --git a/v3/examples/events/main.go b/v3/examples/events/main.go
deleted file mode 100644
index 7f0c23653e7..00000000000
--- a/v3/examples/events/main.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
- "time"
-
- "github.com/wailsapp/wails/v3/pkg/application"
- "github.com/wailsapp/wails/v3/pkg/events"
-)
-
-//go:embed assets
-var assets embed.FS
-
-func main() {
-
- app := application.New(application.Options{
- Name: "Events Demo",
- Description: "A demo of the Events API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- app.Events.On("myevent", func(e *application.WailsEvent) {
- log.Printf("[Go] WailsEvent received: %+v\n", e)
- })
-
- app.On(events.Mac.ApplicationDidFinishLaunching, func() {
- for {
- log.Println("Sending event")
- app.Events.Emit(&application.WailsEvent{
- Name: "myevent",
- Data: "hello",
- })
- time.Sleep(10 * time.Second)
- }
- })
-
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Events Demo",
- Mac: application.MacWindow{
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- InvisibleTitleBarHeight: 50,
- },
- })
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Events Demo",
- Mac: application.MacWindow{
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- InvisibleTitleBarHeight: 50,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err.Error())
- }
-}
diff --git a/v3/examples/kitchensink/main.go b/v3/examples/kitchensink/main.go
deleted file mode 100644
index 509da3415ce..00000000000
--- a/v3/examples/kitchensink/main.go
+++ /dev/null
@@ -1,224 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
- "runtime"
- "sync"
- "time"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-func main() {
- app := application.New(application.Options{
- Name: "Menu Demo",
- Description: "A demo of the menu system",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- /*
- app.On(events.Mac.ApplicationDidFinishLaunching, func() {
- println("ApplicationDidFinishLaunching")
- })
- app.On(events.Mac.ApplicationWillTerminate, func() {
- println("ApplicationWillTerminate")
- })
- app.On(events.Mac.ApplicationDidBecomeActive, func() {
- println("ApplicationDidBecomeActive")
- })
- app.On(events.Mac.ApplicationDidChangeBackingProperties, func() {
- println("ApplicationDidChangeBackingProperties")
- })
-
- app.On(events.Mac.ApplicationDidChangeEffectiveAppearance, func() {
- println("ApplicationDidChangeEffectiveAppearance")
- })
- app.On(events.Mac.ApplicationDidHide, func() {
- println("ApplicationDidHide")
- })
-
- */
-
- menuCallback := func(ctx *application.Context) {
- menuItem := ctx.ClickedMenuItem()
- menuItem.SetLabel("Clicked!")
- }
-
- radioCallback := func(ctx *application.Context) {
- menuItem := ctx.ClickedMenuItem()
- menuItem.SetLabel(menuItem.Label() + "!")
- }
-
- myMenu := app.NewMenu()
- file1 := myMenu.Add("File")
- file1.SetTooltip("Create New Tray Menu")
- file1.OnClick(menuCallback)
- myMenu.Add("Create New Tray Menu").
- SetAccelerator("CmdOrCtrl+N").
- SetTooltip("ROFLCOPTER!!!!").
- OnClick(func(ctx *application.Context) {
- mySystray := app.NewSystemTray()
- mySystray.SetLabel("Wails")
- if runtime.GOOS == "darwin" {
- mySystray.SetTemplateIcon(application.DefaultMacTemplateIcon)
- } else {
- mySystray.SetIcon(application.DefaultApplicationIcon)
- }
- myMenu := app.NewMenu()
- myMenu.Add("Item 1")
- myMenu.AddSeparator()
- myMenu.Add("Kill this menu").OnClick(func(ctx *application.Context) {
- mySystray.Destroy()
- })
- mySystray.SetMenu(myMenu)
-
- })
- myMenu.Add("Not Enabled").SetEnabled(false)
- myMenu.AddSeparator()
- myMenu.AddCheckbox("My checkbox", true).OnClick(menuCallback)
- myMenu.AddSeparator()
- myMenu.AddRadio("Radio 1", true).OnClick(radioCallback)
- myMenu.AddRadio("Radio 2", false).OnClick(radioCallback)
- myMenu.AddRadio("Radio 3", false).OnClick(radioCallback)
-
- submenu := myMenu.AddSubmenu("Submenu")
- submenu.Add("Submenu item 1").OnClick(menuCallback)
- submenu.Add("Submenu item 2").OnClick(menuCallback)
- submenu.Add("Submenu item 3").OnClick(menuCallback)
- myMenu.AddSeparator()
- file4 := myMenu.Add("File 4").OnClick(func(*application.Context) {
- println("File 4 clicked")
- })
-
- myMenu.Add("Click to toggle").OnClick(func(*application.Context) {
- enabled := file4.Enabled()
- println("Enabled: ", enabled)
- file4.SetEnabled(!enabled)
- })
- myMenu.Add("File 5").OnClick(menuCallback)
-
- mySystray := app.NewSystemTray()
- mySystray.SetLabel("Wails is awesome")
- if runtime.GOOS == "darwin" {
- mySystray.SetTemplateIcon(application.DefaultMacTemplateIcon)
- } else {
- mySystray.SetIcon(application.DefaultApplicationIcon)
- }
- mySystray.SetMenu(myMenu)
- mySystray.SetIconPosition(application.NSImageLeading)
-
- myWindow := app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Kitchen Sink",
- Width: 600,
- Height: 400,
- AlwaysOnTop: true,
- DisableResize: false,
- BackgroundColour: &application.RGBA{
- Red: 255,
- Green: 255,
- Blue: 255,
- Alpha: 30,
- },
- StartState: application.WindowStateMaximised,
- Mac: application.MacWindow{
- Backdrop: application.MacBackdropTranslucent,
- Appearance: application.NSAppearanceNameDarkAqua,
- },
- })
- /*
- myWindow.On(events.Mac.WindowWillClose, func() {
- println(myWindow.ID(), "WindowWillClose")
- })
- myWindow.On(events.Mac.WindowDidResize, func() {
- //w, h := myWindow.Size()
- //println(myWindow.ID(), "WindowDidResize", w, h)
- })
- myWindow.On(events.Mac.WindowDidMove, func() {
- //x, y := myWindow.Position()
- //println(myWindow.ID(), "WindowDidMove", x, y)
- })
- myWindow.On(events.Mac.WindowDidMiniaturize, func() {
- println(myWindow.ID(), "WindowDidMiniaturize")
- })
- myWindow.On(events.Mac.WindowDidDeminiaturize, func() {
- println(myWindow.ID(), "WindowDidDeminiaturize")
- })
- myWindow.On(events.Mac.WindowDidBecomeKey, func() {
- println(myWindow.ID(), "WindowDidBecomeKey")
- })
- myWindow.On(events.Mac.WindowDidResignKey, func() {
- println(myWindow.ID(), "WindowDidResignKey")
- })
- myWindow.On(events.Mac.WindowDidBecomeMain, func() {
- println(myWindow.ID(), "WindowDidBecomeMain")
- })
- myWindow.On(events.Mac.WindowDidResignMain, func() {
- println(myWindow.ID(), "WindowDidResignMain")
- })
- myWindow.On(events.Mac.WindowWillEnterFullScreen, func() {
- println(myWindow.ID(), "WindowWillEnterFullScreen")
- })
- myWindow.On(events.Mac.WindowDidEnterFullScreen, func() {
- println(myWindow.ID(), "WindowDidEnterFullScreen")
- })
- myWindow.On(events.Mac.WindowWillExitFullScreen, func() {
- println(myWindow.ID(), "WindowWillExitFullScreen")
- })
- myWindow.On(events.Mac.WindowDidExitFullScreen, func() {
- println(myWindow.ID(), "WindowDidExitFullScreen")
- })
- myWindow.On(events.Mac.WindowWillEnterVersionBrowser, func() {
- println(myWindow.ID(), "WindowWillEnterVersionBrowser")
- })
- myWindow.On(events.Mac.WindowDidEnterVersionBrowser, func() {
- println(myWindow.ID(), "WindowDidEnterVersionBrowser")
- })
- myWindow.On(events.Mac.WindowWillExitVersionBrowser, func() {
- println(myWindow.ID(), "WindowWillExitVersionBrowser")
- })
- myWindow.On(events.Mac.WindowDidExitVersionBrowser, func() {
- println(myWindow.ID(), "WindowDidExitVersionBrowser")
- })
- */
- var myWindow2 *application.WebviewWindow
- var myWindow2Lock sync.RWMutex
- myWindow2 = app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "#2",
- Width: 1024,
- Height: 768,
- AlwaysOnTop: false,
- URL: "https://google.com",
- Mac: application.MacWindow{
- Backdrop: application.MacBackdropTranslucent,
- },
- })
- //myWindow2.On(events.Mac.WindowDidMove, func() {
- // myWindow2Lock.RLock()
- // x, y := myWindow2.Position()
- // println(myWindow2.ID(), "WindowDidMove: ", x, y)
- // myWindow2Lock.RUnlock()
- //})
- //
-
- go func() {
- time.Sleep(5 * time.Second)
- myWindow2Lock.RLock()
- myWindow.SetTitle("Wooooo")
- myWindow.SetAlwaysOnTop(true)
- myWindow2.SetTitle("OMG")
- myWindow2.SetURL("https://wails.io")
- myWindow.SetMinSize(600, 600)
- myWindow.SetMaxSize(650, 650)
- myWindow.Center()
- myWindow2Lock.RUnlock()
-
- }()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/examples/menu/main.go b/v3/examples/menu/main.go
deleted file mode 100644
index 3ca15cf472c..00000000000
--- a/v3/examples/menu/main.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-func main() {
-
- app := application.New(application.Options{
- Name: "Menu Demo",
- Description: "A demo of the menu system",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
-
- // Create a custom menu
- menu := app.NewMenu()
- menu.AddRole(application.AppMenu)
-
- // Let's make a "Demo" menu
- myMenu := menu.AddSubmenu("Demo")
-
- // Disabled menu item
- myMenu.Add("Not Enabled").SetEnabled(false)
-
- // Click callbacks
- myMenu.Add("Click Me!").OnClick(func(ctx *application.Context) {
- ctx.ClickedMenuItem().SetLabel("Thanks mate!")
- })
-
- // You can control the current window from the menu
- myMenu.Add("Lock WebviewWindow Resize").OnClick(func(ctx *application.Context) {
- if app.CurrentWindow().Resizable() {
- app.CurrentWindow().SetResizable(false)
- ctx.ClickedMenuItem().SetLabel("Unlock WebviewWindow Resize")
- } else {
- app.CurrentWindow().SetResizable(true)
- ctx.ClickedMenuItem().SetLabel("Lock WebviewWindow Resize")
- }
- })
-
- myMenu.AddSeparator()
-
- // Checkboxes will tell you their new state so you don't need to track it
- myMenu.AddCheckbox("My checkbox", true).OnClick(func(context *application.Context) {
- println("Clicked checkbox. Checked:", context.ClickedMenuItem().Checked())
- })
- myMenu.AddSeparator()
-
- // Callbacks can be shared. This is useful for radio groups
- radioCallback := func(ctx *application.Context) {
- menuItem := ctx.ClickedMenuItem()
- menuItem.SetLabel(menuItem.Label() + "!")
- }
-
- // Radio groups are created implicitly by placing radio items next to each other in a menu
- myMenu.AddRadio("Radio 1", true).OnClick(radioCallback)
- myMenu.AddRadio("Radio 2", false).OnClick(radioCallback)
- myMenu.AddRadio("Radio 3", false).OnClick(radioCallback)
-
- // Submenus are also supported
- submenu := myMenu.AddSubmenu("Submenu")
- submenu.Add("Submenu item 1")
- submenu.Add("Submenu item 2")
- submenu.Add("Submenu item 3")
-
- myMenu.AddSeparator()
-
- beatles := myMenu.Add("Hello").OnClick(func(*application.Context) {
- println("The beatles would be proud")
- })
- myMenu.Add("Toggle the menuitem above").OnClick(func(*application.Context) {
- if beatles.Enabled() {
- beatles.SetEnabled(false)
- beatles.SetLabel("Goodbye")
- } else {
- beatles.SetEnabled(true)
- beatles.SetLabel("Hello")
- }
- })
-
- app.SetMenu(menu)
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err.Error())
- }
-}
diff --git a/v3/examples/plain/main.go b/v3/examples/plain/main.go
deleted file mode 100644
index bc8406e82af..00000000000
--- a/v3/examples/plain/main.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
- "net/http"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-func main() {
- app := application.New(application.Options{
- Name: "Plain",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- Assets: application.AssetOptions{
- Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusOK)
- w.Write([]byte(`Plain Bundle Plain Bundle This is a plain bundle. It has no frontend code but this was Served by the AssetServer's Handler.
Clicking this paragraph emits an event...
`))
- }),
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; user-select: none; -ms-user-select: none; -webkit-user-select: none; } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- },
- URL: "/",
- })
-
- app.Events.On("clicked", func(_ *application.WailsEvent) {
- println("clicked")
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/examples/plugins/Taskfile.yml b/v3/examples/plugins/Taskfile.yml
deleted file mode 100644
index 3c88c18c322..00000000000
--- a/v3/examples/plugins/Taskfile.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-version: '3'
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - go build -gcflags=all="-N -l" -o bin/testapp main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input build/appicon.png
-
- build-prod:
- summary: Creates a production build of the application
- cmds:
- - go build -tags production -ldflags="-w -s" -o bin/testapp
-
- package-darwin:
- summary: Packages a production build of the application into a `.app` bundle
- deps:
- - build-prod
- - generate-icons
- cmds:
- - mkdir -p buildtest.app/Contents/{MacOS,Resources}
- - cp build/icons.icns buildtest.app/Contents/Resources
- - cp bin/testapp buildtest.app/Contents/MacOS
- - cp build/Info.plist buildtest.app/Contents
\ No newline at end of file
diff --git a/v3/examples/plugins/assets/index.html b/v3/examples/plugins/assets/index.html
deleted file mode 100644
index f77c1829456..00000000000
--- a/v3/examples/plugins/assets/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- Title
-
-
-HELLO!
-
-
\ No newline at end of file
diff --git a/v3/examples/plugins/build/Info.dev.plist b/v3/examples/plugins/build/Info.dev.plist
deleted file mode 100644
index d6d28b179b1..00000000000
--- a/v3/examples/plugins/build/Info.dev.plist
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My App
- CFBundleExecutable
- app
- CFBundleIdentifier
- com.wails.app
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- The ultimate thing
- CFBundleShortVersionString
- v1
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) Me
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/v3/examples/plugins/build/Info.plist b/v3/examples/plugins/build/Info.plist
deleted file mode 100644
index ab571ad4fa2..00000000000
--- a/v3/examples/plugins/build/Info.plist
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My App
- CFBundleExecutable
- testapp
- CFBundleIdentifier
- com.wails.app
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- The ultimate thing
- CFBundleShortVersionString
- v1
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) Me
-
-
\ No newline at end of file
diff --git a/v3/examples/plugins/build/appicon.png b/v3/examples/plugins/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/examples/plugins/build/appicon.png and /dev/null differ
diff --git a/v3/examples/plugins/build/icons.icns b/v3/examples/plugins/build/icons.icns
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/v3/examples/plugins/build/icons.ico b/v3/examples/plugins/build/icons.ico
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/v3/examples/plugins/build/info.json b/v3/examples/plugins/build/info.json
deleted file mode 100644
index 1005eb5cb85..00000000000
--- a/v3/examples/plugins/build/info.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "fixed": {
- "file_version": "v1.0.0"
- },
- "info": {
- "0000": {
- "ProductVersion": "v1.0.0",
- "CompanyName": "My Company Name",
- "FileDescription": "A thing that does a thing",
- "LegalCopyright": "(c) 2023 My Company Name",
- "ProductName": "My Product Name",
- "Comments": "This is a comment"
- }
- }
-}
\ No newline at end of file
diff --git a/v3/examples/plugins/build/wails.exe.manifest b/v3/examples/plugins/build/wails.exe.manifest
deleted file mode 100644
index fb1ce5bde73..00000000000
--- a/v3/examples/plugins/build/wails.exe.manifest
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- true/pm
- permonitorv2,permonitor
-
-
-
\ No newline at end of file
diff --git a/v3/examples/plugins/go.mod b/v3/examples/plugins/go.mod
deleted file mode 100644
index dd1ddaacde7..00000000000
--- a/v3/examples/plugins/go.mod
+++ /dev/null
@@ -1,41 +0,0 @@
-module plugin_demo
-
-go 1.20
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/dustin/go-humanize v1.0.0 // indirect
- github.com/google/uuid v1.3.0 // indirect
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/mattn/go-isatty v0.0.16 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 // indirect
- github.com/pkg/errors v0.9.1 // indirect
- github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
- golang.org/x/net v0.7.0 // indirect
- golang.org/x/sys v0.5.0 // indirect
- golang.org/x/tools v0.1.12 // indirect
- lukechampine.com/uint128 v1.2.0 // indirect
- modernc.org/cc/v3 v3.40.0 // indirect
- modernc.org/ccgo/v3 v3.16.13 // indirect
- modernc.org/libc v1.22.3 // indirect
- modernc.org/mathutil v1.5.0 // indirect
- modernc.org/memory v1.5.0 // indirect
- modernc.org/opt v0.1.3 // indirect
- modernc.org/sqlite v1.21.0 // indirect
- modernc.org/strutil v1.1.3 // indirect
- modernc.org/token v1.0.1 // indirect
-)
-
-replace github.com/wailsapp/wails/v3 => ../..
-
-replace github.com/wailsapp/wails/v2 => ../../../v2
diff --git a/v3/examples/plugins/go.sum b/v3/examples/plugins/go.sum
deleted file mode 100644
index 9477ac48a75..00000000000
--- a/v3/examples/plugins/go.sum
+++ /dev/null
@@ -1,83 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
-github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
-github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
-github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
-github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
-github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
-github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 h1:acNfDZXmm28D2Yg/c3ALnZStzNaZMSagpbr96vY6Zjc=
-github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
-github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
-github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
-golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
-lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
-lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
-modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw=
-modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0=
-modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw=
-modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY=
-modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
-modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
-modernc.org/libc v1.22.3 h1:D/g6O5ftAfavceqlLOFwaZuA5KYafKwmr30A6iSqoyY=
-modernc.org/libc v1.22.3/go.mod h1:MQrloYP209xa2zHome2a8HLiLm6k0UT8CoHpV74tOFw=
-modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=
-modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
-modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds=
-modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU=
-modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
-modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
-modernc.org/sqlite v1.21.0 h1:4aP4MdUf15i3R3M2mx6Q90WHKz3nZLoz96zlB6tNdow=
-modernc.org/sqlite v1.21.0/go.mod h1:XwQ0wZPIh1iKb5mkvCJ3szzbhk+tykC8ZWqTRTgYRwI=
-modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
-modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=
-modernc.org/tcl v1.15.1 h1:mOQwiEK4p7HruMZcwKTZPw/aqtGM4aY00uzWhlKKYws=
-modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
-modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
-modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE=
diff --git a/v3/examples/plugins/icon.ico b/v3/examples/plugins/icon.ico
deleted file mode 100644
index bfa0690b7f8..00000000000
Binary files a/v3/examples/plugins/icon.ico and /dev/null differ
diff --git a/v3/examples/plugins/icons.icns b/v3/examples/plugins/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/examples/plugins/icons.icns and /dev/null differ
diff --git a/v3/examples/plugins/main.go b/v3/examples/plugins/main.go
deleted file mode 100644
index d5c0b66c14b..00000000000
--- a/v3/examples/plugins/main.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package main
-
-import (
- "embed"
- "github.com/wailsapp/wails/v3/pkg/application"
- "github.com/wailsapp/wails/v3/plugins/browser"
- "github.com/wailsapp/wails/v3/plugins/kvstore"
- "github.com/wailsapp/wails/v3/plugins/log"
- "github.com/wailsapp/wails/v3/plugins/single_instance"
- "github.com/wailsapp/wails/v3/plugins/sqlite"
- "github.com/wailsapp/wails/v3/plugins/start_at_login"
- "os"
- "plugin_demo/plugins/hashes"
-)
-
-//go:embed assets/*
-var assets embed.FS
-
-func main() {
-
- app := application.New(application.Options{
- Name: "Plugin Demo",
- Description: "A demo of the plugins API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- Plugins: map[string]application.Plugin{
- "hashes": hashes.NewPlugin(),
- "browser": browser.NewPlugin(),
- "log": log.NewPlugin(),
- "sqlite": sqlite.NewPlugin(&sqlite.Config{
- DBFile: "test.db",
- }),
- "kvstore": kvstore.NewPlugin(&kvstore.Config{
- Filename: "store.json",
- AutoSave: true,
- }),
- "single_instance": single_instance.NewPlugin(&single_instance.Config{
- // When true, the original app will be activated when a second instance is launched
- ActivateAppOnSubsequentLaunch: true,
- }),
- "start_at_login": start_at_login.NewPlugin(),
- },
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- window := app.NewWebviewWindow()
- window.ToggleDevTools()
-
- err := app.Run()
-
- if err != nil {
- println(err.Error())
- os.Exit(1)
- }
-}
diff --git a/v3/examples/plugins/plugins/hashes/README.md b/v3/examples/plugins/plugins/hashes/README.md
deleted file mode 100644
index 054f5f45127..00000000000
--- a/v3/examples/plugins/plugins/hashes/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Hashes Plugin
-
-This example plugin provides a way to generate hashes of strings.
-
-## Usage
-
-Add the plugin to the `Plugins` option in the Applications options:
-
-```go
- Plugins: map[string]application.Plugin{
- "hashes": hashes.NewPlugin(),
- },
-```
-
-You can then call the Generate method from the frontend:
-
-```js
- wails.Plugin("hashes","Generate","hello world").then((result) => console.log(result))
-```
-
-This method returns a struct with the following fields:
-
-```typescript
- interface Hashes {
- md5: string;
- sha1: string;
- sha256: string;
- }
-```
-
-A TypeScript definition file is provided for this interface.
diff --git a/v3/examples/plugins/plugins/hashes/hashes.d.ts b/v3/examples/plugins/plugins/hashes/hashes.d.ts
deleted file mode 100644
index 72b88e0f49e..00000000000
--- a/v3/examples/plugins/plugins/hashes/hashes.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-
-export namespace HashesPlugin {
- export interface Hashes {
- md5: string;
- sha1: string;
- sha256: string;
- }
-}
\ No newline at end of file
diff --git a/v3/examples/plugins/plugins/hashes/hashes.js b/v3/examples/plugins/plugins/hashes/hashes.js
deleted file mode 100644
index f9f8cf3b0fd..00000000000
--- a/v3/examples/plugins/plugins/hashes/hashes.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Generate takes a string and returns a number of hashes for it
-export function Generate(input) {
- return wails.Plugin("hashes","Generate",input);
-}
\ No newline at end of file
diff --git a/v3/examples/plugins/plugins/hashes/plugin.go b/v3/examples/plugins/plugins/hashes/plugin.go
deleted file mode 100644
index afdcec84a94..00000000000
--- a/v3/examples/plugins/plugins/hashes/plugin.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package hashes
-
-import (
- "crypto/md5"
- "crypto/sha1"
- "crypto/sha256"
- "encoding/hex"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-// ---------------- Plugin Setup ----------------
-
-type Plugin struct{}
-
-func NewPlugin() *Plugin {
- return &Plugin{}
-}
-
-func (r *Plugin) Shutdown() {}
-
-func (r *Plugin) Name() string {
- return "Hashes Plugin"
-}
-
-func (r *Plugin) Init(_ *application.App) error {
- return nil
-}
-
-func (r *Plugin) CallableByJS() []string {
- return []string{
- "Generate",
- }
-}
-
-func (r *Plugin) InjectJS() string {
- return ""
-}
-
-// ---------------- Plugin Methods ----------------
-
-type Hashes struct {
- MD5 string `json:"md5"`
- SHA1 string `json:"sha1"`
- SHA256 string `json:"sha256"`
-}
-
-func (r *Plugin) Generate(s string) Hashes {
- md5Hash := md5.Sum([]byte(s))
- sha1Hash := sha1.Sum([]byte(s))
- sha256Hash := sha256.Sum256([]byte(s))
-
- return Hashes{
- MD5: hex.EncodeToString(md5Hash[:]),
- SHA1: hex.EncodeToString(sha1Hash[:]),
- SHA256: hex.EncodeToString(sha256Hash[:]),
- }
-}
diff --git a/v3/examples/plugins/plugins/hashes/plugin.toml b/v3/examples/plugins/plugins/hashes/plugin.toml
deleted file mode 100644
index 7835721be29..00000000000
--- a/v3/examples/plugins/plugins/hashes/plugin.toml
+++ /dev/null
@@ -1,10 +0,0 @@
-# This is the plugin definition file for the "Hashes" plugin.
-
-Name = "Hashes"
-Description = "Provides a method to generate a number of hashes."
-Author = "Lea Anthony"
-Version = "v1.0.0"
-Website = "https://wails.io"
-License = "MIT"
-
-
diff --git a/v3/examples/plugins/store.json b/v3/examples/plugins/store.json
deleted file mode 100644
index 948bb52b077..00000000000
--- a/v3/examples/plugins/store.json
+++ /dev/null
@@ -1 +0,0 @@
-{"url2":"https://reddit.com"}
\ No newline at end of file
diff --git a/v3/examples/plugins/test.db b/v3/examples/plugins/test.db
deleted file mode 100644
index 15613669452..00000000000
Binary files a/v3/examples/plugins/test.db and /dev/null differ
diff --git a/v3/examples/screen/assets/index.html b/v3/examples/screen/assets/index.html
deleted file mode 100644
index 31b38e04633..00000000000
--- a/v3/examples/screen/assets/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
- Screens Demo
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/v3/examples/screen/main.go b/v3/examples/screen/main.go
deleted file mode 100644
index e71f5c4bec3..00000000000
--- a/v3/examples/screen/main.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed assets/*
-var assets embed.FS
-
-func main() {
-
- app := application.New(application.Options{
- Name: "Screen Demo",
- Description: "A demo of the Screen API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Screen Demo",
- Width: 800,
- Height: 600,
- Mac: application.MacWindow{
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- InvisibleTitleBarHeight: 50,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err.Error())
- }
-}
diff --git a/v3/examples/systray/main.go b/v3/examples/systray/main.go
deleted file mode 100644
index 2beb4501dbf..00000000000
--- a/v3/examples/systray/main.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
- "runtime"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-func main() {
- app := application.New(application.Options{
- Name: "Systray Demo",
- Description: "A demo of the Systray API",
- Mac: application.MacOptions{
- ActivationPolicy: application.ActivationPolicyAccessory,
- },
- })
-
- systemTray := app.NewSystemTray()
- if runtime.GOOS == "darwin" {
- systemTray.SetIcon(application.DefaultMacTemplateIcon)
- }
-
- myMenu := app.NewMenu()
- myMenu.Add("Hello World!").OnClick(func(ctx *application.Context) {
- app.InfoDialog().SetTitle("Hello World!").SetMessage("Hello World!").Show()
- })
- subMenu := myMenu.AddSubmenu("Submenu")
- subMenu.Add("Click me!").OnClick(func(ctx *application.Context) {
- ctx.ClickedMenuItem().SetLabel("Clicked!")
- })
- myMenu.AddSeparator()
- myMenu.Add("Quit").OnClick(func(ctx *application.Context) {
- app.Quit()
- })
-
- systemTray.SetMenu(myMenu)
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/examples/window/main.go b/v3/examples/window/main.go
deleted file mode 100644
index 7a6e174c5d5..00000000000
--- a/v3/examples/window/main.go
+++ /dev/null
@@ -1,285 +0,0 @@
-package main
-
-import (
- _ "embed"
- "fmt"
- "log"
- "math/rand"
- "runtime"
- "strconv"
- "time"
-
- "github.com/wailsapp/wails/v3/pkg/events"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-func main() {
- app := application.New(application.Options{
- Name: "WebviewWindow Demo",
- Description: "A demo of the WebviewWindow API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- app.On(events.Mac.ApplicationDidFinishLaunching, func() {
- log.Println("ApplicationDidFinishLaunching")
- })
-
- currentWindow := func(fn func(window *application.WebviewWindow)) {
- if app.CurrentWindow() != nil {
- fn(app.CurrentWindow())
- } else {
- println("Current WebviewWindow is nil")
- }
- }
-
- // Create a custom menu
- menu := app.NewMenu()
- menu.AddRole(application.AppMenu)
-
- windowCounter := 1
-
- // Let's make a "Demo" menu
- myMenu := menu.AddSubmenu("New")
-
- myMenu.Add("New WebviewWindow").
- SetAccelerator("CmdOrCtrl+N").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindow().
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetURL("https://wails.io").
- Show()
- windowCounter++
- })
- myMenu.Add("New WebviewWindow (Hide on Close").
- SetAccelerator("CmdOrCtrl+H").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{HideOnClose: true}).
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetURL("https://wails.io").
- Show()
- windowCounter++
- })
- myMenu.Add("New Frameless WebviewWindow").
- SetAccelerator("CmdOrCtrl+F").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- X: rand.Intn(1000),
- Y: rand.Intn(800),
- Frameless: true,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- },
- }).Show()
- windowCounter++
- })
- if runtime.GOOS == "darwin" {
- myMenu.Add("New WebviewWindow (MacTitleBarHiddenInset)").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Mac: application.MacWindow{
- TitleBar: application.MacTitleBarHiddenInset,
- InvisibleTitleBarHeight: 25,
- },
- }).
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetHTML("A MacTitleBarHiddenInset WebviewWindow example
").
- Show()
- windowCounter++
- })
- myMenu.Add("New WebviewWindow (MacTitleBarHiddenInsetUnified)").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Mac: application.MacWindow{
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- InvisibleTitleBarHeight: 50,
- },
- }).
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetHTML("A MacTitleBarHiddenInsetUnified WebviewWindow example
").
- Show()
- windowCounter++
- })
- myMenu.Add("New WebviewWindow (MacTitleBarHidden)").
- OnClick(func(ctx *application.Context) {
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Mac: application.MacWindow{
- TitleBar: application.MacTitleBarHidden,
- InvisibleTitleBarHeight: 25,
- },
- }).
- SetTitle("WebviewWindow "+strconv.Itoa(windowCounter)).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- SetHTML("A MacTitleBarHidden WebviewWindow example
").
- Show()
- windowCounter++
- })
- }
-
- sizeMenu := menu.AddSubmenu("Size")
- sizeMenu.Add("Set Size (800,600)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetSize(800, 600)
- })
- })
-
- sizeMenu.Add("Set Size (Random)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetSize(rand.Intn(800)+200, rand.Intn(600)+200)
- })
- })
- sizeMenu.Add("Set Min Size (200,200)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetMinSize(200, 200)
- })
- })
- sizeMenu.Add("Set Max Size (600,600)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetFullscreenButtonEnabled(false)
- w.SetMaxSize(600, 600)
- })
- })
- sizeMenu.Add("Get Current WebviewWindow Size").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- width, height := w.Size()
- app.InfoDialog().SetTitle("Current WebviewWindow Size").SetMessage("Width: " + strconv.Itoa(width) + " Height: " + strconv.Itoa(height)).Show()
- })
- })
-
- sizeMenu.Add("Reset Min Size").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetMinSize(0, 0)
- })
- })
-
- sizeMenu.Add("Reset Max Size").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetMaxSize(0, 0)
- w.SetFullscreenButtonEnabled(true)
- })
- })
- positionMenu := menu.AddSubmenu("Position")
- positionMenu.Add("Set Position (0,0)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetPosition(0, 0)
- })
- })
- positionMenu.Add("Set Position (Random)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetPosition(rand.Intn(1000), rand.Intn(800))
- })
- })
-
- positionMenu.Add("Get Position").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- x, y := w.Position()
- app.InfoDialog().SetTitle("Current WebviewWindow Position").SetMessage("X: " + strconv.Itoa(x) + " Y: " + strconv.Itoa(y)).Show()
- })
- })
-
- positionMenu.Add("Center").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Center()
- })
- })
- stateMenu := menu.AddSubmenu("State")
- stateMenu.Add("Minimise (for 2 secs)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Minimise()
- time.Sleep(2 * time.Second)
- w.Restore()
- })
- })
- stateMenu.Add("Maximise").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Maximise()
- })
- })
- stateMenu.Add("Fullscreen").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Fullscreen()
- })
- })
- stateMenu.Add("UnFullscreen").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.UnFullscreen()
- })
- })
- stateMenu.Add("Restore").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Restore()
- })
- })
- stateMenu.Add("Hide (for 2 seconds)").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.Hide()
- time.Sleep(2 * time.Second)
- w.Show()
- })
- })
- stateMenu.Add("Always on Top").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetAlwaysOnTop(true)
- })
- })
- stateMenu.Add("Not always on Top").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetAlwaysOnTop(false)
- })
- })
- stateMenu.Add("Google.com").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetURL("https://google.com")
- })
- })
- stateMenu.Add("wails.io").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- w.SetURL("https://wails.io")
- })
- })
- stateMenu.Add("Get Primary Screen").OnClick(func(ctx *application.Context) {
- screen, err := app.GetPrimaryScreen()
- if err != nil {
- app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show()
- return
- }
- msg := fmt.Sprintf("Screen: %+v", screen)
- app.InfoDialog().SetTitle("Primary Screen").SetMessage(msg).Show()
- })
- stateMenu.Add("Get Screens").OnClick(func(ctx *application.Context) {
- screens, err := app.GetScreens()
- if err != nil {
- app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show()
- return
- }
- for _, screen := range screens {
- msg := fmt.Sprintf("Screen: %+v", screen)
- app.InfoDialog().SetTitle(fmt.Sprintf("Screen %s", screen.ID)).SetMessage(msg).Show()
- }
- })
- stateMenu.Add("Get Screen for WebviewWindow").OnClick(func(ctx *application.Context) {
- currentWindow(func(w *application.WebviewWindow) {
- screen, err := w.GetScreen()
- if err != nil {
- app.ErrorDialog().SetTitle("Error").SetMessage(err.Error()).Show()
- return
- }
- msg := fmt.Sprintf("Screen: %+v", screen)
- app.InfoDialog().SetTitle(fmt.Sprintf("Screen %s", screen.ID)).SetMessage(msg).Show()
- })
- })
- app.NewWebviewWindow()
-
- app.SetMenu(menu)
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/examples/windowjs/assets/index.html b/v3/examples/windowjs/assets/index.html
deleted file mode 100644
index f77c1829456..00000000000
--- a/v3/examples/windowjs/assets/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- Title
-
-
-HELLO!
-
-
\ No newline at end of file
diff --git a/v3/examples/windowjs/main.go b/v3/examples/windowjs/main.go
deleted file mode 100644
index ff7f61cd747..00000000000
--- a/v3/examples/windowjs/main.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
- "math/rand"
- "strconv"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed assets
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "WebviewWindow Javascript Demo",
- Description: "A demo of the WebviewWindow API from Javascript",
- Icon: nil,
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- // Create a custom menu
- menu := app.NewMenu()
- menu.AddRole(application.AppMenu)
-
- windowCounter := 1
-
- newWindow := func() {
- windowName := "WebviewWindow " + strconv.Itoa(windowCounter)
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Name: windowName,
- }).
- SetTitle(windowName).
- SetPosition(rand.Intn(1000), rand.Intn(800)).
- Show()
- windowCounter++
- }
-
- // Let's make a "Demo" menu
- myMenu := menu.AddSubmenu("New")
-
- myMenu.Add("New WebviewWindow").
- SetAccelerator("CmdOrCtrl+N").
- OnClick(func(ctx *application.Context) {
- newWindow()
- })
-
- newWindow()
- newWindow()
-
- app.SetMenu(menu)
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/examples/wml/assets/index.html b/v3/examples/wml/assets/index.html
deleted file mode 100644
index 26819800d4e..00000000000
--- a/v3/examples/wml/assets/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- Wails ML Demo
-
-
- Wails ML Demo
- This application contains no Javascript!
- Press me!
- Delete all the things!
- Close the Window?
- Center
- Minimise
- Maximise
- Fullscreen
- Hover over me
-
-
\ No newline at end of file
diff --git a/v3/examples/wml/main.go b/v3/examples/wml/main.go
deleted file mode 100644
index 1a9f4723b32..00000000000
--- a/v3/examples/wml/main.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed assets/*
-var assets embed.FS
-
-func main() {
-
- app := application.New(application.Options{
- Name: "Wails ML Demo",
- Description: "A demo of the Wails ML API",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Wails ML Demo",
- Width: 800,
- Height: 600,
- Mac: application.MacWindow{
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInsetUnified,
- InvisibleTitleBarHeight: 50,
- },
- })
-
- app.Events.On("button-pressed", func(_ *application.WailsEvent) {
- println("Button Pressed!")
- })
- app.Events.On("hover", func(_ *application.WailsEvent) {
- println("Hover time!")
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err.Error())
- }
-}
diff --git a/v3/go.mod b/v3/go.mod
deleted file mode 100644
index 4ffb85ce65e..00000000000
--- a/v3/go.mod
+++ /dev/null
@@ -1,74 +0,0 @@
-module github.com/wailsapp/wails/v3
-
-go 1.19
-
-require (
- github.com/go-task/task/v3 v3.20.0
- github.com/google/go-cmp v0.5.9
- github.com/jackmordaunt/icns/v2 v2.2.1
- github.com/json-iterator/go v1.1.12
- github.com/leaanthony/clir v1.6.0
- github.com/leaanthony/gosod v1.0.3
- github.com/leaanthony/winicon v1.0.0
- github.com/matryer/is v1.4.0
- github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2
- github.com/pkg/errors v0.9.1
- github.com/pterm/pterm v0.12.51
- github.com/samber/lo v1.37.0
- github.com/tc-hib/winres v0.1.6
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6
- modernc.org/sqlite v1.21.0
-)
-
-require (
- atomicgo.dev/cursor v0.1.1 // indirect
- atomicgo.dev/keyboard v0.2.8 // indirect
- github.com/containerd/console v1.0.3 // indirect
- github.com/dustin/go-humanize v1.0.0 // indirect
- github.com/fatih/color v1.13.0 // indirect
- github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
- github.com/google/uuid v1.3.0 // indirect
- github.com/gookit/color v1.5.2 // indirect
- github.com/joho/godotenv v1.4.0 // indirect
- github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/lithammer/fuzzysearch v1.1.5 // indirect
- github.com/mattn/go-colorable v0.1.11 // indirect
- github.com/mattn/go-isatty v0.0.16 // indirect
- github.com/mattn/go-runewidth v0.0.14 // indirect
- github.com/mattn/go-zglob v0.0.4 // indirect
- github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
- github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
- github.com/radovskyb/watcher v1.0.7 // indirect
- github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
- github.com/rivo/uniseg v0.2.0 // indirect
- github.com/sajari/fuzzy v1.0.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/image v0.5.0 // indirect
- golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
- golang.org/x/net v0.7.0 // indirect
- golang.org/x/sync v0.1.0 // indirect
- golang.org/x/sys v0.5.0 // indirect
- golang.org/x/term v0.5.0 // indirect
- golang.org/x/text v0.7.0 // indirect
- golang.org/x/tools v0.1.12 // indirect
- gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
- gopkg.in/yaml.v3 v3.0.1 // indirect
- lukechampine.com/uint128 v1.2.0 // indirect
- modernc.org/cc/v3 v3.40.0 // indirect
- modernc.org/ccgo/v3 v3.16.13 // indirect
- modernc.org/libc v1.22.3 // indirect
- modernc.org/mathutil v1.5.0 // indirect
- modernc.org/memory v1.5.0 // indirect
- modernc.org/opt v0.1.3 // indirect
- modernc.org/strutil v1.1.3 // indirect
- modernc.org/token v1.0.1 // indirect
- mvdan.cc/sh/v3 v3.6.0 // indirect
-)
-
-replace github.com/wailsapp/wails/v2 => ../v2
diff --git a/v3/go.sum b/v3/go.sum
deleted file mode 100644
index ff474ab9330..00000000000
--- a/v3/go.sum
+++ /dev/null
@@ -1,239 +0,0 @@
-atomicgo.dev/assert v0.0.2 h1:FiKeMiZSgRrZsPo9qn/7vmr7mCsh5SZyXY4YGYiYwrg=
-atomicgo.dev/cursor v0.1.1 h1:0t9sxQomCTRh5ug+hAMCs59x/UmC9QL6Ci5uosINKD4=
-atomicgo.dev/cursor v0.1.1/go.mod h1:Lr4ZJB3U7DfPPOkbH7/6TOtJ4vFGHlgj1nc+n900IpU=
-atomicgo.dev/keyboard v0.2.8 h1:Di09BitwZgdTV1hPyX/b9Cqxi8HVuJQwWivnZUEqlj4=
-atomicgo.dev/keyboard v0.2.8/go.mod h1:BC4w9g00XkxH/f1HXhW2sXmJFOCWbKn9xrOunSFtExQ=
-github.com/MarvinJWendt/testza v0.1.0/go.mod h1:7AxNvlfeHP7Z/hDQ5JtE3OKYT3XFUeLCDE2DQninSqs=
-github.com/MarvinJWendt/testza v0.2.1/go.mod h1:God7bhG8n6uQxwdScay+gjm9/LnO4D3kkcZX4hv9Rp8=
-github.com/MarvinJWendt/testza v0.2.8/go.mod h1:nwIcjmr0Zz+Rcwfh3/4UhBp7ePKVhuBExvZqnKYWlII=
-github.com/MarvinJWendt/testza v0.2.10/go.mod h1:pd+VWsoGUiFtq+hRKSU1Bktnn+DMCSrDrXDpX2bG66k=
-github.com/MarvinJWendt/testza v0.2.12/go.mod h1:JOIegYyV7rX+7VZ9r77L/eH6CfJHHzXjB69adAhzZkI=
-github.com/MarvinJWendt/testza v0.3.0/go.mod h1:eFcL4I0idjtIx8P9C6KkAuLgATNKpX4/2oUqKc6bF2c=
-github.com/MarvinJWendt/testza v0.4.2/go.mod h1:mSdhXiKH8sg/gQehJ63bINcCKp7RtYewEjXsvsVUPbE=
-github.com/MarvinJWendt/testza v0.5.1 h1:a9Fqx6vQrHQ4CyiaLhktfTTelwGotmFWy8MNhyaohw8=
-github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk=
-github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
-github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
-github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
-github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
-github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
-github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
-github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
-github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
-github.com/go-task/task/v3 v3.20.0 h1:pTavuhP+AiEpKLzh5I6Lja9Ux7ypYO5QMsEPTbhYEDc=
-github.com/go-task/task/v3 v3.20.0/go.mod h1:y7rWakbLR5gFElGgo6rA2dyr6vU/zNIDVfn3S4Of6OI=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
-github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
-github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
-github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ=
-github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo=
-github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI=
-github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg=
-github.com/jackmordaunt/icns/v2 v2.2.1 h1:MGklwYP2yohKn2Bw7XxlF69LZe98S1vUfl5OvAulPwg=
-github.com/jackmordaunt/icns/v2 v2.2.1/go.mod h1:6aYIB9eSzyfHHMKqDf17Xrs1zetQPReAkiUSHzdw4cI=
-github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
-github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
-github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
-github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
-github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
-github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
-github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU=
-github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
-github.com/leaanthony/clir v1.0.4/go.mod h1:k/RBkdkFl18xkkACMCLt09bhiZnrGORoxmomeMvDpE0=
-github.com/leaanthony/clir v1.6.0 h1:mLV9thGkmqFqJU7ozmqlER8sBtGdZlz6H3gKsfIiB3o=
-github.com/leaanthony/clir v1.6.0/go.mod h1:k/RBkdkFl18xkkACMCLt09bhiZnrGORoxmomeMvDpE0=
-github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc=
-github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA=
-github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ=
-github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/leaanthony/winicon v1.0.0 h1:ZNt5U5dY71oEoKZ97UVwJRT4e+5xo5o/ieKuHuk8NqQ=
-github.com/leaanthony/winicon v1.0.0/go.mod h1:en5xhijl92aphrJdmRPlh4NI1L6wq3gEm0LpXAPghjU=
-github.com/lithammer/fuzzysearch v1.1.5 h1:Ag7aKU08wp0R9QCfF4GoGST9HbmAIeLP7xwMrOBEp1c=
-github.com/lithammer/fuzzysearch v1.1.5/go.mod h1:1R1LRNk7yKid1BaQkmuLQaHruxcC4HmAH30Dh61Ih1Q=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
-github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
-github.com/mattn/go-colorable v0.1.11 h1:nQ+aFkoE2TMGc0b68U2OKSexC+eq46+XwZzWXHRmPYs=
-github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
-github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
-github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
-github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
-github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
-github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
-github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
-github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
-github.com/mattn/go-zglob v0.0.4 h1:LQi2iOm0/fGgu80AioIJ/1j9w9Oh+9DZ39J4VAGzHQM=
-github.com/mattn/go-zglob v0.0.4/go.mod h1:MxxjyoXXnMxfIpxTK2GAkw1w8glPsQILx3N5wrKakiY=
-github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
-github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
-github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
-github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 h1:acNfDZXmm28D2Yg/c3ALnZStzNaZMSagpbr96vY6Zjc=
-github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/pterm/pterm v0.12.27/go.mod h1:PhQ89w4i95rhgE+xedAoqous6K9X+r6aSOI2eFF7DZI=
-github.com/pterm/pterm v0.12.29/go.mod h1:WI3qxgvoQFFGKGjGnJR849gU0TsEOvKn5Q8LlY1U7lg=
-github.com/pterm/pterm v0.12.30/go.mod h1:MOqLIyMOgmTDz9yorcYbcw+HsgoZo3BQfg2wtl3HEFE=
-github.com/pterm/pterm v0.12.31/go.mod h1:32ZAWZVXD7ZfG0s8qqHXePte42kdz8ECtRyEejaWgXU=
-github.com/pterm/pterm v0.12.33/go.mod h1:x+h2uL+n7CP/rel9+bImHD5lF3nM9vJj80k9ybiiTTE=
-github.com/pterm/pterm v0.12.36/go.mod h1:NjiL09hFhT/vWjQHSj1athJpx6H8cjpHXNAK5bUw8T8=
-github.com/pterm/pterm v0.12.40/go.mod h1:ffwPLwlbXxP+rxT0GsgDTzS3y3rmpAO1NMjUkGTYf8s=
-github.com/pterm/pterm v0.12.51 h1:iwhNG1FhQMgks+5kVyr/ClRk3WJCuL907nJN7RqmEpw=
-github.com/pterm/pterm v0.12.51/go.mod h1:79BLm4vos2z+eOoHnDG7ZWuYtLaSStyaspKjGmSoxc4=
-github.com/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE=
-github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg=
-github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
-github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
-github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
-github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
-github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
-github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
-github.com/sajari/fuzzy v1.0.0 h1:+FmwVvJErsd0d0hAPlj4CxqxUtQY/fOoY0DwX4ykpRY=
-github.com/sajari/fuzzy v1.0.0/go.mod h1:OjYR6KxoWOe9+dOlXeiCJd4dIbED4Oo8wpS89o0pwOo=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
-github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
-github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
-github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
-github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
-github.com/tc-hib/winres v0.1.6 h1:qgsYHze+BxQPEYilxIz/KCQGaClvI2+yLBAZs+3+0B8=
-github.com/tc-hib/winres v0.1.6/go.mod h1:pe6dOR40VOrGz8PkzreVKNvEKnlE8t4yR8A8naL+t7A=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
-github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
-github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/image v0.5.0 h1:5JMiNunQeQw++mMOz48/ISeNu3Iweh/JaZU8ZLqHRrI=
-golang.org/x/image v0.5.0/go.mod h1:FVC7BI/5Ym8R25iw5OLsgshdUBbT1h5jZTpA+mvAdZ4=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
-golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
-golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
-golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
-golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
-gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
-lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
-modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw=
-modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0=
-modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw=
-modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY=
-modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
-modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
-modernc.org/libc v1.22.3 h1:D/g6O5ftAfavceqlLOFwaZuA5KYafKwmr30A6iSqoyY=
-modernc.org/libc v1.22.3/go.mod h1:MQrloYP209xa2zHome2a8HLiLm6k0UT8CoHpV74tOFw=
-modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=
-modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
-modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds=
-modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU=
-modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
-modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
-modernc.org/sqlite v1.21.0 h1:4aP4MdUf15i3R3M2mx6Q90WHKz3nZLoz96zlB6tNdow=
-modernc.org/sqlite v1.21.0/go.mod h1:XwQ0wZPIh1iKb5mkvCJ3szzbhk+tykC8ZWqTRTgYRwI=
-modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
-modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=
-modernc.org/tcl v1.15.1 h1:mOQwiEK4p7HruMZcwKTZPw/aqtGM4aY00uzWhlKKYws=
-modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
-modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
-modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE=
-mvdan.cc/sh/v3 v3.6.0 h1:gtva4EXJ0dFNvl5bHjcUEvws+KRcDslT8VKheTYkbGU=
-mvdan.cc/sh/v3 v3.6.0/go.mod h1:U4mhtBLZ32iWhif5/lD+ygy1zrgaQhUu+XFy7C8+TTA=
diff --git a/v3/internal/commands/bindings.go b/v3/internal/commands/bindings.go
deleted file mode 100644
index 1c89544da5a..00000000000
--- a/v3/internal/commands/bindings.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package commands
-
-import "github.com/wailsapp/wails/v3/internal/parser"
-
-type GenerateBindingsOptions struct {
- Silent bool `name:"silent" description:"Silent mode"`
- ModelsFilename string `name:"m" description:"The filename for the models file" default:"models.ts"`
- BindingsFilename string `name:"b" description:"The filename for the bindings file" default:"bindings.js"`
- ProjectDirectory string `name:"p" description:"The project directory" default:"."`
- OutputDirectory string `name:"d" description:"The output directory" default:"."`
-}
-
-func GenerateBindings(options *GenerateBindingsOptions) error {
- return parser.GenerateBindingsAndModels(options.ProjectDirectory, options.OutputDirectory)
-}
diff --git a/v3/internal/commands/build.go b/v3/internal/commands/build.go
deleted file mode 100644
index b6c0677d1e9..00000000000
--- a/v3/internal/commands/build.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package commands
-
-import (
- "os"
-
- "github.com/pterm/pterm"
-
- "github.com/wailsapp/wails/v3/internal/flags"
-)
-
-func Build(_ *flags.Build) error {
- pterm.Info.Println("`wails build` is an alias for `wails task build`. Use `wails task` for much better control over your builds.")
- os.Args = []string{"wails", "task", "build"}
- return RunTask(&RunTaskOptions{}, []string{})
-}
diff --git a/v3/internal/commands/defaults.go b/v3/internal/commands/defaults.go
deleted file mode 100644
index 0d7b6d0db3c..00000000000
--- a/v3/internal/commands/defaults.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package commands
-
-import (
- _ "embed"
- "os"
-)
-
-//go:embed defaults/info.json
-var Info []byte
-
-//go:embed defaults/wails.exe.manifest
-var Manifest []byte
-
-//go:embed defaults/appicon.png
-var AppIcon []byte
-
-//go:embed defaults/icons.ico
-var IconsIco []byte
-
-//go:embed defaults/Info.plist
-var InfoPlist []byte
-
-//go:embed defaults/Info.dev.plist
-var InfoDevPlist []byte
-
-//go:embed defaults/icons.icns
-var IconsIcns []byte
-
-var AllAssets = map[string][]byte{
- "info.json": Info,
- "wails.exe.manifest": Manifest,
- "appicon.png": AppIcon,
- "icons.ico": IconsIco,
- "Info.plist": InfoPlist,
- "Info.dev.plist": InfoDevPlist,
- "icons.icns": IconsIcns,
-}
-
-type DefaultsOptions struct {
- Dir string `description:"The directory to generate the files into"`
-}
-
-func Defaults(options *DefaultsOptions) error {
- dir := options.Dir
- if dir == "" {
- dir = "."
- }
- for filename, data := range AllAssets {
- // If file exists, skip it
- if _, err := os.Stat(dir + "/" + filename); err == nil {
- println("Skipping " + filename)
- continue
- }
- err := os.WriteFile(dir+"/"+filename, data, 0644)
- if err != nil {
- return err
- }
- println("Generated " + filename)
- }
- return nil
-}
diff --git a/v3/internal/commands/defaults/Info.dev.plist b/v3/internal/commands/defaults/Info.dev.plist
deleted file mode 100644
index 28c8c4828e8..00000000000
--- a/v3/internal/commands/defaults/Info.dev.plist
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- {{.Info.ProductName}}
- CFBundleExecutable
- {{.Name}}
- CFBundleIdentifier
- com.wails.{{.Name}}
- CFBundleVersion
- {{.Info.ProductVersion}}
- CFBundleGetInfoString
- {{.Info.Comments}}
- CFBundleShortVersionString
- {{.Info.ProductVersion}}
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- {{.Info.Copyright}}
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/commands/defaults/Info.plist b/v3/internal/commands/defaults/Info.plist
deleted file mode 100644
index 24490f5c86c..00000000000
--- a/v3/internal/commands/defaults/Info.plist
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Productname
- CFBundleExecutable
- {{.Name}}
- CFBundleIdentifier
- com.wails.{{.Name}}
- CFBundleVersion
- {{.Info.ProductVersion}}
- CFBundleGetInfoString
- {{.Info.Comments}}
- CFBundleShortVersionString
- {{.Info.ProductVersion}}
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- {{.Info.Copyright}}
-
-
\ No newline at end of file
diff --git a/v3/internal/commands/defaults/appicon.png b/v3/internal/commands/defaults/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/commands/defaults/appicon.png and /dev/null differ
diff --git a/v3/internal/commands/defaults/icon.ico b/v3/internal/commands/defaults/icon.ico
deleted file mode 100644
index bfa0690b7f8..00000000000
Binary files a/v3/internal/commands/defaults/icon.ico and /dev/null differ
diff --git a/v3/internal/commands/defaults/icons.icns b/v3/internal/commands/defaults/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/commands/defaults/icons.icns and /dev/null differ
diff --git a/v3/internal/commands/defaults/icons.ico b/v3/internal/commands/defaults/icons.ico
deleted file mode 100644
index f33479841c6..00000000000
Binary files a/v3/internal/commands/defaults/icons.ico and /dev/null differ
diff --git a/v3/internal/commands/defaults/info.json b/v3/internal/commands/defaults/info.json
deleted file mode 100644
index 1005eb5cb85..00000000000
--- a/v3/internal/commands/defaults/info.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "fixed": {
- "file_version": "v1.0.0"
- },
- "info": {
- "0000": {
- "ProductVersion": "v1.0.0",
- "CompanyName": "My Company Name",
- "FileDescription": "A thing that does a thing",
- "LegalCopyright": "(c) 2023 My Company Name",
- "ProductName": "My Product Name",
- "Comments": "This is a comment"
- }
- }
-}
\ No newline at end of file
diff --git a/v3/internal/commands/defaults/wails.exe.manifest b/v3/internal/commands/defaults/wails.exe.manifest
deleted file mode 100644
index fb1ce5bde73..00000000000
--- a/v3/internal/commands/defaults/wails.exe.manifest
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- true/pm
- permonitorv2,permonitor
-
-
-
\ No newline at end of file
diff --git a/v3/internal/commands/icons.go b/v3/internal/commands/icons.go
deleted file mode 100644
index 4eee8734f49..00000000000
--- a/v3/internal/commands/icons.go
+++ /dev/null
@@ -1,126 +0,0 @@
-package commands
-
-import (
- "bytes"
- "fmt"
- "image"
- "os"
- "strconv"
- "strings"
-
- "github.com/jackmordaunt/icns/v2"
- "github.com/leaanthony/winicon"
-)
-
-type IconsOptions struct {
- Example bool `description:"Generate example icon file (appicon.png) in the current directory"`
- Input string `description:"The input image file"`
- Sizes string `description:"The sizes to generate in .ico file (comma separated)" default:"256,128,64,48,32,16"`
- WindowsFilename string `description:"The output filename for the Windows icon" default:"icon.ico"`
- MacFilename string `description:"The output filename for the Mac icon bundle" default:"icons.icns"`
-}
-
-func GenerateIcons(options *IconsOptions) error {
-
- if options.Example {
- return generateExampleIcon()
- }
-
- if options.Input == "" {
- return fmt.Errorf("input is required")
- }
-
- if options.WindowsFilename == "" && options.MacFilename == "" {
- return fmt.Errorf("at least one output filename is required")
- }
-
- // Parse sizes
- var sizes = []int{256, 128, 64, 48, 32, 16}
- var err error
- if options.Sizes != "" {
- sizes, err = parseSizes(options.Sizes)
- if err != nil {
- return err
- }
- }
- iconData, err := os.ReadFile(options.Input)
- if err != nil {
- return err
- }
-
- if options.WindowsFilename != "" {
- err := generateWindowsIcon(iconData, sizes, options)
- if err != nil {
- return err
- }
- }
-
- if options.MacFilename != "" {
- err := generateMacIcon(iconData, options)
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func generateExampleIcon() error {
- return os.WriteFile("appicon.png", []byte(AppIcon), 0644)
-}
-
-func parseSizes(sizes string) ([]int, error) {
- // split the input string by comma and confirm that each one is an integer
- parsedSizes := strings.Split(sizes, ",")
- var result []int
- for _, size := range parsedSizes {
- s, err := strconv.Atoi(size)
- if err != nil {
- return nil, err
- }
- if s == 0 {
- continue
- }
- result = append(result, s)
- }
-
- // put all integers in a slice and return
- return result, nil
-}
-
-func generateMacIcon(iconData []byte, options *IconsOptions) error {
-
- srcImg, _, err := image.Decode(bytes.NewBuffer(iconData))
- if err != nil {
- return err
- }
-
- dest, err := os.Create(options.MacFilename)
- if err != nil {
- return err
-
- }
- defer func() {
- err = dest.Close()
- if err == nil {
- return
- }
- }()
- return icns.Encode(dest, srcImg)
-}
-
-func generateWindowsIcon(iconData []byte, sizes []int, options *IconsOptions) error {
-
- var output bytes.Buffer
-
- err := winicon.GenerateIcon(bytes.NewBuffer(iconData), &output, sizes)
- if err != nil {
- return err
- }
-
- err = os.WriteFile(options.WindowsFilename, output.Bytes(), 0644)
- if err != nil {
- return err
- }
- return nil
-}
diff --git a/v3/internal/commands/icons_test.go b/v3/internal/commands/icons_test.go
deleted file mode 100644
index a41e1bd6cc0..00000000000
--- a/v3/internal/commands/icons_test.go
+++ /dev/null
@@ -1,285 +0,0 @@
-package commands
-
-import (
- "fmt"
- "os"
- "path/filepath"
- "runtime"
- "testing"
-)
-
-func TestGenerateIcon(t *testing.T) {
- tests := []struct {
- name string
- setup func() *IconsOptions
- wantErr bool
- test func() error
- }{
- {
- name: "should generate an icon when using the `example` flag",
- setup: func() *IconsOptions {
- return &IconsOptions{
- Example: true,
- }
- },
- wantErr: false,
- test: func() error {
- // the file `appicon.png` should be created in the current directory
- // check for the existence of the file
- f, err := os.Stat("appicon.png")
- if err != nil {
- return err
- }
- defer func() {
- err := os.Remove("appicon.png")
- if err != nil {
- panic(err)
- }
- }()
- if f.IsDir() {
- return fmt.Errorf("appicon.png is a directory")
- }
- if f.Size() == 0 {
- return fmt.Errorf("appicon.png is empty")
- }
- return nil
- },
- },
- {
- name: "should generate a .ico file when using the `input` flag and `windowsfilena me` flag",
- setup: func() *IconsOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
- return &IconsOptions{
- Input: exampleIcon,
- WindowsFilename: "appicon.ico",
- }
- },
- wantErr: false,
- test: func() error {
- // the file `appicon.ico` should be created in the current directory
- // check for the existence of the file
- f, err := os.Stat("appicon.ico")
- if err != nil {
- return err
- }
- defer func() {
- // Remove the file
- err = os.Remove("appicon.ico")
- if err != nil {
- return
- }
- }()
- if f.IsDir() {
- return fmt.Errorf("appicon.ico is a directory")
- }
- if f.Size() == 0 {
- return fmt.Errorf("appicon.ico is empty")
- }
- // Remove the file
- err = os.Remove("appicon.ico")
- if err != nil {
- return err
- }
- return nil
- },
- },
- {
- name: "should generate a .icns file when using the `input` flag and `macfilename` flag",
- setup: func() *IconsOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
- return &IconsOptions{
- Input: exampleIcon,
- MacFilename: "appicon.icns",
- }
- },
- wantErr: false,
- test: func() error {
- // the file `appicon.icns` should be created in the current directory
- // check for the existence of the file
- f, err := os.Stat("appicon.icns")
- if err != nil {
- return err
- }
- defer func() {
- // Remove the file
- err = os.Remove("appicon.icns")
- if err != nil {
- panic(err)
- }
- }()
- if f.IsDir() {
- return fmt.Errorf("appicon.icns is a directory")
- }
- if f.Size() == 0 {
- return fmt.Errorf("appicon.icns is empty")
- }
- // Remove the file
-
- return nil
- },
- },
- {
- name: "should generate a small .ico file when using the `input` flag and `sizes` flag",
- setup: func() *IconsOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
- return &IconsOptions{
- Input: exampleIcon,
- Sizes: "16",
- WindowsFilename: "appicon.ico",
- }
- },
- wantErr: false,
- test: func() error {
- // the file `appicon.ico` should be created in the current directory
- // check for the existence of the file
- f, err := os.Stat("appicon.ico")
- if err != nil {
- return err
- }
- defer func() {
- err := os.Remove("appicon.ico")
- if err != nil {
- panic(err)
- }
- }()
- // The size of the file should be 571 bytes
- if f.Size() != 571 {
- return fmt.Errorf("appicon.ico is not the correct size. Got %d", f.Size())
- }
- if f.IsDir() {
- return fmt.Errorf("appicon.ico is a directory")
- }
- if f.Size() == 0 {
- return fmt.Errorf("appicon.ico is empty")
- }
- return nil
- },
- },
- {
- name: "should error if no input file is provided",
- setup: func() *IconsOptions {
- return &IconsOptions{}
- },
- wantErr: true,
- },
- {
- name: "should error if neither mac or windows filename is provided",
- setup: func() *IconsOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
- return &IconsOptions{
- Input: exampleIcon,
- }
- },
- wantErr: true,
- },
- {
- name: "should error if bad sizes provided",
- setup: func() *IconsOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
- return &IconsOptions{
- Input: exampleIcon,
- WindowsFilename: "appicon.ico",
- Sizes: "bad",
- }
- },
- wantErr: true,
- },
- {
- name: "should ignore 0 size",
- setup: func() *IconsOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "appicon.png")
- return &IconsOptions{
- Input: exampleIcon,
- WindowsFilename: "appicon.ico",
- Sizes: "0,16",
- }
- },
- wantErr: false,
- test: func() error {
- // Test the file exists and has 571 bytes
- f, err := os.Stat("appicon.ico")
- if err != nil {
- return err
- }
- defer func() {
- err := os.Remove("appicon.ico")
- if err != nil {
- panic(err)
- }
- }()
- if f.Size() != 571 {
- return fmt.Errorf("appicon.ico is not the correct size. Got %d", f.Size())
- }
- if f.IsDir() {
- return fmt.Errorf("appicon.ico is a directory")
- }
- if f.Size() == 0 {
- return fmt.Errorf("appicon.ico is empty")
- }
- return nil
- },
- },
- {
- name: "should error if the input file does not exist",
- setup: func() *IconsOptions {
- return &IconsOptions{
- Input: "doesnotexist.png",
- WindowsFilename: "appicon.ico",
- }
- },
- wantErr: true,
- },
- {
- name: "should error if the input file is not a png",
- setup: func() *IconsOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- return &IconsOptions{
- Input: thisFile,
- WindowsFilename: "appicon.ico",
- }
- },
- wantErr: true,
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- options := tt.setup()
- err := GenerateIcons(options)
- if (err != nil) != tt.wantErr {
- t.Errorf("GenerateIcon() error = %v, wantErr %v", err, tt.wantErr)
- return
- }
- if tt.test != nil {
- if err := tt.test(); err != nil {
- t.Errorf("GenerateIcon() test error = %v", err)
- }
- }
- })
- }
-}
diff --git a/v3/internal/commands/init.go b/v3/internal/commands/init.go
deleted file mode 100644
index 651d4a00839..00000000000
--- a/v3/internal/commands/init.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package commands
-
-import (
- "fmt"
- "github.com/wailsapp/wails/v3/internal/flags"
- "github.com/wailsapp/wails/v3/internal/templates"
-
- "github.com/pterm/pterm"
-)
-
-func Init(options *flags.Init) error {
- if options.List {
- return printTemplates()
- }
-
- if options.Quiet {
- pterm.DisableOutput()
- }
-
- if options.ProjectName == "" {
- return fmt.Errorf("please use the -n flag to specify a project name")
- }
-
- if !templates.ValidTemplateName(options.TemplateName) {
- return fmt.Errorf("invalid template name: %s. Use -l flag to view available templates", options.TemplateName)
- }
-
- return templates.Install(options)
-}
-
-func printTemplates() error {
- defaultTemplates := templates.GetDefaultTemplates()
-
- pterm.DefaultSection.Println("Available templates")
-
- table := pterm.TableData{{"Name", "Description"}}
- for _, template := range defaultTemplates {
- table = append(table, []string{template.Name, template.Description})
- }
- err := pterm.DefaultTable.WithHasHeader(true).WithBoxed(true).WithData(table).Render()
- pterm.Println()
- return err
-}
diff --git a/v3/internal/commands/plugins.go b/v3/internal/commands/plugins.go
deleted file mode 100644
index a42790ab388..00000000000
--- a/v3/internal/commands/plugins.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package commands
-
-import (
- "github.com/wailsapp/wails/v3/internal/flags"
- "github.com/wailsapp/wails/v3/internal/plugins"
- "strings"
-
- "github.com/pterm/pterm"
-)
-
-func toCamelCasePlugin(s string) string {
- var camelCase string
- var capitalize = true
-
- for _, c := range s {
- if c >= 'a' && c <= 'z' || c >= '0' && c <= '9' {
- if capitalize {
- camelCase += strings.ToUpper(string(c))
- capitalize = false
- } else {
- camelCase += string(c)
- }
- } else if c >= 'A' && c <= 'Z' {
- camelCase += string(c)
- capitalize = false
- } else {
- capitalize = true
- }
- }
-
- return camelCase + "Plugin"
-}
-
-func PluginInit(options *flags.PluginInit) error {
-
- if options.Quiet {
- pterm.DisableOutput()
- }
-
- if options.PackageName == "" {
- options.PackageName = toCamelCasePlugin(options.Name)
- }
-
- return plugins.Install(options)
-}
diff --git a/v3/internal/commands/syso.go b/v3/internal/commands/syso.go
deleted file mode 100644
index 70821789f33..00000000000
--- a/v3/internal/commands/syso.go
+++ /dev/null
@@ -1,123 +0,0 @@
-package commands
-
-import (
- "fmt"
- "os"
- "runtime"
-
- "github.com/tc-hib/winres"
- "github.com/tc-hib/winres/version"
-)
-
-type SysoOptions struct {
- Example bool `description:"Generate example manifest & info files"`
- Manifest string `description:"The manifest file"`
- Info string `description:"The info.json file"`
- Icon string `description:"The icon file"`
- Out string `description:"The output filename for the syso file"`
- Arch string `description:"The target architecture"`
-}
-
-func (i *SysoOptions) Default() *SysoOptions {
- return &SysoOptions{
- Arch: runtime.GOARCH,
- }
-}
-
-func GenerateSyso(options *SysoOptions) error {
-
- // Generate example files?
- if options.Example {
- return generateExampleSyso()
- }
-
- if options.Manifest == "" {
- return fmt.Errorf("manifest is required")
- }
- if options.Icon == "" {
- return fmt.Errorf("icon is required")
- }
-
- rs := winres.ResourceSet{}
-
- // Process Icon
- iconFile, err := os.Open(options.Icon)
- if err != nil {
- return err
- }
- defer iconFile.Close()
- ico, err := winres.LoadICO(iconFile)
- if err != nil {
- return fmt.Errorf("couldn't load icon '%s': %v", options.Icon, err)
- }
- err = rs.SetIcon(winres.RT_ICON, ico)
- if err != nil {
- return err
- }
-
- // Process Manifest
- manifestData, err := os.ReadFile(options.Manifest)
- if err != nil {
- return err
- }
-
- xmlData, err := winres.AppManifestFromXML(manifestData)
- if err != nil {
- return err
- }
- rs.SetManifest(xmlData)
-
- if options.Info != "" {
- infoData, err := os.ReadFile(options.Info)
- if err != nil {
- return err
- }
- if len(infoData) != 0 {
- var v version.Info
- if err := v.UnmarshalJSON(infoData); err != nil {
- return err
- }
- rs.SetVersionInfo(v)
- }
- }
-
- targetFile := options.Out
- if targetFile == "" {
- targetFile = "rsrc_windows_" + options.Arch + ".syso"
- }
- fout, err := os.Create(targetFile)
- if err != nil {
- return err
- }
- defer fout.Close()
-
- archs := map[string]winres.Arch{
- "amd64": winres.ArchAMD64,
- "arm64": winres.ArchARM64,
- "386": winres.ArchI386,
- }
- targetArch, supported := archs[options.Arch]
- if !supported {
- return fmt.Errorf("arch '%s' not supported", options.Arch)
- }
-
- err = rs.WriteObject(fout, targetArch)
- if err != nil {
- return err
- }
- return nil
-}
-
-func generateExampleSyso() error {
- // Generate example info.json
- err := os.WriteFile("info.json", Info, 0644)
- if err != nil {
- return err
- }
- // Generate example manifest
- err = os.WriteFile("wails.exe.manifest", Manifest, 0644)
- if err != nil {
- return err
- }
- return nil
-}
diff --git a/v3/internal/commands/syso_test.go b/v3/internal/commands/syso_test.go
deleted file mode 100644
index a1e18e3dc05..00000000000
--- a/v3/internal/commands/syso_test.go
+++ /dev/null
@@ -1,189 +0,0 @@
-package commands
-
-import (
- "fmt"
- "os"
- "path/filepath"
- "runtime"
- "testing"
-)
-
-func TestGenerateSyso(t *testing.T) {
- tests := []struct {
- name string
- setup func() *SysoOptions
- wantErr bool
- test func() error
- }{
- {
- name: "should generate example info and manifest files when using the `example` flag",
- setup: func() *SysoOptions {
- return &SysoOptions{
- Example: true,
- }
- },
- wantErr: false,
- test: func() error {
- // the file `info.json` should be created in the current directory
- // check for the existence of the file
- f, err := os.Stat("info.json")
- if err != nil {
- return err
- }
- m, err := os.Stat("wails.exe.manifest")
- if err != nil {
- return err
- }
- defer func() {
- err := os.Remove("info.json")
- err2 := os.Remove("wails.exe.manifest")
- if err != nil {
- panic(err)
- }
- if err2 != nil {
- panic(err2)
- }
- }()
- if f.IsDir() {
- return fmt.Errorf("info.json is a directory")
- }
- if f.Size() == 0 {
- return fmt.Errorf("info.json is empty")
- }
- if m.IsDir() {
- return fmt.Errorf("wails.exe.manifest is a directory")
- }
- if m.Size() == 0 {
- return fmt.Errorf("wails.exe.manifest is empty")
- }
- return nil
- },
- },
- {
- name: "should error if manifest filename is not provided",
- setup: func() *SysoOptions {
- return &SysoOptions{
- Manifest: "",
- }
- },
- wantErr: true,
- },
- {
- name: "should error if icon filename is not provided",
- setup: func() *SysoOptions {
- return &SysoOptions{
- Manifest: "test.manifest",
- Icon: "",
- }
- },
- wantErr: true,
- },
- {
- name: "should error if icon filename does not exist",
- setup: func() *SysoOptions {
- return &SysoOptions{
- Manifest: "test.manifest",
- Icon: "icon.ico",
- }
- },
- wantErr: true,
- },
- {
- name: "should error if icon is wrong format",
- setup: func() *SysoOptions {
- _, thisFile, _, _ := runtime.Caller(1)
- return &SysoOptions{
- Manifest: "test.manifest",
- Icon: thisFile,
- }
- },
- wantErr: true,
- },
- {
- name: "should error if manifest filename does not exist",
- setup: func() *SysoOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "icon.ico")
- return &SysoOptions{
- Manifest: "test.manifest",
- Icon: exampleIcon,
- }
- },
- wantErr: true,
- },
- {
- name: "should error if manifest is wrong format",
- setup: func() *SysoOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "icon.ico")
- return &SysoOptions{
- Manifest: exampleIcon,
- Icon: exampleIcon,
- }
- },
- wantErr: true,
- },
- {
- name: "should error if info file does not exist",
- setup: func() *SysoOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "icon.ico")
- // Get the path to the example manifest
- exampleManifest := filepath.Join(localDir, "examples", "wails.exe.manifest")
- return &SysoOptions{
- Manifest: exampleManifest,
- Icon: exampleIcon,
- Info: "doesnotexist.json",
- }
- },
- wantErr: true,
- },
- {
- name: "should error if info file is wrong format",
- setup: func() *SysoOptions {
- // Get the directory of this file
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
- // Get the path to the example icon
- exampleIcon := filepath.Join(localDir, "examples", "icon.ico")
- // Get the path to the example manifest
- exampleManifest := filepath.Join(localDir, "examples", "wails.exe.manifest")
- return &SysoOptions{
- Manifest: exampleManifest,
- Icon: exampleIcon,
- Info: thisFile,
- }
- },
- wantErr: true,
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- options := tt.setup()
- err := GenerateSyso(options)
- if (err != nil) != tt.wantErr {
- t.Errorf("GenerateSyso() error = %v, wantErr %v", err, tt.wantErr)
- return
- }
- if (err != nil) && tt.wantErr {
- println(err.Error())
- return
- }
- if tt.test != nil {
- if err := tt.test(); err != nil {
- t.Errorf("GenerateSyso() test error = %v", err)
- }
- }
- })
- }
-}
diff --git a/v3/internal/commands/task.go b/v3/internal/commands/task.go
deleted file mode 100644
index c80d677e6c1..00000000000
--- a/v3/internal/commands/task.go
+++ /dev/null
@@ -1,175 +0,0 @@
-package commands
-
-import (
- "context"
- "fmt"
- "log"
- "os"
- "path/filepath"
- "strings"
- "time"
-
- "github.com/pterm/pterm"
-
- "github.com/go-task/task/v3/args"
-
- "github.com/go-task/task/v3"
- "github.com/go-task/task/v3/taskfile"
-)
-
-type RunTaskOptions struct {
- Name string `pos:"1"`
- Help bool `name:"h" description:"shows Task usage"`
- Init bool `name:"i" description:"creates a new Taskfile.yml"`
- List bool `name:"list" description:"tasks with description of current Taskfile"`
- ListAll bool `name:"list-all" description:"lists tasks with or without a description"`
- ListJSON bool `name:"json" description:"formats task list as json"`
- Status bool `name:"status" description:"exits with non-zero exit code if any of the given tasks is not up-to-date"`
- Force bool `name:"f" description:"forces execution even when the task is up-to-date"`
- Watch bool `name:"w" description:"enables watch of the given task"`
- Verbose bool `name:"v" description:"enables verbose mode"`
- Silent bool `name:"s" description:"disables echoing"`
- Parallel bool `name:"p" description:"executes tasks provided on command line in parallel"`
- Dry bool `name:"dry" description:"compiles and prints tasks in the order that they would be run, without executing them"`
- Summary bool `name:"summary" description:"show summary about a task"`
- ExitCode bool `name:"x" description:"pass-through the exit code of the task command"`
- Dir string `name:"dir" description:"sets directory of execution"`
- EntryPoint string `name:"taskfile" description:"choose which Taskfile to run."`
- OutputName string `name:"output" description:"sets output style: [interleaved|group|prefixed]"`
- OutputGroupBegin string `name:"output-group-begin" description:"message template to print before a task's grouped output"`
- OutputGroupEnd string `name:"output-group-end" description:"message template to print after a task's grouped output"`
- Color bool `name:"c" description:"colored output. Enabled by default. Set flag to false or use NO_COLOR=1 to disable" default:"true"`
- Concurrency int `name:"C" description:"limit number tasks to run concurrently"`
- Interval int64 `name:"interval" description:"interval to watch for changes"`
-}
-
-func RunTask(options *RunTaskOptions, otherArgs []string) error {
-
- if options.Init {
- wd, err := os.Getwd()
- if err != nil {
- return err
- }
- return task.InitTaskfile(os.Stdout, wd)
- }
-
- if options.Dir != "" && options.EntryPoint != "" {
- return fmt.Errorf("task: You can't set both --dir and --taskfile")
- }
-
- if options.EntryPoint != "" {
- options.Dir = filepath.Dir(options.EntryPoint)
- options.EntryPoint = filepath.Base(options.EntryPoint)
- }
-
- if options.OutputName != "group" {
- if options.OutputGroupBegin != "" {
- return fmt.Errorf("task: You can't set --output-group-begin without --output=group")
- }
- if options.OutputGroupBegin != "" {
- return fmt.Errorf("task: You can't set --output-group-end without --output=group")
- }
- }
-
- e := task.Executor{
- Force: options.Force,
- Watch: options.Watch,
- Verbose: options.Verbose,
- Silent: options.Silent,
- Dir: options.Dir,
- Dry: options.Dry,
- Entrypoint: options.EntryPoint,
- Summary: options.Summary,
- Parallel: options.Parallel,
- Color: options.Color,
- Concurrency: options.Concurrency,
- Interval: time.Duration(options.Interval) * time.Second,
-
- Stdin: os.Stdin,
- Stdout: os.Stdout,
- Stderr: os.Stderr,
-
- OutputStyle: taskfile.Output{
- Name: options.OutputName,
- Group: taskfile.OutputGroup{
- Begin: options.OutputGroupBegin,
- End: options.OutputGroupEnd,
- },
- },
- }
-
- var listOptions = task.NewListOptions(options.List, options.ListAll, options.ListJSON)
- if err := listOptions.Validate(); err != nil {
- log.Fatal(err)
- }
-
- if (listOptions.ShouldListTasks()) && options.Silent {
- e.ListTaskNames(options.ListAll)
- return nil
- }
-
- if err := e.Setup(); err != nil {
- log.Fatal(err)
- }
- v, err := e.Taskfile.ParsedVersion()
- if err != nil {
- return err
- }
-
- if listOptions.ShouldListTasks() {
- if foundTasks, err := e.ListTasks(listOptions); !foundTasks || err != nil {
- os.Exit(1)
- }
- return nil
- }
-
- var (
- calls []taskfile.Call
- globals *taskfile.Vars
- )
-
- var taskAndVars []string
- for _, taskAndVar := range os.Args[2:] {
- if taskAndVar == "--" {
- break
- }
- taskAndVars = append(taskAndVars, taskAndVar)
- }
-
- if len(taskAndVars) > 0 && len(otherArgs) > 0 {
- if taskAndVars[0] == otherArgs[0] {
- otherArgs = otherArgs[1:]
- }
- }
-
- if v >= 3.0 {
- calls, globals = args.ParseV3(taskAndVars...)
- } else {
- calls, globals = args.ParseV2(taskAndVars...)
- }
-
- globals.Set("CLI_ARGS", taskfile.Var{Static: strings.Join(otherArgs, " ")})
- e.Taskfile.Vars.Merge(globals)
-
- if !options.Watch {
- e.InterceptInterruptSignals()
- }
-
- ctx := context.Background()
-
- if options.Status {
- return e.Status(ctx, calls...)
- }
-
- if err := e.Run(ctx, calls...); err != nil {
- pterm.Error.Println(err.Error())
-
- if options.ExitCode {
- if err, ok := err.(*task.TaskRunError); ok {
- os.Exit(err.ExitCode())
- }
- }
- os.Exit(1)
- }
- return nil
-}
diff --git a/v3/internal/commands/task_test.go b/v3/internal/commands/task_test.go
deleted file mode 100644
index a8830427204..00000000000
--- a/v3/internal/commands/task_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package commands
-
-import "testing"
-
-func TestBuild(t *testing.T) {
- type args struct {
- options *RunTaskOptions
- otherArgs []string
- }
- tests := []struct {
- name string
- args args
- wantErr bool
- }{
- {
- name: "should error if task name not provided",
- args: args{
- options: &RunTaskOptions{},
- },
- wantErr: true,
- },
- {
- name: "should work if task name provided",
- args: args{
- options: &RunTaskOptions{
- Name: "build",
- },
- },
- wantErr: true,
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if err := RunTask(tt.args.options, tt.args.otherArgs); (err != nil) != tt.wantErr {
- t.Errorf("Run() error = %v, wantErr %v", err, tt.wantErr)
- }
- })
- }
-}
diff --git a/v3/internal/debug/debug.go b/v3/internal/debug/debug.go
deleted file mode 100644
index 47db8b62685..00000000000
--- a/v3/internal/debug/debug.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package debug
-
-import (
- "github.com/samber/lo"
- "path/filepath"
- "runtime"
-)
-
-import "runtime/debug"
-
-// Why go doesn't provide this as a map already is beyond me.
-var buildSettings = map[string]string{}
-var LocalModulePath = ""
-
-func init() {
- buildInfo, ok := debug.ReadBuildInfo()
- if !ok {
- return
- }
- buildSettings = lo.Associate(buildInfo.Settings, func(setting debug.BuildSetting) (string, string) {
- return setting.Key, setting.Value
- })
- if isLocalBuild() {
- modulePath := RelativePath("..", "..", "..")
- LocalModulePath, _ = filepath.Abs(modulePath)
- }
-}
-
-func isLocalBuild() bool {
- return buildSettings["vcs.modified"] == "true"
-}
-
-// RelativePath returns a qualified path created by joining the
-// directory of the calling file and the given relative path.
-//
-// Example: RelativePath("..") in *this* file would give you '/path/to/wails2/v2/internal`
-func RelativePath(relativepath string, optionalpaths ...string) string {
- _, thisFile, _, _ := runtime.Caller(1)
- localDir := filepath.Dir(thisFile)
-
- // If we have optional paths, join them to the relativepath
- if len(optionalpaths) > 0 {
- paths := []string{relativepath}
- paths = append(paths, optionalpaths...)
- relativepath = filepath.Join(paths...)
- }
- result, err := filepath.Abs(filepath.Join(localDir, relativepath))
- if err != nil {
- // I'm allowing this for 1 reason only: It's fatal if the path
- // supplied is wrong as it's only used internally in Wails. If we get
- // that path wrong, we should know about it immediately. The other reason is
- // that it cuts down a ton of unnecassary error handling.
- panic(err)
- }
- return result
-}
diff --git a/v3/internal/flags/build.go b/v3/internal/flags/build.go
deleted file mode 100644
index 260c6067d60..00000000000
--- a/v3/internal/flags/build.go
+++ /dev/null
@@ -1,5 +0,0 @@
-package flags
-
-type Build struct {
- Common
-}
diff --git a/v3/internal/flags/common.go b/v3/internal/flags/common.go
deleted file mode 100644
index e58eff41192..00000000000
--- a/v3/internal/flags/common.go
+++ /dev/null
@@ -1,5 +0,0 @@
-package flags
-
-type Common struct {
- NoColour bool `description:"Disable colour in output"`
-}
diff --git a/v3/internal/flags/init.go b/v3/internal/flags/init.go
deleted file mode 100644
index 182d9818453..00000000000
--- a/v3/internal/flags/init.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package flags
-
-type Init struct {
- Common
-
- PackageName string `name:"p" description:"Package name" default:"main"`
- TemplateName string `name:"t" description:"Name of built-in template to use, path to template or template url" default:"vanilla"`
- ProjectName string `name:"n" description:"Name of project" default:""`
- ProjectDir string `name:"d" description:"Project directory" default:"."`
- Quiet bool `name:"q" description:"Suppress output to console"`
- List bool `name:"l" description:"List templates"`
-}
diff --git a/v3/internal/flags/plugin.go b/v3/internal/flags/plugin.go
deleted file mode 100644
index 62c0dd968ad..00000000000
--- a/v3/internal/flags/plugin.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package flags
-
-type PluginInit struct {
- Name string `name:"n" description:"Name of plugin" default:"example_plugin"`
- Description string `name:"d" description:"Description of plugin" default:"Example plugin"`
- PackageName string `name:"p" description:"Package name for plugin" default:""`
- OutputDir string `name:"o" description:"Output directory" default:"."`
- Quiet bool `name:"q" description:"Suppress output to console"`
-}
diff --git a/v3/internal/parser/README.md b/v3/internal/parser/README.md
deleted file mode 100644
index fc6a1c700b4..00000000000
--- a/v3/internal/parser/README.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# Parser
-
-This package contains the static analyser used for parsing Wails projects so that we may:
-
-- Generate the bindings for the frontend
-- Generate Typescript definitions for the structs used by the bindings
-
-## Implemented
-
-- [ ] Bound types
- - [x] Struct Literal Pointer
- - [ ] Variable
- - [ ] Assignment
- - [x] Struct Literal Pointer
- - [ ] Function
- - [ ] Same package
- - [ ] Different package
- - [ ] Function
-
-- [x] Parsing of bound methods
- - [x] Method names
- - [x] Method parameters
- - [x] Zero parameters
- - [x] Single input parameter
- - [x] Single output parameter
- - [x] Multiple input parameters
- - [x] Multiple output parameters
- - [x] Named output parameters
- - [x] int/8/16/32/64
- - [x] Pointer
- - [x] uint/8/16/32/64
- - [x] Pointer
- - [x] float
- - [x] Pointer
- - [x] string
- - [x] Pointer
- - [x] bool
- - [x] Pointer
- - [x] Struct
- - [x] Pointer
- - [x] Slices
- - [x] Pointer
- - [x] Maps
- - [x] Pointer
-- [x] Model Parsing
- - [x] In same package
- - [x] In different package
- - [x] Multiple named fields, e.g. one,two,three string
- - [x] Scalars
- - [x] Arrays
- - [x] Maps
- - [x] Structs
- - [x] Recursive
- - [x] Anonymous
-- [ ] Generation of models
- - [x] Scalars
- - [ ] Arrays
- - [ ] Maps
- - [x] Structs
-- [ ] Generation of bindings
-
-## Limitations
-
-There are many ways to write a Go program so there are many program structures that we would need to support. This is a work in progress and will be improved over time. The current limitations are:
-
-- The call to `application.New()` must be in the `main` package
-- Bound structs must be declared as struct literals
-
diff --git a/v3/internal/parser/bindings.go b/v3/internal/parser/bindings.go
deleted file mode 100644
index a5562648a77..00000000000
--- a/v3/internal/parser/bindings.go
+++ /dev/null
@@ -1,285 +0,0 @@
-package parser
-
-import (
- "sort"
- "strconv"
- "strings"
-
- "github.com/samber/lo"
-)
-
-const header = `// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-`
-
-const helperTemplate = `function {{structName}}(method) {
- return {
- packageName: "{{packageName}}",
- serviceName: "{{structName}}",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-`
-
-func GenerateHelper(packageName, structName string) string {
- result := strings.ReplaceAll(helperTemplate, "{{packageName}}", packageName)
- result = strings.ReplaceAll(result, "{{structName}}", structName)
- return result
-}
-
-const bindingTemplate = `
-/**
- * {{structName}}.{{methodName}}
- * Comments
- * @param name {string}
- * @returns {Promise}
- **/
-function {{methodName}}({{inputs}}) {
- return wails.Call({{structName}}("{{methodName}}"{{args}}));
-}
-`
-
-var reservedWords = []string{
- "abstract",
- "arguments",
- "await",
- "boolean",
- "break",
- "byte",
- "case",
- "catch",
- "char",
- "class",
- "const",
- "continue",
- "debugger",
- "default",
- "delete",
- "do",
- "double",
- "else",
- "enum",
- "eval",
- "export",
- "extends",
- "false",
- "final",
- "finally",
- "float",
- "for",
- "function",
- "goto",
- "if",
- "implements",
- "import",
- "in",
- "instanceof",
- "int",
- "interface",
- "let",
- "long",
- "native",
- "new",
- "null",
- "package",
- "private",
- "protected",
- "public",
- "return",
- "short",
- "static",
- "super",
- "switch",
- "synchronized",
- "this",
- "throw",
- "throws",
- "transient",
- "true",
- "try",
- "typeof",
- "var",
- "void",
- "volatile",
- "while",
- "with",
- "yield",
- "object",
-}
-
-func sanitiseJSVarName(name string) string {
- // if the name is a reserved word, prefix with an
- // underscore
- if lo.Contains(reservedWords, name) {
- return "_" + name
- }
- return name
-}
-
-func GenerateBinding(structName string, method *BoundMethod) (string, []string) {
- var models []string
- result := strings.ReplaceAll(bindingTemplate, "{{structName}}", structName)
- result = strings.ReplaceAll(result, "{{methodName}}", method.Name)
- comments := strings.TrimSpace(method.DocComment)
- result = strings.ReplaceAll(result, "Comments", comments)
- var params string
- for _, input := range method.Inputs {
- pkgName := getPackageName(input)
- if pkgName != "" {
- models = append(models, pkgName)
- }
- params += " * @param " + sanitiseJSVarName(input.Name) + " {" + input.JSType() + "}\n"
- }
- params = strings.TrimSuffix(params, "\n")
- if len(params) == 0 {
- params = " *"
- }
- result = strings.ReplaceAll(result, " * @param name {string}", params)
- var inputs string
- for _, input := range method.Inputs {
- pkgName := getPackageName(input)
- if pkgName != "" {
- models = append(models, pkgName)
- }
- inputs += sanitiseJSVarName(input.Name) + ", "
- }
- inputs = strings.TrimSuffix(inputs, ", ")
- args := inputs
- if len(args) > 0 {
- args = ", " + args
- }
- result = strings.ReplaceAll(result, "{{inputs}}", inputs)
- result = strings.ReplaceAll(result, "{{args}}", args)
-
- // outputs
- var returns string
- if len(method.Outputs) == 0 {
- returns = " * @returns {Promise}"
- } else {
- returns = " * @returns {Promise<"
- for _, output := range method.Outputs {
- pkgName := getPackageName(output)
- if pkgName != "" {
- models = append(models, pkgName)
- }
- jsType := output.JSType()
- if jsType == "error" {
- jsType = "void"
- }
- returns += jsType + ", "
- }
- returns = strings.TrimSuffix(returns, ", ")
- returns += ">}"
- }
- result = strings.ReplaceAll(result, " * @returns {Promise}", returns)
-
- return result, lo.Uniq(models)
-}
-
-func getPackageName(input *Parameter) string {
- if !input.Type.IsStruct {
- return ""
- }
- result := input.Type.Package
- if result == "" {
- result = "main"
- }
- return result
-}
-
-func normalisePackageNames(packageNames []string) map[string]string {
- // We iterate over the package names and determine if any of them
- // have a forward slash. If this is the case, we assume that the
- // package name is the last element of the path. If this has already
- // been found, then we need to add a digit to the end of the package
- // name to make it unique. We return a map of the original package
- // name to the new package name.
- var result = make(map[string]string)
- var packagesConverted = make(map[string]struct{})
- var count = 1
- for _, packageName := range packageNames {
- var originalPackageName = packageName
- if strings.Contains(packageName, "/") {
- parts := strings.Split(packageName, "/")
- packageName = parts[len(parts)-1]
- }
- if _, ok := packagesConverted[packageName]; ok {
- // We've already seen this package name. Add a digit
- // to the end of the package name to make it unique
- count += 1
- packageName += strconv.Itoa(count)
-
- }
- packagesConverted[packageName] = struct{}{}
- result[originalPackageName] = packageName
- }
-
- return result
-}
-
-func GenerateBindings(bindings map[string]map[string][]*BoundMethod) map[string]string {
-
- var result = make(map[string]string)
-
- var normalisedPackageNames = normalisePackageNames(lo.Keys(bindings))
- // sort the bindings keys
- packageNames := lo.Keys(bindings)
- sort.Strings(packageNames)
- for _, packageName := range packageNames {
- var allModels []string
-
- packageBindings := bindings[packageName]
- structNames := lo.Keys(packageBindings)
- sort.Strings(structNames)
- for _, structName := range structNames {
- result[normalisedPackageNames[packageName]] += GenerateHelper(normalisedPackageNames[packageName], structName)
- methods := packageBindings[structName]
- sort.Slice(methods, func(i, j int) bool {
- return methods[i].Name < methods[j].Name
- })
- for _, method := range methods {
- thisBinding, models := GenerateBinding(structName, method)
- result[normalisedPackageNames[packageName]] += thisBinding
- allModels = append(allModels, models...)
- }
- }
-
- result[normalisedPackageNames[packageName]] += `
-window.go = window.go || {};
-`
- // Iterate over the sorted struct keys
- result[normalisedPackageNames[packageName]] += "window.go." + normalisedPackageNames[packageName] + " = {\n"
- for _, structName := range structNames {
- result[normalisedPackageNames[packageName]] += " " + structName + ": {\n"
- methods := packageBindings[structName]
- sort.Slice(methods, func(i, j int) bool {
- return methods[i].Name < methods[j].Name
- })
- for _, method := range methods {
- result[normalisedPackageNames[packageName]] += " " + method.Name + ",\n"
- }
- result[normalisedPackageNames[packageName]] += " },\n"
- }
- result[normalisedPackageNames[packageName]] += "};\n"
-
- // add imports
- if len(allModels) > 0 {
- allModels := lo.Uniq(allModels)
- var models []string
- for _, model := range allModels {
- models = append(models, normalisedPackageNames[model])
- }
- sort.Strings(models)
- result[normalisedPackageNames[packageName]] += "\n"
- imports := "import {" + strings.Join(models, ", ") + "} from './models';\n"
- result[normalisedPackageNames[packageName]] = imports + "\n" + result[normalisedPackageNames[packageName]]
- }
-
- result[normalisedPackageNames[packageName]] = header + result[normalisedPackageNames[packageName]]
- }
-
- return result
-}
diff --git a/v3/internal/parser/bindings_test.go b/v3/internal/parser/bindings_test.go
deleted file mode 100644
index f6f309b10bc..00000000000
--- a/v3/internal/parser/bindings_test.go
+++ /dev/null
@@ -1,124 +0,0 @@
-package parser
-
-import (
- "embed"
- "io/fs"
- "os"
- "testing"
-
- "github.com/google/go-cmp/cmp"
-)
-
-//go:embed testdata
-var testdata embed.FS
-
-func getFile(filename string) string {
- // get the file from the testdata FS
- file, err := fs.ReadFile(testdata, filename)
- if err != nil {
- panic(err)
- }
- return string(file)
-}
-
-func TestGenerateBindings(t *testing.T) {
-
- tests := []struct {
- dir string
- want map[string]string
- }{
- {
- "testdata/function_single",
- map[string]string{
- "main": getFile("testdata/function_single/bindings_main.js"),
- },
- },
- {
- "testdata/function_from_imported_package",
- map[string]string{
- "main": getFile("testdata/function_from_imported_package/bindings_main.js"),
- "services": getFile("testdata/function_from_imported_package/bindings_services.js"),
- },
- },
- {
- "testdata/variable_single",
- map[string]string{
- "main": getFile("testdata/variable_single/bindings_main.js"),
- },
- },
- {
- "testdata/variable_single_from_function",
- map[string]string{
- "main": getFile("testdata/variable_single_from_function/bindings_main.js"),
- },
- },
- {
- "testdata/variable_single_from_other_function",
- map[string]string{
- "main": getFile("testdata/variable_single_from_other_function/bindings_main.js"),
- "services": getFile("testdata/variable_single_from_other_function/bindings_services.js"),
- },
- },
- {
- "testdata/struct_literal_single",
- map[string]string{
- "main": getFile("testdata/struct_literal_single/bindings_main.js"),
- },
- },
- {
- "testdata/struct_literal_multiple",
- map[string]string{
- "main": getFile("testdata/struct_literal_multiple/bindings_main.js"),
- },
- },
- {
- "testdata/struct_literal_multiple_other",
- map[string]string{
- "main": getFile("testdata/struct_literal_multiple_other/bindings_main.js"),
- "services": getFile("testdata/struct_literal_multiple_other/bindings_services.js"),
- },
- },
- {
- "testdata/struct_literal_multiple_files",
- map[string]string{
- "main": getFile("testdata/struct_literal_multiple_files/bindings_main.js"),
- },
- },
- }
- for _, tt := range tests {
- t.Run(tt.dir, func(t *testing.T) {
- // Run parser on directory
- project, err := ParseProject(tt.dir)
- if err != nil {
- t.Errorf("ParseProject() error = %v", err)
- return
- }
-
- // Generate Bindings
- got := GenerateBindings(project.BoundMethods)
-
- for name, binding := range got {
- // check if the binding is in the expected bindings
- expected, ok := tt.want[name]
- if !ok {
- err = os.WriteFile(tt.dir+"/bindings_"+name+".got.js", []byte(binding), 0644)
- if err != nil {
- t.Errorf("os.WriteFile() error = %v", err)
- return
- }
- t.Errorf("GenerateBindings() unexpected binding = %v", name)
- return
- }
- // compare the binding
- if diff := cmp.Diff(expected, binding); diff != "" {
- err = os.WriteFile(tt.dir+"/bindings_"+name+".got.js", []byte(binding), 0644)
- if err != nil {
- t.Errorf("os.WriteFile() error = %v", err)
- return
- }
- t.Fatalf("GenerateBindings() mismatch (-want +got):\n%s", diff)
- }
- }
- })
- }
-}
diff --git a/v3/internal/parser/models.go b/v3/internal/parser/models.go
deleted file mode 100644
index 07ecb30526c..00000000000
--- a/v3/internal/parser/models.go
+++ /dev/null
@@ -1,184 +0,0 @@
-package parser
-
-import (
- "bytes"
- "embed"
- "io"
- "sort"
- "strings"
- "text/template"
-)
-
-//go:embed templates
-var templates embed.FS
-
-type ModelDefinitions struct {
- Package string
- Models map[string]*StructDef
-}
-
-func GenerateModel(wr io.Writer, def *ModelDefinitions) error {
- tmpl, err := template.New("model.ts.tmpl").ParseFS(templates, "templates/model.ts.tmpl")
- if err != nil {
- println("Unable to create class template: " + err.Error())
- return err
- }
-
- err = tmpl.ExecuteTemplate(wr, "model.ts.tmpl", def)
- if err != nil {
- println("Problem executing template: " + err.Error())
- return err
- }
- return nil
-}
-
-const modelsHeader = `// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-`
-
-func pkgAlias(fullPkg string) string {
- pkgParts := strings.Split(fullPkg, "/")
- return pkgParts[len(pkgParts)-1]
-}
-
-func GenerateModels(models map[packagePath]map[structName]*StructDef) (string, error) {
- if models == nil {
- return "", nil
- }
-
- var buffer bytes.Buffer
- buffer.WriteString(modelsHeader)
-
- // sort pkgs by alias (e.g. services) instead of full pkg name (e.g. github.com/wailsapp/wails/somedir/services)
- // and then sort resulting list by the alias
- var keys []string
- for pkg, _ := range models {
- keys = append(keys, pkg)
- }
-
- sort.Slice(keys, func(i, j int) bool {
- return pkgAlias(keys[i]) < pkgAlias(keys[j])
- })
-
- for _, pkg := range keys {
- err := GenerateModel(&buffer, &ModelDefinitions{
- Package: pkgAlias(pkg),
- Models: models[pkg],
- })
- if err != nil {
- return "", err
- }
- }
- return buffer.String(), nil
-}
-
-//func GenerateClass(wr io.Writer, def *StructDef) error {
-// tmpl, err := template.New("class.ts.tmpl").ParseFiles("templates/class.ts.tmpl")
-// if err != nil {
-// println("Unable to create class template: " + err.Error())
-// return err
-// }
-//
-// err = tmpl.ExecuteTemplate(wr, "class.ts.tmpl", def)
-// if err != nil {
-// println("Problem executing template: " + err.Error())
-// return err
-// }
-// return nil
-//}
-
-//
-//import (
-// "bytes"
-// "fmt"
-// "go/ast"
-// "go/types"
-// "sort"
-// "strings"
-// "unicode"
-//)
-//
-//func GenerateModels(context *Context) ([]byte, error) {
-// var buf bytes.Buffer
-// var pkgs []Package
-// specs := context.GetBoundStructs()
-// for pkg, pkgSpecs := range specs {
-// pkgs = append(pkgs, Package{Name: pkg, Specs: pkgSpecs})
-// }
-// knownStructs := newAllModels(specs)
-// sort.Slice(pkgs, func(i, j int) bool { return pkgs[i].Name < pkgs[j].Name })
-// for _, pkg := range pkgs {
-// if _, err := fmt.Fprintf(&buf, "namespace %s {\n", pkg.Name); err != nil {
-// return nil, err
-// }
-// sort.Slice(pkg.Specs, func(i, j int) bool { return pkg.Specs[i].Name.Name < pkg.Specs[j].Name.Name })
-// for _, spec := range pkg.Specs {
-// if structType, ok := spec.Type.(*ast.StructType); ok {
-// if _, err := fmt.Fprintf(&buf, " class %s {\n", spec.Name.Name); err != nil {
-// return nil, err
-// }
-//
-// for _, field := range structType.Fields.List {
-//
-// // Ignore field names that have a lower case first letter
-// if !unicode.IsUpper(rune(field.Names[0].Name[0])) {
-// continue
-// }
-//
-// // Get the Go type of the field
-// goType := types.ExprString(field.Type)
-// // Check if the type is an array
-// if arrayType, ok := field.Type.(*ast.ArrayType); ok {
-// // Get the element type of the array
-// elementType := types.ExprString(arrayType.Elt)
-// // Look up the corresponding TypeScript type
-// tsType, ok := goToTS[elementType]
-// if !ok {
-// // strip off the * prefix if it is there
-// if strings.HasPrefix(elementType, "*") {
-// elementType = elementType[1:]
-// }
-// if knownStructs.exists(elementType) {
-// tsType = elementType
-// } else {
-// tsType = "any"
-// }
-// }
-// // Output the field as an array of the corresponding TypeScript type
-// if _, err := fmt.Fprintf(&buf, " %s: %s[];\n", field.Names[0].Name, tsType); err != nil {
-// return nil, err
-// }
-// } else {
-// // strip off the * prefix if it is there
-// if strings.HasPrefix(goType, "*") {
-// goType = goType[1:]
-// }
-// // Look up the corresponding TypeScript type
-// tsType, ok := goToTS[goType]
-// if !ok {
-// if knownStructs.exists(goType) {
-// tsType = goType
-// } else {
-// tsType = "any"
-// }
-// }
-// // Output the field as the corresponding TypeScript type
-// if _, err := fmt.Fprintf(&buf, " %s: %s;\n", field.Names[0].Name, tsType); err != nil {
-// return nil, err
-// }
-// }
-// }
-//
-// if _, err := fmt.Fprintf(&buf, " }\n"); err != nil {
-// return nil, err
-// }
-// }
-// }
-//
-// if _, err := fmt.Fprintf(&buf, "}\n\n"); err != nil {
-// return nil, err
-// }
-// }
-// return buf.Bytes(), nil
-//}
diff --git a/v3/internal/parser/models_test.go b/v3/internal/parser/models_test.go
deleted file mode 100644
index b2668511e7b..00000000000
--- a/v3/internal/parser/models_test.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package parser
-
-import (
- "github.com/google/go-cmp/cmp"
- "os"
- "path/filepath"
- "testing"
-)
-
-func TestGenerateModels(t *testing.T) {
-
- tests := []struct {
- dir string
- want string
- }{
- {
- "testdata/function_single",
- "",
- },
- {
- "testdata/function_from_imported_package",
- getFile("testdata/function_from_imported_package/models.ts"),
- },
- {
- "testdata/variable_single",
- "",
- },
- {
- "testdata/variable_single_from_function",
- "",
- },
- {
- "testdata/variable_single_from_other_function",
- getFile("testdata/variable_single_from_other_function/models.ts"),
- },
- {
- "testdata/struct_literal_single",
- getFile("testdata/struct_literal_single/models.ts"),
- },
- {
- "testdata/struct_literal_multiple",
- "",
- },
- {
- "testdata/struct_literal_multiple_other",
- getFile("testdata/struct_literal_multiple_other/models.ts"),
- },
- {
- "testdata/struct_literal_multiple_files",
- "",
- },
- }
- for _, tt := range tests {
- t.Run(tt.dir, func(t *testing.T) {
- // Run parser on directory
- project, err := ParseProject(tt.dir)
- if err != nil {
- t.Fatalf("ParseProject() error = %v", err)
- }
-
- // Generate Models
- got, err := GenerateModels(project.Models)
- if err != nil {
- t.Fatalf("GenerateModels() error = %v", err)
- }
-
- if diff := cmp.Diff(tt.want, got); diff != "" {
- err = os.WriteFile(filepath.Join(tt.dir, "models.got.ts"), []byte(got), 0644)
- if err != nil {
- t.Errorf("os.WriteFile() error = %v", err)
- return
- }
- t.Fatalf("GenerateModels() mismatch (-want +got):\n%s", diff)
- }
- })
- }
-}
diff --git a/v3/internal/parser/parser.go b/v3/internal/parser/parser.go
deleted file mode 100644
index cae51fa138b..00000000000
--- a/v3/internal/parser/parser.go
+++ /dev/null
@@ -1,809 +0,0 @@
-package parser
-
-import (
- "fmt"
- "go/ast"
- "go/build"
- "go/parser"
- "go/token"
- "log"
- "os"
- "path/filepath"
- "reflect"
- "strconv"
- "strings"
-)
-
-type packagePath = string
-type structName = string
-
-type StructDef struct {
- Name string
- DocComment string
- Fields []*Field
-}
-
-type ParameterType struct {
- Name string
- IsStruct bool
- IsSlice bool
- IsPointer bool
- MapKey *ParameterType
- MapValue *ParameterType
- Package string
-}
-
-type Parameter struct {
- Name string
- Type *ParameterType
-}
-
-func (p *Parameter) JSType() string {
- // Convert type to javascript equivalent type
- var typeName string
- switch p.Type.Name {
- case "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64":
- typeName = "number"
- case "string":
- typeName = "string"
- case "bool":
- typeName = "boolean"
- default:
- typeName = p.Type.Name
- }
-
- // if the type is a struct, we need to add the package name
- if p.Type.IsStruct {
- if p.Type.Package != "" {
- parts := strings.Split(p.Type.Package, "/")
- typeName = parts[len(parts)-1] + "." + typeName
- // TODO: Check if this is a duplicate package name
- }
- }
-
- // Add slice suffix
- if p.Type.IsSlice {
- typeName += "[]"
- }
-
- // Add pointer suffix
- if p.Type.IsPointer {
- typeName += " | null"
- }
-
- return typeName
-}
-
-type BoundMethod struct {
- Name string
- DocComment string
- Inputs []*Parameter
- Outputs []*Parameter
-}
-
-type Field struct {
- Name string
- Type *ParameterType
-}
-
-func (f *Field) JSName() string {
- return strings.ToLower(f.Name[0:1]) + f.Name[1:]
-}
-
-// TSBuild contains the typescript to build a field for a JS object
-// via assignment for simple types or constructors for structs
-func (f *Field) TSBuild(pkg string) string {
- if !f.Type.IsStruct {
- return fmt.Sprintf("source['%s']", f.JSName())
- }
-
- if f.Type.Package == "" || f.Type.Package == pkg {
- return fmt.Sprintf("%s.createFrom(source['%s'])", f.Type.Name, f.JSName())
- }
-
- return fmt.Sprintf("%s.%s.createFrom(source['%s'])", pkgAlias(f.Type.Package), f.Type.Name, f.JSName())
-}
-
-func (f *Field) JSDef(pkg string) string {
- var jsType string
- switch f.Type.Name {
- case "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64":
- jsType = "number"
- case "string":
- jsType = "string"
- case "bool":
- jsType = "boolean"
- default:
- jsType = f.Type.Name
- }
-
- var result string
- if f.Type.Package == "" || f.Type.Package == pkg {
- result += fmt.Sprintf("%s: %s;", f.JSName(), jsType)
- } else {
- parts := strings.Split(f.Type.Package, "/")
- result += fmt.Sprintf("%s: %s.%s;", f.JSName(), parts[len(parts)-1], jsType)
- }
-
- if !ast.IsExported(f.Name) {
- result += " // Warning: this is unexported in the Go struct."
- }
-
- return result
-}
-
-type ParsedPackage struct {
- Pkg *ast.Package
- Name string
- Path string
- Dir string
- StructCache map[structName]*StructDef
-}
-
-type Project struct {
- packageCache map[string]*ParsedPackage
- Path string
- BoundMethods map[packagePath]map[structName][]*BoundMethod
- Models map[packagePath]map[structName]*StructDef
- anonymousStructIDCounter int
-}
-
-func ParseProject(projectPath string) (*Project, error) {
- result := &Project{
- BoundMethods: make(map[packagePath]map[structName][]*BoundMethod),
- packageCache: make(map[string]*ParsedPackage),
- }
- pkgs, err := result.parseDirectory(projectPath)
- if err != nil {
- return nil, err
- }
- err = result.findApplicationNewCalls(pkgs)
- if err != nil {
- return nil, err
- }
- for _, pkg := range result.packageCache {
- if len(pkg.StructCache) > 0 {
- if result.Models == nil {
- result.Models = make(map[packagePath]map[structName]*StructDef)
- }
- result.Models[pkg.Path] = pkg.StructCache
- }
- }
- return result, nil
-}
-
-func GenerateBindingsAndModels(projectDir string, outputDir string) error {
- p, err := ParseProject(projectDir)
- if err != nil {
- return err
- }
-
- if p.BoundMethods == nil {
- return nil
- }
- err = os.MkdirAll(outputDir, 0755)
- if err != nil {
- return err
- }
- generatedMethods := GenerateBindings(p.BoundMethods)
- for pkg, text := range generatedMethods {
- // Write the file
- err = os.WriteFile(filepath.Join(outputDir, "bindings_"+pkg+".js"), []byte(text), 0644)
- if err != nil {
- return err
- }
- }
-
- // Generate Models
- if len(p.Models) > 0 {
- generatedModels, err := GenerateModels(p.Models)
- if err != nil {
- return err
- }
- err = os.WriteFile(filepath.Join(outputDir, "models.ts"), []byte(generatedModels), 0644)
- if err != nil {
- return err
- }
- }
-
- absPath, err := filepath.Abs(projectDir)
- if err != nil {
- return err
- }
- println("Generated bindings and models for project: " + absPath)
- absPath, err = filepath.Abs(outputDir)
- if err != nil {
- return err
- }
- println("Output directory: " + absPath)
-
- return nil
-}
-
-func (p *Project) parseDirectory(dir string) (map[string]*ParsedPackage, error) {
- if p.packageCache[dir] != nil {
- return map[string]*ParsedPackage{dir: p.packageCache[dir]}, nil
- }
- // Parse the directory
- fset := token.NewFileSet()
- if dir == "." || dir == "" {
- cwd, err := os.Getwd()
- if err != nil {
- return nil, err
- }
- dir = cwd
- }
- pkgs, err := parser.ParseDir(fset, dir, nil, parser.ParseComments)
- if err != nil {
- return nil, err
- }
- var result = make(map[string]*ParsedPackage)
- for packageName, pkg := range pkgs {
- parsedPackage := &ParsedPackage{
- Pkg: pkg,
- Name: packageName,
- Path: packageName,
- Dir: getDirectoryForPackage(pkg),
- StructCache: make(map[structName]*StructDef),
- }
- p.packageCache[packageName] = parsedPackage
- result[packageName] = parsedPackage
- }
- return result, nil
-}
-
-func (p *Project) findApplicationNewCalls(pkgs map[string]*ParsedPackage) (err error) {
-
- var callFound bool
-
- for _, pkg := range pkgs {
- thisPackage := pkg.Pkg
- // Iterate through the package's files
- for _, file := range thisPackage.Files {
- // Use an ast.Inspector to find the calls to application.New
- ast.Inspect(file, func(n ast.Node) bool {
- // Check if the node is a call expression
- callExpr, ok := n.(*ast.CallExpr)
- if !ok {
- return true
- }
-
- // Check if the function being called is "application.New"
- selExpr, ok := callExpr.Fun.(*ast.SelectorExpr)
- if !ok {
- return true
- }
- if selExpr.Sel.Name != "New" {
- return true
- }
- if id, ok := selExpr.X.(*ast.Ident); !ok || id.Name != "application" {
- return true
- }
-
- // Check there is only 1 argument
- if len(callExpr.Args) != 1 {
- return true
- }
-
- // Check argument 1 is a struct literal
- structLit, ok := callExpr.Args[0].(*ast.CompositeLit)
- if !ok {
- return true
- }
-
- // Check struct literal is of type "application.Options"
- selectorExpr, ok := structLit.Type.(*ast.SelectorExpr)
- if !ok {
- return true
- }
- if selectorExpr.Sel.Name != "Options" {
- return true
- }
- if id, ok := selectorExpr.X.(*ast.Ident); !ok || id.Name != "application" {
- return true
- }
-
- for _, elt := range structLit.Elts {
- // Find the "Bind" field
- kvExpr, ok := elt.(*ast.KeyValueExpr)
- if !ok {
- continue
- }
- if id, ok := kvExpr.Key.(*ast.Ident); !ok || id.Name != "Bind" {
- continue
- }
- // Check the value is a slice of interfaces
- sliceExpr, ok := kvExpr.Value.(*ast.CompositeLit)
- if !ok {
- continue
- }
- var arrayType *ast.ArrayType
- if arrayType, ok = sliceExpr.Type.(*ast.ArrayType); !ok {
- continue
- }
-
- // Check array type is of type "interface{}"
- if _, ok := arrayType.Elt.(*ast.InterfaceType); !ok {
- continue
- }
- callFound = true
- // Iterate through the slice elements
- for _, elt := range sliceExpr.Elts {
- result, shouldContinue := p.parseBoundExpression(elt, pkg)
- if shouldContinue {
- continue
- }
- return result
-
- }
- }
-
- return true
- })
- }
- if !callFound {
- return fmt.Errorf("no Bound structs found")
- }
- }
- return nil
-}
-
-func (p *Project) parseBoundUnaryExpression(unaryExpr *ast.UnaryExpr, pkg *ParsedPackage) (bool, bool) {
- // Check the unary expression is a composite lit
-
- switch t := unaryExpr.X.(type) {
- case *ast.CompositeLit:
- return p.parseBoundCompositeLit(t, pkg)
- }
- return false, true
-
-}
-
-func (p *Project) addBoundMethods(packagePath string, name string, boundMethods []*BoundMethod) {
- _, ok := p.BoundMethods[packagePath]
- if !ok {
- p.BoundMethods[packagePath] = make(map[structName][]*BoundMethod)
- }
- p.BoundMethods[packagePath][name] = boundMethods
-}
-
-func (p *Project) parseBoundStructMethods(name string, pkg *ParsedPackage) error {
- var methods []*BoundMethod
- // Iterate over all files in the package
- for _, file := range pkg.Pkg.Files {
- // Iterate over all declarations in the file
- for _, decl := range file.Decls {
- // Check if the declaration is a type declaration
- if funcDecl, ok := decl.(*ast.FuncDecl); ok && funcDecl.Recv != nil {
- // Check if the function has a receiver argument of the struct type
- recvType, ok := funcDecl.Recv.List[0].Type.(*ast.StarExpr)
- if ok {
- if ident, ok := recvType.X.(*ast.Ident); ok && ident.Name == name {
- // Add the method to the list of methods
- method := &BoundMethod{
- Name: funcDecl.Name.Name,
- DocComment: funcDecl.Doc.Text(),
- }
-
- if funcDecl.Type.Params != nil {
- method.Inputs = p.parseParameters(funcDecl.Type.Params, pkg)
- }
- if funcDecl.Type.Results != nil {
- method.Outputs = p.parseParameters(funcDecl.Type.Results, pkg)
- }
-
- methods = append(methods, method)
- }
- }
- }
- }
- }
- p.addBoundMethods(pkg.Path, name, methods)
- return nil
-}
-
-func (p *Project) parseParameters(params *ast.FieldList, pkg *ParsedPackage) []*Parameter {
- var result []*Parameter
- for _, field := range params.List {
- var theseFields []*Parameter
- if len(field.Names) > 0 {
- for _, name := range field.Names {
- theseFields = append(theseFields, &Parameter{
- Name: name.Name,
- })
- }
- } else {
- theseFields = append(theseFields, &Parameter{
- Name: "",
- })
- }
- // loop over fields
- for _, thisField := range theseFields {
- thisField.Type = p.parseParameterType(field, pkg)
- result = append(result, thisField)
- }
- }
- return result
-}
-
-func (p *Project) parseParameterType(field *ast.Field, pkg *ParsedPackage) *ParameterType {
- result := &ParameterType{}
- result.Name = getTypeString(field.Type)
- switch t := field.Type.(type) {
- case *ast.Ident:
- result.IsStruct = isStructType(t)
- case *ast.StarExpr:
- result = p.parseParameterType(&ast.Field{Type: t.X}, pkg)
- result.IsPointer = true
- case *ast.StructType:
- result.IsStruct = true
- if result.Name == "" {
- // Anonymous struct
- result.Name = p.anonymousStructID()
- // Create a new struct definition
- result := &StructDef{
- Name: result.Name,
- }
- pkg.StructCache[result.Name] = result
- // Parse the fields
- result.Fields = p.parseStructFields(&ast.StructType{
- Fields: t.Fields,
- }, pkg)
- _ = result
- }
- case *ast.SelectorExpr:
- extPackage, err := p.getParsedPackageFromName(t.X.(*ast.Ident).Name, pkg)
- if err != nil {
- log.Fatal(err)
- }
- result.IsStruct = p.getStructDef(t.Sel.Name, extPackage)
- result.Package = extPackage.Path
- case *ast.ArrayType:
- result.IsSlice = true
- result.IsStruct = isStructType(t.Elt)
- case *ast.MapType:
- tempfield := &ast.Field{Type: t.Key}
- result.MapKey = p.parseParameterType(tempfield, pkg)
- tempfield.Type = t.Value
- result.MapValue = p.parseParameterType(tempfield, pkg)
- default:
- }
- if result.IsStruct {
- p.getStructDef(result.Name, pkg)
- if result.Package == "" {
- result.Package = pkg.Path
- }
- }
- return result
-}
-
-func (p *Project) getStructDef(name string, pkg *ParsedPackage) bool {
- _, ok := pkg.StructCache[name]
- if ok {
- return true
- }
- // Iterate over all files in the package
- for _, file := range pkg.Pkg.Files {
- // Iterate over all declarations in the file
- for _, decl := range file.Decls {
- // Check if the declaration is a type declaration
- if typeDecl, ok := decl.(*ast.GenDecl); ok {
- // Check if the type declaration is a struct type
- if typeDecl.Tok == token.TYPE {
- for _, spec := range typeDecl.Specs {
- if typeSpec, ok := spec.(*ast.TypeSpec); ok {
- if structType, ok := typeSpec.Type.(*ast.StructType); ok {
- if typeSpec.Name.Name == name {
- result := &StructDef{
- Name: name,
- DocComment: typeDecl.Doc.Text(),
- }
- pkg.StructCache[name] = result
- result.Fields = p.parseStructFields(structType, pkg)
- return true
- }
- }
- }
- }
- }
- }
- }
- }
- return false
-}
-
-func (p *Project) parseStructFields(structType *ast.StructType, pkg *ParsedPackage) []*Field {
- var result []*Field
- for _, field := range structType.Fields.List {
- var theseFields []*Field
- if len(field.Names) > 0 {
- for _, name := range field.Names {
- theseFields = append(theseFields, &Field{
- Name: name.Name,
- })
- }
- } else {
- theseFields = append(theseFields, &Field{
- Name: "",
- })
- }
- // loop over fields
- for _, thisField := range theseFields {
- paramType := p.parseParameterType(field, pkg)
- if paramType.IsStruct {
- _, ok := pkg.StructCache[paramType.Name]
- if !ok {
- p.getStructDef(paramType.Name, pkg)
- }
- if paramType.Package == "" {
- paramType.Package = pkg.Path
- }
- }
- thisField.Type = paramType
- result = append(result, thisField)
- }
- }
- return result
-}
-
-func (p *Project) getParsedPackageFromName(packageName string, currentPackage *ParsedPackage) (*ParsedPackage, error) {
- for _, file := range currentPackage.Pkg.Files {
- for _, imp := range file.Imports {
- path, err := strconv.Unquote(imp.Path.Value)
- if err != nil {
- return nil, err
- }
- _, lastPathElement := filepath.Split(path)
- if imp.Name != nil && imp.Name.Name == packageName || lastPathElement == packageName {
- // Get the directory for the package
- dir, err := getPackageDir(path)
- if err != nil {
- return nil, err
- }
- pkg, err := p.getPackageFromPath(dir, path)
- if err != nil {
- return nil, err
- }
- result := &ParsedPackage{
- Pkg: pkg,
- Name: packageName,
- Path: path,
- Dir: dir,
- StructCache: make(map[string]*StructDef),
- }
- p.packageCache[path] = result
- return result, nil
- }
- }
- }
- return nil, fmt.Errorf("package %s not found in %s", packageName, currentPackage.Name)
-}
-
-func getPackageDir(importPath string) (string, error) {
- pkg, err := build.Import(importPath, "", build.FindOnly)
- if err != nil {
- return "", err
- }
- return pkg.Dir, nil
-}
-
-func (p *Project) getPackageFromPath(packagedir string, packagepath string) (*ast.Package, error) {
- impPkg, err := parser.ParseDir(token.NewFileSet(), packagedir, nil, parser.AllErrors)
- if err != nil {
- return nil, err
- }
- for impName, impPkg := range impPkg {
- if impName == "main" {
- continue
- }
- return impPkg, nil
- }
- return nil, fmt.Errorf("package not found in imported package %s", packagepath)
-}
-
-func (p *Project) anonymousStructID() string {
- p.anonymousStructIDCounter++
- return fmt.Sprintf("anon%d", p.anonymousStructIDCounter)
-}
-
-func (p *Project) parseBoundExpression(elt ast.Expr, pkg *ParsedPackage) (bool, bool) {
-
- switch t := elt.(type) {
- case *ast.UnaryExpr:
- return p.parseBoundUnaryExpression(t, pkg)
- case *ast.Ident:
- return p.parseBoundIdent(t, pkg)
- case *ast.CallExpr:
- return p.parseBoundCallExpression(t, pkg)
- default:
- println("unhandled expression type", reflect.TypeOf(t).String())
- }
-
- return false, false
-}
-
-func (p *Project) parseBoundIdent(ident *ast.Ident, pkg *ParsedPackage) (bool, bool) {
- if ident.Obj == nil {
- return false, true
- }
- switch t := ident.Obj.Decl.(type) {
- //case *ast.StructType:
- // return p.parseBoundStruct(t, pkg)
- case *ast.TypeSpec:
- return p.parseBoundTypeSpec(t, pkg)
- case *ast.AssignStmt:
- return p.parseBoundAssignment(t, pkg)
- default:
- println("unhandled ident type", reflect.TypeOf(t).String())
- }
- return false, false
-}
-
-func (p *Project) parseBoundAssignment(assign *ast.AssignStmt, pkg *ParsedPackage) (bool, bool) {
- return p.parseBoundExpression(assign.Rhs[0], pkg)
-}
-
-func (p *Project) parseBoundCompositeLit(lit *ast.CompositeLit, pkg *ParsedPackage) (bool, bool) {
-
- switch t := lit.Type.(type) {
- case *ast.StructType:
- //return p.parseBoundStructType(t, pkg)
- return false, true
- case *ast.Ident:
- err := p.parseBoundStructMethods(t.Name, pkg)
- if err != nil {
- return true, false
- }
- return false, true
- case *ast.SelectorExpr:
- return p.parseBoundSelectorExpression(t, pkg)
- }
-
- return false, true
-}
-
-func (p *Project) parseBoundSelectorExpression(selector *ast.SelectorExpr, pkg *ParsedPackage) (bool, bool) {
-
- switch t := selector.X.(type) {
- case *ast.Ident:
- // Look up the package
- var parsedPackage *ParsedPackage
- parsedPackage, err := p.getParsedPackageFromName(t.Name, pkg)
- if err != nil {
- return true, false
- }
- err = p.parseBoundStructMethods(selector.Sel.Name, parsedPackage)
- if err != nil {
- return true, false
- }
- return false, true
- default:
- println("unhandled selector type", reflect.TypeOf(t).String())
- }
- return false, true
-}
-
-func (p *Project) parseBoundCallExpression(callExpr *ast.CallExpr, pkg *ParsedPackage) (bool, bool) {
-
- // Check if this call returns a struct pointer
- switch t := callExpr.Fun.(type) {
- case *ast.Ident:
- if t.Obj == nil {
- return false, true
- }
- switch t := t.Obj.Decl.(type) {
- case *ast.FuncDecl:
- return p.parseBoundFuncDecl(t, pkg)
- }
-
- case *ast.SelectorExpr:
- // Get package for selector
- var parsedPackage *ParsedPackage
- parsedPackage, err := p.getParsedPackageFromName(t.X.(*ast.Ident).Name, pkg)
- if err != nil {
- return true, false
- }
- // Get function from package
- var extFundDecl *ast.FuncDecl
- extFundDecl, err = p.getFunctionFromName(t.Sel.Name, parsedPackage)
- if err != nil {
- return true, false
- }
- return p.parseBoundFuncDecl(extFundDecl, parsedPackage)
- default:
- println("unhandled call type", reflect.TypeOf(t).String())
- }
-
- return false, true
-}
-
-func (p *Project) parseBoundFuncDecl(t *ast.FuncDecl, pkg *ParsedPackage) (bool, bool) {
- if t.Type.Results == nil {
- return false, true
- }
- if len(t.Type.Results.List) != 1 {
- return false, true
- }
- switch t := t.Type.Results.List[0].Type.(type) {
- case *ast.StarExpr:
- return p.parseBoundExpression(t.X, pkg)
- default:
- println("Unhandled funcdecl type", reflect.TypeOf(t).String())
- }
- return false, false
-}
-
-func (p *Project) parseBoundTypeSpec(typeSpec *ast.TypeSpec, pkg *ParsedPackage) (bool, bool) {
- switch t := typeSpec.Type.(type) {
- case *ast.StructType:
- err := p.parseBoundStructMethods(typeSpec.Name.Name, pkg)
- if err != nil {
- return true, false
- }
- default:
- println("unhandled type spec type", reflect.TypeOf(t).String())
- }
- return false, true
-}
-
-func (p *Project) getFunctionFromName(name string, parsedPackage *ParsedPackage) (*ast.FuncDecl, error) {
- for _, f := range parsedPackage.Pkg.Files {
- for _, decl := range f.Decls {
- switch t := decl.(type) {
- case *ast.FuncDecl:
- if t.Name.Name == name {
- return t, nil
- }
- }
- }
- }
- return nil, fmt.Errorf("function not found")
-}
-
-func getTypeString(expr ast.Expr) string {
- switch t := expr.(type) {
- case *ast.Ident:
- return t.Name
- case *ast.StarExpr:
- return getTypeString(t.X)
- case *ast.ArrayType:
- return getTypeString(t.Elt)
- case *ast.MapType:
- return "map"
- case *ast.SelectorExpr:
- return getTypeString(t.Sel)
- default:
- return ""
- }
-}
-
-func isStructType(expr ast.Expr) bool {
- switch e := expr.(type) {
- case *ast.StructType:
- return true
- case *ast.StarExpr:
- return isStructType(e.X)
- case *ast.SelectorExpr:
- return isStructType(e.Sel)
- case *ast.ArrayType:
- return isStructType(e.Elt)
- case *ast.SliceExpr:
- return isStructType(e.X)
- case *ast.Ident:
- return e.Obj != nil && e.Obj.Kind == ast.Typ
- default:
- return false
- }
-}
-
-func getDirectoryForPackage(pkg *ast.Package) string {
- for filename := range pkg.Files {
- path := filepath.Dir(filename)
- abs, err := filepath.Abs(path)
- if err != nil {
- panic(err)
- }
- return abs
- }
- return ""
-}
diff --git a/v3/internal/parser/parser_test.go b/v3/internal/parser/parser_test.go
deleted file mode 100644
index ea1705daa29..00000000000
--- a/v3/internal/parser/parser_test.go
+++ /dev/null
@@ -1,1559 +0,0 @@
-package parser
-
-import (
- "testing"
-
- "github.com/google/go-cmp/cmp"
-)
-
-func TestParseDirectory(t *testing.T) {
- tests := []struct {
- name string
- dir string
- wantBoundMethods map[string]map[string][]*BoundMethod
- wantModels map[string]map[string]*StructDef
- wantErr bool
- }{
- {
- name: "should find single bound service",
- dir: "testdata/struct_literal_single",
- //wantModels: []string{"main.GreetService"},
- wantBoundMethods: map[string]map[string][]*BoundMethod{
- "main": {
- "GreetService": {
- {
- Name: "Greet",
- DocComment: "Greet someone\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- {
- Name: "NoInputsStringOut",
- DocComment: "",
- Inputs: nil,
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- {
- Name: "StringArrayInputStringOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "string",
- IsSlice: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- {
- Name: "StringArrayInputStringArrayOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "string",
- IsSlice: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "string",
- IsSlice: true,
- },
- },
- },
- },
- {
- Name: "StringArrayInputNamedOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "string",
- IsSlice: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "output",
- Type: &ParameterType{
- Name: "string",
- IsSlice: true,
- },
- },
- },
- },
- {
- Name: "StringArrayInputNamedOutputs",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "string",
- IsSlice: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "output",
- Type: &ParameterType{
- Name: "string",
- IsSlice: true,
- },
- },
- {
- Name: "err",
- Type: &ParameterType{
- Name: "error",
- },
- },
- },
- },
- {
- Name: "IntPointerInputNamedOutputs",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "output",
- Type: &ParameterType{
- Name: "int",
- IsPointer: true,
- },
- },
- {
- Name: "err",
- Type: &ParameterType{
- Name: "error",
- }},
- },
- },
- {
- Name: "UIntPointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "UInt8PointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint8",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint8",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "UInt16PointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint16",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint16",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "UInt32PointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint32",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint32",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "UInt64PointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint64",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint64",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "IntPointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "Int8PointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int8",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int8",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "Int16PointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int16",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int16",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "Int32PointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int32",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int32",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "Int64PointerInAndOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int64",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int64",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "IntInIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int",
- },
- },
- },
- },
- {
- Name: "Int8InIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int8",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int8",
- },
- },
- },
- },
- {
- Name: "Int16InIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int16",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int16",
- },
- },
- },
- },
- {
- Name: "Int32InIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int32",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int32",
- },
- },
- },
- },
- {
- Name: "Int64InIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int64",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "int64",
- },
- },
- },
- },
- {
- Name: "UIntInUIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint",
- },
- },
- },
- },
- {
- Name: "UInt8InUIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint8",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint8",
- },
- },
- },
- },
- {
- Name: "UInt16InUIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint16",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint16",
- },
- },
- },
- },
- {
- Name: "UInt32InUIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint32",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint32",
- },
- },
- },
- },
- {
- Name: "UInt64InUIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "uint64",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "uint64",
- },
- },
- },
- },
- {
- Name: "Float32InFloat32Out",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "float32",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "float32",
- },
- },
- },
- },
- {
- Name: "Float64InFloat64Out",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "float64",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "float64",
- },
- },
- },
- },
- {
- Name: "PointerFloat32InFloat32Out",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "float32",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "float32",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "PointerFloat64InFloat64Out",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "float64",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "float64",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "BoolInBoolOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "bool",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "bool",
- },
- },
- },
- },
- {
- Name: "PointerBoolInBoolOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "bool",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "bool",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "PointerStringInStringOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "string",
- IsPointer: true,
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "string",
- IsPointer: true,
- },
- },
- },
- },
- {
- Name: "StructPointerInputErrorOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "Person",
- IsPointer: true,
- IsStruct: true,
- Package: "main",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "error",
- },
- },
- },
- },
- {
- Name: "StructInputStructOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "Person",
- IsStruct: true,
- Package: "main",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "Person",
- IsStruct: true,
- Package: "main",
- },
- },
- },
- },
- {
- Name: "StructPointerInputStructPointerOutput",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "Person",
- IsPointer: true,
- IsStruct: true,
- Package: "main",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "Person",
- IsPointer: true,
- IsStruct: true,
- Package: "main",
- },
- },
- },
- },
- {
- Name: "MapIntInt",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "map",
- MapKey: &ParameterType{
- Name: "int",
- },
- MapValue: &ParameterType{
- Name: "int",
- },
- },
- },
- },
- },
- {
- Name: "PointerMapIntInt",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "map",
- IsPointer: true,
- MapKey: &ParameterType{
- Name: "int",
- },
- MapValue: &ParameterType{
- Name: "int",
- },
- },
- },
- },
- },
- {
- Name: "MapIntPointerInt",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "map",
- MapKey: &ParameterType{
- Name: "int",
- IsPointer: true,
- },
- MapValue: &ParameterType{
- Name: "int",
- },
- },
- },
- },
- },
- {
- Name: "MapIntSliceInt",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "map",
- MapKey: &ParameterType{
- Name: "int",
- },
- MapValue: &ParameterType{
- Name: "int",
- IsSlice: true,
- },
- },
- },
- },
- },
- {
- Name: "MapIntSliceIntInMapIntSliceIntOut",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "map",
- MapKey: &ParameterType{
- Name: "int",
- },
- MapValue: &ParameterType{
- Name: "int",
- IsSlice: true,
- },
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "out",
- Type: &ParameterType{
- Name: "map",
- MapKey: &ParameterType{
- Name: "int",
- },
- MapValue: &ParameterType{
- Name: "int",
- IsSlice: true,
- },
- },
- },
- },
- },
- {
- Name: "ArrayInt",
- Inputs: []*Parameter{
- {
- Name: "in",
- Type: &ParameterType{
- Name: "int",
- IsSlice: true,
- },
- },
- },
- },
- },
- },
- },
- wantModels: map[string]map[string]*StructDef{
- "main": {
- "Person": {
- Name: "Person",
- Fields: []*Field{
- {
- Name: "Name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "Parent",
- Type: &ParameterType{
- Name: "Person",
- IsStruct: true,
- IsPointer: true,
- Package: "main",
- },
- },
- {
- Name: "Details",
- Type: &ParameterType{
- Name: "anon1",
- IsStruct: true,
- Package: "main",
- },
- },
- },
- },
- "anon1": {
- Name: "anon1",
- Fields: []*Field{
- {
- Name: "Age",
- Type: &ParameterType{
- Name: "int",
- },
- },
- {
- Name: "Address",
- Type: &ParameterType{
- Name: "anon2",
- IsStruct: true,
- Package: "main",
- },
- },
- },
- },
- "anon2": {
- Name: "anon2",
- Fields: []*Field{
- {
- Name: "Street",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "should find multiple bound services",
- dir: "testdata/struct_literal_multiple",
- wantBoundMethods: map[string]map[string][]*BoundMethod{
- "main": {
- "GreetService": {
- {
- Name: "Greet",
- DocComment: "",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- },
- "OtherService": {
- {
- Name: "Hello",
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "should find multiple bound services over multiple files",
- dir: "testdata/struct_literal_multiple_files",
- wantBoundMethods: map[string]map[string][]*BoundMethod{
- "main": {
- "GreetService": {
- {
- Name: "Greet",
- DocComment: "",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- },
- "OtherService": {
- {
- Name: "Hello",
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "should find multiple bound services over multiple packages",
- dir: "testdata/struct_literal_multiple_other",
- wantErr: false,
- wantBoundMethods: map[string]map[string][]*BoundMethod{
- "main": {
- "GreetService": {
- {
- Name: "Greet",
- DocComment: "Greet does XYZ\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- {
- Name: "NewPerson",
- DocComment: "NewPerson creates a new person\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "Person",
- IsPointer: true,
- IsStruct: true,
- Package: "main",
- },
- },
- },
- },
- },
- },
- "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services": {
- "OtherService": {
- {
- Name: "Yay",
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "Address",
- IsStruct: true,
- IsPointer: true,
- Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services",
- },
- },
- },
- },
- },
- },
- },
- wantModels: map[string]map[string]*StructDef{
- "main": {
- "Person": {
- Name: "Person",
- Fields: []*Field{
- {
- Name: "Name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "Address",
- Type: &ParameterType{
- Name: "Address",
- IsStruct: true,
- IsPointer: true,
- Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services",
- },
- },
- },
- },
- },
- "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services": {
- "Address": {
- Name: "Address",
- Fields: []*Field{
- {
- Name: "Street",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "State",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "Country",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- },
- },
- },
- {
- name: "should find a bound services using a variable",
- dir: "testdata/variable_single",
- wantErr: false,
- wantBoundMethods: map[string]map[string][]*BoundMethod{
- "main": {
- "GreetService": {
- {
- Name: "Greet",
- DocComment: "Greet someone\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- },
- },
- },
- },
- {
- name: "should find a bound services using a variable from function call",
- dir: "testdata/variable_single_from_function",
- wantErr: false,
- wantBoundMethods: map[string]map[string][]*BoundMethod{
- "main": {
- "GreetService": {
- {
- Name: "Greet",
- DocComment: "Greet someone\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- },
- },
- },
- },
- {
- name: "should find a bound services using a variable from function call in another package",
- dir: "testdata/variable_single_from_other_function",
- wantErr: false,
- wantBoundMethods: map[string]map[string][]*BoundMethod{
- "main": {
- "GreetService": {
- {
- Name: "Greet",
- DocComment: "Greet does XYZ\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- {
- Name: "NewPerson",
- DocComment: "NewPerson creates a new person\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "Person",
- IsPointer: true,
- IsStruct: true,
- Package: "main",
- },
- },
- },
- },
- },
- },
- "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services": {
- "OtherService": {
- {
- Name: "Yay",
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "Address",
- IsStruct: true,
- IsPointer: true,
- Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services",
- },
- },
- },
- },
- },
- },
- },
- wantModels: map[string]map[string]*StructDef{
- "main": {
- "Person": {
- Name: "Person",
- Fields: []*Field{
- {
- Name: "Name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "Address",
- Type: &ParameterType{
- Name: "Address",
- IsStruct: true,
- IsPointer: true,
- Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services",
- },
- },
- },
- },
- },
- "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services": {
- "Address": {
- Name: "Address",
- Fields: []*Field{
- {
- Name: "Street",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "State",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "Country",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- },
- },
- },
- {
- name: "should find a bound service returned from a function call",
- dir: "testdata/function_single",
- wantErr: false,
- wantBoundMethods: map[string]map[string][]*BoundMethod{
- "main": {
- "GreetService": {
- {
- Name: "Greet",
- DocComment: "Greet someone\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- },
- },
- },
- },
- {
- name: "should find a bound service returned from a function call in another package",
- dir: "testdata/function_from_imported_package",
- wantErr: false,
- wantBoundMethods: map[string]map[string][]*BoundMethod{
- "main": {
- "GreetService": {
- {
- Name: "Greet",
- DocComment: "Greet does XYZ\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- {
- Name: "NewPerson",
- DocComment: "NewPerson creates a new person\n",
- Inputs: []*Parameter{
- {
- Name: "name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- Outputs: []*Parameter{
- {
- Name: "",
- Type: &ParameterType{
- Name: "Person",
- IsPointer: true,
- IsStruct: true,
- Package: "main",
- },
- },
- },
- },
- },
- },
- "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services": {
- "OtherService": {
- {
- Name: "Yay",
- Outputs: []*Parameter{
- {
- Type: &ParameterType{
- Name: "Address",
- IsStruct: true,
- IsPointer: true,
- Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services",
- },
- },
- },
- },
- },
- },
- },
- wantModels: map[string]map[string]*StructDef{
- "main": {
- "Person": {
- Name: "Person",
- Fields: []*Field{
- {
- Name: "Name",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "Address",
- Type: &ParameterType{
- Name: "Address",
- IsStruct: true,
- IsPointer: true,
- Package: "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services",
- },
- },
- },
- },
- },
- "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services": {
- "Address": {
- Name: "Address",
- Fields: []*Field{
- {
- Name: "Street",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "State",
- Type: &ParameterType{
- Name: "string",
- },
- },
- {
- Name: "Country",
- Type: &ParameterType{
- Name: "string",
- },
- },
- },
- },
- },
- },
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- got, err := ParseProject(tt.dir)
- if (err != nil) != tt.wantErr {
- t.Errorf("ParseDirectory() error = %v, wantErr %v", err, tt.wantErr)
- return
- }
- if diff := cmp.Diff(tt.wantBoundMethods, got.BoundMethods); diff != "" {
- t.Errorf("ParseDirectory() failed:\n" + diff)
- }
- if diff := cmp.Diff(tt.wantModels, got.Models); diff != "" {
- t.Errorf("ParseDirectory() failed:\n" + diff)
- }
- })
- }
-
-}
-
-//func TestGenerateTypeScript(t *testing.T) {
-// tests := []struct {
-// name string
-// dir string
-// wantModels string
-// wantErr bool
-// }{
-// {
-// name: "should find single bound service",
-// dir: "testdata/struct_literal_single",
-// wantModels: `namespace main {
-// class GreetService {
-// SomeVariable: number;
-// }
-//}
-//`,
-// wantErr: false,
-// },
-// {
-// name: "should find multiple bound services",
-// dir: "testdata/struct_literal_multiple",
-// wantModels: `namespace main {
-// class GreetService {
-// SomeVariable: number;
-// }
-// class OtherService {
-// }
-//}
-//`,
-// wantErr: false,
-// },
-// {
-// name: "should find multiple bound services over multiple files",
-// dir: "testdata/struct_literal_multiple_files",
-// wantModels: `namespace main {
-// class GreetService {
-// SomeVariable: number;
-// }
-// class OtherService {
-// }
-//}
-//`,
-// wantErr: false,
-// },
-// {
-// name: "should find bound services from other packages",
-// dir: "../../examples/binding",
-// wantModels: `namespace main {
-// class localStruct {
-// }
-//}
-//namespace models {
-// class Person {
-// Name: string;
-// }
-//}
-//namespace services {
-// class GreetService {
-// SomeVariable: number;
-// Parent: models.Person;
-// }
-//}
-//`,
-// wantErr: false,
-// },
-// }
-// for _, tt := range tests {
-// t.Run(tt.name, func(t *testing.T) {
-// Debug = true
-// context, err := ParseDirectory(tt.dir)
-// if (err != nil) != tt.wantErr {
-// t.Errorf("ParseDirectory() error = %v, wantErr %v", err, tt.wantErr)
-// return
-// }
-//
-// ts, err := GenerateModels(context)
-// require.NoError(t, err)
-// require.Equal(t, tt.wantModels, string(ts))
-//
-// })
-// }
-//}
diff --git a/v3/internal/parser/templates/class.ts.tmpl b/v3/internal/parser/templates/class.ts.tmpl
deleted file mode 100644
index 886f6b6630d..00000000000
--- a/v3/internal/parser/templates/class.ts.tmpl
+++ /dev/null
@@ -1,16 +0,0 @@
- export class {{.Name}} {
- {{range .Fields}}{{.}}
- {{end}}
- static createFrom(source: any = {}) {
- return new {{.Name}}(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- {{range .Fields}}this.{{jsName .}} = source["{{jsName .}}"]
- {{end}}
- }
- }
diff --git a/v3/internal/parser/templates/model.ts.tmpl b/v3/internal/parser/templates/model.ts.tmpl
deleted file mode 100644
index 232db747922..00000000000
--- a/v3/internal/parser/templates/model.ts.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-{{$pkg := .Package}}
-export namespace {{.Package}} {
- {{range $name, $def := .Models}}
- export class {{$def.Name}} {
- {{range $def.Fields}}{{.JSDef $pkg}}
- {{end}}
- static createFrom(source: any = {}) {
- return new {{$def.Name}}(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- {{range $def.Fields}}this.{{.JSName}} = {{.TSBuild $pkg}};
- {{end}}
- }
- }
- {{end}}
-}
diff --git a/v3/internal/parser/testdata/function_from_imported_package/bindings_main.js b/v3/internal/parser/testdata/function_from_imported_package/bindings_main.js
deleted file mode 100644
index 53a8198852d..00000000000
--- a/v3/internal/parser/testdata/function_from_imported_package/bindings_main.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-import {main} from './models';
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.Greet
- * Greet does XYZ
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-
-/**
- * GreetService.NewPerson
- * NewPerson creates a new person
- * @param name {string}
- * @returns {Promise}
- **/
-function NewPerson(name) {
- return wails.Call(GreetService("NewPerson", name));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- Greet,
- NewPerson,
- },
-};
-
diff --git a/v3/internal/parser/testdata/function_from_imported_package/bindings_services.js b/v3/internal/parser/testdata/function_from_imported_package/bindings_services.js
deleted file mode 100644
index 48e7ed65221..00000000000
--- a/v3/internal/parser/testdata/function_from_imported_package/bindings_services.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-import {services} from './models';
-
-function OtherService(method) {
- return {
- packageName: "services",
- serviceName: "OtherService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * OtherService.Yay
- *
- *
- * @returns {Promise}
- **/
-function Yay() {
- return wails.Call(OtherService("Yay"));
-}
-
-window.go = window.go || {};
-window.go.services = {
- OtherService: {
- Yay,
- },
-};
-
diff --git a/v3/internal/parser/testdata/function_from_imported_package/main.go b/v3/internal/parser/testdata/function_from_imported_package/main.go
deleted file mode 100644
index 3c061aa9b93..00000000000
--- a/v3/internal/parser/testdata/function_from_imported_package/main.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package main
-
-import (
- _ "embed"
- "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-// GreetService is great
-type GreetService struct {
- SomeVariable int
- lowerCase string
- target *Person
-}
-
-type Person struct {
- Name string
- Address *services.Address
-}
-
-// Greet does XYZ
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
-
-// NewPerson creates a new person
-func (*GreetService) NewPerson(name string) *Person {
- return &Person{Name: name}
-}
-
-func main() {
- app := application.New(application.Options{
- Bind: []interface{}{
- &GreetService{},
- services.NewOtherService(),
- },
- })
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/internal/parser/testdata/function_from_imported_package/models.ts b/v3/internal/parser/testdata/function_from_imported_package/models.ts
deleted file mode 100644
index a6639f8ebb4..00000000000
--- a/v3/internal/parser/testdata/function_from_imported_package/models.ts
+++ /dev/null
@@ -1,51 +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;
-
- static createFrom(source: any = {}) {
- return new Person(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.name = source['name'];
- this.address = services.Address.createFrom(source['address']);
-
- }
- }
-
-}
-
-export namespace services {
-
- export class Address {
- street: string;
- state: string;
- country: string;
-
- static createFrom(source: any = {}) {
- return new Address(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.street = source['street'];
- this.state = source['state'];
- this.country = source['country'];
-
- }
- }
-
-}
diff --git a/v3/internal/parser/testdata/function_from_imported_package/services/other.go b/v3/internal/parser/testdata/function_from_imported_package/services/other.go
deleted file mode 100644
index 2daa9df17a2..00000000000
--- a/v3/internal/parser/testdata/function_from_imported_package/services/other.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package services
-
-// OtherService is a struct
-// that does things
-type OtherService struct {
- t int
-}
-
-type Address struct {
- Street string
- State string
- Country string
-}
-
-// Yay does this and that
-func (o *OtherService) Yay() *Address {
- return &Address{
- Street: "123 Pitt Street",
- State: "New South Wales",
- Country: "Australia",
- }
-}
-
-func NewOtherService() *OtherService {
- return &OtherService{}
-}
diff --git a/v3/internal/parser/testdata/function_single/bindings_main.js b/v3/internal/parser/testdata/function_single/bindings_main.js
deleted file mode 100644
index 0a156d14949..00000000000
--- a/v3/internal/parser/testdata/function_single/bindings_main.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.Greet
- * Greet someone
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- Greet,
- },
-};
diff --git a/v3/internal/parser/testdata/function_single/main.go b/v3/internal/parser/testdata/function_single/main.go
deleted file mode 100644
index 88de7bf89eb..00000000000
--- a/v3/internal/parser/testdata/function_single/main.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package main
-
-import (
- _ "embed"
- "github.com/wailsapp/wails/v3/pkg/application"
- "log"
-)
-
-// GreetService is great
-type GreetService struct {
- SomeVariable int
- lowerCase string
-}
-
-// Greet someone
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
-
-func NewGreetService() *GreetService {
- return &GreetService{}
-}
-
-func main() {
- app := application.New(application.Options{
- Bind: []interface{}{
- NewGreetService(),
- },
- })
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/internal/parser/testdata/function_single/models.ts b/v3/internal/parser/testdata/function_single/models.ts
deleted file mode 100644
index 0817f259bce..00000000000
--- a/v3/internal/parser/testdata/function_single/models.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-// TODO : nothing generated yet
\ No newline at end of file
diff --git a/v3/internal/parser/testdata/struct_literal_multiple/bindings_main.js b/v3/internal/parser/testdata/struct_literal_multiple/bindings_main.js
deleted file mode 100644
index 27707394134..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple/bindings_main.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.Greet
- *
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-function OtherService(method) {
- return {
- packageName: "main",
- serviceName: "OtherService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * OtherService.Hello
- *
- *
- * @returns {Promise}
- **/
-function Hello() {
- return wails.Call(OtherService("Hello"));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- Greet,
- },
- OtherService: {
- Hello,
- },
-};
diff --git a/v3/internal/parser/testdata/struct_literal_multiple/main.go b/v3/internal/parser/testdata/struct_literal_multiple/main.go
deleted file mode 100644
index fb555d79ff7..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple/main.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-type GreetService struct {
- SomeVariable int
- lowerCase string
-}
-
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
-
-type OtherService struct {
- t int
-}
-
-func (o *OtherService) Hello() {}
-
-func main() {
- app := application.New(application.Options{
- Bind: []interface{}{
- &GreetService{},
- &OtherService{},
- },
- })
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/internal/parser/testdata/struct_literal_multiple/models.ts b/v3/internal/parser/testdata/struct_literal_multiple/models.ts
deleted file mode 100644
index 0817f259bce..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple/models.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-// TODO : nothing generated yet
\ No newline at end of file
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/bindings_main.js b/v3/internal/parser/testdata/struct_literal_multiple_files/bindings_main.js
deleted file mode 100644
index 27707394134..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_files/bindings_main.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.Greet
- *
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-function OtherService(method) {
- return {
- packageName: "main",
- serviceName: "OtherService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * OtherService.Hello
- *
- *
- * @returns {Promise}
- **/
-function Hello() {
- return wails.Call(OtherService("Hello"));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- Greet,
- },
- OtherService: {
- Hello,
- },
-};
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/greet.go b/v3/internal/parser/testdata/struct_literal_multiple_files/greet.go
deleted file mode 100644
index 2a45396a7a1..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_files/greet.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package main
-
-import (
- _ "embed"
-)
-
-type GreetService struct {
- SomeVariable int
- lowerCase string
-}
-
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/main.go b/v3/internal/parser/testdata/struct_literal_multiple_files/main.go
deleted file mode 100644
index a75d4d7bd23..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_files/main.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-func main() {
- app := application.New(application.Options{
- Bind: []interface{}{
- &GreetService{},
- &OtherService{},
- },
- })
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/models.ts b/v3/internal/parser/testdata/struct_literal_multiple_files/models.ts
deleted file mode 100644
index 0817f259bce..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_files/models.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-// TODO : nothing generated yet
\ No newline at end of file
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/other.go b/v3/internal/parser/testdata/struct_literal_multiple_files/other.go
deleted file mode 100644
index ad5e661ef34..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_files/other.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package main
-
-type OtherService struct {
- t int
-}
-
-func (o *OtherService) Hello() {}
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_main.js b/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_main.js
deleted file mode 100644
index 53a8198852d..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_main.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-import {main} from './models';
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.Greet
- * Greet does XYZ
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-
-/**
- * GreetService.NewPerson
- * NewPerson creates a new person
- * @param name {string}
- * @returns {Promise}
- **/
-function NewPerson(name) {
- return wails.Call(GreetService("NewPerson", name));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- Greet,
- NewPerson,
- },
-};
-
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_services.js b/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_services.js
deleted file mode 100644
index 48e7ed65221..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_other/bindings_services.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-import {services} from './models';
-
-function OtherService(method) {
- return {
- packageName: "services",
- serviceName: "OtherService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * OtherService.Yay
- *
- *
- * @returns {Promise}
- **/
-function Yay() {
- return wails.Call(OtherService("Yay"));
-}
-
-window.go = window.go || {};
-window.go.services = {
- OtherService: {
- Yay,
- },
-};
-
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/main.go b/v3/internal/parser/testdata/struct_literal_multiple_other/main.go
deleted file mode 100644
index 8c6953dbb66..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_other/main.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/internal/parser/testdata/struct_literal_multiple_other/services"
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-// GreetService is great
-type GreetService struct {
- SomeVariable int
- lowerCase string
- target *Person
-}
-
-type Person struct {
- Name string
- Address *services.Address
-}
-
-// Greet does XYZ
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
-
-// NewPerson creates a new person
-func (*GreetService) NewPerson(name string) *Person {
- return &Person{Name: name}
-}
-
-func main() {
- app := application.New(application.Options{
- Bind: []interface{}{
- &GreetService{},
- &services.OtherService{},
- },
- })
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/models.ts b/v3/internal/parser/testdata/struct_literal_multiple_other/models.ts
deleted file mode 100644
index a6639f8ebb4..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_other/models.ts
+++ /dev/null
@@ -1,51 +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;
-
- static createFrom(source: any = {}) {
- return new Person(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.name = source['name'];
- this.address = services.Address.createFrom(source['address']);
-
- }
- }
-
-}
-
-export namespace services {
-
- export class Address {
- street: string;
- state: string;
- country: string;
-
- static createFrom(source: any = {}) {
- return new Address(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.street = source['street'];
- this.state = source['state'];
- this.country = source['country'];
-
- }
- }
-
-}
diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/services/other.go b/v3/internal/parser/testdata/struct_literal_multiple_other/services/other.go
deleted file mode 100644
index 55472595bb4..00000000000
--- a/v3/internal/parser/testdata/struct_literal_multiple_other/services/other.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package services
-
-// OtherService is a struct
-// that does things
-type OtherService struct {
- t int
-}
-
-type Address struct {
- Street string
- State string
- Country string
-}
-
-// Yay does this and that
-func (o *OtherService) Yay() *Address {
- return &Address{
- Street: "123 Pitt Street",
- State: "New South Wales",
- Country: "Australia",
- }
-}
diff --git a/v3/internal/parser/testdata/struct_literal_single/bindings_main.js b/v3/internal/parser/testdata/struct_literal_single/bindings_main.js
deleted file mode 100644
index 5b3fcd587bb..00000000000
--- a/v3/internal/parser/testdata/struct_literal_single/bindings_main.js
+++ /dev/null
@@ -1,494 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-import {main} from './models';
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.ArrayInt
- *
- * @param _in {number[]}
- * @returns {Promise}
- **/
-function ArrayInt(_in) {
- return wails.Call(GreetService("ArrayInt", _in));
-}
-
-/**
- * GreetService.BoolInBoolOut
- *
- * @param _in {boolean}
- * @returns {Promise}
- **/
-function BoolInBoolOut(_in) {
- return wails.Call(GreetService("BoolInBoolOut", _in));
-}
-
-/**
- * GreetService.Float32InFloat32Out
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function Float32InFloat32Out(_in) {
- return wails.Call(GreetService("Float32InFloat32Out", _in));
-}
-
-/**
- * GreetService.Float64InFloat64Out
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function Float64InFloat64Out(_in) {
- return wails.Call(GreetService("Float64InFloat64Out", _in));
-}
-
-/**
- * GreetService.Greet
- * Greet someone
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-
-/**
- * GreetService.Int16InIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function Int16InIntOut(_in) {
- return wails.Call(GreetService("Int16InIntOut", _in));
-}
-
-/**
- * GreetService.Int16PointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function Int16PointerInAndOutput(_in) {
- return wails.Call(GreetService("Int16PointerInAndOutput", _in));
-}
-
-/**
- * GreetService.Int32InIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function Int32InIntOut(_in) {
- return wails.Call(GreetService("Int32InIntOut", _in));
-}
-
-/**
- * GreetService.Int32PointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function Int32PointerInAndOutput(_in) {
- return wails.Call(GreetService("Int32PointerInAndOutput", _in));
-}
-
-/**
- * GreetService.Int64InIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function Int64InIntOut(_in) {
- return wails.Call(GreetService("Int64InIntOut", _in));
-}
-
-/**
- * GreetService.Int64PointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function Int64PointerInAndOutput(_in) {
- return wails.Call(GreetService("Int64PointerInAndOutput", _in));
-}
-
-/**
- * GreetService.Int8InIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function Int8InIntOut(_in) {
- return wails.Call(GreetService("Int8InIntOut", _in));
-}
-
-/**
- * GreetService.Int8PointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function Int8PointerInAndOutput(_in) {
- return wails.Call(GreetService("Int8PointerInAndOutput", _in));
-}
-
-/**
- * GreetService.IntInIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function IntInIntOut(_in) {
- return wails.Call(GreetService("IntInIntOut", _in));
-}
-
-/**
- * GreetService.IntPointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function IntPointerInAndOutput(_in) {
- return wails.Call(GreetService("IntPointerInAndOutput", _in));
-}
-
-/**
- * GreetService.IntPointerInputNamedOutputs
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function IntPointerInputNamedOutputs(_in) {
- return wails.Call(GreetService("IntPointerInputNamedOutputs", _in));
-}
-
-/**
- * GreetService.MapIntInt
- *
- * @param _in {map}
- * @returns {Promise}
- **/
-function MapIntInt(_in) {
- return wails.Call(GreetService("MapIntInt", _in));
-}
-
-/**
- * GreetService.MapIntPointerInt
- *
- * @param _in {map}
- * @returns {Promise}
- **/
-function MapIntPointerInt(_in) {
- return wails.Call(GreetService("MapIntPointerInt", _in));
-}
-
-/**
- * GreetService.MapIntSliceInt
- *
- * @param _in {map}
- * @returns {Promise}
- **/
-function MapIntSliceInt(_in) {
- return wails.Call(GreetService("MapIntSliceInt", _in));
-}
-
-/**
- * GreetService.MapIntSliceIntInMapIntSliceIntOut
- *
- * @param _in {map}
- * @returns {Promise}
- **/
-function MapIntSliceIntInMapIntSliceIntOut(_in) {
- return wails.Call(GreetService("MapIntSliceIntInMapIntSliceIntOut", _in));
-}
-
-/**
- * GreetService.NoInputsStringOut
- *
- *
- * @returns {Promise}
- **/
-function NoInputsStringOut() {
- return wails.Call(GreetService("NoInputsStringOut"));
-}
-
-/**
- * GreetService.PointerBoolInBoolOut
- *
- * @param _in {boolean | null}
- * @returns {Promise}
- **/
-function PointerBoolInBoolOut(_in) {
- return wails.Call(GreetService("PointerBoolInBoolOut", _in));
-}
-
-/**
- * GreetService.PointerFloat32InFloat32Out
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function PointerFloat32InFloat32Out(_in) {
- return wails.Call(GreetService("PointerFloat32InFloat32Out", _in));
-}
-
-/**
- * GreetService.PointerFloat64InFloat64Out
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function PointerFloat64InFloat64Out(_in) {
- return wails.Call(GreetService("PointerFloat64InFloat64Out", _in));
-}
-
-/**
- * GreetService.PointerMapIntInt
- *
- * @param _in {map | null}
- * @returns {Promise}
- **/
-function PointerMapIntInt(_in) {
- return wails.Call(GreetService("PointerMapIntInt", _in));
-}
-
-/**
- * GreetService.PointerStringInStringOut
- *
- * @param _in {string | null}
- * @returns {Promise}
- **/
-function PointerStringInStringOut(_in) {
- return wails.Call(GreetService("PointerStringInStringOut", _in));
-}
-
-/**
- * GreetService.StringArrayInputNamedOutput
- *
- * @param _in {string[]}
- * @returns {Promise}
- **/
-function StringArrayInputNamedOutput(_in) {
- return wails.Call(GreetService("StringArrayInputNamedOutput", _in));
-}
-
-/**
- * GreetService.StringArrayInputNamedOutputs
- *
- * @param _in {string[]}
- * @returns {Promise}
- **/
-function StringArrayInputNamedOutputs(_in) {
- return wails.Call(GreetService("StringArrayInputNamedOutputs", _in));
-}
-
-/**
- * GreetService.StringArrayInputStringArrayOut
- *
- * @param _in {string[]}
- * @returns {Promise}
- **/
-function StringArrayInputStringArrayOut(_in) {
- return wails.Call(GreetService("StringArrayInputStringArrayOut", _in));
-}
-
-/**
- * GreetService.StringArrayInputStringOut
- *
- * @param _in {string[]}
- * @returns {Promise}
- **/
-function StringArrayInputStringOut(_in) {
- return wails.Call(GreetService("StringArrayInputStringOut", _in));
-}
-
-/**
- * GreetService.StructInputStructOutput
- *
- * @param _in {main.Person}
- * @returns {Promise}
- **/
-function StructInputStructOutput(_in) {
- return wails.Call(GreetService("StructInputStructOutput", _in));
-}
-
-/**
- * GreetService.StructPointerInputErrorOutput
- *
- * @param _in {main.Person | null}
- * @returns {Promise}
- **/
-function StructPointerInputErrorOutput(_in) {
- return wails.Call(GreetService("StructPointerInputErrorOutput", _in));
-}
-
-/**
- * GreetService.StructPointerInputStructPointerOutput
- *
- * @param _in {main.Person | null}
- * @returns {Promise}
- **/
-function StructPointerInputStructPointerOutput(_in) {
- return wails.Call(GreetService("StructPointerInputStructPointerOutput", _in));
-}
-
-/**
- * GreetService.UInt16InUIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function UInt16InUIntOut(_in) {
- return wails.Call(GreetService("UInt16InUIntOut", _in));
-}
-
-/**
- * GreetService.UInt16PointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function UInt16PointerInAndOutput(_in) {
- return wails.Call(GreetService("UInt16PointerInAndOutput", _in));
-}
-
-/**
- * GreetService.UInt32InUIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function UInt32InUIntOut(_in) {
- return wails.Call(GreetService("UInt32InUIntOut", _in));
-}
-
-/**
- * GreetService.UInt32PointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function UInt32PointerInAndOutput(_in) {
- return wails.Call(GreetService("UInt32PointerInAndOutput", _in));
-}
-
-/**
- * GreetService.UInt64InUIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function UInt64InUIntOut(_in) {
- return wails.Call(GreetService("UInt64InUIntOut", _in));
-}
-
-/**
- * GreetService.UInt64PointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function UInt64PointerInAndOutput(_in) {
- return wails.Call(GreetService("UInt64PointerInAndOutput", _in));
-}
-
-/**
- * GreetService.UInt8InUIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function UInt8InUIntOut(_in) {
- return wails.Call(GreetService("UInt8InUIntOut", _in));
-}
-
-/**
- * GreetService.UInt8PointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function UInt8PointerInAndOutput(_in) {
- return wails.Call(GreetService("UInt8PointerInAndOutput", _in));
-}
-
-/**
- * GreetService.UIntInUIntOut
- *
- * @param _in {number}
- * @returns {Promise}
- **/
-function UIntInUIntOut(_in) {
- return wails.Call(GreetService("UIntInUIntOut", _in));
-}
-
-/**
- * GreetService.UIntPointerInAndOutput
- *
- * @param _in {number | null}
- * @returns {Promise}
- **/
-function UIntPointerInAndOutput(_in) {
- return wails.Call(GreetService("UIntPointerInAndOutput", _in));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- ArrayInt,
- BoolInBoolOut,
- Float32InFloat32Out,
- Float64InFloat64Out,
- Greet,
- Int16InIntOut,
- Int16PointerInAndOutput,
- Int32InIntOut,
- Int32PointerInAndOutput,
- Int64InIntOut,
- Int64PointerInAndOutput,
- Int8InIntOut,
- Int8PointerInAndOutput,
- IntInIntOut,
- IntPointerInAndOutput,
- IntPointerInputNamedOutputs,
- MapIntInt,
- MapIntPointerInt,
- MapIntSliceInt,
- MapIntSliceIntInMapIntSliceIntOut,
- NoInputsStringOut,
- PointerBoolInBoolOut,
- PointerFloat32InFloat32Out,
- PointerFloat64InFloat64Out,
- PointerMapIntInt,
- PointerStringInStringOut,
- StringArrayInputNamedOutput,
- StringArrayInputNamedOutputs,
- StringArrayInputStringArrayOut,
- StringArrayInputStringOut,
- StructInputStructOutput,
- StructPointerInputErrorOutput,
- StructPointerInputStructPointerOutput,
- UInt16InUIntOut,
- UInt16PointerInAndOutput,
- UInt32InUIntOut,
- UInt32PointerInAndOutput,
- UInt64InUIntOut,
- UInt64PointerInAndOutput,
- UInt8InUIntOut,
- UInt8PointerInAndOutput,
- UIntInUIntOut,
- UIntPointerInAndOutput,
- },
-};
-
diff --git a/v3/internal/parser/testdata/struct_literal_single/main.go b/v3/internal/parser/testdata/struct_literal_single/main.go
deleted file mode 100644
index 2438a69cb25..00000000000
--- a/v3/internal/parser/testdata/struct_literal_single/main.go
+++ /dev/null
@@ -1,205 +0,0 @@
-package main
-
-import (
- _ "embed"
- "log"
- "strings"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-type Person struct {
- Name string
- Parent *Person
- Details struct {
- Age int
- Address struct {
- Street string
- }
- }
-}
-
-// GreetService is great
-type GreetService struct {
- SomeVariable int
- lowerCase string
-}
-
-// Greet someone
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
-
-func (*GreetService) NoInputsStringOut() string {
- return "Hello"
-}
-
-func (*GreetService) StringArrayInputStringOut(in []string) string {
- return strings.Join(in, ",")
-}
-
-func (*GreetService) StringArrayInputStringArrayOut(in []string) []string {
- return in
-}
-
-func (*GreetService) StringArrayInputNamedOutput(in []string) (output []string) {
- return in
-}
-
-func (*GreetService) StringArrayInputNamedOutputs(in []string) (output []string, err error) {
- return in, nil
-}
-
-func (*GreetService) IntPointerInputNamedOutputs(in *int) (output *int, err error) {
- return in, nil
-}
-
-func (*GreetService) UIntPointerInAndOutput(in *uint) *uint {
- return in
-}
-
-func (*GreetService) UInt8PointerInAndOutput(in *uint8) *uint8 {
- return in
-}
-
-func (*GreetService) UInt16PointerInAndOutput(in *uint16) *uint16 {
- return in
-}
-
-func (*GreetService) UInt32PointerInAndOutput(in *uint32) *uint32 {
- return in
-}
-
-func (*GreetService) UInt64PointerInAndOutput(in *uint64) *uint64 {
- return in
-}
-
-func (*GreetService) IntPointerInAndOutput(in *int) *int {
- return in
-}
-
-func (*GreetService) Int8PointerInAndOutput(in *int8) *int8 {
- return in
-}
-
-func (*GreetService) Int16PointerInAndOutput(in *int16) *int16 {
- return in
-}
-
-func (*GreetService) Int32PointerInAndOutput(in *int32) *int32 {
- return in
-}
-
-func (*GreetService) Int64PointerInAndOutput(in *int64) *int64 {
- return in
-}
-
-func (*GreetService) IntInIntOut(in int) int {
- return in
-}
-
-func (*GreetService) Int8InIntOut(in int8) int8 {
- return in
-}
-func (*GreetService) Int16InIntOut(in int16) int16 {
- return in
-}
-func (*GreetService) Int32InIntOut(in int32) int32 {
- return in
-}
-func (*GreetService) Int64InIntOut(in int64) int64 {
- return in
-}
-
-func (*GreetService) UIntInUIntOut(in uint) uint {
- return in
-}
-
-func (*GreetService) UInt8InUIntOut(in uint8) uint8 {
- return in
-}
-func (*GreetService) UInt16InUIntOut(in uint16) uint16 {
- return in
-}
-func (*GreetService) UInt32InUIntOut(in uint32) uint32 {
- return in
-}
-func (*GreetService) UInt64InUIntOut(in uint64) uint64 {
- return in
-}
-
-func (*GreetService) Float32InFloat32Out(in float32) float32 {
- return in
-}
-
-func (*GreetService) Float64InFloat64Out(in float64) float64 {
- return in
-}
-
-func (*GreetService) PointerFloat32InFloat32Out(in *float32) *float32 {
- return in
-}
-
-func (*GreetService) PointerFloat64InFloat64Out(in *float64) *float64 {
- return in
-}
-
-func (*GreetService) BoolInBoolOut(in bool) bool {
- return in
-}
-
-func (*GreetService) PointerBoolInBoolOut(in *bool) *bool {
- return in
-}
-
-func (*GreetService) PointerStringInStringOut(in *string) *string {
- return in
-}
-
-func (*GreetService) StructPointerInputErrorOutput(in *Person) error {
- return nil
-}
-
-func (*GreetService) StructInputStructOutput(in Person) Person {
- return in
-}
-
-func (*GreetService) StructPointerInputStructPointerOutput(in *Person) *Person {
- return in
-}
-
-func (*GreetService) MapIntInt(in map[int]int) {
-}
-
-func (*GreetService) PointerMapIntInt(in *map[int]int) {
-}
-
-func (*GreetService) MapIntPointerInt(in map[*int]int) {
-}
-
-func (*GreetService) MapIntSliceInt(in map[int][]int) {
-}
-
-func (*GreetService) MapIntSliceIntInMapIntSliceIntOut(in map[int][]int) (out map[int][]int) {
- return nil
-}
-
-func (*GreetService) ArrayInt(in [4]int) {
-}
-
-func main() {
- app := application.New(application.Options{
- Bind: []interface{}{
- &GreetService{},
- },
- })
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/internal/parser/testdata/struct_literal_single/models.ts b/v3/internal/parser/testdata/struct_literal_single/models.ts
deleted file mode 100644
index 91bab56aca2..00000000000
--- a/v3/internal/parser/testdata/struct_literal_single/models.ts
+++ /dev/null
@@ -1,64 +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;
- parent: Person;
- details: anon1;
-
- static createFrom(source: any = {}) {
- return new Person(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.name = source['name'];
- this.parent = Person.createFrom(source['parent']);
- this.details = anon1.createFrom(source['details']);
-
- }
- }
-
- export class anon1 {
- age: number;
- address: anon2;
-
- static createFrom(source: any = {}) {
- return new anon1(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.age = source['age'];
- this.address = anon2.createFrom(source['address']);
-
- }
- }
-
- export class anon2 {
- street: string;
-
- static createFrom(source: any = {}) {
- return new anon2(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.street = source['street'];
-
- }
- }
-
-}
diff --git a/v3/internal/parser/testdata/variable_single/bindings_main.js b/v3/internal/parser/testdata/variable_single/bindings_main.js
deleted file mode 100644
index 0a156d14949..00000000000
--- a/v3/internal/parser/testdata/variable_single/bindings_main.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.Greet
- * Greet someone
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- Greet,
- },
-};
diff --git a/v3/internal/parser/testdata/variable_single/main.go b/v3/internal/parser/testdata/variable_single/main.go
deleted file mode 100644
index baffd783cff..00000000000
--- a/v3/internal/parser/testdata/variable_single/main.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package main
-
-import (
- _ "embed"
- "github.com/wailsapp/wails/v3/pkg/application"
- "log"
-)
-
-// GreetService is great
-type GreetService struct {
- SomeVariable int
- lowerCase string
-}
-
-// Greet someone
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
-
-func main() {
- greetService := &GreetService{}
- app := application.New(application.Options{
- Bind: []interface{}{
- greetService,
- },
- })
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/internal/parser/testdata/variable_single/models.ts b/v3/internal/parser/testdata/variable_single/models.ts
deleted file mode 100644
index 0817f259bce..00000000000
--- a/v3/internal/parser/testdata/variable_single/models.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-// TODO : nothing generated yet
\ No newline at end of file
diff --git a/v3/internal/parser/testdata/variable_single_from_function/bindings_main.js b/v3/internal/parser/testdata/variable_single_from_function/bindings_main.js
deleted file mode 100644
index 0a156d14949..00000000000
--- a/v3/internal/parser/testdata/variable_single_from_function/bindings_main.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.Greet
- * Greet someone
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- Greet,
- },
-};
diff --git a/v3/internal/parser/testdata/variable_single_from_function/main.go b/v3/internal/parser/testdata/variable_single_from_function/main.go
deleted file mode 100644
index 0d7121ca943..00000000000
--- a/v3/internal/parser/testdata/variable_single_from_function/main.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package main
-
-import (
- _ "embed"
- "github.com/wailsapp/wails/v3/pkg/application"
- "log"
-)
-
-// GreetService is great
-type GreetService struct {
- SomeVariable int
- lowerCase string
-}
-
-// Greet someone
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
-
-func NewGreetService() *GreetService {
- return &GreetService{}
-}
-
-func main() {
- greetService := NewGreetService()
- app := application.New(application.Options{
- Bind: []interface{}{
- greetService,
- },
- })
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/internal/parser/testdata/variable_single_from_function/models.ts b/v3/internal/parser/testdata/variable_single_from_function/models.ts
deleted file mode 100644
index 0817f259bce..00000000000
--- a/v3/internal/parser/testdata/variable_single_from_function/models.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-// TODO : nothing generated yet
\ No newline at end of file
diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/bindings_main.js b/v3/internal/parser/testdata/variable_single_from_other_function/bindings_main.js
deleted file mode 100644
index 53a8198852d..00000000000
--- a/v3/internal/parser/testdata/variable_single_from_other_function/bindings_main.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-import {main} from './models';
-
-function GreetService(method) {
- return {
- packageName: "main",
- serviceName: "GreetService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * GreetService.Greet
- * Greet does XYZ
- * @param name {string}
- * @returns {Promise}
- **/
-function Greet(name) {
- return wails.Call(GreetService("Greet", name));
-}
-
-/**
- * GreetService.NewPerson
- * NewPerson creates a new person
- * @param name {string}
- * @returns {Promise}
- **/
-function NewPerson(name) {
- return wails.Call(GreetService("NewPerson", name));
-}
-
-window.go = window.go || {};
-window.go.main = {
- GreetService: {
- Greet,
- NewPerson,
- },
-};
-
diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/bindings_services.js b/v3/internal/parser/testdata/variable_single_from_other_function/bindings_services.js
deleted file mode 100644
index 48e7ed65221..00000000000
--- a/v3/internal/parser/testdata/variable_single_from_other_function/bindings_services.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// @ts-check
-// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
-// This file is automatically generated. DO NOT EDIT
-
-import {services} from './models';
-
-function OtherService(method) {
- return {
- packageName: "services",
- serviceName: "OtherService",
- methodName: method,
- args: Array.prototype.slice.call(arguments, 1),
- };
-}
-
-/**
- * OtherService.Yay
- *
- *
- * @returns {Promise}
- **/
-function Yay() {
- return wails.Call(OtherService("Yay"));
-}
-
-window.go = window.go || {};
-window.go.services = {
- OtherService: {
- Yay,
- },
-};
-
diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/main.go b/v3/internal/parser/testdata/variable_single_from_other_function/main.go
deleted file mode 100644
index 9d10a301ec5..00000000000
--- a/v3/internal/parser/testdata/variable_single_from_other_function/main.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package main
-
-import (
- _ "embed"
- "github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-// GreetService is great
-type GreetService struct {
- SomeVariable int
- lowerCase string
- target *Person
-}
-
-type Person struct {
- Name string
- Address *services.Address
-}
-
-// Greet does XYZ
-func (*GreetService) Greet(name string) string {
- return "Hello " + name
-}
-
-// NewPerson creates a new person
-func (*GreetService) NewPerson(name string) *Person {
- return &Person{Name: name}
-}
-
-func main() {
- otherService := services.NewOtherService()
- app := application.New(application.Options{
- Bind: []interface{}{
- &GreetService{},
- otherService,
- },
- })
-
- app.NewWebviewWindow()
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-
-}
diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/models.ts b/v3/internal/parser/testdata/variable_single_from_other_function/models.ts
deleted file mode 100644
index a6639f8ebb4..00000000000
--- a/v3/internal/parser/testdata/variable_single_from_other_function/models.ts
+++ /dev/null
@@ -1,51 +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;
-
- static createFrom(source: any = {}) {
- return new Person(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.name = source['name'];
- this.address = services.Address.createFrom(source['address']);
-
- }
- }
-
-}
-
-export namespace services {
-
- export class Address {
- street: string;
- state: string;
- country: string;
-
- static createFrom(source: any = {}) {
- return new Address(source);
- }
-
- constructor(source: any = {}) {
- if ('string' === typeof source) {
- source = JSON.parse(source);
- }
-
- this.street = source['street'];
- this.state = source['state'];
- this.country = source['country'];
-
- }
- }
-
-}
diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/services/other.go b/v3/internal/parser/testdata/variable_single_from_other_function/services/other.go
deleted file mode 100644
index 2daa9df17a2..00000000000
--- a/v3/internal/parser/testdata/variable_single_from_other_function/services/other.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package services
-
-// OtherService is a struct
-// that does things
-type OtherService struct {
- t int
-}
-
-type Address struct {
- Street string
- State string
- Country string
-}
-
-// Yay does this and that
-func (o *OtherService) Yay() *Address {
- return &Address{
- Street: "123 Pitt Street",
- State: "New South Wales",
- Country: "Australia",
- }
-}
-
-func NewOtherService() *OtherService {
- return &OtherService{}
-}
diff --git a/v3/internal/plugins/plugins.go b/v3/internal/plugins/plugins.go
deleted file mode 100644
index 05de5f9087a..00000000000
--- a/v3/internal/plugins/plugins.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package plugins
-
-import (
- "embed"
- "fmt"
- "io/fs"
- "os"
- "path/filepath"
-
- "github.com/wailsapp/wails/v3/internal/flags"
-
- "github.com/leaanthony/gosod"
-
- "github.com/samber/lo"
-)
-
-//go:embed template
-var pluginTemplate embed.FS
-
-type TemplateOptions struct {
- *flags.PluginInit
-}
-
-func Install(options *flags.PluginInit) error {
-
- if options.OutputDir == "." || options.OutputDir == "" {
- options.OutputDir = filepath.Join(lo.Must(os.Getwd()), options.Name)
- }
- fmt.Printf("Creating plugin '%s' into '%s'\n", options.Name, options.OutputDir)
- tfs, err := fs.Sub(pluginTemplate, "template")
- if err != nil {
- return err
- }
-
- return gosod.New(tfs).Extract(options.OutputDir, options)
-}
diff --git a/v3/internal/plugins/template/NEXT STEPS.md b/v3/internal/plugins/template/NEXT STEPS.md
deleted file mode 100644
index e58c6b119c9..00000000000
--- a/v3/internal/plugins/template/NEXT STEPS.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# Next Steps
-
-Congratulations on generating a plugin. This guide will help you author your plugin
-and provide some tips on how to get started.
-
-## Plugin Structure
-
-The plugin is a standard Go module that adheres to the following interface:
-
-```go
-type Plugin interface {
- Name() string
- Init(app *App) error
- Shutdown()
-}
-```
-
-The `Name()` method returns the name of the plugin. It should follow the Go module naming convention
-and have a prefix of `wails-plugin-`, e.g. `github.com/myuser/wails-plugin-example`.
-
-The `Init()` method is called when the plugin is loaded. The `App` parameter is a pointer to the
-main application struct. This may be used for showing dialogs, listening for events or even opening
-new windows. The `Init()` method should return an error if it fails to initialise. This method is
-called synchronously so the application will not start until it returns.
-
-The `Shutdown()` method is called when the application is shutting down. This is a good place to
-perform any cleanup. This method is called synchronously so the application will not exit completely until
-it returns.
-
-## Plugin Directory Structure
-
-The plugin directory structure is as follows:
-
-```
-plugin-name
-├── models.d.ts
-├── plugin.js
-├── plugin.go
-├── README.md
-├── go.mod
-├── go.sum
-└── plugin.toml
-```
-
-### `plugin.go`
-
-This file contains the plugin code. It should contain a struct that implements the `Plugin` interface
-and a `NewPlugin()` method that returns a pointer to the struct. Methods are exported by capitalising
-the first letter of the method name. These methods may be called from the frontend. If methods
-accept or return structs, these structs must be exported.
-
-### `plugin.js`
-
-This file should contain any JavaScript code that may help developers use the plugin.
-In the example plugin, this file contains function wrappers for the plugin methods.
-It's good to include JSDocs as that will help developers using your plugin.
-
-### `models.d.ts`
-
-This file should contain TypeScript definitions for any structs that are passed
-or returned from the plugin.
-`
-### `plugin.toml`
-
-This file contains the plugin metadata. It is important to fill this out correctly
-as it will be used by the Wails CLI.
-
-### `README.md`
-
-This file should contain a description of the plugin and how to use it. It should
-also contain a link to the plugin repository and how to report bugs.
-
-### `go.mod` and `go.sum`
-
-These are standard Go module files. The package name in `go.mod` should match the
-name of the plugin, e.g. `github.com/myuser/wails-plugin-example`.
-
-## Promoting your Plugin
-
-Once you have created your plugin, you should promote it on the Wails Discord server
-in the `#plugins` channel. You should also open a PR to promote your plugin on the Wails
-website. Update the `website/content/plugins.md` file and add your plugin to the list.
\ No newline at end of file
diff --git a/v3/internal/plugins/template/README.tmpl.md b/v3/internal/plugins/template/README.tmpl.md
deleted file mode 100644
index 2f4944a3d98..00000000000
--- a/v3/internal/plugins/template/README.tmpl.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# {{.Name}} Plugin
-
-This example plugin provides a way to generate hashes of strings.
-
-## Installation
-
-Add the plugin to the `Plugins` option in the Applications options:
-
-```go
- Plugins: map[string]application.Plugin{
- "{{.Name}}": {{.Name}}.NewPlugin(),
- },
-```
-
-## Usage
-
-You can then call the methods from the frontend:
-
-```js
- wails.Plugin("{{.Name}}","All","hello world").then((result) => console.log(result))
-```
-
-This method returns a struct with the following fields:
-
-```typescript
- interface Hashes {
- MD5: string;
- SHA1: string;
- SHA256: string;
- }
-```
-
-A TypeScript definition file is provided for this interface.
-
-## Support
-
-If you find a bug in this plugin, please raise a ticket [here](https://github.com/plugin/repository).
-Please do not contact the Wails team for support.
\ No newline at end of file
diff --git a/v3/internal/plugins/template/go.mod.tmpl b/v3/internal/plugins/template/go.mod.tmpl
deleted file mode 100644
index 77249136ff5..00000000000
--- a/v3/internal/plugins/template/go.mod.tmpl
+++ /dev/null
@@ -1,13 +0,0 @@
-module {{.Name}}
-
-go 1.20
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/imdario/mergo v0.3.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
-)
diff --git a/v3/internal/plugins/template/go.sum b/v3/internal/plugins/template/go.sum
deleted file mode 100644
index 29c7b303e87..00000000000
--- a/v3/internal/plugins/template/go.sum
+++ /dev/null
@@ -1,22 +0,0 @@
-github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
-github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 h1:Wn+nhnS+VytzE0PegUzSh4T3hXJCtggKGD/4U5H9+wQ=
-github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6/go.mod h1:zlNLI0E2c2qA6miiuAHtp0Bac8FaGH0tlhA19OssR/8=
-github.com/wailsapp/wails/v3 v3.0.0-alpha.0 h1:T5gqG98Xr8LBf69oxlPkhpsFD59w2SnqUZk6XHj8Zoc=
-github.com/wailsapp/wails/v3 v3.0.0-alpha.0/go.mod h1:OAfO5bP0TSUvCIHZYc6Dqfow/9RqxzHvYtmhWPpo1c0=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
-golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/v3/internal/plugins/template/models.d.ts.tmpl b/v3/internal/plugins/template/models.d.ts.tmpl
deleted file mode 100644
index 567c91d7030..00000000000
--- a/v3/internal/plugins/template/models.d.ts.tmpl
+++ /dev/null
@@ -1,10 +0,0 @@
-// models.d.ts
-// This file should contain any models that are used by the plugin.
-
-export namespace {{.Name}}Plugin {
- export interface Hashes {
- MD5: string;
- SHA1: string;
- SHA256: string;
- }
-}
\ No newline at end of file
diff --git a/v3/internal/plugins/template/plugin.go.tmpl b/v3/internal/plugins/template/plugin.go.tmpl
deleted file mode 100644
index e8104f2bd5a..00000000000
--- a/v3/internal/plugins/template/plugin.go.tmpl
+++ /dev/null
@@ -1,67 +0,0 @@
-package {{.Name}}
-
-import (
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-// ---------------- Plugin Setup ----------------
-// This is the main plugin struct. It can be named anything you like.
-// It must implement the application.Plugin interface.
-// Both the Init() and Shutdown() methods are called synchronously when the app starts and stops.
-
-type Config struct {
- // Add any configuration options here
-}
-
-type Plugin struct{
- config *Config
- app *application.App
-}
-
-func NewPlugin(config *Config) *Plugin {
- return &Plugin{
- config: config,
- }
-}
-
-// Shutdown is called when the app is shutting down
-// You can use this to clean up any resources you have allocated
-func (p *Plugin) Shutdown() {}
-
-// Name returns the name of the plugin.
-// You should use the go module format e.g. github.com/myuser/myplugin
-func (p *Plugin) Name() string {
- return "github.com/myuser/{{.Name}}"
-}
-
-// Init is called when the app is starting up. You can use this to
-// initialise any resources you need. You can also access the application
-// instance via the app property.
-func (p *Plugin) Init(app *application.App) error {
- p.app = app
- return nil
-}
-
-// Exported returns a list of exported methods that can be called from the frontend
-func (p *Plugin) CallableByJS() []string {
- return []string{
- "Greet",
- }
-}
-
-// InjectJS returns any JS that should be injected into the frontend
-func (p *Plugin) InjectJS() string {
- return ""
-}
-
-// ---------------- Plugin Methods ----------------
-// Plugin methods are just normal Go methods. You can add as many as you like.
-// The only requirement is that they are exported (start with a capital letter).
-// You can also return any type that is JSON serializable.
-// Any methods that you want to be callable from the frontend must be returned by the
-// CallableByJS() method above.
-// See https://golang.org/pkg/encoding/json/#Marshal for more information.
-
-func (p *Plugin) Greet(name string) string {
- return "Hello " + name
-}
diff --git a/v3/internal/plugins/template/plugin.tmpl.js b/v3/internal/plugins/template/plugin.tmpl.js
deleted file mode 100644
index c62bbb6e72a..00000000000
--- a/v3/internal/plugins/template/plugin.tmpl.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// plugin.js
-// This file should contain helper functions for the that can be used by the frontend.
-// Below are examples of how to use JSDoc to define the Hashes struct and the exported functions.
-
-/**
- * @typedef {Object} Hashes - A collection of hashes.
- * @property {string} md5 - The MD5 hash of a string, represented as a hexadecimal string.
- * @property {string} sha1 - The SHA-1 hash of a string, represented as a hexadecimal string.
- * @property {string} sha256 - The SHA-256 hash of a string, represented as a hexadecimal string.
- */
-
-/**
- * Generate all hashes for a string.
- * @param input {string} - The string to generate hashes for.
- * @returns {Promise}
- */
-export function All(input) {
- return wails.Plugin("{{.Name}}", "All", input);
-}
-
-/**
- * Generate the MD5 hash for a string.
- * @param input {string} - The string to generate the hash for.
- * @returns {Promise}
- */
-export function MD5(input) {
- return wails.Plugin("{{.Name}}", "MD5", input);
-}
-
-/**
- * Generate the SHA-1 hash for a string.
- * @param input {string} - The string to generate the hash for.
- * @returns {Promise}
- */
-export function SHA1(input) {
- return wails.Plugin("{{.Name}}", "SHA1", input);
-}
-
-/**
- * Generate the SHA-256 hash for a string.
- * @param input {string} - The string to generate the hash for.
- * @returns {Promise}
- */
-export function SHA256(input) {
- return wails.Plugin("{{.Name}}", "SHA256", input);
-}
\ No newline at end of file
diff --git a/v3/internal/plugins/template/plugin.tmpl.toml b/v3/internal/plugins/template/plugin.tmpl.toml
deleted file mode 100644
index 76e7aa384b8..00000000000
--- a/v3/internal/plugins/template/plugin.tmpl.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-# This is the plugin definition file for the "{{.Name}}" plugin.
-
-Name = "{{.Name}}"
-Description = "{{.Description}}"
-Author = ""
-Version = ""
-Website = ""
-Repository = ""
-License = ""
-
-
diff --git a/v3/internal/runtime/README.md b/v3/internal/runtime/README.md
deleted file mode 100644
index f6c2f249b34..00000000000
--- a/v3/internal/runtime/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Runtime
-
-To rebuild the runtime run `task build-runtime` or if you have Wails v3 CLI, you can use `wails task build-runtime`.
diff --git a/v3/internal/runtime/assets.go b/v3/internal/runtime/assets.go
deleted file mode 100644
index fb3f09ebe66..00000000000
--- a/v3/internal/runtime/assets.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build production
-
-package runtime
-
-var RuntimeAssetsBundle = &RuntimeAssets{
- runtimeDesktopJS: DesktopRuntime,
-}
-
-type RuntimeAssets struct {
- runtimeDesktopJS []byte
-}
-
-func (r *RuntimeAssets) DesktopIPC() []byte {
- return []byte("")
-}
-
-func (r *RuntimeAssets) WebsocketIPC() []byte {
- return []byte("")
-}
-
-func (r *RuntimeAssets) RuntimeDesktopJS() []byte {
- return r.runtimeDesktopJS
-}
diff --git a/v3/internal/runtime/assets_dev.go b/v3/internal/runtime/assets_dev.go
deleted file mode 100644
index c5e5ffe7d5c..00000000000
--- a/v3/internal/runtime/assets_dev.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build !production
-
-package runtime
-
-var RuntimeAssetsBundle = &RuntimeAssets{
- runtimeDesktopJS: DesktopRuntime,
-}
-
-type RuntimeAssets struct {
- runtimeDesktopJS []byte
-}
-
-func (r *RuntimeAssets) DesktopIPC() []byte {
- return []byte("")
-}
-
-func (r *RuntimeAssets) WebsocketIPC() []byte {
- return []byte("")
-}
-
-func (r *RuntimeAssets) RuntimeDesktopJS() []byte {
- return r.runtimeDesktopJS
-}
diff --git a/v3/internal/runtime/desktop/README.md b/v3/internal/runtime/desktop/README.md
deleted file mode 100644
index bd4d5d0ab5b..00000000000
--- a/v3/internal/runtime/desktop/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# README
-
-After updating any files in this directory, you must run `wails task build-runtime` to regenerate the compiled JS.
\ No newline at end of file
diff --git a/v3/internal/runtime/desktop/api/README.md b/v3/internal/runtime/desktop/api/README.md
deleted file mode 100644
index 0cb344e83a0..00000000000
--- a/v3/internal/runtime/desktop/api/README.md
+++ /dev/null
@@ -1,363 +0,0 @@
-# Wails API
-
-This package provides a typed Javascript API for Wails applications.
-
-It provides methods for the following components:
-
-- [Dialog](#dialog)
-- [Events](#events)
-- [Window](#window)
-- [Plugin](#plugin)
-- [Screens](#screens)
-- [Application](#application)
-
-## Installation
-
-In your Wails application, run the following command in the frontend project directory:
-
-```bash
-npm install -D @wailsapp/api
-```
-
-## Usage
-
-Import the API into your application:
-
-```javascript
-import * as Wails from "@wailsapp/api";
-```
-
-Then use the API components:
-
-```javascript
-function showDialog() {
- Wails.Dialog.Info({
- Title: "Hello",
- }).then((result) => {
- console.log("Result: " + result);
- });
-}
-```
-
-Individual components of the API can also be imported directly.
-
-
-
-## API
-
-### Dialog
-
-The Dialog API provides access to the native system dialogs.
-
-```javascript
-import { Dialog } from "@wailsapp/api";
-
-function example() {
- Dialog.Info({
- Title: "Hello",
- }).then((result) => {
- console.log("Result: " + result);
- });
-}
-```
-
-#### Message Dialogs
-
-Message dialogs are used to display a message to the user.
-They can be used to display information, errors, warnings and questions.
-Each method returns the button that was pressed by the user.
-
-- `Info(options: MessageDialogOptions): Promise`
-- `Error(options: MessageDialogOptions): Promise`
-- `Warning(options: MessageDialogOptions): Promise`
-- `Question(options: MessageDialogOptions): Promise`
-
-#### Open Dialog
-
-The Open Dialog is used to open a file or directory. It returns the path of the selected file or directory.
-If the `AllowsMultipleFiles` option is set, multiple files or directories can be selected and are returned
-as an array of file paths.
-
-- `Open(options: OpenDialogOptions): Promise`
-
-#### Save Dialog
-
-The Save Dialog is used to save a file. It returns the path of the selected file.
-
-- `Save(options: SaveDialogOptions): Promise`
-
-### Events
-
-The Events API provides access to the Wails event system. This is a global event system
-that can be used to send events between the Go and Javascript.
-Events are available to every window in a multi-window application.
-These API methods are specific to the window in which they are called in.
-
-```javascript
-import { Events } from "@wailsapp/api";
-
-function example() {
- // Emit an event
- Events.Emit("myevent", { message: "Hello" });
-
- // Subscribe to an event
- let unsub = Events.On("otherEvent", (data) => {
- console.log("Received event: " + data);
- });
-
- // Unsubscribe from the event
- unsub();
-}
-```
-
-#### Emit
-
-Emit an event with optional data.
-
-- `Emit(eventName: string, data?: any): void`
-
-#### Subscribe
-
-Three methods are provided to subscribe to an event:
- - `On(eventName: string, callback: (data: any) => void): () => void` - Subscribe to all events of the given name
- - `Once(eventName: string, callback: (data: any) => void): () => void` - Subscribe to one event of the given name
- - `OnMultiple(eventName: string, callback: (data: any) => void, count: number): () => void` - Subscribe to multiple events of the given name
-
-The callback will be called when the event is emitted.
-The returned function can be called to unsubscribe from the event.
-
-#### Unsubscribe
-
-As well as unsubscribing from a single event, you can unsubscribe from events of a given name or all events.
- - `Off(eventName: string, additionalEventNames: ...string): void` - Unsubscribe from all events of the given name(s)
- - `OffAll(): void` - Unsubscribe all events
-
-### Window
-
-The Window API provides a number of methods that interact with the window in which the API is called.
-
-- `Center: (void) => void` - Center the window
-- `SetTitle: (title) => void` - Set the window title
-- `Fullscreen: () => void` - Set the window to fullscreen
-- `UnFullscreen: () => void` - Restore a fullscreen window
-- `SetSize: (width: number, height: number) => void` - Set the window size
-- `Size: () => Size` - Get the window size
-- `SetMaxSize: (width, height) => void` - Set the window maximum size
-- `SetMinSize: (width, height) => void` - Set the window minimum size
-- `SetAlwaysOnTop: (onTop) => void` - Set window to be always on top
-- `SetPosition: (x, y) => void` - Set the window position
-- `Position: () => Position` - Get the window position
-- `SetResizable: (resizable) => void` - Set whether the window is resizable
-- `Screen: () => Screen` - Get information about the screen the window is on
-- `Hide: () => void` - Hide the window
-- `Show: () => void` - Show the window
-- `Maximise: () => void` - Maximise the window
-- `Close: () => void` - Close the window
-- `ToggleMaximise: () => void` - Toggle the window maximise state
-- `UnMaximise: () => void` - UnMaximise the window
-- `Minimise: () => void` - Minimise the window
-- `UnMinimise: () => void` - UnMinimise the window
-- `SetBackgroundColour: (r, g, b, a) => void` - Set the background colour of the window
-
-### Plugin
-
-The Plugin API provides access to the Wails plugin system.
-This method provides the ability to call a plugin method from the frontend.
-
-```javascript
-
-import { Plugin } from "@wailsapp/api";
-
-function example() {
- // Call a plugin method
- Plugin.Call("myplugin", "MyMethod", { message: "Hello" }).then((result) => {
- console.log("Result: " + result);
- });
-}
-```
-
-### Screens
-
-The Screens API provides access to the Wails screen system.
-
-```javascript
-import { Screens } from "@wailsapp/api";
-
-function example() {
- // Get all attatched screens
- Screens.GetAll().then((screens) => {
- console.log("Screens: " + screens);
- });
-
- // Get the primary screen
- Screens.GetPrimary().then((screen) => {
- console.log("Primary screen: " + screen);
- });
-
- // Get the screen the window is on
- Screens.GetCurrent().then((screen) => {
- console.log("Window screen: " + screen);
- });
-}
-```
-
-- `GetAll: () => Promise` - Get all screens
-- `GetPrimary: () => Promise` - Get the primary screen
-- `GetCurrent: () => Promise` - Get the screen the window is on
-
-### Application
-
-The Application API provides access to the Wails application system.
-
-```javascript
-import { Application } from "@wailsapp/api";
-
-function example() {
-
- // Hide the application
- Application.Hide();
-
- // Shopw the application
- Application.Show();
-
- // Quit the application
- Application.Quit();
-
-}
-```
-
-- `Hide: () => void` - Hide the application
-- `Show: () => void` - Show the application
-- `Quit: () => void` - Quit the application
-
-## Types
-
-This is a comprehensive list of types used by the Wails API.
-
-```typescript
-
-export interface Button {
- // The label of the button
- Label?: string;
- // True if this button is the cancel button (selected when pressing escape)
- IsCancel?: boolean;
- // True if this button is the default button (selected when pressing enter)
- IsDefault?: boolean;
-}
-
-interface MessageDialogOptions {
- // The title for the dialog
- Title?: string;
- // The message to display
- Message?: string;
- // The buttons to use on the dialog
- Buttons?: Button[];
-}
-
-export interface OpenFileDialogOptions {
- // Allows the user to be able to select directories
- CanChooseDirectories?: boolean;
- // Allows the user to be able to select files
- CanChooseFiles?: boolean;
- // Provide an option to create directories in the dialog
- CanCreateDirectories?: boolean;
- // Makes the dialog show hidden files
- ShowHiddenFiles?: boolean;
- // Whether the dialog should follow filesystem aliases
- ResolvesAliases?: boolean;
- // Allow the user to select multiple files or directories
- AllowsMultipleSelection?: boolean;
- // Hide the extension when showing the filename
- HideExtension?: boolean;
- // Allow the user to select files where the system hides their extensions
- CanSelectHiddenExtension?: boolean;
- // Treats file packages as directories, e.g. .app on macOS
- TreatsFilePackagesAsDirectories?: boolean;
- // Allows selection of filetypes not specified in the filters
- AllowsOtherFiletypes?: boolean;
- // The file filters to use in the dialog
- Filters?: FileFilter[];
- // The title of the dialog
- Title?: string;
- // The message to display
- Message?: string;
- // The label for the select button
- ButtonText?: string;
- // The default directory to open the dialog in
- Directory?: string;
-}
-export interface FileFilter {
- // The display name for the filter, e.g. "Text Files"
- DisplayName?: string;
- // The pattern to use for the filter, e.g. "*.txt;*.md"
- Pattern?: string;
-}
-export interface SaveFileDialogOptions {
- // Provide an option to create directories in the dialog
- CanCreateDirectories?: boolean;
- // Makes the dialog show hidden files
- ShowHiddenFiles?: boolean;
- // Allow the user to select files where the system hides their extensions
- CanSelectHiddenExtension?: boolean;
- // Allows selection of filetypes not specified in the filters
- AllowOtherFiletypes?: boolean;
- // Hide the extension when showing the filename
- HideExtension?: boolean;
- // Treats file packages as directories, e.g. .app on macOS
- TreatsFilePackagesAsDirectories?: boolean;
- // The message to show in the dialog
- Message?: string;
- // The default directory to open the dialog in
- Directory?: string;
- // The default filename to use in the dialog
- Filename?: string;
- // The label for the select button
- ButtonText?: string;
-}
-
-export interface Screen {
- // The screen ID
- Id: string;
- // The screen name
- Name: string;
- // The screen scale. 1 = standard resolution, 2: 2x retina, etc.
- Scale: number;
- // The X position of the screen
- X: number;
- // The Y position of the screen
- Y: number;
- // The width and height of the screen
- Size: Size;
- // The bounds of the screen
- Bounds: Rect;
- // The work area of the screen
- WorkArea: Rect;
- // True if this is the primary screen
- IsPrimary: boolean;
- // The rotation of the screen
- Rotation: number;
-}
-export interface Rect {
- X: number;
- Y: number;
- Width: number;
- Height: number;
-}
-
-export interface WailsEvent {
- // The name of the event
- Name: string;
- // The data associated with the event
- Data?: any;
-}
-
-export interface Size {
- Width: number;
- Height: number;
-}
-export interface Position {
- X: number;
- Y: number;
-}
-
-```
\ No newline at end of file
diff --git a/v3/internal/runtime/desktop/api/index.js b/v3/internal/runtime/desktop/api/index.js
deleted file mode 100644
index edc34229946..00000000000
--- a/v3/internal/runtime/desktop/api/index.js
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-/* jshint esversion: 9 */
-
-/**
- * @typedef {import("./types").MessageDialogOptions} MessageDialogOptions
- * @typedef {import("./types").OpenDialogOptions} OpenDialogOptions
- * @typedef {import("./types").SaveDialogOptions} SaveDialogOptions
- * @typedef {import("./types").Screen} Screen
- * @typedef {import("./types").Size} Size
- * @typedef {import("./types").Position} Position
- *
- */
-
-/**
- * The Clipboard API provides methods to interact with the system clipboard.
- */
-export const Clipboard = {
- /**
- * Gets the text from the clipboard
- * @returns {Promise}
- */
- Text: () => {
- return wails.Clipboard.Text();
- },
- /**
- * Sets the text on the clipboard
- * @param {string} text - text to set in the clipboard
- */
- SetText: (text) => {
- return wails.Clipboard.SetText(text);
- },
-};
-
-/**
- * The Application API provides methods to interact with the application.
- */
-export const Application = {
- /**
- * Hides the application
- */
- Hide: () => {
- return wails.Application.Hide();
- },
- /**
- * Shows the application
- */
- Show: () => {
- return wails.Application.Show();
- },
- /**
- * Quits the application
- */
- Quit: () => {
- return wails.Application.Quit();
- },
-};
-
-/**
- * The Screens API provides methods to interact with the system screens/monitors.
- */
-export const Screens = {
- /**
- * Get the primary screen
- * @returns {Promise}
- */
- GetPrimary: () => {
- return wails.Screens.GetPrimary();
- },
- /**
- * Get all screens
- * @returns {Promise}
- */
- GetAll: () => {
- return wails.Screens.GetAll();
- },
- /**
- * Get the current screen
- * @returns {Promise}
- */
- GetCurrent: () => {
- return wails.Screens.GetCurrent();
- },
-};
-
-/**
- * Call a plugin method
- * @param {string} pluginName - name of the plugin
- * @param {string} methodName - name of the method
- * @param {...any} args - arguments to pass to the method
- * @returns {Promise} - promise that resolves with the result
- */
-export const Plugin = (pluginName, methodName, ...args) => {
- return wails.Plugin(pluginName, methodName, ...args);
-};
-
-/**
- * The Dialog API provides methods to interact with system dialogs.
- */
-export const Dialog = {
- /**
- * Shows an info dialog
- * @param {MessageDialogOptions} options - options for the dialog
- * @returns {Promise}
- */
- Info: (options) => {
- return wails.Dialog.Info(options);
- },
- /**
- * Shows a warning dialog
- * @param {MessageDialogOptions} options - options for the dialog
- * @returns {Promise}
- */
- Warning: (options) => {
- return wails.Dialog.Warning(options);
- },
- /**
- * Shows an error dialog
- * @param {MessageDialogOptions} options - options for the dialog
- * @returns {Promise}
- */
- Error: (options) => {
- return wails.Dialog.Error(options);
- },
-
- /**
- * Shows a question dialog
- * @param {MessageDialogOptions} options - options for the dialog
- * @returns {Promise}
- */
- Question: (options) => {
- return wails.Dialog.Question(options);
- },
-
- /**
- * Shows a file open dialog and returns the files selected by the user.
- * A blank string indicates that the dialog was cancelled.
- * @param {OpenDialogOptions} options - options for the dialog
- * @returns {Promise|Promise}
- */
- OpenFile: (options) => {
- return wails.Dialog.OpenFile(options);
- },
-
- /**
- * Shows a file save dialog and returns the filename given by the user.
- * A blank string indicates that the dialog was cancelled.
- * @param {SaveDialogOptions} options - options for the dialog
- * @returns {Promise}
- */
- SaveFile: (options) => {
- return wails.Dialog.SaveFile(options);
- },
-};
-
-/**
- * The Events API provides methods to interact with the event system.
- */
-export const Events = {
- /**
- * Emit an event
- * @param {string} name
- * @param {any=} data
- */
- Emit: (name, data) => {
- return wails.Events.Emit(name, data);
- },
- /**
- * Subscribe to an event
- * @param {string} name - name of the event
- * @param {(any) => void} callback - callback to call when the event is emitted
- @returns {function()} unsubscribeMethod - method to unsubscribe from the event
- */
- On: (name, callback) => {
- return wails.Events.On(name, callback);
- },
- /**
- * Subscribe to an event once
- * @param {string} name - name of the event
- * @param {(any) => void} callback - callback to call when the event is emitted
- * @returns {function()} unsubscribeMethod - method to unsubscribe from the event
- */
- Once: (name, callback) => {
- return wails.Events.Once(name, callback);
- },
- /**
- * Subscribe to an event multiple times
- * @param {string} name - name of the event
- * @param {(any) => void} callback - callback to call when the event is emitted
- * @param {number} count - number of times to call the callback
- * @returns {Promise} unsubscribeMethod - method to unsubscribe from the event
- */
- OnMultiple: (name, callback, count) => {
- return wails.Events.OnMultiple(name, callback, count);
- },
- /**
- * Unsubscribe from an event
- * @param {string} name - name of the event to unsubscribe from
- * @param {...string} additionalNames - additional names of events to unsubscribe from
- */
- Off: (name, ...additionalNames) => {
- wails.Events.Off(name, additionalNames);
- },
- /**
- * Unsubscribe all listeners from all events
- */
- OffAll: () => {
- wails.Events.OffAll();
- },
-};
-
-/**
- * The Window API provides methods to interact with the window.
- */
-export const Window = {
- /**
- * Center the window.
- */
- Center: () => void wails.Window.Center(),
- /**
- * Set the window title.
- * @param title
- */
- SetTitle: (title) => void wails.Window.SetTitle(title),
-
- /**
- * Makes the window fullscreen.
- */
- Fullscreen: () => void wails.Window.Fullscreen(),
-
- /**
- * Unfullscreen the window.
- */
- UnFullscreen: () => void wails.Window.UnFullscreen(),
-
- /**
- * Set the window size.
- * @param {number} width The window width
- * @param {number} height The window height
- */
- SetSize: (width, height) => void wails.Window.SetSize(width, height),
-
- /**
- * Get the window size.
- * @returns {Promise} The window size
- */
- Size: () => {
- return wails.Window.Size();
- },
-
- /**
- * Set the window maximum size.
- * @param {number} width
- * @param {number} height
- */
- SetMaxSize: (width, height) => void wails.Window.SetMaxSize(width, height),
-
- /**
- * Set the window minimum size.
- * @param {number} width
- * @param {number} height
- */
- SetMinSize: (width, height) => void wails.Window.SetMinSize(width, height),
-
- /**
- * Set window to be always on top.
- * @param {boolean} onTop Whether the window should be always on top
- */
- SetAlwaysOnTop: (onTop) => void wails.Window.SetAlwaysOnTop(onTop),
-
- /**
- * Set the window position.
- * @param {number} x
- * @param {number} y
- */
- SetPosition: (x, y) => void wails.Window.SetPosition(x, y),
-
- /**
- * Get the window position.
- * @returns {Promise} The window position
- */
- Position: () => {
- return wails.Window.Position();
- },
-
- /**
- * Get the screen the window is on.
- * @returns {Promise}
- */
- Screen: () => {
- return wails.Window.Screen();
- },
-
- /**
- * Hide the window
- */
- Hide: () => void wails.Window.Hide(),
-
- /**
- * Maximise the window
- */
- Maximise: () => void wails.Window.Maximise(),
-
- /**
- * Show the window
- */
- Show: () => void wails.Window.Show(),
-
- /**
- * Close the window
- */
- Close: () => void wails.Window.Close(),
-
- /**
- * Toggle the window maximise state
- */
- ToggleMaximise: () => void wails.Window.ToggleMaximise(),
-
- /**
- * Unmaximise the window
- */
- UnMaximise: () => void wails.Window.UnMaximise(),
-
- /**
- * Minimise the window
- */
- Minimise: () => void wails.Window.Minimise(),
-
- /**
- * Unminimise the window
- */
- UnMinimise: () => void wails.Window.UnMinimise(),
-
- /**
- * Set the background colour of the window.
- * @param {number} r - The red value between 0 and 255
- * @param {number} g - The green value between 0 and 255
- * @param {number} b - The blue value between 0 and 255
- * @param {number} a - The alpha value between 0 and 255
- */
- SetBackgroundColour: (r, g, b, a) => void wails.Window.SetBackgroundColour(r, g, b, a),
-};
diff --git a/v3/internal/runtime/desktop/api/package.json b/v3/internal/runtime/desktop/api/package.json
deleted file mode 100644
index fa19b24bb27..00000000000
--- a/v3/internal/runtime/desktop/api/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "@wailsapp/api",
- "version": "3.0.0-alpha.3",
- "description": "Wails Runtime API",
- "main": "index.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/wailsapp/wails.git"
- },
- "author": "The Wails Team",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/wailsapp/wails/issues"
- },
- "homepage": "https://wails.io"
-}
diff --git a/v3/internal/runtime/desktop/api/types.d.ts b/v3/internal/runtime/desktop/api/types.d.ts
deleted file mode 100644
index bbbc0662e74..00000000000
--- a/v3/internal/runtime/desktop/api/types.d.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-
-export interface Button {
- // The label of the button
- Label?: string;
- // True if this button is the cancel button (selected when pressing escape)
- IsCancel?: boolean;
- // True if this button is the default button (selected when pressing enter)
- IsDefault?: boolean;
-}
-
-interface MessageDialogOptions {
- // The title for the dialog
- Title?: string;
- // The message to display
- Message?: string;
- // The buttons to use on the dialog
- Buttons?: Button[];
-}
-
-export interface OpenFileDialogOptions {
- // Allows the user to be able to select directories
- CanChooseDirectories?: boolean;
- // Allows the user to be able to select files
- CanChooseFiles?: boolean;
- // Provide an option to create directories in the dialog
- CanCreateDirectories?: boolean;
- // Makes the dialog show hidden files
- ShowHiddenFiles?: boolean;
- // Whether the dialog should follow filesystem aliases
- ResolvesAliases?: boolean;
- // Allow the user to select multiple files or directories
- AllowsMultipleSelection?: boolean;
- // Hide the extension when showing the filename
- HideExtension?: boolean;
- // Allow the user to select files where the system hides their extensions
- CanSelectHiddenExtension?: boolean;
- // Treats file packages as directories, e.g. .app on macOS
- TreatsFilePackagesAsDirectories?: boolean;
- // Allows selection of filetypes not specified in the filters
- AllowsOtherFiletypes?: boolean;
- // The file filters to use in the dialog
- Filters?: FileFilter[];
- // The title of the dialog
- Title?: string;
- // The message to display
- Message?: string;
- // The label for the select button
- ButtonText?: string;
- // The default directory to open the dialog in
- Directory?: string;
-}
-export interface FileFilter {
- // The display name for the filter, e.g. "Text Files"
- DisplayName?: string;
- // The pattern to use for the filter, e.g. "*.txt;*.md"
- Pattern?: string;
-}
-export interface SaveFileDialogOptions {
- // Provide an option to create directories in the dialog
- CanCreateDirectories?: boolean;
- // Makes the dialog show hidden files
- ShowHiddenFiles?: boolean;
- // Allow the user to select files where the system hides their extensions
- CanSelectHiddenExtension?: boolean;
- // Allows selection of filetypes not specified in the filters
- AllowOtherFiletypes?: boolean;
- // Hide the extension when showing the filename
- HideExtension?: boolean;
- // Treats file packages as directories, e.g. .app on macOS
- TreatsFilePackagesAsDirectories?: boolean;
- // The message to show in the dialog
- Message?: string;
- // The default directory to open the dialog in
- Directory?: string;
- // The default filename to use in the dialog
- Filename?: string;
- // The label for the select button
- ButtonText?: string;
-}
-
-export interface Screen {
- // The screen ID
- Id: string;
- // The screen name
- Name: string;
- // The screen scale. 1 = standard resolution, 2: 2x retina, etc.
- Scale: number;
- // The X position of the screen
- X: number;
- // The Y position of the screen
- Y: number;
- // The width and height of the screen
- Size: Size;
- // The bounds of the screen
- Bounds: Rect;
- // The work area of the screen
- WorkArea: Rect;
- // True if this is the primary screen
- IsPrimary: boolean;
- // The rotation of the screen
- Rotation: number;
-}
-export interface Rect {
- X: number;
- Y: number;
- Width: number;
- Height: number;
-}
-
-export interface WailsEvent {
- // The name of the event
- Name: string;
- // The data associated with the event
- Data?: any;
-}
-
-export interface Size {
- Width: number;
- Height: number;
-}
-export interface Position {
- X: number;
- Y: number;
-}
diff --git a/v3/internal/runtime/desktop/application.js b/v3/internal/runtime/desktop/application.js
deleted file mode 100644
index b884ad34ea6..00000000000
--- a/v3/internal/runtime/desktop/application.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-
-/* jshint esversion: 9 */
-
-import {newRuntimeCaller} from "./runtime";
-
-let call = newRuntimeCaller("application");
-
-/**
- * Hide the application
- */
-export function Hide() {
- void call("Hide");
-}
-
-/**
- * Show the application
- */
-export function Show() {
- void call("Show");
-}
-
-
-/**
- * Quit the application
- */
-export function Quit() {
- void call("Quit");
-}
\ No newline at end of file
diff --git a/v3/internal/runtime/desktop/calls.js b/v3/internal/runtime/desktop/calls.js
deleted file mode 100644
index 0900c581245..00000000000
--- a/v3/internal/runtime/desktop/calls.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-
-/* jshint esversion: 9 */
-
-import {newRuntimeCaller} from "./runtime";
-
-import { nanoid } from 'nanoid/non-secure';
-
-let call = newRuntimeCaller("call");
-
-let callResponses = new Map();
-
-function generateID() {
- let result;
- do {
- result = nanoid();
- } while (callResponses.has(result));
- return result;
-}
-
-export function callCallback(id, data, isJSON) {
- let p = callResponses.get(id);
- if (p) {
- if (isJSON) {
- p.resolve(JSON.parse(data));
- } else {
- p.resolve(data);
- }
- callResponses.delete(id);
- }
-}
-
-export function callErrorCallback(id, message) {
- let p = callResponses.get(id);
- if (p) {
- p.reject(message);
- callResponses.delete(id);
- }
-}
-
-function callBinding(type, options) {
- return new Promise((resolve, reject) => {
- let id = generateID();
- options = options || {};
- options["call-id"] = id;
- callResponses.set(id, {resolve, reject});
- call(type, options).catch((error) => {
- reject(error);
- callResponses.delete(id);
- });
- });
-}
-
-export function Call(options) {
- return callBinding("Call", options);
-}
-
-/**
- * Call a plugin method
- * @param {string} pluginName - name of the plugin
- * @param {string} methodName - name of the method
- * @param {...any} args - arguments to pass to the method
- * @returns {Promise} - promise that resolves with the result
- */
-export function Plugin(pluginName, methodName, ...args) {
- return callBinding("Call", {
- packageName: "wails-plugins",
- structName: pluginName,
- methodName: methodName,
- args: args,
- });
-}
\ No newline at end of file
diff --git a/v3/internal/runtime/desktop/clipboard.js b/v3/internal/runtime/desktop/clipboard.js
deleted file mode 100644
index 0d814d2dc5b..00000000000
--- a/v3/internal/runtime/desktop/clipboard.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-
-/* jshint esversion: 9 */
-
-import {newRuntimeCaller} from "./runtime";
-
-let call = newRuntimeCaller("clipboard");
-
-/**
- * Set the Clipboard text
- */
-export function SetText(text) {
- void call("SetText", {text});
-}
-
-/**
- * Get the Clipboard text
- * @returns {Promise}
- */
-export function Text() {
- return call("Text");
-}
\ No newline at end of file
diff --git a/v3/internal/runtime/desktop/contextmenu.js b/v3/internal/runtime/desktop/contextmenu.js
deleted file mode 100644
index 7b6e2c1f41e..00000000000
--- a/v3/internal/runtime/desktop/contextmenu.js
+++ /dev/null
@@ -1,32 +0,0 @@
-import {newRuntimeCaller} from "./runtime";
-
-let call = newRuntimeCaller("contextmenu");
-
-function openContextMenu(id, x, y, data) {
- return call("OpenContextMenu", {id, x, y, data});
-}
-
-export function enableContextMenus(enabled) {
- if (enabled) {
- window.addEventListener('contextmenu', contextMenuHandler);
- } else {
- window.removeEventListener('contextmenu', contextMenuHandler);
- }
-}
-
-function contextMenuHandler(event) {
- processContextMenu(event.target, event);
-}
-
-function processContextMenu(element, event) {
- let id = element.getAttribute('data-contextmenu');
- if (id) {
- event.preventDefault();
- openContextMenu(id, event.clientX, event.clientY, element.getAttribute('data-contextmenu-data'));
- } else {
- let parent = element.parentElement;
- if (parent) {
- processContextMenu(parent, event);
- }
- }
-}
diff --git a/v3/internal/runtime/desktop/dialogs.js b/v3/internal/runtime/desktop/dialogs.js
deleted file mode 100644
index e923f53ce23..00000000000
--- a/v3/internal/runtime/desktop/dialogs.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-
-/* jshint esversion: 9 */
-
-/**
- * @typedef {import("./api/types").MessageDialogOptions} MessageDialogOptions
- * @typedef {import("./api/types").OpenDialogOptions} OpenDialogOptions
- * @typedef {import("./api/types").SaveDialogOptions} SaveDialogOptions
- */
-
-import {newRuntimeCaller} from "./runtime";
-
-import { nanoid } from 'nanoid/non-secure';
-
-let call = newRuntimeCaller("dialog");
-
-let dialogResponses = new Map();
-
-function generateID() {
- let result;
- do {
- result = nanoid();
- } while (dialogResponses.has(result));
- return result;
-}
-
-export function dialogCallback(id, data, isJSON) {
- let p = dialogResponses.get(id);
- if (p) {
- if (isJSON) {
- p.resolve(JSON.parse(data));
- } else {
- p.resolve(data);
- }
- dialogResponses.delete(id);
- }
-}
-export function dialogErrorCallback(id, message) {
- let p = dialogResponses.get(id);
- if (p) {
- p.reject(message);
- dialogResponses.delete(id);
- }
-}
-
-function dialog(type, options) {
- return new Promise((resolve, reject) => {
- let id = generateID();
- options = options || {};
- options["dialog-id"] = id;
- dialogResponses.set(id, {resolve, reject});
- call(type, options).catch((error) => {
- reject(error);
- dialogResponses.delete(id);
- });
- });
-}
-
-
-/**
- * Shows an Info dialog with the given options.
- * @param {MessageDialogOptions} options
- * @returns {Promise} The label of the button pressed
- */
-export function Info(options) {
- return dialog("Info", options);
-}
-
-/**
- * Shows an Warning dialog with the given options.
- * @param {MessageDialogOptions} options
- * @returns {Promise} The label of the button pressed
- */
-export function Warning(options) {
- return dialog("Warning", options);
-}
-
-/**
- * Shows an Error dialog with the given options.
- * @param {MessageDialogOptions} options
- * @returns {Promise} The label of the button pressed
- */
-export function Error(options) {
- return dialog("Error", options);
-}
-
-/**
- * Shows a Question dialog with the given options.
- * @param {MessageDialogOptions} options
- * @returns {Promise} The label of the button pressed
- */
-export function Question(options) {
- return dialog("Question", options);
-}
-
-/**
- * Shows an Open dialog with the given options.
- * @param {OpenDialogOptions} options
- * @returns {Promise} Returns the selected file or an array of selected files if AllowsMultipleSelection is true. A blank string is returned if no file was selected.
- */
-export function OpenFile(options) {
- return dialog("OpenFile", options);
-}
-
-/**
- * Shows a Save dialog with the given options.
- * @param {OpenDialogOptions} options
- * @returns {Promise} Returns the selected file. A blank string is returned if no file was selected.
- */
-export function SaveFile(options) {
- return dialog("SaveFile", options);
-}
-
diff --git a/v3/internal/runtime/desktop/events.js b/v3/internal/runtime/desktop/events.js
deleted file mode 100644
index b1d74009242..00000000000
--- a/v3/internal/runtime/desktop/events.js
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-
-/* jshint esversion: 9 */
-
-/**
- * @typedef {import("./api/types").WailsEvent} WailsEvent
- */
-
-import {newRuntimeCaller} from "./runtime";
-
-let call = newRuntimeCaller("events");
-
-/**
- * The Listener class defines a listener! :-)
- *
- * @class Listener
- */
-class Listener {
- /**
- * Creates an instance of Listener.
- * @param {string} eventName
- * @param {function} callback
- * @param {number} maxCallbacks
- * @memberof Listener
- */
- constructor(eventName, callback, maxCallbacks) {
- this.eventName = eventName;
- // Default of -1 means infinite
- this.maxCallbacks = maxCallbacks || -1;
- // Callback invokes the callback with the given data
- // Returns true if this listener should be destroyed
- this.Callback = (data) => {
- callback(data);
- // If maxCallbacks is infinite, return false (do not destroy)
- if (this.maxCallbacks === -1) {
- return false;
- }
- // Decrement maxCallbacks. Return true if now 0, otherwise false
- this.maxCallbacks -= 1;
- return this.maxCallbacks === 0;
- };
- }
-}
-
-
-/**
- * WailsEvent defines a custom event. It is passed to event listeners.
- *
- * @class WailsEvent
- * @property {string} name - Name of the event
- * @property {any} data - Data associated with the event
- */
-export class WailsEvent {
- /**
- * Creates an instance of WailsEvent.
- * @param {string} name - Name of the event
- * @param {any=null} data - Data associated with the event
- * @memberof WailsEvent
- */
- constructor(name, data = null) {
- this.name = name;
- this.data = data;
- }
-}
-
-export const eventListeners = new Map();
-
-/**
- * Registers an event listener that will be invoked `maxCallbacks` times before being destroyed
- *
- * @export
- * @param {string} eventName
- * @param {function(WailsEvent): void} callback
- * @param {number} maxCallbacks
- * @returns {function} A function to cancel the listener
- */
-export function OnMultiple(eventName, callback, maxCallbacks) {
- let listeners = eventListeners.get(eventName) || [];
- const thisListener = new Listener(eventName, callback, maxCallbacks);
- listeners.push(thisListener);
- eventListeners.set(eventName, listeners);
- return () => listenerOff(thisListener);
-}
-
-/**
- * Registers an event listener that will be invoked every time the event is emitted
- *
- * @export
- * @param {string} eventName
- * @param {function(WailsEvent): void} callback
- * @returns {function} A function to cancel the listener
- */
-export function On(eventName, callback) {
- return OnMultiple(eventName, callback, -1);
-}
-
-/**
- * Registers an event listener that will be invoked once then destroyed
- *
- * @export
- * @param {string} eventName
- * @param {function(WailsEvent): void} callback
- @returns {function} A function to cancel the listener
- */
-export function Once(eventName, callback) {
- return OnMultiple(eventName, callback, 1);
-}
-
-/**
- * listenerOff unregisters a listener previously registered with On
- *
- * @param {Listener} listener
- */
-function listenerOff(listener) {
- const eventName = listener.eventName;
- // Remove local listener
- let listeners = eventListeners.get(eventName).filter(l => l !== listener);
- if (listeners.length === 0) {
- eventListeners.delete(eventName);
- } else {
- eventListeners.set(eventName, listeners);
- }
-}
-
-/**
- * dispatches an event to all listeners
- *
- * @export
- * @param {WailsEvent} event
- */
-export function dispatchWailsEvent(event) {
- console.log("dispatching event: ", {event});
- let listeners = eventListeners.get(event.name);
- if (listeners) {
- // iterate listeners and call callback. If callback returns true, remove listener
- let toRemove = [];
- listeners.forEach(listener => {
- let remove = listener.Callback(event);
- if (remove) {
- toRemove.push(listener);
- }
- });
- // remove listeners
- if (toRemove.length > 0) {
- listeners = listeners.filter(l => !toRemove.includes(l));
- if (listeners.length === 0) {
- eventListeners.delete(event.name);
- } else {
- eventListeners.set(event.name, listeners);
- }
- }
- }
-}
-
-/**
- * Off unregisters a listener previously registered with On,
- * optionally multiple listeners can be unregistered via `additionalEventNames`
- *
- [v3 CHANGE] Off only unregisters listeners within the current window
- *
- * @param {string} eventName
- * @param {...string} additionalEventNames
- */
-export function Off(eventName, ...additionalEventNames) {
- let eventsToRemove = [eventName, ...additionalEventNames];
- eventsToRemove.forEach(eventName => {
- eventListeners.delete(eventName);
- });
-}
-
-/**
- * OffAll unregisters all listeners
- * [v3 CHANGE] OffAll only unregisters listeners within the current window
- *
- */
-export function OffAll() {
- eventListeners.clear();
-}
-
-/**
- * Emit an event
- * @param {WailsEvent} event The event to emit
- */
-export function Emit(event) {
- void call("Emit", event);
-}
\ No newline at end of file
diff --git a/v3/internal/runtime/desktop/events.test.js b/v3/internal/runtime/desktop/events.test.js
deleted file mode 100644
index a9b67965718..00000000000
--- a/v3/internal/runtime/desktop/events.test.js
+++ /dev/null
@@ -1,115 +0,0 @@
-import { On, Off, OffAll, OnMultiple, WailsEvent, dispatchWailsEvent, eventListeners, Once } from './events';
-import { expect, describe, it, vi, afterEach, beforeEach } from 'vitest';
-
-afterEach(() => {
- OffAll();
- vi.resetAllMocks();
-});
-
-describe('OnMultiple', () => {
- let testEvent = new WailsEvent('a', {});
-
- it('should stop after a specified number of times', () => {
- const cb = vi.fn();
- OnMultiple('a', cb, 5);
- dispatchWailsEvent(testEvent);
- dispatchWailsEvent(testEvent);
- dispatchWailsEvent(testEvent);
- dispatchWailsEvent(testEvent);
- dispatchWailsEvent(testEvent);
- dispatchWailsEvent(testEvent);
- expect(cb).toBeCalledTimes(5);
- });
-
- it('should return a cancel fn', () => {
- const cb = vi.fn()
- const cancel = OnMultiple('a', cb, 5)
- dispatchWailsEvent(testEvent)
- dispatchWailsEvent(testEvent)
- cancel()
- dispatchWailsEvent(testEvent)
- dispatchWailsEvent(testEvent)
- expect(cb).toBeCalledTimes(2)
- })
-})
-
-describe('On', () => {
- it('should create a listener with a count of -1', () => {
- On('a', () => {})
- expect(eventListeners.get("a")[0].maxCallbacks).toBe(-1)
- })
-
- it('should return a cancel fn', () => {
- const cancel = On('a', () => {})
- cancel();
- })
-})
-
-describe('Once', () => {
- it('should create a listener with a count of 1', () => {
- Once('a', () => {})
- expect(eventListeners.get("a")[0].maxCallbacks).toBe(1)
- })
-
- it('should return a cancel fn', () => {
- const cancel = EventsOn('a', () => {})
- cancel();
- })
-})
-//
-// describe('EventsNotify', () => {
-// it('should inform a listener', () => {
-// const cb = vi.fn()
-// EventsOn('a', cb)
-// EventsNotify(JSON.stringify({name: 'a', data: ["one", "two", "three"]}))
-// expect(cb).toBeCalledTimes(1);
-// expect(cb).toHaveBeenLastCalledWith("one", "two", "three");
-// expect(window.WailsInvoke).toBeCalledTimes(0);
-// })
-// })
-//
-// describe('EventsEmit', () => {
-// it('should emit an event', () => {
-// EventsEmit('a', 'one', 'two', 'three')
-// expect(window.WailsInvoke).toBeCalledTimes(1);
-// const calledWith = window.WailsInvoke.calls[0][0];
-// expect(calledWith.slice(0, 2)).toBe('EE')
-// expect(JSON.parse(calledWith.slice(2))).toStrictEqual({data: ["one", "two", "three"], name: "a"})
-// })
-// })
-//
-describe('Off', () => {
- beforeEach(() => {
- On('a', () => {})
- On('a', () => {})
- On('a', () => {})
- On('b', () => {})
- On('c', () => {})
- })
-
- it('should cancel all event listeners for a single type', () => {
- Off('a')
- expect(eventListeners.get('a')).toBeUndefined()
- expect(eventListeners.get('b')).not.toBeUndefined()
- expect(eventListeners.get('c')).not.toBeUndefined()
- })
-
- it('should cancel all event listeners for multiple types', () => {
- Off('a', 'b')
- expect(eventListeners.get('a')).toBeUndefined()
- expect(eventListeners.get('b')).toBeUndefined()
- expect(eventListeners.get('c')).not.toBeUndefined()
- })
-})
-
-describe('OffAll', () => {
- it('should cancel all event listeners', () => {
- On('a', () => {})
- On('a', () => {})
- On('a', () => {})
- On('b', () => {})
- On('c', () => {})
- OffAll()
- expect(eventListeners.size).toBe(0)
- })
-})
diff --git a/v3/internal/runtime/desktop/log.js b/v3/internal/runtime/desktop/log.js
deleted file mode 100644
index e1ef8d6ad92..00000000000
--- a/v3/internal/runtime/desktop/log.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-
-/* jshint esversion: 9 */
-
-import {newRuntimeCaller} from "./runtime";
-
-let call = newRuntimeCaller("log");
-
-/**
- * Logs a message.
- * @param {message} Message to log
- */
-export function Log(message) {
- return call("Log", message);
-}
diff --git a/v3/internal/runtime/desktop/main.js b/v3/internal/runtime/desktop/main.js
deleted file mode 100644
index 26b4e9de93c..00000000000
--- a/v3/internal/runtime/desktop/main.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-/* jshint esversion: 9 */
-
-
-import * as Clipboard from './clipboard';
-import * as Application from './application';
-import * as Log from './log';
-import * as Screens from './screens';
-import {Plugin, Call, callErrorCallback, callCallback} from "./calls";
-import {newWindow} from "./window";
-import {dispatchWailsEvent, Emit, Off, OffAll, On, Once, OnMultiple} from "./events";
-import {dialogCallback, dialogErrorCallback, Error, Info, OpenFile, Question, SaveFile, Warning,} from "./dialogs";
-import {enableContextMenus} from "./contextmenu";
-import {reloadWML} from "./wml";
-
-window.wails = {
- ...newRuntime(null),
-};
-
-// Internal wails endpoints
-window._wails = {
- dialogCallback,
- dialogErrorCallback,
- dispatchWailsEvent,
- callCallback,
- callErrorCallback,
-};
-
-export function newRuntime(windowName) {
- return {
- Clipboard: {
- ...Clipboard
- },
- Application: {
- ...Application,
- GetWindowByName(windowName) {
- return newRuntime(windowName);
- }
- },
- Log,
- Screens,
- Call,
- Plugin,
- WML: {
- Reload: reloadWML,
- },
- Dialog: {
- Info,
- Warning,
- Error,
- Question,
- OpenFile,
- SaveFile,
- },
- Events: {
- Emit,
- On,
- Once,
- OnMultiple,
- Off,
- OffAll,
- },
- Window: newWindow(windowName),
- };
-}
-
-if (DEBUG) {
- console.log("Wails v3.0.0 Debug Mode Enabled");
-}
-
-enableContextMenus(true);
-
-document.addEventListener("DOMContentLoaded", function(event) {
- reloadWML();
-});
\ No newline at end of file
diff --git a/v3/internal/runtime/desktop/runtime.js b/v3/internal/runtime/desktop/runtime.js
deleted file mode 100644
index 8f2748325d7..00000000000
--- a/v3/internal/runtime/desktop/runtime.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-
-/* jshint esversion: 9 */
-
-const runtimeURL = window.location.origin + "/wails/runtime";
-
-function runtimeCall(method, windowName, args) {
- let url = new URL(runtimeURL);
- url.searchParams.append("method", method);
- if (args) {
- url.searchParams.append("args", JSON.stringify(args));
- }
- let fetchOptions = {
- headers: {},
- };
- if (windowName) {
- fetchOptions.headers["x-wails-window-name"] = windowName;
- }
- return new Promise((resolve, reject) => {
- fetch(url, fetchOptions)
- .then(response => {
- if (response.ok) {
- // check content type
- if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf("application/json") !== -1) {
- return response.json();
- } else {
- return response.text();
- }
- }
- reject(Error(response.statusText));
- })
- .then(data => resolve(data))
- .catch(error => reject(error));
- });
-}
-
-export function newRuntimeCaller(object, windowName) {
- return function (method, args=null) {
- return runtimeCall(object + "." + method, windowName, args);
- };
-}
\ No newline at end of file
diff --git a/v3/internal/runtime/desktop/screens.js b/v3/internal/runtime/desktop/screens.js
deleted file mode 100644
index 2933290eeef..00000000000
--- a/v3/internal/runtime/desktop/screens.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-
-/* jshint esversion: 9 */
-
-/**
- * @typedef {import("./api/types").Screen} Screen
- */
-
-import {newRuntimeCaller} from "./runtime";
-
-let call = newRuntimeCaller("screens");
-
-/**
- * Gets all screens.
- * @returns {Promise}
- */
-export function GetAll() {
- return call("GetAll");
-}
-
-/**
- * Gets the primary screen.
- * @returns {Promise}
- */
-export function GetPrimary() {
- return call("GetPrimary");
-}
-
-/**
- * Gets the current active screen.
- * @returns {Promise}
- * @constructor
- */
-export function GetCurrent() {
- return call("GetCurrent");
-}
\ No newline at end of file
diff --git a/v3/internal/runtime/desktop/window.js b/v3/internal/runtime/desktop/window.js
deleted file mode 100644
index 13df2a98fb1..00000000000
--- a/v3/internal/runtime/desktop/window.js
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- _ __ _ __
-| | / /___ _(_) /____
-| | /| / / __ `/ / / ___/
-| |/ |/ / /_/ / / (__ )
-|__/|__/\__,_/_/_/____/
-The electron alternative for Go
-(c) Lea Anthony 2019-present
-*/
-
-/* jshint esversion: 9 */
-
-/**
- * @typedef {import("../api/types").Size} Size
- * @typedef {import("../api/types").Position} Position
- * @typedef {import("../api/types").Screen} Screen
- */
-
-import {newRuntimeCaller} from "./runtime";
-
-export function newWindow(windowName) {
- let call = newRuntimeCaller("window", windowName);
- return {
- // Reload: () => call('WR'),
- // ReloadApp: () => call('WR'),
- // SetSystemDefaultTheme: () => call('WASDT'),
- // SetLightTheme: () => call('WALT'),
- // SetDarkTheme: () => call('WADT'),
- // IsFullscreen: () => call('WIF'),
- // IsMaximized: () => call('WIM'),
- // IsMinimized: () => call('WIMN'),
- // IsWindowed: () => call('WIF'),
-
-
- /**
- * Centers the window.
- */
- Center: () => void call('Center'),
-
- /**
- * Set the window title.
- * @param title
- */
- SetTitle: (title) => void call('SetTitle', {title}),
-
- /**
- * Makes the window fullscreen.
- */
- Fullscreen: () => void call('Fullscreen'),
-
- /**
- * Unfullscreen the window.
- */
- UnFullscreen: () => void call('UnFullscreen'),
-
- /**
- * Set the window size.
- * @param {number} width The window width
- * @param {number} height The window height
- */
- SetSize: (width, height) => call('SetSize', {width,height}),
-
- /**
- * Get the window size.
- * @returns {Promise} The window size
- */
- Size: () => { return call('Size'); },
-
- /**
- * Set the window maximum size.
- * @param {number} width
- * @param {number} height
- */
- SetMaxSize: (width, height) => void call('SetMaxSize', {width,height}),
-
- /**
- * Set the window minimum size.
- * @param {number} width
- * @param {number} height
- */
- SetMinSize: (width, height) => void call('SetMinSize', {width,height}),
-
- /**
- * Set window to be always on top.
- * @param {boolean} onTop Whether the window should be always on top
- */
- SetAlwaysOnTop: (onTop) => void call('SetAlwaysOnTop', {alwaysOnTop:onTop}),
-
- /**
- * Set the window position.
- * @param {number} x
- * @param {number} y
- */
- SetPosition: (x, y) => call('SetPosition', {x,y}),
-
- /**
- * Get the window position.
- * @returns {Promise} The window position
- */
- Position: () => { return call('Position'); },
-
- /**
- * Get the screen the window is on.
- * @returns {Promise}
- */
- Screen: () => { return call('Screen'); },
-
- /**
- * Hide the window
- */
- Hide: () => void call('Hide'),
-
- /**
- * Maximise the window
- */
- Maximise: () => void call('Maximise'),
-
- /**
- * Show the window
- */
- Show: () => void call('Show'),
-
- /**
- * Close the window
- */
- Close: () => void call('Close'),
-
- /**
- * Toggle the window maximise state
- */
- ToggleMaximise: () => void call('ToggleMaximise'),
-
- /**
- * Unmaximise the window
- */
- UnMaximise: () => void call('UnMaximise'),
-
- /**
- * Minimise the window
- */
- Minimise: () => void call('Minimise'),
-
- /**
- * Unminimise the window
- */
- UnMinimise: () => void call('UnMinimise'),
-
- /**
- * Set the background colour of the window.
- * @param {number} r - A value between 0 and 255
- * @param {number} g - A value between 0 and 255
- * @param {number} b - A value between 0 and 255
- * @param {number} a - A value between 0 and 255
- */
- SetBackgroundColour: (r, g, b, a) => void call('SetBackgroundColour', {r, g, b, a}),
- };
-}
diff --git a/v3/internal/runtime/desktop/wml.js b/v3/internal/runtime/desktop/wml.js
deleted file mode 100644
index 865c3d628b8..00000000000
--- a/v3/internal/runtime/desktop/wml.js
+++ /dev/null
@@ -1,74 +0,0 @@
-
-import {Emit, WailsEvent} from "./events";
-import {Question} from "./dialogs";
-
-function sendEvent(eventName, data=null) {
- let event = new WailsEvent(eventName, data);
- Emit(event);
-}
-
-function addWMLEventListeners() {
- const elements = document.querySelectorAll('[data-wml-event]');
- elements.forEach(function (element) {
- const eventType = element.getAttribute('data-wml-event');
- const confirm = element.getAttribute('data-wml-confirm');
- const trigger = element.getAttribute('data-wml-trigger') || "click";
-
- let callback = function () {
- if (confirm) {
- Question({Title: "Confirm", Message:confirm, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) {
- if (result !== "No") {
- sendEvent(eventType);
- }
- });
- return;
- }
- sendEvent(eventType);
- };
- // Remove existing listeners
-
- element.removeEventListener(trigger, callback);
-
- // Add new listener
- element.addEventListener(trigger, callback);
- });
-}
-
-function callWindowMethod(method) {
- if (wails.Window[method] === undefined) {
- console.log("Window method " + method + " not found");
- }
- wails.Window[method]();
-}
-
-function addWMLWindowListeners() {
- const elements = document.querySelectorAll('[data-wml-window]');
- elements.forEach(function (element) {
- const windowMethod = element.getAttribute('data-wml-window');
- const confirm = element.getAttribute('data-wml-confirm');
- const trigger = element.getAttribute('data-wml-trigger') || "click";
-
- let callback = function () {
- if (confirm) {
- Question({Title: "Confirm", Message:confirm, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) {
- if (result !== "No") {
- callWindowMethod(windowMethod);
- }
- });
- return;
- }
- callWindowMethod(windowMethod);
- };
-
- // Remove existing listeners
- element.removeEventListener(trigger, callback);
-
- // Add new listener
- element.addEventListener(trigger, callback);
- });
-}
-
-export function reloadWML() {
- addWMLEventListeners();
- addWMLWindowListeners();
-}
diff --git a/v3/internal/runtime/package-lock.json b/v3/internal/runtime/package-lock.json
deleted file mode 100644
index a029e31be04..00000000000
--- a/v3/internal/runtime/package-lock.json
+++ /dev/null
@@ -1,8685 +0,0 @@
-{
- "name": "runtime",
- "version": "3.0.0",
- "lockfileVersion": 2,
- "requires": true,
- "packages": {
- "": {
- "name": "runtime",
- "version": "3.0.0",
- "license": "ISC",
- "devDependencies": {
- "esbuild": "^0.17.5",
- "happy-dom": "^8.1.5",
- "nanoid": "^4.0.0",
- "npm-check-updates": "^16.6.3",
- "svelte": "^3.55.1",
- "vitest": "^0.28.3"
- }
- },
- "node_modules/@esbuild/android-arm": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.5.tgz",
- "integrity": "sha512-crmPUzgCmF+qZXfl1YkiFoUta2XAfixR1tEnr/gXIixE+WL8Z0BGqfydP5oox0EUOgQMMRgtATtakyAcClQVqQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.5.tgz",
- "integrity": "sha512-KHWkDqYAMmKZjY4RAN1PR96q6UOtfkWlTS8uEwWxdLtkRt/0F/csUhXIrVfaSIFxnscIBMPynGfhsMwQDRIBQw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.5.tgz",
- "integrity": "sha512-8fI/AnIdmWz/+1iza2WrCw8kwXK9wZp/yZY/iS8ioC+U37yJCeppi9EHY05ewJKN64ASoBIseufZROtcFnX5GA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.5.tgz",
- "integrity": "sha512-EAvaoyIySV6Iif3NQCglUNpnMfHSUgC5ugt2efl3+QDntucJe5spn0udNZjTgNi6tKVqSceOw9tQ32liNZc1Xw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.5.tgz",
- "integrity": "sha512-ha7QCJh1fuSwwCgoegfdaljowwWozwTDjBgjD3++WAy/qwee5uUi1gvOg2WENJC6EUyHBOkcd3YmLDYSZ2TPPA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.5.tgz",
- "integrity": "sha512-VbdXJkn2aI2pQ/wxNEjEcnEDwPpxt3CWWMFYmO7CcdFBoOsABRy2W8F3kjbF9F/pecEUDcI3b5i2w+By4VQFPg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.5.tgz",
- "integrity": "sha512-olgGYND1/XnnWxwhjtY3/ryjOG/M4WfcA6XH8dBTH1cxMeBemMODXSFhkw71Kf4TeZFFTN25YOomaNh0vq2iXg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-arm": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.5.tgz",
- "integrity": "sha512-YBdCyQwA3OQupi6W2/WO4FnI+NWFWe79cZEtlbqSESOHEg7a73htBIRiE6uHPQe7Yp5E4aALv+JxkRLGEUL7tw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.5.tgz",
- "integrity": "sha512-8a0bqSwu3OlLCfu2FBbDNgQyBYdPJh1B9PvNX7jMaKGC9/KopgHs37t+pQqeMLzcyRqG6z55IGNQAMSlCpBuqg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-ia32": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.5.tgz",
- "integrity": "sha512-uCwm1r/+NdP7vndctgq3PoZrnmhmnecWAr114GWMRwg2QMFFX+kIWnp7IO220/JLgnXK/jP7VKAFBGmeOYBQYQ==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.5.tgz",
- "integrity": "sha512-3YxhSBl5Sb6TtBjJu+HP93poBruFzgXmf3PVfIe4xOXMj1XpxboYZyw3W8BhoX/uwxzZz4K1I99jTE/5cgDT1g==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-mips64el": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.5.tgz",
- "integrity": "sha512-Hy5Z0YVWyYHdtQ5mfmfp8LdhVwGbwVuq8mHzLqrG16BaMgEmit2xKO+iDakHs+OetEx0EN/2mUzDdfdktI+Nmg==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-ppc64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.5.tgz",
- "integrity": "sha512-5dbQvBLbU/Y3Q4ABc9gi23hww1mQcM7KZ9KBqabB7qhJswYMf8WrDDOSw3gdf3p+ffmijMd28mfVMvFucuECyg==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-riscv64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.5.tgz",
- "integrity": "sha512-fp/KUB/ZPzEWGTEUgz9wIAKCqu7CjH1GqXUO2WJdik1UNBQ7Xzw7myIajpxztE4Csb9504ERiFMxZg5KZ6HlZQ==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-s390x": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.5.tgz",
- "integrity": "sha512-kRV3yw19YDqHTp8SfHXfObUFXlaiiw4o2lvT1XjsPZ++22GqZwSsYWJLjMi1Sl7j9qDlDUduWDze/nQx0d6Lzw==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.5.tgz",
- "integrity": "sha512-vnxuhh9e4pbtABNLbT2ANW4uwQ/zvcHRCm1JxaYkzSehugoFd5iXyC4ci1nhXU13mxEwCnrnTIiiSGwa/uAF1g==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/netbsd-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.5.tgz",
- "integrity": "sha512-cigBpdiSx/vPy7doUyImsQQBnBjV5f1M99ZUlaJckDAJjgXWl6y9W17FIfJTy8TxosEF6MXq+fpLsitMGts2nA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/openbsd-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.5.tgz",
- "integrity": "sha512-VdqRqPVIjjZfkf40LrqOaVuhw9EQiAZ/GNCSM2UplDkaIzYVsSnycxcFfAnHdWI8Gyt6dO15KHikbpxwx+xHbw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/sunos-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.5.tgz",
- "integrity": "sha512-ItxPaJ3MBLtI4nK+mALLEoUs6amxsx+J1ibnfcYMkqaCqHST1AkF4aENpBehty3czqw64r/XqL+W9WqU6kc2Qw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.5.tgz",
- "integrity": "sha512-4u2Q6qsJTYNFdS9zHoAi80spzf78C16m2wla4eJPh4kSbRv+BpXIfl6TmBSWupD8e47B1NrTfrOlEuco7mYQtg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-ia32": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.5.tgz",
- "integrity": "sha512-KYlm+Xu9TXsfTWAcocLuISRtqxKp/Y9ZBVg6CEEj0O5J9mn7YvBKzAszo2j1ndyzUPk+op+Tie2PJeN+BnXGqQ==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.5.tgz",
- "integrity": "sha512-XgA9qWRqby7xdYXuF6KALsn37QGBMHsdhmnpjfZtYxKxbTOwfnDM6MYi2WuUku5poNaX2n9XGVr20zgT/2QwCw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@gar/promisify": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",
- "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
- "dev": true
- },
- "node_modules/@nodelib/fs.scandir": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
- "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
- "dev": true,
- "dependencies": {
- "@nodelib/fs.stat": "2.0.5",
- "run-parallel": "^1.1.9"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.stat": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
- "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
- "dev": true,
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.walk": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
- "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
- "dev": true,
- "dependencies": {
- "@nodelib/fs.scandir": "2.1.5",
- "fastq": "^1.6.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@npmcli/fs": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz",
- "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==",
- "dev": true,
- "dependencies": {
- "semver": "^7.3.5"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/@npmcli/git": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz",
- "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==",
- "dev": true,
- "dependencies": {
- "@npmcli/promise-spawn": "^6.0.0",
- "lru-cache": "^7.4.4",
- "mkdirp": "^1.0.4",
- "npm-pick-manifest": "^8.0.0",
- "proc-log": "^3.0.0",
- "promise-inflight": "^1.0.1",
- "promise-retry": "^2.0.1",
- "semver": "^7.3.5",
- "which": "^3.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/@npmcli/installed-package-contents": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz",
- "integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==",
- "dev": true,
- "dependencies": {
- "npm-bundled": "^3.0.0",
- "npm-normalize-package-bin": "^3.0.0"
- },
- "bin": {
- "installed-package-contents": "lib/index.js"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/@npmcli/move-file": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz",
- "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==",
- "deprecated": "This functionality has been moved to @npmcli/fs",
- "dev": true,
- "dependencies": {
- "mkdirp": "^1.0.4",
- "rimraf": "^3.0.2"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/@npmcli/node-gyp": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz",
- "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==",
- "dev": true,
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/@npmcli/promise-spawn": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz",
- "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==",
- "dev": true,
- "dependencies": {
- "which": "^3.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/@npmcli/run-script": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz",
- "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==",
- "dev": true,
- "dependencies": {
- "@npmcli/node-gyp": "^3.0.0",
- "@npmcli/promise-spawn": "^6.0.0",
- "node-gyp": "^9.0.0",
- "read-package-json-fast": "^3.0.0",
- "which": "^3.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/@pnpm/network.ca-file": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz",
- "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==",
- "dev": true,
- "dependencies": {
- "graceful-fs": "4.2.10"
- },
- "engines": {
- "node": ">=12.22.0"
- }
- },
- "node_modules/@pnpm/npm-conf": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-1.0.5.tgz",
- "integrity": "sha512-hD8ml183638O3R6/Txrh0L8VzGOrFXgRtRDG4qQC4tONdZ5Z1M+tlUUDUvrjYdmK6G+JTBTeaCLMna11cXzi8A==",
- "dev": true,
- "dependencies": {
- "@pnpm/network.ca-file": "^1.0.1",
- "config-chain": "^1.1.11"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@sindresorhus/is": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.3.0.tgz",
- "integrity": "sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==",
- "dev": true,
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
- }
- },
- "node_modules/@szmarczak/http-timer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz",
- "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==",
- "dev": true,
- "dependencies": {
- "defer-to-connect": "^2.0.1"
- },
- "engines": {
- "node": ">=14.16"
- }
- },
- "node_modules/@tootallnate/once": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
- "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
- "dev": true,
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@types/chai": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz",
- "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==",
- "dev": true
- },
- "node_modules/@types/chai-subset": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz",
- "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==",
- "dev": true,
- "dependencies": {
- "@types/chai": "*"
- }
- },
- "node_modules/@types/http-cache-semantics": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",
- "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==",
- "dev": true
- },
- "node_modules/@types/node": {
- "version": "18.11.18",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
- "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==",
- "dev": true
- },
- "node_modules/@vitest/expect": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.28.3.tgz",
- "integrity": "sha512-dnxllhfln88DOvpAK1fuI7/xHwRgTgR4wdxHldPaoTaBu6Rh9zK5b//v/cjTkhOfNP/AJ8evbNO8H7c3biwd1g==",
- "dev": true,
- "dependencies": {
- "@vitest/spy": "0.28.3",
- "@vitest/utils": "0.28.3",
- "chai": "^4.3.7"
- }
- },
- "node_modules/@vitest/runner": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.28.3.tgz",
- "integrity": "sha512-P0qYbATaemy1midOLkw7qf8jraJszCoEvjQOSlseiXZyEDaZTZ50J+lolz2hWiWv6RwDu1iNseL9XLsG0Jm2KQ==",
- "dev": true,
- "dependencies": {
- "@vitest/utils": "0.28.3",
- "p-limit": "^4.0.0",
- "pathe": "^1.1.0"
- }
- },
- "node_modules/@vitest/runner/node_modules/p-limit": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
- "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
- "dev": true,
- "dependencies": {
- "yocto-queue": "^1.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@vitest/runner/node_modules/yocto-queue": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
- "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
- "dev": true,
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@vitest/spy": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.28.3.tgz",
- "integrity": "sha512-jULA6suS6CCr9VZfr7/9x97pZ0hC55prnUNHNrg5/q16ARBY38RsjsfhuUXt6QOwvIN3BhSS0QqPzyh5Di8g6w==",
- "dev": true,
- "dependencies": {
- "tinyspy": "^1.0.2"
- }
- },
- "node_modules/@vitest/utils": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.28.3.tgz",
- "integrity": "sha512-YHiQEHQqXyIbhDqETOJUKx9/psybF7SFFVCNfOvap0FvyUqbzTSDCa3S5lL4C0CLXkwVZttz9xknDoyHMguFRQ==",
- "dev": true,
- "dependencies": {
- "cli-truncate": "^3.1.0",
- "diff": "^5.1.0",
- "loupe": "^2.3.6",
- "picocolors": "^1.0.0",
- "pretty-format": "^27.5.1"
- }
- },
- "node_modules/abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
- "dev": true
- },
- "node_modules/acorn": {
- "version": "8.8.2",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
- "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
- "dev": true,
- "bin": {
- "acorn": "bin/acorn"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/acorn-walk": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
- "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
- "dev": true,
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/agent-base": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
- "dev": true,
- "dependencies": {
- "debug": "4"
- },
- "engines": {
- "node": ">= 6.0.0"
- }
- },
- "node_modules/agentkeepalive": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz",
- "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==",
- "dev": true,
- "dependencies": {
- "debug": "^4.1.0",
- "depd": "^1.1.2",
- "humanize-ms": "^1.2.1"
- },
- "engines": {
- "node": ">= 8.0.0"
- }
- },
- "node_modules/aggregate-error": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
- "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
- "dev": true,
- "dependencies": {
- "clean-stack": "^2.0.0",
- "indent-string": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-align": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
- "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==",
- "dev": true,
- "dependencies": {
- "string-width": "^4.1.0"
- }
- },
- "node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-styles": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/aproba": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
- "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
- "dev": true
- },
- "node_modules/are-we-there-yet": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz",
- "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==",
- "dev": true,
- "dependencies": {
- "delegates": "^1.0.0",
- "readable-stream": "^3.6.0"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true
- },
- "node_modules/array-union": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
- "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/assertion-error": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
- "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true
- },
- "node_modules/boxen": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.1.tgz",
- "integrity": "sha512-8k2eH6SRAK00NDl1iX5q17RJ8rfl53TajdYxE3ssMLehbg487dEVgsad4pIsZb/QqBgYWIl6JOauMTLGX2Kpkw==",
- "dev": true,
- "dependencies": {
- "ansi-align": "^3.0.1",
- "camelcase": "^7.0.0",
- "chalk": "^5.0.1",
- "cli-boxes": "^3.0.0",
- "string-width": "^5.1.2",
- "type-fest": "^2.13.0",
- "widest-line": "^4.0.1",
- "wrap-ansi": "^8.0.1"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/boxen/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/boxen/node_modules/emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "node_modules/boxen/node_modules/string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "dependencies": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/boxen/node_modules/strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
- "dev": true,
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "node_modules/braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
- "dev": true,
- "dependencies": {
- "fill-range": "^7.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/buffer-from": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
- "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
- "dev": true
- },
- "node_modules/builtins": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz",
- "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==",
- "dev": true,
- "dependencies": {
- "semver": "^7.0.0"
- }
- },
- "node_modules/cac": {
- "version": "6.7.14",
- "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
- "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cacache": {
- "version": "17.0.4",
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.4.tgz",
- "integrity": "sha512-Z/nL3gU+zTUjz5pCA5vVjYM8pmaw2kxM7JEiE0fv3w77Wj+sFbi70CrBruUWH0uNcEdvLDixFpgA2JM4F4DBjA==",
- "dev": true,
- "dependencies": {
- "@npmcli/fs": "^3.1.0",
- "fs-minipass": "^3.0.0",
- "glob": "^8.0.1",
- "lru-cache": "^7.7.1",
- "minipass": "^4.0.0",
- "minipass-collect": "^1.0.2",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "p-map": "^4.0.0",
- "promise-inflight": "^1.0.1",
- "ssri": "^10.0.0",
- "tar": "^6.1.11",
- "unique-filename": "^3.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/cacheable-lookup": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
- "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==",
- "dev": true,
- "engines": {
- "node": ">=14.16"
- }
- },
- "node_modules/cacheable-request": {
- "version": "10.2.7",
- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.7.tgz",
- "integrity": "sha512-I4SA6mKgDxcxVbSt/UmIkb9Ny8qSkg6ReBHtAAXnZHk7KOSx5g3DTiAOaYzcHCs6oOdHn+bip9T48E6tMvK9hw==",
- "dev": true,
- "dependencies": {
- "@types/http-cache-semantics": "^4.0.1",
- "get-stream": "^6.0.1",
- "http-cache-semantics": "^4.1.1",
- "keyv": "^4.5.2",
- "mimic-response": "^4.0.0",
- "normalize-url": "^8.0.0",
- "responselike": "^3.0.0"
- },
- "engines": {
- "node": ">=14.16"
- }
- },
- "node_modules/camelcase": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
- "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
- "dev": true,
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/chai": {
- "version": "4.3.7",
- "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz",
- "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==",
- "dev": true,
- "dependencies": {
- "assertion-error": "^1.1.0",
- "check-error": "^1.0.2",
- "deep-eql": "^4.1.2",
- "get-func-name": "^2.0.0",
- "loupe": "^2.3.1",
- "pathval": "^1.1.1",
- "type-detect": "^4.0.5"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/chalk": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
- "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
- "dev": true,
- "engines": {
- "node": "^12.17.0 || ^14.13 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/check-error": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
- "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/chownr": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
- "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/ci-info": {
- "version": "3.7.1",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz",
- "integrity": "sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/sibiraj-s"
- }
- ],
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/clean-stack": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
- "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/cli-boxes": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",
- "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/cli-table": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz",
- "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==",
- "dev": true,
- "dependencies": {
- "colors": "1.0.3"
- },
- "engines": {
- "node": ">= 0.2.0"
- }
- },
- "node_modules/cli-truncate": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz",
- "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==",
- "dev": true,
- "dependencies": {
- "slice-ansi": "^5.0.0",
- "string-width": "^5.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/cli-truncate/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/cli-truncate/node_modules/emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "node_modules/cli-truncate/node_modules/string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "dependencies": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/cli-truncate/node_modules/strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "node_modules/color-support": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
- "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
- "dev": true,
- "bin": {
- "color-support": "bin.js"
- }
- },
- "node_modules/colors": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
- "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==",
- "dev": true,
- "engines": {
- "node": ">=0.1.90"
- }
- },
- "node_modules/commander": {
- "version": "9.5.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
- "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
- "dev": true,
- "engines": {
- "node": "^12.20.0 || >=14"
- }
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true
- },
- "node_modules/config-chain": {
- "version": "1.1.13",
- "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
- "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
- "dev": true,
- "dependencies": {
- "ini": "^1.3.4",
- "proto-list": "~1.2.1"
- }
- },
- "node_modules/config-chain/node_modules/ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
- "dev": true
- },
- "node_modules/configstore": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz",
- "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==",
- "dev": true,
- "dependencies": {
- "dot-prop": "^6.0.1",
- "graceful-fs": "^4.2.6",
- "unique-string": "^3.0.0",
- "write-file-atomic": "^3.0.3",
- "xdg-basedir": "^5.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/yeoman/configstore?sponsor=1"
- }
- },
- "node_modules/console-control-strings": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
- "dev": true
- },
- "node_modules/cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
- "dev": true,
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/cross-spawn/node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/crypto-random-string": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz",
- "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==",
- "dev": true,
- "dependencies": {
- "type-fest": "^1.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/crypto-random-string/node_modules/type-fest": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
- "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/css.escape": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",
- "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==",
- "dev": true
- },
- "node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/decompress-response": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
- "dev": true,
- "dependencies": {
- "mimic-response": "^3.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/decompress-response/node_modules/mimic-response": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/deep-eql": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz",
- "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==",
- "dev": true,
- "dependencies": {
- "type-detect": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/deep-extend": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
- "dev": true,
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/defer-to-connect": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
- "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/delegates": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
- "dev": true
- },
- "node_modules/depd": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
- "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/diff": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz",
- "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==",
- "dev": true,
- "engines": {
- "node": ">=0.3.1"
- }
- },
- "node_modules/dir-glob": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
- "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
- "dev": true,
- "dependencies": {
- "path-type": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/dot-prop": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
- "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
- "dev": true,
- "dependencies": {
- "is-obj": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eastasianwidth": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
- "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
- "dev": true
- },
- "node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "node_modules/encoding": {
- "version": "0.1.13",
- "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
- "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
- "dev": true,
- "optional": true,
- "dependencies": {
- "iconv-lite": "^0.6.2"
- }
- },
- "node_modules/env-paths": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
- "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/err-code": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",
- "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",
- "dev": true
- },
- "node_modules/esbuild": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.5.tgz",
- "integrity": "sha512-Bu6WLCc9NMsNoMJUjGl3yBzTjVLXdysMltxQWiLAypP+/vQrf+3L1Xe8fCXzxaECus2cEJ9M7pk4yKatEwQMqQ==",
- "dev": true,
- "hasInstallScript": true,
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=12"
- },
- "optionalDependencies": {
- "@esbuild/android-arm": "0.17.5",
- "@esbuild/android-arm64": "0.17.5",
- "@esbuild/android-x64": "0.17.5",
- "@esbuild/darwin-arm64": "0.17.5",
- "@esbuild/darwin-x64": "0.17.5",
- "@esbuild/freebsd-arm64": "0.17.5",
- "@esbuild/freebsd-x64": "0.17.5",
- "@esbuild/linux-arm": "0.17.5",
- "@esbuild/linux-arm64": "0.17.5",
- "@esbuild/linux-ia32": "0.17.5",
- "@esbuild/linux-loong64": "0.17.5",
- "@esbuild/linux-mips64el": "0.17.5",
- "@esbuild/linux-ppc64": "0.17.5",
- "@esbuild/linux-riscv64": "0.17.5",
- "@esbuild/linux-s390x": "0.17.5",
- "@esbuild/linux-x64": "0.17.5",
- "@esbuild/netbsd-x64": "0.17.5",
- "@esbuild/openbsd-x64": "0.17.5",
- "@esbuild/sunos-x64": "0.17.5",
- "@esbuild/win32-arm64": "0.17.5",
- "@esbuild/win32-ia32": "0.17.5",
- "@esbuild/win32-x64": "0.17.5"
- }
- },
- "node_modules/esbuild-android-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz",
- "integrity": "sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-android-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz",
- "integrity": "sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-darwin-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz",
- "integrity": "sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-darwin-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz",
- "integrity": "sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-freebsd-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz",
- "integrity": "sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-freebsd-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz",
- "integrity": "sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-32": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz",
- "integrity": "sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz",
- "integrity": "sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-arm": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz",
- "integrity": "sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz",
- "integrity": "sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-mips64le": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz",
- "integrity": "sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-ppc64le": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz",
- "integrity": "sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-riscv64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz",
- "integrity": "sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-s390x": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz",
- "integrity": "sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-netbsd-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz",
- "integrity": "sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-openbsd-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz",
- "integrity": "sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-sunos-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz",
- "integrity": "sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-windows-32": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz",
- "integrity": "sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-windows-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz",
- "integrity": "sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-windows-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz",
- "integrity": "sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/escape-goat": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz",
- "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/fast-glob": {
- "version": "3.2.12",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
- "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
- "dev": true,
- "dependencies": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.2",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.4"
- },
- "engines": {
- "node": ">=8.6.0"
- }
- },
- "node_modules/fast-memoize": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz",
- "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==",
- "dev": true
- },
- "node_modules/fastq": {
- "version": "1.15.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
- "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
- "dev": true,
- "dependencies": {
- "reusify": "^1.0.4"
- }
- },
- "node_modules/fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
- "dev": true,
- "dependencies": {
- "to-regex-range": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
- "dev": true,
- "dependencies": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/form-data-encoder": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz",
- "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==",
- "dev": true,
- "engines": {
- "node": ">= 14.17"
- }
- },
- "node_modules/fp-and-or": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz",
- "integrity": "sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/fs-minipass": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.0.tgz",
- "integrity": "sha512-EUojgQaSPy6sxcqcZgQv6TVF6jiKvurji3AxhAivs/Ep4O1UpS8TusaxpybfFHZ2skRhLqzk6WR8nqNYIMMDeA==",
- "dev": true,
- "dependencies": {
- "minipass": "^4.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true
- },
- "node_modules/fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
- "hasInstallScript": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/function-bind": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
- "dev": true
- },
- "node_modules/gauge": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
- "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==",
- "dev": true,
- "dependencies": {
- "aproba": "^1.0.3 || ^2.0.0",
- "color-support": "^1.1.3",
- "console-control-strings": "^1.1.0",
- "has-unicode": "^2.0.1",
- "signal-exit": "^3.0.7",
- "string-width": "^4.2.3",
- "strip-ansi": "^6.0.1",
- "wide-align": "^1.1.5"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/get-func-name": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
- "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/get-stdin": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz",
- "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/get-stream": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
- "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/glob": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
- "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
- "dev": true,
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^5.0.1",
- "once": "^1.3.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dev": true,
- "dependencies": {
- "is-glob": "^4.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/global-dirs": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz",
- "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==",
- "dev": true,
- "dependencies": {
- "ini": "2.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/global-dirs/node_modules/ini": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz",
- "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/globby": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
- "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
- "dev": true,
- "dependencies": {
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.2.9",
- "ignore": "^5.2.0",
- "merge2": "^1.4.1",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/got": {
- "version": "12.5.3",
- "resolved": "https://registry.npmjs.org/got/-/got-12.5.3.tgz",
- "integrity": "sha512-8wKnb9MGU8IPGRIo+/ukTy9XLJBwDiCpIf5TVzQ9Cpol50eMTpBq2GAuDsuDIz7hTYmZgMgC1e9ydr6kSDWs3w==",
- "dev": true,
- "dependencies": {
- "@sindresorhus/is": "^5.2.0",
- "@szmarczak/http-timer": "^5.0.1",
- "cacheable-lookup": "^7.0.0",
- "cacheable-request": "^10.2.1",
- "decompress-response": "^6.0.0",
- "form-data-encoder": "^2.1.2",
- "get-stream": "^6.0.1",
- "http2-wrapper": "^2.1.10",
- "lowercase-keys": "^3.0.0",
- "p-cancelable": "^3.0.0",
- "responselike": "^3.0.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/got?sponsor=1"
- }
- },
- "node_modules/graceful-fs": {
- "version": "4.2.10",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
- "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
- "dev": true
- },
- "node_modules/happy-dom": {
- "version": "8.1.5",
- "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-8.1.5.tgz",
- "integrity": "sha512-/UXAJ2fHTs4H3vy7TS7c9PKFvPyaNialk2Er9NdXfpBKNaCITMOH03rkjHXp5jnJnSmRBa+av8E08PUAaIB1jQ==",
- "dev": true,
- "dependencies": {
- "css.escape": "^1.5.1",
- "he": "^1.2.0",
- "node-fetch": "^2.x.x",
- "webidl-conversions": "^7.0.0",
- "whatwg-encoding": "^2.0.0",
- "whatwg-mimetype": "^3.0.0"
- }
- },
- "node_modules/has": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
- "dev": true,
- "dependencies": {
- "function-bind": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4.0"
- }
- },
- "node_modules/has-unicode": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
- "dev": true
- },
- "node_modules/has-yarn": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz",
- "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==",
- "dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/he": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
- "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
- "dev": true,
- "bin": {
- "he": "bin/he"
- }
- },
- "node_modules/hosted-git-info": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz",
- "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==",
- "dev": true,
- "dependencies": {
- "lru-cache": "^7.5.1"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/http-cache-semantics": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
- "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
- "dev": true
- },
- "node_modules/http-proxy-agent": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
- "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
- "dev": true,
- "dependencies": {
- "@tootallnate/once": "2",
- "agent-base": "6",
- "debug": "4"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/http2-wrapper": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz",
- "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==",
- "dev": true,
- "dependencies": {
- "quick-lru": "^5.1.1",
- "resolve-alpn": "^1.2.0"
- },
- "engines": {
- "node": ">=10.19.0"
- }
- },
- "node_modules/https-proxy-agent": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
- "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
- "dev": true,
- "dependencies": {
- "agent-base": "6",
- "debug": "4"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/humanize-ms": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
- "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
- "dev": true,
- "dependencies": {
- "ms": "^2.0.0"
- }
- },
- "node_modules/iconv-lite": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
- "dev": true,
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/ignore": {
- "version": "5.2.4",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
- "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
- "dev": true,
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/ignore-walk": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz",
- "integrity": "sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==",
- "dev": true,
- "dependencies": {
- "minimatch": "^5.0.1"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/import-lazy": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
- "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
- "dev": true,
- "engines": {
- "node": ">=0.8.19"
- }
- },
- "node_modules/indent-string": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
- "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/infer-owner": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
- "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==",
- "dev": true
- },
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "dev": true,
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true
- },
- "node_modules/ini": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz",
- "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==",
- "dev": true,
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/ip": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
- "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
- "dev": true
- },
- "node_modules/is-ci": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
- "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==",
- "dev": true,
- "dependencies": {
- "ci-info": "^3.2.0"
- },
- "bin": {
- "is-ci": "bin.js"
- }
- },
- "node_modules/is-core-module": {
- "version": "2.11.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
- "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
- "dev": true,
- "dependencies": {
- "has": "^1.0.3"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "dev": true,
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-installed-globally": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz",
- "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==",
- "dev": true,
- "dependencies": {
- "global-dirs": "^3.0.0",
- "is-path-inside": "^3.0.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-lambda": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz",
- "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==",
- "dev": true
- },
- "node_modules/is-npm": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz",
- "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==",
- "dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "dev": true,
- "engines": {
- "node": ">=0.12.0"
- }
- },
- "node_modules/is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
- "dev": true
- },
- "node_modules/is-yarn-global": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.1.tgz",
- "integrity": "sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==",
- "dev": true,
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
- "dev": true
- },
- "node_modules/jju": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz",
- "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==",
- "dev": true
- },
- "node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
- "dev": true,
- "dependencies": {
- "argparse": "^2.0.1"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
- "node_modules/json-buffer": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": true
- },
- "node_modules/json-parse-even-better-errors": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz",
- "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==",
- "dev": true,
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/json-parse-helpfulerror": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz",
- "integrity": "sha512-XgP0FGR77+QhUxjXkwOMkC94k3WtqEBfcnjWqhRd82qTat4SWKRE+9kUnynz/shm3I4ea2+qISvTIeGTNU7kJg==",
- "dev": true,
- "dependencies": {
- "jju": "^1.1.0"
- }
- },
- "node_modules/json5": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
- "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
- "dev": true,
- "bin": {
- "json5": "lib/cli.js"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/jsonc-parser": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
- "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
- "dev": true
- },
- "node_modules/jsonlines": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz",
- "integrity": "sha512-ekDrAGso79Cvf+dtm+mL8OBI2bmAOt3gssYs833De/C9NmIpWDWyUO4zPgB5x2/OhY366dkhgfPMYfwZF7yOZA==",
- "dev": true
- },
- "node_modules/jsonparse": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
- "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==",
- "dev": true,
- "engines": [
- "node >= 0.2.0"
- ]
- },
- "node_modules/keyv": {
- "version": "4.5.2",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz",
- "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==",
- "dev": true,
- "dependencies": {
- "json-buffer": "3.0.1"
- }
- },
- "node_modules/kleur": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
- "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/latest-version": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz",
- "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==",
- "dev": true,
- "dependencies": {
- "package-json": "^8.1.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/local-pkg": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz",
- "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==",
- "dev": true,
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- }
- },
- "node_modules/locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
- "dev": true,
- "dependencies": {
- "p-locate": "^5.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/lodash": {
- "version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
- "dev": true
- },
- "node_modules/loupe": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz",
- "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==",
- "dev": true,
- "dependencies": {
- "get-func-name": "^2.0.0"
- }
- },
- "node_modules/lowercase-keys": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
- "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==",
- "dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/lru-cache": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
- "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
- "dev": true,
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/make-fetch-happen": {
- "version": "10.2.1",
- "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz",
- "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==",
- "dev": true,
- "dependencies": {
- "agentkeepalive": "^4.2.1",
- "cacache": "^16.1.0",
- "http-cache-semantics": "^4.1.0",
- "http-proxy-agent": "^5.0.0",
- "https-proxy-agent": "^5.0.0",
- "is-lambda": "^1.0.1",
- "lru-cache": "^7.7.1",
- "minipass": "^3.1.6",
- "minipass-collect": "^1.0.2",
- "minipass-fetch": "^2.0.3",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "negotiator": "^0.6.3",
- "promise-retry": "^2.0.1",
- "socks-proxy-agent": "^7.0.0",
- "ssri": "^9.0.0"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/make-fetch-happen/node_modules/@npmcli/fs": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz",
- "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==",
- "dev": true,
- "dependencies": {
- "@gar/promisify": "^1.1.3",
- "semver": "^7.3.5"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/make-fetch-happen/node_modules/cacache": {
- "version": "16.1.3",
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz",
- "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==",
- "dev": true,
- "dependencies": {
- "@npmcli/fs": "^2.1.0",
- "@npmcli/move-file": "^2.0.0",
- "chownr": "^2.0.0",
- "fs-minipass": "^2.1.0",
- "glob": "^8.0.1",
- "infer-owner": "^1.0.4",
- "lru-cache": "^7.7.1",
- "minipass": "^3.1.6",
- "minipass-collect": "^1.0.2",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "mkdirp": "^1.0.4",
- "p-map": "^4.0.0",
- "promise-inflight": "^1.0.1",
- "rimraf": "^3.0.2",
- "ssri": "^9.0.0",
- "tar": "^6.1.11",
- "unique-filename": "^2.0.0"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/make-fetch-happen/node_modules/fs-minipass": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
- "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
- "dev": true,
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/make-fetch-happen/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/make-fetch-happen/node_modules/ssri": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz",
- "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==",
- "dev": true,
- "dependencies": {
- "minipass": "^3.1.1"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/make-fetch-happen/node_modules/unique-filename": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz",
- "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==",
- "dev": true,
- "dependencies": {
- "unique-slug": "^3.0.0"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/make-fetch-happen/node_modules/unique-slug": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz",
- "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==",
- "dev": true,
- "dependencies": {
- "imurmurhash": "^0.1.4"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/merge2": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
- "dev": true,
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/micromatch": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
- "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
- "dev": true,
- "dependencies": {
- "braces": "^3.0.2",
- "picomatch": "^2.3.1"
- },
- "engines": {
- "node": ">=8.6"
- }
- },
- "node_modules/mimic-response": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz",
- "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==",
- "dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/minimatch": {
- "version": "5.1.6",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
- "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
- "dev": true,
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/minimist": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
- "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
- "dev": true,
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/minipass": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz",
- "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-collect": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",
- "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==",
- "dev": true,
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/minipass-collect/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-fetch": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz",
- "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==",
- "dev": true,
- "dependencies": {
- "minipass": "^3.1.6",
- "minipass-sized": "^1.0.3",
- "minizlib": "^2.1.2"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- },
- "optionalDependencies": {
- "encoding": "^0.1.13"
- }
- },
- "node_modules/minipass-fetch/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-flush": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz",
- "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==",
- "dev": true,
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/minipass-flush/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-json-stream": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz",
- "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==",
- "dev": true,
- "dependencies": {
- "jsonparse": "^1.3.1",
- "minipass": "^3.0.0"
- }
- },
- "node_modules/minipass-json-stream/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-pipeline": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz",
- "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==",
- "dev": true,
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-pipeline/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-sized": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz",
- "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==",
- "dev": true,
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-sized/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minizlib": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
- "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
- "dev": true,
- "dependencies": {
- "minipass": "^3.0.0",
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/minizlib/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "dev": true,
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/mlly": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.1.0.tgz",
- "integrity": "sha512-cwzBrBfwGC1gYJyfcy8TcZU1f+dbH/T+TuOhtYP2wLv/Fb51/uV7HJQfBPtEupZ2ORLRU1EKFS/QfS3eo9+kBQ==",
- "dev": true,
- "dependencies": {
- "acorn": "^8.8.1",
- "pathe": "^1.0.0",
- "pkg-types": "^1.0.1",
- "ufo": "^1.0.1"
- }
- },
- "node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/nanoid": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz",
- "integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg==",
- "dev": true,
- "bin": {
- "nanoid": "bin/nanoid.js"
- },
- "engines": {
- "node": "^14 || ^16 || >=18"
- }
- },
- "node_modules/negotiator": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
- "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/node-fetch": {
- "version": "2.6.7",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
- "dev": true,
- "dependencies": {
- "whatwg-url": "^5.0.0"
- },
- "engines": {
- "node": "4.x || >=6.0.0"
- },
- "peerDependencies": {
- "encoding": "^0.1.0"
- },
- "peerDependenciesMeta": {
- "encoding": {
- "optional": true
- }
- }
- },
- "node_modules/node-gyp": {
- "version": "9.3.1",
- "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz",
- "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==",
- "dev": true,
- "dependencies": {
- "env-paths": "^2.2.0",
- "glob": "^7.1.4",
- "graceful-fs": "^4.2.6",
- "make-fetch-happen": "^10.0.3",
- "nopt": "^6.0.0",
- "npmlog": "^6.0.0",
- "rimraf": "^3.0.2",
- "semver": "^7.3.5",
- "tar": "^6.1.2",
- "which": "^2.0.2"
- },
- "bin": {
- "node-gyp": "bin/node-gyp.js"
- },
- "engines": {
- "node": "^12.13 || ^14.13 || >=16"
- }
- },
- "node_modules/node-gyp/node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/node-gyp/node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dev": true,
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/node-gyp/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/node-gyp/node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/nopt": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz",
- "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==",
- "dev": true,
- "dependencies": {
- "abbrev": "^1.0.0"
- },
- "bin": {
- "nopt": "bin/nopt.js"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/normalize-package-data": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz",
- "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==",
- "dev": true,
- "dependencies": {
- "hosted-git-info": "^6.0.0",
- "is-core-module": "^2.8.1",
- "semver": "^7.3.5",
- "validate-npm-package-license": "^3.0.4"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/normalize-package-data/node_modules/hosted-git-info": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz",
- "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==",
- "dev": true,
- "dependencies": {
- "lru-cache": "^7.5.1"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/normalize-url": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz",
- "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==",
- "dev": true,
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/npm-bundled": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz",
- "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==",
- "dev": true,
- "dependencies": {
- "npm-normalize-package-bin": "^3.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/npm-check-updates": {
- "version": "16.6.3",
- "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.6.3.tgz",
- "integrity": "sha512-EKhsCbBcVrPlYKzaYQtRhGv9fxpexwROcvl5HebCUNpiCSlOWrzaJvrMlwi9i9GCyJCnH+YAeBPYdqnArA390A==",
- "dev": true,
- "dependencies": {
- "chalk": "^5.2.0",
- "cli-table": "^0.3.11",
- "commander": "^9.4.1",
- "fast-memoize": "^2.5.2",
- "find-up": "5.0.0",
- "fp-and-or": "^0.1.3",
- "get-stdin": "^8.0.0",
- "globby": "^11.0.4",
- "hosted-git-info": "^5.1.0",
- "ini": "^3.0.1",
- "json-parse-helpfulerror": "^1.0.3",
- "jsonlines": "^0.1.1",
- "lodash": "^4.17.21",
- "minimatch": "^5.1.2",
- "p-map": "^4.0.0",
- "pacote": "15.0.8",
- "parse-github-url": "^1.0.2",
- "progress": "^2.0.3",
- "prompts-ncu": "^2.5.1",
- "rc-config-loader": "^4.1.1",
- "remote-git-tags": "^3.0.0",
- "rimraf": "^3.0.2",
- "semver": "^7.3.8",
- "semver-utils": "^1.1.4",
- "source-map-support": "^0.5.21",
- "spawn-please": "^2.0.1",
- "untildify": "^4.0.0",
- "update-notifier": "^6.0.2",
- "yaml": "^2.2.0"
- },
- "bin": {
- "ncu": "build/src/bin/cli.js",
- "npm-check-updates": "build/src/bin/cli.js"
- },
- "engines": {
- "node": ">=14.14"
- }
- },
- "node_modules/npm-install-checks": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz",
- "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==",
- "dev": true,
- "dependencies": {
- "semver": "^7.1.1"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/npm-normalize-package-bin": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz",
- "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==",
- "dev": true,
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/npm-package-arg": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz",
- "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==",
- "dev": true,
- "dependencies": {
- "hosted-git-info": "^6.0.0",
- "proc-log": "^3.0.0",
- "semver": "^7.3.5",
- "validate-npm-package-name": "^5.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/npm-package-arg/node_modules/hosted-git-info": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz",
- "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==",
- "dev": true,
- "dependencies": {
- "lru-cache": "^7.5.1"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/npm-packlist": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz",
- "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==",
- "dev": true,
- "dependencies": {
- "ignore-walk": "^6.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/npm-pick-manifest": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz",
- "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==",
- "dev": true,
- "dependencies": {
- "npm-install-checks": "^6.0.0",
- "npm-normalize-package-bin": "^3.0.0",
- "npm-package-arg": "^10.0.0",
- "semver": "^7.3.5"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/npm-registry-fetch": {
- "version": "14.0.3",
- "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz",
- "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==",
- "dev": true,
- "dependencies": {
- "make-fetch-happen": "^11.0.0",
- "minipass": "^4.0.0",
- "minipass-fetch": "^3.0.0",
- "minipass-json-stream": "^1.0.1",
- "minizlib": "^2.1.2",
- "npm-package-arg": "^10.0.0",
- "proc-log": "^3.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/npm-registry-fetch/node_modules/make-fetch-happen": {
- "version": "11.0.2",
- "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.2.tgz",
- "integrity": "sha512-5n/Pq41w/uZghpdlXAY5kIM85RgJThtTH/NYBRAZ9VUOBWV90USaQjwGrw76fZP3Lj5hl/VZjpVvOaRBMoL/2w==",
- "dev": true,
- "dependencies": {
- "agentkeepalive": "^4.2.1",
- "cacache": "^17.0.0",
- "http-cache-semantics": "^4.1.0",
- "http-proxy-agent": "^5.0.0",
- "https-proxy-agent": "^5.0.0",
- "is-lambda": "^1.0.1",
- "lru-cache": "^7.7.1",
- "minipass": "^4.0.0",
- "minipass-collect": "^1.0.2",
- "minipass-fetch": "^3.0.0",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "negotiator": "^0.6.3",
- "promise-retry": "^2.0.1",
- "socks-proxy-agent": "^7.0.0",
- "ssri": "^10.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/npm-registry-fetch/node_modules/minipass-fetch": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz",
- "integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==",
- "dev": true,
- "dependencies": {
- "minipass": "^4.0.0",
- "minipass-sized": "^1.0.3",
- "minizlib": "^2.1.2"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- },
- "optionalDependencies": {
- "encoding": "^0.1.13"
- }
- },
- "node_modules/npmlog": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz",
- "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==",
- "dev": true,
- "dependencies": {
- "are-we-there-yet": "^3.0.0",
- "console-control-strings": "^1.1.0",
- "gauge": "^4.0.3",
- "set-blocking": "^2.0.0"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
- "dependencies": {
- "wrappy": "1"
- }
- },
- "node_modules/p-cancelable": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz",
- "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==",
- "dev": true,
- "engines": {
- "node": ">=12.20"
- }
- },
- "node_modules/p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
- "dev": true,
- "dependencies": {
- "yocto-queue": "^0.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dev": true,
- "dependencies": {
- "p-limit": "^3.0.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/p-map": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
- "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
- "dev": true,
- "dependencies": {
- "aggregate-error": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/package-json": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz",
- "integrity": "sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==",
- "dev": true,
- "dependencies": {
- "got": "^12.1.0",
- "registry-auth-token": "^5.0.1",
- "registry-url": "^6.0.0",
- "semver": "^7.3.7"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pacote": {
- "version": "15.0.8",
- "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.8.tgz",
- "integrity": "sha512-UlcumB/XS6xyyIMwg/WwMAyUmga+RivB5KgkRwA1hZNtrx+0Bt41KxHCvg1kr0pZ/ZeD8qjhW4fph6VaYRCbLw==",
- "dev": true,
- "dependencies": {
- "@npmcli/git": "^4.0.0",
- "@npmcli/installed-package-contents": "^2.0.1",
- "@npmcli/promise-spawn": "^6.0.1",
- "@npmcli/run-script": "^6.0.0",
- "cacache": "^17.0.0",
- "fs-minipass": "^3.0.0",
- "minipass": "^4.0.0",
- "npm-package-arg": "^10.0.0",
- "npm-packlist": "^7.0.0",
- "npm-pick-manifest": "^8.0.0",
- "npm-registry-fetch": "^14.0.0",
- "proc-log": "^3.0.0",
- "promise-retry": "^2.0.1",
- "read-package-json": "^6.0.0",
- "read-package-json-fast": "^3.0.0",
- "ssri": "^10.0.0",
- "tar": "^6.1.11"
- },
- "bin": {
- "pacote": "lib/bin.js"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/parse-github-url": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz",
- "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==",
- "dev": true,
- "bin": {
- "parse-github-url": "cli.js"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/path-exists": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-parse": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
- "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
- "dev": true
- },
- "node_modules/path-type": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
- "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pathe": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.0.tgz",
- "integrity": "sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==",
- "dev": true
- },
- "node_modules/pathval": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
- "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/picocolors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
- "dev": true
- },
- "node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true,
- "engines": {
- "node": ">=8.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/pkg-types": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.1.tgz",
- "integrity": "sha512-jHv9HB+Ho7dj6ItwppRDDl0iZRYBD0jsakHXtFgoLr+cHSF6xC+QL54sJmWxyGxOLYSHm0afhXhXcQDQqH9z8g==",
- "dev": true,
- "dependencies": {
- "jsonc-parser": "^3.2.0",
- "mlly": "^1.0.0",
- "pathe": "^1.0.0"
- }
- },
- "node_modules/postcss": {
- "version": "8.4.21",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",
- "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
- "dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/postcss"
- }
- ],
- "dependencies": {
- "nanoid": "^3.3.4",
- "picocolors": "^1.0.0",
- "source-map-js": "^1.0.2"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
- }
- },
- "node_modules/postcss/node_modules/nanoid": {
- "version": "3.3.4",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
- "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
- "dev": true,
- "bin": {
- "nanoid": "bin/nanoid.cjs"
- },
- "engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
- }
- },
- "node_modules/pretty-format": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
- "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.1",
- "ansi-styles": "^5.0.0",
- "react-is": "^17.0.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/pretty-format/node_modules/ansi-styles": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/proc-log": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz",
- "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==",
- "dev": true,
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/progress": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
- "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
- "dev": true,
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/promise-inflight": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
- "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==",
- "dev": true
- },
- "node_modules/promise-retry": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",
- "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",
- "dev": true,
- "dependencies": {
- "err-code": "^2.0.2",
- "retry": "^0.12.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/prompts-ncu": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/prompts-ncu/-/prompts-ncu-2.5.1.tgz",
- "integrity": "sha512-Hdd7GgV7b76Yh9FP9HL1D9xqtJCJdVPpiM2vDtuoc8W1KfweJe15gutFYmxkq83ViFaagFM8K0UcPCQ/tZq8bA==",
- "dev": true,
- "dependencies": {
- "kleur": "^4.0.1",
- "sisteransi": "^1.0.5"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/proto-list": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
- "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",
- "dev": true
- },
- "node_modules/pupa": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz",
- "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==",
- "dev": true,
- "dependencies": {
- "escape-goat": "^4.0.0"
- },
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/queue-microtask": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "node_modules/quick-lru": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
- "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/rc": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
- "dev": true,
- "dependencies": {
- "deep-extend": "^0.6.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- },
- "bin": {
- "rc": "cli.js"
- }
- },
- "node_modules/rc-config-loader": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.2.tgz",
- "integrity": "sha512-qKTnVWFl9OQYKATPzdfaZIbTxcHziQl92zYSxYC6umhOqyAsoj8H8Gq/+aFjAso68sBdjTz3A7omqeAkkF1MWg==",
- "dev": true,
- "dependencies": {
- "debug": "^4.3.4",
- "js-yaml": "^4.1.0",
- "json5": "^2.2.2",
- "require-from-string": "^2.0.2"
- }
- },
- "node_modules/rc/node_modules/ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
- "dev": true
- },
- "node_modules/react-is": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
- "dev": true
- },
- "node_modules/read-package-json": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz",
- "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==",
- "dev": true,
- "dependencies": {
- "glob": "^8.0.1",
- "json-parse-even-better-errors": "^3.0.0",
- "normalize-package-data": "^5.0.0",
- "npm-normalize-package-bin": "^3.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/read-package-json-fast": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz",
- "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==",
- "dev": true,
- "dependencies": {
- "json-parse-even-better-errors": "^3.0.0",
- "npm-normalize-package-bin": "^3.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/readable-stream": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
- "dev": true,
- "dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/registry-auth-token": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.1.tgz",
- "integrity": "sha512-UfxVOj8seK1yaIOiieV4FIP01vfBDLsY0H9sQzi9EbbUdJiuuBjJgLa1DpImXMNPnVkBD4eVxTEXcrZA6kfpJA==",
- "dev": true,
- "dependencies": {
- "@pnpm/npm-conf": "^1.0.4"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/registry-url": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz",
- "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==",
- "dev": true,
- "dependencies": {
- "rc": "1.2.8"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/remote-git-tags": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz",
- "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/require-from-string": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
- "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
- "dev": true,
- "dependencies": {
- "is-core-module": "^2.9.0",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- },
- "bin": {
- "resolve": "bin/resolve"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/resolve-alpn": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
- "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
- "dev": true
- },
- "node_modules/responselike": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz",
- "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==",
- "dev": true,
- "dependencies": {
- "lowercase-keys": "^3.0.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/retry": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
- "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
- "dev": true,
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/reusify": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
- "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
- "dev": true,
- "engines": {
- "iojs": ">=1.0.0",
- "node": ">=0.10.0"
- }
- },
- "node_modules/rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "dev": true,
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/rimraf/node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/rimraf/node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dev": true,
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/rimraf/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/rollup": {
- "version": "2.79.1",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz",
- "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
- "dev": true,
- "bin": {
- "rollup": "dist/bin/rollup"
- },
- "engines": {
- "node": ">=10.0.0"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/run-parallel": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "dependencies": {
- "queue-microtask": "^1.2.2"
- }
- },
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "node_modules/safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
- "dev": true
- },
- "node_modules/semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
- "dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/semver-diff": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz",
- "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==",
- "dev": true,
- "dependencies": {
- "semver": "^7.3.5"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/semver-utils": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz",
- "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==",
- "dev": true
- },
- "node_modules/semver/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/set-blocking": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
- "dev": true
- },
- "node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/siginfo": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
- "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",
- "dev": true
- },
- "node_modules/signal-exit": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
- "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
- "dev": true
- },
- "node_modules/sisteransi": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
- "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
- "dev": true
- },
- "node_modules/slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/slice-ansi": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
- "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
- "dev": true,
- "dependencies": {
- "ansi-styles": "^6.0.0",
- "is-fullwidth-code-point": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/slice-ansi?sponsor=1"
- }
- },
- "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
- "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/smart-buffer": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
- "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
- "dev": true,
- "engines": {
- "node": ">= 6.0.0",
- "npm": ">= 3.0.0"
- }
- },
- "node_modules/socks": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz",
- "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==",
- "dev": true,
- "dependencies": {
- "ip": "^2.0.0",
- "smart-buffer": "^4.2.0"
- },
- "engines": {
- "node": ">= 10.13.0",
- "npm": ">= 3.0.0"
- }
- },
- "node_modules/socks-proxy-agent": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz",
- "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==",
- "dev": true,
- "dependencies": {
- "agent-base": "^6.0.2",
- "debug": "^4.3.3",
- "socks": "^2.6.2"
- },
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/source-map-js": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
- "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/source-map-support": {
- "version": "0.5.21",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
- "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
- "dev": true,
- "dependencies": {
- "buffer-from": "^1.0.0",
- "source-map": "^0.6.0"
- }
- },
- "node_modules/spawn-please": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-2.0.1.tgz",
- "integrity": "sha512-W+cFbZR2q2mMTfjz5ZGvhBAiX+e/zczFCNlbS9mxiSdYswBXwUuBUT+a0urH+xZZa8f/bs0mXHyZsZHR9hKogA==",
- "dev": true,
- "dependencies": {
- "cross-spawn": "^7.0.3"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/spdx-correct": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
- "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
- "dev": true,
- "dependencies": {
- "spdx-expression-parse": "^3.0.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "node_modules/spdx-exceptions": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
- "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
- "dev": true
- },
- "node_modules/spdx-expression-parse": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
- "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
- "dev": true,
- "dependencies": {
- "spdx-exceptions": "^2.1.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "node_modules/spdx-license-ids": {
- "version": "3.0.12",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz",
- "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==",
- "dev": true
- },
- "node_modules/ssri": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz",
- "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==",
- "dev": true,
- "dependencies": {
- "minipass": "^4.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/stackback": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
- "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
- "dev": true
- },
- "node_modules/std-env": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.1.tgz",
- "integrity": "sha512-3H20QlwQsSm2OvAxWIYhs+j01MzzqwMwGiiO1NQaJYZgJZFPuAbf95/DiKRBSTYIJ2FeGUc+B/6mPGcWP9dO3Q==",
- "dev": true
- },
- "node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
- "node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/strip-literal": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.0.0.tgz",
- "integrity": "sha512-5o4LsH1lzBzO9UFH63AJ2ad2/S2AVx6NtjOcaz+VTT2h1RiRvbipW72z8M/lxEhcPHDBQwpDrnTF7sXy/7OwCQ==",
- "dev": true,
- "dependencies": {
- "acorn": "^8.8.1"
- },
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- }
- },
- "node_modules/supports-preserve-symlinks-flag": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
- "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
- "dev": true,
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/svelte": {
- "version": "3.55.1",
- "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.55.1.tgz",
- "integrity": "sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==",
- "dev": true,
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/tar": {
- "version": "6.1.13",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
- "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
- "dev": true,
- "dependencies": {
- "chownr": "^2.0.0",
- "fs-minipass": "^2.0.0",
- "minipass": "^4.0.0",
- "minizlib": "^2.1.1",
- "mkdirp": "^1.0.3",
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/tar/node_modules/fs-minipass": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
- "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
- "dev": true,
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/tinybench": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.3.1.tgz",
- "integrity": "sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==",
- "dev": true
- },
- "node_modules/tinypool": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.1.tgz",
- "integrity": "sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ==",
- "dev": true,
- "engines": {
- "node": ">=14.0.0"
- }
- },
- "node_modules/tinyspy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz",
- "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==",
- "dev": true,
- "engines": {
- "node": ">=14.0.0"
- }
- },
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dev": true,
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
- }
- },
- "node_modules/tr46": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
- "dev": true
- },
- "node_modules/type-detect": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
- "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/type-fest": {
- "version": "2.19.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
- "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
- "dev": true,
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/typedarray-to-buffer": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
- "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
- "dev": true,
- "dependencies": {
- "is-typedarray": "^1.0.0"
- }
- },
- "node_modules/ufo": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz",
- "integrity": "sha512-boAm74ubXHY7KJQZLlXrtMz52qFvpsbOxDcZOnw/Wf+LS4Mmyu7JxmzD4tDLtUQtmZECypJ0FrCz4QIe6dvKRA==",
- "dev": true
- },
- "node_modules/unique-filename": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz",
- "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==",
- "dev": true,
- "dependencies": {
- "unique-slug": "^4.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/unique-slug": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz",
- "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==",
- "dev": true,
- "dependencies": {
- "imurmurhash": "^0.1.4"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/unique-string": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz",
- "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==",
- "dev": true,
- "dependencies": {
- "crypto-random-string": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/untildify": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
- "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/update-notifier": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz",
- "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==",
- "dev": true,
- "dependencies": {
- "boxen": "^7.0.0",
- "chalk": "^5.0.1",
- "configstore": "^6.0.0",
- "has-yarn": "^3.0.0",
- "import-lazy": "^4.0.0",
- "is-ci": "^3.0.1",
- "is-installed-globally": "^0.4.0",
- "is-npm": "^6.0.0",
- "is-yarn-global": "^0.4.0",
- "latest-version": "^7.0.0",
- "pupa": "^3.1.0",
- "semver": "^7.3.7",
- "semver-diff": "^4.0.0",
- "xdg-basedir": "^5.1.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/yeoman/update-notifier?sponsor=1"
- }
- },
- "node_modules/util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
- "dev": true
- },
- "node_modules/validate-npm-package-license": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
- "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
- "dev": true,
- "dependencies": {
- "spdx-correct": "^3.0.0",
- "spdx-expression-parse": "^3.0.0"
- }
- },
- "node_modules/validate-npm-package-name": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz",
- "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==",
- "dev": true,
- "dependencies": {
- "builtins": "^5.0.0"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/vite": {
- "version": "3.2.5",
- "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.5.tgz",
- "integrity": "sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==",
- "dev": true,
- "dependencies": {
- "esbuild": "^0.15.9",
- "postcss": "^8.4.18",
- "resolve": "^1.22.1",
- "rollup": "^2.79.1"
- },
- "bin": {
- "vite": "bin/vite.js"
- },
- "engines": {
- "node": "^14.18.0 || >=16.0.0"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- },
- "peerDependencies": {
- "@types/node": ">= 14",
- "less": "*",
- "sass": "*",
- "stylus": "*",
- "sugarss": "*",
- "terser": "^5.4.0"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- },
- "less": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "stylus": {
- "optional": true
- },
- "sugarss": {
- "optional": true
- },
- "terser": {
- "optional": true
- }
- }
- },
- "node_modules/vite-node": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.28.3.tgz",
- "integrity": "sha512-uJJAOkgVwdfCX8PUQhqLyDOpkBS5+j+FdbsXoPVPDlvVjRkb/W/mLYQPSL6J+t8R0UV8tJSe8c9VyxVQNsDSyg==",
- "dev": true,
- "dependencies": {
- "cac": "^6.7.14",
- "debug": "^4.3.4",
- "mlly": "^1.1.0",
- "pathe": "^1.1.0",
- "picocolors": "^1.0.0",
- "source-map": "^0.6.1",
- "source-map-support": "^0.5.21",
- "vite": "^3.0.0 || ^4.0.0"
- },
- "bin": {
- "vite-node": "vite-node.mjs"
- },
- "engines": {
- "node": ">=v14.16.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- }
- },
- "node_modules/vite/node_modules/@esbuild/android-arm": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz",
- "integrity": "sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-loong64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz",
- "integrity": "sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/vite/node_modules/esbuild": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.18.tgz",
- "integrity": "sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==",
- "dev": true,
- "hasInstallScript": true,
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=12"
- },
- "optionalDependencies": {
- "@esbuild/android-arm": "0.15.18",
- "@esbuild/linux-loong64": "0.15.18",
- "esbuild-android-64": "0.15.18",
- "esbuild-android-arm64": "0.15.18",
- "esbuild-darwin-64": "0.15.18",
- "esbuild-darwin-arm64": "0.15.18",
- "esbuild-freebsd-64": "0.15.18",
- "esbuild-freebsd-arm64": "0.15.18",
- "esbuild-linux-32": "0.15.18",
- "esbuild-linux-64": "0.15.18",
- "esbuild-linux-arm": "0.15.18",
- "esbuild-linux-arm64": "0.15.18",
- "esbuild-linux-mips64le": "0.15.18",
- "esbuild-linux-ppc64le": "0.15.18",
- "esbuild-linux-riscv64": "0.15.18",
- "esbuild-linux-s390x": "0.15.18",
- "esbuild-netbsd-64": "0.15.18",
- "esbuild-openbsd-64": "0.15.18",
- "esbuild-sunos-64": "0.15.18",
- "esbuild-windows-32": "0.15.18",
- "esbuild-windows-64": "0.15.18",
- "esbuild-windows-arm64": "0.15.18"
- }
- },
- "node_modules/vitest": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.28.3.tgz",
- "integrity": "sha512-N41VPNf3VGJlWQizGvl1P5MGyv3ZZA2Zvh+2V8L6tYBAAuqqDK4zExunT1Cdb6dGfZ4gr+IMrnG8d4Z6j9ctPw==",
- "dev": true,
- "dependencies": {
- "@types/chai": "^4.3.4",
- "@types/chai-subset": "^1.3.3",
- "@types/node": "*",
- "@vitest/expect": "0.28.3",
- "@vitest/runner": "0.28.3",
- "@vitest/spy": "0.28.3",
- "@vitest/utils": "0.28.3",
- "acorn": "^8.8.1",
- "acorn-walk": "^8.2.0",
- "cac": "^6.7.14",
- "chai": "^4.3.7",
- "debug": "^4.3.4",
- "local-pkg": "^0.4.2",
- "pathe": "^1.1.0",
- "picocolors": "^1.0.0",
- "source-map": "^0.6.1",
- "std-env": "^3.3.1",
- "strip-literal": "^1.0.0",
- "tinybench": "^2.3.1",
- "tinypool": "^0.3.1",
- "tinyspy": "^1.0.2",
- "vite": "^3.0.0 || ^4.0.0",
- "vite-node": "0.28.3",
- "why-is-node-running": "^2.2.2"
- },
- "bin": {
- "vitest": "vitest.mjs"
- },
- "engines": {
- "node": ">=v14.16.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- },
- "peerDependencies": {
- "@edge-runtime/vm": "*",
- "@vitest/browser": "*",
- "@vitest/ui": "*",
- "happy-dom": "*",
- "jsdom": "*"
- },
- "peerDependenciesMeta": {
- "@edge-runtime/vm": {
- "optional": true
- },
- "@vitest/browser": {
- "optional": true
- },
- "@vitest/ui": {
- "optional": true
- },
- "happy-dom": {
- "optional": true
- },
- "jsdom": {
- "optional": true
- }
- }
- },
- "node_modules/webidl-conversions": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
- "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
- "dev": true,
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/whatwg-encoding": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
- "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
- "dev": true,
- "dependencies": {
- "iconv-lite": "0.6.3"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/whatwg-mimetype": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",
- "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==",
- "dev": true,
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/whatwg-url": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
- "dev": true,
- "dependencies": {
- "tr46": "~0.0.3",
- "webidl-conversions": "^3.0.0"
- }
- },
- "node_modules/whatwg-url/node_modules/webidl-conversions": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
- "dev": true
- },
- "node_modules/which": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz",
- "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==",
- "dev": true,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/which.js"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/why-is-node-running": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz",
- "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==",
- "dev": true,
- "dependencies": {
- "siginfo": "^2.0.0",
- "stackback": "0.0.2"
- },
- "bin": {
- "why-is-node-running": "cli.js"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/wide-align": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
- "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
- "dev": true,
- "dependencies": {
- "string-width": "^1.0.2 || 2 || 3 || 4"
- }
- },
- "node_modules/widest-line": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz",
- "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==",
- "dev": true,
- "dependencies": {
- "string-width": "^5.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/widest-line/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/widest-line/node_modules/emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "node_modules/widest-line/node_modules/string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "dependencies": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/widest-line/node_modules/strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "node_modules/wrap-ansi": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
- "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
- "dev": true,
- "dependencies": {
- "ansi-styles": "^6.1.0",
- "string-width": "^5.0.1",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/wrap-ansi/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/wrap-ansi/node_modules/emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "node_modules/wrap-ansi/node_modules/string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "dependencies": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/wrap-ansi/node_modules/strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true
- },
- "node_modules/write-file-atomic": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
- "dev": true,
- "dependencies": {
- "imurmurhash": "^0.1.4",
- "is-typedarray": "^1.0.0",
- "signal-exit": "^3.0.2",
- "typedarray-to-buffer": "^3.1.5"
- }
- },
- "node_modules/xdg-basedir": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz",
- "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
- "node_modules/yaml": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz",
- "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==",
- "dev": true,
- "engines": {
- "node": ">= 14"
- }
- },
- "node_modules/yocto-queue": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
- "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- }
- },
- "dependencies": {
- "@esbuild/android-arm": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.5.tgz",
- "integrity": "sha512-crmPUzgCmF+qZXfl1YkiFoUta2XAfixR1tEnr/gXIixE+WL8Z0BGqfydP5oox0EUOgQMMRgtATtakyAcClQVqQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/android-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.5.tgz",
- "integrity": "sha512-KHWkDqYAMmKZjY4RAN1PR96q6UOtfkWlTS8uEwWxdLtkRt/0F/csUhXIrVfaSIFxnscIBMPynGfhsMwQDRIBQw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/android-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.5.tgz",
- "integrity": "sha512-8fI/AnIdmWz/+1iza2WrCw8kwXK9wZp/yZY/iS8ioC+U37yJCeppi9EHY05ewJKN64ASoBIseufZROtcFnX5GA==",
- "dev": true,
- "optional": true
- },
- "@esbuild/darwin-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.5.tgz",
- "integrity": "sha512-EAvaoyIySV6Iif3NQCglUNpnMfHSUgC5ugt2efl3+QDntucJe5spn0udNZjTgNi6tKVqSceOw9tQ32liNZc1Xw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/darwin-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.5.tgz",
- "integrity": "sha512-ha7QCJh1fuSwwCgoegfdaljowwWozwTDjBgjD3++WAy/qwee5uUi1gvOg2WENJC6EUyHBOkcd3YmLDYSZ2TPPA==",
- "dev": true,
- "optional": true
- },
- "@esbuild/freebsd-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.5.tgz",
- "integrity": "sha512-VbdXJkn2aI2pQ/wxNEjEcnEDwPpxt3CWWMFYmO7CcdFBoOsABRy2W8F3kjbF9F/pecEUDcI3b5i2w+By4VQFPg==",
- "dev": true,
- "optional": true
- },
- "@esbuild/freebsd-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.5.tgz",
- "integrity": "sha512-olgGYND1/XnnWxwhjtY3/ryjOG/M4WfcA6XH8dBTH1cxMeBemMODXSFhkw71Kf4TeZFFTN25YOomaNh0vq2iXg==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-arm": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.5.tgz",
- "integrity": "sha512-YBdCyQwA3OQupi6W2/WO4FnI+NWFWe79cZEtlbqSESOHEg7a73htBIRiE6uHPQe7Yp5E4aALv+JxkRLGEUL7tw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.5.tgz",
- "integrity": "sha512-8a0bqSwu3OlLCfu2FBbDNgQyBYdPJh1B9PvNX7jMaKGC9/KopgHs37t+pQqeMLzcyRqG6z55IGNQAMSlCpBuqg==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-ia32": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.5.tgz",
- "integrity": "sha512-uCwm1r/+NdP7vndctgq3PoZrnmhmnecWAr114GWMRwg2QMFFX+kIWnp7IO220/JLgnXK/jP7VKAFBGmeOYBQYQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-loong64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.5.tgz",
- "integrity": "sha512-3YxhSBl5Sb6TtBjJu+HP93poBruFzgXmf3PVfIe4xOXMj1XpxboYZyw3W8BhoX/uwxzZz4K1I99jTE/5cgDT1g==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-mips64el": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.5.tgz",
- "integrity": "sha512-Hy5Z0YVWyYHdtQ5mfmfp8LdhVwGbwVuq8mHzLqrG16BaMgEmit2xKO+iDakHs+OetEx0EN/2mUzDdfdktI+Nmg==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-ppc64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.5.tgz",
- "integrity": "sha512-5dbQvBLbU/Y3Q4ABc9gi23hww1mQcM7KZ9KBqabB7qhJswYMf8WrDDOSw3gdf3p+ffmijMd28mfVMvFucuECyg==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-riscv64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.5.tgz",
- "integrity": "sha512-fp/KUB/ZPzEWGTEUgz9wIAKCqu7CjH1GqXUO2WJdik1UNBQ7Xzw7myIajpxztE4Csb9504ERiFMxZg5KZ6HlZQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-s390x": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.5.tgz",
- "integrity": "sha512-kRV3yw19YDqHTp8SfHXfObUFXlaiiw4o2lvT1XjsPZ++22GqZwSsYWJLjMi1Sl7j9qDlDUduWDze/nQx0d6Lzw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.5.tgz",
- "integrity": "sha512-vnxuhh9e4pbtABNLbT2ANW4uwQ/zvcHRCm1JxaYkzSehugoFd5iXyC4ci1nhXU13mxEwCnrnTIiiSGwa/uAF1g==",
- "dev": true,
- "optional": true
- },
- "@esbuild/netbsd-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.5.tgz",
- "integrity": "sha512-cigBpdiSx/vPy7doUyImsQQBnBjV5f1M99ZUlaJckDAJjgXWl6y9W17FIfJTy8TxosEF6MXq+fpLsitMGts2nA==",
- "dev": true,
- "optional": true
- },
- "@esbuild/openbsd-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.5.tgz",
- "integrity": "sha512-VdqRqPVIjjZfkf40LrqOaVuhw9EQiAZ/GNCSM2UplDkaIzYVsSnycxcFfAnHdWI8Gyt6dO15KHikbpxwx+xHbw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/sunos-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.5.tgz",
- "integrity": "sha512-ItxPaJ3MBLtI4nK+mALLEoUs6amxsx+J1ibnfcYMkqaCqHST1AkF4aENpBehty3czqw64r/XqL+W9WqU6kc2Qw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/win32-arm64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.5.tgz",
- "integrity": "sha512-4u2Q6qsJTYNFdS9zHoAi80spzf78C16m2wla4eJPh4kSbRv+BpXIfl6TmBSWupD8e47B1NrTfrOlEuco7mYQtg==",
- "dev": true,
- "optional": true
- },
- "@esbuild/win32-ia32": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.5.tgz",
- "integrity": "sha512-KYlm+Xu9TXsfTWAcocLuISRtqxKp/Y9ZBVg6CEEj0O5J9mn7YvBKzAszo2j1ndyzUPk+op+Tie2PJeN+BnXGqQ==",
- "dev": true,
- "optional": true
- },
- "@esbuild/win32-x64": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.5.tgz",
- "integrity": "sha512-XgA9qWRqby7xdYXuF6KALsn37QGBMHsdhmnpjfZtYxKxbTOwfnDM6MYi2WuUku5poNaX2n9XGVr20zgT/2QwCw==",
- "dev": true,
- "optional": true
- },
- "@gar/promisify": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",
- "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
- "dev": true
- },
- "@nodelib/fs.scandir": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
- "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
- "dev": true,
- "requires": {
- "@nodelib/fs.stat": "2.0.5",
- "run-parallel": "^1.1.9"
- }
- },
- "@nodelib/fs.stat": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
- "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
- "dev": true
- },
- "@nodelib/fs.walk": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
- "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
- "dev": true,
- "requires": {
- "@nodelib/fs.scandir": "2.1.5",
- "fastq": "^1.6.0"
- }
- },
- "@npmcli/fs": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz",
- "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==",
- "dev": true,
- "requires": {
- "semver": "^7.3.5"
- }
- },
- "@npmcli/git": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz",
- "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==",
- "dev": true,
- "requires": {
- "@npmcli/promise-spawn": "^6.0.0",
- "lru-cache": "^7.4.4",
- "mkdirp": "^1.0.4",
- "npm-pick-manifest": "^8.0.0",
- "proc-log": "^3.0.0",
- "promise-inflight": "^1.0.1",
- "promise-retry": "^2.0.1",
- "semver": "^7.3.5",
- "which": "^3.0.0"
- }
- },
- "@npmcli/installed-package-contents": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz",
- "integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==",
- "dev": true,
- "requires": {
- "npm-bundled": "^3.0.0",
- "npm-normalize-package-bin": "^3.0.0"
- }
- },
- "@npmcli/move-file": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz",
- "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==",
- "dev": true,
- "requires": {
- "mkdirp": "^1.0.4",
- "rimraf": "^3.0.2"
- }
- },
- "@npmcli/node-gyp": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz",
- "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==",
- "dev": true
- },
- "@npmcli/promise-spawn": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz",
- "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==",
- "dev": true,
- "requires": {
- "which": "^3.0.0"
- }
- },
- "@npmcli/run-script": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz",
- "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==",
- "dev": true,
- "requires": {
- "@npmcli/node-gyp": "^3.0.0",
- "@npmcli/promise-spawn": "^6.0.0",
- "node-gyp": "^9.0.0",
- "read-package-json-fast": "^3.0.0",
- "which": "^3.0.0"
- }
- },
- "@pnpm/network.ca-file": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz",
- "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==",
- "dev": true,
- "requires": {
- "graceful-fs": "4.2.10"
- }
- },
- "@pnpm/npm-conf": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-1.0.5.tgz",
- "integrity": "sha512-hD8ml183638O3R6/Txrh0L8VzGOrFXgRtRDG4qQC4tONdZ5Z1M+tlUUDUvrjYdmK6G+JTBTeaCLMna11cXzi8A==",
- "dev": true,
- "requires": {
- "@pnpm/network.ca-file": "^1.0.1",
- "config-chain": "^1.1.11"
- }
- },
- "@sindresorhus/is": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.3.0.tgz",
- "integrity": "sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==",
- "dev": true
- },
- "@szmarczak/http-timer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz",
- "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==",
- "dev": true,
- "requires": {
- "defer-to-connect": "^2.0.1"
- }
- },
- "@tootallnate/once": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
- "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
- "dev": true
- },
- "@types/chai": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz",
- "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==",
- "dev": true
- },
- "@types/chai-subset": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz",
- "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==",
- "dev": true,
- "requires": {
- "@types/chai": "*"
- }
- },
- "@types/http-cache-semantics": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",
- "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==",
- "dev": true
- },
- "@types/node": {
- "version": "18.11.18",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
- "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==",
- "dev": true
- },
- "@vitest/expect": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.28.3.tgz",
- "integrity": "sha512-dnxllhfln88DOvpAK1fuI7/xHwRgTgR4wdxHldPaoTaBu6Rh9zK5b//v/cjTkhOfNP/AJ8evbNO8H7c3biwd1g==",
- "dev": true,
- "requires": {
- "@vitest/spy": "0.28.3",
- "@vitest/utils": "0.28.3",
- "chai": "^4.3.7"
- }
- },
- "@vitest/runner": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.28.3.tgz",
- "integrity": "sha512-P0qYbATaemy1midOLkw7qf8jraJszCoEvjQOSlseiXZyEDaZTZ50J+lolz2hWiWv6RwDu1iNseL9XLsG0Jm2KQ==",
- "dev": true,
- "requires": {
- "@vitest/utils": "0.28.3",
- "p-limit": "^4.0.0",
- "pathe": "^1.1.0"
- },
- "dependencies": {
- "p-limit": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
- "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
- "dev": true,
- "requires": {
- "yocto-queue": "^1.0.0"
- }
- },
- "yocto-queue": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
- "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
- "dev": true
- }
- }
- },
- "@vitest/spy": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.28.3.tgz",
- "integrity": "sha512-jULA6suS6CCr9VZfr7/9x97pZ0hC55prnUNHNrg5/q16ARBY38RsjsfhuUXt6QOwvIN3BhSS0QqPzyh5Di8g6w==",
- "dev": true,
- "requires": {
- "tinyspy": "^1.0.2"
- }
- },
- "@vitest/utils": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.28.3.tgz",
- "integrity": "sha512-YHiQEHQqXyIbhDqETOJUKx9/psybF7SFFVCNfOvap0FvyUqbzTSDCa3S5lL4C0CLXkwVZttz9xknDoyHMguFRQ==",
- "dev": true,
- "requires": {
- "cli-truncate": "^3.1.0",
- "diff": "^5.1.0",
- "loupe": "^2.3.6",
- "picocolors": "^1.0.0",
- "pretty-format": "^27.5.1"
- }
- },
- "abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
- "dev": true
- },
- "acorn": {
- "version": "8.8.2",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
- "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
- "dev": true
- },
- "acorn-walk": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
- "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
- "dev": true
- },
- "agent-base": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
- "dev": true,
- "requires": {
- "debug": "4"
- }
- },
- "agentkeepalive": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz",
- "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==",
- "dev": true,
- "requires": {
- "debug": "^4.1.0",
- "depd": "^1.1.2",
- "humanize-ms": "^1.2.1"
- }
- },
- "aggregate-error": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
- "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
- "dev": true,
- "requires": {
- "clean-stack": "^2.0.0",
- "indent-string": "^4.0.0"
- }
- },
- "ansi-align": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
- "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==",
- "dev": true,
- "requires": {
- "string-width": "^4.1.0"
- }
- },
- "ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true
- },
- "ansi-styles": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
- "dev": true
- },
- "aproba": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
- "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
- "dev": true
- },
- "are-we-there-yet": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz",
- "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==",
- "dev": true,
- "requires": {
- "delegates": "^1.0.0",
- "readable-stream": "^3.6.0"
- }
- },
- "argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true
- },
- "array-union": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
- "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
- "dev": true
- },
- "assertion-error": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
- "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
- "dev": true
- },
- "balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true
- },
- "boxen": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.1.tgz",
- "integrity": "sha512-8k2eH6SRAK00NDl1iX5q17RJ8rfl53TajdYxE3ssMLehbg487dEVgsad4pIsZb/QqBgYWIl6JOauMTLGX2Kpkw==",
- "dev": true,
- "requires": {
- "ansi-align": "^3.0.1",
- "camelcase": "^7.0.0",
- "chalk": "^5.0.1",
- "cli-boxes": "^3.0.0",
- "string-width": "^5.1.2",
- "type-fest": "^2.13.0",
- "widest-line": "^4.0.1",
- "wrap-ansi": "^8.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "requires": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- }
- },
- "strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dev": true,
- "requires": {
- "ansi-regex": "^6.0.1"
- }
- }
- }
- },
- "brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0"
- }
- },
- "braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
- "dev": true,
- "requires": {
- "fill-range": "^7.0.1"
- }
- },
- "buffer-from": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
- "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
- "dev": true
- },
- "builtins": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz",
- "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==",
- "dev": true,
- "requires": {
- "semver": "^7.0.0"
- }
- },
- "cac": {
- "version": "6.7.14",
- "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
- "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
- "dev": true
- },
- "cacache": {
- "version": "17.0.4",
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.4.tgz",
- "integrity": "sha512-Z/nL3gU+zTUjz5pCA5vVjYM8pmaw2kxM7JEiE0fv3w77Wj+sFbi70CrBruUWH0uNcEdvLDixFpgA2JM4F4DBjA==",
- "dev": true,
- "requires": {
- "@npmcli/fs": "^3.1.0",
- "fs-minipass": "^3.0.0",
- "glob": "^8.0.1",
- "lru-cache": "^7.7.1",
- "minipass": "^4.0.0",
- "minipass-collect": "^1.0.2",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "p-map": "^4.0.0",
- "promise-inflight": "^1.0.1",
- "ssri": "^10.0.0",
- "tar": "^6.1.11",
- "unique-filename": "^3.0.0"
- }
- },
- "cacheable-lookup": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
- "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==",
- "dev": true
- },
- "cacheable-request": {
- "version": "10.2.7",
- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.7.tgz",
- "integrity": "sha512-I4SA6mKgDxcxVbSt/UmIkb9Ny8qSkg6ReBHtAAXnZHk7KOSx5g3DTiAOaYzcHCs6oOdHn+bip9T48E6tMvK9hw==",
- "dev": true,
- "requires": {
- "@types/http-cache-semantics": "^4.0.1",
- "get-stream": "^6.0.1",
- "http-cache-semantics": "^4.1.1",
- "keyv": "^4.5.2",
- "mimic-response": "^4.0.0",
- "normalize-url": "^8.0.0",
- "responselike": "^3.0.0"
- }
- },
- "camelcase": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
- "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
- "dev": true
- },
- "chai": {
- "version": "4.3.7",
- "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz",
- "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==",
- "dev": true,
- "requires": {
- "assertion-error": "^1.1.0",
- "check-error": "^1.0.2",
- "deep-eql": "^4.1.2",
- "get-func-name": "^2.0.0",
- "loupe": "^2.3.1",
- "pathval": "^1.1.1",
- "type-detect": "^4.0.5"
- }
- },
- "chalk": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
- "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
- "dev": true
- },
- "check-error": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
- "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==",
- "dev": true
- },
- "chownr": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
- "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
- "dev": true
- },
- "ci-info": {
- "version": "3.7.1",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz",
- "integrity": "sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==",
- "dev": true
- },
- "clean-stack": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
- "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
- "dev": true
- },
- "cli-boxes": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",
- "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==",
- "dev": true
- },
- "cli-table": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz",
- "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==",
- "dev": true,
- "requires": {
- "colors": "1.0.3"
- }
- },
- "cli-truncate": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz",
- "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==",
- "dev": true,
- "requires": {
- "slice-ansi": "^5.0.0",
- "string-width": "^5.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "requires": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- }
- },
- "strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dev": true,
- "requires": {
- "ansi-regex": "^6.0.1"
- }
- }
- }
- },
- "color-support": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
- "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
- "dev": true
- },
- "colors": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
- "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==",
- "dev": true
- },
- "commander": {
- "version": "9.5.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
- "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
- "dev": true
- },
- "concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
- "dev": true
- },
- "config-chain": {
- "version": "1.1.13",
- "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
- "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
- "dev": true,
- "requires": {
- "ini": "^1.3.4",
- "proto-list": "~1.2.1"
- },
- "dependencies": {
- "ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
- "dev": true
- }
- }
- },
- "configstore": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz",
- "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==",
- "dev": true,
- "requires": {
- "dot-prop": "^6.0.1",
- "graceful-fs": "^4.2.6",
- "unique-string": "^3.0.0",
- "write-file-atomic": "^3.0.3",
- "xdg-basedir": "^5.0.1"
- }
- },
- "console-control-strings": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
- "dev": true
- },
- "cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
- "dev": true,
- "requires": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "dependencies": {
- "which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "requires": {
- "isexe": "^2.0.0"
- }
- }
- }
- },
- "crypto-random-string": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz",
- "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==",
- "dev": true,
- "requires": {
- "type-fest": "^1.0.1"
- },
- "dependencies": {
- "type-fest": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
- "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
- "dev": true
- }
- }
- },
- "css.escape": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",
- "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==",
- "dev": true
- },
- "debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
- "requires": {
- "ms": "2.1.2"
- }
- },
- "decompress-response": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
- "dev": true,
- "requires": {
- "mimic-response": "^3.1.0"
- },
- "dependencies": {
- "mimic-response": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
- "dev": true
- }
- }
- },
- "deep-eql": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz",
- "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==",
- "dev": true,
- "requires": {
- "type-detect": "^4.0.0"
- }
- },
- "deep-extend": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
- "dev": true
- },
- "defer-to-connect": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
- "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
- "dev": true
- },
- "delegates": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
- "dev": true
- },
- "depd": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
- "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
- "dev": true
- },
- "diff": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz",
- "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==",
- "dev": true
- },
- "dir-glob": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
- "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
- "dev": true,
- "requires": {
- "path-type": "^4.0.0"
- }
- },
- "dot-prop": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
- "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
- "dev": true,
- "requires": {
- "is-obj": "^2.0.0"
- }
- },
- "eastasianwidth": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
- "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "encoding": {
- "version": "0.1.13",
- "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
- "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
- "dev": true,
- "optional": true,
- "requires": {
- "iconv-lite": "^0.6.2"
- }
- },
- "env-paths": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
- "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
- "dev": true
- },
- "err-code": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",
- "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",
- "dev": true
- },
- "esbuild": {
- "version": "0.17.5",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.5.tgz",
- "integrity": "sha512-Bu6WLCc9NMsNoMJUjGl3yBzTjVLXdysMltxQWiLAypP+/vQrf+3L1Xe8fCXzxaECus2cEJ9M7pk4yKatEwQMqQ==",
- "dev": true,
- "requires": {
- "@esbuild/android-arm": "0.17.5",
- "@esbuild/android-arm64": "0.17.5",
- "@esbuild/android-x64": "0.17.5",
- "@esbuild/darwin-arm64": "0.17.5",
- "@esbuild/darwin-x64": "0.17.5",
- "@esbuild/freebsd-arm64": "0.17.5",
- "@esbuild/freebsd-x64": "0.17.5",
- "@esbuild/linux-arm": "0.17.5",
- "@esbuild/linux-arm64": "0.17.5",
- "@esbuild/linux-ia32": "0.17.5",
- "@esbuild/linux-loong64": "0.17.5",
- "@esbuild/linux-mips64el": "0.17.5",
- "@esbuild/linux-ppc64": "0.17.5",
- "@esbuild/linux-riscv64": "0.17.5",
- "@esbuild/linux-s390x": "0.17.5",
- "@esbuild/linux-x64": "0.17.5",
- "@esbuild/netbsd-x64": "0.17.5",
- "@esbuild/openbsd-x64": "0.17.5",
- "@esbuild/sunos-x64": "0.17.5",
- "@esbuild/win32-arm64": "0.17.5",
- "@esbuild/win32-ia32": "0.17.5",
- "@esbuild/win32-x64": "0.17.5"
- }
- },
- "esbuild-android-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz",
- "integrity": "sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==",
- "dev": true,
- "optional": true
- },
- "esbuild-android-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz",
- "integrity": "sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-darwin-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz",
- "integrity": "sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==",
- "dev": true,
- "optional": true
- },
- "esbuild-darwin-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz",
- "integrity": "sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==",
- "dev": true,
- "optional": true
- },
- "esbuild-freebsd-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz",
- "integrity": "sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==",
- "dev": true,
- "optional": true
- },
- "esbuild-freebsd-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz",
- "integrity": "sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-32": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz",
- "integrity": "sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz",
- "integrity": "sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-arm": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz",
- "integrity": "sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz",
- "integrity": "sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-mips64le": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz",
- "integrity": "sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-ppc64le": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz",
- "integrity": "sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-riscv64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz",
- "integrity": "sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-s390x": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz",
- "integrity": "sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-netbsd-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz",
- "integrity": "sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==",
- "dev": true,
- "optional": true
- },
- "esbuild-openbsd-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz",
- "integrity": "sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-sunos-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz",
- "integrity": "sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-32": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz",
- "integrity": "sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz",
- "integrity": "sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-arm64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz",
- "integrity": "sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==",
- "dev": true,
- "optional": true
- },
- "escape-goat": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz",
- "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==",
- "dev": true
- },
- "fast-glob": {
- "version": "3.2.12",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
- "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
- "dev": true,
- "requires": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.2",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.4"
- }
- },
- "fast-memoize": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz",
- "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==",
- "dev": true
- },
- "fastq": {
- "version": "1.15.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
- "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
- "dev": true,
- "requires": {
- "reusify": "^1.0.4"
- }
- },
- "fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
- "dev": true,
- "requires": {
- "to-regex-range": "^5.0.1"
- }
- },
- "find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
- "dev": true,
- "requires": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- }
- },
- "form-data-encoder": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz",
- "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==",
- "dev": true
- },
- "fp-and-or": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz",
- "integrity": "sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g==",
- "dev": true
- },
- "fs-minipass": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.0.tgz",
- "integrity": "sha512-EUojgQaSPy6sxcqcZgQv6TVF6jiKvurji3AxhAivs/Ep4O1UpS8TusaxpybfFHZ2skRhLqzk6WR8nqNYIMMDeA==",
- "dev": true,
- "requires": {
- "minipass": "^4.0.0"
- }
- },
- "fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
- "dev": true
- },
- "fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
- "optional": true
- },
- "function-bind": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
- "dev": true
- },
- "gauge": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
- "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==",
- "dev": true,
- "requires": {
- "aproba": "^1.0.3 || ^2.0.0",
- "color-support": "^1.1.3",
- "console-control-strings": "^1.1.0",
- "has-unicode": "^2.0.1",
- "signal-exit": "^3.0.7",
- "string-width": "^4.2.3",
- "strip-ansi": "^6.0.1",
- "wide-align": "^1.1.5"
- }
- },
- "get-func-name": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
- "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==",
- "dev": true
- },
- "get-stdin": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz",
- "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==",
- "dev": true
- },
- "get-stream": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
- "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
- "dev": true
- },
- "glob": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
- "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^5.0.1",
- "once": "^1.3.0"
- }
- },
- "glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dev": true,
- "requires": {
- "is-glob": "^4.0.1"
- }
- },
- "global-dirs": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz",
- "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==",
- "dev": true,
- "requires": {
- "ini": "2.0.0"
- },
- "dependencies": {
- "ini": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz",
- "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==",
- "dev": true
- }
- }
- },
- "globby": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
- "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
- "dev": true,
- "requires": {
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.2.9",
- "ignore": "^5.2.0",
- "merge2": "^1.4.1",
- "slash": "^3.0.0"
- }
- },
- "got": {
- "version": "12.5.3",
- "resolved": "https://registry.npmjs.org/got/-/got-12.5.3.tgz",
- "integrity": "sha512-8wKnb9MGU8IPGRIo+/ukTy9XLJBwDiCpIf5TVzQ9Cpol50eMTpBq2GAuDsuDIz7hTYmZgMgC1e9ydr6kSDWs3w==",
- "dev": true,
- "requires": {
- "@sindresorhus/is": "^5.2.0",
- "@szmarczak/http-timer": "^5.0.1",
- "cacheable-lookup": "^7.0.0",
- "cacheable-request": "^10.2.1",
- "decompress-response": "^6.0.0",
- "form-data-encoder": "^2.1.2",
- "get-stream": "^6.0.1",
- "http2-wrapper": "^2.1.10",
- "lowercase-keys": "^3.0.0",
- "p-cancelable": "^3.0.0",
- "responselike": "^3.0.0"
- }
- },
- "graceful-fs": {
- "version": "4.2.10",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
- "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
- "dev": true
- },
- "happy-dom": {
- "version": "8.1.5",
- "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-8.1.5.tgz",
- "integrity": "sha512-/UXAJ2fHTs4H3vy7TS7c9PKFvPyaNialk2Er9NdXfpBKNaCITMOH03rkjHXp5jnJnSmRBa+av8E08PUAaIB1jQ==",
- "dev": true,
- "requires": {
- "css.escape": "^1.5.1",
- "he": "^1.2.0",
- "node-fetch": "^2.x.x",
- "webidl-conversions": "^7.0.0",
- "whatwg-encoding": "^2.0.0",
- "whatwg-mimetype": "^3.0.0"
- }
- },
- "has": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
- "dev": true,
- "requires": {
- "function-bind": "^1.1.1"
- }
- },
- "has-unicode": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
- "dev": true
- },
- "has-yarn": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz",
- "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==",
- "dev": true
- },
- "he": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
- "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
- "dev": true
- },
- "hosted-git-info": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz",
- "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==",
- "dev": true,
- "requires": {
- "lru-cache": "^7.5.1"
- }
- },
- "http-cache-semantics": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
- "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
- "dev": true
- },
- "http-proxy-agent": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
- "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
- "dev": true,
- "requires": {
- "@tootallnate/once": "2",
- "agent-base": "6",
- "debug": "4"
- }
- },
- "http2-wrapper": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz",
- "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==",
- "dev": true,
- "requires": {
- "quick-lru": "^5.1.1",
- "resolve-alpn": "^1.2.0"
- }
- },
- "https-proxy-agent": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
- "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
- "dev": true,
- "requires": {
- "agent-base": "6",
- "debug": "4"
- }
- },
- "humanize-ms": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
- "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
- "dev": true,
- "requires": {
- "ms": "^2.0.0"
- }
- },
- "iconv-lite": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
- "dev": true,
- "requires": {
- "safer-buffer": ">= 2.1.2 < 3.0.0"
- }
- },
- "ignore": {
- "version": "5.2.4",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
- "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
- "dev": true
- },
- "ignore-walk": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz",
- "integrity": "sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==",
- "dev": true,
- "requires": {
- "minimatch": "^5.0.1"
- }
- },
- "import-lazy": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
- "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
- "dev": true
- },
- "imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
- "dev": true
- },
- "indent-string": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
- "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
- "dev": true
- },
- "infer-owner": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
- "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==",
- "dev": true
- },
- "inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "dev": true,
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true
- },
- "ini": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz",
- "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==",
- "dev": true
- },
- "ip": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
- "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
- "dev": true
- },
- "is-ci": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
- "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==",
- "dev": true,
- "requires": {
- "ci-info": "^3.2.0"
- }
- },
- "is-core-module": {
- "version": "2.11.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
- "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
- "dev": true,
- "requires": {
- "has": "^1.0.3"
- }
- },
- "is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
- },
- "is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "dev": true,
- "requires": {
- "is-extglob": "^2.1.1"
- }
- },
- "is-installed-globally": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz",
- "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==",
- "dev": true,
- "requires": {
- "global-dirs": "^3.0.0",
- "is-path-inside": "^3.0.2"
- }
- },
- "is-lambda": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz",
- "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==",
- "dev": true
- },
- "is-npm": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz",
- "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==",
- "dev": true
- },
- "is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "dev": true
- },
- "is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
- "dev": true
- },
- "is-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "dev": true
- },
- "is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
- "dev": true
- },
- "is-yarn-global": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.1.tgz",
- "integrity": "sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==",
- "dev": true
- },
- "isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
- "dev": true
- },
- "jju": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz",
- "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==",
- "dev": true
- },
- "js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
- "dev": true,
- "requires": {
- "argparse": "^2.0.1"
- }
- },
- "json-buffer": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": true
- },
- "json-parse-even-better-errors": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz",
- "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==",
- "dev": true
- },
- "json-parse-helpfulerror": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz",
- "integrity": "sha512-XgP0FGR77+QhUxjXkwOMkC94k3WtqEBfcnjWqhRd82qTat4SWKRE+9kUnynz/shm3I4ea2+qISvTIeGTNU7kJg==",
- "dev": true,
- "requires": {
- "jju": "^1.1.0"
- }
- },
- "json5": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
- "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
- "dev": true
- },
- "jsonc-parser": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
- "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
- "dev": true
- },
- "jsonlines": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz",
- "integrity": "sha512-ekDrAGso79Cvf+dtm+mL8OBI2bmAOt3gssYs833De/C9NmIpWDWyUO4zPgB5x2/OhY366dkhgfPMYfwZF7yOZA==",
- "dev": true
- },
- "jsonparse": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
- "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==",
- "dev": true
- },
- "keyv": {
- "version": "4.5.2",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz",
- "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==",
- "dev": true,
- "requires": {
- "json-buffer": "3.0.1"
- }
- },
- "kleur": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
- "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
- "dev": true
- },
- "latest-version": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz",
- "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==",
- "dev": true,
- "requires": {
- "package-json": "^8.1.0"
- }
- },
- "local-pkg": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz",
- "integrity": "sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==",
- "dev": true
- },
- "locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
- "dev": true,
- "requires": {
- "p-locate": "^5.0.0"
- }
- },
- "lodash": {
- "version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
- "dev": true
- },
- "loupe": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz",
- "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==",
- "dev": true,
- "requires": {
- "get-func-name": "^2.0.0"
- }
- },
- "lowercase-keys": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
- "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==",
- "dev": true
- },
- "lru-cache": {
- "version": "7.14.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
- "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
- "dev": true
- },
- "make-fetch-happen": {
- "version": "10.2.1",
- "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz",
- "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==",
- "dev": true,
- "requires": {
- "agentkeepalive": "^4.2.1",
- "cacache": "^16.1.0",
- "http-cache-semantics": "^4.1.0",
- "http-proxy-agent": "^5.0.0",
- "https-proxy-agent": "^5.0.0",
- "is-lambda": "^1.0.1",
- "lru-cache": "^7.7.1",
- "minipass": "^3.1.6",
- "minipass-collect": "^1.0.2",
- "minipass-fetch": "^2.0.3",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "negotiator": "^0.6.3",
- "promise-retry": "^2.0.1",
- "socks-proxy-agent": "^7.0.0",
- "ssri": "^9.0.0"
- },
- "dependencies": {
- "@npmcli/fs": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz",
- "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==",
- "dev": true,
- "requires": {
- "@gar/promisify": "^1.1.3",
- "semver": "^7.3.5"
- }
- },
- "cacache": {
- "version": "16.1.3",
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz",
- "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==",
- "dev": true,
- "requires": {
- "@npmcli/fs": "^2.1.0",
- "@npmcli/move-file": "^2.0.0",
- "chownr": "^2.0.0",
- "fs-minipass": "^2.1.0",
- "glob": "^8.0.1",
- "infer-owner": "^1.0.4",
- "lru-cache": "^7.7.1",
- "minipass": "^3.1.6",
- "minipass-collect": "^1.0.2",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "mkdirp": "^1.0.4",
- "p-map": "^4.0.0",
- "promise-inflight": "^1.0.1",
- "rimraf": "^3.0.2",
- "ssri": "^9.0.0",
- "tar": "^6.1.11",
- "unique-filename": "^2.0.0"
- }
- },
- "fs-minipass": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
- "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
- "dev": true,
- "requires": {
- "minipass": "^3.0.0"
- }
- },
- "minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- },
- "ssri": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz",
- "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==",
- "dev": true,
- "requires": {
- "minipass": "^3.1.1"
- }
- },
- "unique-filename": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz",
- "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==",
- "dev": true,
- "requires": {
- "unique-slug": "^3.0.0"
- }
- },
- "unique-slug": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz",
- "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==",
- "dev": true,
- "requires": {
- "imurmurhash": "^0.1.4"
- }
- }
- }
- },
- "merge2": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
- "dev": true
- },
- "micromatch": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
- "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
- "dev": true,
- "requires": {
- "braces": "^3.0.2",
- "picomatch": "^2.3.1"
- }
- },
- "mimic-response": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz",
- "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==",
- "dev": true
- },
- "minimatch": {
- "version": "5.1.6",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
- "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
- "dev": true,
- "requires": {
- "brace-expansion": "^2.0.1"
- }
- },
- "minimist": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
- "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
- "dev": true
- },
- "minipass": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz",
- "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- },
- "minipass-collect": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",
- "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==",
- "dev": true,
- "requires": {
- "minipass": "^3.0.0"
- },
- "dependencies": {
- "minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- }
- }
- },
- "minipass-fetch": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz",
- "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==",
- "dev": true,
- "requires": {
- "encoding": "^0.1.13",
- "minipass": "^3.1.6",
- "minipass-sized": "^1.0.3",
- "minizlib": "^2.1.2"
- },
- "dependencies": {
- "minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- }
- }
- },
- "minipass-flush": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz",
- "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==",
- "dev": true,
- "requires": {
- "minipass": "^3.0.0"
- },
- "dependencies": {
- "minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- }
- }
- },
- "minipass-json-stream": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz",
- "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==",
- "dev": true,
- "requires": {
- "jsonparse": "^1.3.1",
- "minipass": "^3.0.0"
- },
- "dependencies": {
- "minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- }
- }
- },
- "minipass-pipeline": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz",
- "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==",
- "dev": true,
- "requires": {
- "minipass": "^3.0.0"
- },
- "dependencies": {
- "minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- }
- }
- },
- "minipass-sized": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz",
- "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==",
- "dev": true,
- "requires": {
- "minipass": "^3.0.0"
- },
- "dependencies": {
- "minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- }
- }
- },
- "minizlib": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
- "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
- "dev": true,
- "requires": {
- "minipass": "^3.0.0",
- "yallist": "^4.0.0"
- },
- "dependencies": {
- "minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- }
- }
- },
- "mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "dev": true
- },
- "mlly": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.1.0.tgz",
- "integrity": "sha512-cwzBrBfwGC1gYJyfcy8TcZU1f+dbH/T+TuOhtYP2wLv/Fb51/uV7HJQfBPtEupZ2ORLRU1EKFS/QfS3eo9+kBQ==",
- "dev": true,
- "requires": {
- "acorn": "^8.8.1",
- "pathe": "^1.0.0",
- "pkg-types": "^1.0.1",
- "ufo": "^1.0.1"
- }
- },
- "ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "nanoid": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz",
- "integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg==",
- "dev": true
- },
- "negotiator": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
- "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
- "dev": true
- },
- "node-fetch": {
- "version": "2.6.7",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
- "dev": true,
- "requires": {
- "whatwg-url": "^5.0.0"
- }
- },
- "node-gyp": {
- "version": "9.3.1",
- "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz",
- "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==",
- "dev": true,
- "requires": {
- "env-paths": "^2.2.0",
- "glob": "^7.1.4",
- "graceful-fs": "^4.2.6",
- "make-fetch-happen": "^10.0.3",
- "nopt": "^6.0.0",
- "npmlog": "^6.0.0",
- "rimraf": "^3.0.2",
- "semver": "^7.3.5",
- "tar": "^6.1.2",
- "which": "^2.0.2"
- },
- "dependencies": {
- "brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- },
- "which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "requires": {
- "isexe": "^2.0.0"
- }
- }
- }
- },
- "nopt": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz",
- "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==",
- "dev": true,
- "requires": {
- "abbrev": "^1.0.0"
- }
- },
- "normalize-package-data": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz",
- "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==",
- "dev": true,
- "requires": {
- "hosted-git-info": "^6.0.0",
- "is-core-module": "^2.8.1",
- "semver": "^7.3.5",
- "validate-npm-package-license": "^3.0.4"
- },
- "dependencies": {
- "hosted-git-info": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz",
- "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==",
- "dev": true,
- "requires": {
- "lru-cache": "^7.5.1"
- }
- }
- }
- },
- "normalize-url": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz",
- "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==",
- "dev": true
- },
- "npm-bundled": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz",
- "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==",
- "dev": true,
- "requires": {
- "npm-normalize-package-bin": "^3.0.0"
- }
- },
- "npm-check-updates": {
- "version": "16.6.3",
- "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.6.3.tgz",
- "integrity": "sha512-EKhsCbBcVrPlYKzaYQtRhGv9fxpexwROcvl5HebCUNpiCSlOWrzaJvrMlwi9i9GCyJCnH+YAeBPYdqnArA390A==",
- "dev": true,
- "requires": {
- "chalk": "^5.2.0",
- "cli-table": "^0.3.11",
- "commander": "^9.4.1",
- "fast-memoize": "^2.5.2",
- "find-up": "5.0.0",
- "fp-and-or": "^0.1.3",
- "get-stdin": "^8.0.0",
- "globby": "^11.0.4",
- "hosted-git-info": "^5.1.0",
- "ini": "^3.0.1",
- "json-parse-helpfulerror": "^1.0.3",
- "jsonlines": "^0.1.1",
- "lodash": "^4.17.21",
- "minimatch": "^5.1.2",
- "p-map": "^4.0.0",
- "pacote": "15.0.8",
- "parse-github-url": "^1.0.2",
- "progress": "^2.0.3",
- "prompts-ncu": "^2.5.1",
- "rc-config-loader": "^4.1.1",
- "remote-git-tags": "^3.0.0",
- "rimraf": "^3.0.2",
- "semver": "^7.3.8",
- "semver-utils": "^1.1.4",
- "source-map-support": "^0.5.21",
- "spawn-please": "^2.0.1",
- "untildify": "^4.0.0",
- "update-notifier": "^6.0.2",
- "yaml": "^2.2.0"
- }
- },
- "npm-install-checks": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz",
- "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==",
- "dev": true,
- "requires": {
- "semver": "^7.1.1"
- }
- },
- "npm-normalize-package-bin": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz",
- "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==",
- "dev": true
- },
- "npm-package-arg": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz",
- "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==",
- "dev": true,
- "requires": {
- "hosted-git-info": "^6.0.0",
- "proc-log": "^3.0.0",
- "semver": "^7.3.5",
- "validate-npm-package-name": "^5.0.0"
- },
- "dependencies": {
- "hosted-git-info": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz",
- "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==",
- "dev": true,
- "requires": {
- "lru-cache": "^7.5.1"
- }
- }
- }
- },
- "npm-packlist": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz",
- "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==",
- "dev": true,
- "requires": {
- "ignore-walk": "^6.0.0"
- }
- },
- "npm-pick-manifest": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz",
- "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==",
- "dev": true,
- "requires": {
- "npm-install-checks": "^6.0.0",
- "npm-normalize-package-bin": "^3.0.0",
- "npm-package-arg": "^10.0.0",
- "semver": "^7.3.5"
- }
- },
- "npm-registry-fetch": {
- "version": "14.0.3",
- "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz",
- "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==",
- "dev": true,
- "requires": {
- "make-fetch-happen": "^11.0.0",
- "minipass": "^4.0.0",
- "minipass-fetch": "^3.0.0",
- "minipass-json-stream": "^1.0.1",
- "minizlib": "^2.1.2",
- "npm-package-arg": "^10.0.0",
- "proc-log": "^3.0.0"
- },
- "dependencies": {
- "make-fetch-happen": {
- "version": "11.0.2",
- "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.2.tgz",
- "integrity": "sha512-5n/Pq41w/uZghpdlXAY5kIM85RgJThtTH/NYBRAZ9VUOBWV90USaQjwGrw76fZP3Lj5hl/VZjpVvOaRBMoL/2w==",
- "dev": true,
- "requires": {
- "agentkeepalive": "^4.2.1",
- "cacache": "^17.0.0",
- "http-cache-semantics": "^4.1.0",
- "http-proxy-agent": "^5.0.0",
- "https-proxy-agent": "^5.0.0",
- "is-lambda": "^1.0.1",
- "lru-cache": "^7.7.1",
- "minipass": "^4.0.0",
- "minipass-collect": "^1.0.2",
- "minipass-fetch": "^3.0.0",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "negotiator": "^0.6.3",
- "promise-retry": "^2.0.1",
- "socks-proxy-agent": "^7.0.0",
- "ssri": "^10.0.0"
- }
- },
- "minipass-fetch": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz",
- "integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==",
- "dev": true,
- "requires": {
- "encoding": "^0.1.13",
- "minipass": "^4.0.0",
- "minipass-sized": "^1.0.3",
- "minizlib": "^2.1.2"
- }
- }
- }
- },
- "npmlog": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz",
- "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==",
- "dev": true,
- "requires": {
- "are-we-there-yet": "^3.0.0",
- "console-control-strings": "^1.1.0",
- "gauge": "^4.0.3",
- "set-blocking": "^2.0.0"
- }
- },
- "once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dev": true,
- "requires": {
- "wrappy": "1"
- }
- },
- "p-cancelable": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz",
- "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==",
- "dev": true
- },
- "p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
- "dev": true,
- "requires": {
- "yocto-queue": "^0.1.0"
- }
- },
- "p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dev": true,
- "requires": {
- "p-limit": "^3.0.2"
- }
- },
- "p-map": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
- "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
- "dev": true,
- "requires": {
- "aggregate-error": "^3.0.0"
- }
- },
- "package-json": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz",
- "integrity": "sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==",
- "dev": true,
- "requires": {
- "got": "^12.1.0",
- "registry-auth-token": "^5.0.1",
- "registry-url": "^6.0.0",
- "semver": "^7.3.7"
- }
- },
- "pacote": {
- "version": "15.0.8",
- "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.8.tgz",
- "integrity": "sha512-UlcumB/XS6xyyIMwg/WwMAyUmga+RivB5KgkRwA1hZNtrx+0Bt41KxHCvg1kr0pZ/ZeD8qjhW4fph6VaYRCbLw==",
- "dev": true,
- "requires": {
- "@npmcli/git": "^4.0.0",
- "@npmcli/installed-package-contents": "^2.0.1",
- "@npmcli/promise-spawn": "^6.0.1",
- "@npmcli/run-script": "^6.0.0",
- "cacache": "^17.0.0",
- "fs-minipass": "^3.0.0",
- "minipass": "^4.0.0",
- "npm-package-arg": "^10.0.0",
- "npm-packlist": "^7.0.0",
- "npm-pick-manifest": "^8.0.0",
- "npm-registry-fetch": "^14.0.0",
- "proc-log": "^3.0.0",
- "promise-retry": "^2.0.1",
- "read-package-json": "^6.0.0",
- "read-package-json-fast": "^3.0.0",
- "ssri": "^10.0.0",
- "tar": "^6.1.11"
- }
- },
- "parse-github-url": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz",
- "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==",
- "dev": true
- },
- "path-exists": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "dev": true
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "dev": true
- },
- "path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true
- },
- "path-parse": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
- "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
- "dev": true
- },
- "path-type": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
- "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
- "dev": true
- },
- "pathe": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.0.tgz",
- "integrity": "sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==",
- "dev": true
- },
- "pathval": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
- "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
- "dev": true
- },
- "picocolors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
- "dev": true
- },
- "picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true
- },
- "pkg-types": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.1.tgz",
- "integrity": "sha512-jHv9HB+Ho7dj6ItwppRDDl0iZRYBD0jsakHXtFgoLr+cHSF6xC+QL54sJmWxyGxOLYSHm0afhXhXcQDQqH9z8g==",
- "dev": true,
- "requires": {
- "jsonc-parser": "^3.2.0",
- "mlly": "^1.0.0",
- "pathe": "^1.0.0"
- }
- },
- "postcss": {
- "version": "8.4.21",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",
- "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
- "dev": true,
- "requires": {
- "nanoid": "^3.3.4",
- "picocolors": "^1.0.0",
- "source-map-js": "^1.0.2"
- },
- "dependencies": {
- "nanoid": {
- "version": "3.3.4",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
- "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
- "dev": true
- }
- }
- },
- "pretty-format": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
- "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.1",
- "ansi-styles": "^5.0.0",
- "react-is": "^17.0.1"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
- "dev": true
- }
- }
- },
- "proc-log": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz",
- "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==",
- "dev": true
- },
- "progress": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
- "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
- "dev": true
- },
- "promise-inflight": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
- "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==",
- "dev": true
- },
- "promise-retry": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",
- "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",
- "dev": true,
- "requires": {
- "err-code": "^2.0.2",
- "retry": "^0.12.0"
- }
- },
- "prompts-ncu": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/prompts-ncu/-/prompts-ncu-2.5.1.tgz",
- "integrity": "sha512-Hdd7GgV7b76Yh9FP9HL1D9xqtJCJdVPpiM2vDtuoc8W1KfweJe15gutFYmxkq83ViFaagFM8K0UcPCQ/tZq8bA==",
- "dev": true,
- "requires": {
- "kleur": "^4.0.1",
- "sisteransi": "^1.0.5"
- }
- },
- "proto-list": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
- "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",
- "dev": true
- },
- "pupa": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz",
- "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==",
- "dev": true,
- "requires": {
- "escape-goat": "^4.0.0"
- }
- },
- "queue-microtask": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
- "dev": true
- },
- "quick-lru": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
- "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
- "dev": true
- },
- "rc": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
- "dev": true,
- "requires": {
- "deep-extend": "^0.6.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- },
- "dependencies": {
- "ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
- "dev": true
- }
- }
- },
- "rc-config-loader": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.2.tgz",
- "integrity": "sha512-qKTnVWFl9OQYKATPzdfaZIbTxcHziQl92zYSxYC6umhOqyAsoj8H8Gq/+aFjAso68sBdjTz3A7omqeAkkF1MWg==",
- "dev": true,
- "requires": {
- "debug": "^4.3.4",
- "js-yaml": "^4.1.0",
- "json5": "^2.2.2",
- "require-from-string": "^2.0.2"
- }
- },
- "react-is": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
- "dev": true
- },
- "read-package-json": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz",
- "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==",
- "dev": true,
- "requires": {
- "glob": "^8.0.1",
- "json-parse-even-better-errors": "^3.0.0",
- "normalize-package-data": "^5.0.0",
- "npm-normalize-package-bin": "^3.0.0"
- }
- },
- "read-package-json-fast": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz",
- "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==",
- "dev": true,
- "requires": {
- "json-parse-even-better-errors": "^3.0.0",
- "npm-normalize-package-bin": "^3.0.0"
- }
- },
- "readable-stream": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
- "dev": true,
- "requires": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- }
- },
- "registry-auth-token": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.1.tgz",
- "integrity": "sha512-UfxVOj8seK1yaIOiieV4FIP01vfBDLsY0H9sQzi9EbbUdJiuuBjJgLa1DpImXMNPnVkBD4eVxTEXcrZA6kfpJA==",
- "dev": true,
- "requires": {
- "@pnpm/npm-conf": "^1.0.4"
- }
- },
- "registry-url": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz",
- "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==",
- "dev": true,
- "requires": {
- "rc": "1.2.8"
- }
- },
- "remote-git-tags": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz",
- "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==",
- "dev": true
- },
- "require-from-string": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
- "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
- "dev": true
- },
- "resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
- "dev": true,
- "requires": {
- "is-core-module": "^2.9.0",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- }
- },
- "resolve-alpn": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
- "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
- "dev": true
- },
- "responselike": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz",
- "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==",
- "dev": true,
- "requires": {
- "lowercase-keys": "^3.0.0"
- }
- },
- "retry": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
- "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
- "dev": true
- },
- "reusify": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
- "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
- "dev": true
- },
- "rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "dev": true,
- "requires": {
- "glob": "^7.1.3"
- },
- "dependencies": {
- "brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- }
- }
- },
- "rollup": {
- "version": "2.79.1",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz",
- "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
- "dev": true,
- "requires": {
- "fsevents": "~2.3.2"
- }
- },
- "run-parallel": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
- "dev": true,
- "requires": {
- "queue-microtask": "^1.2.2"
- }
- },
- "safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "dev": true
- },
- "safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
- "dev": true
- },
- "semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
- "dev": true,
- "requires": {
- "lru-cache": "^6.0.0"
- },
- "dependencies": {
- "lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- }
- }
- },
- "semver-diff": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz",
- "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==",
- "dev": true,
- "requires": {
- "semver": "^7.3.5"
- }
- },
- "semver-utils": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz",
- "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==",
- "dev": true
- },
- "set-blocking": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
- "dev": true
- },
- "shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
- "requires": {
- "shebang-regex": "^3.0.0"
- }
- },
- "shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true
- },
- "siginfo": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
- "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",
- "dev": true
- },
- "signal-exit": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
- "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
- "dev": true
- },
- "sisteransi": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
- "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
- "dev": true
- },
- "slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
- "dev": true
- },
- "slice-ansi": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
- "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^6.0.0",
- "is-fullwidth-code-point": "^4.0.0"
- },
- "dependencies": {
- "is-fullwidth-code-point": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
- "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
- "dev": true
- }
- }
- },
- "smart-buffer": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
- "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
- "dev": true
- },
- "socks": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz",
- "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==",
- "dev": true,
- "requires": {
- "ip": "^2.0.0",
- "smart-buffer": "^4.2.0"
- }
- },
- "socks-proxy-agent": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz",
- "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==",
- "dev": true,
- "requires": {
- "agent-base": "^6.0.2",
- "debug": "^4.3.3",
- "socks": "^2.6.2"
- }
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- },
- "source-map-js": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
- "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
- "dev": true
- },
- "source-map-support": {
- "version": "0.5.21",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
- "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
- "dev": true,
- "requires": {
- "buffer-from": "^1.0.0",
- "source-map": "^0.6.0"
- }
- },
- "spawn-please": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-2.0.1.tgz",
- "integrity": "sha512-W+cFbZR2q2mMTfjz5ZGvhBAiX+e/zczFCNlbS9mxiSdYswBXwUuBUT+a0urH+xZZa8f/bs0mXHyZsZHR9hKogA==",
- "dev": true,
- "requires": {
- "cross-spawn": "^7.0.3"
- }
- },
- "spdx-correct": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
- "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
- "dev": true,
- "requires": {
- "spdx-expression-parse": "^3.0.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "spdx-exceptions": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
- "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
- "dev": true
- },
- "spdx-expression-parse": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
- "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
- "dev": true,
- "requires": {
- "spdx-exceptions": "^2.1.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "spdx-license-ids": {
- "version": "3.0.12",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz",
- "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==",
- "dev": true
- },
- "ssri": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz",
- "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==",
- "dev": true,
- "requires": {
- "minipass": "^4.0.0"
- }
- },
- "stackback": {
- "version": "0.0.2",
- "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
- "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
- "dev": true
- },
- "std-env": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.3.1.tgz",
- "integrity": "sha512-3H20QlwQsSm2OvAxWIYhs+j01MzzqwMwGiiO1NQaJYZgJZFPuAbf95/DiKRBSTYIJ2FeGUc+B/6mPGcWP9dO3Q==",
- "dev": true
- },
- "string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "dev": true,
- "requires": {
- "safe-buffer": "~5.2.0"
- }
- },
- "string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- }
- },
- "strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.1"
- }
- },
- "strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
- "dev": true
- },
- "strip-literal": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.0.0.tgz",
- "integrity": "sha512-5o4LsH1lzBzO9UFH63AJ2ad2/S2AVx6NtjOcaz+VTT2h1RiRvbipW72z8M/lxEhcPHDBQwpDrnTF7sXy/7OwCQ==",
- "dev": true,
- "requires": {
- "acorn": "^8.8.1"
- }
- },
- "supports-preserve-symlinks-flag": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
- "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
- "dev": true
- },
- "svelte": {
- "version": "3.55.1",
- "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.55.1.tgz",
- "integrity": "sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==",
- "dev": true
- },
- "tar": {
- "version": "6.1.13",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
- "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
- "dev": true,
- "requires": {
- "chownr": "^2.0.0",
- "fs-minipass": "^2.0.0",
- "minipass": "^4.0.0",
- "minizlib": "^2.1.1",
- "mkdirp": "^1.0.3",
- "yallist": "^4.0.0"
- },
- "dependencies": {
- "fs-minipass": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
- "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
- "dev": true,
- "requires": {
- "minipass": "^3.0.0"
- },
- "dependencies": {
- "minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dev": true,
- "requires": {
- "yallist": "^4.0.0"
- }
- }
- }
- }
- }
- },
- "tinybench": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.3.1.tgz",
- "integrity": "sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==",
- "dev": true
- },
- "tinypool": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.1.tgz",
- "integrity": "sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ==",
- "dev": true
- },
- "tinyspy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.0.2.tgz",
- "integrity": "sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==",
- "dev": true
- },
- "to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dev": true,
- "requires": {
- "is-number": "^7.0.0"
- }
- },
- "tr46": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
- "dev": true
- },
- "type-detect": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
- "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
- "dev": true
- },
- "type-fest": {
- "version": "2.19.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
- "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
- "dev": true
- },
- "typedarray-to-buffer": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
- "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
- "dev": true,
- "requires": {
- "is-typedarray": "^1.0.0"
- }
- },
- "ufo": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.0.1.tgz",
- "integrity": "sha512-boAm74ubXHY7KJQZLlXrtMz52qFvpsbOxDcZOnw/Wf+LS4Mmyu7JxmzD4tDLtUQtmZECypJ0FrCz4QIe6dvKRA==",
- "dev": true
- },
- "unique-filename": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz",
- "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==",
- "dev": true,
- "requires": {
- "unique-slug": "^4.0.0"
- }
- },
- "unique-slug": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz",
- "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==",
- "dev": true,
- "requires": {
- "imurmurhash": "^0.1.4"
- }
- },
- "unique-string": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz",
- "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==",
- "dev": true,
- "requires": {
- "crypto-random-string": "^4.0.0"
- }
- },
- "untildify": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
- "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
- "dev": true
- },
- "update-notifier": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz",
- "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==",
- "dev": true,
- "requires": {
- "boxen": "^7.0.0",
- "chalk": "^5.0.1",
- "configstore": "^6.0.0",
- "has-yarn": "^3.0.0",
- "import-lazy": "^4.0.0",
- "is-ci": "^3.0.1",
- "is-installed-globally": "^0.4.0",
- "is-npm": "^6.0.0",
- "is-yarn-global": "^0.4.0",
- "latest-version": "^7.0.0",
- "pupa": "^3.1.0",
- "semver": "^7.3.7",
- "semver-diff": "^4.0.0",
- "xdg-basedir": "^5.1.0"
- }
- },
- "util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
- "dev": true
- },
- "validate-npm-package-license": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
- "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
- "dev": true,
- "requires": {
- "spdx-correct": "^3.0.0",
- "spdx-expression-parse": "^3.0.0"
- }
- },
- "validate-npm-package-name": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz",
- "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==",
- "dev": true,
- "requires": {
- "builtins": "^5.0.0"
- }
- },
- "vite": {
- "version": "3.2.5",
- "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.5.tgz",
- "integrity": "sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==",
- "dev": true,
- "requires": {
- "esbuild": "^0.15.9",
- "fsevents": "~2.3.2",
- "postcss": "^8.4.18",
- "resolve": "^1.22.1",
- "rollup": "^2.79.1"
- },
- "dependencies": {
- "@esbuild/android-arm": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz",
- "integrity": "sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==",
- "dev": true,
- "optional": true
- },
- "@esbuild/linux-loong64": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz",
- "integrity": "sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==",
- "dev": true,
- "optional": true
- },
- "esbuild": {
- "version": "0.15.18",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.18.tgz",
- "integrity": "sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==",
- "dev": true,
- "requires": {
- "@esbuild/android-arm": "0.15.18",
- "@esbuild/linux-loong64": "0.15.18",
- "esbuild-android-64": "0.15.18",
- "esbuild-android-arm64": "0.15.18",
- "esbuild-darwin-64": "0.15.18",
- "esbuild-darwin-arm64": "0.15.18",
- "esbuild-freebsd-64": "0.15.18",
- "esbuild-freebsd-arm64": "0.15.18",
- "esbuild-linux-32": "0.15.18",
- "esbuild-linux-64": "0.15.18",
- "esbuild-linux-arm": "0.15.18",
- "esbuild-linux-arm64": "0.15.18",
- "esbuild-linux-mips64le": "0.15.18",
- "esbuild-linux-ppc64le": "0.15.18",
- "esbuild-linux-riscv64": "0.15.18",
- "esbuild-linux-s390x": "0.15.18",
- "esbuild-netbsd-64": "0.15.18",
- "esbuild-openbsd-64": "0.15.18",
- "esbuild-sunos-64": "0.15.18",
- "esbuild-windows-32": "0.15.18",
- "esbuild-windows-64": "0.15.18",
- "esbuild-windows-arm64": "0.15.18"
- }
- }
- }
- },
- "vite-node": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.28.3.tgz",
- "integrity": "sha512-uJJAOkgVwdfCX8PUQhqLyDOpkBS5+j+FdbsXoPVPDlvVjRkb/W/mLYQPSL6J+t8R0UV8tJSe8c9VyxVQNsDSyg==",
- "dev": true,
- "requires": {
- "cac": "^6.7.14",
- "debug": "^4.3.4",
- "mlly": "^1.1.0",
- "pathe": "^1.1.0",
- "picocolors": "^1.0.0",
- "source-map": "^0.6.1",
- "source-map-support": "^0.5.21",
- "vite": "^3.0.0 || ^4.0.0"
- }
- },
- "vitest": {
- "version": "0.28.3",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.28.3.tgz",
- "integrity": "sha512-N41VPNf3VGJlWQizGvl1P5MGyv3ZZA2Zvh+2V8L6tYBAAuqqDK4zExunT1Cdb6dGfZ4gr+IMrnG8d4Z6j9ctPw==",
- "dev": true,
- "requires": {
- "@types/chai": "^4.3.4",
- "@types/chai-subset": "^1.3.3",
- "@types/node": "*",
- "@vitest/expect": "0.28.3",
- "@vitest/runner": "0.28.3",
- "@vitest/spy": "0.28.3",
- "@vitest/utils": "0.28.3",
- "acorn": "^8.8.1",
- "acorn-walk": "^8.2.0",
- "cac": "^6.7.14",
- "chai": "^4.3.7",
- "debug": "^4.3.4",
- "local-pkg": "^0.4.2",
- "pathe": "^1.1.0",
- "picocolors": "^1.0.0",
- "source-map": "^0.6.1",
- "std-env": "^3.3.1",
- "strip-literal": "^1.0.0",
- "tinybench": "^2.3.1",
- "tinypool": "^0.3.1",
- "tinyspy": "^1.0.2",
- "vite": "^3.0.0 || ^4.0.0",
- "vite-node": "0.28.3",
- "why-is-node-running": "^2.2.2"
- }
- },
- "webidl-conversions": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
- "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
- "dev": true
- },
- "whatwg-encoding": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
- "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
- "dev": true,
- "requires": {
- "iconv-lite": "0.6.3"
- }
- },
- "whatwg-mimetype": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",
- "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==",
- "dev": true
- },
- "whatwg-url": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
- "dev": true,
- "requires": {
- "tr46": "~0.0.3",
- "webidl-conversions": "^3.0.0"
- },
- "dependencies": {
- "webidl-conversions": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
- "dev": true
- }
- }
- },
- "which": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz",
- "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==",
- "dev": true,
- "requires": {
- "isexe": "^2.0.0"
- }
- },
- "why-is-node-running": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz",
- "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==",
- "dev": true,
- "requires": {
- "siginfo": "^2.0.0",
- "stackback": "0.0.2"
- }
- },
- "wide-align": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
- "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
- "dev": true,
- "requires": {
- "string-width": "^1.0.2 || 2 || 3 || 4"
- }
- },
- "widest-line": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz",
- "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==",
- "dev": true,
- "requires": {
- "string-width": "^5.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "requires": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- }
- },
- "strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dev": true,
- "requires": {
- "ansi-regex": "^6.0.1"
- }
- }
- }
- },
- "wrap-ansi": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
- "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^6.1.0",
- "string-width": "^5.0.1",
- "strip-ansi": "^7.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true
- },
- "emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "requires": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- }
- },
- "strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dev": true,
- "requires": {
- "ansi-regex": "^6.0.1"
- }
- }
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "dev": true
- },
- "write-file-atomic": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
- "dev": true,
- "requires": {
- "imurmurhash": "^0.1.4",
- "is-typedarray": "^1.0.0",
- "signal-exit": "^3.0.2",
- "typedarray-to-buffer": "^3.1.5"
- }
- },
- "xdg-basedir": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz",
- "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==",
- "dev": true
- },
- "yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
- "yaml": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz",
- "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==",
- "dev": true
- },
- "yocto-queue": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
- "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
- "dev": true
- }
- }
-}
diff --git a/v3/internal/runtime/package.json b/v3/internal/runtime/package.json
deleted file mode 100644
index e923ea45a81..00000000000
--- a/v3/internal/runtime/package.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "runtime",
- "version": "3.0.0",
- "description": "Wails JS Runtime",
- "main": "index.js",
- "scripts": {},
- "author": "Lea Anthony ",
- "license": "ISC",
- "devDependencies": {
- "esbuild": "^0.17.5",
- "happy-dom": "^8.1.5",
- "nanoid": "^4.0.0",
- "npm-check-updates": "^16.6.3",
- "svelte": "^3.55.1",
- "vitest": "^0.28.3"
- }
-}
diff --git a/v3/internal/runtime/runtime_debug_darwin.go b/v3/internal/runtime/runtime_debug_darwin.go
deleted file mode 100644
index 14656126ffc..00000000000
--- a/v3/internal/runtime/runtime_debug_darwin.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build darwin && !production
-
-package runtime
-
-import _ "embed"
-
-//go:embed runtime_debug_desktop_darwin.js
-var DesktopRuntime []byte
diff --git a/v3/internal/runtime/runtime_debug_desktop_darwin.js b/v3/internal/runtime/runtime_debug_desktop_darwin.js
deleted file mode 100644
index 0ca5375923a..00000000000
--- a/v3/internal/runtime/runtime_debug_desktop_darwin.js
+++ /dev/null
@@ -1,582 +0,0 @@
-(() => {
- var __defProp = Object.defineProperty;
- var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
- };
-
- // desktop/clipboard.js
- var clipboard_exports = {};
- __export(clipboard_exports, {
- SetText: () => SetText,
- Text: () => Text
- });
-
- // desktop/runtime.js
- var runtimeURL = window.location.origin + "/wails/runtime";
- function runtimeCall(method, windowName, args) {
- let url = new URL(runtimeURL);
- url.searchParams.append("method", method);
- if (args) {
- url.searchParams.append("args", JSON.stringify(args));
- }
- let fetchOptions = {
- headers: {}
- };
- if (windowName) {
- fetchOptions.headers["x-wails-window-name"] = windowName;
- }
- return new Promise((resolve, reject) => {
- fetch(url, fetchOptions).then((response) => {
- if (response.ok) {
- if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf("application/json") !== -1) {
- return response.json();
- } else {
- return response.text();
- }
- }
- reject(Error(response.statusText));
- }).then((data) => resolve(data)).catch((error) => reject(error));
- });
- }
- function newRuntimeCaller(object, windowName) {
- return function(method, args = null) {
- return runtimeCall(object + "." + method, windowName, args);
- };
- }
-
- // desktop/clipboard.js
- var call = newRuntimeCaller("clipboard");
- function SetText(text) {
- void call("SetText", { text });
- }
- function Text() {
- return call("Text");
- }
-
- // desktop/application.js
- var application_exports = {};
- __export(application_exports, {
- Hide: () => Hide,
- Quit: () => Quit,
- Show: () => Show
- });
- var call2 = newRuntimeCaller("application");
- function Hide() {
- void call2("Hide");
- }
- function Show() {
- void call2("Show");
- }
- function Quit() {
- void call2("Quit");
- }
-
- // desktop/log.js
- var log_exports = {};
- __export(log_exports, {
- Log: () => Log
- });
- var call3 = newRuntimeCaller("log");
- function Log(message) {
- return call3("Log", message);
- }
-
- // desktop/screens.js
- var screens_exports = {};
- __export(screens_exports, {
- GetAll: () => GetAll,
- GetCurrent: () => GetCurrent,
- GetPrimary: () => GetPrimary
- });
- var call4 = newRuntimeCaller("screens");
- function GetAll() {
- return call4("GetAll");
- }
- function GetPrimary() {
- return call4("GetPrimary");
- }
- function GetCurrent() {
- return call4("GetCurrent");
- }
-
- // node_modules/nanoid/non-secure/index.js
- var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
- var nanoid = (size = 21) => {
- let id = "";
- let i = size;
- while (i--) {
- id += urlAlphabet[Math.random() * 64 | 0];
- }
- return id;
- };
-
- // desktop/calls.js
- var call5 = newRuntimeCaller("call");
- var callResponses = /* @__PURE__ */ new Map();
- function generateID() {
- let result;
- do {
- result = nanoid();
- } while (callResponses.has(result));
- return result;
- }
- function callCallback(id, data, isJSON) {
- let p = callResponses.get(id);
- if (p) {
- if (isJSON) {
- p.resolve(JSON.parse(data));
- } else {
- p.resolve(data);
- }
- callResponses.delete(id);
- }
- }
- function callErrorCallback(id, message) {
- let p = callResponses.get(id);
- if (p) {
- p.reject(message);
- callResponses.delete(id);
- }
- }
- function callBinding(type, options) {
- return new Promise((resolve, reject) => {
- let id = generateID();
- options = options || {};
- options["call-id"] = id;
- callResponses.set(id, { resolve, reject });
- call5(type, options).catch((error) => {
- reject(error);
- callResponses.delete(id);
- });
- });
- }
- function Call(options) {
- return callBinding("Call", options);
- }
- function Plugin(pluginName, methodName, ...args) {
- return callBinding("Call", {
- packageName: "wails-plugins",
- structName: pluginName,
- methodName,
- args
- });
- }
-
- // desktop/window.js
- function newWindow(windowName) {
- let call9 = newRuntimeCaller("window", windowName);
- return {
- // Reload: () => call('WR'),
- // ReloadApp: () => call('WR'),
- // SetSystemDefaultTheme: () => call('WASDT'),
- // SetLightTheme: () => call('WALT'),
- // SetDarkTheme: () => call('WADT'),
- // IsFullscreen: () => call('WIF'),
- // IsMaximized: () => call('WIM'),
- // IsMinimized: () => call('WIMN'),
- // IsWindowed: () => call('WIF'),
- /**
- * Centers the window.
- */
- Center: () => void call9("Center"),
- /**
- * Set the window title.
- * @param title
- */
- SetTitle: (title) => void call9("SetTitle", { title }),
- /**
- * Makes the window fullscreen.
- */
- Fullscreen: () => void call9("Fullscreen"),
- /**
- * Unfullscreen the window.
- */
- UnFullscreen: () => void call9("UnFullscreen"),
- /**
- * Set the window size.
- * @param {number} width The window width
- * @param {number} height The window height
- */
- SetSize: (width, height) => call9("SetSize", { width, height }),
- /**
- * Get the window size.
- * @returns {Promise} The window size
- */
- Size: () => {
- return call9("Size");
- },
- /**
- * Set the window maximum size.
- * @param {number} width
- * @param {number} height
- */
- SetMaxSize: (width, height) => void call9("SetMaxSize", { width, height }),
- /**
- * Set the window minimum size.
- * @param {number} width
- * @param {number} height
- */
- SetMinSize: (width, height) => void call9("SetMinSize", { width, height }),
- /**
- * Set window to be always on top.
- * @param {boolean} onTop Whether the window should be always on top
- */
- SetAlwaysOnTop: (onTop) => void call9("SetAlwaysOnTop", { alwaysOnTop: onTop }),
- /**
- * Set the window position.
- * @param {number} x
- * @param {number} y
- */
- SetPosition: (x, y) => call9("SetPosition", { x, y }),
- /**
- * Get the window position.
- * @returns {Promise} The window position
- */
- Position: () => {
- return call9("Position");
- },
- /**
- * Get the screen the window is on.
- * @returns {Promise}
- */
- Screen: () => {
- return call9("Screen");
- },
- /**
- * Hide the window
- */
- Hide: () => void call9("Hide"),
- /**
- * Maximise the window
- */
- Maximise: () => void call9("Maximise"),
- /**
- * Show the window
- */
- Show: () => void call9("Show"),
- /**
- * Close the window
- */
- Close: () => void call9("Close"),
- /**
- * Toggle the window maximise state
- */
- ToggleMaximise: () => void call9("ToggleMaximise"),
- /**
- * Unmaximise the window
- */
- UnMaximise: () => void call9("UnMaximise"),
- /**
- * Minimise the window
- */
- Minimise: () => void call9("Minimise"),
- /**
- * Unminimise the window
- */
- UnMinimise: () => void call9("UnMinimise"),
- /**
- * Set the background colour of the window.
- * @param {number} r - A value between 0 and 255
- * @param {number} g - A value between 0 and 255
- * @param {number} b - A value between 0 and 255
- * @param {number} a - A value between 0 and 255
- */
- SetBackgroundColour: (r, g, b, a) => void call9("SetBackgroundColour", { r, g, b, a })
- };
- }
-
- // desktop/events.js
- var call6 = newRuntimeCaller("events");
- var Listener = class {
- /**
- * Creates an instance of Listener.
- * @param {string} eventName
- * @param {function} callback
- * @param {number} maxCallbacks
- * @memberof Listener
- */
- constructor(eventName, callback, maxCallbacks) {
- this.eventName = eventName;
- this.maxCallbacks = maxCallbacks || -1;
- this.Callback = (data) => {
- callback(data);
- if (this.maxCallbacks === -1) {
- return false;
- }
- this.maxCallbacks -= 1;
- return this.maxCallbacks === 0;
- };
- }
- };
- var WailsEvent = class {
- /**
- * Creates an instance of WailsEvent.
- * @param {string} name - Name of the event
- * @param {any=null} data - Data associated with the event
- * @memberof WailsEvent
- */
- constructor(name, data = null) {
- this.name = name;
- this.data = data;
- }
- };
- var eventListeners = /* @__PURE__ */ new Map();
- function OnMultiple(eventName, callback, maxCallbacks) {
- let listeners = eventListeners.get(eventName) || [];
- const thisListener = new Listener(eventName, callback, maxCallbacks);
- listeners.push(thisListener);
- eventListeners.set(eventName, listeners);
- return () => listenerOff(thisListener);
- }
- function On(eventName, callback) {
- return OnMultiple(eventName, callback, -1);
- }
- function Once(eventName, callback) {
- return OnMultiple(eventName, callback, 1);
- }
- function listenerOff(listener) {
- const eventName = listener.eventName;
- let listeners = eventListeners.get(eventName).filter((l) => l !== listener);
- if (listeners.length === 0) {
- eventListeners.delete(eventName);
- } else {
- eventListeners.set(eventName, listeners);
- }
- }
- function dispatchWailsEvent(event) {
- console.log("dispatching event: ", { event });
- let listeners = eventListeners.get(event.name);
- if (listeners) {
- let toRemove = [];
- listeners.forEach((listener) => {
- let remove = listener.Callback(event);
- if (remove) {
- toRemove.push(listener);
- }
- });
- if (toRemove.length > 0) {
- listeners = listeners.filter((l) => !toRemove.includes(l));
- if (listeners.length === 0) {
- eventListeners.delete(event.name);
- } else {
- eventListeners.set(event.name, listeners);
- }
- }
- }
- }
- function Off(eventName, ...additionalEventNames) {
- let eventsToRemove = [eventName, ...additionalEventNames];
- eventsToRemove.forEach((eventName2) => {
- eventListeners.delete(eventName2);
- });
- }
- function OffAll() {
- eventListeners.clear();
- }
- function Emit(event) {
- void call6("Emit", event);
- }
-
- // desktop/dialogs.js
- var call7 = newRuntimeCaller("dialog");
- var dialogResponses = /* @__PURE__ */ new Map();
- function generateID2() {
- let result;
- do {
- result = nanoid();
- } while (dialogResponses.has(result));
- return result;
- }
- function dialogCallback(id, data, isJSON) {
- let p = dialogResponses.get(id);
- if (p) {
- if (isJSON) {
- p.resolve(JSON.parse(data));
- } else {
- p.resolve(data);
- }
- dialogResponses.delete(id);
- }
- }
- function dialogErrorCallback(id, message) {
- let p = dialogResponses.get(id);
- if (p) {
- p.reject(message);
- dialogResponses.delete(id);
- }
- }
- function dialog(type, options) {
- return new Promise((resolve, reject) => {
- let id = generateID2();
- options = options || {};
- options["dialog-id"] = id;
- dialogResponses.set(id, { resolve, reject });
- call7(type, options).catch((error) => {
- reject(error);
- dialogResponses.delete(id);
- });
- });
- }
- function Info(options) {
- return dialog("Info", options);
- }
- function Warning(options) {
- return dialog("Warning", options);
- }
- function Error2(options) {
- return dialog("Error", options);
- }
- function Question(options) {
- return dialog("Question", options);
- }
- function OpenFile(options) {
- return dialog("OpenFile", options);
- }
- function SaveFile(options) {
- return dialog("SaveFile", options);
- }
-
- // desktop/contextmenu.js
- var call8 = newRuntimeCaller("contextmenu");
- function openContextMenu(id, x, y, data) {
- return call8("OpenContextMenu", { id, x, y, data });
- }
- function enableContextMenus(enabled) {
- if (enabled) {
- window.addEventListener("contextmenu", contextMenuHandler);
- } else {
- window.removeEventListener("contextmenu", contextMenuHandler);
- }
- }
- function contextMenuHandler(event) {
- processContextMenu(event.target, event);
- }
- function processContextMenu(element, event) {
- let id = element.getAttribute("data-contextmenu");
- if (id) {
- event.preventDefault();
- openContextMenu(id, event.clientX, event.clientY, element.getAttribute("data-contextmenu-data"));
- } else {
- let parent = element.parentElement;
- if (parent) {
- processContextMenu(parent, event);
- }
- }
- }
-
- // desktop/wml.js
- function sendEvent(eventName, data = null) {
- let event = new WailsEvent(eventName, data);
- Emit(event);
- }
- function addWMLEventListeners() {
- const elements = document.querySelectorAll("[data-wml-event]");
- elements.forEach(function(element) {
- const eventType = element.getAttribute("data-wml-event");
- const confirm = element.getAttribute("data-wml-confirm");
- const trigger = element.getAttribute("data-wml-trigger") || "click";
- let callback = function() {
- if (confirm) {
- Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) {
- if (result !== "No") {
- sendEvent(eventType);
- }
- });
- return;
- }
- sendEvent(eventType);
- };
- element.removeEventListener(trigger, callback);
- element.addEventListener(trigger, callback);
- });
- }
- function callWindowMethod(method) {
- if (wails.Window[method] === void 0) {
- console.log("Window method " + method + " not found");
- }
- wails.Window[method]();
- }
- function addWMLWindowListeners() {
- const elements = document.querySelectorAll("[data-wml-window]");
- elements.forEach(function(element) {
- const windowMethod = element.getAttribute("data-wml-window");
- const confirm = element.getAttribute("data-wml-confirm");
- const trigger = element.getAttribute("data-wml-trigger") || "click";
- let callback = function() {
- if (confirm) {
- Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) {
- if (result !== "No") {
- callWindowMethod(windowMethod);
- }
- });
- return;
- }
- callWindowMethod(windowMethod);
- };
- element.removeEventListener(trigger, callback);
- element.addEventListener(trigger, callback);
- });
- }
- function reloadWML() {
- addWMLEventListeners();
- addWMLWindowListeners();
- }
-
- // desktop/main.js
- window.wails = {
- ...newRuntime(null)
- };
- window._wails = {
- dialogCallback,
- dialogErrorCallback,
- dispatchWailsEvent,
- callCallback,
- callErrorCallback
- };
- function newRuntime(windowName) {
- return {
- Clipboard: {
- ...clipboard_exports
- },
- Application: {
- ...application_exports,
- GetWindowByName(windowName2) {
- return newRuntime(windowName2);
- }
- },
- Log: log_exports,
- Screens: screens_exports,
- Call,
- Plugin,
- WML: {
- Reload: reloadWML
- },
- Dialog: {
- Info,
- Warning,
- Error: Error2,
- Question,
- OpenFile,
- SaveFile
- },
- Events: {
- Emit,
- On,
- Once,
- OnMultiple,
- Off,
- OffAll
- },
- Window: newWindow(windowName)
- };
- }
- if (true) {
- console.log("Wails v3.0.0 Debug Mode Enabled");
- }
- enableContextMenus(true);
- document.addEventListener("DOMContentLoaded", function(event) {
- reloadWML();
- });
-})();
-//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZGVza3RvcC9jbGlwYm9hcmQuanMiLCAiZGVza3RvcC9ydW50aW1lLmpzIiwgImRlc2t0b3AvYXBwbGljYXRpb24uanMiLCAiZGVza3RvcC9sb2cuanMiLCAiZGVza3RvcC9zY3JlZW5zLmpzIiwgIm5vZGVfbW9kdWxlcy9uYW5vaWQvbm9uLXNlY3VyZS9pbmRleC5qcyIsICJkZXNrdG9wL2NhbGxzLmpzIiwgImRlc2t0b3Avd2luZG93LmpzIiwgImRlc2t0b3AvZXZlbnRzLmpzIiwgImRlc2t0b3AvZGlhbG9ncy5qcyIsICJkZXNrdG9wL2NvbnRleHRtZW51LmpzIiwgImRlc2t0b3Avd21sLmpzIiwgImRlc2t0b3AvbWFpbi5qcyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiLypcbiBfXHQgICBfX1x0ICBfIF9fXG58IHxcdCAvIC9fX18gXyhfKSAvX19fX1xufCB8IC98IC8gLyBfXyBgLyAvIC8gX19fL1xufCB8LyB8LyAvIC9fLyAvIC8gKF9fICApXG58X18vfF9fL1xcX18sXy9fL18vX19fXy9cblRoZSBlbGVjdHJvbiBhbHRlcm5hdGl2ZSBmb3IgR29cbihjKSBMZWEgQW50aG9ueSAyMDE5LXByZXNlbnRcbiovXG5cbi8qIGpzaGludCBlc3ZlcnNpb246IDkgKi9cblxuaW1wb3J0IHtuZXdSdW50aW1lQ2FsbGVyfSBmcm9tIFwiLi9ydW50aW1lXCI7XG5cbmxldCBjYWxsID0gbmV3UnVudGltZUNhbGxlcihcImNsaXBib2FyZFwiKTtcblxuLyoqXG4gKiBTZXQgdGhlIENsaXBib2FyZCB0ZXh0XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBTZXRUZXh0KHRleHQpIHtcbiAgICB2b2lkIGNhbGwoXCJTZXRUZXh0XCIsIHt0Z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ZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgIGZldGNoKHVybCwgZmV0Y2hPcHRpb25zKVxuICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBjb250ZW50IHR5cGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1c1RleHQpKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAudGhlbihkYXRhID0+IHJlc29sdmUoZGF0YSkpXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4gcmVqZWN0KGVycm9yKSk7XG4gICAgfSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBuZXdSdW50aW1lQ2FsbGVyKG9iamVjdCwgd2luZG93TmFtZSkge1xuICAgIHJldHVybiBmdW5jdGlvbiAobWV0aG9kLCBhcmdzPW51bGwpIHtcbiAgICAgICAgcmV0dXJuIHJ1bnRpbWVDYWxsKG9iamVjdCArIFwiLlwiICsgbWV0aG9kLCB3aW5kb3dOYW1lLCBhcmdzKTtcbiAgICB9O1xufSIsICIvKlxuIF9cdCAgIF9fXH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SksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNldCB3aW5kb3cgdG8gYmUgYWx3YXlzIG9uIHRvcC5cbiAgICAgICAgICogQHBhcmFtIHtib29sZWFufSBvblRvcCBXaGV0aGVyIHRoZSB3aW5kb3cgc2hvdWxkIGJlIGFsd2F5cyBvbiB0b3BcbiAgICAgICAgICovXG4gICAgICAgIFNldEFsd2F5c09uVG9wOiAob25Ub3ApID0+IHZvaWQgY2FsbCgnU2V0QWx3YXlzT25Ub3AnLCB7YWx3YXlzT25Ub3A6b25Ub3B9KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogU2V0IHRoZSB3aW5kb3cgcG9zaXRpb24uXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB4XG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB5XG4gICAgICAgICAqL1xuICAgICAgICBTZXRQb3NpdGlvbjogKHgsIHkpID0+IGNhbGwoJ1NldFBvc2l0aW9uJywge3gseX0pLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgdGhlIHdpbmRvdyBwb3NpdGlvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8UG9zaXRpb24+fSBUaGUgd2luZG93IHBvc2l0aW9uXG4gICAgICAgICAqL1xuICAgICAgICBQb3NpdGlvbjogKCkgPT4geyByZXR1cm4gY2FsbCgnUG9zaXRpb24nKTsgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IHRoZSBzY3JlZW4gdGhlIHdpbmRvdyBpcyBvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8U2NyZWVuPn1cbiAgICAgICAgICovXG4gICAgICAgIFNjcmVlbjogKCkgPT4geyByZXR1cm4gY2FsbCgnU2NyZWVuJyk7IH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEhpZGUgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgSGlkZTogKCkgPT4gdm9pZCBjYWxsKCdIaWRlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIE1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIE1heGltaXNlOiAoKSA9PiB2b2lkIGNhbGwoJ01heGltaXNlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNob3cgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgU2hvdzogKCkgPT4gdm9pZCBjYWxsKCdTaG93JyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIENsb3NlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIENsb3NlOiAoKSA9PiB2b2lkIGNhbGwoJ0Nsb3NlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFRvZ2dsZSB0aGUgd2luZG93IG1heGltaXNlIHN0YXRlXG4gICAgICAgICAqL1xuICAgICAgICBUb2dnbGVNYXhpbWlzZTogKCkgPT4gdm9pZCBjYWxsKCdUb2dnbGVNYXhpbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVbm1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIFVuTWF4aW1pc2U6ICgpID0+IHZvaWQgY2FsbCgnVW5NYXhpbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBNaW5pbWlzZSB0aGUgd2luZG93XG4gICAgICAgICAqL1xuICAgICAgICBNaW5pbWlzZTogKCkgPT4gdm9pZCBjYWxsKCdNaW5pbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVbm1pbmltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIFVuTWluaW1pc2U6ICgpID0+IHZvaWQgY2FsbCgnVW5NaW5pbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBTZXQgdGhlIGJhY2tncm91bmQgY29sb3VyIG9mIHRoZSB3aW5kb3cuXG4gICA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tID0gZWxlbWVudC5nZXRBdHRyaWJ1dGUoJ2RhdGEtd21sLWNvbmZpcm0nKTtcbiAgICAgICAgY29uc3QgdHJpZ2dlciA9IGVsZW1lbnQuZ2V0QXR0cmlidXRlKCdkYXRhLXdtbC10cmlnZ2VyJykgfHwgXCJjbGlja1wiO1xuXG4gICAgICAgIGxldCBjYWxsYmFjayA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChjb25maXJtKSB7XG4gICAgICAgICAgICAgICAgUXVlc3Rpb24oe1RpdGxlOiBcIkNvbmZpcm1cIiwgTWVzc2FnZTpjb25maXJtLCBCdXR0b25zOlt7TGFiZWw6XCJZZXNcIn0se0xhYmVsOlwiTm9cIiwgSXNEZWZhdWx0OnRydWV9XX0pLnRoZW4oZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ICE9PSBcIk5vXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbmRFdmVudChldmVudFR5cGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2VuZEV2ZW50KGV2ZW50VHlwZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8vIFJlbW92ZSBleGlzdGluZyBsaXN0ZW5lcnNcblxuICAgICAgICBlbGVtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIodHJpZ2dlciwgY2FsbGJhY2spO1xuXG4gICAgICAgIC8vIEFkZCBuZXcgbGlzdGVuZXJcbiAgICAgICAgZWxlbWVudC5hZGRFdmVudExpc3RlbmVyKHRyaWdnZXIsIGNhbGxiYWNrKTtcbiAgICB9KTtcbn1cblxuZnVuY3Rpb24gY2FsbFdpbmRvd01ldGhvZChtZXRob2QpIHtcbiAgICBpZiAod2FpbHMuV2luZG93W21ldGhvZF0gPT09IHVuZGVmaW5lZCkge1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IHJldHVybiBuZXdSdW50aW1lKHdpbmRvd05hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBMb2csXG4gICAgICAgIFNjcmVlbnMsXG4gICAgICAgIENhbGwsXG4gICAgICAgIFBsdWdpbixcbiAgICAgICAgV01MOiB7XG4gICAgICAgICAgICBSZWxvYWQ6IHJlbG9hZFdNTCxcbiAgICAgICAgfSxcbiAgICAgICAgRGlhbG9nOiB7XG4gICAgICAgICAgICBJbmZvLFxuICAgICAgICAgICAgV2FybmluZyxcbiAgICAgICAgICAgIEVycm9yLFxuICAgICAgICAgICAgUXVlc3Rpb24sXG4gICAgICAgICAgICBPcGVuRmlsZSxcbiAgICAgICAgICAgIFNhdmVGaWxlLFxuICAgICAgICB9LFxuICAgICAgICBFdmVudHM6IHtcbiAgICAgICAgICAgIEVtaXQsXG4gICAgICAgICAgICBPbixcbiAgICAgICAgICAgIE9uY2UsXG4gICAgICAgICAgICBPbk11bHRpcGxlLFxuICAgICAgICAgICAgT2ZmLFxuICAgICAgICAgICAgT2ZmQWxsLFxuICAgICAgICB9LFxuICAgICAgICBXaW5kb3c6IG5ld1dpbmRvdyh3aW5kb3dOYW1lKSxcbiAgICB9O1xufVxuXG5pZiAoREVCVUcpIHtcbiAgICBjb25zb2xlLmxvZyhcIldhaWxzIHYzLjAuMCBEZWJ1ZyBNb2RlIEVuYWJsZWRcIik7XG59XG5cbmVuYWJsZUNvbnRleHRNZW51cyh0cnVlKTtcblxuZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcIkRPTUNvbnRlbnRMb2FkZWRcIiwgZnVuY3Rpb24oZXZlbnQpIHtcbiAgICByZWxvYWRXTUwoKTtcbn0pOyJdLAogICJtYXBwaW5ncyI6ICI7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7O0FDWUEsTUFBTSxhQUFhLE9BQU8sU0FBUyxTQUFTO0FBRTVDLFdBQVMsWUFBWSxRQUFRLFlB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E7QUFBQSxNQUNaO0FBQUEsTUFDQSxRQUFRO0FBQUEsUUFDSjtBQUFBLFFBQ0E7QUFBQSxRQUNBLE9BQUFDO0FBQUEsUUFDQTtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUEsTUFDSjtBQUFBLE1BQ0EsUUFBUTtBQUFBLFFBQ0o7QUFBQSxRQUNBO0FBQUEsUUFDQTtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUEsUUFDQTtBQUFBLE1BQ0o7QUFBQSxNQUNBLFFBQVEsVUFBVSxVQUFVO0FBQUEsSUFDaEM7QUFBQSxFQUNKO0FBRUEsTUFBSSxNQUFPO0FBQ1AsWUFBUSxJQUFJLGlDQUFpQztBQUFBLEVBQ2pEO0FBRUEscUJBQW1CLElBQUk7QUFFdkIsV0FBUyxpQkFBaUIsb0JBQW9CLFNBQVMsT0FBTztBQUMxRCxjQUFVO0FBQUEsRUFDZCxDQUFDOyIsCiAgIm5hbWVzIjogWyJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJldmVudE5hbWUiLCAiY2FsbCIsICJnZW5lcmF0ZUlEIiwgIkVycm9yIiwgImNhbGwiLCAid2luZG93TmFtZSIsICJFcnJvciJdCn0K
diff --git a/v3/internal/runtime/runtime_debug_desktop_linux.js b/v3/internal/runtime/runtime_debug_desktop_linux.js
deleted file mode 100644
index 0ca5375923a..00000000000
--- a/v3/internal/runtime/runtime_debug_desktop_linux.js
+++ /dev/null
@@ -1,582 +0,0 @@
-(() => {
- var __defProp = Object.defineProperty;
- var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
- };
-
- // desktop/clipboard.js
- var clipboard_exports = {};
- __export(clipboard_exports, {
- SetText: () => SetText,
- Text: () => Text
- });
-
- // desktop/runtime.js
- var runtimeURL = window.location.origin + "/wails/runtime";
- function runtimeCall(method, windowName, args) {
- let url = new URL(runtimeURL);
- url.searchParams.append("method", method);
- if (args) {
- url.searchParams.append("args", JSON.stringify(args));
- }
- let fetchOptions = {
- headers: {}
- };
- if (windowName) {
- fetchOptions.headers["x-wails-window-name"] = windowName;
- }
- return new Promise((resolve, reject) => {
- fetch(url, fetchOptions).then((response) => {
- if (response.ok) {
- if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf("application/json") !== -1) {
- return response.json();
- } else {
- return response.text();
- }
- }
- reject(Error(response.statusText));
- }).then((data) => resolve(data)).catch((error) => reject(error));
- });
- }
- function newRuntimeCaller(object, windowName) {
- return function(method, args = null) {
- return runtimeCall(object + "." + method, windowName, args);
- };
- }
-
- // desktop/clipboard.js
- var call = newRuntimeCaller("clipboard");
- function SetText(text) {
- void call("SetText", { text });
- }
- function Text() {
- return call("Text");
- }
-
- // desktop/application.js
- var application_exports = {};
- __export(application_exports, {
- Hide: () => Hide,
- Quit: () => Quit,
- Show: () => Show
- });
- var call2 = newRuntimeCaller("application");
- function Hide() {
- void call2("Hide");
- }
- function Show() {
- void call2("Show");
- }
- function Quit() {
- void call2("Quit");
- }
-
- // desktop/log.js
- var log_exports = {};
- __export(log_exports, {
- Log: () => Log
- });
- var call3 = newRuntimeCaller("log");
- function Log(message) {
- return call3("Log", message);
- }
-
- // desktop/screens.js
- var screens_exports = {};
- __export(screens_exports, {
- GetAll: () => GetAll,
- GetCurrent: () => GetCurrent,
- GetPrimary: () => GetPrimary
- });
- var call4 = newRuntimeCaller("screens");
- function GetAll() {
- return call4("GetAll");
- }
- function GetPrimary() {
- return call4("GetPrimary");
- }
- function GetCurrent() {
- return call4("GetCurrent");
- }
-
- // node_modules/nanoid/non-secure/index.js
- var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
- var nanoid = (size = 21) => {
- let id = "";
- let i = size;
- while (i--) {
- id += urlAlphabet[Math.random() * 64 | 0];
- }
- return id;
- };
-
- // desktop/calls.js
- var call5 = newRuntimeCaller("call");
- var callResponses = /* @__PURE__ */ new Map();
- function generateID() {
- let result;
- do {
- result = nanoid();
- } while (callResponses.has(result));
- return result;
- }
- function callCallback(id, data, isJSON) {
- let p = callResponses.get(id);
- if (p) {
- if (isJSON) {
- p.resolve(JSON.parse(data));
- } else {
- p.resolve(data);
- }
- callResponses.delete(id);
- }
- }
- function callErrorCallback(id, message) {
- let p = callResponses.get(id);
- if (p) {
- p.reject(message);
- callResponses.delete(id);
- }
- }
- function callBinding(type, options) {
- return new Promise((resolve, reject) => {
- let id = generateID();
- options = options || {};
- options["call-id"] = id;
- callResponses.set(id, { resolve, reject });
- call5(type, options).catch((error) => {
- reject(error);
- callResponses.delete(id);
- });
- });
- }
- function Call(options) {
- return callBinding("Call", options);
- }
- function Plugin(pluginName, methodName, ...args) {
- return callBinding("Call", {
- packageName: "wails-plugins",
- structName: pluginName,
- methodName,
- args
- });
- }
-
- // desktop/window.js
- function newWindow(windowName) {
- let call9 = newRuntimeCaller("window", windowName);
- return {
- // Reload: () => call('WR'),
- // ReloadApp: () => call('WR'),
- // SetSystemDefaultTheme: () => call('WASDT'),
- // SetLightTheme: () => call('WALT'),
- // SetDarkTheme: () => call('WADT'),
- // IsFullscreen: () => call('WIF'),
- // IsMaximized: () => call('WIM'),
- // IsMinimized: () => call('WIMN'),
- // IsWindowed: () => call('WIF'),
- /**
- * Centers the window.
- */
- Center: () => void call9("Center"),
- /**
- * Set the window title.
- * @param title
- */
- SetTitle: (title) => void call9("SetTitle", { title }),
- /**
- * Makes the window fullscreen.
- */
- Fullscreen: () => void call9("Fullscreen"),
- /**
- * Unfullscreen the window.
- */
- UnFullscreen: () => void call9("UnFullscreen"),
- /**
- * Set the window size.
- * @param {number} width The window width
- * @param {number} height The window height
- */
- SetSize: (width, height) => call9("SetSize", { width, height }),
- /**
- * Get the window size.
- * @returns {Promise} The window size
- */
- Size: () => {
- return call9("Size");
- },
- /**
- * Set the window maximum size.
- * @param {number} width
- * @param {number} height
- */
- SetMaxSize: (width, height) => void call9("SetMaxSize", { width, height }),
- /**
- * Set the window minimum size.
- * @param {number} width
- * @param {number} height
- */
- SetMinSize: (width, height) => void call9("SetMinSize", { width, height }),
- /**
- * Set window to be always on top.
- * @param {boolean} onTop Whether the window should be always on top
- */
- SetAlwaysOnTop: (onTop) => void call9("SetAlwaysOnTop", { alwaysOnTop: onTop }),
- /**
- * Set the window position.
- * @param {number} x
- * @param {number} y
- */
- SetPosition: (x, y) => call9("SetPosition", { x, y }),
- /**
- * Get the window position.
- * @returns {Promise} The window position
- */
- Position: () => {
- return call9("Position");
- },
- /**
- * Get the screen the window is on.
- * @returns {Promise}
- */
- Screen: () => {
- return call9("Screen");
- },
- /**
- * Hide the window
- */
- Hide: () => void call9("Hide"),
- /**
- * Maximise the window
- */
- Maximise: () => void call9("Maximise"),
- /**
- * Show the window
- */
- Show: () => void call9("Show"),
- /**
- * Close the window
- */
- Close: () => void call9("Close"),
- /**
- * Toggle the window maximise state
- */
- ToggleMaximise: () => void call9("ToggleMaximise"),
- /**
- * Unmaximise the window
- */
- UnMaximise: () => void call9("UnMaximise"),
- /**
- * Minimise the window
- */
- Minimise: () => void call9("Minimise"),
- /**
- * Unminimise the window
- */
- UnMinimise: () => void call9("UnMinimise"),
- /**
- * Set the background colour of the window.
- * @param {number} r - A value between 0 and 255
- * @param {number} g - A value between 0 and 255
- * @param {number} b - A value between 0 and 255
- * @param {number} a - A value between 0 and 255
- */
- SetBackgroundColour: (r, g, b, a) => void call9("SetBackgroundColour", { r, g, b, a })
- };
- }
-
- // desktop/events.js
- var call6 = newRuntimeCaller("events");
- var Listener = class {
- /**
- * Creates an instance of Listener.
- * @param {string} eventName
- * @param {function} callback
- * @param {number} maxCallbacks
- * @memberof Listener
- */
- constructor(eventName, callback, maxCallbacks) {
- this.eventName = eventName;
- this.maxCallbacks = maxCallbacks || -1;
- this.Callback = (data) => {
- callback(data);
- if (this.maxCallbacks === -1) {
- return false;
- }
- this.maxCallbacks -= 1;
- return this.maxCallbacks === 0;
- };
- }
- };
- var WailsEvent = class {
- /**
- * Creates an instance of WailsEvent.
- * @param {string} name - Name of the event
- * @param {any=null} data - Data associated with the event
- * @memberof WailsEvent
- */
- constructor(name, data = null) {
- this.name = name;
- this.data = data;
- }
- };
- var eventListeners = /* @__PURE__ */ new Map();
- function OnMultiple(eventName, callback, maxCallbacks) {
- let listeners = eventListeners.get(eventName) || [];
- const thisListener = new Listener(eventName, callback, maxCallbacks);
- listeners.push(thisListener);
- eventListeners.set(eventName, listeners);
- return () => listenerOff(thisListener);
- }
- function On(eventName, callback) {
- return OnMultiple(eventName, callback, -1);
- }
- function Once(eventName, callback) {
- return OnMultiple(eventName, callback, 1);
- }
- function listenerOff(listener) {
- const eventName = listener.eventName;
- let listeners = eventListeners.get(eventName).filter((l) => l !== listener);
- if (listeners.length === 0) {
- eventListeners.delete(eventName);
- } else {
- eventListeners.set(eventName, listeners);
- }
- }
- function dispatchWailsEvent(event) {
- console.log("dispatching event: ", { event });
- let listeners = eventListeners.get(event.name);
- if (listeners) {
- let toRemove = [];
- listeners.forEach((listener) => {
- let remove = listener.Callback(event);
- if (remove) {
- toRemove.push(listener);
- }
- });
- if (toRemove.length > 0) {
- listeners = listeners.filter((l) => !toRemove.includes(l));
- if (listeners.length === 0) {
- eventListeners.delete(event.name);
- } else {
- eventListeners.set(event.name, listeners);
- }
- }
- }
- }
- function Off(eventName, ...additionalEventNames) {
- let eventsToRemove = [eventName, ...additionalEventNames];
- eventsToRemove.forEach((eventName2) => {
- eventListeners.delete(eventName2);
- });
- }
- function OffAll() {
- eventListeners.clear();
- }
- function Emit(event) {
- void call6("Emit", event);
- }
-
- // desktop/dialogs.js
- var call7 = newRuntimeCaller("dialog");
- var dialogResponses = /* @__PURE__ */ new Map();
- function generateID2() {
- let result;
- do {
- result = nanoid();
- } while (dialogResponses.has(result));
- return result;
- }
- function dialogCallback(id, data, isJSON) {
- let p = dialogResponses.get(id);
- if (p) {
- if (isJSON) {
- p.resolve(JSON.parse(data));
- } else {
- p.resolve(data);
- }
- dialogResponses.delete(id);
- }
- }
- function dialogErrorCallback(id, message) {
- let p = dialogResponses.get(id);
- if (p) {
- p.reject(message);
- dialogResponses.delete(id);
- }
- }
- function dialog(type, options) {
- return new Promise((resolve, reject) => {
- let id = generateID2();
- options = options || {};
- options["dialog-id"] = id;
- dialogResponses.set(id, { resolve, reject });
- call7(type, options).catch((error) => {
- reject(error);
- dialogResponses.delete(id);
- });
- });
- }
- function Info(options) {
- return dialog("Info", options);
- }
- function Warning(options) {
- return dialog("Warning", options);
- }
- function Error2(options) {
- return dialog("Error", options);
- }
- function Question(options) {
- return dialog("Question", options);
- }
- function OpenFile(options) {
- return dialog("OpenFile", options);
- }
- function SaveFile(options) {
- return dialog("SaveFile", options);
- }
-
- // desktop/contextmenu.js
- var call8 = newRuntimeCaller("contextmenu");
- function openContextMenu(id, x, y, data) {
- return call8("OpenContextMenu", { id, x, y, data });
- }
- function enableContextMenus(enabled) {
- if (enabled) {
- window.addEventListener("contextmenu", contextMenuHandler);
- } else {
- window.removeEventListener("contextmenu", contextMenuHandler);
- }
- }
- function contextMenuHandler(event) {
- processContextMenu(event.target, event);
- }
- function processContextMenu(element, event) {
- let id = element.getAttribute("data-contextmenu");
- if (id) {
- event.preventDefault();
- openContextMenu(id, event.clientX, event.clientY, element.getAttribute("data-contextmenu-data"));
- } else {
- let parent = element.parentElement;
- if (parent) {
- processContextMenu(parent, event);
- }
- }
- }
-
- // desktop/wml.js
- function sendEvent(eventName, data = null) {
- let event = new WailsEvent(eventName, data);
- Emit(event);
- }
- function addWMLEventListeners() {
- const elements = document.querySelectorAll("[data-wml-event]");
- elements.forEach(function(element) {
- const eventType = element.getAttribute("data-wml-event");
- const confirm = element.getAttribute("data-wml-confirm");
- const trigger = element.getAttribute("data-wml-trigger") || "click";
- let callback = function() {
- if (confirm) {
- Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) {
- if (result !== "No") {
- sendEvent(eventType);
- }
- });
- return;
- }
- sendEvent(eventType);
- };
- element.removeEventListener(trigger, callback);
- element.addEventListener(trigger, callback);
- });
- }
- function callWindowMethod(method) {
- if (wails.Window[method] === void 0) {
- console.log("Window method " + method + " not found");
- }
- wails.Window[method]();
- }
- function addWMLWindowListeners() {
- const elements = document.querySelectorAll("[data-wml-window]");
- elements.forEach(function(element) {
- const windowMethod = element.getAttribute("data-wml-window");
- const confirm = element.getAttribute("data-wml-confirm");
- const trigger = element.getAttribute("data-wml-trigger") || "click";
- let callback = function() {
- if (confirm) {
- Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) {
- if (result !== "No") {
- callWindowMethod(windowMethod);
- }
- });
- return;
- }
- callWindowMethod(windowMethod);
- };
- element.removeEventListener(trigger, callback);
- element.addEventListener(trigger, callback);
- });
- }
- function reloadWML() {
- addWMLEventListeners();
- addWMLWindowListeners();
- }
-
- // desktop/main.js
- window.wails = {
- ...newRuntime(null)
- };
- window._wails = {
- dialogCallback,
- dialogErrorCallback,
- dispatchWailsEvent,
- callCallback,
- callErrorCallback
- };
- function newRuntime(windowName) {
- return {
- Clipboard: {
- ...clipboard_exports
- },
- Application: {
- ...application_exports,
- GetWindowByName(windowName2) {
- return newRuntime(windowName2);
- }
- },
- Log: log_exports,
- Screens: screens_exports,
- Call,
- Plugin,
- WML: {
- Reload: reloadWML
- },
- Dialog: {
- Info,
- Warning,
- Error: Error2,
- Question,
- OpenFile,
- SaveFile
- },
- Events: {
- Emit,
- On,
- Once,
- OnMultiple,
- Off,
- OffAll
- },
- Window: newWindow(windowName)
- };
- }
- if (true) {
- console.log("Wails v3.0.0 Debug Mode Enabled");
- }
- enableContextMenus(true);
- document.addEventListener("DOMContentLoaded", function(event) {
- reloadWML();
- });
-})();
-//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZGVza3RvcC9jbGlwYm9hcmQuanMiLCAiZGVza3RvcC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mIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBjb250ZW50IHR5cGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1c1RleHQpKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAudGhlbihkYXRhID0+IHJlc29sdmUoZGF0YSkpXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4gcmVqZWN0KGVycm9yKSk7XG4gICAgfSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBuZXdSdW50aW1lQ2FsbGVyKG9iamVjdCwgd2luZG93TmFtZSkge1xuICAgIHJldHVybiBmdW5jdGlvbiAobWV0aG9kLCBhcmdzPW51bGwpIHtcbiAgICAgICAgcmV0dXJuIHJ1bnRpbWVDYWxsKG9iamVjdCArIFwiLlwiICsgbWV0aG9kLCB3aW5kb3dOYW1lLCBhcmdzKTtcbiAgICB9O1xufSIsICIvKlxuIF9cdCAgIF9fXHQgIF8gX19cbnwgfFx0IC8gL19fXyBfKF8pIC9fX19fXG58IHwgL3wgLyAvIF9fIGAvIC8gLyBfX18vXG58IHwvIHwvIC8gL18vIC8gLyAoX18gIClcbnxfXy98X18vXFxfXyxfL18vXy9fX19fL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RoZW1lOiAoKSA9PiBjYWxsKCdXQUxUJyksXG4gICAgICAgIC8vIFNldERhcmtUaGVtZTogKCkgPT4gY2FsbCgnV0FEVCcpLFxuICAgICAgICAvLyBJc0Z1bGxzY3JlZW46ICgpID0+IGNhbGwoJ1dJRicpLFxuICAgICAgICAvLyBJc01heGltaXplZDogKCkgPT4gY2FsbCgnV0lNJyksXG4gICAgICAgIC8vIElzTWluaW1pemVkOiAoKSA9PiBjYWxsKCdXSU1OJyksXG4gICAgICAgIC8vIElzV2luZG93ZWQ6ICgpID0+IGNhbGwoJ1dJRicpLFxuXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIENlbnRlcnMgdGhlIHdpbmRvdy5cbiAgICAgICAgICovXG4gICAgICAgIENlbnRlcjogKCkgPT4gdm9pZCBjYWxsKCdDZW50ZXInKSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogU2V0IHRoZSB3aW5kb3cgdGl0bGUuXG4gICAgICAgICAqIEBwYXJhbSB0aXRsZVxuICAgICAgICAgKi9cbiAgICAgICAgU2V0VGl0bGU6ICh0aXRsZSkgPT4gdm9pZCBjYWxsKCdTZXRUaXRsZScsIHt0aXRsZX0pLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBNYWtlcyB0aGUgd2luZG93IGZ1bGxzY3JlZW4uXG4gICAgICAgICAqL1xuICAgICAgICBGdWxsc2NyZWVuOiAoKSA9PiB2b2lkIGNhbGwoJ0Z1bGxzY3JlZW4nKSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogVW5mdWxsc2NyZWVuIHRoZSB3aW5kb3cuXG4gICAgICAgICAqL1xuICAgICAgICBVbkZ1bGxzY3JlZW46ICgpID0+IHZvaWQgY2FsbCgnVW5GdWxsc2NyZWVuJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNldCB0aGUgd2luZG93IHNpemUuXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB3aWR0aCBUaGUgd2luZG93IHdpZHRoX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5kb3cgc2hvdWxkIGJlIGFsd2F5cyBvbiB0b3BcbiAgICAgICAgICovXG4gICAgICAgIFNldEFsd2F5c09uVG9wOiAob25Ub3ApID0+IHZvaWQgY2FsbCgnU2V0QWx3YXlzT25Ub3AnLCB7YWx3YXlzT25Ub3A6b25Ub3B9KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogU2V0IHRoZSB3aW5kb3cgcG9zaXRpb24uXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB4XG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB5XG4gICAgICAgICAqL1xuICAgICAgICBTZXRQb3NpdGlvbjogKHgsIHkpID0+IGNhbGwoJ1NldFBvc2l0aW9uJywge3gseX0pLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgdGhlIHdpbmRvdyBwb3NpdGlvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8UG9zaXRpb24+fSBUaGUgd2luZG93IHBvc2l0aW9uXG4gICAgICAgICAqL1xuICAgICAgICBQb3NpdGlvbjogKCkgPT4geyByZXR1cm4gY2FsbCgnUG9zaXRpb24nKTsgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IHRoZSBzY3JlZW4gdGhlIHdpbmRvdyBpcyBvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8U2NyZWVuPn1cbiAgICAgICAgICovXG4gICAgICAgIFNjcmVlbjogKCkgPT4geyByZXR1cm4gY2FsbCgnU2NyZWVuJyk7IH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEhpZGUgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgSGlkZTogKCkgPT4gdm9pZCBjYWxsKCdIaWRlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIE1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIE1heGltaXNlOiAoKSA9PiB2b2lkIGNhbGwoJ01heGltaXNlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNob3cgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgU2hvdzogKCkgPT4gdm9pZCBjYWxsKCdTaG93JyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIENsb3NlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIENsb3NlOiAoKSA9PiB2b2lkIGNhbGwoJ0Nsb3NlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFRvZ2dsZSB0aGUgd2luZG93IG1heGltaXNlIHN0YXRlXG4gICAgICAgICAqL1xuICAgICAgICBUb2dnbGVNYXhpbWlzZTogKCkgPT4gdm9pZCBjYWxsKCdUb2dnbGVNYXhpbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVbm1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIFVuTWF4aW1pc2U6ICgpID0+IHZvaWQgY2FsbCgnVW5NYXhpbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBNaW5pbWlzZSB0aGUgd2luZG93XG4gICAgICAgICAqL1xuICAgICAgICBNaW5pbWlzZTogKCkgPT4gdm9pZCBjYWxsKCdNaW5pbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVbm1pbmltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIFVuTWluaW1pc2U6ICgpID0+IHZvaWQgY2FsbCgnVW5NaW5pbWlzZScpLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBTZXQgdGhlIGJhY2tncm91bmQgY29sb3VyIG9mIHRoZSB3aW5kb3cuXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSByIC0gQSB2YWx1ZSBiZXR3ZWVuIDAgYW5kIDI1NVxuICAgICAgICAgKiBAcGFyYW0ge251bWJlcn0gZyAtIEEgdmFsdWUgYmV0d2VlbiAwIGF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lnZ2VyJykgfHwgXCJjbGlja1wiO1xuXG4gICAgICAgIGxldCBjYWxsYmFjayA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChjb25maXJtKSB7XG4gICAgICAgICAgICAgICAgUXVlc3Rpb24oe1RpdGxlOiBcIkNvbmZpcm1cIiwgTWVzc2FnZTpjb25maXJtLCBCdXR0b25zOlt7TGFiZWw6XCJZZXNcIn0se0xhYmVsOlwiTm9cIiwgSXNEZWZhdWx0OnRydWV9XX0pLnRoZW4oZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ICE9PSBcIk5vXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbmRFdmVudChldmVudFR5cGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2VuZEV2ZW50KGV2ZW50VHlwZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8vIFJlbW92ZSBleGlzdGluZyBsaXN0ZW5lcnNcblxuICAgICAgICBlbGVtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIodHJpZ2dlciwgY2FsbGJhY2spO1xuXG4gICAgICAgIC8vIEFkZCBuZXcgbGlzdGVuZXJcbiAgICAgICAgZWxlbWVudC5hZGRFdmVudExpc3RlbmVyKHRyaWdnZXIsIGNhbGxiYWNrKTtcbiAgICB9KTtcbn1cblxuZnVuY3Rpb24gY2FsbFdpbmRvd01ldGhvZChtZXRob2QpIHtcbiAgICBpZiAod2FpbHMuV2luZG93W21ldGhvZF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICBjb25zb2xlLmxvZyhcIldpbmRvdyBtZXRob2QgXCIgKyBtZXRob2QgKyBcIiBub3QgZm91bmRcIik7XG4gICAgfVxuICAgIHdhaWxzLldpbmRvd1ttZXRob2RdKCk7XG59XG5cbmZ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FDSjtBQUFBLE1BQ0EsUUFBUTtBQUFBLFFBQ0o7QUFBQSxRQUNBO0FBQUEsUUFDQTtBQUFBLFFBQ0E7QUFBQSxRQUNBO0FBQUEsUUFDQTtBQUFBLE1BQ0o7QUFBQSxNQUNBLFFBQVEsVUFBVSxVQUFVO0FBQUEsSUFDaEM7QUFBQSxFQUNKO0FBRUEsTUFBSSxNQUFPO0FBQ1AsWUFBUSxJQUFJLGlDQUFpQztBQUFBLEVBQ2pEO0FBRUEscUJBQW1CLElBQUk7QUFFdkIsV0FBUyxpQkFBaUIsb0JBQW9CLFNBQVMsT0FBTztBQUMxRCxjQUFVO0FBQUEsRUFDZCxDQUFDOyIsCiAgIm5hbWVzIjogWyJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJldmVudE5hbWUiLCAiY2FsbCIsICJnZW5lcmF0ZUlEIiwgIkVycm9yIiwgImNhbGwiLCAid2luZG93TmFtZSIsICJFcnJvciJdCn0K
diff --git a/v3/internal/runtime/runtime_debug_desktop_windows.js b/v3/internal/runtime/runtime_debug_desktop_windows.js
deleted file mode 100644
index 0ca5375923a..00000000000
--- a/v3/internal/runtime/runtime_debug_desktop_windows.js
+++ /dev/null
@@ -1,582 +0,0 @@
-(() => {
- var __defProp = Object.defineProperty;
- var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
- };
-
- // desktop/clipboard.js
- var clipboard_exports = {};
- __export(clipboard_exports, {
- SetText: () => SetText,
- Text: () => Text
- });
-
- // desktop/runtime.js
- var runtimeURL = window.location.origin + "/wails/runtime";
- function runtimeCall(method, windowName, args) {
- let url = new URL(runtimeURL);
- url.searchParams.append("method", method);
- if (args) {
- url.searchParams.append("args", JSON.stringify(args));
- }
- let fetchOptions = {
- headers: {}
- };
- if (windowName) {
- fetchOptions.headers["x-wails-window-name"] = windowName;
- }
- return new Promise((resolve, reject) => {
- fetch(url, fetchOptions).then((response) => {
- if (response.ok) {
- if (response.headers.get("Content-Type") && response.headers.get("Content-Type").indexOf("application/json") !== -1) {
- return response.json();
- } else {
- return response.text();
- }
- }
- reject(Error(response.statusText));
- }).then((data) => resolve(data)).catch((error) => reject(error));
- });
- }
- function newRuntimeCaller(object, windowName) {
- return function(method, args = null) {
- return runtimeCall(object + "." + method, windowName, args);
- };
- }
-
- // desktop/clipboard.js
- var call = newRuntimeCaller("clipboard");
- function SetText(text) {
- void call("SetText", { text });
- }
- function Text() {
- return call("Text");
- }
-
- // desktop/application.js
- var application_exports = {};
- __export(application_exports, {
- Hide: () => Hide,
- Quit: () => Quit,
- Show: () => Show
- });
- var call2 = newRuntimeCaller("application");
- function Hide() {
- void call2("Hide");
- }
- function Show() {
- void call2("Show");
- }
- function Quit() {
- void call2("Quit");
- }
-
- // desktop/log.js
- var log_exports = {};
- __export(log_exports, {
- Log: () => Log
- });
- var call3 = newRuntimeCaller("log");
- function Log(message) {
- return call3("Log", message);
- }
-
- // desktop/screens.js
- var screens_exports = {};
- __export(screens_exports, {
- GetAll: () => GetAll,
- GetCurrent: () => GetCurrent,
- GetPrimary: () => GetPrimary
- });
- var call4 = newRuntimeCaller("screens");
- function GetAll() {
- return call4("GetAll");
- }
- function GetPrimary() {
- return call4("GetPrimary");
- }
- function GetCurrent() {
- return call4("GetCurrent");
- }
-
- // node_modules/nanoid/non-secure/index.js
- var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
- var nanoid = (size = 21) => {
- let id = "";
- let i = size;
- while (i--) {
- id += urlAlphabet[Math.random() * 64 | 0];
- }
- return id;
- };
-
- // desktop/calls.js
- var call5 = newRuntimeCaller("call");
- var callResponses = /* @__PURE__ */ new Map();
- function generateID() {
- let result;
- do {
- result = nanoid();
- } while (callResponses.has(result));
- return result;
- }
- function callCallback(id, data, isJSON) {
- let p = callResponses.get(id);
- if (p) {
- if (isJSON) {
- p.resolve(JSON.parse(data));
- } else {
- p.resolve(data);
- }
- callResponses.delete(id);
- }
- }
- function callErrorCallback(id, message) {
- let p = callResponses.get(id);
- if (p) {
- p.reject(message);
- callResponses.delete(id);
- }
- }
- function callBinding(type, options) {
- return new Promise((resolve, reject) => {
- let id = generateID();
- options = options || {};
- options["call-id"] = id;
- callResponses.set(id, { resolve, reject });
- call5(type, options).catch((error) => {
- reject(error);
- callResponses.delete(id);
- });
- });
- }
- function Call(options) {
- return callBinding("Call", options);
- }
- function Plugin(pluginName, methodName, ...args) {
- return callBinding("Call", {
- packageName: "wails-plugins",
- structName: pluginName,
- methodName,
- args
- });
- }
-
- // desktop/window.js
- function newWindow(windowName) {
- let call9 = newRuntimeCaller("window", windowName);
- return {
- // Reload: () => call('WR'),
- // ReloadApp: () => call('WR'),
- // SetSystemDefaultTheme: () => call('WASDT'),
- // SetLightTheme: () => call('WALT'),
- // SetDarkTheme: () => call('WADT'),
- // IsFullscreen: () => call('WIF'),
- // IsMaximized: () => call('WIM'),
- // IsMinimized: () => call('WIMN'),
- // IsWindowed: () => call('WIF'),
- /**
- * Centers the window.
- */
- Center: () => void call9("Center"),
- /**
- * Set the window title.
- * @param title
- */
- SetTitle: (title) => void call9("SetTitle", { title }),
- /**
- * Makes the window fullscreen.
- */
- Fullscreen: () => void call9("Fullscreen"),
- /**
- * Unfullscreen the window.
- */
- UnFullscreen: () => void call9("UnFullscreen"),
- /**
- * Set the window size.
- * @param {number} width The window width
- * @param {number} height The window height
- */
- SetSize: (width, height) => call9("SetSize", { width, height }),
- /**
- * Get the window size.
- * @returns {Promise} The window size
- */
- Size: () => {
- return call9("Size");
- },
- /**
- * Set the window maximum size.
- * @param {number} width
- * @param {number} height
- */
- SetMaxSize: (width, height) => void call9("SetMaxSize", { width, height }),
- /**
- * Set the window minimum size.
- * @param {number} width
- * @param {number} height
- */
- SetMinSize: (width, height) => void call9("SetMinSize", { width, height }),
- /**
- * Set window to be always on top.
- * @param {boolean} onTop Whether the window should be always on top
- */
- SetAlwaysOnTop: (onTop) => void call9("SetAlwaysOnTop", { alwaysOnTop: onTop }),
- /**
- * Set the window position.
- * @param {number} x
- * @param {number} y
- */
- SetPosition: (x, y) => call9("SetPosition", { x, y }),
- /**
- * Get the window position.
- * @returns {Promise} The window position
- */
- Position: () => {
- return call9("Position");
- },
- /**
- * Get the screen the window is on.
- * @returns {Promise}
- */
- Screen: () => {
- return call9("Screen");
- },
- /**
- * Hide the window
- */
- Hide: () => void call9("Hide"),
- /**
- * Maximise the window
- */
- Maximise: () => void call9("Maximise"),
- /**
- * Show the window
- */
- Show: () => void call9("Show"),
- /**
- * Close the window
- */
- Close: () => void call9("Close"),
- /**
- * Toggle the window maximise state
- */
- ToggleMaximise: () => void call9("ToggleMaximise"),
- /**
- * Unmaximise the window
- */
- UnMaximise: () => void call9("UnMaximise"),
- /**
- * Minimise the window
- */
- Minimise: () => void call9("Minimise"),
- /**
- * Unminimise the window
- */
- UnMinimise: () => void call9("UnMinimise"),
- /**
- * Set the background colour of the window.
- * @param {number} r - A value between 0 and 255
- * @param {number} g - A value between 0 and 255
- * @param {number} b - A value between 0 and 255
- * @param {number} a - A value between 0 and 255
- */
- SetBackgroundColour: (r, g, b, a) => void call9("SetBackgroundColour", { r, g, b, a })
- };
- }
-
- // desktop/events.js
- var call6 = newRuntimeCaller("events");
- var Listener = class {
- /**
- * Creates an instance of Listener.
- * @param {string} eventName
- * @param {function} callback
- * @param {number} maxCallbacks
- * @memberof Listener
- */
- constructor(eventName, callback, maxCallbacks) {
- this.eventName = eventName;
- this.maxCallbacks = maxCallbacks || -1;
- this.Callback = (data) => {
- callback(data);
- if (this.maxCallbacks === -1) {
- return false;
- }
- this.maxCallbacks -= 1;
- return this.maxCallbacks === 0;
- };
- }
- };
- var WailsEvent = class {
- /**
- * Creates an instance of WailsEvent.
- * @param {string} name - Name of the event
- * @param {any=null} data - Data associated with the event
- * @memberof WailsEvent
- */
- constructor(name, data = null) {
- this.name = name;
- this.data = data;
- }
- };
- var eventListeners = /* @__PURE__ */ new Map();
- function OnMultiple(eventName, callback, maxCallbacks) {
- let listeners = eventListeners.get(eventName) || [];
- const thisListener = new Listener(eventName, callback, maxCallbacks);
- listeners.push(thisListener);
- eventListeners.set(eventName, listeners);
- return () => listenerOff(thisListener);
- }
- function On(eventName, callback) {
- return OnMultiple(eventName, callback, -1);
- }
- function Once(eventName, callback) {
- return OnMultiple(eventName, callback, 1);
- }
- function listenerOff(listener) {
- const eventName = listener.eventName;
- let listeners = eventListeners.get(eventName).filter((l) => l !== listener);
- if (listeners.length === 0) {
- eventListeners.delete(eventName);
- } else {
- eventListeners.set(eventName, listeners);
- }
- }
- function dispatchWailsEvent(event) {
- console.log("dispatching event: ", { event });
- let listeners = eventListeners.get(event.name);
- if (listeners) {
- let toRemove = [];
- listeners.forEach((listener) => {
- let remove = listener.Callback(event);
- if (remove) {
- toRemove.push(listener);
- }
- });
- if (toRemove.length > 0) {
- listeners = listeners.filter((l) => !toRemove.includes(l));
- if (listeners.length === 0) {
- eventListeners.delete(event.name);
- } else {
- eventListeners.set(event.name, listeners);
- }
- }
- }
- }
- function Off(eventName, ...additionalEventNames) {
- let eventsToRemove = [eventName, ...additionalEventNames];
- eventsToRemove.forEach((eventName2) => {
- eventListeners.delete(eventName2);
- });
- }
- function OffAll() {
- eventListeners.clear();
- }
- function Emit(event) {
- void call6("Emit", event);
- }
-
- // desktop/dialogs.js
- var call7 = newRuntimeCaller("dialog");
- var dialogResponses = /* @__PURE__ */ new Map();
- function generateID2() {
- let result;
- do {
- result = nanoid();
- } while (dialogResponses.has(result));
- return result;
- }
- function dialogCallback(id, data, isJSON) {
- let p = dialogResponses.get(id);
- if (p) {
- if (isJSON) {
- p.resolve(JSON.parse(data));
- } else {
- p.resolve(data);
- }
- dialogResponses.delete(id);
- }
- }
- function dialogErrorCallback(id, message) {
- let p = dialogResponses.get(id);
- if (p) {
- p.reject(message);
- dialogResponses.delete(id);
- }
- }
- function dialog(type, options) {
- return new Promise((resolve, reject) => {
- let id = generateID2();
- options = options || {};
- options["dialog-id"] = id;
- dialogResponses.set(id, { resolve, reject });
- call7(type, options).catch((error) => {
- reject(error);
- dialogResponses.delete(id);
- });
- });
- }
- function Info(options) {
- return dialog("Info", options);
- }
- function Warning(options) {
- return dialog("Warning", options);
- }
- function Error2(options) {
- return dialog("Error", options);
- }
- function Question(options) {
- return dialog("Question", options);
- }
- function OpenFile(options) {
- return dialog("OpenFile", options);
- }
- function SaveFile(options) {
- return dialog("SaveFile", options);
- }
-
- // desktop/contextmenu.js
- var call8 = newRuntimeCaller("contextmenu");
- function openContextMenu(id, x, y, data) {
- return call8("OpenContextMenu", { id, x, y, data });
- }
- function enableContextMenus(enabled) {
- if (enabled) {
- window.addEventListener("contextmenu", contextMenuHandler);
- } else {
- window.removeEventListener("contextmenu", contextMenuHandler);
- }
- }
- function contextMenuHandler(event) {
- processContextMenu(event.target, event);
- }
- function processContextMenu(element, event) {
- let id = element.getAttribute("data-contextmenu");
- if (id) {
- event.preventDefault();
- openContextMenu(id, event.clientX, event.clientY, element.getAttribute("data-contextmenu-data"));
- } else {
- let parent = element.parentElement;
- if (parent) {
- processContextMenu(parent, event);
- }
- }
- }
-
- // desktop/wml.js
- function sendEvent(eventName, data = null) {
- let event = new WailsEvent(eventName, data);
- Emit(event);
- }
- function addWMLEventListeners() {
- const elements = document.querySelectorAll("[data-wml-event]");
- elements.forEach(function(element) {
- const eventType = element.getAttribute("data-wml-event");
- const confirm = element.getAttribute("data-wml-confirm");
- const trigger = element.getAttribute("data-wml-trigger") || "click";
- let callback = function() {
- if (confirm) {
- Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) {
- if (result !== "No") {
- sendEvent(eventType);
- }
- });
- return;
- }
- sendEvent(eventType);
- };
- element.removeEventListener(trigger, callback);
- element.addEventListener(trigger, callback);
- });
- }
- function callWindowMethod(method) {
- if (wails.Window[method] === void 0) {
- console.log("Window method " + method + " not found");
- }
- wails.Window[method]();
- }
- function addWMLWindowListeners() {
- const elements = document.querySelectorAll("[data-wml-window]");
- elements.forEach(function(element) {
- const windowMethod = element.getAttribute("data-wml-window");
- const confirm = element.getAttribute("data-wml-confirm");
- const trigger = element.getAttribute("data-wml-trigger") || "click";
- let callback = function() {
- if (confirm) {
- Question({ Title: "Confirm", Message: confirm, Buttons: [{ Label: "Yes" }, { Label: "No", IsDefault: true }] }).then(function(result) {
- if (result !== "No") {
- callWindowMethod(windowMethod);
- }
- });
- return;
- }
- callWindowMethod(windowMethod);
- };
- element.removeEventListener(trigger, callback);
- element.addEventListener(trigger, callback);
- });
- }
- function reloadWML() {
- addWMLEventListeners();
- addWMLWindowListeners();
- }
-
- // desktop/main.js
- window.wails = {
- ...newRuntime(null)
- };
- window._wails = {
- dialogCallback,
- dialogErrorCallback,
- dispatchWailsEvent,
- callCallback,
- callErrorCallback
- };
- function newRuntime(windowName) {
- return {
- Clipboard: {
- ...clipboard_exports
- },
- Application: {
- ...application_exports,
- GetWindowByName(windowName2) {
- return newRuntime(windowName2);
- }
- },
- Log: log_exports,
- Screens: screens_exports,
- Call,
- Plugin,
- WML: {
- Reload: reloadWML
- },
- Dialog: {
- Info,
- Warning,
- Error: Error2,
- Question,
- OpenFile,
- SaveFile
- },
- Events: {
- Emit,
- On,
- Once,
- OnMultiple,
- Off,
- OffAll
- },
- Window: newWindow(windowName)
- };
- }
- if (true) {
- console.log("Wails v3.0.0 Debug Mode Enabled");
- }
- enableContextMenus(true);
- document.addEventListener("DOMContentLoaded", function(event) {
- reloadWML();
- });
-})();
-//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZGVza3RvcC9jbGlwYm9hcmQuanMiLCAiZGVza3RvcC9ydW50aW1lLmpzIiwgImRlc2t0b3AvYXBwbGljYXRpb24uanMiLCAiZGVza3RvcC9sb2cuanMiLCAiZGVza3RvcC9zY3JlZW5zLmpzIiwgIm5vZGVfbW9kdWxlcy9uYW5vaWQvbm9uLXNl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58IHwvIHwvIC8gL18vIC8gLyAoX18gIClcbnxfXy98X18vXFxfXyxfL18vXy9fX19fL1xuVGhlIGVsZWN0cm9uIGFsdGVybmF0aXZlIGZvciBHb1xuKGMpIExlYSBBbnRob255IDIwMTktcHJlc2VudFxuKi9cblxuLyoganNoaW50IGVzdmVyc2lvbjogOSAqL1xuXG5jb25zdCBydW50aW1lVVJMID0gd2luZG93LmxvY2F0aW9uLm9yaWdpbiArIFwiL3dhaWxzL3J1bnRpbWVcIjtcblxuZnVuY3Rpb24gcnVudGltZUNhbGwobWV0aG9kLCB3aW5kb3dOYW1lLCBhcmdzKSB7XG4gICAgbGV0IHVybCA9IG5ldyBVUkwocnVudGltZVVSTCk7XG4gICAgdXJsLnNlYXJjaFBhcmFtcy5hcHBlbmQoXCJtZXRob2RcIiwgbWV0aG9kKTtcbiAgICBpZiAoYXJncykge1xuICAgICAgICB1cmwuc2VhcmNoUGFyYW1zLmFwcGVuZChcImFyZ3NcIiwgSlNPTi5zdHJpbmdpZnkoYXJncykpO1xuICAgIH1cbiAgICBsZXQgZmV0Y2hPcHRpb25zID0ge1xuICAgICAgICBoZWFkZXJzOiB7fSxcbiAgICB9O1xuICAgIGlmICh3aW5kb3dOYW1lKSB7XG4gICAgICAgIGZldGNoT3B0aW9ucy5oZWFkZXJzW1wieC13YWlscy13aW5kb3ctbmFtZVwiXSA9IHdpbmRvd05hbWU7XG4gICAgfVxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICAgIGZldGNoKHVybCwgZmV0Y2hPcHRpb25zKVxuICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBjb250ZW50IHR5cGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpICYmIHJlc3BvbnNlLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpLmluZGV4T2YoXCJhcHBsaWNhdGlvbi9qc29uXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmpzb24oKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVqZWN0KEVycm9yKHJlc3BvbnNlLnN0YXR1c1RleHQpKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAudGhlbihkYXRhID0+IHJlc29sdmUoZGF0YSkpXG4gICAgICAgICAgICAuY2F0Y2goZXJyb3IgPT4gcmVqZWN0KGVycm9yKSk7XG4gICAgfSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBuZXdSdW50aW1lQ2FsbGVyKG9iamVjdCwgd2luZG93TmFtZSkge1xuICAgIHJldHVybiBmdW5jdGlvbiAobWV0aG9kLCBhcmdzPW51bGwpIHtcbiAgICAgICAgcmV0dXJuIHJ1bnRpbWVDYWxsKG9iamVjdCArIFwiLlwiICsgbWV0aG9kLCB3aW5kb3dOYW1lLCBhcmdzKTtcbiAgICB9O1xufSIsICIvKlxuIF9cdCAgIF9fXHQgIF8gX19cbnwgfFx0IC8gL19fXyBfKF8pIC9fX19fXG58IHwgL3wgLyAvIF9fIGAvIC8gLyBfX18vXG58IHwvIHwvIC8gL18vIC8gLyAoX18gIClcbnxfXy98X18vXFxfXyxfL18vXy9fX19fL1xuVGhlIGVsZWN0cm9uIGFsdGVybmF0aXZlIGZvciBHb1xuKGMpIExlYSBBbnRob255IDIwMTktcHJlc2VudFxuKi9cblxuLyoganNoaW50IGVzdmVyc2lvbjogOSAqL1xuXG5pbXBvcnQge25ld1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woJ1dJRicpLFxuICAgICAgICAvLyBJc01heGltaXplZDogKCkgPT4gY2FsbCgnV0lNJyksXG4gICAgICAgIC8vIElzTWluaW1pemVkOiAoKSA9PiBjYWxsKCdXSU1OJyksXG4gICAgICAgIC8vIElzV2luZG93ZWQ6ICgpID0+IGNhbGwoJ1dJRicpLFxuXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIENlbnRlcnMgdGhlIHdpbmRvdy5cbiAgICAgICAgICovXG4gICAgICAgIENlbnRlcjogKCkgPT4gdm9pZCBjYWxsKCdDZW50ZXInKSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogU2V0IHRoZSB3aW5kb3cgdGl0bGUuXG4gICAgICAgICAqIEBwYXJhbSB0aXRsZVxuICAgICAgICAgKi9cbiAgICAgICAgU2V0VGl0bGU6ICh0aXRsZSkgPT4gdm9pZCBjYWxsKCdTZXRUaXRsZScsIHt0aXRsZX0pLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBNYWtlcyB0aGUgd2luZG93IGZ1bGxzY3JlZW4uXG4gICAgICAgICAqL1xuICAgICAgICBGdWxsc2NyZWVuOiAoKSA9PiB2b2lkIGNhbGwoJ0Z1bGxzY3JlZW4nKSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogVW5mdWxsc2NyZWVuIHRoZSB3aW5kb3cuXG4gICAgICAgICAqL1xuICAgICAgICBVbkZ1bGxzY3JlZW46ICgpID0+IHZvaWQgY2FsbCgnVW5GdWxsc2NyZWVuJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNldCB0aGUgd2luZG93IHNpemUuXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB3aWR0aCBUaGUgd2luZG93IHdpZHRoXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBoZWlnaHQgVGhlIHdpbmRvdyBoZWlnaHRcbiAgICAgICAgICovXG4gICAgICAgIFNldFNpemU6ICh3aWR0aCwgaGVpZ2h0KSA9PiBjYWxsK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x3YXlzT25Ub3A6b25Ub3B9KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogU2V0IHRoZSB3aW5kb3cgcG9zaXRpb24uXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB4XG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSB5XG4gICAgICAgICAqL1xuICAgICAgICBTZXRQb3NpdGlvbjogKHgsIHkpID0+IGNhbGwoJ1NldFBvc2l0aW9uJywge3gseX0pLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgdGhlIHdpbmRvdyBwb3NpdGlvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8UG9zaXRpb24+fSBUaGUgd2luZG93IHBvc2l0aW9uXG4gICAgICAgICAqL1xuICAgICAgICBQb3NpdGlvbjogKCkgPT4geyByZXR1cm4gY2FsbCgnUG9zaXRpb24nKTsgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IHRoZSBzY3JlZW4gdGhlIHdpbmRvdyBpcyBvbi5cbiAgICAgICAgICogQHJldHVybnMge1Byb21pc2U8U2NyZWVuPn1cbiAgICAgICAgICovXG4gICAgICAgIFNjcmVlbjogKCkgPT4geyByZXR1cm4gY2FsbCgnU2NyZWVuJyk7IH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEhpZGUgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgSGlkZTogKCkgPT4gdm9pZCBjYWxsKCdIaWRlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIE1heGltaXNlIHRoZSB3aW5kb3dcbiAgICAgICAgICovXG4gICAgICAgIE1heGltaXNlOiAoKSA9PiB2b2lkIGNhbGwoJ01heGltaXNlJyksXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNob3cgdGhlIHdpbmRvd1xuICAgICAgICAgKi9cbiAgICAgICAgU2hvdzogKCkgPT4gdm9pZCBjYWxsKCdTaG93JyksXG5cbiAgICAgICAgLyo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XG4gICAgZWxlbWVudHMuZm9yRWFjaChmdW5jdGlvbiAoZWxlbWVudCkge1xuICAgICAgICBjb25zdCB3aW5kb3dNZXRob2QgPSBlbGVtZW50LmdldEF0dHJpYnV0ZSgnZGF0YS13bWwtd2luZG93Jyk7XG4gICAgICAgIGNvbnN0IGNvbmZpcm0gPSBlbGVtZW50LmdldEF0dHJpYnV0ZSgnZGF0YS13bWwtY29uZmlybScpO1xuICAgICAgICBjb25zdCB0cmlnZ2VyID0gZWxlbWVudC5nZXRBdHRyaWJ1dGUoJ2RhdGEtd21sLXRyaWdnZXInKSB8fCBcImNsaWNrXCI7XG5cbiAgICAgICAgbGV0IGNhbGxiYWNrID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgaWYgKGNvbmZpcm0pIHtcbiAgICAgICAgICAgICAgICBRdWVzdGlvbih7VGl0bGU6IFwiQ29uZmlybVwiLCBNZXNzYWdlOmNvbmZpcm0sIEJ1dHRvbnM6W3tMYWJlbDpcIlllc1wifSx7TGFiZWw6XCJOb1wiLCBJc0RlZmF1bHQ6dHJ1ZX1dfSkudGhlbihmdW5jdGlvbiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgIT09IFwiTm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FsbFdpbmRvd01ldGhvZCh3aW5kb3dNZXRob2QpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FsbFdpbmRvd01ldGhvZCh3aW5kb3dNZXRob2QpO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8vIFJlbW92ZSBleGlzdGluZyBsaXN0ZW5lcnNcbiAgICAgICAgZWxlbWVudC5yZW1vdmVFdmVudExpc3RlbmVyKHRyaWdnZXIsIGNhbGxiYWNrKTtcblxuICAgICAgICAvLyBBZGQgbmV3IGxpc3Rl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LFFBQVEsVUFBVSxVQUFVO0FBQUEsSUFDaEM7QUFBQSxFQUNKO0FBRUEsTUFBSSxNQUFPO0FBQ1AsWUFBUSxJQUFJLGlDQUFpQztBQUFBLEVBQ2pEO0FBRUEscUJBQW1CLElBQUk7QUFFdkIsV0FBUyxpQkFBaUIsb0JBQW9CLFNBQVMsT0FBTztBQUMxRCxjQUFVO0FBQUEsRUFDZCxDQUFDOyIsCiAgIm5hbWVzIjogWyJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJjYWxsIiwgImNhbGwiLCAiY2FsbCIsICJldmVudE5hbWUiLCAiY2FsbCIsICJnZW5lcmF0ZUlEIiwgIkVycm9yIiwgImNhbGwiLCAid2luZG93TmFtZSIsICJFcnJvciJdCn0K
diff --git a/v3/internal/runtime/runtime_debug_linux.go b/v3/internal/runtime/runtime_debug_linux.go
deleted file mode 100644
index c2940839204..00000000000
--- a/v3/internal/runtime/runtime_debug_linux.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build linux && !production
-
-package runtime
-
-import _ "embed"
-
-//go:embed runtime_debug_desktop_linux.js
-var DesktopRuntime []byte
diff --git a/v3/internal/runtime/runtime_debug_windows.go b/v3/internal/runtime/runtime_debug_windows.go
deleted file mode 100644
index 09a3a91981f..00000000000
--- a/v3/internal/runtime/runtime_debug_windows.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build windows && !production
-
-package runtime
-
-import _ "embed"
-
-//go:embed runtime_debug_desktop_windows.js
-var DesktopRuntime []byte
diff --git a/v3/internal/runtime/runtime_production_darwin.go b/v3/internal/runtime/runtime_production_darwin.go
deleted file mode 100644
index be2411d9ee9..00000000000
--- a/v3/internal/runtime/runtime_production_darwin.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build darwin && production
-
-package runtime
-
-import _ "embed"
-
-//go:embed runtime_production_desktop_darwin.js
-var DesktopRuntime []byte
diff --git a/v3/internal/runtime/runtime_production_desktop_darwin.js b/v3/internal/runtime/runtime_production_desktop_darwin.js
deleted file mode 100644
index be519faa599..00000000000
--- a/v3/internal/runtime/runtime_production_desktop_darwin.js
+++ /dev/null
@@ -1 +0,0 @@
-(()=>{var Z=Object.defineProperty;var p=(t,e)=>{for(var n in e)Z(t,n,{get:e[n],enumerable:!0})};var v={};p(v,{SetText:()=>te,Text:()=>ne});var $=window.location.origin+"/wails/runtime";function ee(t,e,n){let i=new URL($);i.searchParams.append("method",t),n&&i.searchParams.append("args",JSON.stringify(n));let o={headers:{}};return e&&(o.headers["x-wails-window-name"]=e),new Promise((l,f)=>{fetch(i,o).then(a=>{if(a.ok)return a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/json")!==-1?a.json():a.text();f(Error(a.statusText))}).then(a=>l(a)).catch(a=>f(a))})}function r(t,e){return function(n,i=null){return ee(t+"."+n,e,i)}}var k=r("clipboard");function te(t){k("SetText",{text:t})}function ne(){return k("Text")}var S={};p(S,{Hide:()=>ie,Quit:()=>re,Show:()=>oe});var C=r("application");function ie(){C("Hide")}function oe(){C("Show")}function re(){C("Quit")}var M={};p(M,{Log:()=>ae});var le=r("log");function ae(t){return le("Log",t)}var E={};p(E,{GetAll:()=>ue,GetCurrent:()=>se,GetPrimary:()=>ce});var b=r("screens");function ue(){return b("GetAll")}function ce(){return b("GetPrimary")}function se(){return b("GetCurrent")}var fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var w=(t=21)=>{let e="",n=t;for(;n--;)e+=fe[Math.random()*64|0];return e};var de=r("call"),c=new Map;function me(){let t;do t=w();while(c.has(t));return t}function A(t,e,n){let i=c.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),c.delete(t))}function W(t,e){let n=c.get(t);n&&(n.reject(e),c.delete(t))}function R(t,e){return new Promise((n,i)=>{let o=me();e=e||{},e["call-id"]=o,c.set(o,{resolve:n,reject:i}),de(t,e).catch(l=>{i(l),c.delete(o)})})}function T(t){return R("Call",t)}function P(t,e,...n){return R("Call",{packageName:"wails-plugins",structName:t,methodName:e,args:n})}function y(t){let e=r("window",t);return{Center:()=>void e("Center"),SetTitle:n=>void e("SetTitle",{title:n}),Fullscreen:()=>void e("Fullscreen"),UnFullscreen:()=>void e("UnFullscreen"),SetSize:(n,i)=>e("SetSize",{width:n,height:i}),Size:()=>e("Size"),SetMaxSize:(n,i)=>void e("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>void e("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>void e("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>e("SetPosition",{x:n,y:i}),Position:()=>e("Position"),Screen:()=>e("Screen"),Hide:()=>void e("Hide"),Maximise:()=>void e("Maximise"),Show:()=>void e("Show"),Close:()=>void e("Close"),ToggleMaximise:()=>void e("ToggleMaximise"),UnMaximise:()=>void e("UnMaximise"),Minimise:()=>void e("Minimise"),UnMinimise:()=>void e("UnMinimise"),SetBackgroundColour:(n,i,o,l)=>void e("SetBackgroundColour",{r:n,g:i,b:o,a:l})}}var pe=r("events"),L=class{constructor(e,n,i){this.eventName=e,this.maxCallbacks=i||-1,this.Callback=o=>(n(o),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},g=class{constructor(e,n=null){this.name=e,this.data=n}},u=new Map;function x(t,e,n){let i=u.get(t)||[],o=new L(t,e,n);return i.push(o),u.set(t,i),()=>we(o)}function N(t,e){return x(t,e,-1)}function F(t,e){return x(t,e,1)}function we(t){let e=t.eventName,n=u.get(e).filter(i=>i!==t);n.length===0?u.delete(e):u.set(e,n)}function D(t){console.log("dispatching event: ",{event:t});let e=u.get(t.name);if(e){let n=[];e.forEach(i=>{i.Callback(t)&&n.push(i)}),n.length>0&&(e=e.filter(i=>!n.includes(i)),e.length===0?u.delete(t.name):u.set(t.name,e))}}function U(t,...e){[t,...e].forEach(i=>{u.delete(i)})}function z(){u.clear()}function h(t){pe("Emit",t)}var ge=r("dialog"),s=new Map;function xe(){let t;do t=w();while(s.has(t));return t}function G(t,e,n){let i=s.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),s.delete(t))}function B(t,e){let n=s.get(t);n&&(n.reject(e),s.delete(t))}function d(t,e){return new Promise((n,i)=>{let o=xe();e=e||{},e["dialog-id"]=o,s.set(o,{resolve:n,reject:i}),ge(t,e).catch(l=>{i(l),s.delete(o)})})}function I(t){return d("Info",t)}function Q(t){return d("Warning",t)}function H(t){return d("Error",t)}function m(t){return d("Question",t)}function J(t){return d("OpenFile",t)}function Y(t){return d("SaveFile",t)}var he=r("contextmenu");function ve(t,e,n,i){return he("OpenContextMenu",{id:t,x:e,y:n,data:i})}function j(t){t?window.addEventListener("contextmenu",q):window.removeEventListener("contextmenu",q)}function q(t){X(t.target,t)}function X(t,e){let n=t.getAttribute("data-contextmenu");if(n)e.preventDefault(),ve(n,e.clientX,e.clientY,t.getAttribute("data-contextmenu-data"));else{let i=t.parentElement;i&&X(i,e)}}function _(t,e=null){let n=new g(t,e);h(n)}function Ce(){document.querySelectorAll("[data-wml-event]").forEach(function(e){let n=e.getAttribute("data-wml-event"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&_(n)});return}_(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function K(t){wails.Window[t]===void 0&&console.log("Window method "+t+" not found"),wails.Window[t]()}function Se(){document.querySelectorAll("[data-wml-window]").forEach(function(e){let n=e.getAttribute("data-wml-window"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&K(n)});return}K(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function O(){Ce(),Se()}window.wails={...V(null)};window._wails={dialogCallback:G,dialogErrorCallback:B,dispatchWailsEvent:D,callCallback:A,callErrorCallback:W};function V(t){return{Clipboard:{...v},Application:{...S,GetWindowByName(e){return V(e)}},Log:M,Screens:E,Call:T,Plugin:P,WML:{Reload:O},Dialog:{Info:I,Warning:Q,Error:H,Question:m,OpenFile:J,SaveFile:Y},Events:{Emit:h,On:N,Once:F,OnMultiple:x,Off:U,OffAll:z},Window:y(t)}}console.log("Wails v3.0.0 Debug Mode Enabled");j(!0);document.addEventListener("DOMContentLoaded",function(t){O()});})();
diff --git a/v3/internal/runtime/runtime_production_desktop_linux.js b/v3/internal/runtime/runtime_production_desktop_linux.js
deleted file mode 100644
index be519faa599..00000000000
--- a/v3/internal/runtime/runtime_production_desktop_linux.js
+++ /dev/null
@@ -1 +0,0 @@
-(()=>{var Z=Object.defineProperty;var p=(t,e)=>{for(var n in e)Z(t,n,{get:e[n],enumerable:!0})};var v={};p(v,{SetText:()=>te,Text:()=>ne});var $=window.location.origin+"/wails/runtime";function ee(t,e,n){let i=new URL($);i.searchParams.append("method",t),n&&i.searchParams.append("args",JSON.stringify(n));let o={headers:{}};return e&&(o.headers["x-wails-window-name"]=e),new Promise((l,f)=>{fetch(i,o).then(a=>{if(a.ok)return a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/json")!==-1?a.json():a.text();f(Error(a.statusText))}).then(a=>l(a)).catch(a=>f(a))})}function r(t,e){return function(n,i=null){return ee(t+"."+n,e,i)}}var k=r("clipboard");function te(t){k("SetText",{text:t})}function ne(){return k("Text")}var S={};p(S,{Hide:()=>ie,Quit:()=>re,Show:()=>oe});var C=r("application");function ie(){C("Hide")}function oe(){C("Show")}function re(){C("Quit")}var M={};p(M,{Log:()=>ae});var le=r("log");function ae(t){return le("Log",t)}var E={};p(E,{GetAll:()=>ue,GetCurrent:()=>se,GetPrimary:()=>ce});var b=r("screens");function ue(){return b("GetAll")}function ce(){return b("GetPrimary")}function se(){return b("GetCurrent")}var fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var w=(t=21)=>{let e="",n=t;for(;n--;)e+=fe[Math.random()*64|0];return e};var de=r("call"),c=new Map;function me(){let t;do t=w();while(c.has(t));return t}function A(t,e,n){let i=c.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),c.delete(t))}function W(t,e){let n=c.get(t);n&&(n.reject(e),c.delete(t))}function R(t,e){return new Promise((n,i)=>{let o=me();e=e||{},e["call-id"]=o,c.set(o,{resolve:n,reject:i}),de(t,e).catch(l=>{i(l),c.delete(o)})})}function T(t){return R("Call",t)}function P(t,e,...n){return R("Call",{packageName:"wails-plugins",structName:t,methodName:e,args:n})}function y(t){let e=r("window",t);return{Center:()=>void e("Center"),SetTitle:n=>void e("SetTitle",{title:n}),Fullscreen:()=>void e("Fullscreen"),UnFullscreen:()=>void e("UnFullscreen"),SetSize:(n,i)=>e("SetSize",{width:n,height:i}),Size:()=>e("Size"),SetMaxSize:(n,i)=>void e("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>void e("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>void e("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>e("SetPosition",{x:n,y:i}),Position:()=>e("Position"),Screen:()=>e("Screen"),Hide:()=>void e("Hide"),Maximise:()=>void e("Maximise"),Show:()=>void e("Show"),Close:()=>void e("Close"),ToggleMaximise:()=>void e("ToggleMaximise"),UnMaximise:()=>void e("UnMaximise"),Minimise:()=>void e("Minimise"),UnMinimise:()=>void e("UnMinimise"),SetBackgroundColour:(n,i,o,l)=>void e("SetBackgroundColour",{r:n,g:i,b:o,a:l})}}var pe=r("events"),L=class{constructor(e,n,i){this.eventName=e,this.maxCallbacks=i||-1,this.Callback=o=>(n(o),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},g=class{constructor(e,n=null){this.name=e,this.data=n}},u=new Map;function x(t,e,n){let i=u.get(t)||[],o=new L(t,e,n);return i.push(o),u.set(t,i),()=>we(o)}function N(t,e){return x(t,e,-1)}function F(t,e){return x(t,e,1)}function we(t){let e=t.eventName,n=u.get(e).filter(i=>i!==t);n.length===0?u.delete(e):u.set(e,n)}function D(t){console.log("dispatching event: ",{event:t});let e=u.get(t.name);if(e){let n=[];e.forEach(i=>{i.Callback(t)&&n.push(i)}),n.length>0&&(e=e.filter(i=>!n.includes(i)),e.length===0?u.delete(t.name):u.set(t.name,e))}}function U(t,...e){[t,...e].forEach(i=>{u.delete(i)})}function z(){u.clear()}function h(t){pe("Emit",t)}var ge=r("dialog"),s=new Map;function xe(){let t;do t=w();while(s.has(t));return t}function G(t,e,n){let i=s.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),s.delete(t))}function B(t,e){let n=s.get(t);n&&(n.reject(e),s.delete(t))}function d(t,e){return new Promise((n,i)=>{let o=xe();e=e||{},e["dialog-id"]=o,s.set(o,{resolve:n,reject:i}),ge(t,e).catch(l=>{i(l),s.delete(o)})})}function I(t){return d("Info",t)}function Q(t){return d("Warning",t)}function H(t){return d("Error",t)}function m(t){return d("Question",t)}function J(t){return d("OpenFile",t)}function Y(t){return d("SaveFile",t)}var he=r("contextmenu");function ve(t,e,n,i){return he("OpenContextMenu",{id:t,x:e,y:n,data:i})}function j(t){t?window.addEventListener("contextmenu",q):window.removeEventListener("contextmenu",q)}function q(t){X(t.target,t)}function X(t,e){let n=t.getAttribute("data-contextmenu");if(n)e.preventDefault(),ve(n,e.clientX,e.clientY,t.getAttribute("data-contextmenu-data"));else{let i=t.parentElement;i&&X(i,e)}}function _(t,e=null){let n=new g(t,e);h(n)}function Ce(){document.querySelectorAll("[data-wml-event]").forEach(function(e){let n=e.getAttribute("data-wml-event"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&_(n)});return}_(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function K(t){wails.Window[t]===void 0&&console.log("Window method "+t+" not found"),wails.Window[t]()}function Se(){document.querySelectorAll("[data-wml-window]").forEach(function(e){let n=e.getAttribute("data-wml-window"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&K(n)});return}K(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function O(){Ce(),Se()}window.wails={...V(null)};window._wails={dialogCallback:G,dialogErrorCallback:B,dispatchWailsEvent:D,callCallback:A,callErrorCallback:W};function V(t){return{Clipboard:{...v},Application:{...S,GetWindowByName(e){return V(e)}},Log:M,Screens:E,Call:T,Plugin:P,WML:{Reload:O},Dialog:{Info:I,Warning:Q,Error:H,Question:m,OpenFile:J,SaveFile:Y},Events:{Emit:h,On:N,Once:F,OnMultiple:x,Off:U,OffAll:z},Window:y(t)}}console.log("Wails v3.0.0 Debug Mode Enabled");j(!0);document.addEventListener("DOMContentLoaded",function(t){O()});})();
diff --git a/v3/internal/runtime/runtime_production_desktop_windows.js b/v3/internal/runtime/runtime_production_desktop_windows.js
deleted file mode 100644
index be519faa599..00000000000
--- a/v3/internal/runtime/runtime_production_desktop_windows.js
+++ /dev/null
@@ -1 +0,0 @@
-(()=>{var Z=Object.defineProperty;var p=(t,e)=>{for(var n in e)Z(t,n,{get:e[n],enumerable:!0})};var v={};p(v,{SetText:()=>te,Text:()=>ne});var $=window.location.origin+"/wails/runtime";function ee(t,e,n){let i=new URL($);i.searchParams.append("method",t),n&&i.searchParams.append("args",JSON.stringify(n));let o={headers:{}};return e&&(o.headers["x-wails-window-name"]=e),new Promise((l,f)=>{fetch(i,o).then(a=>{if(a.ok)return a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/json")!==-1?a.json():a.text();f(Error(a.statusText))}).then(a=>l(a)).catch(a=>f(a))})}function r(t,e){return function(n,i=null){return ee(t+"."+n,e,i)}}var k=r("clipboard");function te(t){k("SetText",{text:t})}function ne(){return k("Text")}var S={};p(S,{Hide:()=>ie,Quit:()=>re,Show:()=>oe});var C=r("application");function ie(){C("Hide")}function oe(){C("Show")}function re(){C("Quit")}var M={};p(M,{Log:()=>ae});var le=r("log");function ae(t){return le("Log",t)}var E={};p(E,{GetAll:()=>ue,GetCurrent:()=>se,GetPrimary:()=>ce});var b=r("screens");function ue(){return b("GetAll")}function ce(){return b("GetPrimary")}function se(){return b("GetCurrent")}var fe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var w=(t=21)=>{let e="",n=t;for(;n--;)e+=fe[Math.random()*64|0];return e};var de=r("call"),c=new Map;function me(){let t;do t=w();while(c.has(t));return t}function A(t,e,n){let i=c.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),c.delete(t))}function W(t,e){let n=c.get(t);n&&(n.reject(e),c.delete(t))}function R(t,e){return new Promise((n,i)=>{let o=me();e=e||{},e["call-id"]=o,c.set(o,{resolve:n,reject:i}),de(t,e).catch(l=>{i(l),c.delete(o)})})}function T(t){return R("Call",t)}function P(t,e,...n){return R("Call",{packageName:"wails-plugins",structName:t,methodName:e,args:n})}function y(t){let e=r("window",t);return{Center:()=>void e("Center"),SetTitle:n=>void e("SetTitle",{title:n}),Fullscreen:()=>void e("Fullscreen"),UnFullscreen:()=>void e("UnFullscreen"),SetSize:(n,i)=>e("SetSize",{width:n,height:i}),Size:()=>e("Size"),SetMaxSize:(n,i)=>void e("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>void e("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>void e("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>e("SetPosition",{x:n,y:i}),Position:()=>e("Position"),Screen:()=>e("Screen"),Hide:()=>void e("Hide"),Maximise:()=>void e("Maximise"),Show:()=>void e("Show"),Close:()=>void e("Close"),ToggleMaximise:()=>void e("ToggleMaximise"),UnMaximise:()=>void e("UnMaximise"),Minimise:()=>void e("Minimise"),UnMinimise:()=>void e("UnMinimise"),SetBackgroundColour:(n,i,o,l)=>void e("SetBackgroundColour",{r:n,g:i,b:o,a:l})}}var pe=r("events"),L=class{constructor(e,n,i){this.eventName=e,this.maxCallbacks=i||-1,this.Callback=o=>(n(o),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},g=class{constructor(e,n=null){this.name=e,this.data=n}},u=new Map;function x(t,e,n){let i=u.get(t)||[],o=new L(t,e,n);return i.push(o),u.set(t,i),()=>we(o)}function N(t,e){return x(t,e,-1)}function F(t,e){return x(t,e,1)}function we(t){let e=t.eventName,n=u.get(e).filter(i=>i!==t);n.length===0?u.delete(e):u.set(e,n)}function D(t){console.log("dispatching event: ",{event:t});let e=u.get(t.name);if(e){let n=[];e.forEach(i=>{i.Callback(t)&&n.push(i)}),n.length>0&&(e=e.filter(i=>!n.includes(i)),e.length===0?u.delete(t.name):u.set(t.name,e))}}function U(t,...e){[t,...e].forEach(i=>{u.delete(i)})}function z(){u.clear()}function h(t){pe("Emit",t)}var ge=r("dialog"),s=new Map;function xe(){let t;do t=w();while(s.has(t));return t}function G(t,e,n){let i=s.get(t);i&&(n?i.resolve(JSON.parse(e)):i.resolve(e),s.delete(t))}function B(t,e){let n=s.get(t);n&&(n.reject(e),s.delete(t))}function d(t,e){return new Promise((n,i)=>{let o=xe();e=e||{},e["dialog-id"]=o,s.set(o,{resolve:n,reject:i}),ge(t,e).catch(l=>{i(l),s.delete(o)})})}function I(t){return d("Info",t)}function Q(t){return d("Warning",t)}function H(t){return d("Error",t)}function m(t){return d("Question",t)}function J(t){return d("OpenFile",t)}function Y(t){return d("SaveFile",t)}var he=r("contextmenu");function ve(t,e,n,i){return he("OpenContextMenu",{id:t,x:e,y:n,data:i})}function j(t){t?window.addEventListener("contextmenu",q):window.removeEventListener("contextmenu",q)}function q(t){X(t.target,t)}function X(t,e){let n=t.getAttribute("data-contextmenu");if(n)e.preventDefault(),ve(n,e.clientX,e.clientY,t.getAttribute("data-contextmenu-data"));else{let i=t.parentElement;i&&X(i,e)}}function _(t,e=null){let n=new g(t,e);h(n)}function Ce(){document.querySelectorAll("[data-wml-event]").forEach(function(e){let n=e.getAttribute("data-wml-event"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&_(n)});return}_(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function K(t){wails.Window[t]===void 0&&console.log("Window method "+t+" not found"),wails.Window[t]()}function Se(){document.querySelectorAll("[data-wml-window]").forEach(function(e){let n=e.getAttribute("data-wml-window"),i=e.getAttribute("data-wml-confirm"),o=e.getAttribute("data-wml-trigger")||"click",l=function(){if(i){m({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(f){f!=="No"&&K(n)});return}K(n)};e.removeEventListener(o,l),e.addEventListener(o,l)})}function O(){Ce(),Se()}window.wails={...V(null)};window._wails={dialogCallback:G,dialogErrorCallback:B,dispatchWailsEvent:D,callCallback:A,callErrorCallback:W};function V(t){return{Clipboard:{...v},Application:{...S,GetWindowByName(e){return V(e)}},Log:M,Screens:E,Call:T,Plugin:P,WML:{Reload:O},Dialog:{Info:I,Warning:Q,Error:H,Question:m,OpenFile:J,SaveFile:Y},Events:{Emit:h,On:N,Once:F,OnMultiple:x,Off:U,OffAll:z},Window:y(t)}}console.log("Wails v3.0.0 Debug Mode Enabled");j(!0);document.addEventListener("DOMContentLoaded",function(t){O()});})();
diff --git a/v3/internal/runtime/runtime_production_linux.go b/v3/internal/runtime/runtime_production_linux.go
deleted file mode 100644
index d7c2bd1efdb..00000000000
--- a/v3/internal/runtime/runtime_production_linux.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build linux && production
-
-package runtime
-
-import _ "embed"
-
-//go:embed runtime_production_desktop_linux.js
-var DesktopRuntime []byte
diff --git a/v3/internal/runtime/runtime_production_windows.go b/v3/internal/runtime/runtime_production_windows.go
deleted file mode 100644
index 8ab6d619947..00000000000
--- a/v3/internal/runtime/runtime_production_windows.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build windows && production
-
-package runtime
-
-import _ "embed"
-
-//go:embed runtime_production_desktop_windows.js
-var DesktopRuntime []byte
diff --git a/v3/internal/runtime/vite.config.ts b/v3/internal/runtime/vite.config.ts
deleted file mode 100644
index eb0831c65ea..00000000000
--- a/v3/internal/runtime/vite.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vitest/config'
-
-export default defineConfig({
- test: {
- environment: 'happy-dom',
- },
-})
\ No newline at end of file
diff --git a/v3/internal/templates/_base/default/Taskfile.tmpl.yml b/v3/internal/templates/_base/default/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/_base/default/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/_base/default/build/Info.dev.plist.tmpl b/v3/internal/templates/_base/default/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/_base/default/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/_base/default/build/Info.plist.tmpl b/v3/internal/templates/_base/default/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/_base/default/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/_base/default/build/appicon.png b/v3/internal/templates/_base/default/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/_base/default/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/_base/default/build/icons.icns b/v3/internal/templates/_base/default/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/_base/default/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/_base/default/frontend/public/wails.png b/v3/internal/templates/_base/default/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/_base/default/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/_base/default/go.mod.tmpl b/v3/internal/templates/_base/default/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/_base/default/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/_base/default/go.sum.tmpl b/v3/internal/templates/_base/default/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/_base/default/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/_base/default/main.go.tmpl b/v3/internal/templates/_base/default/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/_base/default/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/_base/lit-ts/frontend/index.html b/v3/internal/templates/_base/lit-ts/frontend/index.html
deleted file mode 100644
index b4898b214fa..00000000000
--- a/v3/internal/templates/_base/lit-ts/frontend/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
- Wails + Lit + TS
-
-
-
-
-
- Wails + Lit
-
-
-
diff --git a/v3/internal/templates/_base/lit/frontend/index.html b/v3/internal/templates/_base/lit/frontend/index.html
deleted file mode 100644
index 0f030a2f431..00000000000
--- a/v3/internal/templates/_base/lit/frontend/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
- Wails + Lit
-
-
-
-
-
- Wails + Lit
-
-
-
diff --git a/v3/internal/templates/_base/preact-ts/frontend/index.html b/v3/internal/templates/_base/preact-ts/frontend/index.html
deleted file mode 100644
index c467c421b22..00000000000
--- a/v3/internal/templates/_base/preact-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Preact + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/preact/frontend/index.html b/v3/internal/templates/_base/preact/frontend/index.html
deleted file mode 100644
index a3c698def51..00000000000
--- a/v3/internal/templates/_base/preact/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Preact
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/react-swc-ts/frontend/index.html b/v3/internal/templates/_base/react-swc-ts/frontend/index.html
deleted file mode 100644
index 44b5c452ba4..00000000000
--- a/v3/internal/templates/_base/react-swc-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + React + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/react-swc/frontend/index.html b/v3/internal/templates/_base/react-swc/frontend/index.html
deleted file mode 100644
index cc495265cf8..00000000000
--- a/v3/internal/templates/_base/react-swc/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + React
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/react-ts/frontend/index.html b/v3/internal/templates/_base/react-ts/frontend/index.html
deleted file mode 100644
index 44b5c452ba4..00000000000
--- a/v3/internal/templates/_base/react-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + React + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/react/frontend/index.html b/v3/internal/templates/_base/react/frontend/index.html
deleted file mode 100644
index cc495265cf8..00000000000
--- a/v3/internal/templates/_base/react/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + React
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/svelte-ts/frontend/index.html b/v3/internal/templates/_base/svelte-ts/frontend/index.html
deleted file mode 100644
index 2d5c0f2de8c..00000000000
--- a/v3/internal/templates/_base/svelte-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Svelte + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/svelte/frontend/README.md b/v3/internal/templates/_base/svelte/frontend/README.md
deleted file mode 100644
index fd6a7082f7e..00000000000
--- a/v3/internal/templates/_base/svelte/frontend/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# Wails + Svelte
\ No newline at end of file
diff --git a/v3/internal/templates/_base/svelte/frontend/index.html b/v3/internal/templates/_base/svelte/frontend/index.html
deleted file mode 100644
index d12bc9069ae..00000000000
--- a/v3/internal/templates/_base/svelte/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Svelte
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/svelte/frontend/src/App.svelte b/v3/internal/templates/_base/svelte/frontend/src/App.svelte
deleted file mode 100644
index c677e3838a5..00000000000
--- a/v3/internal/templates/_base/svelte/frontend/src/App.svelte
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
- Wails + Svelte
-
-
-
-
-
-
- Check out SvelteKit , the official Svelte app framework powered by Wails!
-
-
-
- Click on the Wails and Svelte logos to learn more
-
-
-
-
diff --git a/v3/internal/templates/_base/vanilla-ts/frontend/index.html b/v3/internal/templates/_base/vanilla-ts/frontend/index.html
deleted file mode 100644
index 8c692073a2d..00000000000
--- a/v3/internal/templates/_base/vanilla-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/vanilla/frontend/index.html b/v3/internal/templates/_base/vanilla/frontend/index.html
deleted file mode 100644
index c4eb3cc44ce..00000000000
--- a/v3/internal/templates/_base/vanilla/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails App
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/vue-ts/frontend/index.html b/v3/internal/templates/_base/vue-ts/frontend/index.html
deleted file mode 100644
index 28870032c06..00000000000
--- a/v3/internal/templates/_base/vue-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Vue + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/_base/vue/frontend/index.html b/v3/internal/templates/_base/vue/frontend/index.html
deleted file mode 100644
index 5057cc3c1b1..00000000000
--- a/v3/internal/templates/_base/vue/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Vue
-
-
-
-
-
-
diff --git a/v3/internal/templates/lit-ts/Taskfile.tmpl.yml b/v3/internal/templates/lit-ts/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/lit-ts/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/lit-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/lit-ts/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/lit-ts/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/lit-ts/build/Info.plist.tmpl b/v3/internal/templates/lit-ts/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/lit-ts/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/lit-ts/build/appicon.png b/v3/internal/templates/lit-ts/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/lit-ts/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/lit-ts/build/icons.icns b/v3/internal/templates/lit-ts/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/lit-ts/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/lit-ts/frontend/.gitignore b/v3/internal/templates/lit-ts/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/lit-ts/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/lit-ts/frontend/index.html b/v3/internal/templates/lit-ts/frontend/index.html
deleted file mode 100644
index ca539730d6c..00000000000
--- a/v3/internal/templates/lit-ts/frontend/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
- Wails + Lit + TS
-
-
-
-
-
- Wails + Lit
-
-
-
diff --git a/v3/internal/templates/lit-ts/frontend/package.json b/v3/internal/templates/lit-ts/frontend/package.json
deleted file mode 100644
index 42a86bd4bc7..00000000000
--- a/v3/internal/templates/lit-ts/frontend/package.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "main": "dist/my-element.es.js",
- "exports": {
- ".": "./dist/my-element.es.js"
- },
- "types": "types/my-element.d.ts",
- "files": [
- "dist",
- "types"
- ],
- "scripts": {
- "dev": "vite",
- "build": "tsc && vite build"
- },
- "dependencies": {
- "lit": "^2.4.1"
- },
- "devDependencies": {
- "typescript": "^4.9.3",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/lit-ts/frontend/public/wails.png b/v3/internal/templates/lit-ts/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/lit-ts/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/lit-ts/frontend/src/assets/lit.svg b/v3/internal/templates/lit-ts/frontend/src/assets/lit.svg
deleted file mode 100644
index 4a9c1fe662e..00000000000
--- a/v3/internal/templates/lit-ts/frontend/src/assets/lit.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/lit-ts/frontend/src/index.css b/v3/internal/templates/lit-ts/frontend/src/index.css
deleted file mode 100644
index d39ac2e34ee..00000000000
--- a/v3/internal/templates/lit-ts/frontend/src/index.css
+++ /dev/null
@@ -1,40 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
-}
diff --git a/v3/internal/templates/lit-ts/frontend/src/my-element.ts b/v3/internal/templates/lit-ts/frontend/src/my-element.ts
deleted file mode 100644
index 9f1c76e89ca..00000000000
--- a/v3/internal/templates/lit-ts/frontend/src/my-element.ts
+++ /dev/null
@@ -1,125 +0,0 @@
-import { LitElement, css, html } from 'lit'
-import { customElement, property } from 'lit/decorators.js'
-import litLogo from './assets/lit.svg'
-
-/**
- * An example element.
- *
- * @slot - This element has a slot
- * @csspart button - The button
- */
-@customElement('my-element')
-export class MyElement extends LitElement {
- /**
- * Copy for the read the docs hint.
- */
- @property()
- docsHint = 'Click on the Wails and Lit logos to learn more'
-
- /**
- * The number of times the button has been clicked.
- */
- @property({ type: Number })
- count = 0
-
- render() {
- return html`
-
-
-
-
- count is ${this.count}
-
-
- ${this.docsHint}
- `
- }
-
- private _onClick() {
- this.count++
- }
-
- static styles = css`
- :host {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
- }
-
- .logo {
- height: 6em;
- padding: 1.5em;
- will-change: filter;
- }
- .logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
- }
- .logo.lit:hover {
- filter: drop-shadow(0 0 2em #325cffaa);
- }
-
- .card {
- padding: 2em;
- }
-
- .read-the-docs {
- color: #888;
- }
-
- h1 {
- font-size: 3.2em;
- line-height: 1.1;
- }
-
- a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
- }
- a:hover {
- color: #535bf2;
- }
-
- button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
- }
- button:hover {
- border-color: #646cff;
- }
- button:focus,
- button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
- }
-
- @media (prefers-color-scheme: light) {
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
- }
- `
-}
-
-declare global {
- interface HTMLElementTagNameMap {
- 'my-element': MyElement
- }
-}
diff --git a/v3/internal/templates/lit-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/lit-ts/frontend/src/vite-env.d.ts
deleted file mode 100644
index 11f02fe2a00..00000000000
--- a/v3/internal/templates/lit-ts/frontend/src/vite-env.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-///
diff --git a/v3/internal/templates/lit-ts/frontend/tsconfig.json b/v3/internal/templates/lit-ts/frontend/tsconfig.json
deleted file mode 100644
index b080b2b2cd4..00000000000
--- a/v3/internal/templates/lit-ts/frontend/tsconfig.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "compilerOptions": {
- "module": "ESNext",
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
- "declaration": true,
- "emitDeclarationOnly": true,
- "outDir": "./types",
- "strict": true,
- "noUnusedLocals": true,
- "noUnusedParameters": true,
- "noImplicitReturns": true,
- "noFallthroughCasesInSwitch": true,
- "moduleResolution": "Node",
- "isolatedModules": true,
- "allowSyntheticDefaultImports": true,
- "experimentalDecorators": true,
- "forceConsistentCasingInFileNames": true,
- "useDefineForClassFields": false,
- "skipLibCheck": true
- },
- "include": ["src/**/*.ts"],
- "references": [{ "path": "./tsconfig.node.json" }]
-}
diff --git a/v3/internal/templates/lit-ts/frontend/tsconfig.node.json b/v3/internal/templates/lit-ts/frontend/tsconfig.node.json
deleted file mode 100644
index 9d31e2aed93..00000000000
--- a/v3/internal/templates/lit-ts/frontend/tsconfig.node.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "module": "ESNext",
- "moduleResolution": "Node",
- "allowSyntheticDefaultImports": true
- },
- "include": ["vite.config.ts"]
-}
diff --git a/v3/internal/templates/lit-ts/frontend/vite.config.ts b/v3/internal/templates/lit-ts/frontend/vite.config.ts
deleted file mode 100644
index fe69491e390..00000000000
--- a/v3/internal/templates/lit-ts/frontend/vite.config.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { defineConfig } from 'vite'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- build: {
- lib: {
- entry: 'src/my-element.ts',
- formats: ['es'],
- },
- rollupOptions: {
- external: /^lit/,
- },
- },
-})
diff --git a/v3/internal/templates/lit-ts/go.mod.tmpl b/v3/internal/templates/lit-ts/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/lit-ts/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/lit-ts/go.sum.tmpl b/v3/internal/templates/lit-ts/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/lit-ts/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/lit-ts/main.go.tmpl b/v3/internal/templates/lit-ts/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/lit-ts/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/lit/Taskfile.tmpl.yml b/v3/internal/templates/lit/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/lit/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/lit/build/Info.dev.plist.tmpl b/v3/internal/templates/lit/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/lit/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/lit/build/Info.plist.tmpl b/v3/internal/templates/lit/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/lit/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/lit/build/appicon.png b/v3/internal/templates/lit/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/lit/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/lit/build/icons.icns b/v3/internal/templates/lit/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/lit/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/lit/frontend/.gitignore b/v3/internal/templates/lit/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/lit/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/lit/frontend/index.html b/v3/internal/templates/lit/frontend/index.html
deleted file mode 100644
index 9da997ad722..00000000000
--- a/v3/internal/templates/lit/frontend/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
- Wails + Lit
-
-
-
-
-
- Wails + Lit
-
-
-
diff --git a/v3/internal/templates/lit/frontend/package.json b/v3/internal/templates/lit/frontend/package.json
deleted file mode 100644
index 1c4979defe2..00000000000
--- a/v3/internal/templates/lit/frontend/package.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "main": "dist/my-element.es.js",
- "exports": {
- ".": "./dist/my-element.es.js"
- },
- "files": [
- "dist"
- ],
- "scripts": {
- "dev": "vite",
- "build": "vite build"
- },
- "dependencies": {
- "lit": "^2.4.1"
- },
- "devDependencies": {
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/lit/frontend/public/wails.png b/v3/internal/templates/lit/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/lit/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/lit/frontend/src/assets/lit.svg b/v3/internal/templates/lit/frontend/src/assets/lit.svg
deleted file mode 100644
index 4a9c1fe662e..00000000000
--- a/v3/internal/templates/lit/frontend/src/assets/lit.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/lit/frontend/src/index.css b/v3/internal/templates/lit/frontend/src/index.css
deleted file mode 100644
index b52d4c639b5..00000000000
--- a/v3/internal/templates/lit/frontend/src/index.css
+++ /dev/null
@@ -1,31 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
-}
diff --git a/v3/internal/templates/lit/frontend/src/my-element.js b/v3/internal/templates/lit/frontend/src/my-element.js
deleted file mode 100644
index 515f8fa5895..00000000000
--- a/v3/internal/templates/lit/frontend/src/my-element.js
+++ /dev/null
@@ -1,129 +0,0 @@
-import { LitElement, css, html } from 'lit'
-import litLogo from './assets/lit.svg'
-
-/**
- * An example element.
- *
- * @slot - This element has a slot
- * @csspart button - The button
- */
-export class MyElement extends LitElement {
- static get properties() {
- return {
- /**
- * Copy for the read the docs hint.
- */
- docsHint: { type: String },
-
- /**
- * The number of times the button has been clicked.
- */
- count: { type: Number },
- }
- }
-
- constructor() {
- super()
- this.docsHint = 'Click on the Wails and Lit logos to learn more'
- this.count = 0
- }
-
- render() {
- return html`
-
-
-
-
- count is ${this.count}
-
-
- ${this.docsHint}
- `
- }
-
- _onClick() {
- this.count++
- }
-
- static get styles() {
- return css`
- :host {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
- }
-
- .logo {
- height: 6em;
- padding: 1.5em;
- will-change: filter;
- }
- .logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
- }
- .logo.lit:hover {
- filter: drop-shadow(0 0 2em #325cffaa);
- }
-
- .card {
- padding: 2em;
- }
-
- .read-the-docs {
- color: #888;
- }
-
- a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
- }
- a:hover {
- color: #535bf2;
- }
-
- h1 {
- font-size: 3.2em;
- line-height: 1.1;
- }
-
- button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
- }
- button:hover {
- border-color: #646cff;
- }
- button:focus,
- button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
- }
-
- @media (prefers-color-scheme: light) {
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
- }
- `
- }
-}
-
-window.customElements.define('my-element', MyElement)
diff --git a/v3/internal/templates/lit/frontend/vite.config.js b/v3/internal/templates/lit/frontend/vite.config.js
deleted file mode 100644
index 3847c1f3846..00000000000
--- a/v3/internal/templates/lit/frontend/vite.config.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import { defineConfig } from 'vite'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- build: {
- lib: {
- entry: 'src/my-element.js',
- formats: ['es'],
- },
- rollupOptions: {
- external: /^lit/,
- },
- },
-})
diff --git a/v3/internal/templates/lit/go.mod.tmpl b/v3/internal/templates/lit/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/lit/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/lit/go.sum.tmpl b/v3/internal/templates/lit/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/lit/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/lit/main.go.tmpl b/v3/internal/templates/lit/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/lit/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/preact-ts/Taskfile.tmpl.yml b/v3/internal/templates/preact-ts/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/preact-ts/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/preact-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/preact-ts/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/preact-ts/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/preact-ts/build/Info.plist.tmpl b/v3/internal/templates/preact-ts/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/preact-ts/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/preact-ts/build/appicon.png b/v3/internal/templates/preact-ts/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/preact-ts/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/preact-ts/build/icons.icns b/v3/internal/templates/preact-ts/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/preact-ts/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/preact-ts/frontend/.gitignore b/v3/internal/templates/preact-ts/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/preact-ts/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/preact-ts/frontend/index.html b/v3/internal/templates/preact-ts/frontend/index.html
deleted file mode 100644
index 9270ebd4e68..00000000000
--- a/v3/internal/templates/preact-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Preact + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/preact-ts/frontend/package.json b/v3/internal/templates/preact-ts/frontend/package.json
deleted file mode 100644
index cab9db65491..00000000000
--- a/v3/internal/templates/preact-ts/frontend/package.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "tsc && vite build",
- "preview": "vite preview"
- },
- "dependencies": {
- "preact": "^10.11.3"
- },
- "devDependencies": {
- "@preact/preset-vite": "^2.4.0",
- "typescript": "^4.9.3",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/preact-ts/frontend/public/wails.png b/v3/internal/templates/preact-ts/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/preact-ts/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/preact-ts/frontend/src/app.css b/v3/internal/templates/preact-ts/frontend/src/app.css
deleted file mode 100644
index 088ed3ace55..00000000000
--- a/v3/internal/templates/preact-ts/frontend/src/app.css
+++ /dev/null
@@ -1,25 +0,0 @@
-#app {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-.logo {
- height: 6em;
- padding: 1.5em;
-}
-.logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
-}
-.logo.preact:hover {
- filter: drop-shadow(0 0 2em #673ab8aa);
-}
-
-.card {
- padding: 2em;
-}
-
-.read-the-docs {
- color: #888;
-}
diff --git a/v3/internal/templates/preact-ts/frontend/src/app.tsx b/v3/internal/templates/preact-ts/frontend/src/app.tsx
deleted file mode 100644
index ccde5b9f39b..00000000000
--- a/v3/internal/templates/preact-ts/frontend/src/app.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { useState } from 'preact/hooks'
-import preactLogo from './assets/preact.svg'
-import './app.css'
-
-export function App() {
- const [count, setCount] = useState(0)
-
- return (
- <>
-
- Vite + Preact
-
-
setCount((count) => count + 1)}>
- count is {count}
-
-
- Edit src/app.tsx
and save to test HMR
-
-
-
- Click on the Vite and Preact logos to learn more
-
- >
- )
-}
diff --git a/v3/internal/templates/preact-ts/frontend/src/assets/preact.svg b/v3/internal/templates/preact-ts/frontend/src/assets/preact.svg
deleted file mode 100644
index 908f17def0b..00000000000
--- a/v3/internal/templates/preact-ts/frontend/src/assets/preact.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/preact-ts/frontend/src/index.css b/v3/internal/templates/preact-ts/frontend/src/index.css
deleted file mode 100644
index 917888c1d11..00000000000
--- a/v3/internal/templates/preact-ts/frontend/src/index.css
+++ /dev/null
@@ -1,70 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/preact-ts/frontend/src/main.tsx b/v3/internal/templates/preact-ts/frontend/src/main.tsx
deleted file mode 100644
index e0ce3e9980e..00000000000
--- a/v3/internal/templates/preact-ts/frontend/src/main.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { render } from 'preact'
-import { App } from './app'
-import './index.css'
-
-render( , document.getElementById('app') as HTMLElement)
diff --git a/v3/internal/templates/preact-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/preact-ts/frontend/src/vite-env.d.ts
deleted file mode 100644
index 11f02fe2a00..00000000000
--- a/v3/internal/templates/preact-ts/frontend/src/vite-env.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-///
diff --git a/v3/internal/templates/preact-ts/frontend/tsconfig.json b/v3/internal/templates/preact-ts/frontend/tsconfig.json
deleted file mode 100644
index 9c1b1e0aa6f..00000000000
--- a/v3/internal/templates/preact-ts/frontend/tsconfig.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "compilerOptions": {
- "target": "ESNext",
- "useDefineForClassFields": true,
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
- "allowJs": false,
- "skipLibCheck": true,
- "esModuleInterop": false,
- "allowSyntheticDefaultImports": true,
- "strict": true,
- "forceConsistentCasingInFileNames": true,
- "module": "ESNext",
- "moduleResolution": "Node",
- "resolveJsonModule": true,
- "isolatedModules": true,
- "noEmit": true,
- "jsx": "react-jsx",
- "jsxImportSource": "preact"
- },
- "include": ["src"],
- "references": [{ "path": "./tsconfig.node.json" }]
-}
diff --git a/v3/internal/templates/preact-ts/frontend/tsconfig.node.json b/v3/internal/templates/preact-ts/frontend/tsconfig.node.json
deleted file mode 100644
index 9d31e2aed93..00000000000
--- a/v3/internal/templates/preact-ts/frontend/tsconfig.node.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "module": "ESNext",
- "moduleResolution": "Node",
- "allowSyntheticDefaultImports": true
- },
- "include": ["vite.config.ts"]
-}
diff --git a/v3/internal/templates/preact-ts/frontend/vite.config.ts b/v3/internal/templates/preact-ts/frontend/vite.config.ts
deleted file mode 100644
index 29b326faf09..00000000000
--- a/v3/internal/templates/preact-ts/frontend/vite.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vite'
-import preact from '@preact/preset-vite'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [preact()],
-})
diff --git a/v3/internal/templates/preact-ts/go.mod.tmpl b/v3/internal/templates/preact-ts/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/preact-ts/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/preact-ts/go.sum.tmpl b/v3/internal/templates/preact-ts/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/preact-ts/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/preact-ts/main.go.tmpl b/v3/internal/templates/preact-ts/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/preact-ts/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/preact/Taskfile.tmpl.yml b/v3/internal/templates/preact/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/preact/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/preact/build/Info.dev.plist.tmpl b/v3/internal/templates/preact/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/preact/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/preact/build/Info.plist.tmpl b/v3/internal/templates/preact/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/preact/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/preact/build/appicon.png b/v3/internal/templates/preact/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/preact/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/preact/build/icons.icns b/v3/internal/templates/preact/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/preact/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/preact/frontend/.gitignore b/v3/internal/templates/preact/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/preact/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/preact/frontend/index.html b/v3/internal/templates/preact/frontend/index.html
deleted file mode 100644
index 139931e703c..00000000000
--- a/v3/internal/templates/preact/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Preact
-
-
-
-
-
-
diff --git a/v3/internal/templates/preact/frontend/package.json b/v3/internal/templates/preact/frontend/package.json
deleted file mode 100644
index f44069b31f0..00000000000
--- a/v3/internal/templates/preact/frontend/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "vite build",
- "preview": "vite preview"
- },
- "dependencies": {
- "preact": "^10.11.3"
- },
- "devDependencies": {
- "@preact/preset-vite": "^2.4.0",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/preact/frontend/public/wails.png b/v3/internal/templates/preact/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/preact/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/preact/frontend/src/app.css b/v3/internal/templates/preact/frontend/src/app.css
deleted file mode 100644
index 088ed3ace55..00000000000
--- a/v3/internal/templates/preact/frontend/src/app.css
+++ /dev/null
@@ -1,25 +0,0 @@
-#app {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-.logo {
- height: 6em;
- padding: 1.5em;
-}
-.logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
-}
-.logo.preact:hover {
- filter: drop-shadow(0 0 2em #673ab8aa);
-}
-
-.card {
- padding: 2em;
-}
-
-.read-the-docs {
- color: #888;
-}
diff --git a/v3/internal/templates/preact/frontend/src/app.jsx b/v3/internal/templates/preact/frontend/src/app.jsx
deleted file mode 100644
index 2679f488673..00000000000
--- a/v3/internal/templates/preact/frontend/src/app.jsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { useState } from 'preact/hooks'
-import preactLogo from './assets/preact.svg'
-import './app.css'
-
-export function App() {
- const [count, setCount] = useState(0)
-
- return (
- <>
-
- Vite + Preact
-
-
setCount((count) => count + 1)}>
- count is {count}
-
-
- Edit src/app.jsx
and save to test HMR
-
-
-
- Click on the Vite and Preact logos to learn more
-
- >
- )
-}
diff --git a/v3/internal/templates/preact/frontend/src/assets/preact.svg b/v3/internal/templates/preact/frontend/src/assets/preact.svg
deleted file mode 100644
index 908f17def0b..00000000000
--- a/v3/internal/templates/preact/frontend/src/assets/preact.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/preact/frontend/src/index.css b/v3/internal/templates/preact/frontend/src/index.css
deleted file mode 100644
index 917888c1d11..00000000000
--- a/v3/internal/templates/preact/frontend/src/index.css
+++ /dev/null
@@ -1,70 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/preact/frontend/src/main.jsx b/v3/internal/templates/preact/frontend/src/main.jsx
deleted file mode 100644
index be3fbce92b2..00000000000
--- a/v3/internal/templates/preact/frontend/src/main.jsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { render } from 'preact'
-import { App } from './app'
-import './index.css'
-
-render( , document.getElementById('app'))
diff --git a/v3/internal/templates/preact/frontend/vite.config.js b/v3/internal/templates/preact/frontend/vite.config.js
deleted file mode 100644
index 29b326faf09..00000000000
--- a/v3/internal/templates/preact/frontend/vite.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vite'
-import preact from '@preact/preset-vite'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [preact()],
-})
diff --git a/v3/internal/templates/preact/go.mod.tmpl b/v3/internal/templates/preact/go.mod.tmpl
deleted file mode 100644
index 5fbc4986791..00000000000
--- a/v3/internal/templates/preact/go.mod.tmpl
+++ /dev/null
@@ -1,17 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/imdario/mergo v0.3.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/preact/go.sum.tmpl b/v3/internal/templates/preact/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/preact/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/preact/main.go.tmpl b/v3/internal/templates/preact/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/preact/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml b/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/react-swc-ts/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/react-swc-ts/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/react-swc-ts/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc-ts/build/Info.plist.tmpl b/v3/internal/templates/react-swc-ts/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/react-swc-ts/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc-ts/build/appicon.png b/v3/internal/templates/react-swc-ts/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/react-swc-ts/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/react-swc-ts/build/icons.icns b/v3/internal/templates/react-swc-ts/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/react-swc-ts/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/react-swc-ts/frontend/.gitignore b/v3/internal/templates/react-swc-ts/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/react-swc-ts/frontend/index.html b/v3/internal/templates/react-swc-ts/frontend/index.html
deleted file mode 100644
index 28868c572e5..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + React + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/react-swc-ts/frontend/package.json b/v3/internal/templates/react-swc-ts/frontend/package.json
deleted file mode 100644
index 26dc1bca821..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "tsc && vite build",
- "preview": "vite preview"
- },
- "dependencies": {
- "react": "^18.2.0",
- "react-dom": "^18.2.0"
- },
- "devDependencies": {
- "@types/react": "^18.0.26",
- "@types/react-dom": "^18.0.9",
- "@vitejs/plugin-react-swc": "^3.0.0",
- "typescript": "^4.9.3",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc-ts/frontend/public/wails.png b/v3/internal/templates/react-swc-ts/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/react-swc-ts/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/react-swc-ts/frontend/src/App.css b/v3/internal/templates/react-swc-ts/frontend/src/App.css
deleted file mode 100644
index 2c5e2ef5cd1..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/src/App.css
+++ /dev/null
@@ -1,41 +0,0 @@
-#root {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-.logo {
- height: 6em;
- padding: 1.5em;
- will-change: filter;
-}
-.logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
-}
-.logo.react:hover {
- filter: drop-shadow(0 0 2em #61dafbaa);
-}
-
-@keyframes logo-spin {
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
-}
-
-@media (prefers-reduced-motion: no-preference) {
- a:nth-of-type(2) .logo {
- animation: logo-spin infinite 20s linear;
- }
-}
-
-.card {
- padding: 2em;
-}
-
-.read-the-docs {
- color: #888;
-}
diff --git a/v3/internal/templates/react-swc-ts/frontend/src/App.tsx b/v3/internal/templates/react-swc-ts/frontend/src/App.tsx
deleted file mode 100644
index cd201360b42..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/src/App.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { useState } from 'react'
-import reactLogo from './assets/react.svg'
-import './App.css'
-
-function App() {
- const [count, setCount] = useState(0)
-
- return (
-
-
-
Vite + React
-
-
setCount((count) => count + 1)}>
- count is {count}
-
-
- Edit src/App.tsx
and save to test HMR
-
-
-
- Click on the Vite and React logos to learn more
-
-
- )
-}
-
-export default App
diff --git a/v3/internal/templates/react-swc-ts/frontend/src/assets/react.svg b/v3/internal/templates/react-swc-ts/frontend/src/assets/react.svg
deleted file mode 100644
index 6c87de9bb33..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/src/assets/react.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc-ts/frontend/src/index.css b/v3/internal/templates/react-swc-ts/frontend/src/index.css
deleted file mode 100644
index 917888c1d11..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/src/index.css
+++ /dev/null
@@ -1,70 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/react-swc-ts/frontend/src/main.tsx b/v3/internal/templates/react-swc-ts/frontend/src/main.tsx
deleted file mode 100644
index 791f139e242..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/src/main.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import React from 'react'
-import ReactDOM from 'react-dom/client'
-import App from './App'
-import './index.css'
-
-ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
-
-
- ,
-)
diff --git a/v3/internal/templates/react-swc-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/react-swc-ts/frontend/src/vite-env.d.ts
deleted file mode 100644
index 11f02fe2a00..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/src/vite-env.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-///
diff --git a/v3/internal/templates/react-swc-ts/frontend/tsconfig.json b/v3/internal/templates/react-swc-ts/frontend/tsconfig.json
deleted file mode 100644
index 3d0a51a86e2..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/tsconfig.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "compilerOptions": {
- "target": "ESNext",
- "useDefineForClassFields": true,
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
- "allowJs": false,
- "skipLibCheck": true,
- "esModuleInterop": false,
- "allowSyntheticDefaultImports": true,
- "strict": true,
- "forceConsistentCasingInFileNames": true,
- "module": "ESNext",
- "moduleResolution": "Node",
- "resolveJsonModule": true,
- "isolatedModules": true,
- "noEmit": true,
- "jsx": "react-jsx"
- },
- "include": ["src"],
- "references": [{ "path": "./tsconfig.node.json" }]
-}
diff --git a/v3/internal/templates/react-swc-ts/frontend/tsconfig.node.json b/v3/internal/templates/react-swc-ts/frontend/tsconfig.node.json
deleted file mode 100644
index 9d31e2aed93..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/tsconfig.node.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "module": "ESNext",
- "moduleResolution": "Node",
- "allowSyntheticDefaultImports": true
- },
- "include": ["vite.config.ts"]
-}
diff --git a/v3/internal/templates/react-swc-ts/frontend/vite.config.ts b/v3/internal/templates/react-swc-ts/frontend/vite.config.ts
deleted file mode 100644
index 861b04b3560..00000000000
--- a/v3/internal/templates/react-swc-ts/frontend/vite.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vite'
-import react from '@vitejs/plugin-react-swc'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [react()],
-})
diff --git a/v3/internal/templates/react-swc-ts/go.mod.tmpl b/v3/internal/templates/react-swc-ts/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/react-swc-ts/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/react-swc-ts/go.sum.tmpl b/v3/internal/templates/react-swc-ts/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/react-swc-ts/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/react-swc-ts/main.go.tmpl b/v3/internal/templates/react-swc-ts/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/react-swc-ts/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/react-swc/Taskfile.tmpl.yml b/v3/internal/templates/react-swc/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/react-swc/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc/build/Info.dev.plist.tmpl b/v3/internal/templates/react-swc/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/react-swc/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc/build/Info.plist.tmpl b/v3/internal/templates/react-swc/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/react-swc/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc/build/appicon.png b/v3/internal/templates/react-swc/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/react-swc/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/react-swc/build/icons.icns b/v3/internal/templates/react-swc/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/react-swc/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/react-swc/frontend/.gitignore b/v3/internal/templates/react-swc/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/react-swc/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/react-swc/frontend/index.html b/v3/internal/templates/react-swc/frontend/index.html
deleted file mode 100644
index fe5530dd4ee..00000000000
--- a/v3/internal/templates/react-swc/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + React
-
-
-
-
-
-
diff --git a/v3/internal/templates/react-swc/frontend/package.json b/v3/internal/templates/react-swc/frontend/package.json
deleted file mode 100644
index 6583b9c4bbf..00000000000
--- a/v3/internal/templates/react-swc/frontend/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "vite build",
- "preview": "vite preview"
- },
- "dependencies": {
- "react": "^18.2.0",
- "react-dom": "^18.2.0"
- },
- "devDependencies": {
- "@types/react": "^18.0.26",
- "@types/react-dom": "^18.0.9",
- "@vitejs/plugin-react-swc": "^3.0.0",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc/frontend/public/wails.png b/v3/internal/templates/react-swc/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/react-swc/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/react-swc/frontend/src/App.css b/v3/internal/templates/react-swc/frontend/src/App.css
deleted file mode 100644
index 2c5e2ef5cd1..00000000000
--- a/v3/internal/templates/react-swc/frontend/src/App.css
+++ /dev/null
@@ -1,41 +0,0 @@
-#root {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-.logo {
- height: 6em;
- padding: 1.5em;
- will-change: filter;
-}
-.logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
-}
-.logo.react:hover {
- filter: drop-shadow(0 0 2em #61dafbaa);
-}
-
-@keyframes logo-spin {
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
-}
-
-@media (prefers-reduced-motion: no-preference) {
- a:nth-of-type(2) .logo {
- animation: logo-spin infinite 20s linear;
- }
-}
-
-.card {
- padding: 2em;
-}
-
-.read-the-docs {
- color: #888;
-}
diff --git a/v3/internal/templates/react-swc/frontend/src/App.jsx b/v3/internal/templates/react-swc/frontend/src/App.jsx
deleted file mode 100644
index ef0adc0d53e..00000000000
--- a/v3/internal/templates/react-swc/frontend/src/App.jsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { useState } from 'react'
-import reactLogo from './assets/react.svg'
-import './App.css'
-
-function App() {
- const [count, setCount] = useState(0)
-
- return (
-
-
-
Vite + React
-
-
setCount((count) => count + 1)}>
- count is {count}
-
-
- Edit src/App.jsx
and save to test HMR
-
-
-
- Click on the Vite and React logos to learn more
-
-
- )
-}
-
-export default App
diff --git a/v3/internal/templates/react-swc/frontend/src/assets/react.svg b/v3/internal/templates/react-swc/frontend/src/assets/react.svg
deleted file mode 100644
index 6c87de9bb33..00000000000
--- a/v3/internal/templates/react-swc/frontend/src/assets/react.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/react-swc/frontend/src/index.css b/v3/internal/templates/react-swc/frontend/src/index.css
deleted file mode 100644
index 917888c1d11..00000000000
--- a/v3/internal/templates/react-swc/frontend/src/index.css
+++ /dev/null
@@ -1,70 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/react-swc/frontend/src/main.jsx b/v3/internal/templates/react-swc/frontend/src/main.jsx
deleted file mode 100644
index 5cc599199a2..00000000000
--- a/v3/internal/templates/react-swc/frontend/src/main.jsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import React from 'react'
-import ReactDOM from 'react-dom/client'
-import App from './App'
-import './index.css'
-
-ReactDOM.createRoot(document.getElementById('root')).render(
-
-
- ,
-)
diff --git a/v3/internal/templates/react-swc/frontend/vite.config.js b/v3/internal/templates/react-swc/frontend/vite.config.js
deleted file mode 100644
index 861b04b3560..00000000000
--- a/v3/internal/templates/react-swc/frontend/vite.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vite'
-import react from '@vitejs/plugin-react-swc'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [react()],
-})
diff --git a/v3/internal/templates/react-swc/go.mod.tmpl b/v3/internal/templates/react-swc/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/react-swc/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/react-swc/go.sum.tmpl b/v3/internal/templates/react-swc/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/react-swc/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/react-swc/main.go.tmpl b/v3/internal/templates/react-swc/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/react-swc/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/react-ts/Taskfile.tmpl.yml b/v3/internal/templates/react-ts/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/react-ts/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/react-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/react-ts/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/react-ts/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/react-ts/build/Info.plist.tmpl b/v3/internal/templates/react-ts/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/react-ts/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/react-ts/build/appicon.png b/v3/internal/templates/react-ts/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/react-ts/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/react-ts/build/icons.icns b/v3/internal/templates/react-ts/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/react-ts/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/react-ts/frontend/.gitignore b/v3/internal/templates/react-ts/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/react-ts/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/react-ts/frontend/index.html b/v3/internal/templates/react-ts/frontend/index.html
deleted file mode 100644
index 28868c572e5..00000000000
--- a/v3/internal/templates/react-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + React + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/react-ts/frontend/package.json b/v3/internal/templates/react-ts/frontend/package.json
deleted file mode 100644
index e846a02c1bc..00000000000
--- a/v3/internal/templates/react-ts/frontend/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "tsc && vite build",
- "preview": "vite preview"
- },
- "dependencies": {
- "react": "^18.2.0",
- "react-dom": "^18.2.0"
- },
- "devDependencies": {
- "@types/react": "^18.0.26",
- "@types/react-dom": "^18.0.9",
- "@vitejs/plugin-react": "^3.0.0",
- "typescript": "^4.9.3",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/react-ts/frontend/public/wails.png b/v3/internal/templates/react-ts/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/react-ts/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/react-ts/frontend/src/App.css b/v3/internal/templates/react-ts/frontend/src/App.css
deleted file mode 100644
index 2c5e2ef5cd1..00000000000
--- a/v3/internal/templates/react-ts/frontend/src/App.css
+++ /dev/null
@@ -1,41 +0,0 @@
-#root {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-.logo {
- height: 6em;
- padding: 1.5em;
- will-change: filter;
-}
-.logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
-}
-.logo.react:hover {
- filter: drop-shadow(0 0 2em #61dafbaa);
-}
-
-@keyframes logo-spin {
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
-}
-
-@media (prefers-reduced-motion: no-preference) {
- a:nth-of-type(2) .logo {
- animation: logo-spin infinite 20s linear;
- }
-}
-
-.card {
- padding: 2em;
-}
-
-.read-the-docs {
- color: #888;
-}
diff --git a/v3/internal/templates/react-ts/frontend/src/App.tsx b/v3/internal/templates/react-ts/frontend/src/App.tsx
deleted file mode 100644
index cd201360b42..00000000000
--- a/v3/internal/templates/react-ts/frontend/src/App.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { useState } from 'react'
-import reactLogo from './assets/react.svg'
-import './App.css'
-
-function App() {
- const [count, setCount] = useState(0)
-
- return (
-
-
-
Vite + React
-
-
setCount((count) => count + 1)}>
- count is {count}
-
-
- Edit src/App.tsx
and save to test HMR
-
-
-
- Click on the Vite and React logos to learn more
-
-
- )
-}
-
-export default App
diff --git a/v3/internal/templates/react-ts/frontend/src/assets/react.svg b/v3/internal/templates/react-ts/frontend/src/assets/react.svg
deleted file mode 100644
index 6c87de9bb33..00000000000
--- a/v3/internal/templates/react-ts/frontend/src/assets/react.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/react-ts/frontend/src/index.css b/v3/internal/templates/react-ts/frontend/src/index.css
deleted file mode 100644
index 917888c1d11..00000000000
--- a/v3/internal/templates/react-ts/frontend/src/index.css
+++ /dev/null
@@ -1,70 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/react-ts/frontend/src/main.tsx b/v3/internal/templates/react-ts/frontend/src/main.tsx
deleted file mode 100644
index 791f139e242..00000000000
--- a/v3/internal/templates/react-ts/frontend/src/main.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import React from 'react'
-import ReactDOM from 'react-dom/client'
-import App from './App'
-import './index.css'
-
-ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
-
-
- ,
-)
diff --git a/v3/internal/templates/react-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/react-ts/frontend/src/vite-env.d.ts
deleted file mode 100644
index 11f02fe2a00..00000000000
--- a/v3/internal/templates/react-ts/frontend/src/vite-env.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-///
diff --git a/v3/internal/templates/react-ts/frontend/tsconfig.json b/v3/internal/templates/react-ts/frontend/tsconfig.json
deleted file mode 100644
index 3d0a51a86e2..00000000000
--- a/v3/internal/templates/react-ts/frontend/tsconfig.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "compilerOptions": {
- "target": "ESNext",
- "useDefineForClassFields": true,
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
- "allowJs": false,
- "skipLibCheck": true,
- "esModuleInterop": false,
- "allowSyntheticDefaultImports": true,
- "strict": true,
- "forceConsistentCasingInFileNames": true,
- "module": "ESNext",
- "moduleResolution": "Node",
- "resolveJsonModule": true,
- "isolatedModules": true,
- "noEmit": true,
- "jsx": "react-jsx"
- },
- "include": ["src"],
- "references": [{ "path": "./tsconfig.node.json" }]
-}
diff --git a/v3/internal/templates/react-ts/frontend/tsconfig.node.json b/v3/internal/templates/react-ts/frontend/tsconfig.node.json
deleted file mode 100644
index 9d31e2aed93..00000000000
--- a/v3/internal/templates/react-ts/frontend/tsconfig.node.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "module": "ESNext",
- "moduleResolution": "Node",
- "allowSyntheticDefaultImports": true
- },
- "include": ["vite.config.ts"]
-}
diff --git a/v3/internal/templates/react-ts/frontend/vite.config.ts b/v3/internal/templates/react-ts/frontend/vite.config.ts
deleted file mode 100644
index 5a33944a9b4..00000000000
--- a/v3/internal/templates/react-ts/frontend/vite.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vite'
-import react from '@vitejs/plugin-react'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [react()],
-})
diff --git a/v3/internal/templates/react-ts/go.mod.tmpl b/v3/internal/templates/react-ts/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/react-ts/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/react-ts/go.sum.tmpl b/v3/internal/templates/react-ts/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/react-ts/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/react-ts/main.go.tmpl b/v3/internal/templates/react-ts/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/react-ts/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/react/Taskfile.tmpl.yml b/v3/internal/templates/react/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/react/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/react/build/Info.dev.plist.tmpl b/v3/internal/templates/react/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/react/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/react/build/Info.plist.tmpl b/v3/internal/templates/react/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/react/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/react/build/appicon.png b/v3/internal/templates/react/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/react/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/react/build/icons.icns b/v3/internal/templates/react/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/react/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/react/frontend/.gitignore b/v3/internal/templates/react/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/react/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/react/frontend/index.html b/v3/internal/templates/react/frontend/index.html
deleted file mode 100644
index fe5530dd4ee..00000000000
--- a/v3/internal/templates/react/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + React
-
-
-
-
-
-
diff --git a/v3/internal/templates/react/frontend/package.json b/v3/internal/templates/react/frontend/package.json
deleted file mode 100644
index 2371d17c8d5..00000000000
--- a/v3/internal/templates/react/frontend/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "vite build",
- "preview": "vite preview"
- },
- "dependencies": {
- "react": "^18.2.0",
- "react-dom": "^18.2.0"
- },
- "devDependencies": {
- "@types/react": "^18.0.26",
- "@types/react-dom": "^18.0.9",
- "@vitejs/plugin-react": "^3.0.0",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/react/frontend/public/wails.png b/v3/internal/templates/react/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/react/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/react/frontend/src/App.css b/v3/internal/templates/react/frontend/src/App.css
deleted file mode 100644
index 2c5e2ef5cd1..00000000000
--- a/v3/internal/templates/react/frontend/src/App.css
+++ /dev/null
@@ -1,41 +0,0 @@
-#root {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-.logo {
- height: 6em;
- padding: 1.5em;
- will-change: filter;
-}
-.logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
-}
-.logo.react:hover {
- filter: drop-shadow(0 0 2em #61dafbaa);
-}
-
-@keyframes logo-spin {
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
-}
-
-@media (prefers-reduced-motion: no-preference) {
- a:nth-of-type(2) .logo {
- animation: logo-spin infinite 20s linear;
- }
-}
-
-.card {
- padding: 2em;
-}
-
-.read-the-docs {
- color: #888;
-}
diff --git a/v3/internal/templates/react/frontend/src/App.jsx b/v3/internal/templates/react/frontend/src/App.jsx
deleted file mode 100644
index ef0adc0d53e..00000000000
--- a/v3/internal/templates/react/frontend/src/App.jsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { useState } from 'react'
-import reactLogo from './assets/react.svg'
-import './App.css'
-
-function App() {
- const [count, setCount] = useState(0)
-
- return (
-
-
-
Vite + React
-
-
setCount((count) => count + 1)}>
- count is {count}
-
-
- Edit src/App.jsx
and save to test HMR
-
-
-
- Click on the Vite and React logos to learn more
-
-
- )
-}
-
-export default App
diff --git a/v3/internal/templates/react/frontend/src/assets/react.svg b/v3/internal/templates/react/frontend/src/assets/react.svg
deleted file mode 100644
index 6c87de9bb33..00000000000
--- a/v3/internal/templates/react/frontend/src/assets/react.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/react/frontend/src/index.css b/v3/internal/templates/react/frontend/src/index.css
deleted file mode 100644
index 917888c1d11..00000000000
--- a/v3/internal/templates/react/frontend/src/index.css
+++ /dev/null
@@ -1,70 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/react/frontend/src/main.jsx b/v3/internal/templates/react/frontend/src/main.jsx
deleted file mode 100644
index 5cc599199a2..00000000000
--- a/v3/internal/templates/react/frontend/src/main.jsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import React from 'react'
-import ReactDOM from 'react-dom/client'
-import App from './App'
-import './index.css'
-
-ReactDOM.createRoot(document.getElementById('root')).render(
-
-
- ,
-)
diff --git a/v3/internal/templates/react/frontend/vite.config.js b/v3/internal/templates/react/frontend/vite.config.js
deleted file mode 100644
index 5a33944a9b4..00000000000
--- a/v3/internal/templates/react/frontend/vite.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vite'
-import react from '@vitejs/plugin-react'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [react()],
-})
diff --git a/v3/internal/templates/react/go.mod.tmpl b/v3/internal/templates/react/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/react/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/react/go.sum.tmpl b/v3/internal/templates/react/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/react/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/react/main.go.tmpl b/v3/internal/templates/react/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/react/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml b/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/svelte-ts/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/svelte-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/svelte-ts/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/svelte-ts/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/svelte-ts/build/Info.plist.tmpl b/v3/internal/templates/svelte-ts/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/svelte-ts/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/svelte-ts/build/appicon.png b/v3/internal/templates/svelte-ts/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/svelte-ts/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/svelte-ts/build/icons.icns b/v3/internal/templates/svelte-ts/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/svelte-ts/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/svelte-ts/frontend/.gitignore b/v3/internal/templates/svelte-ts/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/svelte-ts/frontend/.vscode/extensions.json b/v3/internal/templates/svelte-ts/frontend/.vscode/extensions.json
deleted file mode 100644
index bdef8201513..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/.vscode/extensions.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "recommendations": ["svelte.svelte-vscode"]
-}
diff --git a/v3/internal/templates/svelte-ts/frontend/README.md b/v3/internal/templates/svelte-ts/frontend/README.md
deleted file mode 100644
index e6cd94fce77..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Svelte + TS + Vite
-
-This template should help get you started developing with Svelte and TypeScript in Vite.
-
-## Recommended IDE Setup
-
-[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
-
-## Need an official Svelte framework?
-
-Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
-
-## Technical considerations
-
-**Why use this over SvelteKit?**
-
-- It brings its own routing solution which might not be preferable for some users.
-- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
-
-This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
-
-Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
-
-**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
-
-Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
-
-**Why include `.vscode/extensions.json`?**
-
-Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.
-
-**Why enable `allowJs` in the TS template?**
-
-While `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.
-
-**Why is HMR not preserving my local component state?**
-
-HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
-
-If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.
-
-```ts
-// store.ts
-// An extremely simple external store
-import { writable } from 'svelte/store'
-export default writable(0)
-```
diff --git a/v3/internal/templates/svelte-ts/frontend/index.html b/v3/internal/templates/svelte-ts/frontend/index.html
deleted file mode 100644
index a7eaac78d27..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Svelte + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/svelte-ts/frontend/package.json b/v3/internal/templates/svelte-ts/frontend/package.json
deleted file mode 100644
index 222683e0d92..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "vite build",
- "preview": "vite preview",
- "check": "svelte-check --tsconfig ./tsconfig.json"
- },
- "devDependencies": {
- "@sveltejs/vite-plugin-svelte": "^2.0.0",
- "@tsconfig/svelte": "^3.0.0",
- "svelte": "^3.54.0",
- "svelte-check": "^2.10.0",
- "tslib": "^2.4.1",
- "typescript": "^4.9.3",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/svelte-ts/frontend/public/wails.png b/v3/internal/templates/svelte-ts/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/svelte-ts/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/svelte-ts/frontend/src/App.svelte b/v3/internal/templates/svelte-ts/frontend/src/App.svelte
deleted file mode 100644
index 1e9dc039494..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/src/App.svelte
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
- Vite + Svelte
-
-
-
-
-
-
- Check out SvelteKit , the official Svelte app framework powered by Vite!
-
-
-
- Click on the Vite and Svelte logos to learn more
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/svelte-ts/frontend/src/app.css b/v3/internal/templates/svelte-ts/frontend/src/app.css
deleted file mode 100644
index bcc7233dd1c..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/src/app.css
+++ /dev/null
@@ -1,81 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-.card {
- padding: 2em;
-}
-
-#app {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/svelte-ts/frontend/src/assets/svelte.svg b/v3/internal/templates/svelte-ts/frontend/src/assets/svelte.svg
deleted file mode 100644
index c5e08481f8a..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/src/assets/svelte.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/svelte-ts/frontend/src/lib/Counter.svelte b/v3/internal/templates/svelte-ts/frontend/src/lib/Counter.svelte
deleted file mode 100644
index 979b4dfc91c..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/src/lib/Counter.svelte
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- count is {count}
-
diff --git a/v3/internal/templates/svelte-ts/frontend/src/main.ts b/v3/internal/templates/svelte-ts/frontend/src/main.ts
deleted file mode 100644
index 8a909a15a0e..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/src/main.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import './app.css'
-import App from './App.svelte'
-
-const app = new App({
- target: document.getElementById('app'),
-})
-
-export default app
diff --git a/v3/internal/templates/svelte-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/svelte-ts/frontend/src/vite-env.d.ts
deleted file mode 100644
index 4078e7476a2..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/src/vite-env.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-///
-///
diff --git a/v3/internal/templates/svelte-ts/frontend/svelte.config.js b/v3/internal/templates/svelte-ts/frontend/svelte.config.js
deleted file mode 100644
index 7a2b764a634..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/svelte.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { wailsPreprocess } from '@sveltejs/wails-plugin-svelte'
-
-export default {
- // Consult https://svelte.dev/docs#compile-time-svelte-preprocess
- // for more information about preprocessors
- preprocess: wailsPreprocess(),
-}
diff --git a/v3/internal/templates/svelte-ts/frontend/tsconfig.json b/v3/internal/templates/svelte-ts/frontend/tsconfig.json
deleted file mode 100644
index c4e1c5fe6e7..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/tsconfig.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extends": "@tsconfig/svelte/tsconfig.json",
- "compilerOptions": {
- "target": "ESNext",
- "useDefineForClassFields": true,
- "module": "ESNext",
- "resolveJsonModule": true,
- /**
- * Typecheck JS in `.svelte` and `.js` files by default.
- * Disable checkJs if you'd like to use dynamic types in JS.
- * Note that setting allowJs false does not prevent the use
- * of JS in `.svelte` files.
- */
- "allowJs": true,
- "checkJs": true,
- "isolatedModules": true
- },
- "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],
- "references": [{ "path": "./tsconfig.node.json" }]
-}
diff --git a/v3/internal/templates/svelte-ts/frontend/tsconfig.node.json b/v3/internal/templates/svelte-ts/frontend/tsconfig.node.json
deleted file mode 100644
index 65dbdb96ae5..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/tsconfig.node.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "module": "ESNext",
- "moduleResolution": "Node"
- },
- "include": ["vite.config.ts"]
-}
diff --git a/v3/internal/templates/svelte-ts/frontend/vite.config.ts b/v3/internal/templates/svelte-ts/frontend/vite.config.ts
deleted file mode 100644
index d70196943d0..00000000000
--- a/v3/internal/templates/svelte-ts/frontend/vite.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vite'
-import { svelte } from '@sveltejs/vite-plugin-svelte'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [svelte()],
-})
diff --git a/v3/internal/templates/svelte-ts/go.mod.tmpl b/v3/internal/templates/svelte-ts/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/svelte-ts/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/svelte-ts/go.sum.tmpl b/v3/internal/templates/svelte-ts/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/svelte-ts/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/svelte-ts/main.go.tmpl b/v3/internal/templates/svelte-ts/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/svelte-ts/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/svelte/Taskfile.tmpl.yml b/v3/internal/templates/svelte/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/svelte/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/svelte/build/Info.dev.plist.tmpl b/v3/internal/templates/svelte/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/svelte/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/svelte/build/Info.plist.tmpl b/v3/internal/templates/svelte/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/svelte/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/svelte/build/appicon.png b/v3/internal/templates/svelte/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/svelte/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/svelte/build/icons.icns b/v3/internal/templates/svelte/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/svelte/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/svelte/frontend/.gitignore b/v3/internal/templates/svelte/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/svelte/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/svelte/frontend/.vscode/extensions.json b/v3/internal/templates/svelte/frontend/.vscode/extensions.json
deleted file mode 100644
index bdef8201513..00000000000
--- a/v3/internal/templates/svelte/frontend/.vscode/extensions.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "recommendations": ["svelte.svelte-vscode"]
-}
diff --git a/v3/internal/templates/svelte/frontend/README.md b/v3/internal/templates/svelte/frontend/README.md
deleted file mode 100644
index fd6a7082f7e..00000000000
--- a/v3/internal/templates/svelte/frontend/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# Wails + Svelte
\ No newline at end of file
diff --git a/v3/internal/templates/svelte/frontend/index.html b/v3/internal/templates/svelte/frontend/index.html
deleted file mode 100644
index 1ea50f90458..00000000000
--- a/v3/internal/templates/svelte/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + Svelte
-
-
-
-
-
-
diff --git a/v3/internal/templates/svelte/frontend/jsconfig.json b/v3/internal/templates/svelte/frontend/jsconfig.json
deleted file mode 100644
index e596c582326..00000000000
--- a/v3/internal/templates/svelte/frontend/jsconfig.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "compilerOptions": {
- "moduleResolution": "Node",
- "target": "ESNext",
- "module": "ESNext",
- /**
- * svelte-preprocess cannot figure out whether you have
- * a value or a type, so tell TypeScript to enforce using
- * `import type` instead of `import` for Types.
- */
- "importsNotUsedAsValues": "error",
- "isolatedModules": true,
- "resolveJsonModule": true,
- /**
- * To have warnings / errors of the Svelte compiler at the
- * correct position, enable source maps by default.
- */
- "sourceMap": true,
- "esModuleInterop": true,
- "skipLibCheck": true,
- "forceConsistentCasingInFileNames": true,
- /**
- * Typecheck JS in `.svelte` and `.js` files by default.
- * Disable this if you'd like to use dynamic types.
- */
- "checkJs": true
- },
- /**
- * Use global.d.ts instead of compilerOptions.types
- * to avoid limiting type declarations.
- */
- "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
-}
diff --git a/v3/internal/templates/svelte/frontend/package.json b/v3/internal/templates/svelte/frontend/package.json
deleted file mode 100644
index 2e166feea3f..00000000000
--- a/v3/internal/templates/svelte/frontend/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "vite build",
- "preview": "vite preview"
- },
- "devDependencies": {
- "@sveltejs/vite-plugin-svelte": "^2.0.0",
- "svelte": "^3.54.0",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/svelte/frontend/public/wails.png b/v3/internal/templates/svelte/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/svelte/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/svelte/frontend/src/App.svelte b/v3/internal/templates/svelte/frontend/src/App.svelte
deleted file mode 100644
index 539c395dd9d..00000000000
--- a/v3/internal/templates/svelte/frontend/src/App.svelte
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
- Wails + Svelte
-
-
-
-
-
-
- Check out SvelteKit , the official Svelte app framework powered by Vite!
-
-
-
- Click on the Wails and Svelte logos to learn more
-
-
-
-
diff --git a/v3/internal/templates/svelte/frontend/src/app.css b/v3/internal/templates/svelte/frontend/src/app.css
deleted file mode 100644
index bcc7233dd1c..00000000000
--- a/v3/internal/templates/svelte/frontend/src/app.css
+++ /dev/null
@@ -1,81 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-.card {
- padding: 2em;
-}
-
-#app {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/svelte/frontend/src/assets/svelte.svg b/v3/internal/templates/svelte/frontend/src/assets/svelte.svg
deleted file mode 100644
index c5e08481f8a..00000000000
--- a/v3/internal/templates/svelte/frontend/src/assets/svelte.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/svelte/frontend/src/lib/Counter.svelte b/v3/internal/templates/svelte/frontend/src/lib/Counter.svelte
deleted file mode 100644
index e45f9031097..00000000000
--- a/v3/internal/templates/svelte/frontend/src/lib/Counter.svelte
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- count is {count}
-
diff --git a/v3/internal/templates/svelte/frontend/src/main.js b/v3/internal/templates/svelte/frontend/src/main.js
deleted file mode 100644
index 8a909a15a0e..00000000000
--- a/v3/internal/templates/svelte/frontend/src/main.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import './app.css'
-import App from './App.svelte'
-
-const app = new App({
- target: document.getElementById('app'),
-})
-
-export default app
diff --git a/v3/internal/templates/svelte/frontend/src/vite-env.d.ts b/v3/internal/templates/svelte/frontend/src/vite-env.d.ts
deleted file mode 100644
index 4078e7476a2..00000000000
--- a/v3/internal/templates/svelte/frontend/src/vite-env.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-///
-///
diff --git a/v3/internal/templates/svelte/frontend/vite.config.js b/v3/internal/templates/svelte/frontend/vite.config.js
deleted file mode 100644
index d70196943d0..00000000000
--- a/v3/internal/templates/svelte/frontend/vite.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vite'
-import { svelte } from '@sveltejs/vite-plugin-svelte'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [svelte()],
-})
diff --git a/v3/internal/templates/svelte/go.mod.tmpl b/v3/internal/templates/svelte/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/svelte/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/svelte/go.sum.tmpl b/v3/internal/templates/svelte/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/svelte/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/svelte/main.go.tmpl b/v3/internal/templates/svelte/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/svelte/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/templates.go b/v3/internal/templates/templates.go
deleted file mode 100644
index e0da5a48b6f..00000000000
--- a/v3/internal/templates/templates.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package templates
-
-import (
- "embed"
- "fmt"
- "github.com/wailsapp/wails/v3/internal/debug"
- "io/fs"
- "os"
-
- "github.com/wailsapp/wails/v3/internal/flags"
-
- "github.com/leaanthony/gosod"
-
- "github.com/samber/lo"
-)
-
-//go:embed lit
-var lit embed.FS
-
-//go:embed lit-ts
-var litTS embed.FS
-
-//go:embed vue
-var vue embed.FS
-
-//go:embed vue-ts
-var vueTS embed.FS
-
-//go:embed react
-var react embed.FS
-
-//go:embed react-ts
-var reactTS embed.FS
-
-//go:embed react-swc
-var reactSWC embed.FS
-
-//go:embed react-swc-ts
-var reactSWCTS embed.FS
-
-//go:embed svelte
-var svelte embed.FS
-
-//go:embed svelte-ts
-var svelteTS embed.FS
-
-//go:embed preact
-var preact embed.FS
-
-//go:embed preact-ts
-var preactTS embed.FS
-
-//go:embed vanilla
-var vanilla embed.FS
-
-//go:embed vanilla-ts
-var vanillaTS embed.FS
-
-type TemplateData struct {
- Name string
- Description string
- FS embed.FS
-}
-
-var defaultTemplates = []TemplateData{
- {
- Name: "lit",
- Description: "Template using Lit Web Components: https://lit.dev",
- FS: lit,
- },
- {
- Name: "lit-ts",
- Description: "Template using Lit Web Components (TypeScript) : https://lit.dev",
- FS: litTS,
- },
- {
- Name: "vue",
- Description: "Template using Vue: https://vuejs.org",
- FS: vue,
- },
- {
- Name: "vue-ts",
- Description: "Template using Vue (TypeScript): https://vuejs.org",
- FS: vueTS,
- },
- {
- Name: "react",
- Description: "Template using React: https://reactjs.org",
- FS: react,
- },
- {
- Name: "react-ts",
- Description: "Template using React (TypeScript): https://reactjs.org",
- FS: reactTS,
- },
- {
- Name: "react-swc",
- Description: "Template using React with SWC: https://reactjs.org & https://swc.rs",
- FS: reactSWC,
- },
- {
- Name: "react-swc-ts",
- Description: "Template using React with SWC (TypeScript): https://reactjs.org & https://swc.rs",
- FS: reactSWCTS,
- },
- {
- Name: "svelte",
- Description: "Template using Svelte: https://svelte.dev",
- FS: svelte,
- },
- {
- Name: "svelte-ts",
- Description: "Template using Svelte (TypeScript): https://svelte.dev",
- FS: svelteTS,
- },
- {
- Name: "preact",
- Description: "Template using Preact: https://preactjs.com",
- FS: preact,
- },
- {
- Name: "preact-ts",
- Description: "Template using Preact (TypeScript): https://preactjs.com",
- FS: preactTS,
- },
- {
- Name: "vanilla",
- Description: "Template using Vanilla JS",
- FS: vanilla,
- },
- {
- Name: "vanilla-ts",
- Description: "Template using Vanilla JS (TypeScript)",
- FS: vanillaTS,
- },
-}
-
-func ValidTemplateName(name string) bool {
- return lo.ContainsBy(defaultTemplates, func(template TemplateData) bool {
- return template.Name == name
- })
-}
-
-func GetDefaultTemplates() []TemplateData {
- return defaultTemplates
-}
-
-type TemplateOptions struct {
- *flags.Init
- LocalModulePath string
-}
-
-func Install(options *flags.Init) error {
-
- templateData := TemplateOptions{
- options,
- debug.LocalModulePath,
- }
- template, found := lo.Find(defaultTemplates, func(template TemplateData) bool {
- return template.Name == options.TemplateName
- })
- if !found {
- return fmt.Errorf("template '%s' not found", options.TemplateName)
- }
-
- if options.ProjectDir == "." || options.ProjectDir == "" {
- templateData.ProjectDir = lo.Must(os.Getwd())
- }
- templateData.ProjectDir = fmt.Sprintf("%s/%s", options.ProjectDir, options.ProjectName)
- fmt.Printf("Installing template '%s' into '%s'\n", options.TemplateName, options.ProjectDir)
- tfs, err := fs.Sub(template.FS, options.TemplateName)
- if err != nil {
- return err
- }
-
- return gosod.New(tfs).Extract(options.ProjectDir, templateData)
-}
diff --git a/v3/internal/templates/templates_test.go b/v3/internal/templates/templates_test.go
deleted file mode 100644
index 25fa790b5d4..00000000000
--- a/v3/internal/templates/templates_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package templates
-
-import (
- "testing"
-
- "github.com/wailsapp/wails/v3/internal/flags"
-)
-
-func TestInstall(t *testing.T) {
- type args struct {
- }
- tests := []struct {
- name string
- options *flags.Init
- wantErr bool
- }{
- {
- name: "should install template",
- options: &flags.Init{
- ProjectName: "test",
- TemplateName: "svelte",
- Quiet: false,
- },
- wantErr: false,
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if err := Install(tt.options); (err != nil) != tt.wantErr {
- t.Errorf("Install() error = %v, wantErr %v", err, tt.wantErr)
- }
- })
- }
-}
diff --git a/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml b/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/vanilla-ts/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/vanilla-ts/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/vanilla-ts/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla-ts/build/Info.plist.tmpl b/v3/internal/templates/vanilla-ts/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/vanilla-ts/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla-ts/build/appicon.png b/v3/internal/templates/vanilla-ts/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/vanilla-ts/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/vanilla-ts/build/icons.icns b/v3/internal/templates/vanilla-ts/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/vanilla-ts/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/vanilla-ts/frontend/.gitignore b/v3/internal/templates/vanilla-ts/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/vanilla-ts/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/vanilla-ts/frontend/index.html b/v3/internal/templates/vanilla-ts/frontend/index.html
deleted file mode 100644
index 3da9b491840..00000000000
--- a/v3/internal/templates/vanilla-ts/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails + TS
-
-
-
-
-
-
diff --git a/v3/internal/templates/vanilla-ts/frontend/package.json b/v3/internal/templates/vanilla-ts/frontend/package.json
deleted file mode 100644
index fddd59a6c46..00000000000
--- a/v3/internal/templates/vanilla-ts/frontend/package.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "tsc && vite build",
- "preview": "vite preview"
- },
- "devDependencies": {
- "typescript": "^4.9.3",
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla-ts/frontend/public/wails.png b/v3/internal/templates/vanilla-ts/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/vanilla-ts/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/vanilla-ts/frontend/src/counter.ts b/v3/internal/templates/vanilla-ts/frontend/src/counter.ts
deleted file mode 100644
index 09e5afd2d8a..00000000000
--- a/v3/internal/templates/vanilla-ts/frontend/src/counter.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export function setupCounter(element: HTMLButtonElement) {
- let counter = 0
- const setCounter = (count: number) => {
- counter = count
- element.innerHTML = `count is ${counter}`
- }
- element.addEventListener('click', () => setCounter(counter + 1))
- setCounter(0)
-}
diff --git a/v3/internal/templates/vanilla-ts/frontend/src/main.ts b/v3/internal/templates/vanilla-ts/frontend/src/main.ts
deleted file mode 100644
index b386148ad86..00000000000
--- a/v3/internal/templates/vanilla-ts/frontend/src/main.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import './style.css'
-import typescriptLogo from './typescript.svg'
-import { setupCounter } from './counter'
-
-document.querySelector('#app')!.innerHTML = `
-
-
-
-
-
-
-
-
Wails + TypeScript
-
-
-
-
- Click on the Wails and TypeScript logos to learn more
-
-
-`
-
-setupCounter(document.querySelector('#counter')!)
diff --git a/v3/internal/templates/vanilla-ts/frontend/src/style.css b/v3/internal/templates/vanilla-ts/frontend/src/style.css
deleted file mode 100644
index ac37d84b935..00000000000
--- a/v3/internal/templates/vanilla-ts/frontend/src/style.css
+++ /dev/null
@@ -1,97 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-#app {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-.logo {
- height: 6em;
- padding: 1.5em;
- will-change: filter;
-}
-.logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
-}
-.logo.vanilla:hover {
- filter: drop-shadow(0 0 2em #3178c6aa);
-}
-
-.card {
- padding: 2em;
-}
-
-.read-the-docs {
- color: #888;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/vanilla-ts/frontend/src/typescript.svg b/v3/internal/templates/vanilla-ts/frontend/src/typescript.svg
deleted file mode 100644
index d91c910cc30..00000000000
--- a/v3/internal/templates/vanilla-ts/frontend/src/typescript.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/vanilla-ts/frontend/src/vite-env.d.ts
deleted file mode 100644
index 11f02fe2a00..00000000000
--- a/v3/internal/templates/vanilla-ts/frontend/src/vite-env.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-///
diff --git a/v3/internal/templates/vanilla-ts/frontend/tsconfig.json b/v3/internal/templates/vanilla-ts/frontend/tsconfig.json
deleted file mode 100644
index eac16d14a6f..00000000000
--- a/v3/internal/templates/vanilla-ts/frontend/tsconfig.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "compilerOptions": {
- "target": "ESNext",
- "useDefineForClassFields": true,
- "module": "ESNext",
- "lib": ["ESNext", "DOM"],
- "moduleResolution": "Node",
- "strict": true,
- "resolveJsonModule": true,
- "isolatedModules": true,
- "esModuleInterop": true,
- "noEmit": true,
- "noUnusedLocals": true,
- "noUnusedParameters": true,
- "noImplicitReturns": true,
- "skipLibCheck": true
- },
- "include": ["src"]
-}
diff --git a/v3/internal/templates/vanilla-ts/go.mod.tmpl b/v3/internal/templates/vanilla-ts/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/vanilla-ts/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/vanilla-ts/go.sum.tmpl b/v3/internal/templates/vanilla-ts/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/vanilla-ts/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/vanilla-ts/main.go.tmpl b/v3/internal/templates/vanilla-ts/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/vanilla-ts/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/vanilla/Taskfile.tmpl.yml b/v3/internal/templates/vanilla/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/vanilla/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla/build/Info.dev.plist.tmpl b/v3/internal/templates/vanilla/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/vanilla/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla/build/Info.plist.tmpl b/v3/internal/templates/vanilla/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/vanilla/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla/build/appicon.png b/v3/internal/templates/vanilla/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/vanilla/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/vanilla/build/icons.icns b/v3/internal/templates/vanilla/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/vanilla/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/vanilla/frontend/.gitignore b/v3/internal/templates/vanilla/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/vanilla/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/vanilla/frontend/counter.js b/v3/internal/templates/vanilla/frontend/counter.js
deleted file mode 100644
index 881e2d7adf5..00000000000
--- a/v3/internal/templates/vanilla/frontend/counter.js
+++ /dev/null
@@ -1,9 +0,0 @@
-export function setupCounter(element) {
- let counter = 0
- const setCounter = (count) => {
- counter = count
- element.innerHTML = `count is ${counter}`
- }
- element.addEventListener('click', () => setCounter(counter + 1))
- setCounter(0)
-}
diff --git a/v3/internal/templates/vanilla/frontend/index.html b/v3/internal/templates/vanilla/frontend/index.html
deleted file mode 100644
index a13d6248755..00000000000
--- a/v3/internal/templates/vanilla/frontend/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Wails App
-
-
-
-
-
-
diff --git a/v3/internal/templates/vanilla/frontend/javascript.svg b/v3/internal/templates/vanilla/frontend/javascript.svg
deleted file mode 100644
index f9abb2b728d..00000000000
--- a/v3/internal/templates/vanilla/frontend/javascript.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla/frontend/main.js b/v3/internal/templates/vanilla/frontend/main.js
deleted file mode 100644
index 5a926e5b848..00000000000
--- a/v3/internal/templates/vanilla/frontend/main.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import './style.css'
-import javascriptLogo from './javascript.svg'
-import { setupCounter } from './counter.js'
-
-document.querySelector('#app').innerHTML = `
-
-
-
-
-
-
-
-
Hello Wails!
-
-
-
-
- Click on the Wails logo to learn more
-
-
-`
-
-setupCounter(document.querySelector('#counter'))
diff --git a/v3/internal/templates/vanilla/frontend/package.json b/v3/internal/templates/vanilla/frontend/package.json
deleted file mode 100644
index 63288c9ef91..00000000000
--- a/v3/internal/templates/vanilla/frontend/package.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "vite build",
- "preview": "vite preview"
- },
- "devDependencies": {
- "vite": "^4.0.0"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/vanilla/frontend/public/wails.png b/v3/internal/templates/vanilla/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/vanilla/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/vanilla/frontend/style.css b/v3/internal/templates/vanilla/frontend/style.css
deleted file mode 100644
index 12320801d36..00000000000
--- a/v3/internal/templates/vanilla/frontend/style.css
+++ /dev/null
@@ -1,97 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-#app {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-.logo {
- height: 6em;
- padding: 1.5em;
- will-change: filter;
-}
-.logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
-}
-.logo.vanilla:hover {
- filter: drop-shadow(0 0 2em #f7df1eaa);
-}
-
-.card {
- padding: 2em;
-}
-
-.read-the-docs {
- color: #888;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/vanilla/go.mod.tmpl b/v3/internal/templates/vanilla/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/vanilla/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/vanilla/go.sum.tmpl b/v3/internal/templates/vanilla/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/vanilla/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/vanilla/main.go.tmpl b/v3/internal/templates/vanilla/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/vanilla/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/vue-ts/Taskfile.tmpl.yml b/v3/internal/templates/vue-ts/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/vue-ts/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/vue-ts/build/Info.dev.plist.tmpl b/v3/internal/templates/vue-ts/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/vue-ts/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/vue-ts/build/Info.plist.tmpl b/v3/internal/templates/vue-ts/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/vue-ts/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/vue-ts/build/appicon.png b/v3/internal/templates/vue-ts/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/vue-ts/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/vue-ts/build/icons.icns b/v3/internal/templates/vue-ts/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/vue-ts/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/vue-ts/frontend/.gitignore b/v3/internal/templates/vue-ts/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/vue-ts/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/vue-ts/frontend/.vscode/extensions.json b/v3/internal/templates/vue-ts/frontend/.vscode/extensions.json
deleted file mode 100644
index c0a6e5a4811..00000000000
--- a/v3/internal/templates/vue-ts/frontend/.vscode/extensions.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
-}
diff --git a/v3/internal/templates/vue-ts/frontend/README.md b/v3/internal/templates/vue-ts/frontend/README.md
deleted file mode 100644
index ef72fd52424..00000000000
--- a/v3/internal/templates/vue-ts/frontend/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Vue 3 + TypeScript + Vite
-
-This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `
-
-
diff --git a/v3/internal/templates/vue-ts/frontend/package.json b/v3/internal/templates/vue-ts/frontend/package.json
deleted file mode 100644
index 129f6aef7e3..00000000000
--- a/v3/internal/templates/vue-ts/frontend/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "frontend",
- "private": true,
- "version": "0.0.0",
- "type": "module",
- "scripts": {
- "dev": "vite",
- "build": "vue-tsc && vite build",
- "preview": "vite preview"
- },
- "dependencies": {
- "vue": "^3.2.45"
- },
- "devDependencies": {
- "@vitejs/plugin-vue": "^4.0.0",
- "typescript": "^4.9.3",
- "vite": "^4.0.0",
- "vue-tsc": "^1.0.11"
- }
-}
\ No newline at end of file
diff --git a/v3/internal/templates/vue-ts/frontend/public/wails.png b/v3/internal/templates/vue-ts/frontend/public/wails.png
deleted file mode 100644
index 8bdf424833b..00000000000
Binary files a/v3/internal/templates/vue-ts/frontend/public/wails.png and /dev/null differ
diff --git a/v3/internal/templates/vue-ts/frontend/src/App.vue b/v3/internal/templates/vue-ts/frontend/src/App.vue
deleted file mode 100644
index fb679f1d510..00000000000
--- a/v3/internal/templates/vue-ts/frontend/src/App.vue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/v3/internal/templates/vue-ts/frontend/src/assets/vue.svg b/v3/internal/templates/vue-ts/frontend/src/assets/vue.svg
deleted file mode 100644
index 770e9d333ee..00000000000
--- a/v3/internal/templates/vue-ts/frontend/src/assets/vue.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/v3/internal/templates/vue-ts/frontend/src/components/HelloWorld.vue b/v3/internal/templates/vue-ts/frontend/src/components/HelloWorld.vue
deleted file mode 100644
index 5230910336b..00000000000
--- a/v3/internal/templates/vue-ts/frontend/src/components/HelloWorld.vue
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
- {{ msg }}
-
-
-
count is {{ count }}
-
- Edit
- components/HelloWorld.vue
to test HMR
-
-
-
-
- Check out
- create-vue , the official Vue + Vite starter
-
-
- Install
- Volar
- in your IDE for a better DX
-
- Click on the Vite and Vue logos to learn more
-
-
-
diff --git a/v3/internal/templates/vue-ts/frontend/src/main.ts b/v3/internal/templates/vue-ts/frontend/src/main.ts
deleted file mode 100644
index 2425c0f745b..00000000000
--- a/v3/internal/templates/vue-ts/frontend/src/main.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { createApp } from 'vue'
-import './style.css'
-import App from './App.vue'
-
-createApp(App).mount('#app')
diff --git a/v3/internal/templates/vue-ts/frontend/src/style.css b/v3/internal/templates/vue-ts/frontend/src/style.css
deleted file mode 100644
index 0192f9aac98..00000000000
--- a/v3/internal/templates/vue-ts/frontend/src/style.css
+++ /dev/null
@@ -1,81 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-.card {
- padding: 2em;
-}
-
-#app {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/v3/internal/templates/vue-ts/frontend/src/vite-env.d.ts b/v3/internal/templates/vue-ts/frontend/src/vite-env.d.ts
deleted file mode 100644
index 11f02fe2a00..00000000000
--- a/v3/internal/templates/vue-ts/frontend/src/vite-env.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-///
diff --git a/v3/internal/templates/vue-ts/frontend/tsconfig.json b/v3/internal/templates/vue-ts/frontend/tsconfig.json
deleted file mode 100644
index b557c4047ca..00000000000
--- a/v3/internal/templates/vue-ts/frontend/tsconfig.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "compilerOptions": {
- "target": "ESNext",
- "useDefineForClassFields": true,
- "module": "ESNext",
- "moduleResolution": "Node",
- "strict": true,
- "jsx": "preserve",
- "resolveJsonModule": true,
- "isolatedModules": true,
- "esModuleInterop": true,
- "lib": ["ESNext", "DOM"],
- "skipLibCheck": true,
- "noEmit": true
- },
- "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
- "references": [{ "path": "./tsconfig.node.json" }]
-}
diff --git a/v3/internal/templates/vue-ts/frontend/tsconfig.node.json b/v3/internal/templates/vue-ts/frontend/tsconfig.node.json
deleted file mode 100644
index 9d31e2aed93..00000000000
--- a/v3/internal/templates/vue-ts/frontend/tsconfig.node.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "module": "ESNext",
- "moduleResolution": "Node",
- "allowSyntheticDefaultImports": true
- },
- "include": ["vite.config.ts"]
-}
diff --git a/v3/internal/templates/vue-ts/frontend/vite.config.ts b/v3/internal/templates/vue-ts/frontend/vite.config.ts
deleted file mode 100644
index 05c17402a4a..00000000000
--- a/v3/internal/templates/vue-ts/frontend/vite.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'vite'
-import vue from '@vitejs/plugin-vue'
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [vue()],
-})
diff --git a/v3/internal/templates/vue-ts/go.mod.tmpl b/v3/internal/templates/vue-ts/go.mod.tmpl
deleted file mode 100644
index 3c878c9ab12..00000000000
--- a/v3/internal/templates/vue-ts/go.mod.tmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-module changeme
-
-go 1.19
-
-require github.com/wailsapp/wails/v3 v3.0.0-alpha.0
-
-require (
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/leaanthony/slicer v1.5.0 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/samber/lo v1.37.0 // indirect
- github.com/wailsapp/mimetype v1.4.1 // indirect
- github.com/wailsapp/wails/v2 v2.3.2-0.20230117193915-45c3a501d9e6 // indirect
- golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect
- golang.org/x/net v0.7.0 // indirect
-)
-{{if gt (len .LocalModulePath) 0}}
-replace github.com/wailsapp/wails/v3 => {{.LocalModulePath}}/v3
-replace github.com/wailsapp/wails/v2 => {{.LocalModulePath}}/v2
-{{end}}
diff --git a/v3/internal/templates/vue-ts/go.sum.tmpl b/v3/internal/templates/vue-ts/go.sum.tmpl
deleted file mode 100644
index c06e0dbc675..00000000000
--- a/v3/internal/templates/vue-ts/go.sum.tmpl
+++ /dev/null
@@ -1,33 +0,0 @@
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
-github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
-github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw=
-github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
-github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
-github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4=
-golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
-golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/v3/internal/templates/vue-ts/main.go.tmpl b/v3/internal/templates/vue-ts/main.go.tmpl
deleted file mode 100644
index 1bc6a4868aa..00000000000
--- a/v3/internal/templates/vue-ts/main.go.tmpl
+++ /dev/null
@@ -1,43 +0,0 @@
-package main
-
-import (
- "embed"
- _ "embed"
- "log"
-
- "github.com/wailsapp/wails/v3/pkg/application"
-)
-
-//go:embed frontend/dist
-var assets embed.FS
-
-func main() {
- app := application.New(application.Options{
- Name: "{{.ProjectName}}",
- Description: "A demo of using raw HTML & CSS",
- Mac: application.MacOptions{
- ApplicationShouldTerminateAfterLastWindowClosed: true,
- },
- })
- // Create window
- app.NewWebviewWindowWithOptions(&application.WebviewWindowOptions{
- Title: "Plain Bundle",
- CSS: `body { background-color: rgba(255, 255, 255, 0); } .main { color: white; margin: 20%; }`,
- Mac: application.MacWindow{
- InvisibleTitleBarHeight: 50,
- Backdrop: application.MacBackdropTranslucent,
- TitleBar: application.MacTitleBarHiddenInset,
- },
-
- URL: "/",
- Assets: application.AssetOptions{
- FS: assets,
- },
- })
-
- err := app.Run()
-
- if err != nil {
- log.Fatal(err)
- }
-}
diff --git a/v3/internal/templates/vue/Taskfile.tmpl.yml b/v3/internal/templates/vue/Taskfile.tmpl.yml
deleted file mode 100644
index 5e8c5f4aa3d..00000000000
--- a/v3/internal/templates/vue/Taskfile.tmpl.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-version: '3'
-
-vars:
- APP_NAME: "{{.ProjectName}}"
-
-tasks:
-
- pre-build:
- summary: Pre-build hooks
-
- post-build:
- summary: Post-build hooks
-
- install-frontend-deps:
- summary: Install frontend dependencies
- dir: frontend
- sources:
- - package.json
- - package-lock.json
- generates:
- - node_modules/*
- preconditions:
- - sh: npm version
- msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
- cmds:
- - npm install
-
- build-frontend:
- summary: Build the frontend project
- dir: frontend
- deps:
- - install-frontend-deps
- cmds:
- - npm run build
-
- build:
- summary: Builds the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - go build -gcflags=all="-N -l" -o build/bin/{{ "{{.APP_NAME}}" }} main.go
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
-
- generate-icons:
- summary: Generates Windows `.ico` and Mac `.icns` files from an image
- dir: build
- cmds:
- # Generates both .ico and .icns files
- - wails generate icons -input appicon.png
-
- build-app-prod-darwin:
- summary: Creates a production build of the application
- cmds:
- - task: pre-build
- - task: build-frontend
- - GOOS=darwin GOARCH={{ "{{.ARCH}}" }} go build -tags production -ldflags="-w -s" -o build/bin/{{ "{{.APP_NAME}}" }}
- - task: post-build
- env:
- CGO_CFLAGS: "-mmacosx-version-min=10.13"
- CGO_LDFLAGS: "-mmacosx-version-min=10.13"
- vars:
- ARCH: $GOARCH
-
-
- create-app-bundle:
- summary: Builds a `.app` bundle
- cmds:
- - mkdir -p {{ "{{.APP_NAME}}" }}.app/Contents/{MacOS,Resources}
- - cp build/icons.icns {{ "{{.APP_NAME}}" }}.app/Contents/Resources
- - cp build/bin/{{ "{{.APP_NAME}}" }} {{ "{{.APP_NAME}}" }}.app/Contents/MacOS
- - cp build/Info.plist {{ "{{.APP_NAME}}" }}.app/Contents
-
- package-darwin-arm64:
- summary: Packages a production build of the application into a `.app` bundle
- platform: darwin
- deps:
- - task: build-app-prod-darwin
- vars:
- ARCH: arm64
- - generate-icons
- cmds:
- - task: create-app-bundle
\ No newline at end of file
diff --git a/v3/internal/templates/vue/build/Info.dev.plist.tmpl b/v3/internal/templates/vue/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f497..00000000000
--- a/v3/internal/templates/vue/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/vue/build/Info.plist.tmpl b/v3/internal/templates/vue/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c31613..00000000000
--- a/v3/internal/templates/vue/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/vue/build/appicon.png b/v3/internal/templates/vue/build/appicon.png
deleted file mode 100644
index 63617fe4f74..00000000000
Binary files a/v3/internal/templates/vue/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/vue/build/icons.icns b/v3/internal/templates/vue/build/icons.icns
deleted file mode 100644
index 1b5bd4c86c4..00000000000
Binary files a/v3/internal/templates/vue/build/icons.icns and /dev/null differ
diff --git a/v3/internal/templates/vue/frontend/.gitignore b/v3/internal/templates/vue/frontend/.gitignore
deleted file mode 100644
index a547bf36d8d..00000000000
--- a/v3/internal/templates/vue/frontend/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/v3/internal/templates/vue/frontend/.vscode/extensions.json b/v3/internal/templates/vue/frontend/.vscode/extensions.json
deleted file mode 100644
index c0a6e5a4811..00000000000
--- a/v3/internal/templates/vue/frontend/.vscode/extensions.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
-}
diff --git a/v3/internal/templates/vue/frontend/README.md b/v3/internal/templates/vue/frontend/README.md
deleted file mode 100644
index e62e093e709..00000000000
--- a/v3/internal/templates/vue/frontend/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Vue 3 + Vite
-
-This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `
-
-