chore: some small fixes and native deps config

This commit is contained in:
Rafael Taranto 2025-05-23 18:01:23 +01:00
parent 465dd5af7c
commit e84490bbca
11 changed files with 146 additions and 3646 deletions

View file

@ -1 +1,3 @@
nodejs 22 nodejs 22
pnpm 10
python 3

View file

@ -16,7 +16,7 @@ We do not generally accept outside pull requests for new features. Please consul
- Python 3 (to be deprecated, required by a single dependency installation) - Python 3 (to be deprecated, required by a single dependency installation)
- OpenSSL (for cert-gen.sh, it will set up the server self-signed certificates) - OpenSSL (for cert-gen.sh, it will set up the server self-signed certificates)
There's a shell.nix file that you can use to set up your env in case you're a nix user. There's a shell.nix file that you can use to set up your env in case you're a nix user. (most reliable way of installing native deps)
There's also a .tool-versions for asdf and mise users. There's also a .tool-versions for asdf and mise users.
This project uses Turbo for monorepo management. Install dependencies: This project uses Turbo for monorepo management. Install dependencies:

View file

@ -5,7 +5,7 @@ import json from '@eslint/json'
import { defineConfig, globalIgnores } from 'eslint/config' import { defineConfig, globalIgnores } from 'eslint/config'
import reactCompiler from 'eslint-plugin-react-compiler' import reactCompiler from 'eslint-plugin-react-compiler'
import eslintConfigPrettier from 'eslint-config-prettier/flat' import eslintConfigPrettier from 'eslint-config-prettier/flat'
import pluginJest from 'eslint-plugin-jest' import vitest from 'eslint-plugin-vitest'
export default defineConfig([ export default defineConfig([
globalIgnores([ globalIgnores([
@ -60,16 +60,12 @@ export default defineConfig([
{ {
// update this to match your test files // update this to match your test files
files: ['**/*.spec.js', '**/*.test.js'], files: ['**/*.spec.js', '**/*.test.js'],
plugins: { jest: pluginJest }, plugins: {
languageOptions: { vitest,
globals: pluginJest.environments.globals.globals,
}, },
rules: { rules: {
'jest/no-disabled-tests': 'warn', ...vitest.configs.recommended.rules, // you can also use vitest.configs.all.rules to enable all rules
'jest/no-focused-tests': 'error', 'vitest/max-nested-describe': ['error', { max: 3 }], // you can also modify rules' behavior using option like this
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
}, },
}, },
]) ])

View file

@ -12,16 +12,15 @@
"engines": { "engines": {
"node": ">=22.0.0" "node": ">=22.0.0"
}, },
"workspaces": [],
"devDependencies": { "devDependencies": {
"@eslint/css": "^0.7.0", "@eslint/css": "^0.7.0",
"@eslint/js": "^9.26.0", "@eslint/js": "^9.26.0",
"@eslint/json": "^0.12.0", "@eslint/json": "^0.12.0",
"eslint": "^9.26.0", "eslint": "^9.26.0",
"eslint-config-prettier": "^10.1.5", "eslint-config-prettier": "^10.1.5",
"eslint-plugin-jest": "^28.11.0",
"eslint-plugin-react": "^7.37.5", "eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-compiler": "^19.1.0-rc.1", "eslint-plugin-react-compiler": "^19.1.0-rc.1",
"eslint-plugin-vitest": "^0.5.4",
"globals": "^16.1.0", "globals": "^16.1.0",
"husky": "^8.0.0", "husky": "^8.0.0",
"lint-staged": "^16.0.0", "lint-staged": "^16.0.0",
@ -31,8 +30,7 @@
"scripts": { "scripts": {
"prepare": "husky install", "prepare": "husky install",
"build": "turbo build", "build": "turbo build",
"dev": "turbo dev", "dev": "turbo watch dev",
"start": "turbo start",
"test": "turbo test", "test": "turbo test",
"clean": "turbo clean", "clean": "turbo clean",
"server:dev": "turbo dev --filter=lamassu-server", "server:dev": "turbo dev --filter=lamassu-server",

View file

@ -55,7 +55,6 @@
"vitest": "^3.1.4" "vitest": "^3.1.4"
}, },
"scripts": { "scripts": {
"start": "vite",
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
"preview": "vite preview", "preview": "vite preview",

View file

@ -1,10 +1,12 @@
import IconButton from '@mui/material/IconButton'
import Tooltip from '@mui/material/Tooltip'
import Visibility from '@mui/icons-material/Visibility' import Visibility from '@mui/icons-material/Visibility'
import { format } from 'date-fns/fp' import { format } from 'date-fns/fp'
import * as R from 'ramda' import * as R from 'ramda'
import React, { useMemo } from 'react' import React, { useMemo } from 'react'
import { MaterialReactTable, useMaterialReactTable } from 'material-react-table' import {
MaterialReactTable,
MRT_ActionMenuItem,
useMaterialReactTable,
} from 'material-react-table'
import { MainStatus } from '../../components/Status' import { MainStatus } from '../../components/Status'
import TxInIcon from '../../styling/icons/direction/cash-in.svg?react' import TxInIcon from '../../styling/icons/direction/cash-in.svg?react'
import TxOutIcon from '../../styling/icons/direction/cash-out.svg?react' import TxOutIcon from '../../styling/icons/direction/cash-out.svg?react'
@ -120,16 +122,15 @@ const CustomersList = ({ data, country, onClick, loading }) => {
state: { isLoading: loading }, state: { isLoading: loading },
getRowId: it => it.id, getRowId: it => it.id,
enableRowActions: true, enableRowActions: true,
positionActionsColumn: 'last', renderRowActionMenuItems: ({ row }) => [
renderRowActions: ({ row }) => ( <MRT_ActionMenuItem //or just use a normal MUI MenuItem component
<div> icon={<Visibility />}
<Tooltip title="Customer page"> key="view"
<IconButton aria-label="Go to customer" onClick={() => onClick(row)}> label="View"
<Visibility /> onClick={() => onClick(row)}
</IconButton> table={table}
</Tooltip> />,
</div> ],
),
}) })
return ( return (

View file

@ -86,9 +86,9 @@
"serve-static": "^1.12.4", "serve-static": "^1.12.4",
"talisman": "^0.20.0", "talisman": "^0.20.0",
"telnyx": "^1.25.5", "telnyx": "^1.25.5",
"typesafe-db": "workspace:*",
"tronweb": "^5.3.0", "tronweb": "^5.3.0",
"twilio": "^3.6.1", "twilio": "^3.6.1",
"typesafe-db": "workspace:*",
"uuid": "8.3.2", "uuid": "8.3.2",
"web3": "1.7.1", "web3": "1.7.1",
"winston": "^2.4.2", "winston": "^2.4.2",
@ -126,32 +126,12 @@
"lamassu-clean-parsed-id": "./bin/lamassu-clean-parsed-id" "lamassu-clean-parsed-id": "./bin/lamassu-clean-parsed-id"
}, },
"scripts": { "scripts": {
"build": "echo 'Server requires no build step'",
"start": "node bin/lamassu-server",
"dev": "concurrently \"npm:server\" \"npm:admin-server\"", "dev": "concurrently \"npm:server\" \"npm:admin-server\"",
"jtest": "jest --detectOpenHandles", "server": "node bin/lamassu-server --mockScoring --logLevel silly --watch",
"build-admin": "npm run build-admin:css && npm run build-admin:main && npm run build-admin:lamassu", "admin-server": "node bin/lamassu-admin-server --dev --logLevel silly --watch",
"server": "nodemon bin/lamassu-server --mockScoring --logLevel silly",
"admin-server": "nodemon bin/lamassu-admin-server --dev --logLevel silly",
"watch": "concurrently \"npm:server\" \"npm:admin-server\"",
"stress-test": "cd tests/stress/ && node index.js 50 -v" "stress-test": "cd tests/stress/ && node index.js 50 -v"
}, },
"nodemonConfig": {
"ignore": [
"new-lamassu-admin/*"
]
},
"devDependencies": { "devDependencies": {
"concurrently": "^5.3.0", "concurrently": "^5.3.0"
"jest": "^26.6.3",
"nodemon": "^2.0.6",
"standard": "^12.0.1"
},
"standard": {
"ignore": [
"/lamassu-admin-elm",
"/public",
"/new-lamassu-admin"
]
} }
} }

View file

@ -17,7 +17,6 @@
}, },
"scripts": { "scripts": {
"build": "tsc --build", "build": "tsc --build",
"start": "tsc --watch",
"dev": "tsc --watch", "dev": "tsc --watch",
"generate-types": "kysely-codegen --camel-case --out-file ./src/types/types.d.ts", "generate-types": "kysely-codegen --camel-case --out-file ./src/types/types.d.ts",
"postinstall": "npm run build" "postinstall": "npm run build"

3681
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,23 @@
packages: packages:
- 'packages/server' - packages/server
- 'packages/admin-ui' - packages/admin-ui
- 'packages/typesafe-db' - packages/typesafe-db
onlyBuiltDependencies:
- '@apollo/protobufjs'
- '@swc/core'
- '@tailwindcss/oxide'
- argon2
- bufferutil
- cbor-extract
- ccxt
- es5-ext
- esbuild
- iconv
- keccak
- node-expat
- secp256k1
- tiny-secp256k1
- utf-8-validate
- web3
- web3-bzz
- web3-shh

View file

@ -17,11 +17,6 @@
], ],
"outputs": ["lib/**", "dist/**", "build/**"] "outputs": ["lib/**", "dist/**", "build/**"]
}, },
"start": {
"dependsOn": ["^build"],
"cache": false,
"persistent": true
},
"dev": { "dev": {
"dependsOn": ["^build"], "dependsOn": ["^build"],
"cache": false, "cache": false,