Skip to content

Commit

Permalink
eod
Browse files Browse the repository at this point in the history
  • Loading branch information
bitBeater committed Mar 5, 2024
1 parent bd37b18 commit 6544cde
Show file tree
Hide file tree
Showing 17 changed files with 77 additions and 681 deletions.
3 changes: 0 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"runtimeExecutable": "/home/alex/.deno/bin/deno",
"runtimeArgs": [
"run",
"--unstable",
"--config",
"deno.jsonc",
"--inspect-wait",
Expand All @@ -34,7 +33,6 @@
"runtimeExecutable": "/home/alex/.deno/bin/deno",
"runtimeArgs": [
"run",
"--unstable",
"--config",
"deno.jsonc",
"--inspect-wait",
Expand All @@ -54,7 +52,6 @@
"runtimeExecutable": "/home/alex/.deno/bin/deno",
"runtimeArgs": [
"test",
"--unstable",
"--config",
"${workspaceFolder}/deno.jsonc",
"--inspect-wait",
Expand Down
1 change: 0 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"console": "integratedTerminal",
"command": "run",
"args": [
"--unstable",
"-A",
"${file}"
],
Expand Down
38 changes: 19 additions & 19 deletions assets/defaults/config.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"serverInstallationDir": "~/.local/bin/minecraft-server",
"versionManifestV2Url": "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json",
"launchArgs": {
"default": {
"javaArgs": [
"-Xms4G",
"-Xmx8G",
"-XX:+UseG1GC",
"-XX:+ParallelRefProcEnabled",
"-XX:MaxGCPauseMillis=200",
"-XX:+UseLargePages",
"-XX:+AlwaysPreTouch",
"-XX:+UseStringDeduplication",
"-XX:+DisableExplicitGC",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+OptimizeStringConcat"
],
"serverArgs": ["--nogui"]
}
"serverInstallationDir": "~/.local/bin/minecraft-server",
"versionManifestV2Url": "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json",
"launchArgs": {
"default": {
"javaArgs": [
"-Xms4G",
"-Xmx8G",
"-XX:+UseG1GC",
"-XX:+ParallelRefProcEnabled",
"-XX:MaxGCPauseMillis=200",
"-XX:+UseLargePages",
"-XX:+AlwaysPreTouch",
"-XX:+UseStringDeduplication",
"-XX:+DisableExplicitGC",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+OptimizeStringConcat"
],
"serverArgs": ["--nogui"]
}
}
}
38 changes: 19 additions & 19 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"serverInstallationDir": "~/.local/bin/minecraft-server",
"versionManifestV2Url": "http://127.0.0.1:8765/version_manifest_v2",
"launchArgs": {
"default": {
"javaArgs": [
"-Xms4G",
"-Xmx8G",
"-XX:+UseG1GC",
"-XX:+ParallelRefProcEnabled",
"-XX:MaxGCPauseMillis=200",
"-XX:+UseLargePages",
"-XX:+AlwaysPreTouch",
"-XX:+UseStringDeduplication",
"-XX:+DisableExplicitGC",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+OptimizeStringConcat"
],
"serverArgs": ["--nogui"]
}
"serverInstallationDir": "~/.local/bin/minecraft-server",
"versionManifestV2Url": "http://127.0.0.1:8765/version_manifest_v2",
"launchArgs": {
"default": {
"javaArgs": [
"-Xms4G",
"-Xmx8G",
"-XX:+UseG1GC",
"-XX:+ParallelRefProcEnabled",
"-XX:MaxGCPauseMillis=200",
"-XX:+UseLargePages",
"-XX:+AlwaysPreTouch",
"-XX:+UseStringDeduplication",
"-XX:+DisableExplicitGC",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+OptimizeStringConcat"
],
"serverArgs": ["--nogui"]
}
}
}
27 changes: 16 additions & 11 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"imports": {
"std/": "https://deno.land/std@0.208.0/",
"@std/fs": "jsr:@std/fs@^0.218.2",
"cli/": "./src/cli/",
"cliffy/": "https://deno.land/x/cliffy@v1.0.0-rc.3/",
"data/": "./src/data/",
"cli/": "./src/cli/",
"utils/": "./src/utils/",
"types/": "./src/types/",
"services/": "./src/services/",
"errors/": "./src/errors/",
"semver": "https://deno.land/x/semver@v1.4.1/mod.ts",
"progress": "https://deno.land/x/progress@v1.4.0/mod.ts",
"iggs-utils": "npm:iggs-utils@1.2.16",
"testing-utils": "./tests/utils.ts"
"progress": "https://deno.land/x/progress@v1.4.0/mod.ts",
"semver": "https://deno.land/x/semver@v1.4.1/mod.ts",
"services/": "./src/services/",
"std/": "https://deno.land/std@0.208.0/",
"testing-utils": "./tests/utils.ts",
"types/": "./src/types/",
"utils/": "./src/utils/"
},
"tasks": {
"test": "clear && ./scripts/set_up_test_env.ts && cd ./tests && deno test -A --allow-env --unstable --trace-ops",
"test": "./scripts/set_up_test_env.ts && cd ./tests && deno test -A --allow-env --unstable --trace-ops",
"check": "deno run --allow-read --allow-write scripts/check.ts",
"gtests": "deno run -A --allow-env scripts/generate_test_files.ts",
"compile": "deno compile -A --target='x86_64-unknown-linux-gnu' --output='dist/minecraft-server-launcher' ./src/main.ts"
Expand All @@ -26,7 +27,11 @@
"fmt": {
"semiColons": true,
"singleQuote": true,
"lineWidth": 160,
"indentWidth": 1
"lineWidth": 500,
"indentWidth": 1,
"include": ["./src", "./tests", "./scripts"]
},
"lint": {
"include": ["./src", "./tests"]
}
}
36 changes: 2 additions & 34 deletions scripts/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,6 @@
/**
* script to check code quality and consistency
*/
import { getEmptyFiles, getSkipTestSrcs, getsMissingTestSrcs, SRC_DIR, TESTS_DIR } from './utils.ts';
import { checkCodeQuality } from './utils/check.ts';

let exitCode = 0;

// check if there are src files with the @skip-test comment
const skipTestSrcFiles = getSkipTestSrcs();
if (skipTestSrcFiles.length > 0) {
for (const srcFile of skipTestSrcFiles) {
console.log(`%c[SKIP TEST] %c${srcFile}`, 'color: orange', 'color: yellow');
}
}

// check if there are src files WITHOUT TEST files
const srcFilesWithoutTestFile = getsMissingTestSrcs();
if (srcFilesWithoutTestFile.length > 0) {
for (const srcFile of srcFilesWithoutTestFile) {
console.log(`%c[WITHOUT TEST] %c${srcFile}`, 'color: red', 'color: #ff4900');
}
exitCode = 1;
}

// check if there are EMPTY TS FILES, in src or test
const emptyTsFiles = [...getEmptyFiles(SRC_DIR, 'ts'), ...getEmptyFiles(TESTS_DIR, 'test.ts')];
if (emptyTsFiles.length > 0) {
for (const tsFile of emptyTsFiles) {
console.log(`%c[EMPTY TS FILE] %c${tsFile}`, 'color: red', 'color: gray');
}
exitCode = 1;
}

if (exitCode === 0) {
console.log(`%c[CHECK PASS]`, 'color: green');
} else {
Deno.exit(exitCode);
}
checkCodeQuality()
2 changes: 1 addition & 1 deletion scripts/generate_test_files.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S deno run -A
/** script to generate an empty .test.ts file for each .ts file that doesnt have one*/
import { writeFileAndDir } from 'utils/fs.ts';
import { getSkipTestSrcs, sourceFilePathToTestFilePath } from './utils.ts';
import { getSkipTestSrcs, sourceFilePathToTestFilePath } from './utils/utils.ts';

const skipTestSrcFiles = getSkipTestSrcs();

Expand Down
3 changes: 0 additions & 3 deletions scripts/mk_deb_pkg.ts

This file was deleted.

124 changes: 0 additions & 124 deletions scripts/mk_deb_pkg_mod.ts

This file was deleted.

Loading

0 comments on commit 6544cde

Please sign in to comment.