@kubb/agent 5.0.0-alpha.33 → 5.0.0-alpha.35

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 (30) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/server/chunks/nitro/nitro.mjs +2173 -1924
  3. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  4. package/.output/server/chunks/routes/api/health.get.mjs +1 -1
  5. package/.output/server/index.mjs +1 -1
  6. package/.output/server/node_modules/@redocly/config/lib/root-config-schema.js +11 -1
  7. package/.output/server/node_modules/@redocly/config/package.json +1 -1
  8. package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-document.js +25 -10
  9. package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-visitor.js +32 -29
  10. package/.output/server/node_modules/@redocly/openapi-core/lib/config/config.js +5 -0
  11. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/index.js +1 -1
  12. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/remove-unused-components.js +47 -38
  13. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/index.js +1 -1
  14. package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/remove-unused-components.js +45 -41
  15. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-http-verbs-in-paths.js +3 -1
  16. package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-required-schema-properties-undefined.js +41 -55
  17. package/.output/server/node_modules/@redocly/openapi-core/lib/walk.js +28 -16
  18. package/.output/server/node_modules/@redocly/openapi-core/package.json +2 -2
  19. package/.output/server/package.json +3 -4
  20. package/package.json +20 -20
  21. package/.output/server/node_modules/empathic/access.js +0 -39
  22. package/.output/server/node_modules/empathic/access.mjs +0 -34
  23. package/.output/server/node_modules/empathic/find.js +0 -81
  24. package/.output/server/node_modules/empathic/find.mjs +0 -76
  25. package/.output/server/node_modules/empathic/package.json +0 -49
  26. package/.output/server/node_modules/empathic/package.mjs +0 -52
  27. package/.output/server/node_modules/empathic/resolve.js +0 -31
  28. package/.output/server/node_modules/empathic/resolve.mjs +0 -27
  29. package/.output/server/node_modules/empathic/walk.js +0 -22
  30. package/.output/server/node_modules/empathic/walk.mjs +0 -20
@@ -1,52 +0,0 @@
1
- import { env } from "node:process";
2
- import { dirname, join } from "node:path";
3
- import { existsSync, mkdirSync } from "node:fs";
4
- import { writable } from "empathic/access";
5
- import * as find from "empathic/find";
6
- /**
7
- * Find the closest "package.json" file while walking parent directories.
8
- * @returns The absolute path to a "package.json", if found.
9
- */
10
- export function up(options) {
11
- return find.up("package.json", options);
12
- }
13
- /**
14
- * Construct a path to a `node_modules/.cache/<name>` directory.
15
- *
16
- * This may return `undefined` if:
17
- * 1. no "package.json" could be found
18
- * 2. the nearest "node_modules" directory is not writable
19
- * 3. the "node_modules" parent directory is not writable
20
- *
21
- * > [NOTE]
22
- * > You may define a `CACHE_DIR` environment variable, which will be
23
- * > used (as defined) instead of traversing the filesystem for the
24
- * > closest "package.json" and inferring a "node_modules" location.
25
- *
26
- * @see find-cache-dir for more information.
27
- *
28
- * @param name The name of your module/cache.
29
- * @returns The absolute path of the cache directory, if found.
30
- */
31
- export function cache(name, options) {
32
- options = options || {};
33
- let dir = env.CACHE_DIR;
34
- if (!dir || /^(1|0|true|false)$/.test(dir)) {
35
- let pkg = up(options);
36
- if (dir = pkg && dirname(pkg)) {
37
- let mods = join(dir, "node_modules");
38
- let exists = existsSync(mods);
39
- // exit cuz exists but not writable
40
- // or cuz missing but parent not writable
41
- if (!writable(exists ? mods : dir)) return;
42
- dir = join(mods, ".cache");
43
- }
44
- }
45
- if (dir) {
46
- dir = join(dir, name);
47
- if (options.create && !existsSync(dir)) {
48
- mkdirSync(dir, { recursive: true });
49
- }
50
- return dir;
51
- }
52
- }
@@ -1,31 +0,0 @@
1
- const { createRequire } = require("node:module");
2
- const { isAbsolute, join, resolve } = require("node:path");
3
- const { fileURLToPath } = require("node:url");
4
- /**
5
- * Resolve an absolute path from {@link root}, but only
6
- * if {@link input} isn't already absolute.
7
- *
8
- * @param input The path to resolve.
9
- * @param root The base path; default = process.cwd()
10
- * @returns The resolved absolute path.
11
- */
12
- function absolute(input, root) {
13
- return isAbsolute(input) ? input : resolve(root || ".", input);
14
- }
15
- function from(root, ident, silent) {
16
- try {
17
- // NOTE: dirs need a trailing "/" OR filename. With "/" route,
18
- // Node adds "noop.js" as main file, so just do "noop.js" anyway.
19
- let r = root instanceof URL || root.startsWith("file://") ? join(fileURLToPath(root), "noop.js") : join(absolute(root), "noop.js");
20
- return createRequire(r).resolve(ident);
21
- } catch (err) {
22
- if (!silent) throw err;
23
- }
24
- }
25
- function cwd(ident, silent) {
26
- return from(resolve(), ident, silent);
27
- }
28
-
29
- exports.absolute = absolute;
30
- exports.from = from;
31
- exports.cwd = cwd;
@@ -1,27 +0,0 @@
1
- import { createRequire } from "node:module";
2
- import { isAbsolute, join, resolve } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
- /**
5
- * Resolve an absolute path from {@link root}, but only
6
- * if {@link input} isn't already absolute.
7
- *
8
- * @param input The path to resolve.
9
- * @param root The base path; default = process.cwd()
10
- * @returns The resolved absolute path.
11
- */
12
- export function absolute(input, root) {
13
- return isAbsolute(input) ? input : resolve(root || ".", input);
14
- }
15
- export function from(root, ident, silent) {
16
- try {
17
- // NOTE: dirs need a trailing "/" OR filename. With "/" route,
18
- // Node adds "noop.js" as main file, so just do "noop.js" anyway.
19
- let r = root instanceof URL || root.startsWith("file://") ? join(fileURLToPath(root), "noop.js") : join(absolute(root), "noop.js");
20
- return createRequire(r).resolve(ident);
21
- } catch (err) {
22
- if (!silent) throw err;
23
- }
24
- }
25
- export function cwd(ident, silent) {
26
- return from(resolve(), ident, silent);
27
- }
@@ -1,22 +0,0 @@
1
- const { dirname } = require("node:path");
2
- const { absolute } = require("empathic/resolve");
3
- /**
4
- * Get all parent directories of {@link base}.
5
- * Stops after {@link Options['last']} is processed.
6
- *
7
- * @returns An array of absolute paths of all parent directories.
8
- */
9
- function up(base, options) {
10
- let { last, cwd } = options || {};
11
- let tmp = absolute(base, cwd);
12
- let root = absolute(last || "/", cwd);
13
- let prev, arr = [];
14
- while (prev !== root) {
15
- arr.push(tmp);
16
- tmp = dirname(prev = tmp);
17
- if (tmp === prev) break;
18
- }
19
- return arr;
20
- }
21
-
22
- exports.up = up;
@@ -1,20 +0,0 @@
1
- import { dirname } from "node:path";
2
- import { absolute } from "empathic/resolve";
3
- /**
4
- * Get all parent directories of {@link base}.
5
- * Stops after {@link Options['last']} is processed.
6
- *
7
- * @returns An array of absolute paths of all parent directories.
8
- */
9
- export function up(base, options) {
10
- let { last, cwd } = options || {};
11
- let tmp = absolute(base, cwd);
12
- let root = absolute(last || "/", cwd);
13
- let prev, arr = [];
14
- while (prev !== root) {
15
- arr.push(tmp);
16
- tmp = dirname(prev = tmp);
17
- if (tmp === prev) break;
18
- }
19
- return arr;
20
- }