@fugood/bricks-project 2.23.8 → 2.23.9-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/compile/index.ts +34 -2
- package/package.json +2 -2
- package/types/subspace.ts +1 -0
package/compile/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import omit from 'lodash/omit'
|
|
|
6
6
|
import { parse as parseAST } from 'acorn'
|
|
7
7
|
import type { ExportNamedDeclaration, FunctionDeclaration } from 'acorn'
|
|
8
8
|
import escodegen from 'escodegen'
|
|
9
|
+
import { makeId } from '../utils/id'
|
|
9
10
|
import { generateCalulationMap } from './util'
|
|
10
11
|
import { templateActionNameMap } from './action-name-map'
|
|
11
12
|
import { templateEventPropsMap } from '../utils/event-props'
|
|
@@ -362,10 +363,10 @@ const compileRemoteUpdate = (remoteUpdate: Data['remoteUpdate']) => {
|
|
|
362
363
|
}
|
|
363
364
|
|
|
364
365
|
const compileModule = (subspace: Subspace) => {
|
|
365
|
-
if (!subspace.module) return {}
|
|
366
|
+
if (!subspace.module?.id) return {}
|
|
366
367
|
return {
|
|
367
368
|
module: {
|
|
368
|
-
link:
|
|
369
|
+
link: subspace.module.link ?? false,
|
|
369
370
|
id: subspace.module.id,
|
|
370
371
|
version: subspace.module.version,
|
|
371
372
|
},
|
|
@@ -548,6 +549,37 @@ export const compile = async (app: Application) => {
|
|
|
548
549
|
'SUBSPACE',
|
|
549
550
|
`(subspace index: ${subspaceIndex})`,
|
|
550
551
|
)
|
|
552
|
+
|
|
553
|
+
// Linked module subspaces reference external content — only include
|
|
554
|
+
// module metadata, not local canvas/brick/data compilation.
|
|
555
|
+
// Include a placeholder root canvas so the config passes schema
|
|
556
|
+
// validation (root_canvas_id is required before the conditional
|
|
557
|
+
// schema fix is published).
|
|
558
|
+
if (subspace.module?.link) {
|
|
559
|
+
const placeholderCanvasId = makeId('canvas')
|
|
560
|
+
subspaceMap[subspaceId] = {
|
|
561
|
+
title: subspace.title,
|
|
562
|
+
description: subspace.description,
|
|
563
|
+
unused: subspace.unused,
|
|
564
|
+
portal: subspace.portal,
|
|
565
|
+
layout: {
|
|
566
|
+
width: subspace.layout?.width,
|
|
567
|
+
height: subspace.layout?.height,
|
|
568
|
+
resize_mode: subspace.layout?.resizeMode,
|
|
569
|
+
},
|
|
570
|
+
root_canvas_id: placeholderCanvasId,
|
|
571
|
+
property_bank_map: {},
|
|
572
|
+
brick_map: {},
|
|
573
|
+
generator_map: {},
|
|
574
|
+
animation_map: {},
|
|
575
|
+
canvas_map: {
|
|
576
|
+
[placeholderCanvasId]: { item_list: [] },
|
|
577
|
+
},
|
|
578
|
+
...compileModule(subspace),
|
|
579
|
+
}
|
|
580
|
+
return subspaceMap
|
|
581
|
+
}
|
|
582
|
+
|
|
551
583
|
const rootCanvasId = assertEntryId(
|
|
552
584
|
subspace.rootCanvas?.id,
|
|
553
585
|
'CANVAS',
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-project",
|
|
3
|
-
"version": "2.23.
|
|
3
|
+
"version": "2.23.9-1",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsc --noEmit",
|
|
7
7
|
"build": "bun scripts/build.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@fugood/bricks-cli": "^2.23.
|
|
10
|
+
"@fugood/bricks-cli": "^2.23.9",
|
|
11
11
|
"@huggingface/gguf": "^0.3.2",
|
|
12
12
|
"@iarna/toml": "^3.0.0",
|
|
13
13
|
"@modelcontextprotocol/sdk": "^1.15.0",
|