@embeddable.com/sdk-core 3.14.0-next.6 → 3.14.0-next.7

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
@@ -21676,6 +21676,10 @@ var build = async () => {
21676
21676
  breadcrumbs.push("checkNodeVersion");
21677
21677
  removeBuildSuccessFlag();
21678
21678
  const config = await provideConfig();
21679
+ if (!config.plugins.length) {
21680
+ console.warn("⚠️ No plugins found in your embeddable.config file. Example: https://github.com/embeddable-hq/vanilla-components/blob/main/embeddable.config.js#L5");
21681
+ process.exit(0);
21682
+ }
21679
21683
  await validate(config);
21680
21684
  await prepare$1(config);
21681
21685
  await buildTypes(config);
@@ -21871,11 +21875,11 @@ var push = async () => {
21871
21875
  checkNodeVersion();
21872
21876
  breadcrumbs.push("checkNodeVersion");
21873
21877
  const isBuildSuccess = await checkBuildSuccess();
21874
- if (!isBuildSuccess) {
21878
+ const config = await provideConfig();
21879
+ if (!isBuildSuccess && config.pushComponents) {
21875
21880
  console.error("Build failed or not completed. Please run `embeddable:build` first.");
21876
21881
  process.exit(1);
21877
21882
  }
21878
- const config = await provideConfig();
21879
21883
  if (process.argv.includes("--api-key") || process.argv.includes("-k")) {
21880
21884
  spinnerPushing = ora("Using API key...").start();
21881
21885
  breadcrumbs.push("push by api key");
@@ -21934,12 +21938,14 @@ async function pushByApiKey(config, spinner) {
21934
21938
  });
21935
21939
  }
21936
21940
  async function verify(ctx) {
21937
- try {
21938
- await fs.access(ctx.client.buildDir);
21939
- }
21940
- catch (_e) {
21941
- console.error("No embeddable build was produced.");
21942
- process.exit(1);
21941
+ if (ctx.pushComponents) {
21942
+ try {
21943
+ await fs.access(ctx.client.buildDir);
21944
+ }
21945
+ catch (_e) {
21946
+ console.error("No embeddable build was produced.");
21947
+ process.exit(1);
21948
+ }
21943
21949
  }
21944
21950
  // TODO: initiate login if no/invalid token.
21945
21951
  const token = await getToken();