@embeddable.com/sdk-core 3.2.0-next.1 → 3.2.0-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
@@ -4,11 +4,10 @@ import * as path$1 from 'node:path';
4
4
  import { join } from 'node:path';
5
5
  import * as vite from 'vite';
6
6
  import 'node:child_process';
7
- import * as fsSync from 'node:fs';
7
+ import * as fs$2 from 'node:fs';
8
8
  import { createNodeLogger, createNodeSys } from '@stencil/core/sys/node';
9
9
  import { loadConfig, createCompiler } from '@stencil/core/compiler';
10
10
  import * as YAML from 'yaml';
11
- import * as url$2 from 'node:url';
12
11
  import * as path$2 from 'path';
13
12
  import path__default, { basename } from 'path';
14
13
  import require$$4$1 from 'util';
@@ -382,7 +381,7 @@ var prepare = async (ctx) => {
382
381
  await createComponentDir(ctx.client.componentDir);
383
382
  };
384
383
  async function removeIfExists(ctx) {
385
- if (fsSync.existsSync(ctx.client.buildDir))
384
+ if (fs$2.existsSync(ctx.client.buildDir))
386
385
  await fs$1.rm(ctx.client.buildDir, { recursive: true });
387
386
  }
388
387
  async function copyStencilConfigsToClient(ctx) {
@@ -4626,12 +4625,15 @@ const securityContextSchema = z.array(z.object({
4626
4625
 
4627
4626
  var provideConfig = async () => {
4628
4627
  const configFilePath = `${process.cwd()}/embeddable.config.js`;
4629
- if (!fsSync.existsSync(configFilePath)) {
4630
- console.log("Please create a proper `embeddable.config.js` file first.");
4628
+ const tsConfigFilePath = `${process.cwd()}/embeddable.config.ts`;
4629
+ if (!fs$2.existsSync(configFilePath) && !fs$2.existsSync(tsConfigFilePath)) {
4630
+ console.log("Please create a proper `embeddable.config.js` or `embeddable.config.ts` file in the root of your project.");
4631
4631
  process.exit(1);
4632
4632
  }
4633
- const configFileUrl = url$2.pathToFileURL(configFilePath).href;
4634
- return (await import(configFileUrl)).default;
4633
+ const configPath = fs$2.existsSync(tsConfigFilePath)
4634
+ ? tsConfigFilePath
4635
+ : configFilePath;
4636
+ return (await import(configPath)).default;
4635
4637
  };
4636
4638
 
4637
4639
  function getDefaultExportFromCjs (x) {
@@ -20146,7 +20148,7 @@ async function verify(ctx) {
20146
20148
  return token;
20147
20149
  }
20148
20150
  async function archive(ctx, yamlFiles, includeBuild = true) {
20149
- const output = fsSync.createWriteStream(ctx.client.archiveFile);
20151
+ const output = fs$2.createWriteStream(ctx.client.archiveFile);
20150
20152
  const _archiver = archiver.create("zip", {
20151
20153
  zlib: { level: 9 },
20152
20154
  });