Skip to content

Commit f902eae

Browse files
committed
Merge remote-tracking branch 'origin/dev' into quicklook
2 parents 493a30e + c4310f0 commit f902eae

File tree

430 files changed

+22767
-14077
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

430 files changed

+22767
-14077
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dotnet_style_prefer_conditional_expression_over_return = true:silent
5858
###############################
5959
# Style Definitions
6060
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
61-
# Use PascalCase for constant fields
61+
# Use PascalCase for constant fields
6262
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
6363
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
6464
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
@@ -134,7 +134,7 @@ csharp_preserve_single_line_statements = true
134134
csharp_preserve_single_line_blocks = true
135135
csharp_using_directive_placement = outside_namespace:silent
136136
csharp_prefer_simple_using_statement = true:suggestion
137-
csharp_style_namespace_declarations = block_scoped:silent
137+
csharp_style_namespace_declarations = file_scoped:silent
138138
csharp_style_prefer_method_group_conversion = true:silent
139139
csharp_style_expression_bodied_lambdas = true:silent
140140
csharp_style_expression_bodied_local_functions = false:silent

.github/actions/spelling/allow.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ https
33
ssh
44
ubuntu
55
runcount
6+
Firefox
7+
Português
8+
Português (Brasil)

.github/actions/spelling/expect.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
crowdin
22
DWM
33
workflows
4-
Wpf
54
wpf
65
actionkeyword
76
stackoverflow
@@ -20,9 +19,7 @@ Prioritise
2019
Segoe
2120
Google
2221
Customise
23-
UWP
2422
uwp
25-
Uwp
2623
Bokmal
2724
Bokm
2825
uninstallation
@@ -61,7 +58,6 @@ popup
6158
ptr
6259
pluginindicator
6360
TobiasSekan
64-
Img
6561
img
6662
resx
6763
bak
@@ -87,7 +83,6 @@ txb
8783
btn
8884
otf
8985
searchplugin
90-
Noresult
9186
wpftk
9287
mkv
9388
flac
@@ -104,9 +99,14 @@ Português (Brasil)
10499
Italiano
105100
Slovenský
106101
quicklook
102+
Tiếng Việt
107103
Droplex
108104
Preinstalled
109105
errormetadatafile
110106
noresult
111107
pluginsmanager
112108
alreadyexists
109+
JsonRPC
110+
JsonRPCV2
111+
Softpedia
112+
img

.github/actions/spelling/patterns.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,6 @@
118118

119119
# UWP
120120
[Uu][Ww][Pp]
121+
122+
# version suffix <word>v#
123+
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))

.github/workflows/default_plugins.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Setup .NET
16-
uses: actions/setup-dotnet@v3
16+
uses: actions/setup-dotnet@v4
1717
with:
1818
dotnet-version: 7.0.x
1919

2020
- name: Determine New Plugin Updates
21-
uses: dorny/paths-filter@v2
21+
uses: dorny/paths-filter@v3
2222
id: changes
2323
with:
2424
filters: |
@@ -65,7 +65,7 @@ jobs:
6565
6666
- name: Publish BrowserBookmark
6767
if: steps.changes.outputs.browserbookmark == 'true'
68-
uses: softprops/action-gh-release@v1
68+
uses: softprops/action-gh-release@v2
6969
with:
7070
repository: "Flow-Launcher/Flow.Launcher.Plugin.BrowserBookmark"
7171
files: "Flow.Launcher.Plugin.BrowserBookmark.zip"
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Publish Calculator
9494
if: steps.changes.outputs.calculator == 'true'
95-
uses: softprops/action-gh-release@v1
95+
uses: softprops/action-gh-release@v2
9696
with:
9797
repository: "Flow-Launcher/Flow.Launcher.Plugin.Calculator"
9898
files: "Flow.Launcher.Plugin.Calculator.zip"
@@ -119,7 +119,7 @@ jobs:
119119
120120
- name: Publish Explorer
121121
if: steps.changes.outputs.explorer == 'true'
122-
uses: softprops/action-gh-release@v1
122+
uses: softprops/action-gh-release@v2
123123
with:
124124
repository: "Flow-Launcher/Flow.Launcher.Plugin.Explorer"
125125
files: "Flow.Launcher.Plugin.Explorer.zip"
@@ -146,7 +146,7 @@ jobs:
146146
147147
- name: Publish PluginIndicator
148148
if: steps.changes.outputs.pluginindicator == 'true'
149-
uses: softprops/action-gh-release@v1
149+
uses: softprops/action-gh-release@v2
150150
with:
151151
repository: "Flow-Launcher/Flow.Launcher.Plugin.PluginIndicator"
152152
files: "Flow.Launcher.Plugin.PluginIndicator.zip"
@@ -173,7 +173,7 @@ jobs:
173173
174174
- name: Publish PluginsManager
175175
if: steps.changes.outputs.pluginsmanager == 'true'
176-
uses: softprops/action-gh-release@v1
176+
uses: softprops/action-gh-release@v2
177177
with:
178178
repository: "Flow-Launcher/Flow.Launcher.Plugin.PluginsManager"
179179
files: "Flow.Launcher.Plugin.PluginsManager.zip"
@@ -200,7 +200,7 @@ jobs:
200200
201201
- name: Publish ProcessKiller
202202
if: steps.changes.outputs.processkiller == 'true'
203-
uses: softprops/action-gh-release@v1
203+
uses: softprops/action-gh-release@v2
204204
with:
205205
repository: "Flow-Launcher/Flow.Launcher.Plugin.ProcessKiller"
206206
files: "Flow.Launcher.Plugin.ProcessKiller.zip"
@@ -227,7 +227,7 @@ jobs:
227227
228228
- name: Publish Program
229229
if: steps.changes.outputs.program == 'true'
230-
uses: softprops/action-gh-release@v1
230+
uses: softprops/action-gh-release@v2
231231
with:
232232
repository: "Flow-Launcher/Flow.Launcher.Plugin.Program"
233233
files: "Flow.Launcher.Plugin.Program.zip"
@@ -254,7 +254,7 @@ jobs:
254254
255255
- name: Publish Shell
256256
if: steps.changes.outputs.shell == 'true'
257-
uses: softprops/action-gh-release@v1
257+
uses: softprops/action-gh-release@v2
258258
with:
259259
repository: "Flow-Launcher/Flow.Launcher.Plugin.Shell"
260260
files: "Flow.Launcher.Plugin.Shell.zip"
@@ -281,7 +281,7 @@ jobs:
281281
282282
- name: Publish Sys
283283
if: steps.changes.outputs.sys == 'true'
284-
uses: softprops/action-gh-release@v1
284+
uses: softprops/action-gh-release@v2
285285
with:
286286
repository: "Flow-Launcher/Flow.Launcher.Plugin.Sys"
287287
files: "Flow.Launcher.Plugin.Sys.zip"
@@ -308,7 +308,7 @@ jobs:
308308
309309
- name: Publish Url
310310
if: steps.changes.outputs.url == 'true'
311-
uses: softprops/action-gh-release@v1
311+
uses: softprops/action-gh-release@v2
312312
with:
313313
repository: "Flow-Launcher/Flow.Launcher.Plugin.Url"
314314
files: "Flow.Launcher.Plugin.Url.zip"
@@ -335,7 +335,7 @@ jobs:
335335
336336
- name: Publish WebSearch
337337
if: steps.changes.outputs.websearch == 'true'
338-
uses: softprops/action-gh-release@v1
338+
uses: softprops/action-gh-release@v2
339339
with:
340340
repository: "Flow-Launcher/Flow.Launcher.Plugin.WebSearch"
341341
files: "Flow.Launcher.Plugin.WebSearch.zip"
@@ -362,7 +362,7 @@ jobs:
362362
363363
- name: Publish WindowsSettings
364364
if: steps.changes.outputs.windowssettings == 'true'
365-
uses: softprops/action-gh-release@v1
365+
uses: softprops/action-gh-release@v2
366366
with:
367367
repository: "Flow-Launcher/Flow.Launcher.Plugin.WindowsSettings"
368368
files: "Flow.Launcher.Plugin.WindowsSettings.zip"

.github/workflows/spelling.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
steps:
7474
- name: check-spelling
7575
id: spelling
76-
uses: check-spelling/check-spelling@v0.0.22
76+
uses: check-spelling/check-spelling@prerelease
7777
with:
7878
suppress_push_for_open_pull_request: 1
7979
checkout: true
@@ -91,10 +91,9 @@ jobs:
9191
extra_dictionaries:
9292
cspell:software-terms/dict/softwareTerms.txt
9393
cspell:win32/src/win32.txt
94-
cspell:php/src/php.txt
9594
cspell:filetypes/filetypes.txt
9695
cspell:csharp/csharp.txt
97-
cspell:dotnet/src/dotnet.txt
96+
cspell:dotnet/dict/dotnet.txt
9897
cspell:python/src/common/extra.txt
9998
cspell:python/src/python/python-lib.txt
10099
cspell:aws/aws.txt
@@ -130,7 +129,7 @@ jobs:
130129
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
131130
steps:
132131
- name: comment
133-
uses: check-spelling/check-spelling@v0.0.22
132+
uses: check-spelling/check-spelling@prerelease
134133
with:
135134
checkout: true
136135
spell_check_this: check-spelling/spell-check-this@main

.github/workflows/stale.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,26 @@ on:
66
schedule:
77
- cron: '30 1 * * *'
88

9+
env:
10+
days-before-stale: 60
11+
days-before-close: 7
12+
exempt-issue-labels: 'keep-fresh'
13+
914
jobs:
1015
stale:
1116
runs-on: ubuntu-latest
1217
permissions:
1318
issues: write
1419
pull-requests: write
1520
steps:
16-
- uses: actions/stale@v8
21+
- uses: actions/stale@v9
1722
with:
18-
stale-issue-message: 'This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
19-
days-before-stale: 45
20-
days-before-close: 7
23+
stale-issue-message: 'This issue is stale because it has been open ${{ env.days-before-stale }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.days-before-stale }} days.\n\nAlternatively this issue can be kept open by adding one of the following labels:\n${{ env.exempt-issue-labels }}'
24+
days-before-stale: ${{ env.days-before-stale }}
25+
days-before-close: ${{ env.days-before-close }}
2126
days-before-pr-close: -1
2227
exempt-all-milestones: true
2328
close-issue-message: 'This issue was closed because it has been stale for 7 days with no activity. If you feel this issue still needs attention please feel free to reopen.'
2429
stale-pr-label: 'no-pr-activity'
25-
exempt-issue-labels: 'keep-fresh'
30+
exempt-issue-labels: ${{ env.exempt-issue-labels }}
2631
exempt-pr-labels: 'keep-fresh,awaiting-approval,work-in-progress'

Flow.Launcher.Core/ExternalPlugins/CommunityPluginSource.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
using System.Net;
66
using System.Net.Http;
77
using System.Net.Http.Json;
8+
using System.Text.Json;
9+
using System.Text.Json.Serialization;
810
using System.Threading;
911
using System.Threading.Tasks;
1012

@@ -16,6 +18,11 @@ public record CommunityPluginSource(string ManifestFileUrl)
1618

1719
private List<UserPlugin> plugins = new();
1820

21+
private static JsonSerializerOptions PluginStoreItemSerializationOption = new JsonSerializerOptions()
22+
{
23+
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault
24+
};
25+
1926
/// <summary>
2027
/// Fetch and deserialize the contents of a plugins.json file found at <see cref="ManifestFileUrl"/>.
2128
/// We use conditional http requests to keep repeat requests fast.
@@ -32,12 +39,15 @@ public async Task<List<UserPlugin>> FetchAsync(CancellationToken token)
3239

3340
request.Headers.Add("If-None-Match", latestEtag);
3441

35-
using var response = await Http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, token).ConfigureAwait(false);
42+
using var response = await Http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, token)
43+
.ConfigureAwait(false);
3644

3745
if (response.StatusCode == HttpStatusCode.OK)
3846
{
39-
this.plugins = await response.Content.ReadFromJsonAsync<List<UserPlugin>>(cancellationToken: token).ConfigureAwait(false);
40-
this.latestEtag = response.Headers.ETag.Tag;
47+
this.plugins = await response.Content
48+
.ReadFromJsonAsync<List<UserPlugin>>(PluginStoreItemSerializationOption, cancellationToken: token)
49+
.ConfigureAwait(false);
50+
this.latestEtag = response.Headers.ETag?.Tag;
4151

4252
Log.Info(nameof(CommunityPluginSource), $"Loaded {this.plugins.Count} plugins from {ManifestFileUrl}");
4353
return this.plugins;
@@ -49,7 +59,8 @@ public async Task<List<UserPlugin>> FetchAsync(CancellationToken token)
4959
}
5060
else
5161
{
52-
Log.Warn(nameof(CommunityPluginSource), $"Failed to load resource {ManifestFileUrl} with response {response.StatusCode}");
62+
Log.Warn(nameof(CommunityPluginSource),
63+
$"Failed to load resource {ManifestFileUrl} with response {response.StatusCode}");
5364
throw new Exception($"Failed to load resource {ManifestFileUrl} with response {response.StatusCode}");
5465
}
5566
}

Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ internal IEnumerable<PluginPair> Setup()
5858
string.Empty, MessageBoxButtons.YesNo) == DialogResult.No)
5959
{
6060
var msg = $"Please select the {EnvName} executable";
61-
var selectedFile = string.Empty;
61+
string selectedFile;
6262

6363
selectedFile = GetFileFromDialog(msg, FileDialogFilter);
6464

@@ -131,14 +131,8 @@ private string GetFileFromDialog(string title, string filter = "")
131131
};
132132

133133
var result = dlg.ShowDialog();
134-
if (result == DialogResult.OK)
135-
{
136-
return dlg.FileName;
137-
}
138-
else
139-
{
140-
return string.Empty;
141-
}
134+
return result == DialogResult.OK ? dlg.FileName : string.Empty;
135+
142136
}
143137

144138
/// <summary>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Collections.Generic;
2+
using Flow.Launcher.Infrastructure.UserSettings;
3+
using Flow.Launcher.Plugin;
4+
5+
namespace Flow.Launcher.Core.ExternalPlugins.Environments
6+
{
7+
8+
internal class JavaScriptV2Environment : TypeScriptV2Environment
9+
{
10+
internal override string Language => AllowedLanguage.JavaScriptV2;
11+
12+
internal JavaScriptV2Environment(List<PluginMetadata> pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }
13+
}
14+
}

0 commit comments

Comments
 (0)