@galacean/cli 2.0.0-alpha.2 → 2.0.0-alpha.4

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.
Files changed (2) hide show
  1. package/dist/cli.bundle.cjs +13 -11
  2. package/package.json +1 -1
@@ -62546,11 +62546,18 @@ var init_Package = __esm({
62546
62546
  * 因为 registerClass 的唯一消费者是引擎的反序列化器。
62547
62547
  */
62548
62548
  _generateTemplate(projectFile, originalVirtualFileMap, features, download, debug) {
62549
- const scriptFileIds = new Set(projectFile.files.filter((f) => f.type === "script").map((f) => f.id));
62549
+ const scriptFileIds = /* @__PURE__ */ new Set();
62550
+ for (const f of projectFile.files) {
62551
+ if (f.type === "script") {
62552
+ scriptFileIds.add(f.id);
62553
+ if (f.virtualPath)
62554
+ scriptFileIds.add(f.virtualPath);
62555
+ }
62556
+ }
62550
62557
  const referencedScriptIds = collectReferencedScriptIds(scriptFileIds, originalVirtualFileMap);
62551
62558
  const scripts = [];
62552
62559
  for (const file2 of projectFile.files) {
62553
- if (file2.type === "script" && referencedScriptIds.has(file2.id)) {
62560
+ if (file2.type === "script" && (referencedScriptIds.has(file2.id) || referencedScriptIds.has(file2.virtualPath))) {
62554
62561
  scripts.push(file2);
62555
62562
  }
62556
62563
  }
@@ -79651,7 +79658,7 @@ function serializeSceneEntity(entity) {
79651
79658
  rotation: entity.transform.rotation,
79652
79659
  scale: entity.transform.scale
79653
79660
  };
79654
- const serializedComponents = Object.entries(entity.components).filter(([, c]) => c.type !== "UITransform").map(([id, c]) => {
79661
+ const serializedComponents = Object.entries(entity.components).filter(([, c]) => c.type !== "UITransform" && c.type !== "Transform").map(([id, c]) => {
79655
79662
  const props = { ...c.props };
79656
79663
  const methods = {};
79657
79664
  if (SET_MATERIAL_COMPONENT_TYPES.has(c.type) && props.material) {
@@ -80968,8 +80975,6 @@ async function cliCompile(vfs, config2, options) {
80968
80975
  if (vfile.meta?.params) {
80969
80976
  pf.params = vfile.meta.params;
80970
80977
  }
80971
- if (pf.type === "script")
80972
- continue;
80973
80978
  projectFiles.push(pf);
80974
80979
  }
80975
80980
  const sceneFiles = files.filter((f) => f.meta?.type === "Scene");
@@ -97680,10 +97685,7 @@ var init_schema5 = __esm({
97680
97685
  message: "colliderType \u4E0E componentType \u4E0D\u4E00\u81F4"
97681
97686
  });
97682
97687
  }
97683
- }).transform(({ colliderType, componentType, ...rest }) => ({
97684
- ...rest,
97685
- componentType: componentType ?? colliderType ?? "StaticCollider"
97686
- })).describe("\u6DFB\u52A0\u78B0\u649E\u5668\u7EC4\u4EF6\u7684\u53C2\u6570");
97688
+ }).describe("\u6DFB\u52A0\u78B0\u649E\u5668\u7EC4\u4EF6\u7684\u53C2\u6570");
97687
97689
  colliderUpdateInputSchema = external_exports.object({
97688
97690
  entityId: external_exports.string().describe("\u76EE\u6807\u5B9E\u4F53 ID"),
97689
97691
  componentType: colliderComponentTypeEnum.optional().describe("\u78B0\u649E\u5668\u7EC4\u4EF6\u7C7B\u578B\uFF08\u7528\u4E8E\u5B9A\u4F4D\u7EC4\u4EF6\uFF09"),
@@ -97974,7 +97976,7 @@ var init_collider_add = __esm({
97974
97976
  if (!entityModel) {
97975
97977
  throw new EditorAPIError("ENTITY_NOT_FOUND", params.entityId);
97976
97978
  }
97977
- const componentType = params.componentType ?? "StaticCollider";
97979
+ const componentType = params.componentType ?? params.colliderType ?? "StaticCollider";
97978
97980
  const shapeType = params.shapeType;
97979
97981
  const existingComp = ctx.query.findComponent(params.entityId, componentType);
97980
97982
  let existingShapes = [];
@@ -157274,7 +157276,7 @@ function readCliVersionFromPackageJson() {
157274
157276
  const parsed = JSON.parse(raw);
157275
157277
  return typeof parsed.version === "string" && parsed.version.length > 0 ? parsed.version : "0.0.0";
157276
157278
  }
157277
- var CLI_VERSION = "2.0.0-alpha.2".length > 0 ? "2.0.0-alpha.2" : readCliVersionFromPackageJson();
157279
+ var CLI_VERSION = "2.0.0-alpha.4".length > 0 ? "2.0.0-alpha.4" : readCliVersionFromPackageJson();
157278
157280
 
157279
157281
  // src/cli.ts
157280
157282
  init_config();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/cli",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.4",
4
4
  "main": "dist/cli.bundle.cjs",
5
5
  "bin": {
6
6
  "galacean": "bin/galacean.js"