@scalar/oas-utils 0.2.55 → 0.2.57

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @scalar/oas-utils
2
2
 
3
+ ## 0.2.57
4
+
5
+ ### Patch Changes
6
+
7
+ - 4738228: feat: make collection.info.version optional
8
+ - Updated dependencies [dbbe38f]
9
+ - Updated dependencies [4b8b611]
10
+ - @scalar/types@0.0.16
11
+ - @scalar/themes@0.9.38
12
+
13
+ ## 0.2.56
14
+
15
+ ### Patch Changes
16
+
17
+ - b8f9a95: feat: lower syntax highlighting response threshold
18
+ - Updated dependencies [8759e7f]
19
+ - @scalar/openapi-types@0.1.3
20
+ - @scalar/types@0.0.15
21
+ - @scalar/themes@0.9.37
22
+
3
23
  ## 0.2.55
4
24
 
5
25
  ### Patch Changes
@@ -204,7 +204,7 @@ export declare const collectionSchema: z.ZodObject<z.objectUtil.extendShape<{
204
204
  identifier?: string | undefined;
205
205
  url?: string | undefined;
206
206
  }>>;
207
- version: z.ZodDefault<z.ZodString>;
207
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
208
208
  }, "strip", z.ZodTypeAny, {
209
209
  title: string;
210
210
  version: string;
@@ -3,7 +3,7 @@ import type { RequestExample } from './request-examples.js';
3
3
  export declare const requestMethods: readonly ["connect", "delete", "get", "head", "options", "patch", "post", "put", "trace"];
4
4
  export type RequestMethod = (typeof requestMethods)[number];
5
5
  /** A single set of populated values for a sent request */
6
- export type ResponseInstance<ResponseDataType = unknown> = Omit<Response, 'headers'> & {
6
+ export type ResponseInstance = Omit<Response, 'headers'> & {
7
7
  /** Store headers as an object to match what we had with axios */
8
8
  headers: Record<string, string>;
9
9
  /** Keys of headers which set cookies */
@@ -11,7 +11,9 @@ export type ResponseInstance<ResponseDataType = unknown> = Omit<Response, 'heade
11
11
  /** Time in ms the request took */
12
12
  duration: number;
13
13
  /** The response data */
14
- data: ResponseDataType;
14
+ data: string | Blob;
15
+ /** The response size in bytes */
16
+ size: number;
15
17
  /** The response status */
16
18
  status: number;
17
19
  /** The response method */
@@ -1 +1 @@
1
- {"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/requests.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAIxD,eAAO,MAAM,cAAc,2FAUjB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,CAAC,gBAAgB,GAAG,OAAO,IAAI,IAAI,CAC7D,QAAQ,EACR,SAAS,CACV,GAAG;IACF,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,wBAAwB;IACxB,IAAI,EAAE,gBAAgB,CAAA;IACtB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,0BAA0B;IAC1B,MAAM,EAAE,aAAa,CAAA;IACrB,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,cAAc,CAAA;IACvB,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAMD,2CAA2C;AAC3C,eAAO,MAAM,gBAAgB;IAC3B;;;;;OAKG;;IAEH,kDAAkD;;IAElD,mHAAmH;;IAEnH;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH;;;;;OAKG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;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a,CAAC,CAAA;AACnD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
@@ -102,7 +102,7 @@ export declare const oasInfoSchema: z.ZodObject<{
102
102
  * REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI
103
103
  * Specification version or the API implementation version).
104
104
  */
105
- version: z.ZodDefault<z.ZodString>;
105
+ version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
106
106
  }, "strip", z.ZodTypeAny, {
107
107
  title: string;
108
108
  version: string;
@@ -55,7 +55,7 @@ const oasInfoSchema = z.object({
55
55
  * REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI
56
56
  * Specification version or the API implementation version).
57
57
  */
58
- version: z.string().default('0.0.1'),
58
+ version: z.string().optional().default('1.0'),
59
59
  });
60
60
  /**
61
61
  * External Documentation
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "specification",
17
17
  "yaml"
18
18
  ],
19
- "version": "0.2.55",
19
+ "version": "0.2.57",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -107,9 +107,9 @@
107
107
  "yaml": "^2.4.5",
108
108
  "zod": "^3.23.8",
109
109
  "@scalar/object-utils": "1.1.10",
110
- "@scalar/openapi-types": "0.1.2",
111
- "@scalar/themes": "0.9.36",
112
- "@scalar/types": "0.0.14"
110
+ "@scalar/openapi-types": "0.1.3",
111
+ "@scalar/themes": "0.9.38",
112
+ "@scalar/types": "0.0.16"
113
113
  },
114
114
  "devDependencies": {
115
115
  "rollup": "^4.16.4",
@@ -118,8 +118,8 @@
118
118
  "vitest": "^1.6.0",
119
119
  "zod-to-ts": "^1.2.0",
120
120
  "@scalar/build-tooling": "0.1.11",
121
- "@scalar/openapi-types": "0.1.2",
122
- "@scalar/openapi-parser": "0.8.6"
121
+ "@scalar/openapi-parser": "0.8.7",
122
+ "@scalar/openapi-types": "0.1.3"
123
123
  },
124
124
  "scripts": {
125
125
  "build": "scalar-build-rollup",