mirror of
https://github.com/hzrd149/nsite-gateway.git
synced 2025-06-23 03:55:02 +00:00
add node SEA
change build folder
This commit is contained in:
parent
d87497e6c0
commit
638f798df1
5
.changeset/strong-mice-slide.md
Normal file
5
.changeset/strong-mice-slide.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"nsite-gateway": minor
|
||||
---
|
||||
|
||||
Change build folder
|
54
.github/workflows/node-sea.yml
vendored
Normal file
54
.github/workflows/node-sea.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
name: Build SEA
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
sea-action:
|
||||
name: Build SEA
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: pnpm
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build and bundle
|
||||
run: pnpm build && pnpm bundle
|
||||
|
||||
- name: Find Node
|
||||
id: find-node
|
||||
run: echo "node=$(node -e 'console.log(process.argv[0]);')" >>
|
||||
$env:GITHUB_OUTPUT
|
||||
|
||||
- name: SEA
|
||||
id: sea
|
||||
uses: bryopsida/node-sea-action@v1
|
||||
with:
|
||||
working-dir: .
|
||||
output-dir: build/release
|
||||
executable-name: nsite-gateway
|
||||
sea-config-path: sea-config.json
|
||||
node-path: ${{ steps.find-node.outputs.node }}
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-sea
|
||||
path: build/release
|
||||
if-no-files-found: error
|
4
.github/workflows/publish-next.yml
vendored
4
.github/workflows/publish-next.yml
vendored
@ -18,10 +18,10 @@ jobs:
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js 20
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version-file: .nvmrc
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install Dependencies
|
||||
|
4
.github/workflows/version-or-publish.yml
vendored
4
.github/workflows/version-or-publish.yml
vendored
@ -26,10 +26,10 @@ jobs:
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js 20
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version-file: .nvmrc
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install Dependencies
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ build
|
||||
data
|
||||
.netrc
|
||||
screenshots
|
||||
dist
|
||||
|
11
package.json
11
package.json
@ -2,20 +2,21 @@
|
||||
"name": "nsite-gateway",
|
||||
"version": "0.7.0",
|
||||
"description": "A blossom server implementation written in Typescript",
|
||||
"main": "build/index.js",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
"author": "hzrd149",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "node build/index.js",
|
||||
"start": "node dist/index.js",
|
||||
"prepack": "tsc",
|
||||
"build": "tsc",
|
||||
"dev": "nodemon -i '**/data/**' --exec 'node' --loader @swc-node/register/esm src/index.ts",
|
||||
"bundle": "esbuild --bundle dist/index.js --format=esm --platform=node --outfile=build/bundle.mjs",
|
||||
"format": "prettier -w ."
|
||||
},
|
||||
"bin": "build/index.js",
|
||||
"bin": "dist/index.js",
|
||||
"files": [
|
||||
"build",
|
||||
"dist",
|
||||
"public"
|
||||
],
|
||||
"dependencies": {
|
||||
@ -57,7 +58,9 @@
|
||||
"@types/node": "^20.17.24",
|
||||
"@types/proxy-from-env": "^1.0.4",
|
||||
"@types/ws": "^8.18.0",
|
||||
"esbuild": "^0.25.1",
|
||||
"nodemon": "^3.1.9",
|
||||
"pkg": "^5.8.1",
|
||||
"prettier": "^3.5.3",
|
||||
"typescript": "^5.8.2"
|
||||
},
|
||||
|
631
pnpm-lock.yaml
generated
631
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
5
sea-config.json
Normal file
5
sea-config.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"main": "build/bundle.mjs",
|
||||
"output": "build/nsite-gateway.blob",
|
||||
"assets": []
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
"module": "NodeNext",
|
||||
"target": "es2020",
|
||||
"moduleResolution": "NodeNext",
|
||||
"outDir": "build",
|
||||
"outDir": "dist",
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"sourceMap": true
|
||||
|
Loading…
x
Reference in New Issue
Block a user