@kubb/core 5.0.0-beta.52 → 5.0.0-beta.53
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 +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./chunk-C0LytTxp.js";
|
|
2
2
|
import { a as createStorage, c as camelCase, d as BuildError, f as getErrorMessage, i as FileManager, l as pascalCase, n as _usingCtx, o as OPERATION_FILTER_TYPES, r as FileProcessor, s as diagnosticCode, t as memoryStorage, u as AsyncEventEmitter } from "./memoryStorage-Bdv42rxp.js";
|
|
3
|
-
import { createHash, hash } from "node:crypto";
|
|
4
3
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
4
|
+
import { createHash, hash } from "node:crypto";
|
|
5
5
|
import { access, glob, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
6
6
|
import path, { basename, dirname, join, relative, resolve } from "node:path";
|
|
7
7
|
import * as ast from "@kubb/ast";
|
|
@@ -94,6 +94,25 @@ function randomCliColor(text) {
|
|
|
94
94
|
return styleText(randomColors[hash("sha256", text, "buffer").readUInt32BE(0) % randomColors.length] ?? "white", text);
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
97
|
+
//#region ../../internals/utils/src/path.ts
|
|
98
|
+
/**
|
|
99
|
+
* Converts a filesystem path to use POSIX (`/`) separators.
|
|
100
|
+
*
|
|
101
|
+
* Most of the codebase compares and composes paths as strings (prefix matching, joining for
|
|
102
|
+
* import specifiers, splitting on `/`). On POSIX `path.resolve` already returns `/`-separated
|
|
103
|
+
* paths, but on Windows it returns `\`-separated paths, which breaks every such comparison.
|
|
104
|
+
*
|
|
105
|
+
* Routing every path that crosses a module boundary through `toPosixPath` keeps the rest of the
|
|
106
|
+
* code platform-agnostic. The conversion runs unconditionally so Windows-specific behavior is
|
|
107
|
+
* exercisable from POSIX CI.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* toPosixPath('C:\\repo\\src\\pet.ts') // 'C:/repo/src/pet.ts'
|
|
111
|
+
*/
|
|
112
|
+
function toPosixPath(filePath) {
|
|
113
|
+
return filePath.replaceAll("\\", "/");
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
97
116
|
//#region ../../internals/utils/src/runtime.ts
|
|
98
117
|
/**
|
|
99
118
|
* Returns `true` when the current process is running under Bun.
|
|
@@ -177,25 +196,6 @@ async function clean(path) {
|
|
|
177
196
|
});
|
|
178
197
|
}
|
|
179
198
|
//#endregion
|
|
180
|
-
//#region ../../internals/utils/src/path.ts
|
|
181
|
-
/**
|
|
182
|
-
* Converts a filesystem path to use POSIX (`/`) separators.
|
|
183
|
-
*
|
|
184
|
-
* Most of the codebase compares and composes paths as strings (prefix matching, joining for
|
|
185
|
-
* import specifiers, splitting on `/`). On POSIX `path.resolve` already returns `/`-separated
|
|
186
|
-
* paths, but on Windows it returns `\`-separated paths, which breaks every such comparison.
|
|
187
|
-
*
|
|
188
|
-
* Routing every path that crosses a module boundary through `toPosixPath` keeps the rest of the
|
|
189
|
-
* code platform-agnostic. The conversion runs unconditionally so Windows-specific behavior is
|
|
190
|
-
* exercisable from POSIX CI.
|
|
191
|
-
*
|
|
192
|
-
* @example
|
|
193
|
-
* toPosixPath('C:\\repo\\src\\pet.ts') // 'C:/repo/src/pet.ts'
|
|
194
|
-
*/
|
|
195
|
-
function toPosixPath(filePath) {
|
|
196
|
-
return filePath.replaceAll("\\", "/");
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
199
|
//#region ../../internals/utils/src/promise.ts
|
|
200
200
|
function* chunks(arr, size) {
|
|
201
201
|
for (let i = 0; i < arr.length; i += size) yield arr.slice(i, i + size);
|
|
@@ -637,7 +637,7 @@ function createCache(build) {
|
|
|
637
637
|
}
|
|
638
638
|
//#endregion
|
|
639
639
|
//#region package.json
|
|
640
|
-
var version = "5.0.0-beta.
|
|
640
|
+
var version = "5.0.0-beta.53";
|
|
641
641
|
//#endregion
|
|
642
642
|
//#region src/diagnostics.ts
|
|
643
643
|
/**
|