Skip to content

Commit cec8a73

Browse files
authored
Merge pull request #2452 from Flow-Launcher/dev
Release 1.17.0 | Plugin 4.2.0
2 parents 12263fe + 694e504 commit cec8a73

File tree

201 files changed

+5710
-3363
lines changed

Some content is hidden

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

201 files changed

+5710
-3363
lines changed

.github/actions/spelling/expect.txt

Lines changed: 4 additions & 7 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
@@ -78,7 +74,6 @@ WCA_ACCENT_POLICY
7874
HGlobal
7975
dopusrt
8076
firefox
81-
Firefox
8277
msedge
8378
svgc
8479
ime
@@ -87,7 +82,6 @@ txb
8782
btn
8883
otf
8984
searchplugin
90-
Noresult
9185
wpftk
9286
mkv
9387
flac
@@ -108,4 +102,7 @@ Preinstalled
108102
errormetadatafile
109103
noresult
110104
pluginsmanager
111-
alreadyexists
105+
alreadyexists
106+
JsonRPC
107+
JsonRPCV2
108+
Softpedia

.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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish Default Plugins
22

33
on:
44
push:
5-
branches: ['master']
5+
branches: ['dev']
66
paths: ['Plugins/**']
77
workflow_dispatch:
88

@@ -13,7 +13,7 @@ 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

@@ -46,6 +46,7 @@ jobs:
4646
- 'Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json'
4747
windowssettings:
4848
- 'Plugins/Flow.Launcher.Plugin.WindowsSettings/plugin.json'
49+
base: 'master'
4950

5051
- name: Get BrowserBookmark Version
5152
if: steps.changes.outputs.browserbookmark == 'true'

.github/workflows/spelling.yml

Lines changed: 7 additions & 7 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@main
76+
uses: check-spelling/check-spelling@prerelease
7777
with:
7878
suppress_push_for_open_pull_request: 1
7979
checkout: true
@@ -89,12 +89,12 @@ jobs:
8989
check_extra_dictionaries: ''
9090
quit_without_error: true
9191
extra_dictionaries:
92-
cspell:software-terms/src/software-terms.txt
92+
cspell:software-terms/dict/softwareTerms.txt
9393
cspell:win32/src/win32.txt
94-
cspell:php/php.txt
9594
cspell:filetypes/filetypes.txt
9695
cspell:csharp/csharp.txt
97-
cspell:dotnet/dotnet.txt
96+
cspell:dotnet/dict/dotnet.txt
97+
cspell:python/src/common/extra.txt
9898
cspell:python/src/python/python-lib.txt
9999
cspell:aws/aws.txt
100100
cspell:companies/src/companies.txt
@@ -113,7 +113,7 @@ jobs:
113113
# if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push'
114114
# steps:
115115
# - name: comment
116-
# uses: check-spelling/check-spelling@main
116+
# uses: check-spelling/check-spelling@@v0.0.22
117117
# with:
118118
# checkout: true
119119
# spell_check_this: check-spelling/spell-check-this@main
@@ -129,7 +129,7 @@ jobs:
129129
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
130130
steps:
131131
- name: comment
132-
uses: check-spelling/check-spelling@main
132+
uses: check-spelling/check-spelling@prerelease
133133
with:
134134
checkout: true
135135
spell_check_this: check-spelling/spell-check-this@main
@@ -153,7 +153,7 @@ jobs:
153153
# cancel-in-progress: false
154154
# steps:
155155
# - name: apply spelling updates
156-
# uses: check-spelling/check-spelling@main
156+
# uses: check-spelling/check-spelling@v0.0.22
157157
# with:
158158
# experimental_apply_changes_via_bot: 1
159159
# checkout: true

.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/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+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System.Collections.Generic;
2+
using Flow.Launcher.Core.Plugin;
3+
using Flow.Launcher.Infrastructure.UserSettings;
4+
using Flow.Launcher.Plugin;
5+
6+
namespace Flow.Launcher.Core.ExternalPlugins.Environments
7+
{
8+
internal class PythonV2Environment : PythonEnvironment
9+
{
10+
internal override string Language => AllowedLanguage.PythonV2;
11+
12+
internal override PluginPair CreatePluginPair(string filePath, PluginMetadata metadata)
13+
{
14+
return new PluginPair
15+
{
16+
Plugin = new PythonPluginV2(filePath),
17+
Metadata = metadata
18+
};
19+
}
20+
21+
internal PythonV2Environment(List<PluginMetadata> pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }
22+
}
23+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using System.Collections.Generic;
2+
using Droplex;
3+
using Flow.Launcher.Infrastructure.UserSettings;
4+
using Flow.Launcher.Plugin.SharedCommands;
5+
using Flow.Launcher.Plugin;
6+
using System.IO;
7+
using Flow.Launcher.Core.Plugin;
8+
9+
namespace Flow.Launcher.Core.ExternalPlugins.Environments
10+
{
11+
internal class TypeScriptV2Environment : AbstractPluginEnvironment
12+
{
13+
internal override string Language => AllowedLanguage.TypeScriptV2;
14+
15+
internal override string EnvName => DataLocation.NodeEnvironmentName;
16+
17+
internal override string EnvPath => Path.Combine(DataLocation.PluginEnvironmentsPath, EnvName);
18+
19+
internal override string InstallPath => Path.Combine(EnvPath, "Node-v16.18.0");
20+
internal override string ExecutablePath => Path.Combine(InstallPath, "node-v16.18.0-win-x64\\node.exe");
21+
22+
internal override string PluginsSettingsFilePath { get => PluginSettings.NodeExecutablePath; set => PluginSettings.NodeExecutablePath = value; }
23+
24+
internal TypeScriptV2Environment(List<PluginMetadata> pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }
25+
26+
internal override void InstallEnvironment()
27+
{
28+
FilesFolders.RemoveFolderIfExists(InstallPath);
29+
30+
DroplexPackage.Drop(App.nodejs_16_18_0, InstallPath).Wait();
31+
32+
PluginsSettingsFilePath = ExecutablePath;
33+
}
34+
35+
internal override PluginPair CreatePluginPair(string filePath, PluginMetadata metadata)
36+
{
37+
return new PluginPair
38+
{
39+
Plugin = new NodePluginV2(filePath),
40+
Metadata = metadata
41+
};
42+
}
43+
}
44+
}

Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Flow.Launcher.Infrastructure.Logger;
1+
using Flow.Launcher.Infrastructure.Logger;
22
using System;
33
using System.Collections.Generic;
44
using System.Threading;

Flow.Launcher.Core/Flow.Launcher.Core.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@
5454

5555
<ItemGroup>
5656
<PackageReference Include="Droplex" Version="1.7.0" />
57-
<PackageReference Include="FSharp.Core" Version="7.0.400" />
57+
<PackageReference Include="FSharp.Core" Version="7.0.401" />
5858
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
5959
<PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
60+
<PackageReference Include="StreamJsonRpc" Version="2.17.8" />
6061
</ItemGroup>
6162

6263
<ItemGroup>

Flow.Launcher.Core/Plugin/ExecutablePlugin.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Diagnostics;
22
using System.IO;
3+
using System.Text.Json;
34
using System.Threading;
45
using System.Threading.Tasks;
56

@@ -27,14 +28,14 @@ public ExecutablePlugin(string filename)
2728
protected override Task<Stream> RequestAsync(JsonRPCRequestModel request, CancellationToken token = default)
2829
{
2930
// since this is not static, request strings will build up in ArgumentList if index is not specified
30-
_startInfo.ArgumentList[0] = request.ToString();
31+
_startInfo.ArgumentList[0] = JsonSerializer.Serialize(request, RequestSerializeOption);
3132
return ExecuteAsync(_startInfo, token);
3233
}
3334

3435
protected override string Request(JsonRPCRequestModel rpcRequest, CancellationToken token = default)
3536
{
3637
// since this is not static, request strings will build up in ArgumentList if index is not specified
37-
_startInfo.ArgumentList[0] = rpcRequest.ToString();
38+
_startInfo.ArgumentList[0] = JsonSerializer.Serialize(rpcRequest, RequestSerializeOption);
3839
return Execute(_startInfo);
3940
}
4041
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.Diagnostics;
2+
using System.IO;
3+
using System.Text.Json;
4+
using System.Threading;
5+
using System.Threading.Tasks;
6+
7+
namespace Flow.Launcher.Core.Plugin
8+
{
9+
internal sealed class ExecutablePluginV2 : ProcessStreamPluginV2
10+
{
11+
protected override ProcessStartInfo StartInfo { get; set; }
12+
13+
public ExecutablePluginV2(string filename)
14+
{
15+
StartInfo = new ProcessStartInfo
16+
{
17+
FileName = filename,
18+
UseShellExecute = false,
19+
CreateNoWindow = true,
20+
RedirectStandardOutput = true,
21+
RedirectStandardError = true
22+
};
23+
}
24+
25+
}
26+
}

0 commit comments

Comments
 (0)