Skip to content

Commit 2006be0

Browse files
authored
Merge pull request #145 from cupcakearmy/better-programmatic-access
better programmatic access
2 parents 5648c76 + ca72e94 commit 2006be0

File tree

15 files changed

+2883
-1827
lines changed

15 files changed

+2883
-1827
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.11.1
1+
v22.7.0

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# FRONTEND
2-
FROM node:20-alpine as client
2+
FROM node:22-alpine as client
33
ENV PNPM_HOME="/pnpm"
44
ENV PATH="$PNPM_HOME:$PATH"
55
RUN corepack enable

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<a href=""><img src="./.github/lokalise.png" height="50">
1515
<br/><br/>
1616

17-
EN | [简体中文](README_zh-CN.md) | [ES](README_ES.md)
17+
EN | [简体中文](README_zh-CN.md) | [ES](README_ES.md)
1818

1919
## About?
2020

@@ -149,8 +149,8 @@ There is a [guide](https://mariushosting.com/how-to-install-cryptgeon-on-your-sy
149149

150150
**Requirements**
151151

152-
- `pnpm`: `>=6`
153-
- `node`: `>=18`
152+
- `pnpm`: `>=9`
153+
- `node`: `>=22`
154154
- `rust`: edition `2021`
155155

156156
**Install**

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scripts": {
3-
"dev:docker": "docker-compose -f docker-compose.dev.yaml up redis",
3+
"dev:docker": "docker compose -f docker-compose.dev.yaml up redis",
44
"dev:packages": "pnpm --parallel run dev",
55
"dev": "run-p dev:*",
66
"docker:up": "docker compose -f docker-compose.dev.yaml up",
@@ -12,10 +12,10 @@
1212
"build": "pnpm run --recursive --filter=!@cryptgeon/backend build"
1313
},
1414
"devDependencies": {
15-
"@playwright/test": "^1.42.1",
16-
"@types/node": "^20.11.28",
15+
"@playwright/test": "^1.46.1",
16+
"@types/node": "^22.5.0",
1717
"npm-run-all": "^4.1.5",
1818
"shelljs": "^0.8.5"
1919
},
20-
"packageManager": "pnpm@8.15.4"
20+
"packageManager": "pnpm@9.8.0"
2121
}

packages/backend/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/backend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cryptgeon"
3-
version = "2.6.1"
3+
version = "2.7.0"
44
authors = ["cupcakearmy <[email protected]>"]
55
edition = "2021"
66
rust-version = "1.80"

packages/cli/build.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import pkg from './package.json' with { type: 'json' }
2+
import { build } from 'tsup'
3+
4+
const watch = process.argv.slice(2)[0] === '--watch'
5+
6+
await build({
7+
entry: ['src/index.ts', 'src/cli.ts'],
8+
dts: true,
9+
minify: true,
10+
format: ['esm', 'cjs'],
11+
clean: true,
12+
define: { VERSION: `"${pkg.version}"` },
13+
watch,
14+
})

packages/cli/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cryptgeon",
3-
"version": "2.6.1",
3+
"version": "2.7.0",
44
"homepage": "https://github.com/cupcakearmy/cryptgeon",
55
"repository": {
66
"type": "git",
@@ -9,7 +9,7 @@
99
},
1010
"type": "module",
1111
"exports": {
12-
".": "./dist/index.mjs"
12+
".": "./dist/index.js"
1313
},
1414
"types": "./dist/index.d.ts",
1515
"bin": {
@@ -20,8 +20,8 @@
2020
],
2121
"scripts": {
2222
"bin": "run-s build package",
23-
"build": "rm -rf dist && tsc && ./scripts/build.js",
24-
"dev": "./scripts/build.js --watch",
23+
"build": "tsc && node build.js",
24+
"dev": "node build.js --watch",
2525
"prepublishOnly": "run-s build"
2626
},
2727
"devDependencies": {
@@ -31,11 +31,11 @@
3131
"@types/mime": "^3.0.4",
3232
"@types/node": "^20.11.24",
3333
"commander": "^12.0.0",
34-
"esbuild": "^0.20.1",
3534
"inquirer": "^9.2.15",
3635
"mime": "^4.0.1",
3736
"occulto": "^2.0.3",
3837
"pretty-bytes": "^6.1.1",
38+
"tsup": "^8.2.4",
3939
"typescript": "^5.3.3"
4040
},
4141
"engines": {

packages/cli/scripts/build.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/cli/src/cli.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22

33
import { Argument, Option, program } from '@commander-js/extra-typings'
4-
import { setBase, status } from '@cryptgeon/shared'
4+
import { setOptions, status } from '@cryptgeon/shared'
55
import prettyBytes from 'pretty-bytes'
66

77
import { download } from './download.js'
@@ -33,7 +33,7 @@ program
3333
.description('show information about the server')
3434
.addOption(server)
3535
.action(async (options) => {
36-
setBase(options.server)
36+
setOptions({ server: options.server })
3737
const response = await status()
3838
const formatted = {
3939
...response,
@@ -54,7 +54,7 @@ send
5454
.addOption(minutes)
5555
.addOption(password)
5656
.action(async (files, options) => {
57-
setBase(options.server!)
57+
setOptions({ server: options.server })
5858
await checkConstrains(options)
5959
options.password ||= await getStdin()
6060
try {
@@ -72,7 +72,7 @@ send
7272
.addOption(minutes)
7373
.addOption(password)
7474
.action(async (text, options) => {
75-
setBase(options.server!)
75+
setOptions({ server: options.server })
7676
await checkConstrains(options)
7777
options.password ||= await getStdin()
7878
try {

0 commit comments

Comments
 (0)