Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/desktop-linux-test-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/desktop-mac-m1-test-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/desktop-mac-test-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/desktop-windows-test-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prod-desktop-tests-on-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/staging-desktop-tests-on-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/tauri-build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: get version
run: |
echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install frontend dependencies
env:
GH_TOKEN: ${{ github.token }}
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Download src-node built on mac arm (Mac only)
if: matrix.platform == 'macos-15-intel'
Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: GLIBC version
run: |
Expand All @@ -315,7 +315,6 @@ jobs:
run: |
npm ci
npm run _ci-release:dev
npm run _ci-disableBundleConfig
npm run tauri build
ls -alh ./src-tauri/target/release
mkdir ./src-tauri/target/release/phoenix-code
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/tauri-build-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: get version
run: |
echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install frontend dependencies
env:
GH_TOKEN: ${{ github.token }}
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Download src-node built on mac arm (Mac only)
if: matrix.platform == 'macos-15-intel'
Expand Down Expand Up @@ -339,7 +339,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: GLIBC version
run: |
Expand All @@ -363,7 +363,6 @@ jobs:
run: |
npm ci
npm run _ci-release:prod
npm run _ci-disableBundleConfig
npm run tauri build
ls -alh ./src-tauri/target/release
mkdir ./src-tauri/target/release/binDist
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/tauri-build-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: get version
run: |
echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: install frontend dependencies
env:
GH_TOKEN: ${{ github.token }}
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Download src-node built on mac arm (Mac only)
if: matrix.platform == 'macos-15-intel'
Expand Down Expand Up @@ -290,7 +290,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: GLIBC version
run: |
Expand All @@ -314,7 +314,6 @@ jobs:
run: |
npm ci
npm run _ci-release:staging
npm run _ci-disableBundleConfig
npm run tauri build
ls -alh ./src-tauri/target/release
mkdir ./src-tauri/target/release/phoenix-code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-phcode-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Update phcode and version
env:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ src-tauri/phnode-*
src-tauri/tauri-local.conf.json
phoenix

# Electron things
src-electron/bin
src-electron/src-node

node_modules
dist
dist-ssr
Expand Down
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 7 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"_createDistBundleReleaseConfig": "node src-build/createDistBundleReleaseConfig.js",
"_createDistTestReleaseConfig": "node src-build/createDistTestReleaseConfig.js",
"_ci-createDistReleaseConfig": "node src-build/ci-createDistReleaseConfig.js",
"_ci-disableBundleConfig": "node src-build/ci-disableBundleConfig.js",
"_ci-env-warn": "echo !!!This script is supposed to executed in github actions only. Ignore if you are seeing this message in a github actions log.",
"releaseSrc": "npm run _make_src-node && npm run _createSrcReleaseConfig && tauri build --config ./src-tauri/tauri-local.conf.json",
"releaseSrcDebug": "npm run _make_src-node && npm run _createSrcReleaseConfig && tauri build --config ./src-tauri/tauri-local.conf.json --debug --verbose",
Expand All @@ -20,21 +19,18 @@
"releaseDistDebug": "npm run _make_src-node && npm run _createDistReleaseConfig && tauri build --config ./src-tauri/tauri-local.conf.json --debug --verbose",
"releaseDistTest": "npm run _make_src-node && npm run _createDistTestReleaseConfig && tauri build --config ./src-tauri/tauri-local.conf.json",
"releaseDistTestDebug": "npm run _make_src-node && npm run _createDistTestReleaseConfig && tauri build --config ./src-tauri/tauri-local.conf.json --debug",
"_src-node_npm_install": "cd src-tauri/src-node && npm ci --production && cd ../../ && npm run _src-node_remove_unsupported_bin",
"_src-node_remove_unsupported_bin": "shx rm -f src-tauri/src-node/node_modules/@msgpackr-extract/msgpackr-extract-linux-*/*.musl.node src-tauri/src-node/node_modules/@lmdb/lmdb-linux-*/*.musl.node",
"_make_src-node": "shx rm -rf src-tauri/src-node && shx cp -r ../phoenix/src-node src-tauri/src-node && npm run _src-node_npm_install",
"_make_src-node_debug_dev": "npm run _make_src-node && shx rm -rf src-tauri/target/debug/src-node && shx cp -r src-tauri/src-node src-tauri/target/debug/src-node",
"_ci_make_src-node": "shx rm -rf src-tauri/src-node && shx cp -r phoenix/src-node src-tauri/src-node && npm run _src-node_npm_install",
"_servePhoenix": "echo -e \"\nEnsure to start phoenix server at http://localhost:8000 for development.\n Follow https://github.com/phcode-dev/phoenix#running-phoenix for instructions.\"",
"_make_src-node": "node ./src-build/makeSrcNode.js ../phoenix/src-node",
"_ci_make_src-node": "node ./src-build/makeSrcNode.js phoenix/src-node",
"_ci-clonePhoenixForTests": "npm run _ci-env-warn && node ./src-build/clonePhoenixForTests.js",
"_ci-cloneAndBuildPhoenix": "npm run _ci-env-warn && node ./src-build/clonePhoenix.js && cd phoenix && npm ci && npm run build && cd ..",
"_ci-release:dev": "npm run _ci-env-warn && npm run _ci-cloneAndBuildPhoenix && cd phoenix && npm run release:dev && cd .. && npm run _ci-createDistReleaseConfig && npm run _ci_make_src-node",
"_ci-release:staging": "npm run _ci-env-warn && npm run _ci-cloneAndBuildPhoenix && cd phoenix && npm run release:staging && cd .. && npm run _ci-createDistReleaseConfig && npm run _ci_make_src-node",
"_ci-release:prod": "npm run _ci-env-warn && npm run _ci-cloneAndBuildPhoenix && cd phoenix && npm run release:prod && cd .. && npm run _ci-createDistReleaseConfig && npm run _ci_make_src-node",
"_ci-update-phcode-build": "node src-build/update-phcode-build.js",
"_watch_src-node": "chokidar '../phoenix/src-node/**/*' --ignore '../phoenix/src-node/node_modules/**/*' -c 'npm run _make_src-node_debug_dev'",
"serve": "npm run _servePhoenix && npm run _make_src-node && tauri dev",
"postinstall": "node ./src-build/downloadNodeBinary.js",
"serve": "node src-build/serveForPlatform.js",
"serve:tauri": "node src-build/serveForPlatform.js tauri",
"serve:electron": "node src-build/serveForPlatform.js electron",
"postinstall": "node ./src-build/downloadNodeBinary.js && node ./src-build/setupElectron.js",
"cleanNodeBinary": "node src-build/cleanNodeBinary.js",
"installNodeArmDarwin": "node ./src-build/downloadNodeBinary.js '{\"platform\":\"darwin\",\"arch\":\"arm64\"}'",
"getPackageVersion": "node ./src-build/getVersion.js"
Expand All @@ -56,4 +52,4 @@
"branch": "tauri",
"commit": "23987dad9240266fd297cbb99202178a3f68a6b2"
}
}
}
29 changes: 0 additions & 29 deletions src-build/ci-disableBundleConfig.js

This file was deleted.

18 changes: 18 additions & 0 deletions src-build/downloadNodeBinary.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,24 @@ async function copyLatestNodeForBuild(platform, arch) {
console.log("Error Found:", err);
throw new Error(err);
}

// Also copy to src-electron/bin folder
const electronBinDir = (platform === "win") ? `${__dirname}\\..\\src-electron\\bin` : `${__dirname}/../src-electron/bin`;
const electronBinName = (platform === "win") ? "phnode.exe" : "phnode";
const electronDestNode = (platform === "win") ? `${electronBinDir}\\${electronBinName}` : `${electronBinDir}/${electronBinName}`;

try {
// Ensure the directory exists
if (!fs.existsSync(electronBinDir)) {
fs.mkdirSync(electronBinDir, { recursive: true });
}
fs.copyFileSync(srcNode, electronDestNode);
console.log("File copied to src-electron/bin successfully!");
} catch (err) {
console.log("Error copying to src-electron/bin:", err);
throw new Error(err);
}

await removeDir(fullPathOfNode);
}

Expand Down
Loading
Loading