@embeddable.com/sdk-core 4.1.6-next.0 → 4.1.6-next.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.
package/lib/index.esm.js CHANGED
@@ -22031,15 +22031,18 @@ async function createFormData(filePath, metadata) {
22031
22031
  return form;
22032
22032
  }
22033
22033
  async function sendBuildByApiKey(ctx, { apiKey, email, message, cubeVersion, }) {
22034
+ var _a;
22034
22035
  const form = await createFormData(ctx.client.archiveFile, {
22035
22036
  pushModels: ctx.pushModels,
22036
22037
  pushComponents: ctx.pushComponents,
22038
+ starterEmbeddableIds: (_a = ctx.starterEmbeddables) === null || _a === void 0 ? void 0 : _a[ctx.region],
22037
22039
  authorEmail: email,
22038
22040
  description: message,
22039
22041
  ...(cubeVersion ? { cubeVersion } : {}),
22040
22042
  });
22041
22043
  const response = await uploadFile(form, `${ctx.pushBaseUrl}/api/v1/bundle/upload`, apiKey);
22042
22044
  await fs.rm(ctx.client.archiveFile);
22045
+ checkAndLogWarnings(response);
22043
22046
  return { ...response.data, message, cubeVersion };
22044
22047
  }
22045
22048
  async function sendBuild(ctx, { workspaceId, token, message, cubeVersion, }) {
@@ -22053,10 +22056,7 @@ async function sendBuild(ctx, { workspaceId, token, message, cubeVersion, }) {
22053
22056
  ...(cubeVersion ? { cubeVersion } : {}),
22054
22057
  });
22055
22058
  const response = await uploadFile(form, `${ctx.pushBaseUrl}/bundle/${workspaceId}/upload`, token);
22056
- const warnings = response.data.warnings || [];
22057
- if (warnings.length > 0) {
22058
- console.warn(warnings.join("\n"));
22059
- }
22059
+ checkAndLogWarnings(response);
22060
22060
  await fs.rm(ctx.client.archiveFile);
22061
22061
  }
22062
22062
  async function uploadFile(formData, url, token) {
@@ -22069,6 +22069,12 @@ async function uploadFile(formData, url, token) {
22069
22069
  maxBodyLength: Infinity,
22070
22070
  });
22071
22071
  }
22072
+ function checkAndLogWarnings(response) {
22073
+ const warnings = response.data.warnings || [];
22074
+ if (warnings.length > 0) {
22075
+ ora().warn(warnings.join("\n"));
22076
+ }
22077
+ }
22072
22078
 
22073
22079
  dotenv.config();
22074
22080
  let wss;