@embeddable.com/sdk-core 4.1.5 → 4.1.6-next.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embeddable.com/sdk-core",
3
- "version": "4.1.5",
3
+ "version": "4.1.6-next.1",
4
4
  "description": "Core Embeddable SDK module responsible for web-components bundling and publishing.",
5
5
  "keywords": [
6
6
  "embeddable",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "license": "MIT",
42
42
  "dependencies": {
43
- "@embeddable.com/core": "2.13.2",
43
+ "@embeddable.com/core": "2.13.3-next.0",
44
44
  "@embeddable.com/sdk-utils": "0.8.2",
45
45
  "@inquirer/prompts": "^7.2.1",
46
46
  "@stencil/core": "^4.23.0",
package/src/push.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as fs from "node:fs/promises";
2
2
  import * as fsSync from "node:fs";
3
3
  import archiver from "archiver";
4
- import axios from "axios";
4
+ import axios, {AxiosResponse} from "axios";
5
5
  import ora, { Ora } from "ora";
6
6
  import { initLogger, logError } from "./logger";
7
7
  import * as path from "path";
@@ -290,6 +290,7 @@ export async function sendBuildByApiKey(
290
290
  const form = await createFormData(ctx.client.archiveFile, {
291
291
  pushModels: ctx.pushModels,
292
292
  pushComponents: ctx.pushComponents,
293
+ starterEmbeddableIds: ctx.starterEmbeddables?.[ctx.region],
293
294
  authorEmail: email,
294
295
  description: message,
295
296
  ...(cubeVersion ? { cubeVersion } : {}),
@@ -301,6 +302,7 @@ export async function sendBuildByApiKey(
301
302
  apiKey,
302
303
  );
303
304
  await fs.rm(ctx.client.archiveFile);
305
+ checkAndLogWarnings(response);
304
306
 
305
307
  return { ...response.data, message, cubeVersion };
306
308
  }
@@ -334,10 +336,7 @@ export async function sendBuild(
334
336
  token,
335
337
  );
336
338
 
337
- const warnings = response.data.warnings || [];
338
- if (warnings.length > 0) {
339
- console.warn(warnings.join("\n"));
340
- }
339
+ checkAndLogWarnings(response);
341
340
 
342
341
  await fs.rm(ctx.client.archiveFile);
343
342
  }
@@ -352,3 +351,10 @@ async function uploadFile(formData: any, url: string, token: string) {
352
351
  maxBodyLength: Infinity,
353
352
  });
354
353
  }
354
+
355
+ function checkAndLogWarnings(response: AxiosResponse) {
356
+ const warnings = response.data.warnings || [];
357
+ if (warnings.length > 0) {
358
+ ora().warn(warnings.join("\n"));
359
+ }
360
+ }