Skip to content

Commit

Permalink
feat: Add new modules for patch, cli, and shard
Browse files Browse the repository at this point in the history
  • Loading branch information
drazisil committed May 13, 2024
1 parent a537c7d commit fa0c3fb
Show file tree
Hide file tree
Showing 20 changed files with 128 additions and 92 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ jobs:
with:
fetch-depth: 0

- name: Enable Corepack
- name: Install and test using npm
run: |
corepack enable pnpm
- name: Install and test using pnpm
run: |
pnpm install
pnpm test
npm install
npm run test --workspaces --if-present
- name: Create Sentry release
uses: getsentry/action-release@586b62368d564f25d694ce05fcb9cf53de65ac4f # v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install and test
run: |
npm install
npm test
npm run test --workspaces --if-present
env:
CODECOV_UPLOAD_BUNDLE_TOKEN: ${{ secrets.CODECOV_UPLOAD_BUNDLE_TOKEN }}
- name: Codecov
Expand Down
96 changes: 26 additions & 70 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,72 +1,28 @@
{
"name": "rusty-motors",
"version": "0.5.0",
"description": "This is a game server, being written from scratch, for a very old and long dead game. The owners of said game have shown no interest in bringing it back, but even so all names of their IP have been avoided to prevent issues.",
"type": "module",
"scripts": {
"check": "tsc",
"lint": "eslint .",
"start": "node --loader=ts-node/esm --env-file=.env --openssl-legacy-provider apps/main/server.ts",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage packages"
},
"author": "Molly Crendraven <[email protected]>",
"license": "AGPL-3.0",
"private": true,
"repository": {
"type": "git",
"url": "[email protected]:drazisil/mcos.git"
},
"devDependencies": {
"@eslint/js": "^9.2.0",
"@sentry/node": "7.113.0",
"@sentry/profiling-node": "7.113.0",
"@types/node": "20.12.11",
"@types/pg": "8.11.6",
"@vitest/coverage-v8": "1.6.0",
"@vitest/ui": "^1.3.1",
"drizzle-kit": "0.20.18",
"eslint": "^8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"npm-run-all2": "6.1.2",
"prettier": "3.2.5",
"react-refresh": "^0.10.0",
"typescript": "^5.4.5",
"typescript-eslint": "^7.8.0",
"vite": "~5.0.0",
"vitest": "1.6.0"
},
"dependencies": {
"@fastify/sensible": "^5.6.0",
"@sentry/esbuild-plugin": "^2.16.1",
"axios": "^1.6.0",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.30.10",
"express": "^4.18.1",
"fastify": "^4.27.0",
"pg": "^8.11.5",
"pino": "^8.21.0",
"pino-pretty": "^11.0.0",
"rusty-motors-database": "^1.0.0",
"rusty-motors-schema": "^1.0.0",
"short-unique-id": "^5.2.0",
"ts-node": "^10.9.2",
"tslib": "^2.3.0",
"tsx": "^4.9.4"
},
"workspaces": [
"apps/main",
"packages/cli",
"packages/connection",
"packages/database",
"packages/gateway",
"packages/mcots",
"packages/nps",
"packages/patch",
"packages/shard",
"packages/shared",
"packages/shared-packets",
"schema"
]
"name": "rusty-motors",
"version": "0.5.0",
"author": "Molly Crendraven <[email protected]>",
"repository": {
"type": "git",
"url": "[email protected]:drazisil/mcos.git"
},
"dependencies": {},
"description": "This is a game server, being written from scratch, for a very old and long dead game. The owners of said game have shown no interest in bringing it back, but even so all names of their IP have been avoided to prevent issues.",
"license": "AGPL-3.0",
"private": true,
"scripts": {},
"type": "module",
"workspaces": [
"apps/main",
"packages/cli",
"packages/connection",
"packages/database",
"packages/gateway",
"packages/mcots",
"packages/nps",
"packages/patch",
"packages/shard",
"packages/shared",
"packages/shared-packets",
"schema" ]
}
9 changes: 7 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"
},
"keywords": [],
"author": "",
"license": "AGPL-3.0",
"devDependencies": {},
"devDependencies": {
"@vitest/coverage-v8": "^1.6.0"
},
"dependencies": {
"rusty-motors-shared": "^1.0.0",
"rusty-motors-shared-packets": "^1.0.0"
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { describe, expect, it } from "vitest";

describe("example", () => {
it("should pass", () => {
expect(true).toBe(true);
});
});

6 changes: 5 additions & 1 deletion packages/connection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"

},
"keywords": [],
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/connection/test/Connection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
createCommandEncryptionPair,
verifyLegacyCipherSupport,
} from "../src/Connection";
import { McosEncryptionPair } from "../../shared";
import { McosEncryptionPair } from "rusty-motors-shared";

vi.mock("@sentry/node", () => ({
captureException: vi.fn(),
Expand Down
6 changes: 5 additions & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"

},
"keywords": [],
"author": "",
Expand Down
6 changes: 5 additions & 1 deletion packages/gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"

},
"keywords": [],
"author": "",
Expand Down
7 changes: 5 additions & 2 deletions packages/mcots/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"
},
"keywords": [],
"author": "",
"license": "AGPL-3.0",
"dependencies": {
"@sentry/node": "^7.102.0",
"rusty-motors-schema": "^1.0.0",
"short-unique-id": "^5.0.3"
},
"devDependencies": {},
"description": ""
}
8 changes: 8 additions & 0 deletions packages/mcots/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { describe, expect, it } from "vitest";

describe("example", () => {
it("should pass", () => {
expect(true).toBe(true);
});
});

6 changes: 5 additions & 1 deletion packages/nps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"

},
"keywords": [],
"author": "",
Expand Down
8 changes: 8 additions & 0 deletions packages/nps/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { describe, expect, it } from "vitest";

describe("example", () => {
it("should pass", () => {
expect(true).toBe(true);
});
});

6 changes: 5 additions & 1 deletion packages/patch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"

},
"keywords": [],
"author": "",
Expand Down
6 changes: 5 additions & 1 deletion packages/shard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"

},
"keywords": [],
"author": "",
Expand Down
7 changes: 5 additions & 2 deletions packages/shared-packets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
}
},
"scripts": {
"build": "rm -rf dist && tsc",
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"

},
"keywords": [],
"author": "",
Expand Down
8 changes: 8 additions & 0 deletions packages/shared-packets/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { describe, expect, it } from "vitest";

describe("example", () => {
it("should pass", () => {
expect(true).toBe(true);
});
});

6 changes: 5 additions & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"

},
"keywords": [],
"author": "",
Expand Down
6 changes: 5 additions & 1 deletion schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
},
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"check": "tsc",
"lint": "eslint .",
"format": "pnpm prettier --write .",
"test": "vitest run --coverage"

},
"keywords": [],
"author": "",
Expand Down
8 changes: 8 additions & 0 deletions schema/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { describe, expect, it } from "vitest";

describe("example", () => {
it("should pass", () => {
expect(true).toBe(true);
});
});

0 comments on commit fa0c3fb

Please sign in to comment.