@kubb/agent 4.36.1 → 4.36.3
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 +27 -24
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- 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 +27 -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/openapi-core/lib/format/format.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/index.js +2 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/asserts.js +4 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3_1.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/package.json +1 -1
- package/.output/server/package.json +4 -4
- package/package.json +19 -19
- package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime-CZxrhUx8.js +0 -266
package/.output/nitro.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"date": "2026-03-
|
|
2
|
+
"date": "2026-03-23T15:29:45.775Z",
|
|
3
3
|
"preset": "node-server",
|
|
4
4
|
"framework": {
|
|
5
5
|
"name": "nitro",
|
|
6
6
|
"version": ""
|
|
7
7
|
},
|
|
8
8
|
"versions": {
|
|
9
|
-
"nitro": "2.13.
|
|
9
|
+
"nitro": "2.13.2"
|
|
10
10
|
},
|
|
11
11
|
"commands": {
|
|
12
12
|
"preview": "node server/index.mjs"
|
|
@@ -15,7 +15,7 @@ import { Logtail } from '@logtail/node';
|
|
|
15
15
|
import { consola } from 'consola';
|
|
16
16
|
import mod from 'node:module';
|
|
17
17
|
import { access, rm, readFile as readFile$1, readdir as readdir$1, mkdir, writeFile as writeFile$1 } from 'node:fs/promises';
|
|
18
|
-
import { createFabric, createReactFabric,
|
|
18
|
+
import { createFabric, createReactFabric, Fabric, File, Function as Function$1, Const, FunctionParams, Type as Type$1, useFabric } from '@kubb/react-fabric';
|
|
19
19
|
import { typescriptParser } from '@kubb/react-fabric/parsers';
|
|
20
20
|
import { fsPlugin } from '@kubb/react-fabric/plugins';
|
|
21
21
|
import { performance as performance$1 } from 'node:perf_hooks';
|
|
@@ -122,6 +122,7 @@ const ENC_CARET_RE = /%5e/gi;
|
|
|
122
122
|
const ENC_BACKTICK_RE = /%60/gi;
|
|
123
123
|
const ENC_PIPE_RE = /%7c/gi;
|
|
124
124
|
const ENC_SPACE_RE = /%20/gi;
|
|
125
|
+
const ENC_SLASH_RE = /%2f/gi;
|
|
125
126
|
function encode(text) {
|
|
126
127
|
return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
|
|
127
128
|
}
|
|
@@ -138,6 +139,9 @@ function decode(text = "") {
|
|
|
138
139
|
return "" + text;
|
|
139
140
|
}
|
|
140
141
|
}
|
|
142
|
+
function decodePath(text) {
|
|
143
|
+
return decode(text.replace(ENC_SLASH_RE, "%252F"));
|
|
144
|
+
}
|
|
141
145
|
function decodeQueryKey(text) {
|
|
142
146
|
return decode(text.replace(PLUS_RE, " "));
|
|
143
147
|
}
|
|
@@ -1470,15 +1474,6 @@ function isEventHandler(input) {
|
|
|
1470
1474
|
return hasProp(input, "__is_handler__");
|
|
1471
1475
|
}
|
|
1472
1476
|
function toEventHandler(input, _, _route) {
|
|
1473
|
-
if (!isEventHandler(input)) {
|
|
1474
|
-
console.warn(
|
|
1475
|
-
"[h3] Implicit event handler conversion is deprecated. Use `eventHandler()` or `fromNodeMiddleware()` to define event handlers.",
|
|
1476
|
-
_route && _route !== "/" ? `
|
|
1477
|
-
Route: ${_route}` : "",
|
|
1478
|
-
`
|
|
1479
|
-
Handler: ${input}`
|
|
1480
|
-
);
|
|
1481
|
-
}
|
|
1482
1477
|
return input;
|
|
1483
1478
|
}
|
|
1484
1479
|
function defineLazyEventHandler(factory) {
|
|
@@ -1557,7 +1552,8 @@ function createAppEventHandler(stack, options) {
|
|
|
1557
1552
|
const spacing = options.debug ? 2 : void 0;
|
|
1558
1553
|
return eventHandler(async (event) => {
|
|
1559
1554
|
event.node.req.originalUrl = event.node.req.originalUrl || event.node.req.url || "/";
|
|
1560
|
-
const _reqPath = event._path || event.node.req.url || "/";
|
|
1555
|
+
const _reqPath = _decodePath(event._path || event.node.req.url || "/");
|
|
1556
|
+
event._path = _reqPath;
|
|
1561
1557
|
let _layerPath;
|
|
1562
1558
|
if (options.onRequest) {
|
|
1563
1559
|
await options.onRequest(event);
|
|
@@ -1707,6 +1703,13 @@ function cachedFn(fn) {
|
|
|
1707
1703
|
return cache;
|
|
1708
1704
|
};
|
|
1709
1705
|
}
|
|
1706
|
+
function _decodePath(url) {
|
|
1707
|
+
const qIndex = url.indexOf("?");
|
|
1708
|
+
const path = qIndex === -1 ? url : url.slice(0, qIndex);
|
|
1709
|
+
const query = qIndex === -1 ? "" : url.slice(qIndex);
|
|
1710
|
+
const decodedPath = path.includes("%25") ? decodePath(path.replace(/%25/g, "%2525")) : decodePath(path);
|
|
1711
|
+
return decodedPath + query;
|
|
1712
|
+
}
|
|
1710
1713
|
function websocketOptions(evResolver, appOptions) {
|
|
1711
1714
|
return {
|
|
1712
1715
|
...appOptions.websocket,
|
|
@@ -1746,7 +1749,7 @@ function createRouter(opts = {}) {
|
|
|
1746
1749
|
addRoute(path, handler, m);
|
|
1747
1750
|
}
|
|
1748
1751
|
} else {
|
|
1749
|
-
route.handlers[method] = toEventHandler(handler
|
|
1752
|
+
route.handlers[method] = toEventHandler(handler);
|
|
1750
1753
|
}
|
|
1751
1754
|
return router;
|
|
1752
1755
|
};
|
|
@@ -5821,7 +5824,7 @@ const fsStorage = defineStorage(() => ({
|
|
|
5821
5824
|
await clean(resolve(base));
|
|
5822
5825
|
}
|
|
5823
5826
|
}));
|
|
5824
|
-
var version$1 = "4.36.
|
|
5827
|
+
var version$1 = "4.36.3";
|
|
5825
5828
|
function getDiagnosticInfo() {
|
|
5826
5829
|
return {
|
|
5827
5830
|
nodeVersion: version$2,
|
|
@@ -6555,7 +6558,7 @@ async function detectLinter() {
|
|
|
6555
6558
|
]) if (await isLinterAvailable(linter)) return linter;
|
|
6556
6559
|
}
|
|
6557
6560
|
|
|
6558
|
-
var version = "4.36.
|
|
6561
|
+
var version = "4.36.3";
|
|
6559
6562
|
|
|
6560
6563
|
function isCommandMessage(msg) {
|
|
6561
6564
|
return msg.type === "command";
|
|
@@ -7767,7 +7770,7 @@ async function buildOperations(operationsOrNodes, options) {
|
|
|
7767
7770
|
if (isBuildOperationsV1Options(options)) {
|
|
7768
7771
|
const { generator, Component } = options;
|
|
7769
7772
|
const { pluginManager, oas, mode } = generator.context;
|
|
7770
|
-
await fabricChild.render(/* @__PURE__ */ jsx(
|
|
7773
|
+
await fabricChild.render(/* @__PURE__ */ jsx(Fabric, {
|
|
7771
7774
|
meta: {
|
|
7772
7775
|
pluginManager,
|
|
7773
7776
|
plugin,
|
|
@@ -7783,7 +7786,7 @@ async function buildOperations(operationsOrNodes, options) {
|
|
|
7783
7786
|
}));
|
|
7784
7787
|
} else {
|
|
7785
7788
|
const { Component } = options;
|
|
7786
|
-
await fabricChild.render(/* @__PURE__ */ jsx(
|
|
7789
|
+
await fabricChild.render(/* @__PURE__ */ jsx(Fabric, {
|
|
7787
7790
|
meta: { plugin },
|
|
7788
7791
|
children: /* @__PURE__ */ jsx(Component, {
|
|
7789
7792
|
config,
|
|
@@ -7806,7 +7809,7 @@ async function buildOperation(operationOrNode, options) {
|
|
|
7806
7809
|
if (isBuildOperationV1Options(options)) {
|
|
7807
7810
|
const { generator, Component } = options;
|
|
7808
7811
|
const { pluginManager, oas, mode } = generator.context;
|
|
7809
|
-
await fabricChild.render(/* @__PURE__ */ jsx(
|
|
7812
|
+
await fabricChild.render(/* @__PURE__ */ jsx(Fabric, {
|
|
7810
7813
|
meta: {
|
|
7811
7814
|
pluginManager,
|
|
7812
7815
|
plugin,
|
|
@@ -7822,7 +7825,7 @@ async function buildOperation(operationOrNode, options) {
|
|
|
7822
7825
|
}));
|
|
7823
7826
|
} else {
|
|
7824
7827
|
const { Component } = options;
|
|
7825
|
-
await fabricChild.render(/* @__PURE__ */ jsx(
|
|
7828
|
+
await fabricChild.render(/* @__PURE__ */ jsx(Fabric, {
|
|
7826
7829
|
meta: { plugin },
|
|
7827
7830
|
children: /* @__PURE__ */ jsx(Component, {
|
|
7828
7831
|
config,
|
|
@@ -7845,7 +7848,7 @@ async function buildSchema(schema, options) {
|
|
|
7845
7848
|
if (isBuildSchemaV1Options(options)) {
|
|
7846
7849
|
const { generator, Component } = options;
|
|
7847
7850
|
const { pluginManager, oas, mode } = generator.context;
|
|
7848
|
-
await fabricChild.render(/* @__PURE__ */ jsx(
|
|
7851
|
+
await fabricChild.render(/* @__PURE__ */ jsx(Fabric, {
|
|
7849
7852
|
meta: {
|
|
7850
7853
|
pluginManager,
|
|
7851
7854
|
plugin,
|
|
@@ -7861,7 +7864,7 @@ async function buildSchema(schema, options) {
|
|
|
7861
7864
|
}));
|
|
7862
7865
|
} else {
|
|
7863
7866
|
const { Component } = options;
|
|
7864
|
-
await fabricChild.render(/* @__PURE__ */ jsx(
|
|
7867
|
+
await fabricChild.render(/* @__PURE__ */ jsx(Fabric, {
|
|
7865
7868
|
meta: { plugin },
|
|
7866
7869
|
children: /* @__PURE__ */ jsx(Component, {
|
|
7867
7870
|
config,
|
|
@@ -209385,20 +209388,20 @@ function Type({ name, typedName, tree, keysToOmit, schema, optionalType, arrayTy
|
|
|
209385
209388
|
}
|
|
209386
209389
|
|
|
209387
209390
|
function useMode() {
|
|
209388
|
-
const { meta } =
|
|
209391
|
+
const { meta } = useFabric();
|
|
209389
209392
|
return meta.mode;
|
|
209390
209393
|
}
|
|
209391
209394
|
function usePlugin() {
|
|
209392
|
-
const { meta } =
|
|
209395
|
+
const { meta } = useFabric();
|
|
209393
209396
|
return meta.plugin;
|
|
209394
209397
|
}
|
|
209395
209398
|
function usePluginManager() {
|
|
209396
|
-
const { meta } =
|
|
209399
|
+
const { meta } = useFabric();
|
|
209397
209400
|
return meta.pluginManager;
|
|
209398
209401
|
}
|
|
209399
209402
|
|
|
209400
209403
|
function useOas() {
|
|
209401
|
-
const { meta } =
|
|
209404
|
+
const { meta } = useFabric();
|
|
209402
209405
|
return meta.oas;
|
|
209403
209406
|
}
|
|
209404
209407
|
function useOperationManager(generator) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.5/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.9.3/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/utils/logger.ts","../../../../server/plugins/fetch-logger.ts","../../../../../../internals/utils/dist/index.js","../../../../server/plugins/heartbeat.ts","../../../../server/utils/token.ts","../../../../server/utils/api.ts","../../../../../ast/dist/index.js","../../../../../core/dist/index.js","../../../../server/types/agent.ts","../../../../server/utils/agentCache.ts","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/loadConfig.ts","../../../../../plugin-client/dist/chunk--u3MIqq1.js","../../../../../plugin-oas/dist/getFooter-Pw3tLCiV.js","../../../../../plugin-oas/dist/SchemaMapper-CqMkO2T1.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/requestBody-mUXoBwsu.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-CCn9g9eF.js","../../../../../plugin-oas/dist/generators-D7C3CXsN.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-zod/dist/components-eECfXVou.js","../../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js","../../../../../plugin-ts/dist/components-LmqJfxMv.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-ts/dist/plugin-DnKRpgGK.js","../../../../../plugin-zod/dist/generators-D1R6NNf2.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/generators-DCnIY6RB.js","../../../../../plugin-client/dist/templates/clients/axios.source.js","../../../../../plugin-client/dist/templates/clients/fetch.source.js","../../../../../plugin-client/dist/templates/config.source.js","../../../../../plugin-client/dist/index.js","../../../../../plugin-cypress/dist/components-BK_6GU4v.js","../../../../../plugin-cypress/dist/generators-D5YFtyyC.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/components-BkBIov4R.js","../../../../../plugin-faker/dist/fakerGenerator-BztogaeO.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-KWLMg0Lm.js","../../../../../plugin-mcp/dist/generators-80MDR6tQ.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-DgtTZkWX.js","../../../../../plugin-msw/dist/generators-C34kqa1L.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk--u3MIqq1.js","../../../../../plugin-react-query/dist/components-CpyHYGOw.js","../../../../../plugin-react-query/dist/generators-CpiBv5eE.js","../../../../../plugin-react-query/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk--u3MIqq1.js","../../../../../plugin-solid-query/dist/components-BhStIi1M.js","../../../../../plugin-solid-query/dist/generators-CQClzsST.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk--u3MIqq1.js","../../../../../plugin-svelte-query/dist/components-DntKBsnB.js","../../../../../plugin-svelte-query/dist/generators-BtTsGGrM.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-DRDGvgXG.js","../../../../../plugin-swr/dist/generators-ClWZJ-YG.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk--u3MIqq1.js","../../../../../plugin-vue-query/dist/components-_AMBl0g-.js","../../../../../plugin-vue-query/dist/generators-Zb1s5Wmb.js","../../../../../plugin-vue-query/dist/index.js","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.1_encoding@0.1.13_rolldown@1.0.0-rc.9/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["createRouter","f","h","i","l","createError","mergeHeaders","s","nodeFetch","Headers","Headers$1","AbortController$1","stringify","normalizeKey","defineDriver","DRIVER_NAME","fsPromises","PATH_TRAVERSE_RE","fsp","snakeCase","_inlineAppConfig","createRadixRouter","_emitter","_a","toError","AsyncEventEmitter","__privateAdd","__privateGet","formatMs","parseHex","hex","process","toCamelOrPascal","applyToFileParts","camelCase","path","readFile","writeFile","isValidVarName","URLPath","_b","_URLPath_instances","__publicField","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","Node","Queue","_head","_tail","_size","__privateWrapper","pLimit","validateConcurrency","resolve","x","performance","build","readdir","version","_c","_d","_e","_f","_g","os","item","trimExtName","error","__defProp","__name","pascalCase","isPlainObject","parse","loadConfig","schema","params","_context","trimQuotes","schemas","normalizedSchema","name","min","max","getParams$1","getParams","Operations","validate","oas","options","jsStringEscape","toRegExpString","Type","siblings","require","global","modifiers","questionToken","propertyName","operationsGenerator","source","Function","baseURL","source$2","Response","getNestedAccessor","getTransformer$1","MutationKey","getParams$9","getTransformer","QueryKey","getParams$8","QueryOptions","getParams$7","InfiniteQuery","getParams$6","InfiniteQueryOptions","getParams$5","getParams$4","Mutation","getParams$3","Query","getParams$2","operations","fs","infiniteQueryGenerator","mutationGenerator","queryGenerator","__filename","__dirname","pkg","generics","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,55,108,109,110,111]}
|
|
1
|
+
{"version":3,"file":"nitro.mjs","sources":["../../../../../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs","../../../../../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs","../../../../../../node_modules/.pnpm/radix3@1.1.2/node_modules/radix3/dist/index.mjs","../../../../../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs","../../../../../../node_modules/.pnpm/node-mock-http@1.0.4/node_modules/node-mock-http/dist/index.mjs","../../../../../../node_modules/.pnpm/h3@1.15.9/node_modules/h3/dist/index.mjs","../../../../../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs","../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/dist/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/index.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs.mjs","../../../../../../node_modules/.pnpm/unstorage@1.17.4_db0@0.3.4_ioredis@5.10.1/node_modules/unstorage/drivers/fs-lite.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../../../node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs","../../../../../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/index.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/plugin.mjs","../../../../server/utils/logger.ts","../../../../server/plugins/fetch-logger.ts","../../../../../../internals/utils/dist/index.js","../../../../server/plugins/heartbeat.ts","../../../../server/utils/token.ts","../../../../server/utils/api.ts","../../../../../ast/dist/index.js","../../../../../core/dist/index.js","../../../../server/types/agent.ts","../../../../server/utils/agentCache.ts","../../../../server/utils/executeHooks.ts","../../../../server/utils/generate.ts","../../../../server/utils/getCosmiConfig.ts","../../../../server/utils/loadConfig.ts","../../../../../plugin-client/dist/chunk--u3MIqq1.js","../../../../../plugin-oas/dist/getFooter-Pw3tLCiV.js","../../../../../plugin-oas/dist/SchemaMapper-CqMkO2T1.js","../../../../../oas/dist/index.js","../../../../../plugin-oas/dist/requestBody-pRavthCw.js","../../../../../plugin-oas/dist/utils.js","../../../../../plugin-client/dist/StaticClassClient-CCn9g9eF.js","../../../../../plugin-oas/dist/generators-D7C3CXsN.js","../../../../../plugin-oas/dist/index.js","../../../../../plugin-zod/dist/components-eECfXVou.js","../../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/typescript.js","../../../../../plugin-ts/dist/components-LmqJfxMv.js","../../../../../core/dist/hooks.js","../../../../../plugin-oas/dist/hooks.js","../../../../../plugin-ts/dist/plugin-DnKRpgGK.js","../../../../../plugin-zod/dist/generators-D1R6NNf2.js","../../../../../plugin-zod/dist/templates/ToZod.source.js","../../../../../plugin-zod/dist/index.js","../../../../../plugin-client/dist/generators-DCnIY6RB.js","../../../../../plugin-client/dist/templates/clients/axios.source.js","../../../../../plugin-client/dist/templates/clients/fetch.source.js","../../../../../plugin-client/dist/templates/config.source.js","../../../../../plugin-client/dist/index.js","../../../../../plugin-cypress/dist/components-BK_6GU4v.js","../../../../../plugin-cypress/dist/generators-D5YFtyyC.js","../../../../../plugin-cypress/dist/index.js","../../../../../plugin-faker/dist/components-BkBIov4R.js","../../../../../plugin-faker/dist/fakerGenerator-BztogaeO.js","../../../../../plugin-faker/dist/index.js","../../../../../plugin-mcp/dist/Server-KWLMg0Lm.js","../../../../../plugin-mcp/dist/generators-80MDR6tQ.js","../../../../../plugin-mcp/dist/index.js","../../../../../plugin-msw/dist/components-DgtTZkWX.js","../../../../../plugin-msw/dist/generators-C34kqa1L.js","../../../../../plugin-msw/dist/index.js","../../../../../plugin-react-query/dist/chunk--u3MIqq1.js","../../../../../plugin-react-query/dist/components-CpyHYGOw.js","../../../../../plugin-react-query/dist/generators-CpiBv5eE.js","../../../../../plugin-react-query/dist/index.js","../../../../../plugin-redoc/dist/index.js","../../../../../plugin-solid-query/dist/chunk--u3MIqq1.js","../../../../../plugin-solid-query/dist/components-BhStIi1M.js","../../../../../plugin-solid-query/dist/generators-CQClzsST.js","../../../../../plugin-solid-query/dist/index.js","../../../../../plugin-svelte-query/dist/chunk--u3MIqq1.js","../../../../../plugin-svelte-query/dist/components-DntKBsnB.js","../../../../../plugin-svelte-query/dist/generators-BtTsGGrM.js","../../../../../plugin-svelte-query/dist/index.js","../../../../../plugin-swr/dist/chunk--u3MIqq1.js","../../../../../plugin-swr/dist/components-DRDGvgXG.js","../../../../../plugin-swr/dist/generators-ClWZJ-YG.js","../../../../../plugin-swr/dist/index.js","../../../../../plugin-vue-query/dist/chunk--u3MIqq1.js","../../../../../plugin-vue-query/dist/components-_AMBl0g-.js","../../../../../plugin-vue-query/dist/generators-Zb1s5Wmb.js","../../../../../plugin-vue-query/dist/index.js","../../../../server/utils/resolvePlugins.ts","../../../../server/utils/mergePlugins.ts","../../../../server/utils/publish.ts","../../../../server/utils/setupHookListener.ts","../../../../server/utils/ws.ts","../../../../server/utils/connectStudio.ts","../../../../server/plugins/studio.ts","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../../../node_modules/.pnpm/nitropack@2.13.2_encoding@0.1.13_rolldown@1.0.0-rc.10/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["createRouter","f","h","i","l","createError","mergeHeaders","s","nodeFetch","Headers","Headers$1","AbortController$1","stringify","normalizeKey","defineDriver","DRIVER_NAME","fsPromises","PATH_TRAVERSE_RE","fsp","snakeCase","_inlineAppConfig","createRadixRouter","_emitter","_a","toError","AsyncEventEmitter","__privateAdd","__privateGet","formatMs","parseHex","hex","process","toCamelOrPascal","applyToFileParts","camelCase","path","readFile","writeFile","isValidVarName","URLPath","_b","_URLPath_instances","__publicField","_options","__privateSet","__privateMethod","transformParam_fn","eachParam_fn","Node","Queue","_head","_tail","_size","__privateWrapper","pLimit","validateConcurrency","resolve","x","performance","build","readdir","version","_c","_d","_e","_f","_g","os","item","trimExtName","error","__defProp","__name","pascalCase","isPlainObject","parse","loadConfig","schema","params","_context","trimQuotes","schemas","normalizedSchema","name","min","max","getParams$1","getParams","Operations","validate","oas","options","jsStringEscape","toRegExpString","Type","siblings","require","global","modifiers","questionToken","propertyName","operationsGenerator","source","Function","baseURL","source$2","Response","getNestedAccessor","getTransformer$1","MutationKey","getParams$9","getTransformer","QueryKey","getParams$8","QueryOptions","getParams$7","InfiniteQuery","getParams$6","InfiniteQueryOptions","getParams$5","getParams$4","Mutation","getParams$3","Query","getParams$2","operations","fs","infiniteQueryGenerator","mutationGenerator","queryGenerator","__filename","__dirname","pkg","generics","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,55,108,109,110,111]}
|
package/.output/server/node_modules/@kubb/fabric-core/dist/{chunk-BVHe6Par.js → chunk-O_arW02_.js}
RENAMED
|
@@ -6,17 +6,12 @@ var __name = (target, value) => __defProp(target, "name", {
|
|
|
6
6
|
});
|
|
7
7
|
var __exportAll = (all, no_symbols) => {
|
|
8
8
|
let target = {};
|
|
9
|
-
for (var name in all) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
if (!no_symbols) {
|
|
16
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
17
|
-
}
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
14
|
return target;
|
|
19
15
|
};
|
|
20
|
-
|
|
21
16
|
//#endregion
|
|
22
|
-
export { __name as n, __exportAll as t };
|
|
17
|
+
export { __name as n, __exportAll as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { n as defineParser } from "./getRelativePath-
|
|
3
|
-
|
|
1
|
+
import "./chunk-O_arW02_.js";
|
|
2
|
+
import { n as defineParser } from "./getRelativePath-NAm_Y-vp.js";
|
|
4
3
|
//#region src/parsers/defaultParser.ts
|
|
5
4
|
const defaultParser = defineParser({
|
|
6
5
|
name: "default",
|
|
@@ -10,7 +9,7 @@ const defaultParser = defineParser({
|
|
|
10
9
|
return file.sources.map((item) => item.value).join("\n\n");
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
|
-
|
|
14
12
|
//#endregion
|
|
15
13
|
export { defaultParser as t };
|
|
16
|
-
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=defaultParser-iCpMSYCp.js.map
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./chunk-O_arW02_.js";
|
|
2
2
|
import { normalize, relative } from "node:path";
|
|
3
|
-
|
|
4
3
|
//#region src/utils/trimExtName.ts
|
|
5
4
|
function trimExtName(text) {
|
|
6
5
|
return text.replace(/\.[^/.]+$/, "");
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
//#endregion
|
|
10
8
|
//#region src/parsers/defineParser.ts
|
|
11
9
|
/**
|
|
@@ -37,7 +35,6 @@ function defineParser(parser) {
|
|
|
37
35
|
...parser
|
|
38
36
|
};
|
|
39
37
|
}
|
|
40
|
-
|
|
41
38
|
//#endregion
|
|
42
39
|
//#region src/utils/getRelativePath.ts
|
|
43
40
|
function slash(path, platform = "linux") {
|
|
@@ -52,7 +49,7 @@ function getRelativePath(rootDir, filePath, platform = "linux") {
|
|
|
52
49
|
if (slashedPath.startsWith("../")) return slashedPath;
|
|
53
50
|
return `./${slashedPath}`;
|
|
54
51
|
}
|
|
55
|
-
|
|
56
52
|
//#endregion
|
|
57
53
|
export { defineParser as n, trimExtName as r, getRelativePath as t };
|
|
58
|
-
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=getRelativePath-NAm_Y-vp.js.map
|
|
@@ -1,14 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { _ as provide, a as
|
|
3
|
-
import { t as getRelativePath } from "./getRelativePath-
|
|
1
|
+
import "./chunk-O_arW02_.js";
|
|
2
|
+
import { _ as provide, a as FileManager, c as createFile, d as createIntrinsic, f as renderIndent, g as inject, h as createContext, i as TreeNode, l as NodeTreeContext, m as RenderContext, n as Root, o as FileProcessor, p as renderIntrinsic, r as RootContext, s as AsyncEventEmitter, t as onProcessExit, u as createComponent, v as unprovide } from "./onProcessExit-Cput7j2c.js";
|
|
3
|
+
import { t as getRelativePath } from "./getRelativePath-NAm_Y-vp.js";
|
|
4
4
|
import { createExport, createImport, print } from "./parsers/typescript.js";
|
|
5
5
|
import { isFunction } from "remeda";
|
|
6
|
-
|
|
6
|
+
//#region src/components/Br.ts
|
|
7
|
+
/**
|
|
8
|
+
* Generates a line break in the output.
|
|
9
|
+
*
|
|
10
|
+
* Use this component to add newlines in generated code.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <>
|
|
15
|
+
* const x = 1
|
|
16
|
+
* <Br />
|
|
17
|
+
* const y = 2
|
|
18
|
+
* </>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
const Br = createComponent("br", () => {
|
|
22
|
+
return createIntrinsic("br");
|
|
23
|
+
});
|
|
24
|
+
Br.displayName = "Br";
|
|
25
|
+
//#endregion
|
|
7
26
|
//#region src/composables/useContext.ts
|
|
8
27
|
function useContext(key, defaultValue) {
|
|
9
28
|
return inject(key, defaultValue);
|
|
10
29
|
}
|
|
11
|
-
|
|
12
30
|
//#endregion
|
|
13
31
|
//#region src/composables/useNodeTree.ts
|
|
14
32
|
/**
|
|
@@ -30,72 +48,6 @@ function useContext(key, defaultValue) {
|
|
|
30
48
|
function useNodeTree() {
|
|
31
49
|
return useContext(NodeTreeContext);
|
|
32
50
|
}
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/contexts/AppContext.ts
|
|
36
|
-
/**
|
|
37
|
-
* Provides app-level metadata and lifecycle hooks (like `exit`) to
|
|
38
|
-
* components and composables within a Fabric runtime.
|
|
39
|
-
*/
|
|
40
|
-
const AppContext = createContext({
|
|
41
|
-
exit: () => {},
|
|
42
|
-
meta: {}
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region src/components/App.ts
|
|
47
|
-
/**
|
|
48
|
-
* Container component providing App context with metadata and lifecycle.
|
|
49
|
-
*
|
|
50
|
-
* Use this component to wrap your application and provide shared metadata
|
|
51
|
-
* that can be accessed by child components using the useApp composable.
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```tsx
|
|
55
|
-
* <App meta={{ version: '1.0.0', author: 'John Doe' }}>
|
|
56
|
-
* <File baseName="user.ts" path="./user.ts">
|
|
57
|
-
* <File.Source>export type User = {}</File.Source>
|
|
58
|
-
* </File>
|
|
59
|
-
* </App>
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
const App = createComponent("App", ({ children, ...props }) => {
|
|
63
|
-
const { meta = {} } = props;
|
|
64
|
-
const { exit } = useContext(RootContext);
|
|
65
|
-
const nodeTree = useNodeTree();
|
|
66
|
-
if (nodeTree) provide(NodeTreeContext, nodeTree.addChild({
|
|
67
|
-
type: "App",
|
|
68
|
-
props
|
|
69
|
-
}));
|
|
70
|
-
provide(AppContext, {
|
|
71
|
-
exit,
|
|
72
|
-
meta
|
|
73
|
-
});
|
|
74
|
-
return children;
|
|
75
|
-
});
|
|
76
|
-
App.displayName = "App";
|
|
77
|
-
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/components/Br.ts
|
|
80
|
-
/**
|
|
81
|
-
* Generates a line break in the output.
|
|
82
|
-
*
|
|
83
|
-
* Use this component to add newlines in generated code.
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* ```tsx
|
|
87
|
-
* <>
|
|
88
|
-
* const x = 1
|
|
89
|
-
* <Br />
|
|
90
|
-
* const y = 2
|
|
91
|
-
* </>
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
const Br = createComponent("br", () => {
|
|
95
|
-
return createIntrinsic("br");
|
|
96
|
-
});
|
|
97
|
-
Br.displayName = "Br";
|
|
98
|
-
|
|
99
51
|
//#endregion
|
|
100
52
|
//#region src/utils/createJSDoc.ts
|
|
101
53
|
/**
|
|
@@ -111,7 +63,6 @@ function createJSDoc({ comments }) {
|
|
|
111
63
|
" */"
|
|
112
64
|
].join("\n");
|
|
113
65
|
}
|
|
114
|
-
|
|
115
66
|
//#endregion
|
|
116
67
|
//#region src/components/Const.ts
|
|
117
68
|
/**
|
|
@@ -145,7 +96,6 @@ const Const = createComponent("Const", ({ children, ...props }) => {
|
|
|
145
96
|
return result;
|
|
146
97
|
});
|
|
147
98
|
Const.displayName = "Const";
|
|
148
|
-
|
|
149
99
|
//#endregion
|
|
150
100
|
//#region src/components/Dedent.ts
|
|
151
101
|
/**
|
|
@@ -169,7 +119,48 @@ const Dedent = createComponent("dedent", () => {
|
|
|
169
119
|
return createIntrinsic("dedent");
|
|
170
120
|
});
|
|
171
121
|
Dedent.displayName = "Dedent";
|
|
172
|
-
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/contexts/FabricContext.ts
|
|
124
|
+
/**
|
|
125
|
+
* Provides app-level metadata and lifecycle hooks (like `exit`) to
|
|
126
|
+
* components and composables within a Fabric runtime.
|
|
127
|
+
*/
|
|
128
|
+
const FabricContext = createContext({
|
|
129
|
+
exit: () => {},
|
|
130
|
+
meta: {}
|
|
131
|
+
});
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/components/Fabric.ts
|
|
134
|
+
/**
|
|
135
|
+
* Container component providing App context with metadata and lifecycle.
|
|
136
|
+
*
|
|
137
|
+
* Use this component to wrap your application and provide shared metadata
|
|
138
|
+
* that can be accessed by child components using the useApp composable.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```tsx
|
|
142
|
+
* <Fabric meta={{ version: '1.0.0', author: 'John Doe' }}>
|
|
143
|
+
* <File baseName="user.ts" path="./user.ts">
|
|
144
|
+
* <File.Source>export type User = {}</File.Source>
|
|
145
|
+
* </File>
|
|
146
|
+
* </Fabric>
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
const Fabric = createComponent("Fabric", ({ children, ...props }) => {
|
|
150
|
+
const { meta = {} } = props;
|
|
151
|
+
const { exit } = useContext(RootContext);
|
|
152
|
+
const nodeTree = useNodeTree();
|
|
153
|
+
if (nodeTree) provide(NodeTreeContext, nodeTree.addChild({
|
|
154
|
+
type: "Fabric",
|
|
155
|
+
props
|
|
156
|
+
}));
|
|
157
|
+
provide(FabricContext, {
|
|
158
|
+
exit,
|
|
159
|
+
meta
|
|
160
|
+
});
|
|
161
|
+
return children;
|
|
162
|
+
});
|
|
163
|
+
Fabric.displayName = "Fabric";
|
|
173
164
|
//#endregion
|
|
174
165
|
//#region src/contexts/FileContext.ts
|
|
175
166
|
/**
|
|
@@ -177,7 +168,6 @@ Dedent.displayName = "Dedent";
|
|
|
177
168
|
* components and composables within a Fabric runtime.
|
|
178
169
|
*/
|
|
179
170
|
const FileContext = createContext(null);
|
|
180
|
-
|
|
181
171
|
//#endregion
|
|
182
172
|
//#region src/composables/useFile.ts
|
|
183
173
|
/**
|
|
@@ -200,7 +190,6 @@ const FileContext = createContext(null);
|
|
|
200
190
|
function useFile() {
|
|
201
191
|
return useContext(FileContext);
|
|
202
192
|
}
|
|
203
|
-
|
|
204
193
|
//#endregion
|
|
205
194
|
//#region src/composables/useFileManager.ts
|
|
206
195
|
/**
|
|
@@ -225,7 +214,6 @@ function useFileManager() {
|
|
|
225
214
|
const { fileManager } = useContext(RootContext);
|
|
226
215
|
return fileManager;
|
|
227
216
|
}
|
|
228
|
-
|
|
229
217
|
//#endregion
|
|
230
218
|
//#region src/components/File.ts
|
|
231
219
|
/**
|
|
@@ -361,7 +349,6 @@ const FileImport = createComponent("FileImport", (props) => {
|
|
|
361
349
|
File.Source = FileSource;
|
|
362
350
|
File.Import = FileImport;
|
|
363
351
|
File.Export = FileExport;
|
|
364
|
-
|
|
365
352
|
//#endregion
|
|
366
353
|
//#region src/components/Indent.ts
|
|
367
354
|
/**
|
|
@@ -385,7 +372,6 @@ const Indent = createComponent("indent", () => {
|
|
|
385
372
|
return createIntrinsic("indent");
|
|
386
373
|
});
|
|
387
374
|
Indent.displayName = "Indent";
|
|
388
|
-
|
|
389
375
|
//#endregion
|
|
390
376
|
//#region src/components/Function.ts
|
|
391
377
|
/**
|
|
@@ -490,7 +476,6 @@ const ArrowFunction = createComponent("ArrowFunction", ({ children, ...props })
|
|
|
490
476
|
});
|
|
491
477
|
ArrowFunction.displayName = "ArrowFunction";
|
|
492
478
|
Function.Arrow = ArrowFunction;
|
|
493
|
-
|
|
494
479
|
//#endregion
|
|
495
480
|
//#region src/components/Type.ts
|
|
496
481
|
/**
|
|
@@ -522,9 +507,8 @@ const Type = createComponent("Type", ({ children, ...props }) => {
|
|
|
522
507
|
return result;
|
|
523
508
|
});
|
|
524
509
|
Type.displayName = "Type";
|
|
525
|
-
|
|
526
510
|
//#endregion
|
|
527
|
-
//#region src/composables/
|
|
511
|
+
//#region src/composables/useFabric.ts
|
|
528
512
|
/**
|
|
529
513
|
* Accesses the App context with metadata and exit function.
|
|
530
514
|
*
|
|
@@ -535,14 +519,13 @@ Type.displayName = "Type";
|
|
|
535
519
|
*
|
|
536
520
|
* @example
|
|
537
521
|
* ```ts
|
|
538
|
-
* const { meta, exit } =
|
|
522
|
+
* const { meta, exit } = useFabric<{ version: string }>()
|
|
539
523
|
* console.log(meta.version)
|
|
540
524
|
* ```
|
|
541
525
|
*/
|
|
542
|
-
function
|
|
543
|
-
return useContext(
|
|
526
|
+
function useFabric() {
|
|
527
|
+
return useContext(FabricContext);
|
|
544
528
|
}
|
|
545
|
-
|
|
546
529
|
//#endregion
|
|
547
530
|
//#region src/composables/useLifecycle.ts
|
|
548
531
|
/**
|
|
@@ -567,7 +550,6 @@ function useLifecycle() {
|
|
|
567
550
|
const { exit } = useContext(RootContext);
|
|
568
551
|
return { exit };
|
|
569
552
|
}
|
|
570
|
-
|
|
571
553
|
//#endregion
|
|
572
554
|
//#region src/createFabric.ts
|
|
573
555
|
/**
|
|
@@ -665,7 +647,7 @@ function createFabric(config = { mode: "sequential" }) {
|
|
|
665
647
|
};
|
|
666
648
|
return fabric;
|
|
667
649
|
}
|
|
668
|
-
|
|
669
650
|
//#endregion
|
|
670
|
-
export {
|
|
651
|
+
export { Br, Const, Dedent, Fabric, FabricContext, File, FileContext, FileManager, FileProcessor, Function, Indent, NodeTreeContext, RenderContext, Root, RootContext, TreeNode, Type, createComponent, createContext, createFabric, createFile, createJSDoc, getRelativePath, inject, onProcessExit, provide, renderIndent, renderIntrinsic, unprovide, useContext, useFabric, useFile, useFileManager, useLifecycle, useNodeTree };
|
|
652
|
+
|
|
671
653
|
//# sourceMappingURL=index.js.map
|