mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
fix(core): upgrade Jint and fix errors
This commit is contained in:
parent
1440f2c2d9
commit
fa18af50a6
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Fluid.Core" Version="2.2.15" />
|
<PackageReference Include="Fluid.Core" Version="2.2.15" />
|
||||||
<PackageReference Include="Jint" Version="3.0.0-preview-275" />
|
<PackageReference Include="Jint" Version="3.0.0-preview-336" />
|
||||||
<PackageReference Include="JsonSubTypes" Version="1.9.0" />
|
<PackageReference Include="JsonSubTypes" Version="1.9.0" />
|
||||||
<PackageReference Include="HierarchicalPropertyDefault" Version="0.1.4-beta-g75fdf624b1" />
|
<PackageReference Include="HierarchicalPropertyDefault" Version="0.1.4-beta-g75fdf624b1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
||||||
|
|
|
@ -29,9 +29,9 @@ namespace BililiveRecorder.Core.Scripting
|
||||||
|
|
||||||
static UserScriptRunner()
|
static UserScriptRunner()
|
||||||
{
|
{
|
||||||
setupScript = new JavaScriptParser(@"
|
setupScript = new JavaScriptParser(new ParserOptions()).ParseScript(@"
|
||||||
globalThis.recorderEvents = {};
|
globalThis.recorderEvents = {};
|
||||||
", new ParserOptions(@"internalSetup.js")).ParseScript();
|
", "internalSetup.js", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserScriptRunner(GlobalConfig config)
|
public UserScriptRunner(GlobalConfig config)
|
||||||
|
@ -73,8 +73,8 @@ globalThis.recorderEvents = {};
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parser = new JavaScriptParser(source!, new ParserOptions("userscript.js"));
|
var parser = new JavaScriptParser();
|
||||||
var script = parser.ParseScript();
|
var script = parser.ParseScript(source!, "userscript.js", true);
|
||||||
|
|
||||||
this.cachedScript = script;
|
this.cachedScript = script;
|
||||||
this.cachedScriptSource = source;
|
this.cachedScriptSource = source;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user