Skip to content

Commit 6f6a38c

Browse files
committed
oooo
1 parent 33a9314 commit 6f6a38c

File tree

11 files changed

+32
-20
lines changed

11 files changed

+32
-20
lines changed

.windsurf/workflows/prepare-update.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ dotnet build x:\JammySeedFinder\src\MotelyJAML\Motely.sln -c Release
5959

6060
If any project fails, report the error and stop.
6161

62+
If browser or cross-platform builds fail because of incompatible APIs, do not force the shared/core project to reference platform-specific code. Keep shared code platform-agnostic, move platform services into platform-specific projects, or exclude incompatible files/references from the browser target.
63+
6264
---
6365

6466
## Step 6: Clean _framework dirs before AOT publish
@@ -75,12 +77,14 @@ Remove-Item -Recurse -Force x:\JammySeedFinder\src\MotelyJAML\Motely.node\_frame
7577

7678
## Step 7: AOT Release Publish — Browser WASM (frontend)
7779

78-
This publishes `Motely.BrowserWasm` with browser AOT enabled at publish time and auto-copies `_framework` into `Motely.npm/_framework/` via MSBuild target. The packaged `_framework` output keeps raw `.wasm` assets only and excludes `.br` / `.gz` sidecars.
80+
This publishes `Motely.BrowserWasm` using the browser publish AOT path we are currently validating and auto-copies `_framework` into `Motely.npm/_framework/` via MSBuild target. The packaged `_framework` output keeps raw `.wasm` assets only and excludes `.br` / `.gz` sidecars.
7981

8082
```powershell
81-
dotnet publish x:\JammySeedFinder\src\MotelyJAML\Motely.BrowserWasm\Motely.BrowserWasm.csproj -c Release -p:RunAOTCompilation=true -p:PublishReadyToRun=false
83+
dotnet publish x:\JammySeedFinder\src\MotelyJAML\Motely.BrowserWasm\Motely.BrowserWasm.csproj -c Release -p:PublishAot=true -p:PublishReadyToRun=false
8284
```
8385

86+
If this fails, capture the full SDK error and stop before changing other steps.
87+
8488
Verify the output exists:
8589
// turbo
8690
```powershell
@@ -91,17 +95,19 @@ Verify the output exists:
9195

9296
## Step 8: AOT Release Publish — Single-thread WASM (Node + browser fallback)
9397

94-
This publishes `Motely.SingleThread` with browser AOT enabled at publish time and auto-copies `_framework` into:
98+
This publishes `Motely.SingleThread` using the same browser publish AOT path and auto-copies `_framework` into:
9599
- `Motely.node/_framework/`
96100
- `Motely.npm/_framework_st/`
97101
- `Motely.npm.singlethread/_framework/`
98102

99103
The packaged `_framework` output keeps raw `.wasm` assets only and excludes `.br` / `.gz` sidecars.
100104

101105
```powershell
102-
dotnet publish x:\JammySeedFinder\src\MotelyJAML\Motely.SingleThread\Motely.SingleThread.csproj -c Release -p:RunAOTCompilation=true -p:PublishReadyToRun=false
106+
dotnet publish x:\JammySeedFinder\src\MotelyJAML\Motely.SingleThread\Motely.SingleThread.csproj -c Release -p:PublishAot=true -p:PublishReadyToRun=false
103107
```
104108

109+
If this fails, capture the full SDK error and stop before npm packaging.
110+
105111
Verify the outputs exist:
106112
// turbo
107113
```powershell

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4-
<MotelyVersion>2.3.1</MotelyVersion>
4+
<MotelyVersion>2.3.2</MotelyVersion>
55
</PropertyGroup>
66
<ItemGroup>
77
<!-- Node API for .NET addon: https://microsoft.github.io/node-api-dotnet/scenarios/js-dotnet-module.html (CPM requires fixed version) -->

Motely.CLI/Motely.CLI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<ImplicitUsings>enable</ImplicitUsings>
2323
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
2424
<!-- Enable AOT for native compilation (faster startup, better performance) -->
25-
<PublishAot>true</PublishAot>
25+
<PublishAot Condition="'$(RuntimeIdentifier)' != 'browser-wasm' and '$(DesignTimeBuild)' != 'true'">true</PublishAot>
2626
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
2727
</PropertyGroup>
2828

Motely.DistributedWorker/Motely.DistributedWorker.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<AssemblyName>MotelyWorker</AssemblyName>
2020
<ImplicitUsings>enable</ImplicitUsings>
2121
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
22-
<PublishAot>true</PublishAot>
22+
<PublishAot Condition="'$(RuntimeIdentifier)' != 'browser-wasm' and '$(DesignTimeBuild)' != 'true'">true</PublishAot>
2323
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
2424
</PropertyGroup>
2525

Motely.SingleThread/Motely.SingleThread.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
8-
<RunAOTCompilation>true</RunAOTCompilation>
98
<PublishReadyToRun>false</PublishReadyToRun>
109

1110
<!-- AOT Build - NO THREADS for Node.js compatibility -->

Motely.node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "motely-node",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"description": "MotelyJAML for Node.js/V8 - Balatro seed analyzer and JAML filter engine using .NET WASM",
55
"type": "module",
66
"main": "index.js",

Motely.npm.singlethread/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "motely-wasm-singlethread",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"description": "Run Motely in the browser with a dedicated single-threaded .NET WASM runtime.",
55
"type": "module",
66
"main": "index.js",

Motely.npm/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ function resolveFrameworkUrl(baseUrl, frameworkFolder) {
55
if (baseUrl) {
66
return (baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl) || baseUrl;
77
}
8-
return new URL(`./${frameworkFolder}/`, import.meta.url).href.replace(/\/$/, "");
8+
if (frameworkFolder === "_framework_st") {
9+
return new URL("./_framework_st/", import.meta.url).href.replace(/\/$/, "");
10+
}
11+
return new URL("./_framework/", import.meta.url).href.replace(/\/$/, "");
912
}
1013
// ──────────────────────────────── Loader ────────────────────────────────
1114
/**

Motely.npm/index.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ function resolveFrameworkUrl(baseUrl: string | undefined, frameworkFolder: "_fra
174174
return (baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl) || baseUrl;
175175
}
176176

177-
return new URL(`./${frameworkFolder}/`, import.meta.url).href.replace(/\/$/, "");
177+
if (frameworkFolder === "_framework_st") {
178+
return new URL("./_framework_st/", import.meta.url).href.replace(/\/$/, "");
179+
}
180+
181+
return new URL("./_framework/", import.meta.url).href.replace(/\/$/, "");
178182
}
179183

180184
// ──────────────────────────────── Loader ────────────────────────────────
@@ -271,11 +275,11 @@ export async function loadMotely(options?: LoadMotelyOptions): Promise<MotelyWas
271275

272276
const progressCb = onProgress
273277
? (json: string) => {
274-
const p = JSON.parse(json) as { seedsSearched: number; matchingSeeds: number; elapsedMs: number; resultCount: number };
275-
onProgress(p.seedsSearched, p.matchingSeeds, p.elapsedMs, p.resultCount);
276-
}
277-
: () => {};
278-
const resultCb = onResult ?? (() => {});
278+
const p = JSON.parse(json) as { seedsSearched: number; matchingSeeds: number; elapsedMs: number; resultCount: number };
279+
onProgress(p.seedsSearched, p.matchingSeeds, p.elapsedMs, p.resultCount);
280+
}
281+
: () => { };
282+
const resultCb = onResult ?? (() => { });
279283

280284
const resultJson = await raw.StartJamlSearch(jamlContent, optionsJson, progressCb, resultCb);
281285

Motely.npm/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)