@kubb/core 4.4.0 → 4.4.1

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.
Files changed (69) hide show
  1. package/dist/{URLPath-Bpc_OJmh.js → URLPath-DbWtfVa1.js} +2 -2
  2. package/dist/{URLPath-Bpc_OJmh.js.map → URLPath-DbWtfVa1.js.map} +1 -1
  3. package/dist/{URLPath-Bu6Wkco7.cjs → URLPath-Dir2mxRT.cjs} +2 -2
  4. package/dist/{URLPath-Bu6Wkco7.cjs.map → URLPath-Dir2mxRT.cjs.map} +1 -1
  5. package/dist/hooks.cjs.map +1 -1
  6. package/dist/hooks.d.cts +5 -5
  7. package/dist/hooks.d.ts +5 -5
  8. package/dist/hooks.js.map +1 -1
  9. package/dist/index.cjs +87 -14
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +8 -8
  12. package/dist/index.d.ts +8 -8
  13. package/dist/index.js +79 -8
  14. package/dist/index.js.map +1 -1
  15. package/dist/{logger-C7JFdYpj.cjs → logger-BIzTtBYJ.cjs} +47 -4
  16. package/dist/logger-BIzTtBYJ.cjs.map +1 -0
  17. package/dist/{logger-DpoDtxfo.d.cts → logger-BjfDkvkn.d.cts} +1 -1
  18. package/dist/{logger-D_jvWsUF.d.ts → logger-BwhJWK-H.d.ts} +1 -1
  19. package/dist/{logger-khF_Lft4.js → logger-Bxe022ug.js} +39 -4
  20. package/dist/logger-Bxe022ug.js.map +1 -0
  21. package/dist/logger.cjs +1 -2
  22. package/dist/logger.d.cts +1 -1
  23. package/dist/logger.d.ts +1 -1
  24. package/dist/logger.js +1 -2
  25. package/dist/{prompt-CgJLZzbf.cjs → prompt-D5DZPtWc.cjs} +1 -1
  26. package/dist/{prompt-CgJLZzbf.cjs.map → prompt-D5DZPtWc.cjs.map} +1 -1
  27. package/dist/{prompt-CIpZjUDy.js → prompt-xM0onfy8.js} +1 -1
  28. package/dist/{prompt-CIpZjUDy.js.map → prompt-xM0onfy8.js.map} +1 -1
  29. package/dist/{transformers-BN5jfIAt.js → transformers-CeNW0G32.js} +1 -1
  30. package/dist/{transformers-BN5jfIAt.js.map → transformers-CeNW0G32.js.map} +1 -1
  31. package/dist/{transformers-BpnIvSiH.cjs → transformers-DWLXDYKb.cjs} +1 -1
  32. package/dist/{transformers-BpnIvSiH.cjs.map → transformers-DWLXDYKb.cjs.map} +1 -1
  33. package/dist/transformers.cjs +1 -1
  34. package/dist/transformers.js +1 -1
  35. package/dist/{types-CCUiy4jG.d.ts → types-CVONMhN_.d.cts} +14 -14
  36. package/dist/{types-EV6-sImo.d.cts → types-CyDeSlGF.d.ts} +14 -14
  37. package/dist/{types-ClXc6HFo.d.ts → types-DCR_QgGt.d.ts} +1 -1
  38. package/dist/{types-C3ea5qNG.d.cts → types-DueAg3XP.d.cts} +1 -1
  39. package/dist/utils.cjs +2 -2
  40. package/dist/utils.d.cts +1 -1
  41. package/dist/utils.d.ts +1 -1
  42. package/dist/utils.js +2 -2
  43. package/package.json +12 -11
  44. package/src/BarrelManager.ts +1 -1
  45. package/src/FileManager.ts +5 -2
  46. package/src/PluginManager.ts +1 -1
  47. package/src/build.ts +2 -1
  48. package/src/fs/index.ts +0 -7
  49. package/src/hooks/useMode.ts +1 -1
  50. package/src/types.ts +1 -1
  51. package/src/utils/TreeNode.ts +1 -1
  52. package/dist/fs-BIPMUfpW.js +0 -90
  53. package/dist/fs-BIPMUfpW.js.map +0 -1
  54. package/dist/fs-CM7ohZSu.cjs +0 -141
  55. package/dist/fs-CM7ohZSu.cjs.map +0 -1
  56. package/dist/fs.cjs +0 -17
  57. package/dist/fs.d.cts +0 -2
  58. package/dist/fs.d.ts +0 -2
  59. package/dist/fs.js +0 -4
  60. package/dist/index-BmQIxvw0.d.cts +0 -144
  61. package/dist/index-DdO15F70.d.ts +0 -144
  62. package/dist/logger-C7JFdYpj.cjs.map +0 -1
  63. package/dist/logger-khF_Lft4.js.map +0 -1
  64. package/dist/write-BsFt8M9e.cjs +0 -49
  65. package/dist/write-BsFt8M9e.cjs.map +0 -1
  66. package/dist/write-CxO1CDML.js +0 -40
  67. package/dist/write-CxO1CDML.js.map +0 -1
  68. package/src/fs/types.ts +0 -132
  69. package/src/fs/unlink.ts +0 -5
package/src/fs/types.ts DELETED
@@ -1,132 +0,0 @@
1
- type BasePath<T extends string = string> = `${T}/`
2
-
3
- export type Import = {
4
- /**
5
- * Import name to be used
6
- * @example ["useState"]
7
- * @example "React"
8
- */
9
- name:
10
- | string
11
- | Array<
12
- | string
13
- | {
14
- propertyName: string
15
- name?: string
16
- }
17
- >
18
- /**
19
- * Path for the import
20
- * @example '@kubb/core'
21
- */
22
- path: string
23
- /**
24
- * Add `type` prefix to the import, this will result in: `import type { Type } from './path'`.
25
- */
26
- isTypeOnly?: boolean
27
-
28
- isNameSpace?: boolean
29
- /**
30
- * When root is set it will get the path with relative getRelativePath(root, path).
31
- */
32
- root?: string
33
- }
34
-
35
- export type Source = {
36
- name?: string
37
- value?: string
38
- isTypeOnly?: boolean
39
- /**
40
- * Has const or type 'export'
41
- * @default false
42
- */
43
- isExportable?: boolean
44
- /**
45
- * When set, barrel generation will add this
46
- * @default false
47
- */
48
- isIndexable?: boolean
49
- }
50
-
51
- export type Export = {
52
- /**
53
- * Export name to be used.
54
- * @example ["useState"]
55
- * @example "React"
56
- */
57
- name?: string | Array<string>
58
- /**
59
- * Path for the import.
60
- * @example '@kubb/core'
61
- */
62
- path: string
63
- /**
64
- * Add `type` prefix to the export, this will result in: `export type { Type } from './path'`.
65
- */
66
- isTypeOnly?: boolean
67
- /**
68
- * Make it possible to override the name, this will result in: `export * as aliasName from './path'`.
69
- */
70
- asAlias?: boolean
71
- }
72
-
73
- export type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`
74
-
75
- export type Mode = 'single' | 'split'
76
-
77
- /**
78
- * Name to be used to dynamicly create the baseName(based on input.path)
79
- * Based on UNIX basename
80
- * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
81
- */
82
- export type BaseName = `${string}.${string}`
83
-
84
- /**
85
- * Path will be full qualified path to a specified file
86
- */
87
- export type Path = string
88
-
89
- export type AdvancedPath<T extends BaseName = BaseName> = `${BasePath}${T}`
90
-
91
- export type OptionalPath = Path | undefined | null
92
-
93
- export type File<TMeta extends object = object> = {
94
- /**
95
- * Name to be used to create the path
96
- * Based on UNIX basename, `${name}.extname`
97
- * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
98
- */
99
- baseName: BaseName
100
- /**
101
- * Path will be full qualified path to a specified file
102
- */
103
- path: AdvancedPath<BaseName> | Path
104
- sources: Array<Source>
105
- imports?: Array<Import>
106
- exports?: Array<Export>
107
- /**
108
- * Use extra meta, this is getting used to generate the barrel/index files.
109
- */
110
- meta?: TMeta
111
- banner?: string
112
- footer?: string
113
- }
114
-
115
- export type ResolvedImport = Import
116
-
117
- export type ResolvedExport = Export
118
-
119
- export type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
120
- /**
121
- * @default object-hash
122
- */
123
- id: string
124
- /**
125
- * Contains the first part of the baseName, generated based on baseName
126
- * @link https://nodejs.org/api/path.html#pathformatpathobject
127
- */
128
- name: string
129
- extname: Extname
130
- imports: Array<ResolvedImport>
131
- exports: Array<ResolvedExport>
132
- }
package/src/fs/unlink.ts DELETED
@@ -1,5 +0,0 @@
1
- import fs from 'fs-extra'
2
-
3
- export async function unlink(path: string): Promise<void> {
4
- return fs.unlink(path)
5
- }