fumadocs-openapi 10.10.0 → 10.10.2

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 (144) hide show
  1. package/css/generated/shared.css +1 -4
  2. package/dist/_openapi/types.d.ts +27 -1
  3. package/dist/index.d.ts +5 -4
  4. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/bundle.js +239 -0
  5. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/dereference.js +187 -0
  6. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js +136 -0
  7. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/normalize-args.js +41 -0
  8. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.js +124 -0
  9. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parse.js +109 -0
  10. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/binary.js +30 -0
  11. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/json.js +46 -0
  12. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js +36 -0
  13. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js +49 -0
  14. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js +242 -0
  15. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.js +247 -0
  16. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.js +210 -0
  17. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external.js +100 -0
  18. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/file.js +41 -0
  19. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js +112 -0
  20. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js +8 -0
  21. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js +146 -0
  22. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js +5 -0
  23. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js +18 -0
  24. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js +11 -0
  25. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js +99 -0
  26. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js +30 -0
  27. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js +315 -0
  28. package/dist/playground/client.d.ts +1 -1
  29. package/dist/requests/generators/all.d.ts +1 -1
  30. package/dist/requests/generators/all.js +1 -0
  31. package/dist/types.d.ts +3 -13
  32. package/dist/ui/base.d.ts +1 -1
  33. package/dist/ui/base.js +4 -3
  34. package/dist/ui/client/index.d.ts +15 -10
  35. package/dist/ui/components/heading.js +9 -1
  36. package/dist/ui/contexts/api.js +1 -7
  37. package/dist/ui/create-client.d.ts +2 -1
  38. package/dist/ui/create-client.js +8 -9
  39. package/dist/ui/operation/request-tabs.js +4 -1
  40. package/dist/ui/operation/response-tabs.js +4 -1
  41. package/dist/ui/operation/usage-tabs/index.js +2 -8
  42. package/dist/utils/document/process.js +7 -12
  43. package/dist/utils/pages/builder.d.ts +2 -4
  44. package/dist/utils/pages/preset-auto.d.ts +1 -2
  45. package/package.json +4 -8
  46. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/general/create-limiter.js +0 -43
  47. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/object/is-object.js +0 -27
  48. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/object/prevent-pollution.js +0 -33
  49. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/queue/queue.js +0 -106
  50. package/dist/node_modules/.pnpm/@scalar_helpers@0.8.0/node_modules/@scalar/helpers/dist/string/generate-hash.js +0 -120
  51. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/bundle.js +0 -357
  52. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js +0 -73
  53. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js +0 -3
  54. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +0 -1
  55. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js +0 -51
  56. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/bundle/value-generator.js +0 -102
  57. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js +0 -24
  58. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js +0 -11
  59. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js +0 -44
  60. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js +0 -10
  61. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js +0 -42
  62. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js +0 -23
  63. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js +0 -23
  64. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js +0 -28
  65. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js +0 -21
  66. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/normalize.js +0 -33
  67. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js +0 -30
  68. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js +0 -70
  69. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js +0 -33
  70. package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.14/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js +0 -12
  71. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.js +0 -19
  72. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +0 -430
  73. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-collection.js +0 -50
  74. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -39
  75. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-node.js +0 -85
  76. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-scalar.js +0 -57
  77. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/composer.js +0 -193
  78. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -82
  79. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +0 -174
  80. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +0 -40
  81. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-end.js +0 -36
  82. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +0 -153
  83. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +0 -203
  84. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js +0 -105
  85. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js +0 -27
  86. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +0 -25
  87. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +0 -10
  88. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js +0 -10
  89. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js +0 -277
  90. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js +0 -62
  91. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -38
  92. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js +0 -61
  93. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js +0 -163
  94. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/errors.js +0 -48
  95. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/index.js +0 -16
  96. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js +0 -6
  97. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Alias.js +0 -92
  98. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js +0 -117
  99. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js +0 -32
  100. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js +0 -29
  101. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js +0 -24
  102. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLMap.js +0 -106
  103. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +0 -104
  104. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +0 -49
  105. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/identity.js +0 -33
  106. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/toJS.js +0 -35
  107. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-scalar.js +0 -3
  108. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-visit.js +0 -89
  109. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst.js +0 -40
  110. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/lexer.js +0 -529
  111. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/line-counter.js +0 -45
  112. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/parser.js +0 -859
  113. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/public-api.js +0 -44
  114. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/Schema.js +0 -27
  115. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/map.js +0 -16
  116. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/null.js +0 -13
  117. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/seq.js +0 -16
  118. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/string.js +0 -14
  119. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/bool.js +0 -17
  120. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/float.js +0 -38
  121. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/int.js +0 -37
  122. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/schema.js +0 -23
  123. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/json/schema.js +0 -61
  124. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/tags.js +0 -81
  125. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +0 -52
  126. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +0 -24
  127. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +0 -41
  128. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +0 -70
  129. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -39
  130. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +0 -60
  131. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +0 -56
  132. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -39
  133. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +0 -65
  134. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +0 -79
  135. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +0 -111
  136. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringify.js +0 -105
  137. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +0 -116
  138. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyComment.js +0 -16
  139. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +0 -59
  140. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +0 -19
  141. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyPair.js +0 -95
  142. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyString.js +0 -222
  143. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/visit.js +0 -187
  144. package/dist/node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/index.js +0 -16
@@ -66,6 +66,5 @@ interface BaseConfig {
66
66
  */
67
67
  slugify?: (name: string) => string;
68
68
  }
69
- declare function createAutoPreset(options: SchemaToPagesOptions): PagesBuilderConfig;
70
69
  //#endregion
71
- export { SchemaToPagesOptions, createAutoPreset };
70
+ export { SchemaToPagesOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-openapi",
3
- "version": "10.10.0",
3
+ "version": "10.10.2",
4
4
  "description": "Generate MDX docs for your OpenAPI spec",
5
5
  "keywords": [
6
6
  "Docs",
@@ -44,7 +44,6 @@
44
44
  "@radix-ui/react-accordion": "^1.2.12",
45
45
  "@radix-ui/react-dialog": "^1.1.15",
46
46
  "@radix-ui/react-select": "^2.2.6",
47
- "@radix-ui/react-slot": "^1.2.4",
48
47
  "chokidar": "^5.0.0",
49
48
  "class-variance-authority": "^0.7.1",
50
49
  "github-slugger": "^2.0.0",
@@ -58,9 +57,9 @@
58
57
  "@fumari/stf": "1.0.5"
59
58
  },
60
59
  "devDependencies": {
60
+ "@apidevtools/json-schema-ref-parser": "^15.3.5",
61
61
  "@fastify/deepmerge": "^3.2.1",
62
62
  "@scalar/api-client-react": "2.0.20",
63
- "@scalar/json-magic": "^0.12.14",
64
63
  "@scalar/openapi-upgrader": "^0.2.8",
65
64
  "@tailwindcss/oxide": "^4.3.0",
66
65
  "@types/js-yaml": "^4.0.9",
@@ -97,18 +96,15 @@
97
96
  }
98
97
  },
99
98
  "inlinedDependencies": {
99
+ "@apidevtools/json-schema-ref-parser": "15.3.5",
100
100
  "@fastify/deepmerge": "3.2.1",
101
- "@scalar/helpers": "0.8.0",
102
- "@scalar/json-magic": "0.12.14",
103
101
  "@scalar/openapi-upgrader": "0.2.8",
104
102
  "ajv": "8.20.0",
105
103
  "fast-content-type-parse": "3.0.0",
106
104
  "fast-deep-equal": "3.1.3",
107
105
  "fast-uri": "3.1.0",
108
106
  "json-schema-traverse": "1.0.0",
109
- "pathe": "2.0.3",
110
- "xml-js": "1.6.11",
111
- "yaml": "2.9.0"
107
+ "xml-js": "1.6.11"
112
108
  },
113
109
  "scripts": {
114
110
  "build": "tsdown",
@@ -1,43 +0,0 @@
1
- import { Queue } from "../queue/queue.js";
2
- //#region ../../node_modules/.pnpm/@scalar+helpers@0.8.0/node_modules/@scalar/helpers/dist/general/create-limiter.js
3
- /**
4
- * Creates a function that limits the number of concurrent executions of async functions.
5
- *
6
- * @param maxConcurrent - Maximum number of concurrent executions allowed
7
- * @returns A function that wraps async functions to limit their concurrent execution
8
- *
9
- * @example
10
- * ```ts
11
- * const limiter = createLimiter(2) // Allow max 2 concurrent executions
12
- *
13
- * // These will run with max 2 at a time
14
- * const results = await Promise.all([
15
- * limiter(() => fetch('/api/1')),
16
- * limiter(() => fetch('/api/2')),
17
- * limiter(() => fetch('/api/3')),
18
- * limiter(() => fetch('/api/4'))
19
- * ])
20
- * ```
21
- */
22
- function createLimiter(maxConcurrent) {
23
- let activeCount = 0;
24
- const queue = new Queue();
25
- const next = () => {
26
- if (queue.isEmpty() || activeCount >= maxConcurrent) return;
27
- const resolve = queue.dequeue();
28
- if (resolve) resolve();
29
- };
30
- const run = async (fn) => {
31
- if (activeCount >= maxConcurrent) await new Promise((resolve) => queue.enqueue(resolve));
32
- activeCount++;
33
- try {
34
- return await fn();
35
- } finally {
36
- activeCount--;
37
- next();
38
- }
39
- };
40
- return run;
41
- }
42
- //#endregion
43
- export { createLimiter };
@@ -1,27 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@scalar+helpers@0.8.0/node_modules/@scalar/helpers/dist/object/is-object.js
2
- /**
3
- * Returns true if the provided value is a record object
4
- * (i.e. not null, not an array, and has an actual object as the prototype).
5
- *
6
- * Differs from the previous isObject in that it returns false for Date,
7
- * RegExp, Error, Map, Set, WeakMap, WeakSet, Promise, and other non-plain objects.
8
- *
9
- * | Value | Result |
10
- * | :--- | :--- |
11
- * | `isObject({})` | `true` |
12
- * | `isObject({ a: 1 })` | `true` |
13
- * | `isObject([])` | `false` (Array) |
14
- * | `isObject(null)` | `false` |
15
- * | `isObject(123)` | `false` |
16
- * | `isObject('string')` | `false` |
17
- * | `isObject(new Error('test'))` | `false` |
18
- * | `isObject(new Date())` | `false` |
19
- * | `isObject(Object.create(null))` | `true` |
20
- */
21
- const isObject = (value) => {
22
- if (value === null || typeof value !== "object") return false;
23
- const proto = Object.getPrototypeOf(value);
24
- return proto === Object.prototype || proto === null;
25
- };
26
- //#endregion
27
- export { isObject };
@@ -1,33 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@scalar+helpers@0.8.0/node_modules/@scalar/helpers/dist/object/prevent-pollution.js
2
- /**
3
- * Set of dangerous keys that can be used for prototype pollution attacks.
4
- * These keys should never be used as property names in dynamic object operations.
5
- */
6
- const PROTOTYPE_POLLUTION_KEYS = new Set([
7
- "__proto__",
8
- "prototype",
9
- "constructor"
10
- ]);
11
- /**
12
- * Validates that a key is safe to use and does not pose a prototype pollution risk.
13
- * Throws an error if a dangerous key is detected.
14
- *
15
- * @param key - The key to validate
16
- * @param context - Optional context string to help identify where the validation failed
17
- * @throws {Error} If the key matches a known prototype pollution vector
18
- *
19
- * @example
20
- * ```ts
21
- * preventPollution('__proto__') // throws Error
22
- * preventPollution('safeName') // passes
23
- * preventPollution('constructor', 'operation update') // throws Error with context
24
- * ```
25
- */
26
- const preventPollution = (key, context) => {
27
- if (PROTOTYPE_POLLUTION_KEYS.has(key)) {
28
- const errorMessage = context ? `Prototype pollution key detected: "${key}" in ${context}` : `Prototype pollution key detected: "${key}"`;
29
- throw new Error(errorMessage);
30
- }
31
- };
32
- //#endregion
33
- export { preventPollution };
@@ -1,106 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@scalar+helpers@0.8.0/node_modules/@scalar/helpers/dist/queue/queue.js
2
- /**
3
- * Represents a node in a singly linked list structure, used internally by the Queue.
4
- *
5
- * Example:
6
- * const node = new Node<number>(42);
7
- * console.log(node.data); // 42
8
- * console.log(node.next); // null
9
- */
10
- var Node = class {
11
- data;
12
- next;
13
- constructor(data) {
14
- this.data = data;
15
- this.next = null;
16
- }
17
- };
18
- /**
19
- * A generic queue implementation using a singly linked list.
20
- *
21
- * Example usage:
22
- *
23
- * const q = new Queue<number>();
24
- * q.enqueue(1);
25
- * q.enqueue(2);
26
- * q.enqueue(3);
27
- * console.log(q.dequeue()); // 1
28
- * console.log(q.peek()); // 2
29
- * console.log(q.getSize()); // 2
30
- * console.log(q.toString()); // "2 -> 3"
31
- * console.log(q.isEmpty()); // false
32
- */
33
- var Queue = class {
34
- front;
35
- rear;
36
- size;
37
- constructor() {
38
- this.front = null;
39
- this.rear = null;
40
- this.size = 0;
41
- }
42
- /**
43
- * Adds an element to the end of the queue.
44
- * @param data - The data to add to the queue.
45
- */
46
- enqueue(data) {
47
- const newNode = new Node(data);
48
- if (this.isEmpty() || !this.rear) {
49
- this.front = newNode;
50
- this.rear = newNode;
51
- } else {
52
- this.rear.next = newNode;
53
- this.rear = newNode;
54
- }
55
- this.size++;
56
- }
57
- /**
58
- * Removes and returns the front element of the queue.
59
- * @returns The data from the removed node, or null if the queue is empty.
60
- */
61
- dequeue() {
62
- if (this.isEmpty() || !this.front) return null;
63
- const removedNode = this.front;
64
- this.front = this.front.next;
65
- if (this.front === null) this.rear = null;
66
- this.size--;
67
- return removedNode.data;
68
- }
69
- /**
70
- * Returns the front element of the queue without removing it.
71
- * @returns The front data, or null if the queue is empty.
72
- */
73
- peek() {
74
- if (this.isEmpty() || !this.front) return null;
75
- return this.front.data;
76
- }
77
- /**
78
- * Checks whether the queue is empty.
79
- * @returns True if the queue has no elements, false otherwise.
80
- */
81
- isEmpty() {
82
- return this.size === 0;
83
- }
84
- /**
85
- * Returns the number of elements in the queue.
86
- * @returns The size of the queue.
87
- */
88
- getSize() {
89
- return this.size;
90
- }
91
- /**
92
- * Returns a string representation of the queue.
93
- * @returns Elements of the queue separated by ' -> '.
94
- */
95
- toString() {
96
- let current = this.front;
97
- const elements = [];
98
- while (current) {
99
- elements.push(current.data);
100
- current = current.next;
101
- }
102
- return elements.join(" -> ");
103
- }
104
- };
105
- //#endregion
106
- export { Queue };
@@ -1,120 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@scalar+helpers@0.8.0/node_modules/@scalar/helpers/dist/string/generate-hash.js
2
- /**
3
- * MurmurHash3 implementation
4
- *
5
- * Generate a hash from a string using the MurmurHash3 algorithm
6
- * Provides 64-bit hash output with excellent speed and distribution
7
- *
8
- * We had to move away from xxhash-wasm since it was causing issues with content security policy (CSP) violations.
9
- *
10
- * We cannot use crypto.subtle because it is only available in secure contexts (HTTPS) or on localhost.
11
- *
12
- * @param input - The string to hash
13
- * @returns The 64-bit hash of the input string as a 16-character hex string
14
- */
15
- const generateHash = (input) => {
16
- const seed = 0;
17
- let h1 = seed;
18
- let h2 = seed;
19
- const len = input.length;
20
- const remainder = len & 15;
21
- const bytes = len - remainder;
22
- const c1 = 2277735313;
23
- const c2 = 1291169091;
24
- const c3 = 1390208809;
25
- const c4 = 944331445;
26
- for (let i = 0; i < bytes; i += 16) {
27
- let k1 = input.charCodeAt(i) & 255 | (input.charCodeAt(i + 1) & 255) << 8 | (input.charCodeAt(i + 2) & 255) << 16 | (input.charCodeAt(i + 3) & 255) << 24;
28
- let k2 = input.charCodeAt(i + 4) & 255 | (input.charCodeAt(i + 5) & 255) << 8 | (input.charCodeAt(i + 6) & 255) << 16 | (input.charCodeAt(i + 7) & 255) << 24;
29
- let k3 = input.charCodeAt(i + 8) & 255 | (input.charCodeAt(i + 9) & 255) << 8 | (input.charCodeAt(i + 10) & 255) << 16 | (input.charCodeAt(i + 11) & 255) << 24;
30
- let k4 = input.charCodeAt(i + 12) & 255 | (input.charCodeAt(i + 13) & 255) << 8 | (input.charCodeAt(i + 14) & 255) << 16 | (input.charCodeAt(i + 15) & 255) << 24;
31
- k1 = Math.imul(k1, c1);
32
- k1 = k1 << 15 | k1 >>> 17;
33
- k1 = Math.imul(k1, c2);
34
- h1 ^= k1;
35
- h1 = h1 << 13 | h1 >>> 19;
36
- h1 = Math.imul(h1, 5) + 3864292196;
37
- k2 = Math.imul(k2, c2);
38
- k2 = k2 << 16 | k2 >>> 16;
39
- k2 = Math.imul(k2, c3);
40
- h2 ^= k2;
41
- h2 = h2 << 17 | h2 >>> 15;
42
- h2 = Math.imul(h2, 5) + 461845907;
43
- k3 = Math.imul(k3, c3);
44
- k3 = k3 << 17 | k3 >>> 15;
45
- k3 = Math.imul(k3, c4);
46
- h1 ^= k3;
47
- h1 = h1 << 15 | h1 >>> 17;
48
- h1 = Math.imul(h1, 5) + 1390208809;
49
- k4 = Math.imul(k4, c4);
50
- k4 = k4 << 18 | k4 >>> 14;
51
- k4 = Math.imul(k4, c1);
52
- h2 ^= k4;
53
- h2 = h2 << 13 | h2 >>> 19;
54
- h2 = Math.imul(h2, 5) + 944331445;
55
- }
56
- if (remainder > 0) {
57
- let k1 = 0;
58
- let k2 = 0;
59
- let k3 = 0;
60
- let k4 = 0;
61
- if (remainder >= 15) k4 ^= (input.charCodeAt(bytes + 14) & 255) << 16;
62
- if (remainder >= 14) k4 ^= (input.charCodeAt(bytes + 13) & 255) << 8;
63
- if (remainder >= 13) {
64
- k4 ^= input.charCodeAt(bytes + 12) & 255;
65
- k4 = Math.imul(k4, c4);
66
- k4 = k4 << 18 | k4 >>> 14;
67
- k4 = Math.imul(k4, c1);
68
- h2 ^= k4;
69
- }
70
- if (remainder >= 12) k3 ^= (input.charCodeAt(bytes + 11) & 255) << 24;
71
- if (remainder >= 11) k3 ^= (input.charCodeAt(bytes + 10) & 255) << 16;
72
- if (remainder >= 10) k3 ^= (input.charCodeAt(bytes + 9) & 255) << 8;
73
- if (remainder >= 9) {
74
- k3 ^= input.charCodeAt(bytes + 8) & 255;
75
- k3 = Math.imul(k3, c3);
76
- k3 = k3 << 17 | k3 >>> 15;
77
- k3 = Math.imul(k3, c4);
78
- h1 ^= k3;
79
- }
80
- if (remainder >= 8) k2 ^= (input.charCodeAt(bytes + 7) & 255) << 24;
81
- if (remainder >= 7) k2 ^= (input.charCodeAt(bytes + 6) & 255) << 16;
82
- if (remainder >= 6) k2 ^= (input.charCodeAt(bytes + 5) & 255) << 8;
83
- if (remainder >= 5) {
84
- k2 ^= input.charCodeAt(bytes + 4) & 255;
85
- k2 = Math.imul(k2, c2);
86
- k2 = k2 << 16 | k2 >>> 16;
87
- k2 = Math.imul(k2, c3);
88
- h2 ^= k2;
89
- }
90
- if (remainder >= 4) k1 ^= (input.charCodeAt(bytes + 3) & 255) << 24;
91
- if (remainder >= 3) k1 ^= (input.charCodeAt(bytes + 2) & 255) << 16;
92
- if (remainder >= 2) k1 ^= (input.charCodeAt(bytes + 1) & 255) << 8;
93
- if (remainder >= 1) {
94
- k1 ^= input.charCodeAt(bytes) & 255;
95
- k1 = Math.imul(k1, c1);
96
- k1 = k1 << 15 | k1 >>> 17;
97
- k1 = Math.imul(k1, c2);
98
- h1 ^= k1;
99
- }
100
- }
101
- h1 ^= len;
102
- h2 ^= len;
103
- h1 += h2;
104
- h2 += h1;
105
- h1 ^= h1 >>> 16;
106
- h1 = Math.imul(h1, 2246822507);
107
- h1 ^= h1 >>> 13;
108
- h1 = Math.imul(h1, 3266489909);
109
- h1 ^= h1 >>> 16;
110
- h2 ^= h2 >>> 16;
111
- h2 = Math.imul(h2, 2246822507);
112
- h2 ^= h2 >>> 13;
113
- h2 = Math.imul(h2, 3266489909);
114
- h2 ^= h2 >>> 16;
115
- h1 += h2;
116
- h2 += h1;
117
- return (h1 >>> 0).toString(16).padStart(8, "0") + (h2 >>> 0).toString(16).padStart(8, "0");
118
- };
119
- //#endregion
120
- export { generateHash };