@tempo-ai/visual-review 0.0.109 → 0.0.110-staging.1

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/bin.js CHANGED
@@ -6,7 +6,7 @@ async function main(argv = process.argv.slice(2)) {
6
6
  const [command, ...commandArgs] = argv;
7
7
  switch (command) {
8
8
  case "capture":
9
- return await (await import("./cli-JDSQSM3K.js")).main(commandArgs);
9
+ return await (await import("./cli-XGLBGCHP.js")).main(commandArgs);
10
10
  case "claim":
11
11
  return await (await import("./claim-J654JAS6.js")).main(commandArgs);
12
12
  case "report":
@@ -4825,7 +4825,7 @@ async function parcelEventToFileEvent(event, rootInfo) {
4825
4825
  // ../tempo-sdk/package.json
4826
4826
  var package_default = {
4827
4827
  name: "tempo-sdk",
4828
- version: "0.0.44",
4828
+ version: "0.0.45",
4829
4829
  type: "module",
4830
4830
  description: "Tempo SDK \u2014 Vite, Next.js, and Expo plugins for JSX annotation and shared page/storyboard types",
4831
4831
  repository: {
@@ -9023,6 +9023,7 @@ var TempoDevServer = class _TempoDevServer {
9023
9023
  tempoRoot: this.tempoRoot,
9024
9024
  commandCwd: this.commandCwd,
9025
9025
  installScript: this.config.scripts.install,
9026
+ updateSdkScript: this.config.scripts.updateSdk,
9026
9027
  startScript: this.config.scripts.start,
9027
9028
  forceInstall: options?.forceInstall ?? false,
9028
9029
  dependenciesInstalled: this.state.dependenciesInstalled
@@ -9209,7 +9210,8 @@ var TempoDevServer = class _TempoDevServer {
9209
9210
  await this.selectNextDistDir();
9210
9211
  sdkUpgradeResult = await ensureTempoSdkLatestSpec(
9211
9212
  this.commandCwd,
9212
- options?.signal
9213
+ options?.signal,
9214
+ { updateCommand: this.config.scripts.updateSdk }
9213
9215
  );
9214
9216
  throwIfLaunchAborted(options?.signal);
9215
9217
  if (this.state.dependenciesInstalled) {
@@ -11849,11 +11851,13 @@ async function runShellCommand(command, cwd, signal) {
11849
11851
  const output = (result.stderr.trim() || result.stdout.trim()).slice(0, 4e3);
11850
11852
  throw new InstallFailedError(command, result.exitCode, output);
11851
11853
  }
11852
- async function ensureTempoSdkLatestSpec(cwd, signal, runCommandFn = runShellCommand) {
11854
+ async function ensureTempoSdkLatestSpec(cwd, signal, options = {}) {
11853
11855
  throwIfLaunchAborted(signal);
11854
- const metadataCacheDir = await mkdtemp(
11855
- path12.join(os2.tmpdir(), "tempo-sdk-meta-")
11856
- ).catch(() => null);
11856
+ const configuredUpdateCommand = options.updateCommand?.trim();
11857
+ const runCommandFn = options.runCommand ?? runShellCommand;
11858
+ const metadataCacheDir = configuredUpdateCommand ? null : await mkdtemp(path12.join(os2.tmpdir(), "tempo-sdk-meta-")).catch(
11859
+ () => null
11860
+ );
11857
11861
  const cleanupMetadataCache = async () => {
11858
11862
  if (!metadataCacheDir) return;
11859
11863
  await rm5(metadataCacheDir, { recursive: true, force: true }).catch(
@@ -11861,12 +11865,17 @@ async function ensureTempoSdkLatestSpec(cwd, signal, runCommandFn = runShellComm
11861
11865
  }
11862
11866
  );
11863
11867
  };
11864
- const plan = await resolveTempoSdkUpgradePlan(cwd, {
11868
+ const nativePlan = await resolveTempoSdkUpgradePlan(cwd, {
11865
11869
  ...metadataCacheDir ? { metadataCacheDir } : {}
11866
11870
  }).catch(async (error) => {
11867
11871
  await cleanupMetadataCache();
11868
11872
  throw error;
11869
11873
  });
11874
+ const plan = configuredUpdateCommand ? {
11875
+ ...nativePlan,
11876
+ updateCommand: configuredUpdateCommand,
11877
+ remediationCommand: configuredUpdateCommand
11878
+ } : nativePlan;
11870
11879
  if (signal?.aborted) {
11871
11880
  await cleanupMetadataCache();
11872
11881
  throw launchAbortError();
@@ -11932,6 +11941,20 @@ async function ensureTempoSdkLatestSpec(cwd, signal, runCommandFn = runShellComm
11932
11941
  devLog("supervisor:sdk_spec_pinned_local", { cwd });
11933
11942
  return { attempted: false, plan };
11934
11943
  }
11944
+ if (configuredUpdateCommand) {
11945
+ const dialectIssue = findPowerShellSyntax(configuredUpdateCommand);
11946
+ if (dialectIssue) {
11947
+ throw new InstallShellDialectMismatchError(
11948
+ configuredUpdateCommand,
11949
+ describePowerShellRejection(dialectIssue)
11950
+ );
11951
+ }
11952
+ updateCommandStarted = true;
11953
+ await runCommandFn(plan.updateCommand, plan.cwd, signal);
11954
+ throwIfLaunchAborted(signal);
11955
+ await ensureSpecLatest();
11956
+ return { attempted: true, plan };
11957
+ }
11935
11958
  const nodeModulesPath = path12.join(cwd, "node_modules");
11936
11959
  const installedPkgPath = path12.join(
11937
11960
  nodeModulesPath,
@@ -12447,11 +12470,18 @@ async function readTempoDevserverConfig(tempoConfigPath) {
12447
12470
  `tempo.config.json at ${tempoConfigPath} must declare scripts.install and scripts.start`
12448
12471
  );
12449
12472
  }
12473
+ const updateSdk = config.scripts.updateSdk;
12474
+ if (updateSdk != null && (typeof updateSdk !== "string" || updateSdk.trim().length === 0)) {
12475
+ throw new Error(
12476
+ `tempo.config.json at ${tempoConfigPath}: scripts.updateSdk must be a non-empty string when provided`
12477
+ );
12478
+ }
12450
12479
  return {
12451
12480
  scripts: {
12452
12481
  install: config.scripts.install,
12453
12482
  start: config.scripts.start,
12454
- stop: config.scripts.stop ?? null
12483
+ stop: config.scripts.stop ?? null,
12484
+ ...typeof updateSdk === "string" ? { updateSdk: updateSdk.trim() } : {}
12455
12485
  },
12456
12486
  tempoHostUrl: config.urls?.tempoHost ?? null
12457
12487
  };
@@ -13859,4 +13889,4 @@ export {
13859
13889
  buildBaselineCaptureArgs,
13860
13890
  main
13861
13891
  };
13862
- //# sourceMappingURL=chunk-7P5FPOFE.js.map
13892
+ //# sourceMappingURL=chunk-WAICDGXL.js.map