@foxystar/molang 0.1.1 → 0.1.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.
package/esm/runtime/context.js
CHANGED
|
@@ -6,7 +6,11 @@ export const DEFAULT_CONTEXT = {
|
|
|
6
6
|
math: MolangMath,
|
|
7
7
|
variable: {},
|
|
8
8
|
temp: {},
|
|
9
|
-
context: {
|
|
9
|
+
context: {
|
|
10
|
+
log: (...args) => {
|
|
11
|
+
console.log(...args);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
10
14
|
query: {
|
|
11
15
|
block_state: (_name) => {
|
|
12
16
|
throw new Error("This function call can only be used in block context");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foxystar/molang",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A fast, extensible, and safe implementation of the Molang expression language.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "FoxyStar Studios",
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@foxystar/math": "^0.1.3"
|
|
34
34
|
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@minecraft/server": "^2.9.0-rc.1.26.40-preview.29"
|
|
37
|
+
},
|
|
35
38
|
"devDependencies": {
|
|
36
39
|
"@types/node": "^20.9.0"
|
|
37
40
|
},
|
|
@@ -9,7 +9,11 @@ exports.DEFAULT_CONTEXT = {
|
|
|
9
9
|
math: math_js_1.MolangMath,
|
|
10
10
|
variable: {},
|
|
11
11
|
temp: {},
|
|
12
|
-
context: {
|
|
12
|
+
context: {
|
|
13
|
+
log: (...args) => {
|
|
14
|
+
console.log(...args);
|
|
15
|
+
}
|
|
16
|
+
},
|
|
13
17
|
query: {
|
|
14
18
|
block_state: (_name) => {
|
|
15
19
|
throw new Error("This function call can only be used in block context");
|