@galacean/cli 2.0.0-alpha.10 → 2.0.0-alpha.11

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 +19 -13
  2. package/package.json +1 -1
@@ -578865,20 +578865,26 @@ async function startClientHost(options) {
578865
578865
  };
578866
578866
  }
578867
578867
  async function findWorkspaceRoot() {
578868
- let current = __dirname;
578869
- while (true) {
578870
- const marker16 = import_node_path22.default.join(current, "pnpm-workspace.yaml");
578871
- try {
578872
- await (0, import_promises16.access)(marker16);
578873
- return current;
578874
- } catch {
578875
- const parent2 = import_node_path22.default.dirname(current);
578876
- if (parent2 === current)
578877
- break;
578878
- current = parent2;
578868
+ const startDirs = [__dirname, import_node_process2.default.cwd()];
578869
+ for (const startDir of startDirs) {
578870
+ let current = startDir;
578871
+ while (true) {
578872
+ const marker16 = import_node_path22.default.join(current, "pnpm-workspace.yaml");
578873
+ try {
578874
+ await (0, import_promises16.access)(marker16);
578875
+ await (0, import_promises16.access)(import_node_path22.default.join(current, "packages/cli-viewport/vite.config.ts"));
578876
+ return current;
578877
+ } catch {
578878
+ const parent2 = import_node_path22.default.dirname(current);
578879
+ if (parent2 === current)
578880
+ break;
578881
+ current = parent2;
578882
+ }
578879
578883
  }
578880
578884
  }
578881
- throw new Error("Unable to locate workspace root for CLI viewport client host");
578885
+ throw new Error(
578886
+ "Unable to locate workspace root for CLI viewport client host. Run this command from within the editor monorepo, or use `npx galacean viewport` from the repo root."
578887
+ );
578882
578888
  }
578883
578889
  async function resolveViteBin(workspaceRoot) {
578884
578890
  const vitePackageJson = import_node_path22.default.join(workspaceRoot, "node_modules/vite/package.json");
@@ -579040,7 +579046,7 @@ function readCliVersionFromPackageJson() {
579040
579046
  const parsed = JSON.parse(raw);
579041
579047
  return typeof parsed.version === "string" && parsed.version.length > 0 ? parsed.version : "0.0.0";
579042
579048
  }
579043
- var CLI_VERSION = "2.0.0-alpha.10".length > 0 ? "2.0.0-alpha.10" : readCliVersionFromPackageJson();
579049
+ var CLI_VERSION = "2.0.0-alpha.11".length > 0 ? "2.0.0-alpha.11" : readCliVersionFromPackageJson();
579044
579050
 
579045
579051
  // src/cli.ts
579046
579052
  init_config();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/cli",
3
- "version": "2.0.0-alpha.10",
3
+ "version": "2.0.0-alpha.11",
4
4
  "main": "dist/cli.bundle.cjs",
5
5
  "bin": {
6
6
  "galacean": "bin/galacean.js"