@dreamboard-games/cli 0.1.30-alpha.33 → 0.1.30-alpha.35

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/index.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  titleFromSlug,
48
48
  toDreamboardApiError,
49
49
  waitForCompiledResultJobSdk
50
- } from "./chunk-E67GR2SL.js";
50
+ } from "./chunk-UDERNVAM.js";
51
51
  import {
52
52
  applyWorkspaceCodegen,
53
53
  collectLocalFiles,
@@ -81,7 +81,7 @@ import {
81
81
  updateProjectLocalMaintainerRegistry,
82
82
  updateProjectState,
83
83
  writeSnapshot
84
- } from "./chunk-BN5UBK47.js";
84
+ } from "./chunk-KDLHUO7D.js";
85
85
  import {
86
86
  getActiveCredentialBackendName,
87
87
  getGlobalAuthPath,
@@ -2979,12 +2979,10 @@ import { pathToFileURL } from "url";
2979
2979
  async function loadProjectDevHost(projectRoot) {
2980
2980
  const requireFromProject = createRequire(path.join(projectRoot, "package.json"));
2981
2981
  let packageJsonPath;
2982
- let entryPath;
2983
2982
  try {
2984
2983
  packageJsonPath = requireFromProject.resolve(
2985
2984
  "@dreamboard-games/dev-host/package.json"
2986
2985
  );
2987
- entryPath = requireFromProject.resolve("@dreamboard-games/dev-host");
2988
2986
  } catch (error) {
2989
2987
  throw new Error(
2990
2988
  "Install @dreamboard-games/dev-host in this workspace before running dreamboard dev or browser tests.",
@@ -2992,15 +2990,16 @@ async function loadProjectDevHost(projectRoot) {
2992
2990
  );
2993
2991
  }
2994
2992
  const packageRoot = path.dirname(packageJsonPath);
2993
+ const packageJson = requireFromProject(packageJsonPath);
2994
+ if (packageJson.name !== "@dreamboard-games/dev-host" || typeof packageJson.version !== "string" || packageJson.version.length === 0) {
2995
+ throw new Error("Installed @dreamboard-games/dev-host metadata is invalid.");
2996
+ }
2997
+ const entryPath = path.resolve(packageRoot, packageJson.main ?? "dist/index.js");
2995
2998
  if (!isPathInside(packageRoot, entryPath)) {
2996
2999
  throw new Error(
2997
3000
  "@dreamboard-games/dev-host resolved outside its installed package."
2998
3001
  );
2999
3002
  }
3000
- const packageJson = requireFromProject(packageJsonPath);
3001
- if (packageJson.name !== "@dreamboard-games/dev-host" || typeof packageJson.version !== "string" || packageJson.version.length === 0) {
3002
- throw new Error("Installed @dreamboard-games/dev-host metadata is invalid.");
3003
- }
3004
3003
  const loaded = await import(pathToFileURL(entryPath).href);
3005
3004
  if (loaded.protocolVersion !== 1 || typeof loaded.start !== "function") {
3006
3005
  throw new Error(