@kubb/agent 5.0.0-alpha.40 → 5.0.0-alpha.42
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
CHANGED
|
@@ -6702,7 +6702,7 @@ const fsStorage = createStorage(() => ({
|
|
|
6702
6702
|
await clean(resolve(base));
|
|
6703
6703
|
}
|
|
6704
6704
|
}));
|
|
6705
|
-
var version$1 = "5.0.0-alpha.
|
|
6705
|
+
var version$1 = "5.0.0-alpha.42";
|
|
6706
6706
|
function getDiagnosticInfo() {
|
|
6707
6707
|
return {
|
|
6708
6708
|
nodeVersion: version$2,
|
|
@@ -6933,9 +6933,8 @@ async function getBarrelFiles(files, { type, meta = {}, root, output }) {
|
|
|
6933
6933
|
function isInputPath(config) {
|
|
6934
6934
|
return typeof (config == null ? void 0 : config.input) === "object" && config.input !== null && "path" in config.input;
|
|
6935
6935
|
}
|
|
6936
|
-
async function setup(options) {
|
|
6936
|
+
async function setup(userConfig, options = {}) {
|
|
6937
6937
|
var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i;
|
|
6938
|
-
const { config: userConfig } = options;
|
|
6939
6938
|
const hooks = (_a2 = options.hooks) != null ? _a2 : new AsyncEventEmitter();
|
|
6940
6939
|
const sources = /* @__PURE__ */ new Map();
|
|
6941
6940
|
const diagnosticInfo = getDiagnosticInfo();
|
|
@@ -7328,7 +7327,7 @@ function inputToAdapterSource(config) {
|
|
|
7328
7327
|
path: resolve(config.root, config.input.path)
|
|
7329
7328
|
};
|
|
7330
7329
|
}
|
|
7331
|
-
function createKubb(options) {
|
|
7330
|
+
function createKubb(userConfig, options = {}) {
|
|
7332
7331
|
var _a2;
|
|
7333
7332
|
const hooks = (_a2 = options.hooks) != null ? _a2 : new AsyncEventEmitter();
|
|
7334
7333
|
let setupResult;
|
|
@@ -7347,10 +7346,7 @@ function createKubb(options) {
|
|
|
7347
7346
|
return setupResult == null ? void 0 : setupResult.config;
|
|
7348
7347
|
},
|
|
7349
7348
|
async setup() {
|
|
7350
|
-
setupResult = await setup({
|
|
7351
|
-
config: options.config,
|
|
7352
|
-
hooks
|
|
7353
|
-
});
|
|
7349
|
+
setupResult = await setup(userConfig, { hooks });
|
|
7354
7350
|
},
|
|
7355
7351
|
async build() {
|
|
7356
7352
|
if (!setupResult) await instance.setup();
|
|
@@ -7394,7 +7390,7 @@ const memoryStorage = createStorage(() => {
|
|
|
7394
7390
|
};
|
|
7395
7391
|
});
|
|
7396
7392
|
|
|
7397
|
-
var version = "5.0.0-alpha.
|
|
7393
|
+
var version = "5.0.0-alpha.42";
|
|
7398
7394
|
|
|
7399
7395
|
function isCommandMessage(msg) {
|
|
7400
7396
|
return msg.type === "command";
|
|
@@ -7448,7 +7444,7 @@ async function executeHooks({ configHooks, hooks }) {
|
|
|
7448
7444
|
async function generate({ config, hooks }) {
|
|
7449
7445
|
await hooks.emit("kubb:generation:start", config);
|
|
7450
7446
|
await hooks.emit("kubb:info", config.name ? `Setup generation ${config.name}` : "Setup generation");
|
|
7451
|
-
const kubb = createKubb(
|
|
7447
|
+
const kubb = createKubb(config, { hooks });
|
|
7452
7448
|
await kubb.setup();
|
|
7453
7449
|
await hooks.emit("kubb:info", config.name ? `Build generation ${config.name}` : "Build generation");
|
|
7454
7450
|
const { files, failedPlugins, error } = await kubb.safeBuild();
|
package/README.md
CHANGED
|
@@ -296,7 +296,7 @@ The `input` value is treated as `InputData` (i.e. `{ data: "<content>" }`) and o
|
|
|
296
296
|
### 1. Create a Kubb configuration file (`kubb.config.ts`):
|
|
297
297
|
|
|
298
298
|
```typescript
|
|
299
|
-
import { defineConfig } from '
|
|
299
|
+
import { defineConfig } from 'kubb'
|
|
300
300
|
import { pluginOas } from '@kubb/plugin-oas'
|
|
301
301
|
import { pluginTs } from '@kubb/plugin-ts'
|
|
302
302
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/agent",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.42",
|
|
4
4
|
"description": "Agent server for Kubb, enabling HTTP-based access to code generation capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"tinyexec": "^1.1.1",
|
|
40
40
|
"unstorage": "^1.17.5",
|
|
41
41
|
"ws": "^8.20.0",
|
|
42
|
-
"@kubb/adapter-oas": "5.0.0-alpha.
|
|
43
|
-
"@kubb/
|
|
44
|
-
"@kubb/
|
|
45
|
-
"@kubb/
|
|
42
|
+
"@kubb/adapter-oas": "5.0.0-alpha.42",
|
|
43
|
+
"@kubb/ast": "5.0.0-alpha.42",
|
|
44
|
+
"@kubb/core": "5.0.0-alpha.42",
|
|
45
|
+
"@kubb/parser-ts": "5.0.0-alpha.42"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/ws": "^8.18.1",
|