magicrealmsshared 0.3.13 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magicrealmsshared",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -9,6 +9,9 @@
9
9
  "keywords": [],
10
10
  "author": "",
11
11
  "license": "CC BY-NC-ND",
12
+ "files": [
13
+ "dist"
14
+ ],
12
15
  "devDependencies": {
13
16
  "@types/geojson": "^7946.0.15"
14
17
  },
@@ -1,43 +0,0 @@
1
- import { Auth_Token, Player, Well } from "../types/types";
2
-
3
-
4
- export const AUTH = "AUTH";
5
- export const AUTH_ACK = "AUTH_ACK";
6
-
7
-
8
-
9
- export const LOGIN_COMMAND = "LOGIN";
10
- export type LOGIN_DATA = {
11
- email: string;
12
- password: string;
13
- }
14
-
15
- export const LOGIN_RESPONSE_COMMAND = "NIGOL";
16
- export type LOGIN_RESPONSE_DATA<T> = {
17
- code: number;
18
- playerData?: Player<T>;
19
- authToken?: Auth_Token;
20
- }
21
-
22
- export const LOGIN_RESPONSE_CODE_SUCCESS = 0;
23
- export const LOGIN_RESPONSE_CODE_EMAIL_INVALID = 10;
24
- export const LOGIN_RESPONSE_CODE_PASSWORD_INVALID = 20;
25
- export const LOGIN_RESPONSE_CODE_SERVER_ERROR = 1000;
26
-
27
-
28
- export const DATA_UPDATE_COMMAND = "DATA_UPDATE";
29
- export type DATA_UPDATE<T> = {
30
- wells: Well<T>[],
31
- }
32
-
33
- export const POSUPDATE_COMMAND = "POSUPDATE";
34
- export type POSUPDATE = {
35
- pos: GeoJSON.Point,
36
-
37
- /**
38
- * The precision of the pos.
39
- *
40
- * @type {number}
41
- */
42
- pre: number,
43
- }
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export const PROJECT_NAME = "Magic Realms";
2
- export const INTERACTION_DISTANCE = 45;
@@ -1,57 +0,0 @@
1
-
2
- //#region Base Types
3
- export type NamedObject<T> = ObjectWithId<T> & {
4
- name: string;
5
- }
6
-
7
- export type ObjectWithId<T> = {
8
- _id: T
9
- }
10
-
11
- export type WorldObject<T> = ObjectWithId<T> & {
12
- pos: GeoJSON.Point;
13
- }
14
- //#endregion
15
-
16
- export type Privileges = {
17
- all?: boolean,
18
- //TODO: add other privileges as required
19
- };
20
-
21
- export type Auth_Token = {
22
-
23
- /**
24
- * Auth-Token-String
25
- *
26
- * @type {string}
27
- */
28
- s: string,
29
-
30
-
31
- /**
32
- * Expiration
33
- *
34
- * @type {Date}
35
- */
36
- e: Date,
37
- };
38
-
39
- export type Player<T> = ObjectWithId<T> & {
40
- email: string,
41
- passwordHash: string,
42
- passwordSalt:string,
43
- registerTime: Date,
44
- loginTime: Date,
45
- interactTime: Date,
46
-
47
- privileges?: Privileges,
48
-
49
- displayname: string,
50
-
51
- color: number,
52
- };
53
-
54
- export type Well<T> = WorldObject<T> & {
55
- name: string,
56
- color: number,
57
- };
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "commonjs",
5
- "strict": true,
6
- "moduleResolution": "node",
7
- "esModuleInterop": true,
8
- "skipLibCheck": true,
9
- "outDir": "dist",
10
- "declaration": true,
11
- },
12
- "include": [
13
- "src"
14
- ]
15
- }