magicrealmsshared 0.3.0 → 0.3.3

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.
@@ -0,0 +1,17 @@
1
+ import { Well } from "../types/types";
2
+ export declare const AUTH = "AUTH";
3
+ export declare const AUTH_ACK = "AUTH_ACK";
4
+ export declare const DATA_UPDATE_COMMAND = "DATA_UPDATE";
5
+ export type DATA_UPDATE<T> = {
6
+ wells: Well<T>[];
7
+ };
8
+ export declare const POSUPDATE_COMMAND = "POSUPDATE";
9
+ export type POSUPDATE = {
10
+ pos: GeoJSON.Point;
11
+ /**
12
+ * The precision of the pos.
13
+ *
14
+ * @type {number}
15
+ */
16
+ pre: number;
17
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.POSUPDATE_COMMAND = exports.DATA_UPDATE_COMMAND = exports.AUTH_ACK = exports.AUTH = void 0;
4
+ exports.AUTH = "AUTH";
5
+ exports.AUTH_ACK = "AUTH_ACK";
6
+ exports.DATA_UPDATE_COMMAND = "DATA_UPDATE";
7
+ exports.POSUPDATE_COMMAND = "POSUPDATE";
@@ -0,0 +1,2 @@
1
+ export declare const PROJECT_NAME = "Magic Realms";
2
+ export declare const INTERACTION_DISTANCE = 45;
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INTERACTION_DISTANCE = exports.PROJECT_NAME = void 0;
4
+ exports.PROJECT_NAME = "Magic Realms";
5
+ exports.INTERACTION_DISTANCE = 45;
@@ -0,0 +1,10 @@
1
+ export type ObjectWithId<T> = {
2
+ _id: T;
3
+ };
4
+ export type WorldObject<T> = ObjectWithId<T> & {
5
+ pos: GeoJSON.Point;
6
+ };
7
+ export type Well<T> = WorldObject<T> & {
8
+ name: string;
9
+ color: number;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "magicrealmsshared",
3
- "version": "0.3.0",
3
+ "version": "0.3.3",
4
4
  "description": "",
5
- "main": "index.js",
5
+ "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
@@ -10,7 +10,10 @@
10
10
  "author": "",
11
11
  "license": "CC BY-NC-ND",
12
12
  "devDependencies": {
13
- "@types/mongodb": "^4.0.6",
14
13
  "@types/geojson": "^7946.0.15"
14
+ },
15
+ "exports": {
16
+ ".": "./dist/index.js",
17
+ "./communication/ws": "./dist/communication/ws.js"
15
18
  }
16
19
  }
package/tsconfig.json CHANGED
@@ -5,6 +5,11 @@
5
5
  "strict": true,
6
6
  "moduleResolution": "node",
7
7
  "esModuleInterop": true,
8
- "skipLibCheck": true
9
- }
8
+ "skipLibCheck": true,
9
+ "outDir": "dist",
10
+ "declaration": true,
11
+ },
12
+ "include": [
13
+ "src"
14
+ ]
10
15
  }
File without changes
File without changes
File without changes