@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.
- package/dist/cli.bundle.cjs +19 -13
- package/package.json +1 -1
package/dist/cli.bundle.cjs
CHANGED
|
@@ -578865,20 +578865,26 @@ async function startClientHost(options) {
|
|
|
578865
578865
|
};
|
|
578866
578866
|
}
|
|
578867
578867
|
async function findWorkspaceRoot() {
|
|
578868
|
-
|
|
578869
|
-
|
|
578870
|
-
|
|
578871
|
-
|
|
578872
|
-
|
|
578873
|
-
|
|
578874
|
-
|
|
578875
|
-
|
|
578876
|
-
|
|
578877
|
-
|
|
578878
|
-
|
|
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(
|
|
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.
|
|
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();
|