bc-minecraft-project 1.0.19 → 1.19.40-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/lib/src/Lib/index.d.ts +4 -0
- package/lib/src/Lib/index.js +21 -0
- package/lib/src/Lib/mcattributes.d.ts +2 -3
- package/lib/src/Lib/mcattributes.js +7 -10
- package/lib/src/Lib/mcdefinitions.d.ts +1 -1
- package/lib/src/Lib/mcdefinitions.js +1 -1
- package/lib/src/Lib/project.d.ts +1 -1
- package/lib/src/Lib/project.js +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Auto generated */
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./mcattributes"), exports);
|
|
19
|
+
__exportStar(require("./mcdefinitions"), exports);
|
|
20
|
+
__exportStar(require("./mcignore"), exports);
|
|
21
|
+
__exportStar(require("./project"), exports);
|
|
@@ -19,10 +19,9 @@ export declare namespace MCAttributes {
|
|
|
19
19
|
* @returns A string represerntation of the contents of a MCAttributes*/
|
|
20
20
|
function toString(data: MCAttributes): string;
|
|
21
21
|
/** Merges the two given objects into a new mcattributes. Whereby B overrides anything A has specified
|
|
22
|
-
* @param
|
|
23
|
-
* @param B The second data set, overrides anything A has specified
|
|
22
|
+
* @param items The first data set
|
|
24
23
|
* @returns A new object with the combined attributes*/
|
|
25
|
-
function merge(
|
|
24
|
+
function merge(...items: MCAttributes[]): MCAttributes;
|
|
26
25
|
/**Retrieves the given key from the attributes safely, if non exist an entry is made with the given default value
|
|
27
26
|
* @param attributes The attributes to retrieve the value from
|
|
28
27
|
* @param key The key that stores the specified value
|
|
@@ -50,18 +50,15 @@ var MCAttributes;
|
|
|
50
50
|
}
|
|
51
51
|
MCAttributes.toString = toString;
|
|
52
52
|
/** Merges the two given objects into a new mcattributes. Whereby B overrides anything A has specified
|
|
53
|
-
* @param
|
|
54
|
-
* @param B The second data set, overrides anything A has specified
|
|
53
|
+
* @param items The first data set
|
|
55
54
|
* @returns A new object with the combined attributes*/
|
|
56
|
-
function merge(
|
|
55
|
+
function merge(...items) {
|
|
57
56
|
let Out = createEmpty();
|
|
58
|
-
for (const
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const value = B[Key];
|
|
64
|
-
Out[Key] = value;
|
|
57
|
+
for (const item of items) {
|
|
58
|
+
for (const Key in item) {
|
|
59
|
+
const value = item[Key];
|
|
60
|
+
Out[Key] = value;
|
|
61
|
+
}
|
|
65
62
|
}
|
|
66
63
|
return Out;
|
|
67
64
|
}
|
|
@@ -21,7 +21,7 @@ export declare namespace Definition {
|
|
|
21
21
|
function createEmpty(): Definition;
|
|
22
22
|
/** Checks if the given object implements the Defintion interface
|
|
23
23
|
* @param value The object to inspect
|
|
24
|
-
* @returns
|
|
24
|
+
* @returns Whether or not the object implements Definition*/
|
|
25
25
|
function is(value: any): value is Definition;
|
|
26
26
|
}
|
|
27
27
|
/**The interface for MCDefinitions*/
|
|
@@ -45,7 +45,7 @@ var Definition;
|
|
|
45
45
|
Definition.createEmpty = createEmpty;
|
|
46
46
|
/** Checks if the given object implements the Defintion interface
|
|
47
47
|
* @param value The object to inspect
|
|
48
|
-
* @returns
|
|
48
|
+
* @returns Whether or not the object implements Definition*/
|
|
49
49
|
function is(value) {
|
|
50
50
|
if (value) {
|
|
51
51
|
if (value.defined && Array.isArray(value.defined)) {
|
package/lib/src/Lib/project.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare namespace MCProject {
|
|
|
17
17
|
function createEmpty(): MCProject;
|
|
18
18
|
/**Checks wheter or not the given object implements MCProject
|
|
19
19
|
* @param value The object to inspect
|
|
20
|
-
* @returns
|
|
20
|
+
* @returns Whether or not the given object implements MCProject*/
|
|
21
21
|
function is(value: any): value is MCProject;
|
|
22
22
|
/**Loads from the given root folder the nesscary project files
|
|
23
23
|
* @param Source The root folder to retrieve files from
|
package/lib/src/Lib/project.js
CHANGED
|
@@ -20,7 +20,7 @@ var MCProject;
|
|
|
20
20
|
MCProject.createEmpty = createEmpty;
|
|
21
21
|
/**Checks wheter or not the given object implements MCProject
|
|
22
22
|
* @param value The object to inspect
|
|
23
|
-
* @returns
|
|
23
|
+
* @returns Whether or not the given object implements MCProject*/
|
|
24
24
|
function is(value) {
|
|
25
25
|
if (value) {
|
|
26
26
|
if (!(value.ignores && mcignore_1.MCIgnore.is(value.ignores)))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bc-minecraft-project",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.40-1",
|
|
4
4
|
"description": "A library that provides object and handling for minecraft projects",
|
|
5
5
|
"main": "./lib/src/main.js",
|
|
6
6
|
"types": "./lib/src/main.d.ts",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"lib/src/**/*"
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@types/chai": "^4.3.
|
|
42
|
-
"@types/mocha": "^
|
|
43
|
-
"@types/node": "^18.
|
|
41
|
+
"@types/chai": "^4.3.3",
|
|
42
|
+
"@types/mocha": "^10.0.0",
|
|
43
|
+
"@types/node": "^18.7.16",
|
|
44
44
|
"chai": "^4.3.6",
|
|
45
45
|
"mocha": "^10.0.0",
|
|
46
46
|
"rimraf": "^3.0.2",
|
|
47
47
|
"ts-node": "^10.9.1",
|
|
48
|
-
"typescript": "^4.
|
|
48
|
+
"typescript": "^4.8.2"
|
|
49
49
|
}
|
|
50
50
|
}
|