@kubb/agent 5.0.0-alpha.2 → 5.0.0-alpha.21
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/.output/nitro.json +2 -2
- package/.output/server/chunks/nitro/nitro.mjs +2984 -1682
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +3 -5
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/index.mjs +3 -5
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/permessage-deflate.js +6 -6
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/websocket-server.js +5 -5
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/websocket.js +6 -6
- package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/package.json +4 -3
- package/.output/server/node_modules/.nitro/ws@8.20.0/wrapper.mjs +21 -0
- package/.output/server/node_modules/@kubb/fabric-core/dist/{chunk-BVHe6Par.js → chunk-O_arW02_.js} +6 -11
- package/.output/server/node_modules/@kubb/fabric-core/dist/{defaultParser-BD_N68Bo.js → defaultParser-iCpMSYCp.js} +4 -5
- package/.output/server/node_modules/@kubb/fabric-core/dist/{getRelativePath-C4Au07ON.js → getRelativePath-NAm_Y-vp.js} +3 -6
- package/.output/server/node_modules/@kubb/fabric-core/dist/index.js +71 -89
- package/.output/server/node_modules/@kubb/fabric-core/dist/{onProcessExit-CnZym153.js → onProcessExit-Cput7j2c.js} +124 -138
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers/typescript.js +3 -4
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers.js +4 -5
- package/.output/server/node_modules/@kubb/fabric-core/dist/plugins.js +6 -12
- package/.output/server/node_modules/@kubb/fabric-core/package.json +2 -2
- package/.output/server/node_modules/@kubb/react-fabric/dist/{chunk-DbZtQ4qb.js → chunk-BGCRLu6H.js} +12 -21
- package/.output/server/node_modules/@kubb/react-fabric/dist/index.js +33 -35
- package/.output/server/node_modules/@kubb/react-fabric/dist/{react-C2cYsofv.js → jsx-runtime-Bl0DfUmV.js} +262 -7
- package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime.js +3 -5
- package/.output/server/node_modules/@kubb/react-fabric/dist/parsers.js +2 -3
- package/.output/server/node_modules/@kubb/react-fabric/dist/plugins.js +4 -7
- package/.output/server/node_modules/@kubb/react-fabric/dist/{reactPlugin-DGKBWjiR.js → reactPlugin-QQPrjNuQ.js} +13 -28
- package/.output/server/node_modules/@kubb/react-fabric/package.json +7 -2
- package/.output/server/node_modules/@redocly/config/lib/root-config-schema.js +22 -2
- package/.output/server/node_modules/@redocly/config/package.json +2 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/all.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/minimal.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended-strict.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/spec.js +5 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/index.js +1 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/ref-utils.js +7 -6
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/index.js +2 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/index.js +2 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/index.js +2 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-mixed-number-range-constraints.js +19 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/index.js +2 -0
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/redocly-yaml.js +4 -0
- package/.output/server/node_modules/@redocly/openapi-core/package.json +2 -2
- package/.output/server/package.json +6 -6
- package/package.json +20 -20
- package/.output/server/node_modules/.nitro/ws@8.19.0/wrapper.mjs +0 -8
- package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime-CZxrhUx8.js +0 -266
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/buffer-util.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/constants.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/event-target.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/extension.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/limiter.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/receiver.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/sender.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/stream.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/subprotocol.js +0 -0
- /package/.output/server/node_modules/.nitro/{ws@8.19.0 → ws@8.20.0}/lib/validation.js +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { r as trimExtName } from "./getRelativePath-
|
|
3
|
-
import { t as defaultParser } from "./defaultParser-
|
|
1
|
+
import "./chunk-O_arW02_.js";
|
|
2
|
+
import { r as trimExtName } from "./getRelativePath-NAm_Y-vp.js";
|
|
3
|
+
import { t as defaultParser } from "./defaultParser-iCpMSYCp.js";
|
|
4
4
|
import { sortBy, uniqueBy } from "remeda";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import pLimit from "p-limit";
|
|
8
8
|
import { EventEmitter } from "node:events";
|
|
9
|
-
|
|
10
9
|
//#region src/context.ts
|
|
11
10
|
/**
|
|
12
11
|
* Context stack for tracking the current context values
|
|
@@ -71,14 +70,130 @@ function createContext(defaultValue) {
|
|
|
71
70
|
contextDefaults.set(key, defaultValue);
|
|
72
71
|
return key;
|
|
73
72
|
}
|
|
74
|
-
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/contexts/RenderContext.ts
|
|
75
|
+
/**
|
|
76
|
+
* Provides a context for tracking rendering state such as indentation and line length.
|
|
77
|
+
*/
|
|
78
|
+
const RenderContext = createContext({
|
|
79
|
+
indentLevel: 0,
|
|
80
|
+
indentSize: 2,
|
|
81
|
+
currentLineLength: 0,
|
|
82
|
+
shouldBreak: false
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/intrinsic.ts
|
|
86
|
+
function isFabricElement(value) {
|
|
87
|
+
return typeof value === "function" && "type" in value && "component" in value;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Type guard to check if a value is an intrinsic element
|
|
91
|
+
*/
|
|
92
|
+
function isIntrinsic(value) {
|
|
93
|
+
return value && typeof value === "object" && value.__intrinsic === true;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Render a single intrinsic node
|
|
97
|
+
*/
|
|
98
|
+
function renderIntrinsicNode(node, renderContext) {
|
|
99
|
+
switch (node.type) {
|
|
100
|
+
case "br":
|
|
101
|
+
renderContext.currentLineLength = 0;
|
|
102
|
+
return "\n";
|
|
103
|
+
case "indent":
|
|
104
|
+
renderContext.indentLevel++;
|
|
105
|
+
return "";
|
|
106
|
+
case "dedent":
|
|
107
|
+
renderContext.indentLevel = Math.max(0, renderContext.indentLevel - 1);
|
|
108
|
+
return "";
|
|
109
|
+
default: return "";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Helper: render a plain string while applying current indentation at the
|
|
114
|
+
* start of each logical line. This ensures `${indent}` intrinsics affect
|
|
115
|
+
* subsequent string content.
|
|
116
|
+
*/
|
|
117
|
+
function renderIndent(content, renderContext) {
|
|
118
|
+
if (content.length === 0) return "";
|
|
119
|
+
const indentStr = " ".repeat(renderContext.indentLevel * renderContext.indentSize);
|
|
120
|
+
const lines = content.split("\n");
|
|
121
|
+
let out = "";
|
|
122
|
+
for (const [i, line] of lines.entries()) {
|
|
123
|
+
if (renderContext.currentLineLength === 0 && line.length > 0) {
|
|
124
|
+
out += indentStr + line;
|
|
125
|
+
renderContext.currentLineLength = indentStr.length + line.length;
|
|
126
|
+
} else {
|
|
127
|
+
out += line;
|
|
128
|
+
renderContext.currentLineLength += line.length;
|
|
129
|
+
}
|
|
130
|
+
if (i !== lines.length - 1) {
|
|
131
|
+
out += "\n";
|
|
132
|
+
renderContext.currentLineLength = 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return out;
|
|
136
|
+
}
|
|
137
|
+
function renderIntrinsic(children, context) {
|
|
138
|
+
const renderContext = context || inject(RenderContext);
|
|
139
|
+
provide(RenderContext, renderContext);
|
|
140
|
+
if (!children) return "";
|
|
141
|
+
if (isFabricElement(children)) try {
|
|
142
|
+
return renderIntrinsic(children());
|
|
143
|
+
} catch {
|
|
144
|
+
return "";
|
|
145
|
+
}
|
|
146
|
+
if (Array.isArray(children)) return children.map((child) => renderIntrinsic(child)).join("");
|
|
147
|
+
if (isIntrinsic(children)) return renderIntrinsicNode(children, renderContext);
|
|
148
|
+
if (typeof children === "function") return renderIntrinsic(children());
|
|
149
|
+
if (typeof children === "string") return renderIndent(children, renderContext);
|
|
150
|
+
if (typeof children === "number") return renderIndent(String(children), renderContext);
|
|
151
|
+
if (typeof children === "boolean") return renderIndent(children ? "true" : "false", renderContext);
|
|
152
|
+
try {
|
|
153
|
+
return renderIndent(children, renderContext);
|
|
154
|
+
} catch {
|
|
155
|
+
return "";
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Create an intrinsic element
|
|
160
|
+
*/
|
|
161
|
+
function createIntrinsic(type) {
|
|
162
|
+
return {
|
|
163
|
+
type,
|
|
164
|
+
__intrinsic: true
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/createComponent.ts
|
|
169
|
+
function createComponent(type, Component) {
|
|
170
|
+
return (...args) => {
|
|
171
|
+
const fn = (() => renderIntrinsic(Component(args[0])));
|
|
172
|
+
fn.component = Component;
|
|
173
|
+
fn.props = args[0];
|
|
174
|
+
fn.type = type;
|
|
175
|
+
fn.children = (...children) => {
|
|
176
|
+
const propsWithChildren = {
|
|
177
|
+
...args[0] ?? {},
|
|
178
|
+
children() {
|
|
179
|
+
return renderIntrinsic(children);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
const fnChild = (() => renderIntrinsic(Component(propsWithChildren)));
|
|
183
|
+
fnChild.component = Component;
|
|
184
|
+
fnChild.props = args[0];
|
|
185
|
+
fnChild.type = type;
|
|
186
|
+
return fnChild;
|
|
187
|
+
};
|
|
188
|
+
return fn;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
75
191
|
//#endregion
|
|
76
192
|
//#region src/contexts/NodeTreeContext.ts
|
|
77
193
|
/**
|
|
78
194
|
* Context for having the current NodeTree
|
|
79
195
|
*/
|
|
80
196
|
const NodeTreeContext = createContext(null);
|
|
81
|
-
|
|
82
197
|
//#endregion
|
|
83
198
|
//#region src/createFile.ts
|
|
84
199
|
function combineSources(sources) {
|
|
@@ -190,7 +305,6 @@ function createFile(file) {
|
|
|
190
305
|
meta: file.meta || {}
|
|
191
306
|
};
|
|
192
307
|
}
|
|
193
|
-
|
|
194
308
|
//#endregion
|
|
195
309
|
//#region src/utils/AsyncEventEmitter.ts
|
|
196
310
|
var AsyncEventEmitter = class {
|
|
@@ -241,7 +355,6 @@ var AsyncEventEmitter = class {
|
|
|
241
355
|
this.#emitter.removeAllListeners();
|
|
242
356
|
}
|
|
243
357
|
};
|
|
244
|
-
|
|
245
358
|
//#endregion
|
|
246
359
|
//#region src/FileProcessor.ts
|
|
247
360
|
var FileProcessor = class {
|
|
@@ -296,7 +409,6 @@ var FileProcessor = class {
|
|
|
296
409
|
return files;
|
|
297
410
|
}
|
|
298
411
|
};
|
|
299
|
-
|
|
300
412
|
//#endregion
|
|
301
413
|
//#region src/utils/Cache.ts
|
|
302
414
|
var Cache = class {
|
|
@@ -321,7 +433,6 @@ var Cache = class {
|
|
|
321
433
|
}
|
|
322
434
|
flush() {}
|
|
323
435
|
};
|
|
324
|
-
|
|
325
436
|
//#endregion
|
|
326
437
|
//#region src/FileManager.ts
|
|
327
438
|
function mergeFile(a, b) {
|
|
@@ -423,7 +534,6 @@ var FileManager = class {
|
|
|
423
534
|
return resolvedFiles;
|
|
424
535
|
}
|
|
425
536
|
};
|
|
426
|
-
|
|
427
537
|
//#endregion
|
|
428
538
|
//#region src/utils/TreeNode.ts
|
|
429
539
|
var TreeNode = class TreeNode {
|
|
@@ -535,7 +645,6 @@ var TreeNode = class TreeNode {
|
|
|
535
645
|
return treeNode;
|
|
536
646
|
}
|
|
537
647
|
};
|
|
538
|
-
|
|
539
648
|
//#endregion
|
|
540
649
|
//#region src/contexts/RootContext.ts
|
|
541
650
|
/**
|
|
@@ -550,128 +659,6 @@ const RootContext = createContext({
|
|
|
550
659
|
}),
|
|
551
660
|
fileManager: new FileManager()
|
|
552
661
|
});
|
|
553
|
-
|
|
554
|
-
//#endregion
|
|
555
|
-
//#region src/contexts/RenderContext.ts
|
|
556
|
-
/**
|
|
557
|
-
* Provides a context for tracking rendering state such as indentation and line length.
|
|
558
|
-
*/
|
|
559
|
-
const RenderContext = createContext({
|
|
560
|
-
indentLevel: 0,
|
|
561
|
-
indentSize: 2,
|
|
562
|
-
currentLineLength: 0,
|
|
563
|
-
shouldBreak: false
|
|
564
|
-
});
|
|
565
|
-
|
|
566
|
-
//#endregion
|
|
567
|
-
//#region src/intrinsic.ts
|
|
568
|
-
function isFabricElement(value) {
|
|
569
|
-
return typeof value === "function" && "type" in value && "component" in value;
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* Type guard to check if a value is an intrinsic element
|
|
573
|
-
*/
|
|
574
|
-
function isIntrinsic(value) {
|
|
575
|
-
return value && typeof value === "object" && value.__intrinsic === true;
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Render a single intrinsic node
|
|
579
|
-
*/
|
|
580
|
-
function renderIntrinsicNode(node, renderContext) {
|
|
581
|
-
switch (node.type) {
|
|
582
|
-
case "br":
|
|
583
|
-
renderContext.currentLineLength = 0;
|
|
584
|
-
return "\n";
|
|
585
|
-
case "indent":
|
|
586
|
-
renderContext.indentLevel++;
|
|
587
|
-
return "";
|
|
588
|
-
case "dedent":
|
|
589
|
-
renderContext.indentLevel = Math.max(0, renderContext.indentLevel - 1);
|
|
590
|
-
return "";
|
|
591
|
-
default: return "";
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
/**
|
|
595
|
-
* Helper: render a plain string while applying current indentation at the
|
|
596
|
-
* start of each logical line. This ensures `${indent}` intrinsics affect
|
|
597
|
-
* subsequent string content.
|
|
598
|
-
*/
|
|
599
|
-
function renderIndent(content, renderContext) {
|
|
600
|
-
if (content.length === 0) return "";
|
|
601
|
-
const indentStr = " ".repeat(renderContext.indentLevel * renderContext.indentSize);
|
|
602
|
-
const lines = content.split("\n");
|
|
603
|
-
let out = "";
|
|
604
|
-
for (const [i, line] of lines.entries()) {
|
|
605
|
-
if (renderContext.currentLineLength === 0 && line.length > 0) {
|
|
606
|
-
out += indentStr + line;
|
|
607
|
-
renderContext.currentLineLength = indentStr.length + line.length;
|
|
608
|
-
} else {
|
|
609
|
-
out += line;
|
|
610
|
-
renderContext.currentLineLength += line.length;
|
|
611
|
-
}
|
|
612
|
-
if (i !== lines.length - 1) {
|
|
613
|
-
out += "\n";
|
|
614
|
-
renderContext.currentLineLength = 0;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
return out;
|
|
618
|
-
}
|
|
619
|
-
function renderIntrinsic(children, context) {
|
|
620
|
-
const renderContext = context || inject(RenderContext);
|
|
621
|
-
provide(RenderContext, renderContext);
|
|
622
|
-
if (!children) return "";
|
|
623
|
-
if (isFabricElement(children)) try {
|
|
624
|
-
return renderIntrinsic(children());
|
|
625
|
-
} catch {
|
|
626
|
-
return "";
|
|
627
|
-
}
|
|
628
|
-
if (Array.isArray(children)) return children.map((child) => renderIntrinsic(child)).join("");
|
|
629
|
-
if (isIntrinsic(children)) return renderIntrinsicNode(children, renderContext);
|
|
630
|
-
if (typeof children === "function") return renderIntrinsic(children());
|
|
631
|
-
if (typeof children === "string") return renderIndent(children, renderContext);
|
|
632
|
-
if (typeof children === "number") return renderIndent(String(children), renderContext);
|
|
633
|
-
if (typeof children === "boolean") return renderIndent(children ? "true" : "false", renderContext);
|
|
634
|
-
try {
|
|
635
|
-
return renderIndent(children, renderContext);
|
|
636
|
-
} catch {
|
|
637
|
-
return "";
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* Create an intrinsic element
|
|
642
|
-
*/
|
|
643
|
-
function createIntrinsic(type) {
|
|
644
|
-
return {
|
|
645
|
-
type,
|
|
646
|
-
__intrinsic: true
|
|
647
|
-
};
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
//#endregion
|
|
651
|
-
//#region src/createComponent.ts
|
|
652
|
-
function createComponent(type, Component) {
|
|
653
|
-
return (...args) => {
|
|
654
|
-
const fn = (() => renderIntrinsic(Component(args[0])));
|
|
655
|
-
fn.component = Component;
|
|
656
|
-
fn.props = args[0];
|
|
657
|
-
fn.type = type;
|
|
658
|
-
fn.children = (...children) => {
|
|
659
|
-
const propsWithChildren = {
|
|
660
|
-
...args[0] ?? {},
|
|
661
|
-
children() {
|
|
662
|
-
return renderIntrinsic(children);
|
|
663
|
-
}
|
|
664
|
-
};
|
|
665
|
-
const fnChild = (() => renderIntrinsic(Component(propsWithChildren)));
|
|
666
|
-
fnChild.component = Component;
|
|
667
|
-
fnChild.props = args[0];
|
|
668
|
-
fnChild.type = type;
|
|
669
|
-
return fnChild;
|
|
670
|
-
};
|
|
671
|
-
return fn;
|
|
672
|
-
};
|
|
673
|
-
}
|
|
674
|
-
|
|
675
662
|
//#endregion
|
|
676
663
|
//#region src/components/Root.ts
|
|
677
664
|
/**
|
|
@@ -710,7 +697,6 @@ const Root = createComponent("Root", ({ onError, onExit, treeNode, fileManager,
|
|
|
710
697
|
}
|
|
711
698
|
});
|
|
712
699
|
Root.displayName = "Root";
|
|
713
|
-
|
|
714
700
|
//#endregion
|
|
715
701
|
//#region src/utils/onProcessExit.ts
|
|
716
702
|
const SIGNALS = [
|
|
@@ -750,7 +736,7 @@ function onProcessExit(callback) {
|
|
|
750
736
|
}
|
|
751
737
|
return unsubscribe;
|
|
752
738
|
}
|
|
753
|
-
|
|
754
739
|
//#endregion
|
|
755
|
-
export { provide as _,
|
|
756
|
-
|
|
740
|
+
export { provide as _, FileManager as a, createFile as c, createIntrinsic as d, renderIndent as f, inject as g, createContext as h, TreeNode as i, NodeTreeContext as l, RenderContext as m, Root as n, FileProcessor as o, renderIntrinsic as p, RootContext as r, AsyncEventEmitter as s, onProcessExit as t, createComponent as u, unprovide as v };
|
|
741
|
+
|
|
742
|
+
//# sourceMappingURL=onProcessExit-Cput7j2c.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { n as defineParser, r as trimExtName, t as getRelativePath } from "../getRelativePath-
|
|
1
|
+
import "../chunk-O_arW02_.js";
|
|
2
|
+
import { n as defineParser, r as trimExtName, t as getRelativePath } from "../getRelativePath-NAm_Y-vp.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import ts from "typescript";
|
|
5
|
-
|
|
6
5
|
//#region src/parsers/typescriptParser.ts
|
|
7
6
|
const { factory } = ts;
|
|
8
7
|
/**
|
|
@@ -96,7 +95,7 @@ const typescriptParser = defineParser({
|
|
|
96
95
|
].filter((segment) => segment != null).join("\n");
|
|
97
96
|
}
|
|
98
97
|
});
|
|
99
|
-
|
|
100
98
|
//#endregion
|
|
101
99
|
export { createExport, createImport, print, safePrint, typescriptParser, validateNodes };
|
|
100
|
+
|
|
102
101
|
//# sourceMappingURL=typescript.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { n as defineParser } from "./getRelativePath-
|
|
3
|
-
import { t as defaultParser } from "./defaultParser-
|
|
1
|
+
import "./chunk-O_arW02_.js";
|
|
2
|
+
import { n as defineParser } from "./getRelativePath-NAm_Y-vp.js";
|
|
3
|
+
import { t as defaultParser } from "./defaultParser-iCpMSYCp.js";
|
|
4
4
|
import { typescriptParser } from "./parsers/typescript.js";
|
|
5
|
-
|
|
6
5
|
//#region src/parsers/tsxParser.ts
|
|
7
6
|
const tsxParser = defineParser({
|
|
8
7
|
name: "tsx",
|
|
@@ -12,7 +11,7 @@ const tsxParser = defineParser({
|
|
|
12
11
|
return typescriptParser.parse(file, options);
|
|
13
12
|
}
|
|
14
13
|
});
|
|
15
|
-
|
|
16
14
|
//#endregion
|
|
17
15
|
export { defaultParser, defineParser, tsxParser, typescriptParser };
|
|
16
|
+
|
|
18
17
|
//# sourceMappingURL=parsers.js.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { t as getRelativePath } from "./getRelativePath-
|
|
1
|
+
import "./chunk-O_arW02_.js";
|
|
2
|
+
import { c as createFile, i as TreeNode, n as Root, t as onProcessExit } from "./onProcessExit-Cput7j2c.js";
|
|
3
|
+
import { t as getRelativePath } from "./getRelativePath-NAm_Y-vp.js";
|
|
4
4
|
import path, { dirname, relative, resolve } from "node:path";
|
|
5
5
|
import { rmSync } from "node:fs";
|
|
6
6
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
7
7
|
import { styleText } from "node:util";
|
|
8
8
|
import * as clack from "@clack/prompts";
|
|
9
|
-
|
|
10
9
|
//#region src/plugins/definePlugin.ts
|
|
11
10
|
/**
|
|
12
11
|
* Defines a Fabric plugin with type safety.
|
|
@@ -37,7 +36,6 @@ function definePlugin(plugin) {
|
|
|
37
36
|
...plugin
|
|
38
37
|
};
|
|
39
38
|
}
|
|
40
|
-
|
|
41
39
|
//#endregion
|
|
42
40
|
//#region src/plugins/barrelPlugin.ts
|
|
43
41
|
/** biome-ignore-all lint/suspicious/useIterableCallbackReturn: not needed */
|
|
@@ -159,7 +157,6 @@ const barrelPlugin = definePlugin({
|
|
|
159
157
|
} };
|
|
160
158
|
}
|
|
161
159
|
});
|
|
162
|
-
|
|
163
160
|
//#endregion
|
|
164
161
|
//#region src/plugins/fsPlugin.ts
|
|
165
162
|
async function write(path, data, options = {}) {
|
|
@@ -210,7 +207,6 @@ const fsPlugin = definePlugin({
|
|
|
210
207
|
} };
|
|
211
208
|
}
|
|
212
209
|
});
|
|
213
|
-
|
|
214
210
|
//#endregion
|
|
215
211
|
//#region src/plugins/fsxPlugin/Runtime.ts
|
|
216
212
|
var Runtime = class {
|
|
@@ -278,7 +274,6 @@ var Runtime = class {
|
|
|
278
274
|
return this.exitPromise;
|
|
279
275
|
}
|
|
280
276
|
};
|
|
281
|
-
|
|
282
277
|
//#endregion
|
|
283
278
|
//#region src/plugins/fsxPlugin/fsxPlugin.ts
|
|
284
279
|
const fsxPlugin = definePlugin({
|
|
@@ -290,9 +285,9 @@ const fsxPlugin = definePlugin({
|
|
|
290
285
|
...options
|
|
291
286
|
});
|
|
292
287
|
return {
|
|
293
|
-
async render(
|
|
288
|
+
async render(Fabric) {
|
|
294
289
|
await ctx.emit("lifecycle:start");
|
|
295
|
-
return runtime.render(
|
|
290
|
+
return runtime.render(Fabric);
|
|
296
291
|
},
|
|
297
292
|
async waitUntilExit() {
|
|
298
293
|
await runtime.waitUntilExit();
|
|
@@ -300,7 +295,6 @@ const fsxPlugin = definePlugin({
|
|
|
300
295
|
};
|
|
301
296
|
}
|
|
302
297
|
});
|
|
303
|
-
|
|
304
298
|
//#endregion
|
|
305
299
|
//#region src/plugins/loggerPlugin.ts
|
|
306
300
|
function pluralize(word, count) {
|
|
@@ -375,7 +369,7 @@ const loggerPlugin = definePlugin({
|
|
|
375
369
|
});
|
|
376
370
|
}
|
|
377
371
|
});
|
|
378
|
-
|
|
379
372
|
//#endregion
|
|
380
373
|
export { barrelPlugin, definePlugin, fsPlugin, fsxPlugin, loggerPlugin };
|
|
374
|
+
|
|
381
375
|
//# sourceMappingURL=plugins.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/fabric-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Core functionality for Kubb's fabric - A language-agnostic toolkit providing the foundation for plugin-based code generation with TypeScript support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codegen",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
}
|
|
85
85
|
],
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@clack/prompts": "^1.0
|
|
87
|
+
"@clack/prompts": "^1.1.0",
|
|
88
88
|
"p-limit": "^7.3.0",
|
|
89
89
|
"remeda": "^2.33.6",
|
|
90
90
|
"typescript": "5.9.3"
|
package/.output/server/node_modules/@kubb/react-fabric/dist/{chunk-DbZtQ4qb.js → chunk-BGCRLu6H.js}
RENAMED
|
@@ -12,28 +12,20 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
12
12
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
13
13
|
var __exportAll = (all, no_symbols) => {
|
|
14
14
|
let target = {};
|
|
15
|
-
for (var name in all) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
if (!no_symbols) {
|
|
22
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
23
|
-
}
|
|
15
|
+
for (var name in all) __defProp(target, name, {
|
|
16
|
+
get: all[name],
|
|
17
|
+
enumerable: true
|
|
18
|
+
});
|
|
19
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
24
20
|
return target;
|
|
25
21
|
};
|
|
26
22
|
var __copyProps = (to, from, except, desc) => {
|
|
27
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
23
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
24
|
+
key = keys[i];
|
|
25
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
26
|
+
get: ((k) => from[k]).bind(null, key),
|
|
27
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
28
|
+
});
|
|
37
29
|
}
|
|
38
30
|
return to;
|
|
39
31
|
};
|
|
@@ -42,6 +34,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
42
34
|
value: mod,
|
|
43
35
|
enumerable: true
|
|
44
36
|
}) : target, mod));
|
|
45
|
-
|
|
46
37
|
//#endregion
|
|
47
|
-
export { __toESM as a, __reExport as i, __exportAll as n, __name as r, __commonJSMin as t };
|
|
38
|
+
export { __toESM as a, __reExport as i, __exportAll as n, __name as r, __commonJSMin as t };
|
|
@@ -1,34 +1,13 @@
|
|
|
1
|
-
import { a as __toESM
|
|
2
|
-
import {
|
|
3
|
-
import "./jsx-runtime-CZxrhUx8.js";
|
|
1
|
+
import { a as __toESM } from "./chunk-BGCRLu6H.js";
|
|
2
|
+
import { n as require_react } from "./jsx-runtime-Bl0DfUmV.js";
|
|
4
3
|
import { Fragment, jsx, jsxs } from "./jsx-runtime.js";
|
|
5
|
-
import { i as Root, n as Runtime, r as Renderer, t as reactPlugin } from "./reactPlugin-
|
|
6
|
-
import {
|
|
4
|
+
import { i as Root, n as Runtime, r as Renderer, t as reactPlugin } from "./reactPlugin-QQPrjNuQ.js";
|
|
5
|
+
import { FabricContext, FileContext, FileManager, FileProcessor, NodeTreeContext, RootContext, TreeNode, createContext, createFabric, createFabric as createFabric$1, createFile, createJSDoc, onProcessExit, provide, useContext, useContext as useContext$1, useFabric, useFile, useFile as useFile$1, useFileManager, useLifecycle, useNodeTree } from "@kubb/fabric-core";
|
|
7
6
|
import { spawn } from "node:child_process";
|
|
8
7
|
import ws from "ws";
|
|
9
8
|
import { sortBy } from "remeda";
|
|
10
|
-
|
|
11
|
-
//#region src/components/App.tsx
|
|
9
|
+
//#region src/utils/createJSDoc.ts
|
|
12
10
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
13
|
-
/**
|
|
14
|
-
* App container containing the AppContext carrying `meta` and an `exit` hook.
|
|
15
|
-
*/
|
|
16
|
-
function App({ children, ...props }) {
|
|
17
|
-
const { meta = {} } = props;
|
|
18
|
-
const { exit } = useContext$1(RootContext);
|
|
19
|
-
const nodeTree = useNodeTree();
|
|
20
|
-
if (nodeTree) provide(NodeTreeContext, nodeTree.addChild({
|
|
21
|
-
type: "App",
|
|
22
|
-
props
|
|
23
|
-
}));
|
|
24
|
-
provide(AppContext, {
|
|
25
|
-
exit,
|
|
26
|
-
meta
|
|
27
|
-
});
|
|
28
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
29
|
-
}
|
|
30
|
-
App.displayName = "App";
|
|
31
|
-
|
|
32
11
|
//#endregion
|
|
33
12
|
//#region src/components/Const.tsx
|
|
34
13
|
/**
|
|
@@ -57,7 +36,26 @@ function Const({ children, ...props }) {
|
|
|
57
36
|
] });
|
|
58
37
|
}
|
|
59
38
|
Const.displayName = "Const";
|
|
60
|
-
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/Fabric.tsx
|
|
41
|
+
/**
|
|
42
|
+
* Fabric container containing the FabricContext carrying `meta` and an `exit` hook.
|
|
43
|
+
*/
|
|
44
|
+
function Fabric({ children, ...props }) {
|
|
45
|
+
const { meta = {} } = props;
|
|
46
|
+
const { exit } = useContext$1(RootContext);
|
|
47
|
+
const nodeTree = useNodeTree();
|
|
48
|
+
if (nodeTree) provide(NodeTreeContext, nodeTree.addChild({
|
|
49
|
+
type: "App",
|
|
50
|
+
props
|
|
51
|
+
}));
|
|
52
|
+
provide(FabricContext, {
|
|
53
|
+
exit,
|
|
54
|
+
meta
|
|
55
|
+
});
|
|
56
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
57
|
+
}
|
|
58
|
+
Fabric.displayName = "Fabric";
|
|
61
59
|
//#endregion
|
|
62
60
|
//#region src/components/File.tsx
|
|
63
61
|
/**
|
|
@@ -172,7 +170,6 @@ FileImport.displayName = "FileImport";
|
|
|
172
170
|
File.Export = FileExport;
|
|
173
171
|
File.Import = FileImport;
|
|
174
172
|
File.Source = FileSource;
|
|
175
|
-
|
|
176
173
|
//#endregion
|
|
177
174
|
//#region src/components/Function.tsx
|
|
178
175
|
/**
|
|
@@ -272,7 +269,6 @@ function ArrowFunction({ children, ...props }) {
|
|
|
272
269
|
}
|
|
273
270
|
ArrowFunction.displayName = "ArrowFunction";
|
|
274
271
|
Function.Arrow = ArrowFunction;
|
|
275
|
-
|
|
276
272
|
//#endregion
|
|
277
273
|
//#region src/components/Type.tsx
|
|
278
274
|
/**
|
|
@@ -296,7 +292,6 @@ function Type({ children, ...props }) {
|
|
|
296
292
|
] });
|
|
297
293
|
}
|
|
298
294
|
Type.displayName = "Type";
|
|
299
|
-
|
|
300
295
|
//#endregion
|
|
301
296
|
//#region src/devtools.ts
|
|
302
297
|
let isOpen = false;
|
|
@@ -393,7 +388,6 @@ function openDevtools() {
|
|
|
393
388
|
});
|
|
394
389
|
});
|
|
395
390
|
}
|
|
396
|
-
|
|
397
391
|
//#endregion
|
|
398
392
|
//#region src/createReactFabric.ts
|
|
399
393
|
function createReactFabric(config = {}) {
|
|
@@ -407,7 +401,6 @@ function createReactFabric(config = {}) {
|
|
|
407
401
|
});
|
|
408
402
|
return fabric;
|
|
409
403
|
}
|
|
410
|
-
|
|
411
404
|
//#endregion
|
|
412
405
|
//#region src/utils/getFunctionParams.ts
|
|
413
406
|
function order(items) {
|
|
@@ -481,9 +474,15 @@ function getFunctionParams(params, options) {
|
|
|
481
474
|
return [...acc, parsedItem];
|
|
482
475
|
}, []).join(", ");
|
|
483
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* @deprecated use @kubb/ast
|
|
479
|
+
*/
|
|
484
480
|
function createFunctionParams(params) {
|
|
485
481
|
return params;
|
|
486
482
|
}
|
|
483
|
+
/**
|
|
484
|
+
* @deprecated use @kubb/ast
|
|
485
|
+
*/
|
|
487
486
|
var FunctionParams = class FunctionParams {
|
|
488
487
|
#params;
|
|
489
488
|
static factory(params) {
|
|
@@ -520,14 +519,13 @@ var FunctionParams = class FunctionParams {
|
|
|
520
519
|
return getFunctionParams(this.#params, { type: "constructor" });
|
|
521
520
|
}
|
|
522
521
|
};
|
|
523
|
-
|
|
524
522
|
//#endregion
|
|
525
523
|
//#region src/index.ts
|
|
526
524
|
const useState = import_react.useState;
|
|
527
525
|
const useEffect = import_react.useEffect;
|
|
528
526
|
const useReducer = import_react.useReducer;
|
|
529
527
|
const useRef = import_react.useRef;
|
|
530
|
-
|
|
531
528
|
//#endregion
|
|
532
|
-
export {
|
|
529
|
+
export { Const, Fabric, File, FileManager, FileProcessor, Function, FunctionParams, Root, Runtime, TreeNode, Type, createContext, createFabric, createFile, createFunctionParams, createReactFabric, openDevtools, useContext, useEffect, useFabric, useFile, useLifecycle, useReducer, useRef, useState };
|
|
530
|
+
|
|
533
531
|
//# sourceMappingURL=index.js.map
|