@cybermp-community/server-types 1.2.1 → 1.2.2

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/resources.ts +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cybermp-community/server-types",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "TypeScript type definitions for the CyberMP server-side environment.",
5
5
  "license": "CC BY-SA 4.0",
6
6
  "author": {
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "repository": {
14
14
  "type": "gitlab",
15
- "url": "https://gitlab.com/cybermp/types/server"
15
+ "url": "git+https://gitlab.com/cybermp/types/server.git"
16
16
  },
17
17
  "publishConfig": {
18
18
  "access": "public"
package/src/resources.ts CHANGED
@@ -1,4 +1,11 @@
1
1
  export interface MpResources {
2
+ /**
3
+ * Reads a TOML configuration file and returns its raw contents.
4
+ * @param name Name or key of the TOML file.
5
+ * @returns Raw TOML string.
6
+ */
7
+ getTOML(name: string): string;
8
+
2
9
  /**
3
10
  * Gets the current state of a resource.
4
11
  * @param resourceName The resource to check.
@@ -24,6 +31,11 @@ export interface MpResources {
24
31
  */
25
32
  restart(resourceName: string): void;
26
33
 
34
+ /**
35
+ * Re-indexes all resources.
36
+ */
37
+ refresh(): void;
38
+
27
39
  /**
28
40
  * Gets the current resource's name.
29
41
  * @returns Resource name.