@kubb/react
Advanced tools
Comparing version 2.0.6 to 2.1.0
import { createRequire } from 'module'; | ||
export { createRoot, client_default as default } from './chunk-O2N2FYOX.js'; | ||
import './chunk-4YGML4RM.js'; | ||
import './chunk-TYAII3XK.js'; | ||
export { createRoot, client_default as default } from './chunk-DCFSY7CA.js'; | ||
import './chunk-BC4ZNREA.js'; | ||
import './chunk-KYCE2KKF.js'; | ||
@@ -6,0 +6,0 @@ createRequire(import.meta.url); |
import { createRequire } from 'module'; | ||
export { File, Function, Text, Type } from './chunk-Y5QCOZKE.js'; | ||
import './chunk-TYAII3XK.js'; | ||
export { File, Function, Text, Type } from './chunk-5CHFKPDV.js'; | ||
import './chunk-KYCE2KKF.js'; | ||
@@ -5,0 +5,0 @@ createRequire(import.meta.url); |
import { createRequire } from 'module'; | ||
export { useApp, useFile, useFileManager, useMeta, usePackageVersion, usePlugin, usePluginManager, useResolveName, useResolvePath } from './chunk-EUEHGY36.js'; | ||
import './chunk-O2N2FYOX.js'; | ||
import './chunk-4YGML4RM.js'; | ||
export { useIndent } from './chunk-Y5QCOZKE.js'; | ||
import './chunk-TYAII3XK.js'; | ||
export { useApp, useFile, useFileManager, useMeta, usePackageVersion, usePlugin, usePluginManager, useResolveName, useResolvePath } from './chunk-OFOISVD4.js'; | ||
import './chunk-DCFSY7CA.js'; | ||
import './chunk-BC4ZNREA.js'; | ||
export { useIndent } from './chunk-5CHFKPDV.js'; | ||
import './chunk-KYCE2KKF.js'; | ||
@@ -8,0 +8,0 @@ createRequire(import.meta.url); |
import { createRequire } from 'module'; | ||
export { createIndent, useApp, useFile, useFileManager, useMeta, usePackageVersion, usePlugin, usePluginManager, useResolveName, useResolvePath } from './chunk-EUEHGY36.js'; | ||
export { createRoot } from './chunk-O2N2FYOX.js'; | ||
import './chunk-4YGML4RM.js'; | ||
export { File, Function, Text, Type, useIndent } from './chunk-Y5QCOZKE.js'; | ||
import './chunk-TYAII3XK.js'; | ||
export { createIndent, useApp, useFile, useFileManager, useMeta, usePackageVersion, usePlugin, usePluginManager, useResolveName, useResolvePath } from './chunk-OFOISVD4.js'; | ||
export { createRoot } from './chunk-DCFSY7CA.js'; | ||
import './chunk-BC4ZNREA.js'; | ||
export { File, Function, Text, Type, useIndent } from './chunk-5CHFKPDV.js'; | ||
import './chunk-KYCE2KKF.js'; | ||
@@ -8,0 +8,0 @@ createRequire(import.meta.url); |
import { createRequire } from 'module'; | ||
import { init_esm_shims, __toESM, require_jsx_runtime } from './chunk-TYAII3XK.js'; | ||
import { init_esm_shims, __toESM, require_jsx_runtime } from './chunk-KYCE2KKF.js'; | ||
@@ -4,0 +4,0 @@ createRequire(import.meta.url); |
@@ -7,3 +7,3 @@ import { Logger } from '@kubb/core/logger'; | ||
type RootType<T = unknown> = { | ||
renderToString(children: ReactNode, context?: T): void; | ||
renderToString(children: ReactNode, context?: T): Promise<string>; | ||
unmount(): void; | ||
@@ -10,0 +10,0 @@ /** |
import { createRequire } from 'module'; | ||
import { createNode, ReactTemplate } from './chunk-4YGML4RM.js'; | ||
import { init_esm_shims } from './chunk-TYAII3XK.js'; | ||
import { createNode, ReactTemplate } from './chunk-BC4ZNREA.js'; | ||
import { init_esm_shims } from './chunk-KYCE2KKF.js'; | ||
import { format as format$1 } from 'prettier'; | ||
import pluginTypescript from 'prettier/plugins/typescript'; | ||
@@ -12,2 +14,23 @@ createRequire(import.meta.url); | ||
init_esm_shims(); | ||
// src/server/format.ts | ||
init_esm_shims(); | ||
var formatOptions = { | ||
tabWidth: 2, | ||
printWidth: 160, | ||
parser: "typescript", | ||
singleQuote: true, | ||
semi: false, | ||
bracketSameLine: false, | ||
endOfLine: "auto", | ||
plugins: [pluginTypescript] | ||
}; | ||
function format(source) { | ||
if (!source) { | ||
return Promise.resolve(""); | ||
} | ||
return format$1(source, formatOptions); | ||
} | ||
// src/server/createRootServer.ts | ||
var instances = /* @__PURE__ */ new Map(); | ||
@@ -23,3 +46,3 @@ function createRootServer({ container, logger }) { | ||
instance.render(children, context); | ||
return instance.output; | ||
return format(instance.output); | ||
}, | ||
@@ -26,0 +49,0 @@ unmount() { |
{ | ||
"name": "@kubb/react", | ||
"version": "2.0.6", | ||
"version": "2.1.0", | ||
"description": "Generator react", | ||
@@ -61,4 +61,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@kubb/core": "2.0.6", | ||
"@kubb/parser": "2.0.6" | ||
"@kubb/core": "2.1.0", | ||
"@kubb/parser": "2.1.0" | ||
}, | ||
@@ -68,3 +68,3 @@ "devDependencies": { | ||
"@types/react-reconciler": "^0.28.8", | ||
"eslint": "^8.55.0", | ||
"eslint": "^8.56.0", | ||
"react": "^18.2.0", | ||
@@ -71,0 +71,0 @@ "react-reconciler": "^0.29.0", |
import { createNode } from '../shared/dom.ts' | ||
import { ReactTemplate } from '../shared/ReactTemplate.tsx' | ||
import { format } from './format.ts' | ||
@@ -28,3 +29,3 @@ import type { Logger } from '@kubb/core/logger' | ||
return instance.output | ||
return format(instance.output) | ||
}, | ||
@@ -31,0 +32,0 @@ unmount() { |
@@ -5,3 +5,3 @@ import type { KubbFile } from '@kubb/core' | ||
export type RootType<T = unknown> = { | ||
renderToString(children: ReactNode, context?: T): void | ||
renderToString(children: ReactNode, context?: T): Promise<string> | ||
unmount(): void | ||
@@ -8,0 +8,0 @@ /** |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5309937
104
52863
1
+ Added@kubb/core@2.1.0(transitive)
+ Added@kubb/parser@2.1.0(transitive)
+ Added@kubb/types@2.1.0(transitive)
- Removed@kubb/core@2.0.6(transitive)
- Removed@kubb/parser@2.0.6(transitive)
- Removed@kubb/types@2.0.6(transitive)
Updated@kubb/core@2.1.0
Updated@kubb/parser@2.1.0