intellitester 0.2.55 → 0.2.56

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.
@@ -1322,11 +1322,12 @@ var resolveBrowserName = (input) => {
1322
1322
  }
1323
1323
  return resolved;
1324
1324
  };
1325
- var detectPackageManager = async () => {
1326
- if (await fileExists("deno.lock")) return "deno";
1327
- if (await fileExists("pnpm-lock.yaml")) return "pnpm";
1328
- if (await fileExists("bun.lockb") || await fileExists("bun.lock")) return "bun";
1329
- if (await fileExists("yarn.lock")) return "yarn";
1325
+ var detectPackageManager = async (cwd) => {
1326
+ const check = (file) => fileExists(cwd ? path4__namespace.default.join(cwd, file) : file);
1327
+ if (await check("deno.lock")) return "deno";
1328
+ if (await check("pnpm-lock.yaml")) return "pnpm";
1329
+ if (await check("bun.lockb") || await check("bun.lock")) return "bun";
1330
+ if (await check("yarn.lock")) return "yarn";
1330
1331
  return "npm";
1331
1332
  };
1332
1333
  var getAvailableScript = async (cwd, ...scriptNames) => {
@@ -1359,7 +1360,7 @@ var execCommand = async (cmd, args, cwd) => {
1359
1360
  });
1360
1361
  };
1361
1362
  var buildAndPreview = async (config, cwd, freshBuild = false) => {
1362
- const pm = await detectPackageManager();
1363
+ const pm = await detectPackageManager(cwd);
1363
1364
  const previewConfig = config?.preview || {};
1364
1365
  const buildCmd = previewConfig.build?.command || `${pm} run build`;
1365
1366
  const [buildExec, ...buildArgs] = buildCmd.split(" ");
@@ -1387,10 +1388,9 @@ webServer:
1387
1388
  const [previewExec, ...previewArgs] = previewCmd.split(" ");
1388
1389
  const previewUrl = previewConfig.url || config?.webServer?.url || config?.platforms?.web?.baseUrl || "http://localhost:4321";
1389
1390
  const timeout = previewConfig.timeout || 6e4;
1390
- const fs4 = await import('fs/promises');
1391
1391
  const buildDirs = ["dist", "build", ".next", ".output", ".astro"];
1392
1392
  const hasArtifacts = await Promise.all(
1393
- buildDirs.map((dir) => fs4.access(dir).then(() => true).catch(() => false))
1393
+ buildDirs.map((dir) => fs3__default.default.access(path4__namespace.default.join(cwd, dir)).then(() => true).catch(() => false))
1394
1394
  );
1395
1395
  const artifactsExist = hasArtifacts.some(Boolean);
1396
1396
  if (!artifactsExist || freshBuild) {