@wix/astro 1.0.7 → 1.0.8

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/build/index.js CHANGED
@@ -17096,6 +17096,19 @@ function isValidWebhookComponent(component) {
17096
17096
  return component.compType === "WEBHOOK" && !component.compData.webhook.callbackUrl;
17097
17097
  }
17098
17098
 
17099
+ // src/utils/resolveBuildMetadata.ts
17100
+ init_esm_shims();
17101
+ async function resolveBuildMetadata(appManifestPath, config) {
17102
+ const clientDir = await pathExists(config.build.client.pathname) ? config.build.client.pathname : config.outDir.pathname;
17103
+ const serverDir = await pathExists(config.build.server.pathname) ? config.build.server.pathname : void 0;
17104
+ return {
17105
+ appManifestPath,
17106
+ clientDir,
17107
+ outDir: config.outDir.pathname,
17108
+ serverDir
17109
+ };
17110
+ }
17111
+
17099
17112
  // src/utils/writeVirtualBackofficeExtensionFiles.ts
17100
17113
  init_esm_shims();
17101
17114
  import { rm, writeFile as writeFile2 } from "node:fs/promises";
@@ -17281,12 +17294,8 @@ var createIntegration = () => {
17281
17294
  await writeJson(appManifestPath, appManifest, { spaces: 2 });
17282
17295
  await writeJson(
17283
17296
  join6(_config.root.pathname, GIT_IGNORED_DIR, "build-metadata.json"),
17284
- {
17285
- appManifestPath,
17286
- clientDir: _config.build.client.pathname,
17287
- outDir: _config.outDir.pathname,
17288
- serverDir: _config.build.server.pathname
17289
- }
17297
+ await resolveBuildMetadata(appManifestPath, _config),
17298
+ { spaces: 2 }
17290
17299
  );
17291
17300
  },
17292
17301
  "astro:config:done": async ({ config }) => {