@kubb/core 1.13.0-canary.20231018T144635 → 1.13.0-canary.20231018T171206
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 +10 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -779,7 +779,7 @@ var FunctionParams = class {
|
|
|
779
779
|
acc.push(`${type}${rest.default ? ` = ${rest.default}` : ""}`);
|
|
780
780
|
return acc;
|
|
781
781
|
}
|
|
782
|
-
const parameterName = changeCase.camelCase(name, { delimiter: "", transform: changeCase.camelCaseTransformMerge });
|
|
782
|
+
const parameterName = name.startsWith("{") ? name : changeCase.camelCase(name, { delimiter: "", transform: changeCase.camelCaseTransformMerge });
|
|
783
783
|
if (type) {
|
|
784
784
|
if (required) {
|
|
785
785
|
acc.push(`${parameterName}: ${type}${rest.default ? ` = ${rest.default}` : ""}`);
|
|
@@ -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
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
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);
|