@kubb/core
Advanced tools
Comparing version 0.0.0-canary-20241213202051 to 0.0.0-canary-20241213215524
import { EventEmitter, createLogger } from './chunk-HTOO3HNK.js'; | ||
import { FileManager, setUniqueName, processFiles, URLPath } from './chunk-VIC3WIWV.js'; | ||
export { FileManager, getSource, processFiles } from './chunk-VIC3WIWV.js'; | ||
import { trim, transformReservedWord } from './chunk-T2FGDLUG.js'; | ||
import { FileManager, setUniqueName, processFiles, URLPath } from './chunk-RXIGSPAK.js'; | ||
export { FileManager, getSource, processFiles } from './chunk-RXIGSPAK.js'; | ||
import { trim, transformReservedWord } from './chunk-ITUFRE7R.js'; | ||
import './chunk-HBQM723K.js'; | ||
@@ -6,0 +6,0 @@ import { getRelativePath, read, readSync, clean } from '@kubb/fs'; |
@@ -1,3 +0,3 @@ | ||
import { getSource, createFile } from './chunk-VIC3WIWV.js'; | ||
import { camelCase, pascalCase } from './chunk-T2FGDLUG.js'; | ||
import { getSource, createFile } from './chunk-RXIGSPAK.js'; | ||
import { camelCase, pascalCase } from './chunk-ITUFRE7R.js'; | ||
import path from 'node:path'; | ||
@@ -4,0 +4,0 @@ |
@@ -54,3 +54,3 @@ import { orderBy } from 'natural-orderby'; | ||
declare function toRegExp(text: string | RegExp): RegExp; | ||
declare function toRegExpString(text: string, func?: string): string; | ||
declare function toRegExpString(text: string, func?: string | null): string; | ||
@@ -57,0 +57,0 @@ declare function transformReservedWord(word: string): string; |
@@ -1,3 +0,3 @@ | ||
export { camelCase, combineCodes, createIndent, createJSDocBlockText, transformers_default as default, escape, isValidVarName, jsStringEscape, merge, nameSorter, orderBy, pascalCase, pathCase, searchAndReplace, stringify, stringifyObject, toRegExp, toRegExpString, transformReservedWord, trim, trimQuotes } from './chunk-T2FGDLUG.js'; | ||
export { camelCase, combineCodes, createIndent, createJSDocBlockText, transformers_default as default, escape, isValidVarName, jsStringEscape, merge, nameSorter, orderBy, pascalCase, pathCase, searchAndReplace, stringify, stringifyObject, toRegExp, toRegExpString, transformReservedWord, trim, trimQuotes } from './chunk-ITUFRE7R.js'; | ||
//# sourceMappingURL=transformers.js.map | ||
//# sourceMappingURL=transformers.js.map |
@@ -1,4 +0,4 @@ | ||
export { FunctionParams, URLPath, createFile, createFileExport, createFileImport, createFileParser, getFileParser, getUniqueName, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, renderTemplate, setUniqueName, timeout } from './chunk-VIC3WIWV.js'; | ||
import './chunk-T2FGDLUG.js'; | ||
export { FunctionParams, URLPath, createFile, createFileExport, createFileImport, createFileParser, getFileParser, getUniqueName, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, renderTemplate, setUniqueName, timeout } from './chunk-RXIGSPAK.js'; | ||
import './chunk-ITUFRE7R.js'; | ||
//# sourceMappingURL=utils.js.map | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "@kubb/core", | ||
"version": "0.0.0-canary-20241213202051", | ||
"version": "0.0.0-canary-20241213215524", | ||
"description": "Generator core", | ||
@@ -86,5 +86,5 @@ "keywords": [ | ||
"semver": "^7.6.3", | ||
"@kubb/fs": "0.0.0-canary-20241213202051", | ||
"@kubb/parser-ts": "0.0.0-canary-20241213202051", | ||
"@kubb/types": "0.0.0-canary-20241213202051" | ||
"@kubb/fs": "0.0.0-canary-20241213215524", | ||
"@kubb/parser-ts": "0.0.0-canary-20241213215524", | ||
"@kubb/types": "0.0.0-canary-20241213215524" | ||
}, | ||
@@ -100,4 +100,4 @@ "devDependencies": { | ||
"typescript": "^5.7.2", | ||
"@kubb/config-ts": "0.0.0-canary-20241213202051", | ||
"@kubb/config-tsup": "0.0.0-canary-20241213202051" | ||
"@kubb/config-ts": "0.0.0-canary-20241213215524", | ||
"@kubb/config-tsup": "0.0.0-canary-20241213215524" | ||
}, | ||
@@ -104,0 +104,0 @@ "engines": { |
@@ -24,6 +24,10 @@ import { jsStringEscape } from './escape' | ||
export function toRegExpString(text: string, func = 'RegExp'): string { | ||
export function toRegExpString(text: string, func: string | null = 'RegExp'): string { | ||
const isStartWithSlash = text.startsWith('/') | ||
const isEndWithSlash = text.endsWith('/') | ||
if (func === null) { | ||
return `/${text.slice(isStartWithSlash ? 1 : 0, isEndWithSlash ? -1 : undefined).replaceAll('/', '\\/')}/` | ||
} | ||
const regexp = `new ${func}('${jsStringEscape(text.slice(isStartWithSlash ? 1 : 0, isEndWithSlash ? -1 : undefined))}')` | ||
@@ -30,0 +34,0 @@ |
@@ -125,3 +125,3 @@ import path from 'node:path' | ||
//4 = tsx | ||
return module.format(source, { scriptKind: 4 }) | ||
return module.format(source) | ||
}, | ||
@@ -128,0 +128,0 @@ async print(file, options = { extname: '.tsx' }) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1451474
14550
+ Added@kubb/fs@0.0.0-canary-20241213215524(transitive)
+ Added@kubb/parser-ts@0.0.0-canary-20241213215524(transitive)
+ Added@kubb/types@0.0.0-canary-20241213215524(transitive)
+ Addedprettier@3.4.2(transitive)
- Removed@kubb/fs@0.0.0-canary-20241213202051(transitive)
- Removed@kubb/parser-ts@0.0.0-canary-20241213202051(transitive)
- Removed@kubb/types@0.0.0-canary-20241213202051(transitive)