Enable Typescript in sync-server (#4887)

* attempt at running with typescript

* release notes

* working jest tests for TS files

* working docker image build

* remaining docker images

* cleanup

* ensure vitest is working

* get tests passing in ci

* less strict

* update release notes

* use tsc compiled assets in the published package

* scripts

* update yarn.lock

* Use build path for electron app

* PR feedback: move sync-server build out of bin/build-browser

* PR feedback: undo moduleResolution change

* extend main tsconfig and fix types

* PR feedback on scripts and when the sync-server build runs

* fix lint (unrelated change)

---------

Co-authored-by: alecbakholdin <alecbakholdin@gmail.com>
This commit is contained in:
Roger Goldfinger
2025-05-05 20:45:49 -07:00
committed by GitHub
parent 4a7439da5e
commit 090345bd95
22 changed files with 71 additions and 64 deletions

View File

@@ -4,30 +4,27 @@
"license": "MIT",
"description": "actual syncing server",
"bin": {
"actual-server": "./bin/actual-server.js"
"actual-server": "./build/bin/actual-server.js"
},
"type": "module",
"files": [
"bin",
"src",
"app.js",
"migrations",
"build",
"default-db.sqlite",
"README.md",
"LICENSE"
],
"scripts": {
"start": "node app",
"start-monitor": "nodemon app",
"start": "yarn build && node build/app",
"start-monitor": "nodemon --exec 'tsc && node build/app' --ignore './build/**/*' --ext 'ts,js' build/app",
"build": "tsc",
"test": "NODE_ENV=test NODE_OPTIONS='--experimental-vm-modules --trace-warnings' vitest",
"db:migrate": "NODE_ENV=development node src/run-migrations.js up",
"db:downgrade": "NODE_ENV=development node src/run-migrations.js down",
"db:test-migrate": "NODE_ENV=test node src/run-migrations.js up",
"db:test-downgrade": "NODE_ENV=test node src/run-migrations.js down",
"reset-password": "node src/scripts/reset-password.js",
"disable-openid": "node src/scripts/disable-openid.js",
"health-check": "node src/scripts/health-check.js"
"db:migrate": "yarn build && cross-env NODE_ENV=development node build/src/scripts/run-migrations.js up",
"db:downgrade": "yarn build && cross-env NODE_ENV=development node build/src/scripts/run-migrations.js down",
"db:test-migrate": "yarn build && cross-env NODE_ENV=test node build/src/scripts/run-migrations.js up",
"db:test-downgrade": "yarn build && cross-env NODE_ENV=test node build/src/scripts/run-migrations.js down",
"reset-password": "yarn build && node build/src/scripts/reset-password.js",
"disable-openid": "yarn build && node build/src/scripts/disable-openid.js",
"health-check": "yarn build && node build/src/scripts/health-check.js"
},
"dependencies": {
"@actual-app/crdt": "2.1.0",