Skip to content

Commit a7aebb9

Browse files
committed
jesus i think first version of working better be this or idk this is the death of me tbh i hate this on god
1 parent 8d13a38 commit a7aebb9

16 files changed

+288
-131
lines changed

Directory.Build.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
<!-- Sync package.json versions from Directory.Packages.props before Publish -->
3+
<Target Name="SyncVersionBeforePublish" BeforeTargets="Publish"
4+
Condition="Exists('$(MSBuildThisFileDirectory)sync-version.mjs')">
5+
<Exec Command="node &quot;$(MSBuildThisFileDirectory)sync-version.mjs&quot;" />
6+
</Target>
7+
</Project>

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>3.15.35</MotelyVersion>
4+
<MotelyVersion>3.15.39</MotelyVersion>
55
</PropertyGroup>
66
<ItemGroup>
77
<PackageVersion Include="Microsoft.JavaScript.NodeApi" Version="0.9.19" />

Dockerfile.linux-node

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Build linux-x64 native AOT binary using Ubuntu 22.04 (glibc 2.35) for Vercel compatibility
2+
# .NET 10 SDK on Debian/glibc
3+
4+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
5+
6+
# Install native AOT build dependencies
7+
RUN apt-get update && apt-get install -y --no-install-recommends \
8+
clang lld zlib1g-dev \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
WORKDIR /src
12+
13+
# Copy project files for restore
14+
COPY Directory.Build.props Directory.Build.targets Directory.Packages.props ./
15+
COPY Motely/Motely.csproj Motely/
16+
COPY Motely.Orchestration/Motely.Orchestration.csproj Motely.Orchestration/
17+
COPY Motely.NodeAddon/Motely.NodeAddon.csproj Motely.NodeAddon/
18+
19+
# Restore
20+
RUN dotnet restore Motely.NodeAddon/Motely.NodeAddon.csproj -r linux-x64
21+
22+
# Copy source
23+
COPY Motely/ Motely/
24+
COPY Motely.Orchestration/ Motely.Orchestration/
25+
COPY Motely.NodeAddon/ Motely.NodeAddon/
26+
27+
# Publish native AOT
28+
RUN dotnet publish Motely.NodeAddon/Motely.NodeAddon.csproj \
29+
-c Release \
30+
-r linux-x64 \
31+
-o /out \
32+
-p:PublishAot=true \
33+
-p:StripSymbols=true \
34+
-p:InvariantGlobalization=true
35+
36+
# Output stage
37+
FROM scratch AS export
38+
COPY --from=build /out/*.node /

Motely.NodeAddon/Motely.NodeAddon.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
<ProjectReference Include="..\Motely.Orchestration\Motely.Orchestration.csproj" />
3939
</ItemGroup>
4040

41-
<!-- Linux-x64 build is handled by publish-packages.ps1 via WSL -->
41+
<!-- Linux-x64 build: run build-linux.ps1 (Docker, not WSL) -->
4242
</Project>

Motely.NodeAddon/jaml-schema.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
export const JAML_SCHEMA_VERSION = "3.15.35";
1+
export const JAML_SCHEMA_VERSION = "3.15.38";
22
export const jamlSchema = {
33
"$schema": "http://json-schema.org/draft-07/schema#",
44
"$id": "https://seedfinder.app/jaml.schema.json",
5-
"version": "3.15.35",
5+
"version": "3.15.38",
66
"title": "JAML - Jimbo\u0027s Ante Markup Language",
77
"description": "Schema for Balatro seed filter configuration files (.jaml)",
88
"type": "object",

Motely.NodeAddon/jaml.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "https://seedfinder.app/jaml.schema.json",
4-
"version": "3.15.35",
4+
"version": "3.15.38",
55
"title": "JAML - Jimbo\u0027s Ante Markup Language",
66
"description": "Schema for Balatro seed filter configuration files (.jaml)",
77
"type": "object",

build-linux.ps1

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<#
2+
.SYNOPSIS
3+
Build linux-x64 native AOT addon via Docker (Ubuntu 22.04 / glibc 2.35).
4+
Outputs to motely-node/bin/linux-x64/Motely.NodeAddon.node
5+
.NOTES
6+
Requires Docker Desktop running. No WSL dotnet needed.
7+
Uses Dockerfile.linux-node (Ubuntu Jammy) for Vercel glibc compatibility.
8+
#>
9+
$ErrorActionPreference = 'Stop'
10+
$root = $PSScriptRoot
11+
12+
Write-Host "[linux-x64] Building via Docker (Ubuntu 22.04/glibc)..." -ForegroundColor Yellow
13+
14+
$outDir = Join-Path $root 'motely-node\bin\linux-x64'
15+
if (-not (Test-Path $outDir)) { New-Item -ItemType Directory -Path $outDir -Force | Out-Null }
16+
17+
# Build the image (Ubuntu 22.04/glibc for Vercel compatibility)
18+
docker build -f "$root\Dockerfile.linux-node" --target build -t motely-node-build "$root"
19+
if ($LASTEXITCODE) { throw "Docker build failed" }
20+
21+
# Extract the .node file via a temporary run
22+
docker run --rm -v "${outDir}:/dest" motely-node-build sh -c "cp /out/linux-x64/*.node /dest/"
23+
if ($LASTEXITCODE) { throw "Docker copy failed" }
24+
25+
if (-not (Test-Path "$outDir\Motely.NodeAddon.node")) {
26+
throw "Binary not found at $outDir\Motely.NodeAddon.node"
27+
}
28+
29+
$size = (Get-Item "$outDir\Motely.NodeAddon.node").Length / 1MB
30+
Write-Host "[linux-x64] OK: $outDir\Motely.NodeAddon.node ($([math]::Round($size,1)) MB)" -ForegroundColor Green

jaml.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "https://seedfinder.app/jaml.schema.json",
4-
"version": "3.15.35",
4+
"version": "3.15.38",
55
"title": "JAML - Jimbo\u0027s Ante Markup Language",
66
"description": "Schema for Balatro seed filter configuration files (.jaml)",
77
"type": "object",

motely-node/package.json

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
{
2-
"name": "motely-node",
3-
"version": "3.15.35",
4-
"description": "MotelyJAML for Node.js - Balatro seed analyzer and JAML filter engine using .NET 10 Native AOT",
5-
"main": "index.cjs",
6-
"types": "./index.d.ts",
7-
"exports": {
8-
".": {
9-
"types": "./index.d.ts",
10-
"require": "./index.cjs",
11-
"import": "./index.cjs",
12-
"default": "./index.cjs"
13-
},
14-
"./jaml-schema": {
15-
"types": "./jaml-schema.d.ts",
16-
"import": "./jaml-schema.js",
17-
"require": "./jaml-schema.js",
18-
"default": "./jaml-schema.js"
19-
},
20-
"./jaml.schema.json": "./jaml.schema.json"
21-
},
22-
"files": [
23-
"index.cjs",
24-
"index.d.ts",
25-
"jaml-schema.js",
26-
"jaml-schema.d.ts",
27-
"jaml.schema.json",
28-
"bin/linux-x64/*.node"
29-
],
30-
"repository": {
31-
"type": "git",
32-
"url": "git+https://github.com/OptimusPi/MotelyJAML.git",
33-
"directory": "motely-node"
34-
},
35-
"license": "MIT",
36-
"keywords": [
37-
"balatro",
38-
"seed",
39-
"dotnet",
40-
"node-api",
41-
"aot",
42-
"jaml"
43-
],
44-
"engines": {
45-
"node": "\u003e=22.0.0"
46-
},
47-
"os": [
48-
"linux"
49-
]
1+
{
2+
"name": "motely-node",
3+
"version": "3.15.39",
4+
"description": "MotelyJAML for Node.js - Balatro seed analyzer and JAML filter engine using .NET 10 Native AOT",
5+
"main": "index.cjs",
6+
"types": "./index.d.ts",
7+
"exports": {
8+
".": {
9+
"types": "./index.d.ts",
10+
"require": "./index.cjs",
11+
"import": "./index.cjs",
12+
"default": "./index.cjs"
13+
},
14+
"./jaml-schema": {
15+
"types": "./jaml-schema.d.ts",
16+
"import": "./jaml-schema.js",
17+
"require": "./jaml-schema.js",
18+
"default": "./jaml-schema.js"
19+
},
20+
"./jaml.schema.json": "./jaml.schema.json"
21+
},
22+
"files": [
23+
"index.cjs",
24+
"index.d.ts",
25+
"jaml-schema.js",
26+
"jaml-schema.d.ts",
27+
"jaml.schema.json",
28+
"bin/linux-x64/*.node"
29+
],
30+
"repository": {
31+
"type": "git",
32+
"url": "git+https://github.com/OptimusPi/MotelyJAML.git",
33+
"directory": "motely-node"
34+
},
35+
"license": "MIT",
36+
"keywords": [
37+
"balatro",
38+
"seed",
39+
"dotnet",
40+
"node-api",
41+
"aot",
42+
"jaml"
43+
],
44+
"engines": {
45+
"node": ">=22.0.0"
46+
},
47+
"os": [
48+
"linux"
49+
]
5050
}

motely-wasm/jaml-schema.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
export const JAML_SCHEMA_VERSION = "3.15.35";
1+
export const JAML_SCHEMA_VERSION = "3.15.38";
22
export const jamlSchema = {
33
"$schema": "http://json-schema.org/draft-07/schema#",
44
"$id": "https://seedfinder.app/jaml.schema.json",
5-
"version": "3.15.35",
5+
"version": "3.15.38",
66
"title": "JAML - Jimbo\u0027s Ante Markup Language",
77
"description": "Schema for Balatro seed filter configuration files (.jaml)",
88
"type": "object",

0 commit comments

Comments
 (0)