Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kubb/core

Package Overview
Dependencies
Maintainers
1
Versions
661
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kubb/core - npm Package Compare versions

Comparing version 3.0.4 to 3.0.5

dist/chunk-FJV2WFX3.js

4

dist/index.d.ts

@@ -1,3 +0,3 @@

import { P as PluginContext, F as FileManager, a as PluginManager, U as UserConfig, C as Config, I as InputPath, b as PluginFactoryOptions, c as UserPluginWithLifeCycle } from './FileManager-Cn8nSj1H.js';
export { B as BarrelType, d as FileMetaBase, G as GetPluginFactoryOptions, o as Group, e as InputData, O as Output, i as Plugin, f as PluginKey, k as PluginLifecycle, l as PluginLifecycleHooks, m as PluginParameter, j as PluginWithLifeCycle, n as ResolveNameParams, R as ResolvePathParams, h as UserPlugin, g as getSource } from './FileManager-Cn8nSj1H.js';
import { P as PluginContext, F as FileManager, a as PluginManager, U as UserConfig, C as Config, I as InputPath, b as PluginFactoryOptions, c as UserPluginWithLifeCycle } from './FileManager-DU3xGFur.js';
export { B as BarrelType, d as FileMetaBase, G as GetPluginFactoryOptions, o as Group, e as InputData, O as Output, i as Plugin, f as PluginKey, k as PluginLifecycle, l as PluginLifecycleHooks, m as PluginParameter, j as PluginWithLifeCycle, n as ResolveNameParams, R as ResolvePathParams, h as UserPlugin, g as getSource, p as processFiles } from './FileManager-DU3xGFur.js';
import { L as Logger } from './logger-DvbHXjIO.js';

@@ -4,0 +4,0 @@ import { PossiblePromise } from '@kubb/types';

import { transformReservedWord } from './chunk-2EU7DMPM.js';
import { EventEmitter, createLogger } from './chunk-HTOO3HNK.js';
import { FileManager, setUniqueName, processFiles, URLPath } from './chunk-DXGMSPTW.js';
export { FileManager, getSource } from './chunk-DXGMSPTW.js';
import { FileManager, setUniqueName, processFiles, URLPath } from './chunk-FJV2WFX3.js';
export { FileManager, getSource, processFiles } from './chunk-FJV2WFX3.js';
import './chunk-BQXM32UO.js';

@@ -689,3 +689,4 @@ import './chunk-HBQM723K.js';

files = await processFiles({
config: options.config,
root: options.config.root,
extension: options.config.output.extension,
dryRun: !options.config.output.write,

@@ -692,0 +693,0 @@ files: pluginManager.fileManager.files,

import { ResolvedFile, File } from '@kubb/fs/types';
import { a as PluginManager } from './FileManager-Cn8nSj1H.js';
import { a as PluginManager } from './FileManager-DU3xGFur.js';
import { L as Logger } from './logger-DvbHXjIO.js';

@@ -4,0 +4,0 @@ import '@kubb/fs';

@@ -1,2 +0,2 @@

import { getSource, createFile } from './chunk-DXGMSPTW.js';
import { getSource, createFile } from './chunk-FJV2WFX3.js';
import { camelCase, pascalCase } from './chunk-BQXM32UO.js';

@@ -3,0 +3,0 @@ import path from 'node:path';

@@ -1,4 +0,4 @@

export { FunctionParams, URLPath, createFile, createFileExport, createFileImport, createFileParser, getFileParser, getUniqueName, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, renderTemplate, setUniqueName, timeout } from './chunk-DXGMSPTW.js';
export { FunctionParams, URLPath, createFile, createFileExport, createFileImport, createFileParser, getFileParser, getUniqueName, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, renderTemplate, setUniqueName, timeout } from './chunk-FJV2WFX3.js';
import './chunk-BQXM32UO.js';
//# sourceMappingURL=utils.js.map
//# sourceMappingURL=utils.js.map
{
"name": "@kubb/core",
"version": "3.0.4",
"version": "3.0.5",
"description": "Generator core",

@@ -86,5 +86,5 @@ "keywords": [

"semver": "^7.6.3",
"@kubb/fs": "3.0.4",
"@kubb/parser-ts": "3.0.4",
"@kubb/types": "3.0.4"
"@kubb/fs": "3.0.5",
"@kubb/parser-ts": "3.0.5",
"@kubb/types": "3.0.5"
},

@@ -100,4 +100,4 @@ "devDependencies": {

"typescript": "^5.6.3",
"@kubb/config-ts": "3.0.4",
"@kubb/config-tsup": "3.0.4"
"@kubb/config-ts": "3.0.5",
"@kubb/config-tsup": "3.0.5"
},

@@ -104,0 +104,0 @@ "engines": {

@@ -138,3 +138,4 @@ import { clean, read } from '@kubb/fs'

files = await processFiles({
config: options.config,
root: options.config.root,
extension: options.config.output.extension,
dryRun: !options.config.output.write,

@@ -141,0 +142,0 @@ files: pluginManager.fileManager.files,

@@ -370,5 +370,6 @@ import { extname, join, relative } from 'node:path'

type WriteFilesProps = {
config: Config
root: Config['root']
files: Array<KubbFile.ResolvedFile>
logger: Logger
extension?: Config['output']['extension']
logger?: Logger
dryRun?: boolean

@@ -381,3 +382,3 @@ }

export async function processFiles({ dryRun, config, logger, files }: WriteFilesProps) {
export async function processFiles({ dryRun, root, extension, logger, files }: WriteFilesProps) {
const orderedFiles = orderBy(files, [

@@ -389,3 +390,3 @@ (v) => v?.meta && 'pluginKey' in v.meta && !v.meta.pluginKey,

logger.emit('debug', {
logger?.emit('debug', {
date: new Date(),

@@ -399,7 +400,7 @@ logs: [JSON.stringify({ files: orderedFiles }, null, 2)],

logger.emit('progress_start', { id: 'files', size, message: 'Writing files ...' })
logger?.emit('progress_start', { id: 'files', size, message: 'Writing files ...' })
const promises = orderedFiles.map(async (file) => {
await queue.add(async () => {
const message = file ? `Writing ${relative(config.root, file.path)}` : ''
const extname = config.output.extension?.[file.extname]
const message = file ? `Writing ${relative(root, file.path)}` : ''
const extname = extension?.[file.extname]

@@ -410,3 +411,3 @@ const source = await getSource(file, { logger, extname })

logger.emit('progressed', { id: 'files', message })
logger?.emit('progressed', { id: 'files', message })
})

@@ -417,3 +418,3 @@ })

logger.emit('progress_stop', { id: 'files' })
logger?.emit('progress_stop', { id: 'files' })
}

@@ -420,0 +421,0 @@

export { build, build as default, safeBuild } from './build.ts'
export { defineConfig, isInputPath } from './config.ts'
export { FileManager, getSource } from './FileManager.ts'
export { FileManager, getSource, processFiles } from './FileManager.ts'
export type { FileMetaBase } from './FileManager.ts'

@@ -5,0 +5,0 @@ export { BaseGenerator } from './BaseGenerator.ts'

@@ -121,2 +121,13 @@ import path from 'node:path'

const tsxParser = createFileParser({
async format(source) {
const module = await import('@kubb/parser-ts')
//4 = tsx
return module.format(source, { scriptKind: 4 })
},
async print(file, options = { extname: '.tsx' }) {
return typeScriptParser.print(file, options)
},
})
const defaultParser = createFileParser({

@@ -134,4 +145,4 @@ async format(source) {

'.js': typeScriptParser,
'.jsx': typeScriptParser,
'.tsx': typeScriptParser,
'.jsx': tsxParser,
'.tsx': tsxParser,
'.json': defaultParser,

@@ -138,0 +149,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc