@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.
@@ -1,3 +1,4 @@
1
+ export * from './kartStatus';
1
2
  export * from './moduleNames';
2
3
  export * from './permissions';
3
4
  export * from './userRole';
@@ -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,8 @@
1
+ export declare const KART_STATUS: {
2
+ readonly STAND_BY: "standBy";
3
+ readonly IN_GAME: "in-game";
4
+ readonly YELLOW_FLAG: "yellow-flag";
5
+ readonly EMERGENCY: "emergency";
6
+ readonly PITS: "pits";
7
+ readonly ELIMINATED: "eliminated";
8
+ };
@@ -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,3 +1,3 @@
1
1
  import { MODULE_NAMES } from '../../constants';
2
- import { ObjectValues } from '../utils';
2
+ import type { ObjectValues } from '../utils';
3
3
  export type ModuleName = ObjectValues<typeof MODULE_NAMES>;
@@ -1,2 +1,3 @@
1
- export declare const kartStatus: readonly ["standBy", "in-game", "yellow-flag", "emergency", "pits", "eliminated"];
2
- export type KartStatus = (typeof kartStatus)[number];
1
+ import { KART_STATUS } from '../../constants';
2
+ import type { ObjectValues } from '../utils';
3
+ export type KartStatus = ObjectValues<typeof KART_STATUS>;
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.kartStatus = void 0;
4
- exports.kartStatus = ['standBy', 'in-game', 'yellow-flag', 'emergency', 'pits', 'eliminated'];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@battle-racing/br-common-lib",
3
- "version": "1.2.0",
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",
@@ -1,3 +1,4 @@
1
+ export * from './kartStatus';
1
2
  export * from './moduleNames';
2
3
  export * from './permissions';
3
4
  export * from './userRole';
@@ -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,4 +1,4 @@
1
1
  import { MODULE_NAMES } from '../../constants';
2
- import { ObjectValues } from '../utils';
2
+ import type { ObjectValues } from '../utils';
3
3
 
4
4
  export type ModuleName = ObjectValues<typeof MODULE_NAMES>;
@@ -1,2 +1,4 @@
1
- export const kartStatus = ['standBy', 'in-game', 'yellow-flag', 'emergency', 'pits', 'eliminated'] as const;
2
- export type KartStatus = (typeof kartStatus)[number];
1
+ import { KART_STATUS } from '../../constants';
2
+ import type { ObjectValues } from '../utils';
3
+
4
+ export type KartStatus = ObjectValues<typeof KART_STATUS>;
@@ -1,2 +0,0 @@
1
- import type { RoleDefinition } from '../types/role/RoleDefinition';
2
- export declare const ROLE_DEFINITIONS: RoleDefinition[];
@@ -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
@@ -1,3 +0,0 @@
1
- export * from './definitions';
2
- export * from './types';
3
- export * from './utils';
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);