Skip to content

Commit

Permalink
fix(cli): add fetch log
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Dec 13, 2024
1 parent d6c081a commit 97d4c5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/cli/src/utils/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ const fetchWithModule = async ({
}) => {
if (deps[name]) return;
const url = `${registry}/api/modules/${name}/releases/${version}`;
console.log('module registry fetch:', url);
const response = await fetch(url);
const moduleData: DepData = await response.json();
console.log('module registry response:', moduleData);
deps[name] = moduleData.variants.map((item) => ({
entry: item.remoteEntry,
version: moduleData.version,
Expand Down Expand Up @@ -95,8 +97,10 @@ export const fetchInfo = async ({
};
if (isApp) {
const url = `${registry}/api/apps/${name}/releases/${version}`;
console.log('app registry fetch:', url);
const response = await fetch(url);
const result = await response.json();
console.log('app registry response:', result);
for (const [moduleName, moduleInfo] of Object.entries(
result.dependencyLocks
) as [string, DepData][]) {
Expand Down

0 comments on commit 97d4c5d

Please sign in to comment.