Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
b6bf441
New version.
agarny Oct 7, 2026
1602ced
Updated our dependencies.
agarny Oct 8, 2026
b2651c3
GHA: make sure that our actions can run on at least Node.js 24.
agarny Oct 9, 2026
8531977
CORS proxy: reworked it by checking the content of a requested file
agarny Oct 7, 2026
912ebda
Added CORS proxy fallback helper for URL fetches.
agarny Oct 8, 2026
7719afd
SED-ML: handle non-CVODE based simulations.
agarny Oct 7, 2026
ced4953
Hardened native libOpenCOR error handling.
agarny Oct 7, 2026
969e543
Fixed the reopening flow when files fail to open.
agarny Oct 7, 2026
ae06902
Interactive Simulation Experiment view: coalesce simulation input upd…
agarny Oct 7, 2026
37d31bd
Interactive Simulation Experiment view: prioritise the final slider …
agarny Oct 7, 2026
75542f5
Share our Math.js instance across our `Float64ArrayMath` objects.
agarny Oct 7, 2026
ef239ba
Interactive Simulation Experiment view: reuse the initial instance fo…
agarny Oct 7, 2026
36bd43d
Interactive Simulation Experiment view: guard the simulation state on…
agarny Oct 7, 2026
5a7dc03
Graph Panel widget: guard Plotly graph updates after unmounting.
agarny Oct 7, 2026
809bcfd
File: fixed unmanage lookup for canonicalised paths.
agarny Oct 7, 2026
e00a5e4
Hardened the opening of a file and its UI JSON handling.
agarny Oct 7, 2026
18a6f8e
Prevent a file from being open more than once.
agarny Oct 7, 2026
a7bfa4f
Stop a SED-ML run before releasing its SED-ML instance.
agarny Oct 7, 2026
7a47410
Normalise cloned UI JSON and settings snapshots.
agarny Oct 7, 2026
029f463
Optimised UI JSON cloning and settings change detection.
agarny Oct 7, 2026
a097219
Optimised simulation data lookup and retrieval.
agarny Oct 7, 2026
4242c38
Added support for partial simulation data and also refined margin syn…
agarny Oct 7, 2026
a9d0551
Prevent libOpenCOR teardown crashes.
agarny Oct 7, 2026
c2f1bda
Added IPC unsubscribe and OpenCOR cleanup tracking.
agarny Oct 7, 2026
a8e8e1e
Queue startup arguments until the renderer is ready.
agarny Oct 7, 2026
e74bffa
Handle renderer crashes and startup failures.
agarny Oct 7, 2026
0125bc5
Handle simulation wait errors safely.
agarny Oct 7, 2026
8787a40
Respect the menu state when refreshing the Reopen menu.
agarny Oct 7, 2026
2f3fe9c
Don't send messages to our renderer if the application window has bee…
agarny Oct 7, 2026
ef487fd
Add retries for libOpenCOR and lazy imports.
agarny Oct 7, 2026
cdf5bca
Speed startup by slimming down our splash screen window.
agarny Oct 7, 2026
7cefde4
Refactored PrimeIcons handling in Vite builds.
agarny Oct 8, 2026
d86300a
Ref-count OpenCOR overlay containers.
agarny Oct 8, 2026
a5dd094
Stream simulation data with slice ranges.
agarny Oct 8, 2026
f699268
Reuse the renderer's port, if possible, and harden file serving.
agarny Oct 8, 2026
48b5bce
Trimmed our Electron app packaging inputs.
agarny Oct 8, 2026
7d7102f
Check whether checking for updates should be allowed.
agarny Oct 8, 2026
0597233
Normalise argv handling across app instances.
agarny Oct 8, 2026
df30674
Fixed startup file reopen sequencing.
agarny Oct 8, 2026
2251bcb
Handle update install errors in the renderer.
agarny Oct 8, 2026
2b8d1cc
Prevent startup work in secondary instances.
agarny Oct 8, 2026
ceff1be
Lazily initialise xxHash's WASM.
agarny Oct 8, 2026
62f913a
Harden settings loading with some default settings.
agarny Oct 8, 2026
0cd2e8b
Reset off-screen window state on startup.
agarny Oct 8, 2026
9241f90
Hash the renderer's assets and adjusted the deployment ordering.
agarny Oct 8, 2026
2467812
Delay blob URL revocation for downloads.
agarny Oct 8, 2026
5ddcaf4
Optimise parameter population in vueCommon.
agarny Oct 8, 2026
1cbb16e
Preserve the state of the files to reopen after the renderer crashed.
agarny Oct 8, 2026
41d5769
Standard Simulation Experiment view: reset live data when starting a …
agarny Oct 8, 2026
c0cdb2a
Adjusted `fromFloat64ArrayForSchemaValidation()` so that it now detec…
agarny Oct 8, 2026
98f46be
Handle canonical paths for open files.
agarny Oct 8, 2026
b698aa9
Track pending file opens with promises.
agarny Oct 8, 2026
3dd6887
Hardened the error handling of the renderer's server's startup.
agarny Oct 8, 2026
c613846
Bind the renderer's server to both loopback IPs.
agarny Oct 8, 2026
1e81415
Expanded the support for math identifier.
agarny Oct 8, 2026
a25b76e
Hardened simulation instance cleanup paths.
agarny Oct 8, 2026
671cb5c
Handle loadURL() interruption when the main window closes.
agarny Oct 8, 2026
1265079
Reset the tracking of an update installation error.
agarny Oct 8, 2026
a481063
Increased the delay for revoking a download URL.
agarny Oct 8, 2026
77d6c01
Added jsDelivr host failover for module retries.
agarny Oct 8, 2026
8caae91
Updated our dependencies.
agarny Oct 8, 2026
86bc2b3
Simulation Property editor: round simulation steps from point interval.
agarny Oct 8, 2026
ebd7ec5
Added a safe reload option after the renderer crash.
agarny Oct 8, 2026
aa9c831
Block unsafe file-drop navigation.
agarny Oct 8, 2026
8250da7
Encode proxied URL query parameter.
agarny Oct 8, 2026
4d16fa4
Preserve pending files across renderer reloads.
agarny Oct 8, 2026
259a81e
Hardened simulation instance lifecycle handling.
agarny Oct 8, 2026
30e470a
Handle a renderer crash during an initial load.
agarny Oct 8, 2026
2fc22bb
Handle file-open failures gracefully.
agarny Oct 8, 2026
16c4f53
Handle a corrupt config with backup and reset.
agarny Oct 8, 2026
6ce758d
Refined the math token regex for decimal exponents.
agarny Oct 8, 2026
4c386b2
Fixed a stale Close menu state after reload.
agarny Oct 8, 2026
05b2323
Reuse isObject and hardened config handling.
agarny Oct 8, 2026
708ec12
Preserve invalid numeric entries as NaN.
agarny Oct 8, 2026
7b73c7a
Hardened libOpenCOR's glue import fallback.
agarny Oct 9, 2026
db34000
GHA: use `actions/checkout@v7` rather than `actions/checkout@v4`.
agarny Oct 9, 2026
b4c4171
Updated our dependencies.
agarny Oct 9, 2026
23c8b86
Handle AppImage's exec and macOS's `open-file`.
agarny Oct 10, 2026
bf7a0ff
Handle simulation run status errors.
agarny Oct 10, 2026
966acaf
Patched vue-tsc loading for Bun runtime.
agarny Oct 10, 2026
2f89ed2
Use shallow refs for DOM elements
agarny Oct 10, 2026
27a60d8
Added a `*.css` shim for TypeScript.
agarny Oct 10, 2026
e475ef3
Report non-numerical external data once.
agarny Oct 10, 2026
6838a5b
Handle decoded paths in file lookups.
agarny Oct 10, 2026
0e73b13
Only reset electron-conf on parse errors.
agarny Oct 10, 2026
71faae1
Fixed a file release when libOpenCOR throws.
agarny Oct 10, 2026
2e51555
Handle missing SED-ML tasks on invalid instances.
agarny Oct 10, 2026
ecb611d
Validate identifiers per evaluation scope.
agarny Oct 10, 2026
edf86d3
Canonicalise WASM file paths in file manager.
agarny Oct 11, 2026
34b20c7
Hardened UI JSON array normalisation.
agarny Oct 11, 2026
d947165
Only block cross-origin main-frame navigation.
agarny Oct 11, 2026
386afca
Interactive Simulation Experiment view: guard simulation data until s…
agarny Oct 11, 2026
6b1cca9
Fixed plot updates during simulation parameter changes.
agarny Oct 11, 2026
9e25a65
Native app: disable the main menu while the UI is blocked.
agarny Oct 11, 2026
c05c454
Native app: delay the menu until the renderer is ready.
agarny Oct 11, 2026
cba4e25
Native app: handle clean renderer exits during close.
agarny Oct 11, 2026
fdbf3ba
Interactive Simulation Experiment view: some minor cleaning up.
agarny Oct 11, 2026
e08b535
Interactive Simulation Experiment view: disable the settings dialog d…
agarny Oct 11, 2026
5b91992
Interactive Simulation Experiment view: keep the settings dialog disa…
agarny Oct 11, 2026
cec7983
Interactive Simulation Experiment view: initialise model parameters b…
agarny Oct 11, 2026
b21cb2d
Settings: preserve unknown settings sections on load.
agarny Oct 11, 2026
2a58cee
Native app: preserve skipped files in recent list.
agarny Oct 12, 2026
23e80f5
Handle all data URL files in reopen logic.
agarny Oct 12, 2026
5365713
Native app: block update checks during the installation flow.
agarny Oct 12, 2026
4f8c960
Native app: preserve the update state across renderer reloads.
agarny Oct 12, 2026
8670650
CI/CD: some minor cleaning up.
agarny Oct 12, 2026
e5bb249
CI/CI: fail FTP deployments when uploading fails.
agarny Oct 12, 2026
3e8ae87
Improved CORS proxy fallback error reporting.
agarny Oct 12, 2026
6cefdec
Use Map/Set for safer ID handling.
agarny Oct 12, 2026
a74b0ed
Reset panel margins when shared margins clear.
agarny Oct 12, 2026
daca1d4
Validate simulation point interval limits.
agarny Oct 12, 2026
d7a75a7
Unify input change-end handling.
agarny Oct 12, 2026
4f5ce0e
Hide the toolbar in simulation-only mode.
agarny Oct 12, 2026
a61008b
Skip settings hint in simulation-only mode.
agarny Oct 12, 2026
33df009
Handle macOS OpenCOR links before the window initialises.
agarny Oct 12, 2026
7cfe69d
New version.
agarny Oct 14, 2026
d332d1e
Updated our dependencies.
agarny Oct 14, 2026
73d9725
Use canonical paths for file state tracking.
agarny Oct 14, 2026
121f3f8
Handle data URL file errors cleanly.
agarny Oct 14, 2026
8bc66cd
Handle __proto__ safely in UI JSON cloning.
agarny Oct 14, 2026
076b8f8
Interactive Simulation Experiment view: always reset plot margins whe…
agarny Oct 14, 2026
c6e5888
Guard empty Float64Array memcpy.
agarny Oct 14, 2026
a3c0d38
Simplified SED-ML instance release cleanup.
agarny Oct 14, 2026
c47226e
Interactive Simulation Experiment view: cancel the active simulation …
agarny Oct 14, 2026
45ae6f4
Fixed dialog state cleanup on unmount.
agarny Oct 14, 2026
dabe809
Teleport settings dialog to OpenCOR's root.
agarny Oct 14, 2026
9e88706
Queue external requests while some dialogs are opened.
agarny Oct 14, 2026
da808cd
Interactive Simulation Experiment view: center our settings dialog ov…
agarny Oct 14, 2026
e9ae1f8
Constrain the dragging of a dialog drag to the element on which it is…
agarny Oct 14, 2026
04fb0cf
Skip the renderer recovery when the window is closing.
agarny Oct 14, 2026
c6c79d9
Fixed a stalled OpenCOR file open tracking.
agarny Oct 14, 2026
59bfacd
Relaxed CSV proxy validation by extension.
agarny Oct 14, 2026
578fbbf
Refined our input widget interaction tracking.
agarny Oct 14, 2026
dfcc8ce
Upgraded to Vite 8.
agarny Oct 14, 2026
2d5f999
Inject the app version into Vite builds.
agarny Oct 14, 2026
0a3eafc
Use `rolldownOptions` in Vite configs.
agarny Oct 14, 2026
8f88b2c
Native app: disabled our renderer's public asset bundling.
agarny Oct 14, 2026
74249c3
Removed our direct dependency on `esbuild`.
agarny Oct 14, 2026
676771c
Enabled explicit `.ts` imports in our config files.
agarny Oct 14, 2026
11c4687
Fixed TS config boundaries and script typing.
agarny Oct 14, 2026
0b9bbdf
Clarified Plotly's resize cleanup comment.
agarny Oct 14, 2026
0470c0c
Fixed Plotly's legend double-click handling.
agarny Oct 14, 2026
90b6567
Fixed AppImage relaunch path on reset.
agarny Oct 14, 2026
f21aaa2
Fixed recent-file reopening paths.
agarny Oct 14, 2026
079d25b
Canonicalise recovered recent file paths.
agarny Oct 14, 2026
42445dd
Detect XML encoding before parsing the root tag.
agarny Oct 14, 2026
d4077c2
Reduced the OMEX memory used in our CORS proxy.
agarny Oct 14, 2026
41c7b31
Hide the config prompt in simulation mode.
agarny Oct 14, 2026
f51ad0d
Hardened our general settings merge against `__proto__`.
agarny Oct 14, 2026
c9d5f99
Hardened Bun's `vue-tsc` patching.
agarny Oct 14, 2026
17fdf21
Documented OpenCOR's WASM's embedding requirements.
agarny Oct 15, 2026
6cca2ec
Adjusted the renderer's publicDir for dev libOpenCOR.
agarny Oct 15, 2026
4022304
Improved our config reset error reporting.
agarny Oct 15, 2026
6496b83
Native app: discard reopen files on crash quit/reload.
agarny Oct 15, 2026
34a0f7c
Input widget: handle pointer takeover.
agarny Oct 15, 2026
c6ba18a
Align our C++ SED-ML behaviour with our WASM semantics.
agarny Oct 15, 2026
af212a9
Added Web asset pruning to our CD deployments.
agarny Oct 15, 2026
6422ffd
Added Web cache headers and extended our prune grace.
agarny Oct 15, 2026
c25da75
CD: archive our Web app before deploying it.
agarny Oct 15, 2026
1dd8d7d
Interactive Simulation Experiment view: clear default model changes o…
agarny Oct 15, 2026
38ebb80
CORS proxy server: handle oversized proxy streams safely.
agarny Oct 15, 2026
a34cc59
CORS proxy server: normalised the arrow function return style.
agarny Oct 15, 2026
8afd197
Preserve arguments when relaunching AppImage.
agarny Oct 15, 2026
1c9a93b
Hardened AppImage path detection on Linux.
agarny Oct 15, 2026
dc8d9c7
Use a Dialog'`ref` for container/mask lookup.
agarny Oct 15, 2026
1c6298a
Native app: handle the renderer's reload during a file open operation.
agarny Oct 15, 2026
dc43595
Fixed ZIP CellML data URL filename handling.
agarny Oct 15, 2026
d042996
Fail when `vue-tsc` does not patch `tsc`.
agarny Oct 15, 2026
a3da6d1
CORS proxy server: handle long XML prologs in CORS sniffing.
agarny Oct 15, 2026
e0d2eed
Fixed a file-open notifications ordering.
agarny Oct 15, 2026
441b3ea
Fixed File|Reopen menu label formatting.
agarny Oct 15, 2026
81619f6
Updated our dependencies.
agarny Oct 15, 2026
9af1a6b
Keep our UI enabled after a renderer failure.
agarny Oct 15, 2026
d28df06
Tightened CSV extension check after redirects.
agarny Oct 15, 2026
b3192a3
Wrapped the external file selection in a request handler.
agarny Oct 15, 2026
18257aa
Use temporary files during FTP deployment.
agarny Oct 15, 2026
ededb47
Share data URL counters across OpenCOR.
agarny Oct 15, 2026
afc0b64
Fallback to a direct fetch on any proxy error.
agarny Oct 15, 2026
fce2231
Handle Windows session end in `MainWindow`.
agarny Oct 15, 2026
d9ea2f5
Use reactive `voiUnit` in interactive simulation.
agarny Oct 15, 2026
5ee940a
Clear stale model changes on invalid UI JSON.
agarny Oct 15, 2026
41e5d07
Use canonicalised file lookup in libOpenCOR.
agarny Oct 15, 2026
c3536e2
New version.
agarny Oct 15, 2026
00f72c0
Updated our dependencies.
agarny Oct 15, 2026
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
75 changes: 53 additions & 22 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ jobs:
DEVELOPER_ID_APPLICATION_CERTIFICATE_BASE64: ${{ secrets.DEVELOPER_ID_APPLICATION_CERTIFICATE_BASE64 }}
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
with:
timezoneWindows: 'New Zealand Standard Time'
timezoneLinux: 'Pacific/Auckland'
timezoneMacos: 'Pacific/Auckland'
shell: bash
run: |
case "${RUNNER_OS}" in
Windows) MSYS_NO_PATHCONV=1 tzutil /s "New Zealand Standard Time" ;;
Linux) sudo timedatectl set-timezone Pacific/Auckland ;;
macOS) sudo systemsetup -settimezone Pacific/Auckland ;;
esac
- name: Check out OpenCOR
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Retrieve the EV certificate (Windows only)
if: ${{ runner.os == 'Windows' }}
shell: bash
Expand Down Expand Up @@ -95,13 +97,16 @@ jobs:
if: ${{ github.repository == 'opencor/webapp' }}
name: Web app
runs-on: ubuntu-22.04
concurrency:
group: web-app-deployment-app
cancel-in-progress: false
# Note: our deployments must not overlap since they would otherwise interfere with one another, e.g. when uploading
# index.html or when pruning our old assets (see below).
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: 'Pacific/Auckland'
run: sudo timedatectl set-timezone Pacific/Auckland
- name: Check out OpenCOR
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: OpenCOR dependencies
Expand All @@ -113,7 +118,13 @@ jobs:
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
run: bun build:web
- name: Archive OpenCOR's Web app
id: archive
run: bun archive:web
# Note: we archive our Web app before deploying it since the deployment adds a .deploy-running file to
# src/renderer/dist, which would otherwise end up in our archive.
- name: Deploy to https://opencor.ws/app/
id: deploy
uses: milanmk/actions-file-deployer@master
with:
remote-protocol: sftp
Expand All @@ -123,28 +134,48 @@ jobs:
local-path: ./src/renderer/dist
remote-path: /home/www/opencor.ws/app
sync: full
# Note: we upload version.json last so that OpenCOR's Web app only reports a new version once all the other
# files have been uploaded.
ftp-mirror-options: --exclude-glob=assets/version.json
ftp-post-sync-commands: put -O /home/www/opencor.ws/app/assets ./src/renderer/dist/assets/version.json
- name: Archive OpenCOR's Web app
run: bun archive:web
ftp-options: set cmd:fail-exit yes; set xfer:use-temp-file yes
# Note #1: lftp carries on after a command has failed, so we ask it to exit instead. Otherwise, if some of our
# assets couldn't be uploaded, index.html and version.json would still get uploaded (see below), and
# index.html would reference assets that are not available.
# Note #2: lftp uploads a file in place by default, and it uploads all our files on every deployment (since
# they are all newer than their remote counterpart), including assets that are still referenced by
# the live index.html. So, a browser could get a partially uploaded asset and, since our hashed
# assets are cached for good (see public/.htaccess), keep using it. So, we ask lftp to upload each
# file to a temporary file (named .in.<file name>), which it then renames to its final name.
ftp-mirror-options: --exclude-glob=index.html --exclude-glob=assets/version.json
ftp-post-sync-commands: put -O /home/www/opencor.ws/app ./src/renderer/dist/index.html; put -O /home/www/opencor.ws/app/assets ./src/renderer/dist/assets/version.json
# Note: our assets have a hash in their file names, so we upload index.html (which references them) once they
# have all been uploaded, so that it never references assets that are not available yet. Then, we upload
# version.json last so that OpenCOR's Web app only reports a new version once all the other files have
# been uploaded.
- name: Release OpenCOR's Web app
uses: softprops/action-gh-release@v2
if: ${{ !cancelled() && steps.archive.outcome == 'success' }}
uses: softprops/action-gh-release@v3
with:
files: dist/OpenCOR-*-WebApp.tar.gz
# Note: we release our Web app even if it couldn't be deployed, so that a deployment failure (e.g., a transient
# SFTP error) doesn't also deprive our release of its Web app archive.
- name: Prune old assets from https://opencor.ws/app/
if: ${{ !cancelled() && steps.deploy.outcome == 'success' }}
env:
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: bun prune:web /home/www/opencor.ws/app
# Note: our assets have a hash in their file names, so old assets would otherwise accumulate on the server. They
# are only deleted after a grace period since some clients may still be using a previous index.html (see
# src/renderer/scripts/prune.web.ts).
npm:
if: ${{ github.repository == 'opencor/webapp' }}
runs-on: ubuntu-22.04
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: 'Pacific/Auckland'
run: sudo timedatectl set-timezone Pacific/Auckland
- name: Check out OpenCOR
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
Expand Down
39 changes: 31 additions & 8 deletions .github/workflows/cddev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ jobs:
if: ${{ github.repository == 'opencor/webapp' }}
name: Web app
runs-on: ubuntu-22.04
concurrency:
group: web-app-deployment-appdev
cancel-in-progress: false
# Note: our deployments must not overlap since they would otherwise interfere with one another, e.g. when uploading
# index.html or when pruning our old assets (see below).
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: 'Pacific/Auckland'
run: sudo timedatectl set-timezone Pacific/Auckland
- name: Check out OpenCOR
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: OpenCOR dependencies
Expand All @@ -38,7 +41,27 @@ jobs:
local-path: ./src/renderer/dist
remote-path: /home/www/opencor.ws/appdev
sync: full
# Note: we upload version.json last so that OpenCOR's Web app only reports a new version once all the other
# files have been uploaded.
ftp-mirror-options: --exclude-glob=assets/version.json
ftp-post-sync-commands: put -O /home/www/opencor.ws/appdev/assets ./src/renderer/dist/assets/version.json
ftp-options: set cmd:fail-exit yes; set xfer:use-temp-file yes
# Note #1: lftp carries on after a command has failed, so we ask it to exit instead. Otherwise, if some of our
# assets couldn't be uploaded, index.html and version.json would still get uploaded (see below), and
# index.html would reference assets that are not available.
# Note #2: lftp uploads a file in place by default, and it uploads all our files on every deployment (since
# they are all newer than their remote counterpart), including assets that are still referenced by
# the live index.html. So, a browser could get a partially uploaded asset and, since our hashed
# assets are cached for good (see public/.htaccess), keep using it. So, we ask lftp to upload each
# file to a temporary file (named .in.<file name>), which it then renames to its final name.
ftp-mirror-options: --exclude-glob=index.html --exclude-glob=assets/version.json
ftp-post-sync-commands: put -O /home/www/opencor.ws/appdev ./src/renderer/dist/index.html; put -O /home/www/opencor.ws/appdev/assets ./src/renderer/dist/assets/version.json
# Note: our assets have a hash in their file names, so we upload index.html (which references them) once they
# have all been uploaded, so that it never references assets that are not available yet. Then, we upload
# version.json last so that OpenCOR's Web app only reports a new version once all the other files have
# been uploaded.
- name: Prune old assets from https://opencor.ws/appdev/
env:
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: bun prune:web /home/www/opencor.ws/appdev
# Note: our assets have a hash in their file names, so old assets would otherwise accumulate on the server. They
# are only deleted after a grace period since some clients may still be using a previous index.html (see
# src/renderer/scripts/prune.web.ts).
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ jobs:
os: ubuntu-22.04
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
with:
timezoneWindows: 'New Zealand Standard Time'
timezoneLinux: 'Pacific/Auckland'
timezoneMacos: 'Pacific/Auckland'
shell: bash
run: |
case "${RUNNER_OS}" in
Windows) MSYS_NO_PATHCONV=1 tzutil /s "New Zealand Standard Time" ;;
Linux) sudo timedatectl set-timezone Pacific/Auckland ;;
macOS) sudo systemsetup -settimezone Pacific/Auckland ;;
esac
- name: Check out OpenCOR
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install bun
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ out
src/renderer/components.d.ts

# Generated by Vite
src/renderer/public
src/renderer/public/libopencor
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ add_library(${CMAKE_PROJECT_NAME} SHARED
${CMAKE_JS_SRC}
${CPP_FILES})

# Convert any C++ exception (and not just Napi::Error) into a JavaScript exception rather than have it terminate the
# renderer process.

target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE
NODE_ADDON_API_CPP_EXCEPTIONS_ALL)

# Don't have a "lib" prefix and use a ".node" suffix.

set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
Expand Down
Loading
Loading