Skip to content

Commit b61189b

Browse files
authored
Merge pull request #62 from TrueNine/dev
Dev
2 parents 426f939 + 368695d commit b61189b

15 files changed

Lines changed: 57 additions & 14 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/build.rs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,47 @@
1+
use std::env;
2+
use std::fs;
3+
use std::path::{Path, PathBuf};
4+
15
fn main() {
26
#[cfg(feature = "napi")]
37
napi_build::setup();
8+
9+
// Check if embedded-runtime feature is enabled via CARGO_FEATURE_* env var
10+
// Note: #[cfg(feature = ...)] doesn't work in build.rs at runtime,
11+
// we must check the environment variable set by cargo
12+
if env::var("CARGO_FEATURE_EMBEDDED_RUNTIME").is_ok() {
13+
let out_dir = env::var("OUT_DIR").expect("OUT_DIR not set");
14+
let dest = Path::new(&out_dir).join("plugin-runtime.mjs");
15+
16+
// Try multiple possible locations for plugin-runtime.mjs
17+
let possible_sources = vec![
18+
// Already built in cli/dist
19+
PathBuf::from("dist/plugin-runtime.mjs"),
20+
// From repo root
21+
PathBuf::from("cli/dist/plugin-runtime.mjs"),
22+
// CI workspace path (when building from repo root)
23+
PathBuf::from("../cli/dist/plugin-runtime.mjs"),
24+
];
25+
26+
let mut found = false;
27+
for src in &possible_sources {
28+
if src.exists() {
29+
fs::copy(src, &dest).expect("Failed to copy plugin-runtime.mjs");
30+
println!("cargo:rerun-if-changed={}", src.display());
31+
found = true;
32+
break;
33+
}
34+
}
35+
36+
if !found {
37+
panic!(
38+
"plugin-runtime.mjs not found for embedded-runtime feature. \
39+
Please build it first with: pnpm -C cli exec tsdown \
40+
Searched paths: {:?}",
41+
possible_sources
42+
);
43+
}
44+
45+
println!("cargo:rerun-if-changed=build.rs");
46+
}
447
}

cli/npm/darwin-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@truenine/memory-sync-cli-darwin-arm64",
3-
"version": "2026.10303.11058",
3+
"version": "2026.10303.11117",
44
"os": [
55
"darwin"
66
],

cli/npm/darwin-x64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@truenine/memory-sync-cli-darwin-x64",
3-
"version": "2026.10303.11058",
3+
"version": "2026.10303.11117",
44
"os": [
55
"darwin"
66
],

cli/npm/linux-arm64-gnu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@truenine/memory-sync-cli-linux-arm64-gnu",
3-
"version": "2026.10303.11058",
3+
"version": "2026.10303.11117",
44
"os": [
55
"linux"
66
],

cli/npm/linux-x64-gnu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@truenine/memory-sync-cli-linux-x64-gnu",
3-
"version": "2026.10303.11058",
3+
"version": "2026.10303.11117",
44
"os": [
55
"linux"
66
],

cli/npm/win32-x64-msvc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@truenine/memory-sync-cli-win32-x64-msvc",
3-
"version": "2026.10303.11058",
3+
"version": "2026.10303.11117",
44
"os": [
55
"win32"
66
],

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@truenine/memory-sync-cli",
33
"type": "module",
4-
"version": "2026.10303.11058",
4+
"version": "2026.10303.11117",
55
"description": "TrueNine Memory Synchronization CLI",
66
"author": "TrueNine",
77
"license": "AGPL-3.0-only",

doc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@truenine/memory-sync-docs",
3-
"version": "2026.10303.11058",
3+
"version": "2026.10303.11117",
44
"private": true,
55
"description": "Documentation site for @truenine/memory-sync, built with Next.js 16 and MDX.",
66
"engines": {

gui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@truenine/memory-sync-gui",
3-
"version": "2026.10303.11058",
3+
"version": "2026.10303.11117",
44
"private": true,
55
"engines": {
66
"node": ">=25.2.1",

0 commit comments

Comments
 (0)