@kubb/core 1.13.0-canary.20231018T144635 → 1.13.0-canary.20231018T144840

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/dist/index.cjs CHANGED
@@ -1587,16 +1587,18 @@ async function transformReducer(_previousCode, result, _plugin) {
1587
1587
  async function build(options) {
1588
1588
  const { config, logLevel, logger = createLogger() } = options;
1589
1589
  try {
1590
- if (!URLPath.isURL(config.input.path)) {
1590
+ if ("path" in config.input && !URLPath.isURL(config.input.path)) {
1591
1591
  await read(config.input.path);
1592
1592
  }
1593
1593
  } catch (e) {
1594
- throw new Error(
1595
- "Cannot read file/URL defined in `input.path` or set with `kubb generate PATH` in the CLI of your Kubb config " + pc3__default.default.dim(config.input.path),
1596
- {
1597
- cause: e
1598
- }
1599
- );
1594
+ if ("path" in config.input) {
1595
+ throw new Error(
1596
+ "Cannot read file/URL defined in `input.path` or set with `kubb generate PATH` in the CLI of your Kubb config " + pc3__default.default.dim(config.input.path),
1597
+ {
1598
+ cause: e
1599
+ }
1600
+ );
1601
+ }
1600
1602
  }
1601
1603
  if (config.output.clean) {
1602
1604
  await clean(config.output.path);