vercel 44.2.1 → 44.2.2

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -178589,21 +178589,25 @@ async function pull2(client2) {
178589
178589
  printError(error3);
178590
178590
  return 1;
178591
178591
  }
178592
- const dpl = parsedArgs.flags["--dpl"] ?? project.targets?.production?.id ?? project.latestDeployments?.[0]?.id;
178593
- if (!dpl) {
178594
- output_manager_default.stopSpinner();
178595
- output_manager_default.error(`No deployment found for project ${import_chalk107.default.bold(project.name)}`);
178596
- return 1;
178597
- }
178598
- const microfrontendsConfigUrl = `/v1/microfrontends/${dpl}/config`;
178592
+ let rawConfig;
178593
+ const dpl = parsedArgs.flags["--dpl"];
178599
178594
  try {
178600
- const { config: config2 } = await client2.fetch(microfrontendsConfigUrl, {
178601
- method: "GET"
178602
- });
178595
+ if (dpl) {
178596
+ const { config: config2 } = await client2.fetch(`/v1/microfrontends/${dpl}/config`, {
178597
+ method: "GET"
178598
+ });
178599
+ rawConfig = config2;
178600
+ } else {
178601
+ const projectId = project.id;
178602
+ const { config: config2 } = await client2.fetch(`/v1/microfrontends/projects/${projectId}/production-mfe-config`, {
178603
+ method: "GET"
178604
+ });
178605
+ rawConfig = config2;
178606
+ }
178603
178607
  const sanitizedConfig = {
178604
- ...config2,
178608
+ ...rawConfig,
178605
178609
  applications: Object.fromEntries(
178606
- Object.entries(config2.applications).map(([name, app]) => [
178610
+ Object.entries(rawConfig.applications).map(([name, app]) => [
178607
178611
  name,
178608
178612
  {
178609
178613
  ...app,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "44.2.1",
3
+ "version": "44.2.2",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",