chore: configure dependencies and project conf

This commit is contained in:
2025-09-11 13:40:03 +02:00
parent 8b2b009f38
commit 95ab48e66a
12 changed files with 28920 additions and 5 deletions

2
.gitignore vendored
View File

@@ -80,7 +80,7 @@ out
# Nuxt.js build / generate output
.nuxt
dist
lib
.output
# Gatsby files

1
dist/check_datapack.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export declare function checkDatapack(rootDir: String, version: String): Promise<void>;

1
dist/check_datapack.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/louis/Documents/spyglassmc-action/src/check_datapack.ts"],"names":[],"mappings":"AAAA,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF"}

1
dist/index.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export {};

1
dist/index.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/louis/Documents/spyglassmc-action/src/index.ts"],"names":[],"mappings":""}

27454
dist/index.js vendored Normal file

File diff suppressed because one or more lines are too long

3
dist/package.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

1420
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,12 +5,23 @@
"main": "index.js",
"scripts": {
"build": "tsc",
"package": "ncc build src/index.ts -o dist",
"test": "echo \"Error: no test specified\" && exit 1"
},
"type": "module",
"keywords": [],
"author": "LordBaryhobal",
"license": "ISC",
"devDependencies": {
"@types/node": "^24.3.1",
"@vercel/ncc": "^0.38.3",
"typescript": "^5.9.2"
},
"dependencies": {
"@actions/core": "^1.11.1",
"@actions/github": "^6.0.1",
"@spyglassmc/core": "^0.4.34",
"@spyglassmc/java-edition": "^0.3.45",
"@spyglassmc/mcdoc": "^0.3.38"
}
}

3
src/check_datapack.ts Normal file
View File

@@ -0,0 +1,3 @@
export async function checkDatapack(rootDir: String, version: String): Promise<void> {
console.log(`Checking datapack in directory ${rootDir} for Minecraft version ${version}`)
}

View File

@@ -1 +1,20 @@
console.log("Hello World!")
import * as core from "@actions/core"
import { checkDatapack } from "./check_datapack.js"
async function run(): Promise<void> {
try {
const rootDir = core.getInput("dir")
let version = core.getInput("version")
if (version === "") {
version = "auto"
}
await checkDatapack(rootDir, version)
} catch (error) {
if (error instanceof Error) {
core.setFailed(error.message)
}
}
}
run()

View File

@@ -3,12 +3,13 @@
"compilerOptions": {
// File Layout
// "rootDir": "./src",
"outDir": "dist",
"outDir": "lib",
// Environment Settings
// See also https://aka.ms/tsconfig/module
"module": "commonjs",
"target": "es2019",
"module": "nodenext",
"moduleResolution": "nodenext",
"target": "es2024",
"types": [],
// For nodejs:
// "lib": ["esnext"],