@battle-racing/br-common-lib 1.2.0 → 1.2.1
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/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/kartStatus.d.ts +8 -0
- package/dist/constants/kartStatus.js +12 -0
- package/dist/types/hardware/ModuleName.d.ts +1 -1
- package/dist/types/kart/KartStatus.d.ts +3 -2
- package/dist/types/kart/KartStatus.js +0 -2
- package/package.json +2 -2
- package/src/constants/index.ts +1 -0
- package/src/constants/kartStatus.ts +9 -0
- package/src/types/hardware/ModuleName.ts +1 -1
- package/src/types/kart/KartStatus.ts +4 -2
- package/dist/definitions/RoleDefinitions.d.ts +0 -2
- package/dist/definitions/RoleDefinitions.js +0 -28
- package/dist/definitions/index.d.ts +0 -1
- package/dist/definitions/index.js +0 -17
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -19
package/dist/constants/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./kartStatus"), exports);
|
|
17
18
|
__exportStar(require("./moduleNames"), exports);
|
|
18
19
|
__exportStar(require("./permissions"), exports);
|
|
19
20
|
__exportStar(require("./userRole"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KART_STATUS = void 0;
|
|
4
|
+
// export const kartStatus = ['standBy', 'in-game', 'yellow-flag', 'emergency', 'pits', 'eliminated'] as const;
|
|
5
|
+
exports.KART_STATUS = {
|
|
6
|
+
STAND_BY: 'standBy',
|
|
7
|
+
IN_GAME: 'in-game',
|
|
8
|
+
YELLOW_FLAG: 'yellow-flag',
|
|
9
|
+
EMERGENCY: 'emergency',
|
|
10
|
+
PITS: 'pits',
|
|
11
|
+
ELIMINATED: 'eliminated',
|
|
12
|
+
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { KART_STATUS } from '../../constants';
|
|
2
|
+
import type { ObjectValues } from '../utils';
|
|
3
|
+
export type KartStatus = ObjectValues<typeof KART_STATUS>;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@battle-racing/br-common-lib",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Common library for all Battle Racing Repositorios",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"release": "npm run build && npm publish --access public"
|
|
9
|
+
"release": "rm -rf dist && npm run build && npm publish --access public"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"Battle",
|
package/src/constants/index.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// export const kartStatus = ['standBy', 'in-game', 'yellow-flag', 'emergency', 'pits', 'eliminated'] as const;
|
|
2
|
+
export const KART_STATUS = {
|
|
3
|
+
STAND_BY: 'standBy',
|
|
4
|
+
IN_GAME: 'in-game',
|
|
5
|
+
YELLOW_FLAG: 'yellow-flag',
|
|
6
|
+
EMERGENCY: 'emergency',
|
|
7
|
+
PITS: 'pits',
|
|
8
|
+
ELIMINATED: 'eliminated',
|
|
9
|
+
} as const;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { KART_STATUS } from '../../constants';
|
|
2
|
+
import type { ObjectValues } from '../utils';
|
|
3
|
+
|
|
4
|
+
export type KartStatus = ObjectValues<typeof KART_STATUS>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ROLE_DEFINITIONS = void 0;
|
|
4
|
-
const Permission_1 = require("../types/role/Permission");
|
|
5
|
-
const UserRole_1 = require("../types/role/UserRole");
|
|
6
|
-
exports.ROLE_DEFINITIONS = [
|
|
7
|
-
{
|
|
8
|
-
role: UserRole_1.USER_ROLE.SUPER_ADMIN,
|
|
9
|
-
description: 'Complete access to all features and settings',
|
|
10
|
-
permissions: [
|
|
11
|
-
Permission_1.PERMISSIONS.FULL_ACCESS,
|
|
12
|
-
Permission_1.PERMISSIONS.KARTS_MANAGE_HARDWARE,
|
|
13
|
-
Permission_1.PERMISSIONS.KARTS_MANAGE_POWER_UPS,
|
|
14
|
-
Permission_1.PERMISSIONS.GAME_TRACK_MANAGE_GAMES,
|
|
15
|
-
Permission_1.PERMISSIONS.GAME_TRACK_MANAGE_BASIC_INFO,
|
|
16
|
-
Permission_1.PERMISSIONS.GAME_TRACK_MANAGE_HARDWARE,
|
|
17
|
-
Permission_1.PERMISSIONS.GAME_TRACK_MANAGE_KARTS_CONFIG,
|
|
18
|
-
Permission_1.PERMISSIONS.GAME_TRACK_MANAGE_CHECKPOINTS,
|
|
19
|
-
Permission_1.PERMISSIONS.GAME_TRACK_MANAGE_KARTS,
|
|
20
|
-
Permission_1.PERMISSIONS.KARTS_TRACKING,
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
role: UserRole_1.USER_ROLE.OPERATOR,
|
|
25
|
-
description: 'Game Track Operator',
|
|
26
|
-
permissions: [Permission_1.PERMISSIONS.GAME_TRACK_MANAGE_GAMES],
|
|
27
|
-
},
|
|
28
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './RoleDefinitions';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./RoleDefinitions"), exports);
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./definitions"), exports);
|
|
18
|
-
__exportStar(require("./types"), exports);
|
|
19
|
-
__exportStar(require("./utils"), exports);
|