@fugood/bricks-project 2.24.0-beta.5 → 2.24.0-beta.7
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/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.7",
|
|
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.7",
|
|
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": "f65832e45dc04049f9fa91e55109e72ebc438d11"
|
|
23
23
|
}
|
|
@@ -33,14 +33,14 @@ Automations can validate:
|
|
|
33
33
|
```typescript
|
|
34
34
|
const testLoginFlow: AutomationTest = {
|
|
35
35
|
__typename: 'AutomationTest',
|
|
36
|
-
id: 'test
|
|
36
|
+
id: makeId('test'),
|
|
37
37
|
title: 'Test Login Flow',
|
|
38
38
|
timeout: 30000,
|
|
39
39
|
trigger_type: 'launch',
|
|
40
40
|
cases: [
|
|
41
41
|
{
|
|
42
42
|
__typename: 'TestCase',
|
|
43
|
-
id: '
|
|
43
|
+
id: makeId('test_case'),
|
|
44
44
|
name: 'Wait for login canvas',
|
|
45
45
|
run: ['wait_until_canvas_change', () => mainSubspace, () => loginCanvas, 5000],
|
|
46
46
|
exit_on_failed: true,
|
|
@@ -51,7 +51,7 @@ const testLoginFlow: AutomationTest = {
|
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
__typename: 'TestCase',
|
|
54
|
-
id: '
|
|
54
|
+
id: makeId('test_case'),
|
|
55
55
|
name: 'Press username input',
|
|
56
56
|
run: ['brick_press', () => mainSubspace, () => usernameInput],
|
|
57
57
|
exit_on_failed: true,
|
|
@@ -62,7 +62,7 @@ const testLoginFlow: AutomationTest = {
|
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
__typename: 'TestCase',
|
|
65
|
-
id: '
|
|
65
|
+
id: makeId('test_case'),
|
|
66
66
|
name: 'Assert username value',
|
|
67
67
|
run: ['assert_property', () => mainSubspace, () => usernameData, 'testuser'],
|
|
68
68
|
exit_on_failed: true,
|
|
@@ -73,7 +73,7 @@ const testLoginFlow: AutomationTest = {
|
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
__typename: 'TestCase',
|
|
76
|
-
id: '
|
|
76
|
+
id: makeId('test_case'),
|
|
77
77
|
name: 'Press login button',
|
|
78
78
|
run: ['brick_press', () => mainSubspace, () => loginButton],
|
|
79
79
|
exit_on_failed: true,
|
|
@@ -84,7 +84,7 @@ const testLoginFlow: AutomationTest = {
|
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
__typename: 'TestCase',
|
|
87
|
-
id: '
|
|
87
|
+
id: makeId('test_case'),
|
|
88
88
|
name: 'Wait for dashboard',
|
|
89
89
|
run: ['wait_until_canvas_change', () => mainSubspace, () => dashboardCanvas, 10000],
|
|
90
90
|
exit_on_failed: true,
|
package/tools/preview-main.mjs
CHANGED
|
@@ -42,13 +42,17 @@ let config = JSON.parse(await readFile(`${cwd}/.bricks/build/application-config.
|
|
|
42
42
|
let testId = values['test-id'] || null
|
|
43
43
|
if (!testId && values['test-title-like']) {
|
|
44
44
|
const titleLike = values['test-title-like'].toLowerCase()
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
const automationMap = config.automation_map || {}
|
|
46
|
+
for (const group of Object.values(automationMap)) {
|
|
47
|
+
const found = Object.entries(group.map || {}).find(([, test]) =>
|
|
48
|
+
test.title?.toLowerCase().includes(titleLike),
|
|
49
|
+
)
|
|
50
|
+
if (found) {
|
|
51
|
+
;[testId] = found
|
|
52
|
+
break
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (!testId) {
|
|
52
56
|
throw new Error(`No automation found matching title: ${values['test-title-like']}`)
|
|
53
57
|
}
|
|
54
58
|
}
|
package/utils/calc.ts
CHANGED
|
@@ -33,11 +33,12 @@ export const generateDataCalculationMapEditorInfo = (
|
|
|
33
33
|
nodes.forEach((node) => {
|
|
34
34
|
// Count and track inputs
|
|
35
35
|
if ('inputs' in node) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
let inputs = 0
|
|
37
|
+
for (const input of node.inputs) {
|
|
38
|
+
if (input === null) continue
|
|
39
|
+
if (Array.isArray(input)) inputs += input.length
|
|
40
|
+
else inputs += 1
|
|
41
|
+
}
|
|
41
42
|
inputCounts.set(node, inputs)
|
|
42
43
|
|
|
43
44
|
// Track connections
|
|
@@ -60,11 +61,12 @@ export const generateDataCalculationMapEditorInfo = (
|
|
|
60
61
|
|
|
61
62
|
// Count outputs
|
|
62
63
|
if ('outputs' in node) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
let outputs = 0
|
|
65
|
+
for (const output of node.outputs) {
|
|
66
|
+
if (output === null) continue
|
|
67
|
+
if (Array.isArray(output)) outputs += output.length
|
|
68
|
+
else outputs += 1
|
|
69
|
+
}
|
|
68
70
|
outputCounts.set(node, outputs)
|
|
69
71
|
} else {
|
|
70
72
|
outputCounts.set(node, 0)
|