@kubb/core 1.0.1 → 1.0.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/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +2 -2
- package/src/build.ts +4 -2
package/dist/index.cjs
CHANGED
|
@@ -1068,7 +1068,9 @@ async function transformReducer(_previousCode, result, _plugin) {
|
|
|
1068
1068
|
async function build(options) {
|
|
1069
1069
|
const { config, logger } = options;
|
|
1070
1070
|
try {
|
|
1071
|
-
|
|
1071
|
+
if (!isURL(config.input.path)) {
|
|
1072
|
+
await read(config.input.path);
|
|
1073
|
+
}
|
|
1072
1074
|
} catch (e) {
|
|
1073
1075
|
throw new Error("Cannot read file defined in `input.path` or set with --input in the CLI of your Kubb config", { cause: e });
|
|
1074
1076
|
}
|
package/dist/index.js
CHANGED
|
@@ -1058,7 +1058,9 @@ async function transformReducer(_previousCode, result, _plugin) {
|
|
|
1058
1058
|
async function build(options) {
|
|
1059
1059
|
const { config, logger } = options;
|
|
1060
1060
|
try {
|
|
1061
|
-
|
|
1061
|
+
if (!isURL(config.input.path)) {
|
|
1062
|
+
await read(config.input.path);
|
|
1063
|
+
}
|
|
1062
1064
|
} catch (e) {
|
|
1063
1065
|
throw new Error("Cannot read file defined in `input.path` or set with --input in the CLI of your Kubb config", { cause: e });
|
|
1064
1066
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Generator core",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"change-case": "^4.1.2",
|
|
44
44
|
"directory-tree": "^3.5.1",
|
|
45
45
|
"rimraf": "^5.0.1",
|
|
46
|
-
"@kubb/ts-codegen": "1.0.
|
|
46
|
+
"@kubb/ts-codegen": "1.0.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"tsup": "^6.7.0",
|
package/src/build.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-async-promise-executor */
|
|
2
2
|
import { PluginManager } from './managers/pluginManager/index.ts'
|
|
3
|
-
import { clean, read } from './utils/index.ts'
|
|
3
|
+
import { clean, isURL, read } from './utils/index.ts'
|
|
4
4
|
import { getFileSource } from './managers/fileManager/index.ts'
|
|
5
5
|
|
|
6
6
|
import type { OnExecute } from './managers/pluginManager/index.ts'
|
|
@@ -34,7 +34,9 @@ export async function build(options: BuildOptions): Promise<BuildOutput> {
|
|
|
34
34
|
const { config, logger } = options
|
|
35
35
|
|
|
36
36
|
try {
|
|
37
|
-
|
|
37
|
+
if (!isURL(config.input.path)) {
|
|
38
|
+
await read(config.input.path)
|
|
39
|
+
}
|
|
38
40
|
} catch (e: any) {
|
|
39
41
|
throw new Error('Cannot read file defined in `input.path` or set with --input in the CLI of your Kubb config', { cause: e })
|
|
40
42
|
}
|