@fugood/bricks-project 2.24.0-beta.4 → 2.24.0-beta.6
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/compile/index.ts +5 -4
- package/package.json +3 -3
- package/utils/calc.ts +10 -8
package/compile/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-underscore-dangle -- Uses __typename, __actionName, etc. for type system */
|
|
2
|
-
import
|
|
2
|
+
import snakeCase from 'lodash/snakeCase'
|
|
3
|
+
import omit from 'lodash/omit'
|
|
3
4
|
import { parse as parseAST } from 'acorn'
|
|
4
5
|
import type { ExportNamedDeclaration, FunctionDeclaration } from 'acorn'
|
|
5
6
|
import escodegen from 'escodegen'
|
|
@@ -70,7 +71,7 @@ const compileEventActionValue = (templateKey, eventKey, value, errorReference) =
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
const convertOutletKey = (templateKey: string, key: string) =>
|
|
73
|
-
`${templateKey}_${
|
|
74
|
+
`${templateKey}_${snakeCase(key).toUpperCase()}`
|
|
74
75
|
|
|
75
76
|
const compileOutlets = (
|
|
76
77
|
templateKey: string,
|
|
@@ -84,7 +85,7 @@ const compileOutlets = (
|
|
|
84
85
|
}, {})
|
|
85
86
|
|
|
86
87
|
const convertEventKey = (templateKey: string, key: string) =>
|
|
87
|
-
`${templateKey ? `${templateKey}_` : ''}${
|
|
88
|
+
`${templateKey ? `${templateKey}_` : ''}${snakeCase(key).toUpperCase()}`
|
|
88
89
|
|
|
89
90
|
const basicAnimationEvents = ['show', 'standby', 'breatheStart']
|
|
90
91
|
|
|
@@ -460,7 +461,7 @@ export const compile = async (app: Application) => {
|
|
|
460
461
|
property: animationDef.property,
|
|
461
462
|
type: animationTypeMap[animationDef.config.__type],
|
|
462
463
|
config: compileProperty(
|
|
463
|
-
|
|
464
|
+
omit(animationDef.config, '__type'),
|
|
464
465
|
`(animation: ${animation.id}, subspace ${subspace.id})`,
|
|
465
466
|
),
|
|
466
467
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-project",
|
|
3
|
-
"version": "2.24.0-beta.
|
|
3
|
+
"version": "2.24.0-beta.6",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "bun scripts/build.js"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@fugood/bricks-cli": "^2.24.0-beta.
|
|
9
|
+
"@fugood/bricks-cli": "^2.24.0-beta.6",
|
|
10
10
|
"@huggingface/gguf": "^0.3.2",
|
|
11
11
|
"@iarna/toml": "^3.0.0",
|
|
12
12
|
"@modelcontextprotocol/sdk": "^1.15.0",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"lodash": "^4.17.4",
|
|
20
20
|
"uuid": "^8.3.1"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "893f3e56ec87e71bfc093434c9a8517fca6c0f99"
|
|
23
23
|
}
|
package/utils/calc.ts
CHANGED
|
@@ -33,10 +33,11 @@ export const generateDataCalculationMapEditorInfo = (
|
|
|
33
33
|
nodes.forEach((node) => {
|
|
34
34
|
// Count and track inputs
|
|
35
35
|
if ('inputs' in node) {
|
|
36
|
-
const inputs = node.inputs
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
const inputs = node.inputs.reduce((sum, input) => {
|
|
37
|
+
if (input === null) return sum
|
|
38
|
+
if (Array.isArray(input)) return sum + input.length
|
|
39
|
+
return sum + 1
|
|
40
|
+
}, 0)
|
|
40
41
|
inputCounts.set(node, inputs)
|
|
41
42
|
|
|
42
43
|
// Track connections
|
|
@@ -59,10 +60,11 @@ export const generateDataCalculationMapEditorInfo = (
|
|
|
59
60
|
|
|
60
61
|
// Count outputs
|
|
61
62
|
if ('outputs' in node) {
|
|
62
|
-
const outputs = node.outputs
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
const outputs = node.outputs.reduce((sum, output) => {
|
|
64
|
+
if (output === null) return sum
|
|
65
|
+
if (Array.isArray(output)) return sum + output.length
|
|
66
|
+
return sum + 1
|
|
67
|
+
}, 0)
|
|
66
68
|
outputCounts.set(node, outputs)
|
|
67
69
|
} else {
|
|
68
70
|
outputCounts.set(node, 0)
|