mirror of
https://github.com/hzrd149/nsite-gateway.git
synced 2025-06-23 12:05:01 +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
|
- uses: pnpm/action-setup@v4
|
||||||
|
|
||||||
- name: Setup Node.js 20
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version-file: .nvmrc
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: Install Dependencies
|
- 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
|
- uses: pnpm/action-setup@v4
|
||||||
|
|
||||||
- name: Setup Node.js 20
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version-file: .nvmrc
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ build
|
|||||||
data
|
data
|
||||||
.netrc
|
.netrc
|
||||||
screenshots
|
screenshots
|
||||||
|
dist
|
||||||
|
11
package.json
11
package.json
@ -2,20 +2,21 @@
|
|||||||
"name": "nsite-gateway",
|
"name": "nsite-gateway",
|
||||||
"version": "0.7.0",
|
"version": "0.7.0",
|
||||||
"description": "A blossom server implementation written in Typescript",
|
"description": "A blossom server implementation written in Typescript",
|
||||||
"main": "build/index.js",
|
"main": "dist/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"author": "hzrd149",
|
"author": "hzrd149",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node build/index.js",
|
"start": "node dist/index.js",
|
||||||
"prepack": "tsc",
|
"prepack": "tsc",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"dev": "nodemon -i '**/data/**' --exec 'node' --loader @swc-node/register/esm src/index.ts",
|
"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 ."
|
"format": "prettier -w ."
|
||||||
},
|
},
|
||||||
"bin": "build/index.js",
|
"bin": "dist/index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"build",
|
"dist",
|
||||||
"public"
|
"public"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -57,7 +58,9 @@
|
|||||||
"@types/node": "^20.17.24",
|
"@types/node": "^20.17.24",
|
||||||
"@types/proxy-from-env": "^1.0.4",
|
"@types/proxy-from-env": "^1.0.4",
|
||||||
"@types/ws": "^8.18.0",
|
"@types/ws": "^8.18.0",
|
||||||
|
"esbuild": "^0.25.1",
|
||||||
"nodemon": "^3.1.9",
|
"nodemon": "^3.1.9",
|
||||||
|
"pkg": "^5.8.1",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"typescript": "^5.8.2"
|
"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",
|
"module": "NodeNext",
|
||||||
"target": "es2020",
|
"target": "es2020",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
"outDir": "build",
|
"outDir": "dist",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"sourceMap": true
|
"sourceMap": true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user