Compare commits

..

No commits in common. "ca72e94e3c70d81adc8c6c55f68ff2426cf5cd88" and "145f9ef18f525b9607718e7573742f28cb95b2f3" have entirely different histories.

9 changed files with 55 additions and 76 deletions

2
.nvmrc
View File

@ -1 +1 @@
v22.7.0
v20.11.1

View File

@ -1,5 +1,5 @@
# FRONTEND
FROM node:22-alpine as client
FROM node:20-alpine as client
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

View File

@ -14,7 +14,7 @@
<a href=""><img src="./.github/lokalise.png" height="50">
<br/><br/>
EN | [简体中文](README_zh-CN.md) | [ES](README_ES.md)
EN | [简体中文](README_zh-CN.md) | [ES](README_ES.md)
## About?
@ -149,8 +149,8 @@ There is a [guide](https://mariushosting.com/how-to-install-cryptgeon-on-your-sy
**Requirements**
- `pnpm`: `>=9`
- `node`: `>=22`
- `pnpm`: `>=6`
- `node`: `>=18`
- `rust`: edition `2021`
**Install**

View File

@ -1,6 +1,6 @@
{
"scripts": {
"dev:docker": "docker compose -f docker-compose.dev.yaml up redis",
"dev:docker": "docker-compose -f docker-compose.dev.yaml up redis",
"dev:packages": "pnpm --parallel run dev",
"dev": "run-p dev:*",
"docker:up": "docker compose -f docker-compose.dev.yaml up",
@ -12,8 +12,8 @@
"build": "pnpm run --recursive --filter=!@cryptgeon/backend build"
},
"devDependencies": {
"@playwright/test": "^1.46.1",
"@types/node": "^22.5.0",
"@playwright/test": "^1.42.1",
"@types/node": "^20.11.28",
"npm-run-all": "^4.1.5",
"shelljs": "^0.8.5"
},

View File

@ -1,14 +0,0 @@
import pkg from './package.json' with { type: 'json' }
import { build } from 'tsup'
const watch = process.argv.slice(2)[0] === '--watch'
await build({
entry: ['src/index.ts', 'src/cli.ts'],
dts: true,
minify: true,
format: ['esm', 'cjs'],
clean: true,
define: { VERSION: `"${pkg.version}"` },
watch,
})

View File

@ -20,8 +20,7 @@
],
"scripts": {
"bin": "run-s build package",
"build": "tsc && node build.js",
"dev": "node build.js --watch",
"build": "rm -rf dist && tsc && tsup ./src/index.ts ./src/cli.ts --dts --format esm,cjs --minify",
"prepublishOnly": "run-s build"
},
"devDependencies": {

View File

@ -36,7 +36,7 @@ type CallOptions = {
export class PayloadToLargeError extends Error {}
export let client: ClientOptions = {
server: '',
server: 'https://cryptgeon.org',
}
export function setOptions(options: Partial<ClientOptions>) {

View File

@ -4,13 +4,12 @@ const config: PlaywrightTestConfig = {
use: {
video: 'retain-on-failure',
baseURL: 'http://localhost:1234',
actionTimeout: 10_000,
actionTimeout: 60_000,
},
outputDir: './test-results',
testDir: './test',
timeout: 10_000,
fullyParallel: true,
timeout: 60_000,
webServer: {
command: 'docker compose -f docker-compose.dev.yaml up',

91
pnpm-lock.yaml generated
View File

@ -9,11 +9,11 @@ importers:
.:
devDependencies:
'@playwright/test':
specifier: ^1.46.1
version: 1.46.1
specifier: ^1.42.1
version: 1.42.1
'@types/node':
specifier: ^22.5.0
version: 22.5.0
specifier: ^20.11.28
version: 20.11.28
npm-run-all:
specifier: ^4.1.5
version: 4.1.5
@ -91,13 +91,13 @@ importers:
version: 12.1.0
'@sveltejs/adapter-static':
specifier: ^3.0.1
version: 3.0.1(@sveltejs/kit@2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0)))(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0)))
version: 3.0.1(@sveltejs/kit@2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28)))(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28)))
'@sveltejs/kit':
specifier: ^2.5.2
version: 2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0)))(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0))
version: 2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28)))(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28))
'@sveltejs/vite-plugin-svelte':
specifier: ^3.0.2
version: 3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0))
version: 3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28))
'@types/file-saver':
specifier: ^2.0.7
version: 2.0.7
@ -127,7 +127,7 @@ importers:
version: 5.3.3
vite:
specifier: ^5.1.7
version: 5.1.7(@types/node@22.5.0)
version: 5.1.7(@types/node@20.11.28)
packages/proxy:
dependencies:
@ -590,9 +590,9 @@ packages:
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
'@playwright/test@1.46.1':
resolution: {integrity: sha512-Fq6SwLujA/DOIvNC2EL/SojJnkKf/rAwJ//APpJJHRyMi1PdKrY3Az+4XNQ51N4RTbItbIByQ0jgd1tayq1aeA==}
engines: {node: '>=18'}
'@playwright/test@1.42.1':
resolution: {integrity: sha512-Gq9rmS54mjBL/7/MvBaNOBwbfnh7beHvS6oS4srqXFcQHpQCV1+c8JXWE8VLPyRDhgS3H8x8A7hztqI9VnwrAQ==}
engines: {node: '>=16'}
hasBin: true
'@polka/url@1.0.0-next.24':
@ -790,8 +790,8 @@ packages:
'@types/node@20.11.24':
resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==}
'@types/node@22.5.0':
resolution: {integrity: sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==}
'@types/node@20.11.28':
resolution: {integrity: sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==}
'@types/pug@2.0.10':
resolution: {integrity: sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==}
@ -1705,14 +1705,14 @@ packages:
resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==}
engines: {node: '>= 6'}
playwright-core@1.46.1:
resolution: {integrity: sha512-h9LqIQaAv+CYvWzsZ+h3RsrqCStkBHlgo6/TJlFst3cOTlLghBQlJwPOZKQJTKNaD3QIB7aAVQ+gfWbN3NXB7A==}
engines: {node: '>=18'}
playwright-core@1.42.1:
resolution: {integrity: sha512-mxz6zclokgrke9p1vtdy/COWBH+eOZgYUVVU34C73M+4j4HLlQJHtfcqiqqxpP0o8HhMkflvfbquLX5dg6wlfA==}
engines: {node: '>=16'}
hasBin: true
playwright@1.46.1:
resolution: {integrity: sha512-oPcr1yqoXLCkgKtD5eNUPLiN40rYEM39odNpIb6VE6S7/15gJmA1NzVv6zJYusV0e7tzvkU/utBFNa/Kpxmwng==}
engines: {node: '>=18'}
playwright@1.42.1:
resolution: {integrity: sha512-PgwB03s2DZBcNRoW+1w9E+VkLBxweib6KTXM0M3tkiT4jVxKSi6PmVJ591J+0u10LUrgxB7dLRbiJqO5s2QPMg==}
engines: {node: '>=16'}
hasBin: true
possible-typed-array-names@1.0.0:
@ -2149,9 +2149,6 @@ packages:
undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
undici-types@6.19.8:
resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
update-browserslist-db@1.0.13:
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
hasBin: true
@ -2591,9 +2588,9 @@ snapshots:
'@pkgjs/parseargs@0.11.0':
optional: true
'@playwright/test@1.46.1':
'@playwright/test@1.42.1':
dependencies:
playwright: 1.46.1
playwright: 1.42.1
'@polka/url@1.0.0-next.24': {}
@ -2684,13 +2681,13 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.21.0':
optional: true
'@sveltejs/adapter-static@3.0.1(@sveltejs/kit@2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0)))(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0)))':
'@sveltejs/adapter-static@3.0.1(@sveltejs/kit@2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28)))(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28)))':
dependencies:
'@sveltejs/kit': 2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0)))(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0))
'@sveltejs/kit': 2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28)))(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28))
'@sveltejs/kit@2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0)))(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0))':
'@sveltejs/kit@2.5.2(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28)))(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28))':
dependencies:
'@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0))
'@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28))
'@types/cookie': 0.6.0
cookie: 0.6.0
devalue: 4.3.2
@ -2704,28 +2701,28 @@ snapshots:
sirv: 2.0.4
svelte: 4.2.12
tiny-glob: 0.2.9
vite: 5.1.7(@types/node@22.5.0)
vite: 5.1.7(@types/node@20.11.28)
'@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0)))(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0))':
'@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28)))(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28))':
dependencies:
'@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0))
'@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28))
debug: 4.3.4
svelte: 4.2.12
vite: 5.1.7(@types/node@22.5.0)
vite: 5.1.7(@types/node@20.11.28)
transitivePeerDependencies:
- supports-color
'@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0))':
'@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28))':
dependencies:
'@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0)))(svelte@4.2.12)(vite@5.1.7(@types/node@22.5.0))
'@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28)))(svelte@4.2.12)(vite@5.1.7(@types/node@20.11.28))
debug: 4.3.4
deepmerge: 4.3.1
kleur: 4.1.5
magic-string: 0.30.7
svelte: 4.2.12
svelte-hmr: 0.15.3(svelte@4.2.12)
vite: 5.1.7(@types/node@22.5.0)
vitefu: 0.2.5(vite@5.1.7(@types/node@22.5.0))
vite: 5.1.7(@types/node@20.11.28)
vitefu: 0.2.5(vite@5.1.7(@types/node@20.11.28))
transitivePeerDependencies:
- supports-color
@ -2746,15 +2743,15 @@ snapshots:
dependencies:
undici-types: 5.26.5
'@types/node@22.5.0':
'@types/node@20.11.28':
dependencies:
undici-types: 6.19.8
undici-types: 5.26.5
'@types/pug@2.0.10': {}
'@types/through@0.0.33':
dependencies:
'@types/node': 22.5.0
'@types/node': 20.11.24
'@zerodevx/svelte-toast@0.9.5(svelte@4.2.12)':
dependencies:
@ -3697,11 +3694,11 @@ snapshots:
pirates@4.0.6: {}
playwright-core@1.46.1: {}
playwright-core@1.42.1: {}
playwright@1.46.1:
playwright@1.42.1:
dependencies:
playwright-core: 1.46.1
playwright-core: 1.42.1
optionalDependencies:
fsevents: 2.3.2
@ -4203,8 +4200,6 @@ snapshots:
undici-types@5.26.5: {}
undici-types@6.19.8: {}
update-browserslist-db@1.0.13(browserslist@4.23.0):
dependencies:
browserslist: 4.23.0
@ -4218,18 +4213,18 @@ snapshots:
spdx-correct: 3.2.0
spdx-expression-parse: 3.0.1
vite@5.1.7(@types/node@22.5.0):
vite@5.1.7(@types/node@20.11.28):
dependencies:
esbuild: 0.19.12
postcss: 8.4.35
rollup: 4.12.0
optionalDependencies:
'@types/node': 22.5.0
'@types/node': 20.11.28
fsevents: 2.3.3
vitefu@0.2.5(vite@5.1.7(@types/node@22.5.0)):
vitefu@0.2.5(vite@5.1.7(@types/node@20.11.28)):
optionalDependencies:
vite: 5.1.7(@types/node@22.5.0)
vite: 5.1.7(@types/node@20.11.28)
wcwidth@1.0.1:
dependencies: