bc-minecraft-project 1.0.17 → 1.0.20

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,4 @@
1
+ export * from "./mcattributes";
2
+ export * from "./mcdefinitions";
3
+ export * from "./mcignore";
4
+ export * from "./project";
@@ -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 A The first data set
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(A: MCAttributes, B: MCAttributes): MCAttributes;
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
@@ -44,24 +44,21 @@ var MCAttributes;
44
44
  for (const Key in data) {
45
45
  const value = data[Key];
46
46
  if (value && typeof value === "string")
47
- Out += `${Key}=${value}`;
47
+ Out += `${Key}=${value}\n`;
48
48
  }
49
49
  return Out;
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 A The first data set
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(A, B) {
55
+ function merge(...items) {
57
56
  let Out = createEmpty();
58
- for (const Key in A) {
59
- const value = A[Key];
60
- Out[Key] = value;
61
- }
62
- for (const Key in B) {
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
  }
package/lib/src/main.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bc-minecraft-project",
3
- "version": "1.0.17",
3
+ "version": "1.0.20",
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.0",
42
- "@types/mocha": "^9.0.0",
43
- "@types/node": "^17.0.9",
44
- "chai": "^4.3.4",
45
- "mocha": "^9.1.4",
41
+ "@types/chai": "^4.3.3",
42
+ "@types/mocha": "^9.1.1",
43
+ "@types/node": "^18.7.16",
44
+ "chai": "^4.3.6",
45
+ "mocha": "^10.0.0",
46
46
  "rimraf": "^3.0.2",
47
- "ts-node": "^10.4.0",
48
- "typescript": "^4.5.4"
47
+ "ts-node": "^10.9.1",
48
+ "typescript": "^4.8.2"
49
49
  }
50
50
  }