@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.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -763,7 +763,7 @@ var FunctionParams = class {
|
|
|
763
763
|
acc.push(`${type}${rest.default ? ` = ${rest.default}` : ""}`);
|
|
764
764
|
return acc;
|
|
765
765
|
}
|
|
766
|
-
const parameterName = camelCase(name, { delimiter: "", transform: camelCaseTransformMerge });
|
|
766
|
+
const parameterName = name.startsWith("{") ? name : camelCase(name, { delimiter: "", transform: camelCaseTransformMerge });
|
|
767
767
|
if (type) {
|
|
768
768
|
if (required) {
|
|
769
769
|
acc.push(`${parameterName}: ${type}${rest.default ? ` = ${rest.default}` : ""}`);
|
|
@@ -1571,16 +1571,18 @@ async function transformReducer(_previousCode, result, _plugin) {
|
|
|
1571
1571
|
async function build(options) {
|
|
1572
1572
|
const { config, logLevel, logger = createLogger() } = options;
|
|
1573
1573
|
try {
|
|
1574
|
-
if (!URLPath.isURL(config.input.path)) {
|
|
1574
|
+
if ("path" in config.input && !URLPath.isURL(config.input.path)) {
|
|
1575
1575
|
await read(config.input.path);
|
|
1576
1576
|
}
|
|
1577
1577
|
} catch (e) {
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1578
|
+
if ("path" in config.input) {
|
|
1579
|
+
throw new Error(
|
|
1580
|
+
"Cannot read file/URL defined in `input.path` or set with `kubb generate PATH` in the CLI of your Kubb config " + pc3.dim(config.input.path),
|
|
1581
|
+
{
|
|
1582
|
+
cause: e
|
|
1583
|
+
}
|
|
1584
|
+
);
|
|
1585
|
+
}
|
|
1584
1586
|
}
|
|
1585
1587
|
if (config.output.clean) {
|
|
1586
1588
|
await clean(config.output.path);
|