@scalar/openapi-parser 0.7.1 → 0.7.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 (175) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{configuration.d.ts → configuration/index.d.ts} +8 -7
  3. package/dist/configuration/index.d.ts.map +1 -0
  4. package/dist/configuration/index.js +1 -0
  5. package/dist/index.d.ts +5 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +1 -0
  8. package/dist/lib/Validator/Validator.d.ts +6 -8
  9. package/dist/lib/Validator/Validator.d.ts.map +1 -0
  10. package/dist/lib/Validator/Validator.js +1 -0
  11. package/dist/lib/Validator/index.d.ts +3 -0
  12. package/dist/lib/Validator/index.d.ts.map +1 -0
  13. package/dist/lib/index.d.ts +2 -0
  14. package/dist/lib/index.d.ts.map +1 -0
  15. package/dist/polyfills/index.d.ts +2 -0
  16. package/dist/polyfills/index.d.ts.map +1 -0
  17. package/dist/polyfills/path.d.ts +24 -0
  18. package/dist/polyfills/path.d.ts.map +1 -0
  19. package/dist/polyfills/path.js +1 -0
  20. package/dist/schemas/v2.0/schema.json.js +1 -1623
  21. package/dist/schemas/v3.0/schema.json.js +1 -1673
  22. package/dist/schemas/v3.1/schema.json.js +1 -1452
  23. package/dist/types/index.d.ts +23 -17
  24. package/dist/types/index.d.ts.map +1 -0
  25. package/dist/types/openapi-types.d.ts +7 -8
  26. package/dist/types/openapi-types.d.ts.map +1 -0
  27. package/dist/utils/betterAjvErrors/helpers.d.ts +7 -0
  28. package/dist/utils/betterAjvErrors/helpers.d.ts.map +1 -0
  29. package/dist/utils/betterAjvErrors/helpers.js +1 -0
  30. package/dist/utils/betterAjvErrors/index.d.ts +17 -0
  31. package/dist/utils/betterAjvErrors/index.d.ts.map +1 -0
  32. package/dist/utils/betterAjvErrors/index.js +1 -0
  33. package/dist/utils/betterAjvErrors/utils.js +1 -0
  34. package/dist/utils/betterAjvErrors/validation-errors/additional-prop.js +1 -0
  35. package/dist/utils/betterAjvErrors/validation-errors/base.js +1 -0
  36. package/dist/utils/betterAjvErrors/validation-errors/default.js +1 -0
  37. package/dist/utils/betterAjvErrors/validation-errors/enum.js +1 -0
  38. package/dist/utils/betterAjvErrors/validation-errors/pattern.js +1 -0
  39. package/dist/utils/betterAjvErrors/validation-errors/required.js +1 -0
  40. package/dist/utils/betterAjvErrors/validation-errors/unevaluated-prop.js +1 -0
  41. package/dist/utils/dereference.d.ts +3 -5
  42. package/dist/utils/dereference.d.ts.map +1 -0
  43. package/dist/utils/dereference.js +1 -0
  44. package/dist/utils/details.d.ts +3 -5
  45. package/dist/utils/details.d.ts.map +1 -0
  46. package/dist/utils/details.js +1 -0
  47. package/dist/utils/escapeJsonPointer.d.ts +2 -3
  48. package/dist/utils/escapeJsonPointer.d.ts.map +1 -0
  49. package/dist/utils/escapeJsonPointer.js +1 -0
  50. package/dist/utils/filter.d.ts +3 -5
  51. package/dist/utils/filter.d.ts.map +1 -0
  52. package/dist/utils/filter.js +1 -0
  53. package/dist/utils/getEntrypoint.d.ts +3 -5
  54. package/dist/utils/getEntrypoint.d.ts.map +1 -0
  55. package/dist/utils/getEntrypoint.js +1 -0
  56. package/dist/utils/getListOfReferences.d.ts +3 -5
  57. package/dist/utils/getListOfReferences.d.ts.map +1 -0
  58. package/dist/utils/getListOfReferences.js +1 -0
  59. package/dist/utils/getSegmentsFromPath.d.ts +2 -3
  60. package/dist/utils/getSegmentsFromPath.d.ts.map +1 -0
  61. package/dist/utils/getSegmentsFromPath.js +1 -0
  62. package/dist/utils/index.d.ts +26 -0
  63. package/dist/utils/index.d.ts.map +1 -0
  64. package/dist/utils/isFilesystem.d.ts +2 -3
  65. package/dist/utils/isFilesystem.d.ts.map +1 -0
  66. package/dist/utils/isFilesystem.js +1 -0
  67. package/dist/utils/isJson.d.ts +2 -3
  68. package/dist/utils/isJson.d.ts.map +1 -0
  69. package/dist/utils/isJson.js +1 -0
  70. package/dist/utils/isObject.d.ts +2 -3
  71. package/dist/utils/isObject.d.ts.map +1 -0
  72. package/dist/utils/isObject.js +1 -0
  73. package/dist/utils/isYaml.d.ts +2 -3
  74. package/dist/utils/isYaml.d.ts.map +1 -0
  75. package/dist/utils/isYaml.js +1 -0
  76. package/dist/utils/load/index.d.ts +2 -0
  77. package/dist/utils/load/index.d.ts.map +1 -0
  78. package/dist/utils/load/load.d.ts +4 -6
  79. package/dist/utils/load/load.d.ts.map +1 -0
  80. package/dist/utils/load/load.js +1 -0
  81. package/dist/{src/utils → utils}/load/plugins/fetchUrls.d.ts +4 -6
  82. package/dist/utils/load/plugins/fetchUrls.d.ts.map +1 -0
  83. package/dist/utils/load/plugins/fetchUrls.js +1 -0
  84. package/dist/utils/load/plugins/readFiles.d.ts +3 -0
  85. package/dist/utils/load/plugins/readFiles.d.ts.map +1 -0
  86. package/dist/utils/load/plugins/readFiles.js +1 -0
  87. package/dist/utils/makeFilesystem.d.ts +3 -0
  88. package/dist/utils/makeFilesystem.d.ts.map +1 -0
  89. package/dist/utils/makeFilesystem.js +1 -0
  90. package/dist/utils/normalize.d.ts +3 -5
  91. package/dist/utils/normalize.d.ts.map +1 -0
  92. package/dist/utils/normalize.js +1 -0
  93. package/dist/utils/openapi.d.ts +183 -0
  94. package/dist/utils/openapi.d.ts.map +1 -0
  95. package/dist/utils/openapi.js +1 -0
  96. package/dist/utils/resolveReferences.d.ts +5 -7
  97. package/dist/utils/resolveReferences.d.ts.map +1 -0
  98. package/dist/utils/resolveReferences.js +1 -0
  99. package/dist/utils/toJson.d.ts +3 -5
  100. package/dist/utils/toJson.d.ts.map +1 -0
  101. package/dist/utils/toJson.js +1 -0
  102. package/dist/utils/toYaml.d.ts +3 -5
  103. package/dist/utils/toYaml.d.ts.map +1 -0
  104. package/dist/utils/toYaml.js +1 -0
  105. package/dist/utils/transformErrors.d.ts +3 -5
  106. package/dist/utils/transformErrors.d.ts.map +1 -0
  107. package/dist/utils/transformErrors.js +1 -0
  108. package/dist/utils/traverse.d.ts +3 -5
  109. package/dist/utils/traverse.d.ts.map +1 -0
  110. package/dist/utils/traverse.js +1 -0
  111. package/dist/utils/unescapeJsonPointer.d.ts +2 -3
  112. package/dist/utils/unescapeJsonPointer.d.ts.map +1 -0
  113. package/dist/utils/unescapeJsonPointer.js +1 -0
  114. package/dist/utils/upgrade.d.ts +3 -5
  115. package/dist/utils/upgrade.d.ts.map +1 -0
  116. package/dist/utils/upgrade.js +1 -0
  117. package/dist/utils/upgradeFromThreeToThreeOne.d.ts +3 -5
  118. package/dist/utils/upgradeFromThreeToThreeOne.d.ts.map +1 -0
  119. package/dist/utils/upgradeFromThreeToThreeOne.js +1 -0
  120. package/dist/utils/upgradeFromTwoToThree.d.ts +3 -5
  121. package/dist/utils/upgradeFromTwoToThree.d.ts.map +1 -0
  122. package/dist/utils/upgradeFromTwoToThree.js +1 -0
  123. package/dist/utils/validate.d.ts +3 -5
  124. package/dist/utils/validate.d.ts.map +1 -0
  125. package/dist/utils/validate.js +1 -0
  126. package/dist/utils/workThroughQueue.d.ts +11 -0
  127. package/dist/utils/workThroughQueue.d.ts.map +1 -0
  128. package/dist/utils/workThroughQueue.js +1 -0
  129. package/package.json +19 -15
  130. package/dist/pipeline.d.ts +0 -388
  131. package/dist/src/configuration.js +0 -22
  132. package/dist/src/index.d.ts +0 -27
  133. package/dist/src/index.js +0 -25
  134. package/dist/src/lib/Validator/Validator.js +0 -94
  135. package/dist/src/pipeline.js +0 -121
  136. package/dist/src/polyfills/path.js +0 -80
  137. package/dist/src/utils/betterAjvErrors/helpers.js +0 -89
  138. package/dist/src/utils/betterAjvErrors/index.js +0 -15
  139. package/dist/src/utils/betterAjvErrors/utils.js +0 -17
  140. package/dist/src/utils/betterAjvErrors/validation-errors/additional-prop.js +0 -18
  141. package/dist/src/utils/betterAjvErrors/validation-errors/base.js +0 -23
  142. package/dist/src/utils/betterAjvErrors/validation-errors/default.js +0 -18
  143. package/dist/src/utils/betterAjvErrors/validation-errors/enum.js +0 -41
  144. package/dist/src/utils/betterAjvErrors/validation-errors/pattern.js +0 -18
  145. package/dist/src/utils/betterAjvErrors/validation-errors/required.js +0 -17
  146. package/dist/src/utils/betterAjvErrors/validation-errors/unevaluated-prop.js +0 -18
  147. package/dist/src/utils/dereference.js +0 -18
  148. package/dist/src/utils/details.js +0 -22
  149. package/dist/src/utils/escapeJsonPointer.js +0 -5
  150. package/dist/src/utils/filter.js +0 -17
  151. package/dist/src/utils/getEntrypoint.js +0 -5
  152. package/dist/src/utils/getListOfReferences.js +0 -17
  153. package/dist/src/utils/getSegmentsFromPath.js +0 -10
  154. package/dist/src/utils/isFilesystem.js +0 -5
  155. package/dist/src/utils/isJson.js +0 -10
  156. package/dist/src/utils/isObject.js +0 -3
  157. package/dist/src/utils/isYaml.js +0 -17
  158. package/dist/src/utils/load/load.js +0 -59
  159. package/dist/src/utils/load/plugins/fetchUrls.js +0 -38
  160. package/dist/src/utils/load/plugins/readFiles.d.ts +0 -5
  161. package/dist/src/utils/load/plugins/readFiles.js +0 -50
  162. package/dist/src/utils/makeFilesystem.js +0 -22
  163. package/dist/src/utils/normalize.js +0 -20
  164. package/dist/src/utils/resolveReferences.js +0 -106
  165. package/dist/src/utils/toJson.js +0 -3
  166. package/dist/src/utils/toYaml.js +0 -5
  167. package/dist/src/utils/transformErrors.js +0 -19
  168. package/dist/src/utils/traverse.js +0 -20
  169. package/dist/src/utils/unescapeJsonPointer.js +0 -5
  170. package/dist/src/utils/upgrade.js +0 -19
  171. package/dist/src/utils/upgradeFromThreeToThreeOne.js +0 -70
  172. package/dist/src/utils/upgradeFromTwoToThree.js +0 -5
  173. package/dist/src/utils/validate.js +0 -15
  174. package/dist/src/utils/workThroughQueue.js +0 -24
  175. package/dist/webpack-stats.json +0 -1
@@ -1,9 +1,7 @@
1
- import { AnyObject, Filesystem } from '../types/index.js';
2
-
1
+ import { AnyObject, Filesystem } from '../types';
3
2
  /**
4
3
  * Normalize the OpenAPI specification to a JavaScript object.
5
4
  * Don’t touch the object if it’s a `Filesystem` (multiple files).
6
5
  */
7
- declare function normalize(specification: string | AnyObject | Filesystem): AnyObject | Filesystem;
8
-
9
- export { normalize };
6
+ export declare function normalize(specification: string | AnyObject | Filesystem): AnyObject | Filesystem;
7
+ //# sourceMappingURL=normalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/utils/normalize.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAGhD;;;GAGG;AACH,wBAAgB,SAAS,CACvB,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAC7C,SAAS,GAAG,UAAU,CAgBxB"}
@@ -0,0 +1 @@
1
+ import{parse as r}from"yaml";import{isFilesystem as t}from"./isFilesystem.js";function e(e){if(t(e))return e;if("string"==typeof e)try{return JSON.parse(e)}catch(t){return r(e,{maxAliasCount:1e4})}return e}export{e as normalize};
@@ -0,0 +1,183 @@
1
+ import type { AnyObject, DetailsResult, Filesystem, ThrowOnErrorOption } from '../types';
2
+ import { dereference } from './dereference.js';
3
+ import { filter } from './filter.js';
4
+ import { type LoadPlugin, load } from './load';
5
+ import { upgrade } from './upgrade.js';
6
+ import { validate } from './validate.js';
7
+ /**
8
+ * A queuable action for the pipeline
9
+ */
10
+ export type Action = {
11
+ action: typeof load | typeof upgrade | typeof filter | typeof dereference | typeof validate;
12
+ options?: AnyObject;
13
+ };
14
+ /**
15
+ * A queue of tasks to run on an OpenAPI specification
16
+ */
17
+ export type Queue = {
18
+ specification: AnyApiDefinitionFormat;
19
+ tasks: Action[];
20
+ };
21
+ /**
22
+ * JSON, YAML or object representation of an OpenAPI API definition
23
+ */
24
+ export type AnyApiDefinitionFormat = string | AnyObject;
25
+ /**
26
+ * Creates a new pipeline
27
+ */
28
+ export declare function openapi(globalOptions?: ThrowOnErrorOption): {
29
+ load: (specification: AnyApiDefinitionFormat, options?: {
30
+ plugins?: LoadPlugin[];
31
+ }) => {
32
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
33
+ filesystem: Filesystem;
34
+ }>>;
35
+ files: () => Promise<Filesystem>;
36
+ details: () => Promise<DetailsResult>;
37
+ filter: (callback: (Specification: AnyObject) => boolean) => {
38
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
39
+ filesystem: Filesystem;
40
+ }>>;
41
+ files: () => Promise<Filesystem>;
42
+ details: () => Promise<DetailsResult>;
43
+ filter: () => any;
44
+ upgrade: () => {
45
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
46
+ filesystem: Filesystem;
47
+ }>>;
48
+ files: () => Promise<Filesystem>;
49
+ details: () => Promise<DetailsResult>;
50
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
51
+ validate: (validateOptions?: ThrowOnErrorOption) => {
52
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
53
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
54
+ filesystem: Filesystem;
55
+ }>>;
56
+ files: () => Promise<Filesystem>;
57
+ details: () => Promise<DetailsResult>;
58
+ dereference: (dereferenceOptions?: ThrowOnErrorOption) => {
59
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
60
+ filesystem: Filesystem;
61
+ }>>;
62
+ files: () => Promise<Filesystem>;
63
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
64
+ toJson: () => Promise<string>;
65
+ toYaml: () => Promise<string>;
66
+ };
67
+ toJson: () => Promise<string>;
68
+ toYaml: () => Promise<string>;
69
+ };
70
+ dereference: (dereferenceOptions?: ThrowOnErrorOption) => {
71
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
72
+ filesystem: Filesystem;
73
+ }>>;
74
+ files: () => Promise<Filesystem>;
75
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
76
+ toJson: () => Promise<string>;
77
+ toYaml: () => Promise<string>;
78
+ };
79
+ toJson: () => Promise<string>;
80
+ toYaml: () => Promise<string>;
81
+ };
82
+ validate: (validateOptions?: ThrowOnErrorOption) => {
83
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
84
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
85
+ filesystem: Filesystem;
86
+ }>>;
87
+ files: () => Promise<Filesystem>;
88
+ details: () => Promise<DetailsResult>;
89
+ dereference: (dereferenceOptions?: ThrowOnErrorOption) => {
90
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
91
+ filesystem: Filesystem;
92
+ }>>;
93
+ files: () => Promise<Filesystem>;
94
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
95
+ toJson: () => Promise<string>;
96
+ toYaml: () => Promise<string>;
97
+ };
98
+ toJson: () => Promise<string>;
99
+ toYaml: () => Promise<string>;
100
+ };
101
+ dereference: (dereferenceOptions?: ThrowOnErrorOption) => {
102
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
103
+ filesystem: Filesystem;
104
+ }>>;
105
+ files: () => Promise<Filesystem>;
106
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
107
+ toJson: () => Promise<string>;
108
+ toYaml: () => Promise<string>;
109
+ };
110
+ toJson: () => Promise<string>;
111
+ toYaml: () => Promise<string>;
112
+ };
113
+ upgrade: () => {
114
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
115
+ filesystem: Filesystem;
116
+ }>>;
117
+ files: () => Promise<Filesystem>;
118
+ details: () => Promise<DetailsResult>;
119
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
120
+ validate: (validateOptions?: ThrowOnErrorOption) => {
121
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
122
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
123
+ filesystem: Filesystem;
124
+ }>>;
125
+ files: () => Promise<Filesystem>;
126
+ details: () => Promise<DetailsResult>;
127
+ dereference: (dereferenceOptions?: ThrowOnErrorOption) => {
128
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
129
+ filesystem: Filesystem;
130
+ }>>;
131
+ files: () => Promise<Filesystem>;
132
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
133
+ toJson: () => Promise<string>;
134
+ toYaml: () => Promise<string>;
135
+ };
136
+ toJson: () => Promise<string>;
137
+ toYaml: () => Promise<string>;
138
+ };
139
+ dereference: (dereferenceOptions?: ThrowOnErrorOption) => {
140
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
141
+ filesystem: Filesystem;
142
+ }>>;
143
+ files: () => Promise<Filesystem>;
144
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
145
+ toJson: () => Promise<string>;
146
+ toYaml: () => Promise<string>;
147
+ };
148
+ toJson: () => Promise<string>;
149
+ toYaml: () => Promise<string>;
150
+ };
151
+ validate: (validateOptions?: ThrowOnErrorOption) => {
152
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
153
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
154
+ filesystem: Filesystem;
155
+ }>>;
156
+ files: () => Promise<Filesystem>;
157
+ details: () => Promise<DetailsResult>;
158
+ dereference: (dereferenceOptions?: ThrowOnErrorOption) => {
159
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
160
+ filesystem: Filesystem;
161
+ }>>;
162
+ files: () => Promise<Filesystem>;
163
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
164
+ toJson: () => Promise<string>;
165
+ toYaml: () => Promise<string>;
166
+ };
167
+ toJson: () => Promise<string>;
168
+ toYaml: () => Promise<string>;
169
+ };
170
+ dereference: (dereferenceOptions?: ThrowOnErrorOption) => {
171
+ get: () => Promise<Partial<import("../types").LoadResult & import("../types").DereferenceResult & import("../types").ValidateResult & import("../types").UpgradeResult & import("../types").FilterResult & {
172
+ filesystem: Filesystem;
173
+ }>>;
174
+ files: () => Promise<Filesystem>;
175
+ filter: (callback: (Specification: AnyObject) => boolean) => any;
176
+ toJson: () => Promise<string>;
177
+ toYaml: () => Promise<string>;
178
+ };
179
+ toJson: () => Promise<string>;
180
+ toYaml: () => Promise<string>;
181
+ };
182
+ };
183
+ //# sourceMappingURL=openapi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/utils/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,UAAU,EACV,kBAAkB,EACnB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,KAAK,UAAU,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAG9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,MAAM,EACF,OAAO,IAAI,GACX,OAAO,OAAO,GACd,OAAO,MAAM,GACb,OAAO,WAAW,GAClB,OAAO,QAAQ,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,aAAa,EAAE,sBAAsB,CAAA;IACrC,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,SAAS,CAAA;AAEvD;;GAEG;AACH,wBAAgB,OAAO,CAAC,aAAa,CAAC,EAAE,kBAAkB;0BAGrC,sBAAsB,YAC3B;QACR,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;KACvB;;;;;;2BAqCgB,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;;;;;;;;mCAkCrC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;6CAI3B,kBAAkB;uCA0B5B,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;uDAOrB,kBAAkB;;;;;2CAwBlC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;;mDArDrB,kBAAkB;;;;;uCAqDlC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;;yCA4B3B,kBAAkB;mCA3D5B,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;mDAOrB,kBAAkB;;;;;uCAwBlC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;;+CAgCrB,kBAAkB;;;;;mCAhClC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;;;;;;;;+BA7DrC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;yCAI3B,kBAAkB;mCA0B5B,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;mDAOrB,kBAAkB;;;;;uCAwBlC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;;+CArDrB,kBAAkB;;;;;mCAqDlC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;;qCAvF3B,kBAAkB;+BAwD5B,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;+CAOrB,kBAAkB;;;;;mCAwBlC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;;2CAnFrB,kBAAkB;;;;;+BAmFlC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO;;;;;;;EA7H3D"}
@@ -0,0 +1 @@
1
+ import{dereference as r}from"./dereference.js";import{details as o}from"./details.js";import{filter as t}from"./filter.js";import{getEntrypoint as n}from"./getEntrypoint.js";import{load as e}from"./load/load.js";import{toJson as i}from"./toJson.js";import{toYaml as s}from"./toYaml.js";import{upgrade as a}from"./upgrade.js";import{validate as f}from"./validate.js";import{workThroughQueue as c}from"./workThroughQueue.js";function l(r){return{load:(o,t)=>function(r,o){const t={specification:r,tasks:[{action:e,options:{plugins:o?.plugins}}]};return{get:()=>w(t),files:()=>E(t),details:()=>O(t),filter:r=>h(t,r,{throwOnError:o?.throwOnError}),upgrade:()=>u(t,{throwOnError:o?.throwOnError}),validate:r=>p(t,{throwOnError:r?.throwOnError??o?.throwOnError}),dereference:r=>m(t,{...o??{},...r??{}}),toJson:()=>d(t),toYaml:()=>g(t)}}(o,{...r??{},...t??{}})}}function u(r,o){return r.tasks.push({action:a}),{get:()=>w(r),files:()=>E(r),details:()=>O(r),filter:t=>h(r,t,{throwOnError:o?.throwOnError}),validate:t=>p(r,{throwOnError:t?.throwOnError??o?.throwOnError}),dereference:t=>m(r,{...o??{},...t??{}}),toJson:()=>d(r),toYaml:()=>g(r)}}function p(r,o){return r.tasks.push({action:f,options:{throwOnError:o?.throwOnError}}),{filter:t=>h(r,t,{throwOnError:o?.throwOnError}),get:()=>w(r),files:()=>E(r),details:()=>O(r),dereference:t=>m(r,{...o??{},...t??{}}),toJson:()=>d(r),toYaml:()=>g(r)}}function m(o,t){return o.tasks.push({action:r,options:{throwOnError:t?.throwOnError}}),{get:()=>w(o),files:()=>E(o),filter:r=>h(o,r,{throwOnError:t?.throwOnError}),toJson:()=>d(o),toYaml:()=>g(o)}}function h(r,o,n){return r.tasks.push({action:t,options:o}),{get:()=>w(r),files:()=>E(r),details:()=>O(r),filter:()=>h(r,o,n),upgrade:()=>u(r,n),validate:o=>p(r,{throwOnError:o?.throwOnError??n?.throwOnError}),dereference:o=>m(r,{...n??{},...o??{}}),toJson:()=>d(r),toYaml:()=>g(r)}}async function w(r){const o=await c(r);return void 0===o.specification&&(o.specification=n(o.filesystem).specification),o}async function E(r){const{filesystem:o}=await c(r);return o}async function O(r){const{filesystem:t}=await c(r);return o(n(t).specification)}async function d(r){const{filesystem:o}=await c(r);return i(n(o).specification)}async function g(r){const{filesystem:o}=await c(r);return s(n(o).specification)}export{l as openapi};
@@ -1,7 +1,6 @@
1
- import { ErrorObject, AnyObject, Filesystem, FilesystemEntry } from '../types/index.js';
2
- import { OpenAPI } from '../types/openapi-types.js';
3
-
4
- type ResolveReferencesResult = {
1
+ import { OpenAPI } from '../types';
2
+ import type { AnyObject, ErrorObject, Filesystem, FilesystemEntry, ThrowOnErrorOption } from '../types';
3
+ export type ResolveReferencesResult = {
5
4
  valid: boolean;
6
5
  errors: ErrorObject[];
7
6
  schema: OpenAPI.Document;
@@ -9,6 +8,5 @@ type ResolveReferencesResult = {
9
8
  /**
10
9
  * Takes a specification and resolves all references.
11
10
  */
12
- declare function resolveReferences(input: AnyObject | Filesystem, file?: FilesystemEntry, errors?: ErrorObject[]): ResolveReferencesResult;
13
-
14
- export { type ResolveReferencesResult, resolveReferences };
11
+ export declare function resolveReferences(input: AnyObject | Filesystem, options?: ThrowOnErrorOption, file?: FilesystemEntry, errors?: ErrorObject[]): ResolveReferencesResult;
12
+ //# sourceMappingURL=resolveReferences.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveReferences.d.ts","sourceRoot":"","sources":["../../src/utils/resolveReferences.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,UAAU,EACV,eAAe,EACf,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAejB,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAA;CACzB,CAAA;AAOD;;GAEG;AACH,wBAAgB,iBAAiB,CAE/B,KAAK,EAAE,SAAS,GAAG,UAAU,EAE7B,OAAO,CAAC,EAAE,kBAAkB,EAE5B,IAAI,CAAC,EAAE,eAAe,EAEtB,MAAM,CAAC,EAAE,WAAW,EAAE,GACrB,uBAAuB,CA+FzB"}
@@ -0,0 +1 @@
1
+ import{ERRORS as e}from"../configuration/index.js";import{getEntrypoint as r}from"./getEntrypoint.js";import{getSegmentsFromPath as t}from"./getSegmentsFromPath.js";import{makeFilesystem as o}from"./makeFilesystem.js";function i(e,t,i,n){void 0===n&&(n=[]);const s=structuredClone(e),c=o(s),f=r(c);return a(i?.specification??f.specification,c,i??f),a(i?.specification??f.specification,c,i??f),{valid:0===(n=n.filter(((e,r,t)=>r===t.findIndex((r=>r.message===e.message&&r.code===e.code))))).length,errors:n,schema:(i??r(c)).specification};function a(e,r,o){let i;return Object.entries(e??{}).forEach((([s,c])=>{if(void 0!==e.$ref){const i=E(e.$ref,t,o,r,n);if(void 0===i)return;delete e.$ref,"object"==typeof i&&Object.keys(i).forEach((r=>{void 0===e[r]&&(e[r]=i[r])}))}"object"!=typeof c||function(e){try{return JSON.stringify(e),!1}catch(e){return!0}}(c)||(i=a(c,r,o))})),{errors:i?.errors??[]}}}function E(r,o,n,s,c){if("string"!=typeof r){if(o?.throwOnError)throw new Error(e.INVALID_REFERENCE.replace("%s",r));return void c.push({code:"INVALID_REFERENCE",message:e.INVALID_REFERENCE.replace("%s",r)})}const[f,a]=r.split("#",2);if(f){const r=s.find((e=>e.filename===f));if(!r){if(o?.throwOnError)throw new Error(e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",f));return void c.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",f)})}const t=i(s,o,r,c);return void 0===a?t.schema:E(`#${a}`,o,r,s,c)}const p=t(a);try{return p.reduce(((e,r)=>e[r]),n.specification)}catch(t){if(o?.throwOnError)throw new Error(e.INVALID_REFERENCE.replace("%s",r));c.push({code:"INVALID_REFERENCE",message:e.INVALID_REFERENCE.replace("%s",r)})}}export{i as resolveReferences};
@@ -1,5 +1,3 @@
1
- import { AnyObject } from '../types/index.js';
2
-
3
- declare const toJson: (value: AnyObject) => string;
4
-
5
- export { toJson };
1
+ import { AnyObject } from '../types';
2
+ export declare const toJson: (value: AnyObject) => string;
3
+ //# sourceMappingURL=toJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toJson.d.ts","sourceRoot":"","sources":["../../src/utils/toJson.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC,eAAO,MAAM,MAAM,UAAW,SAAS,WAAmC,CAAA"}
@@ -0,0 +1 @@
1
+ const n=n=>JSON.stringify(n,null,2);export{n as toJson};
@@ -1,5 +1,3 @@
1
- import { AnyObject } from '../types/index.js';
2
-
3
- declare const toYaml: (value: AnyObject) => string;
4
-
5
- export { toYaml };
1
+ import { AnyObject } from '../types';
2
+ export declare const toYaml: (value: AnyObject) => string;
3
+ //# sourceMappingURL=toYaml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toYaml.d.ts","sourceRoot":"","sources":["../../src/utils/toYaml.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC,eAAO,MAAM,MAAM,UAAW,SAAS,WAAqB,CAAA"}
@@ -0,0 +1 @@
1
+ import{stringify as o}from"yaml";const m=m=>o(m);export{m as toYaml};
@@ -1,8 +1,6 @@
1
- import { AnyObject } from '../types/index.js';
2
-
1
+ import type { AnyObject } from '../types';
3
2
  /**
4
3
  * Transforms ajv errors, finds the positions in the schema and returns an enriched format.
5
4
  */
6
- declare function transformErrors(specification: AnyObject, errors: any): any;
7
-
8
- export { transformErrors };
5
+ export declare function transformErrors(specification: AnyObject, errors: any): any;
6
+ //# sourceMappingURL=transformErrors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformErrors.d.ts","sourceRoot":"","sources":["../../src/utils/transformErrors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGzC;;GAEG;AACH,wBAAgB,eAAe,CAAC,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAkBpE"}
@@ -0,0 +1 @@
1
+ import{betterAjvErrors as e}from"./betterAjvErrors/index.js";function r(r,t){return"string"==typeof t?[{message:t}]:e(r,null,t,{indent:2}).map((e=>(e.message=e.message.trim(),e)))}export{r as transformErrors};
@@ -1,8 +1,6 @@
1
- import { AnyObject } from '../types/index.js';
2
-
1
+ import { AnyObject } from '../types';
3
2
  /**
4
3
  * Recursively traverses the specification and applies the transform function to each node.
5
4
  */
6
- declare function traverse(specification: AnyObject, transform: (specification: AnyObject) => AnyObject): AnyObject;
7
-
8
- export { traverse };
5
+ export declare function traverse(specification: AnyObject, transform: (specification: AnyObject) => AnyObject): AnyObject;
6
+ //# sourceMappingURL=traverse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traverse.d.ts","sourceRoot":"","sources":["../../src/utils/traverse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC;;GAEG;AACH,wBAAgB,QAAQ,CACtB,aAAa,EAAE,SAAS,EACxB,SAAS,EAAE,CAAC,aAAa,EAAE,SAAS,KAAK,SAAS,aAqBnD"}
@@ -0,0 +1 @@
1
+ function t(o,e){const r={};for(const[n,c]of Object.entries(o))Array.isArray(c)?r[n]=c.map((o=>"object"==typeof o&&null!==o?t(o,e):o)):r[n]="object"==typeof c&&null!==c?t(c,e):c;return e(r)}export{t as traverse};
@@ -4,6 +4,5 @@
4
4
  * Examples:
5
5
  * /foo~1bar~0baz -> /foo/bar~baz
6
6
  */
7
- declare function unescapeJsonPointer(uri: string): string;
8
-
9
- export { unescapeJsonPointer };
7
+ export declare function unescapeJsonPointer(uri: string): string;
8
+ //# sourceMappingURL=unescapeJsonPointer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unescapeJsonPointer.d.ts","sourceRoot":"","sources":["../../src/utils/unescapeJsonPointer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,UAE9C"}
@@ -0,0 +1 @@
1
+ function e(e){return decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))}export{e as unescapeJsonPointer};
@@ -1,8 +1,6 @@
1
- import { AnyObject, Filesystem, UpgradeResult } from '../types/index.js';
2
-
1
+ import type { AnyObject, Filesystem, UpgradeResult } from '../types';
3
2
  /**
4
3
  * Upgrade specification to OpenAPI 3.1.0
5
4
  */
6
- declare function upgrade(specification: AnyObject | Filesystem, _options?: AnyObject): UpgradeResult;
7
-
8
- export { upgrade };
5
+ export declare function upgrade(specification: AnyObject | Filesystem, _options?: AnyObject): UpgradeResult;
6
+ //# sourceMappingURL=upgrade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/utils/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAMpE;;GAEG;AACH,wBAAgB,OAAO,CACrB,aAAa,EAAE,SAAS,GAAG,UAAU,EACrC,QAAQ,CAAC,EAAE,SAAS,GACnB,aAAa,CAcf"}
@@ -0,0 +1 @@
1
+ import{getEntrypoint as r}from"./getEntrypoint.js";import{makeFilesystem as e}from"./makeFilesystem.js";import{upgradeFromThreeToThreeOne as o}from"./upgradeFromThreeToThreeOne.js";import{upgradeFromTwoToThree as i}from"./upgradeFromTwoToThree.js";function t(t,m){return{specification:[i,o].reduce(((r,e)=>e(r)),r(e(t)).specification),version:"3.1"}}export{t as upgrade};
@@ -1,10 +1,8 @@
1
- import { AnyObject } from '../types/index.js';
2
-
1
+ import { AnyObject } from '../types';
3
2
  /**
4
3
  * Upgrade from OpenAPI 3.0.x to 3.1.0
5
4
  *
6
5
  * https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0
7
6
  */
8
- declare function upgradeFromThreeToThreeOne(specification: AnyObject): AnyObject;
9
-
10
- export { upgradeFromThreeToThreeOne };
7
+ export declare function upgradeFromThreeToThreeOne(specification: AnyObject): AnyObject;
8
+ //# sourceMappingURL=upgradeFromThreeToThreeOne.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgradeFromThreeToThreeOne.d.ts","sourceRoot":"","sources":["../../src/utils/upgradeFromThreeToThreeOne.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGpC;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,SAAS,aAkGlE"}
@@ -0,0 +1 @@
1
+ import{traverse as e}from"./traverse.js";function t(t){return t.openapi?.startsWith("3.0")?(t.openapi="3.1.0",t=e(t,(e=>("undefined"!==e.type&&!0===e.nullable&&(e.type=["null",e.type],delete e.nullable),e))),t=e(t,(e=>(!0===e.exclusiveMinimum?(e.exclusiveMinimum=e.minimum,delete e.minimum):!1===e.exclusiveMinimum&&delete e.exclusiveMinimum,!0===e.exclusiveMaximum?(e.exclusiveMaximum=e.maximum,delete e.maximum):!1===e.exclusiveMaximum&&delete e.exclusiveMaximum,e))),t=e(t,(e=>(void 0!==e.example&&(e.examples={default:e.example},delete e.example),e))),t=e(t,(e=>{if("object"===e.type&&void 0!==e.properties){const t=Object.entries(e.properties);for(const[e,i]of t)"object"==typeof i&&"string"===i.type&&"binary"===i.format&&(i.contentEncoding="application/octet-stream",delete i.format)}return e})),t=e(t,(e=>{if("string"!==e.type||"binary"!==e.format)return e})),t=e(t,(e=>"string"===e.type&&"base64"===e.format?{type:"string",contentEncoding:"base64"}:e))):t}export{t as upgradeFromThreeToThreeOne};
@@ -1,10 +1,8 @@
1
- import { AnyObject } from '../types/index.js';
2
-
1
+ import { AnyObject } from '../types';
3
2
  /**
4
3
  * Upgrade Swagger 2.0 to OpenAPI 3.0
5
4
  *
6
5
  * https://swagger.io/blog/news/whats-new-in-openapi-3-0/
7
6
  */
8
- declare function upgradeFromTwoToThree(specification: AnyObject): AnyObject;
9
-
10
- export { upgradeFromTwoToThree };
7
+ export declare function upgradeFromTwoToThree(specification: AnyObject): AnyObject;
8
+ //# sourceMappingURL=upgradeFromTwoToThree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgradeFromTwoToThree.d.ts","sourceRoot":"","sources":["../../src/utils/upgradeFromTwoToThree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,SAAS,aAG7D"}
@@ -0,0 +1 @@
1
+ function n(n){return n}export{n as upgradeFromTwoToThree};
@@ -1,8 +1,6 @@
1
- import { AnyObject, Filesystem, ValidateResult } from '../types/index.js';
2
-
1
+ import type { AnyObject, Filesystem, ThrowOnErrorOption, ValidateResult } from '../types';
3
2
  /**
4
3
  * Validates an OpenAPI schema.
5
4
  */
6
- declare function validate(value: string | AnyObject | Filesystem): Promise<ValidateResult>;
7
-
8
- export { validate };
5
+ export declare function validate(value: string | AnyObject | Filesystem, options?: ThrowOnErrorOption): Promise<ValidateResult>;
6
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/utils/validate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EAEV,kBAAkB,EAClB,cAAc,EACf,MAAM,UAAU,CAAA;AAGjB;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,EACtC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,cAAc,CAAC,CAWzB"}
@@ -0,0 +1 @@
1
+ import{Validator as i}from"../lib/Validator/Validator.js";import{makeFilesystem as o}from"./makeFilesystem.js";async function t(t,a){const e=o(t),r=new i;return{...await r.validate(e,a),specification:r.specification,version:r.version}}export{t as validate};
@@ -0,0 +1,11 @@
1
+ import type { DereferenceResult, Filesystem, FilterResult, LoadResult, UpgradeResult, ValidateResult } from '../types';
2
+ import type { Queue } from './openapi.js';
3
+ type WorkThroughQueueResult = Partial<LoadResult & DereferenceResult & ValidateResult & UpgradeResult & FilterResult & {
4
+ filesystem: Filesystem;
5
+ }>;
6
+ /**
7
+ * Run through a queue of tasks
8
+ */
9
+ export declare function workThroughQueue(queue: Queue): Promise<WorkThroughQueueResult>;
10
+ export {};
11
+ //# sourceMappingURL=workThroughQueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workThroughQueue.d.ts","sourceRoot":"","sources":["../../src/utils/workThroughQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,cAAc,EACf,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAEtC,KAAK,sBAAsB,GAAG,OAAO,CACnC,UAAU,GACR,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,YAAY,GAAG;IACb,UAAU,EAAE,UAAU,CAAA;CACvB,CACJ,CAAA;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GACnD,OAAO,CAAC,sBAAsB,CAAC,CA4B9B"}
@@ -0,0 +1 @@
1
+ async function n(n){let t,o=n.specification;for(const{action:e,options:i}of n.tasks)"function"==typeof e?t="AsyncFunction"===e.constructor.name?{...t,...await e(t?.filesystem??o,i)}:{...t,...e(t?.filesystem??o,i)}:console.warn("[queue] The given action is not a function:",e);return t}export{n as workThroughQueue};
package/package.json CHANGED
@@ -12,27 +12,28 @@
12
12
  "author": "Scalar (https://github.com/scalar)",
13
13
  "homepage": "https://github.com/scalar/scalar",
14
14
  "bugs": "https://github.com/scalar/scalar/issues/new/choose",
15
- "version": "0.7.1",
15
+ "version": "0.7.2",
16
16
  "engines": {
17
17
  "node": ">=18"
18
18
  },
19
19
  "type": "module",
20
20
  "files": [
21
21
  "dist",
22
+ "!dist/webpack-stats.json",
22
23
  "CHANGELOG.md"
23
24
  ],
24
- "main": "./dist/src/index.js",
25
- "module": "./dist/src/index.js",
25
+ "main": "./dist/index.js",
26
+ "module": "./dist/index.js",
26
27
  "types": "./dist/index.d.ts",
27
28
  "exports": {
28
29
  ".": {
29
- "import": "./dist/src/index.js"
30
+ "import": "./dist/index.js"
30
31
  },
31
32
  "./plugins/fetch-urls": {
32
- "import": "./dist/src/utils/load/plugins/fetchUrls.js"
33
+ "import": "./dist/utils/load/plugins/fetchUrls.js"
33
34
  },
34
35
  "./plugins/read-files": {
35
- "import": "./dist/src/utils/load/plugins/readFiles.js"
36
+ "import": "./dist/utils/load/plugins/readFiles.js"
36
37
  }
37
38
  },
38
39
  "sideEffects": false,
@@ -44,28 +45,31 @@
44
45
  "devDependencies": {
45
46
  "@apidevtools/swagger-parser": "^10.1.0",
46
47
  "@rollup/plugin-json": "^6.1.0",
48
+ "@rollup/plugin-terser": "^0.4.4",
47
49
  "@rollup/plugin-typescript": "^11.1.6",
48
- "@types/node": "^20.14.0",
49
- "glob": "^10.4.1",
50
+ "@types/node": "^20.14.9",
51
+ "glob": "^10.4.2",
50
52
  "just-diff": "^6.0.2",
51
53
  "rollup": "^4.18.0",
52
- "rollup-plugin-dts": "^6.1.1",
53
- "rollup-plugin-esbuild": "^6.1.1",
54
- "rollup-plugin-webpack-stats": "^0.2.6",
54
+ "rollup-plugin-output-size": "^1.4.0",
55
+ "rollup-plugin-webpack-stats": "^1.0.1",
55
56
  "tinybench": "^2.8.0",
56
- "tslib": "^2.6.2"
57
+ "tsc-alias": "^1.8.10",
58
+ "tslib": "^2.6.3",
59
+ "typescript": "^5.5.3"
57
60
  },
58
61
  "dependencies": {
59
- "ajv": "^8.14.0",
62
+ "ajv": "^8.16.0",
60
63
  "ajv-draft-04": "^1.0.0",
61
64
  "ajv-formats": "^3.0.1",
62
65
  "jsonpointer": "^5.0.1",
63
66
  "leven": "^4.0.0",
64
- "yaml": "^2.4.2"
67
+ "yaml": "^2.4.5"
65
68
  },
66
69
  "scripts": {
67
70
  "types:check": "tsc --noEmit --skipLibCheck",
68
- "build": "pnpm types:check && rollup -c --configPlugin typescript",
71
+ "build": "pnpm types:check && rollup -c --configPlugin typescript && pnpm types:build",
72
+ "types:build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
69
73
  "test": "vitest"
70
74
  }
71
75
  }