@lesliechan721/aw 0.1.0-beta.27 → 0.1.0-beta.29

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.
@@ -24,7 +24,6 @@ import { projectCatalogSourceLocation } from '../utils/catalog-source-presentati
24
24
  import { calculateCatalogSourceConfigFingerprint, calculateCatalogSourceIdentity, } from '../utils/catalog-source-identity.js';
25
25
  import { checkAwCapabilitySupport, readPluginManifest } from '../utils/manifest.js';
26
26
  import { withAwHomeMutationLock } from '../utils/aw-home-mutation-lock.js';
27
- import { resolveCanonicalRepoProjectKey } from '../utils/state-paths.js';
28
27
  import { IMPLEMENTED_AW_CAPABILITIES } from '../commands/aw-capabilities.js';
29
28
  import { calculateCatalogGenerationSetDigest, resolveActiveCatalogGeneration, } from '../utils/catalog-generation-resolver.js';
30
29
  import { resolveCatalogOperationContext, resolvePartialCatalogOperationContext, selectCatalogOperationContext, } from '../utils/catalog-operation-context.js';
@@ -819,15 +818,24 @@ export function createTuiControllerDependencies(context, progressFeed, options =
819
818
  }))).flat();
820
819
  signal.throwIfAborted();
821
820
  const statusById = new Map(result.payload.catalog.sources.map((source) => [source.id, source]));
822
- const [projectRoot, projectIntentState] = await Promise.all([
823
- resolveCanonicalRepoProjectKey(context.cwd),
824
- readPluginIntentState({ scope: 'project', cwd: context.cwd, env: context.env }),
825
- ]);
826
- signal.throwIfAborted();
821
+ const projectIntentObservation = result.projectIntentObservation;
822
+ const projectIntent = projectIntentObservation.state === 'ready' ? {
823
+ state: 'ready',
824
+ roots: structuredClone(projectIntentObservation.value.roots),
825
+ } : projectIntentObservation.state === 'absent' ? {
826
+ state: 'absent',
827
+ } : {
828
+ state: projectIntentObservation.state,
829
+ code: projectIntentObservation.code,
830
+ message: projectIntentObservation.message,
831
+ };
827
832
  return {
828
833
  cliChannel: packageInfo.version.includes('-') ? 'beta' : 'latest',
829
- projectRoot,
830
- projectIntentRoots: structuredClone(projectIntentState.roots),
834
+ ...(result.projectRoot ? { projectRoot: result.projectRoot } : {}),
835
+ projectIntent,
836
+ ...(projectIntent.state === 'ready'
837
+ ? { projectIntentRoots: structuredClone(projectIntent.roots) }
838
+ : {}),
831
839
  configuredSources: structuredClone(configured.sources),
832
840
  payload: result.payload,
833
841
  pluginSummaries: result.pluginSummaries,