Compare commits
2
Commits
v0.2.5
...
b27c3911c0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b27c3911c0
|
||
|
|
efc0f43b17
|
No files matched your search
@@ -63,7 +63,8 @@ jobs:
|
|||||||
const release = metadata.releases.find(item => item.sdk?.version === sdkVersion);
|
const release = metadata.releases.find(item => item.sdk?.version === sdkVersion);
|
||||||
const file = release?.sdk?.files?.find(item => item.rid === 'linux-x64' && item.name.endsWith('.tar.gz'));
|
const file = release?.sdk?.files?.find(item => item.rid === 'linux-x64' && item.name.endsWith('.tar.gz'));
|
||||||
if (!file) throw new Error(`Linux x64 SDK archive not found for ${sdkVersion}`);
|
if (!file) throw new Error(`Linux x64 SDK archive not found for ${sdkVersion}`);
|
||||||
const archiveResponse = await fetch(file.url);
|
const archiveUrl = `https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${sdkVersion}/dotnet-sdk-${sdkVersion}-linux-x64.tar.gz`;
|
||||||
|
const archiveResponse = await fetch(archiveUrl);
|
||||||
if (!archiveResponse.ok) throw new Error(`SDK download failed: ${archiveResponse.status}`);
|
if (!archiveResponse.ok) throw new Error(`SDK download failed: ${archiveResponse.status}`);
|
||||||
await writeFile('/tmp/dotnet-sdk.tar.gz', new Uint8Array(await archiveResponse.arrayBuffer()));
|
await writeFile('/tmp/dotnet-sdk.tar.gz', new Uint8Array(await archiveResponse.arrayBuffer()));
|
||||||
|
|
||||||
|
|||||||
@@ -5,16 +5,16 @@
|
|||||||
<AssemblyName>ShrinkCommand.Integration.Network</AssemblyName>
|
<AssemblyName>ShrinkCommand.Integration.Network</AssemblyName>
|
||||||
<RootNamespace>ShrinkCommand.Integration</RootNamespace>
|
<RootNamespace>ShrinkCommand.Integration</RootNamespace>
|
||||||
<PackageId>ShrinkSDK.Command.Integration.Network</PackageId>
|
<PackageId>ShrinkSDK.Command.Integration.Network</PackageId>
|
||||||
<Version>0.2.5</Version>
|
<Version>0.2.6</Version>
|
||||||
<Description>ShrinkCommand and Network RPC integration.</Description>
|
<Description>ShrinkCommand and Network RPC integration.</Description>
|
||||||
<ShrinkCodeGenEnabled>true</ShrinkCodeGenEnabled>
|
<ShrinkCodeGenEnabled>true</ShrinkCodeGenEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="..\*.cs" />
|
<Compile Include="..\*.cs" />
|
||||||
<PackageReference Include="ShrinkSDK.Runtime.Abstractions" Version="0.1.0" />
|
<PackageReference Include="ShrinkSDK.Runtime.Abstractions" Version="0.2.0" />
|
||||||
<PackageReference Include="ShrinkSDK.Context.Core" Version="0.3.0" />
|
<PackageReference Include="ShrinkSDK.Context.Core" Version="0.3.1" />
|
||||||
<PackageReference Include="ShrinkSDK.Command" Version="0.4.2" />
|
<PackageReference Include="ShrinkSDK.Command" Version="0.4.3" />
|
||||||
<PackageReference Include="ShrinkSDK.Network" Version="0.4.2" />
|
<PackageReference Include="ShrinkSDK.Network" Version="0.4.3" />
|
||||||
<PackageReference Include="ShrinkSDK.CodeGen" Version="0.2.0" PrivateAssets="compile;runtime;contentfiles;native" />
|
<PackageReference Include="ShrinkSDK.CodeGen" Version="0.2.0" PrivateAssets="compile;runtime;contentfiles;native" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Cysharp.Threading.Tasks;
|
using Cysharp.Threading.Tasks;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
@@ -9,6 +10,7 @@ using ShrinkContext;
|
|||||||
using ShrinkDataSaver.Integration.App;
|
using ShrinkDataSaver.Integration.App;
|
||||||
using ShrinkNetwork;
|
using ShrinkNetwork;
|
||||||
using ShrinkNetwork.Integration.App;
|
using ShrinkNetwork.Integration.App;
|
||||||
|
using UnityEngine.TestTools;
|
||||||
|
|
||||||
namespace ShrinkCommand.Integration.Network.Tests
|
namespace ShrinkCommand.Integration.Network.Tests
|
||||||
{
|
{
|
||||||
@@ -27,10 +29,10 @@ namespace ShrinkCommand.Integration.Network.Tests
|
|||||||
_runtime = new ShrinkContextRuntime();
|
_runtime = new ShrinkContextRuntime();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TearDown]
|
[UnityTearDown]
|
||||||
public void TearDown()
|
public IEnumerator TearDown()
|
||||||
{
|
{
|
||||||
_runtime.ShutdownAsync().GetAwaiter().GetResult();
|
yield return _runtime.ShutdownAsync().ToCoroutine();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Run(UniTask task) => task.GetAwaiter().GetResult();
|
private static void Run(UniTask task) => task.GetAwaiter().GetResult();
|
||||||
@@ -83,16 +85,15 @@ namespace ShrinkCommand.Integration.Network.Tests
|
|||||||
ShrinkCommandAppComponent.ServiceKey, out _), "退役撤回服务键");
|
ShrinkCommandAppComponent.ServiceKey, out _), "退役撤回服务键");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[UnityTest]
|
||||||
public void DataSaverComponent_Activates_FlushesOnDeactivate_WithdrawsKey()
|
public IEnumerator DataSaverComponent_Activates_FlushesOnDeactivate_WithdrawsKey()
|
||||||
{
|
{
|
||||||
var fiber = _runtime.Use(new ShrinkDataSaverAppComponent());
|
var fiber = _runtime.Use(new ShrinkDataSaverAppComponent());
|
||||||
Assert.AreEqual(ShrinkFiberState.Active, fiber.State);
|
Assert.AreEqual(ShrinkFiberState.Active, fiber.State);
|
||||||
Assert.IsTrue(_runtime.TryGetRaw<object>(_runtime.RootContext,
|
Assert.IsTrue(_runtime.TryGetRaw<object>(_runtime.RootContext,
|
||||||
ShrinkDataSaverAppComponent.ServiceKey, out _));
|
ShrinkDataSaverAppComponent.ServiceKey, out _));
|
||||||
|
|
||||||
Assert.DoesNotThrow(() => Run(_runtime.RetireAsync(fiber)),
|
yield return _runtime.RetireAsync(fiber).ToCoroutine();
|
||||||
"停用执行补偿式收尾(设置最终落盘;未初始化环境安全跳过)");
|
|
||||||
Assert.IsFalse(_runtime.TryGetRaw<object>(_runtime.RootContext,
|
Assert.IsFalse(_runtime.TryGetRaw<object>(_runtime.RootContext,
|
||||||
ShrinkDataSaverAppComponent.ServiceKey, out _));
|
ShrinkDataSaverAppComponent.ServiceKey, out _));
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "com.cneicy.shrink-command-integration-network",
|
"name": "com.cneicy.shrink-command-integration-network",
|
||||||
"version": "0.2.5",
|
"version": "0.2.6",
|
||||||
"displayName": "ShrinkCommand - Network Integration",
|
"displayName": "ShrinkCommand - Network Integration",
|
||||||
"description": "ShrinkCommand 与 ShrinkNetwork 的桥接层,允许远程会话通过 RPC 执行命令。",
|
"description": "ShrinkCommand 与 ShrinkNetwork 的桥接层,允许远程会话通过 RPC 执行命令。",
|
||||||
"unity": "2022.3",
|
"unity": "2022.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.cneicy.shrink-command": "0.4.2",
|
"com.cneicy.shrink-command": "0.4.3",
|
||||||
"com.cneicy.shrink-network": "0.4.2",
|
"com.cneicy.shrink-network": "0.4.3",
|
||||||
"com.cneicy.shrink-context-core": "0.3.0"
|
"com.cneicy.shrink-context-core": "0.3.1"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"command",
|
"command",
|
||||||
|
|||||||
Reference in new issue
Block a user