@embeddable.com/sdk-core 3.12.2 → 3.12.4-next.0

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.js CHANGED
@@ -21552,6 +21552,7 @@ const CUBE_FILES = /^(.*)\.cube\.(ya?ml|js)$/;
21552
21552
  const PRESET_FILES = /^(.*)\.(sc|cc)\.ya?ml$/;
21553
21553
  let ora$1;
21554
21554
  var push = async () => {
21555
+ var _a;
21555
21556
  await initLogger("push");
21556
21557
  const breadcrumbs = [];
21557
21558
  let spinnerPushing;
@@ -21591,7 +21592,7 @@ var push = async () => {
21591
21592
  spinnerPushing === null || spinnerPushing === void 0 ? void 0 : spinnerPushing.fail("Publishing failed");
21592
21593
  await logError({ command: "push", breadcrumbs, error });
21593
21594
  await reportErrorToRollbar(error);
21594
- console.log(error);
21595
+ console.log(((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) || error);
21595
21596
  process.exit(1);
21596
21597
  }
21597
21598
  };
@@ -21981,7 +21982,34 @@ const getPreviewWorkspace = async (startedOra, ctx) => {
21981
21982
  }
21982
21983
  };
21983
21984
 
21984
- var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc = "src", presetsSrc = "src", componentsSrc = "src", globalCss = "src/global.css", viteConfig = {}, rollupOptions = {}, }) => {
21985
+ const REGION_CONFIGS = {
21986
+ EU: {
21987
+ pushBaseUrl: "https://api.eu.embeddable.com",
21988
+ audienceUrl: "https://auth.eu.embeddable.com",
21989
+ previewBaseUrl: "https://app.eu.embeddable.com",
21990
+ authDomain: "auth.eu.embeddable.com",
21991
+ authClientId: "6OGPwIQsVmtrBKhNrwAaXhz4ePb0kBGV",
21992
+ },
21993
+ US: {
21994
+ pushBaseUrl: "https://api.us.embeddable.com",
21995
+ audienceUrl: "https://auth.embeddable.com",
21996
+ previewBaseUrl: "https://app.us.embeddable.com",
21997
+ authDomain: "auth.embeddable.com",
21998
+ authClientId: "dygrSUmI6HmgY5ymVbEAoLDEBxIOyr1V",
21999
+ },
22000
+ "legacy-US": {
22001
+ pushBaseUrl: "https://api.embeddable.com",
22002
+ audienceUrl: "https://auth.embeddable.com",
22003
+ previewBaseUrl: "https://app.embeddable.com",
22004
+ authDomain: "auth.embeddable.com",
22005
+ authClientId: "dygrSUmI6HmgY5ymVbEAoLDEBxIOyr1V",
22006
+ },
22007
+ };
22008
+ var defineConfig = ({ plugins, region = "legacy-US", pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc = "src", presetsSrc = "src", componentsSrc = "src", globalCss = "src/global.css", viteConfig = {}, rollupOptions = {}, }) => {
22009
+ if (region && !REGION_CONFIGS[region]) {
22010
+ throw new Error(`Unsupported region: ${region}. Supported regions are: ${Object.keys(REGION_CONFIGS).join(", ")}`);
22011
+ }
22012
+ const regionConfig = REGION_CONFIGS[region];
21985
22013
  const coreRoot = path__namespace.resolve(__dirname, "..");
21986
22014
  const clientRoot = process.cwd();
21987
22015
  if (!path__namespace.isAbsolute(componentsSrc)) {
@@ -22029,11 +22057,11 @@ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientI
22029
22057
  outputOptions: {
22030
22058
  typesEntryPointFilename: "embeddable-types-entry-point.js",
22031
22059
  },
22032
- pushBaseUrl: pushBaseUrl !== null && pushBaseUrl !== void 0 ? pushBaseUrl : "https://api.embeddable.com",
22033
- audienceUrl: audienceUrl !== null && audienceUrl !== void 0 ? audienceUrl : "https://auth.embeddable.com",
22034
- previewBaseUrl: previewBaseUrl !== null && previewBaseUrl !== void 0 ? previewBaseUrl : "https://app.embeddable.com",
22035
- authDomain: authDomain !== null && authDomain !== void 0 ? authDomain : "auth.embeddable.com",
22036
- authClientId: authClientId !== null && authClientId !== void 0 ? authClientId : "dygrSUmI6HmgY5ymVbEAoLDEBxIOyr1V",
22060
+ pushBaseUrl: pushBaseUrl !== null && pushBaseUrl !== void 0 ? pushBaseUrl : regionConfig.pushBaseUrl,
22061
+ audienceUrl: audienceUrl !== null && audienceUrl !== void 0 ? audienceUrl : regionConfig.audienceUrl,
22062
+ previewBaseUrl: previewBaseUrl !== null && previewBaseUrl !== void 0 ? previewBaseUrl : regionConfig.previewBaseUrl,
22063
+ authDomain: authDomain !== null && authDomain !== void 0 ? authDomain : regionConfig.authDomain,
22064
+ authClientId: authClientId !== null && authClientId !== void 0 ? authClientId : regionConfig.authClientId,
22037
22065
  applicationEnvironment: applicationEnvironment !== null && applicationEnvironment !== void 0 ? applicationEnvironment : "production",
22038
22066
  rollbarAccessToken: rollbarAccessToken !== null && rollbarAccessToken !== void 0 ? rollbarAccessToken : "5c6028038d844bf1835a0f4db5f55d9e",
22039
22067
  plugins,
@@ -22041,7 +22069,7 @@ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientI
22041
22069
  };
22042
22070
 
22043
22071
  var name = "@embeddable.com/sdk-core";
22044
- var version = "3.12.2";
22072
+ var version = "3.12.4-next.0";
22045
22073
  var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
22046
22074
  var keywords = [
22047
22075
  "embeddable",