Compare commits
2 Commits
fe00e7d50b
...
d45b26fe09
Author | SHA1 | Date | |
---|---|---|---|
d45b26fe09 | |||
13c0a76e97 |
35
.gitea/workflows/deploy-lib.yml
Normal file
35
.gitea/workflows/deploy-lib.yml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Deploy Lib
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["master"]
|
||||||
|
paths: ["Lib/**"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: ["ubuntu-latest"]
|
||||||
|
git-version: ["2.44.0"]
|
||||||
|
node-version: ["20.x"]
|
||||||
|
runs-on: ${{ matrix.arch }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./Lib
|
||||||
|
|
||||||
|
# Steps to run
|
||||||
|
steps:
|
||||||
|
# Checkout the repo
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Setup NodeJS
|
||||||
|
- name: Setup NodeJS
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: Publish to NPM
|
||||||
|
run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
49
Lib/src/types/dns.d.ts
vendored
Normal file
49
Lib/src/types/dns.d.ts
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/**
|
||||||
|
* An A record.
|
||||||
|
*/
|
||||||
|
interface ARecord extends DNSRecord {
|
||||||
|
/**
|
||||||
|
* The address of this record, undefined if unresolved.
|
||||||
|
*/
|
||||||
|
address?: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An SRV record.
|
||||||
|
*/
|
||||||
|
interface SRVRecord extends DNSRecord {
|
||||||
|
/**
|
||||||
|
* The priority of this record.
|
||||||
|
*/
|
||||||
|
priority: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The weight of this record.
|
||||||
|
*/
|
||||||
|
weight: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The port of this record.
|
||||||
|
*/
|
||||||
|
port: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The target of this record.
|
||||||
|
*/
|
||||||
|
target: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A representation of a DNS record.
|
||||||
|
*/
|
||||||
|
type DNSRecord = {
|
||||||
|
/**
|
||||||
|
* The type of this record.
|
||||||
|
*/
|
||||||
|
type: RecordType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The TTL (Time To Live) of this record.
|
||||||
|
*/
|
||||||
|
ttl: number;
|
||||||
|
};
|
17
Lib/src/types/server.d.ts
vendored
17
Lib/src/types/server.d.ts
vendored
@ -20,7 +20,7 @@ type MinecraftServer = {
|
|||||||
/**
|
/**
|
||||||
* The DNS records resolved for this server.
|
* The DNS records resolved for this server.
|
||||||
*/
|
*/
|
||||||
records: DNSRecord[];
|
records: ARecord | SRVRecord[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The player counts of this server.
|
* The player counts of this server.
|
||||||
@ -33,21 +33,6 @@ type MinecraftServer = {
|
|||||||
motd: MOTD;
|
motd: MOTD;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* A representation of a DNS record.
|
|
||||||
*/
|
|
||||||
type DNSRecord = {
|
|
||||||
/**
|
|
||||||
* The type of this record.
|
|
||||||
*/
|
|
||||||
type: RecordType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The TTL (Time To Live) of this record.
|
|
||||||
*/
|
|
||||||
ttl: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Player count data for a server.
|
* Player count data for a server.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user