@scalar/oas-utils 0.2.91 → 0.2.92
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
|
@@ -24,6 +24,6 @@ export declare const getHttpMethodInfo: (methodName: string) => {
|
|
|
24
24
|
backgroundColor: string;
|
|
25
25
|
};
|
|
26
26
|
/** Type guard which takes in a string and returns true if it is in fact an HTTPMethod */
|
|
27
|
-
export declare const isHttpMethod: (method
|
|
27
|
+
export declare const isHttpMethod: (method?: string | undefined) => method is RequestMethod;
|
|
28
28
|
export {};
|
|
29
29
|
//# sourceMappingURL=httpMethods.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpMethods.d.ts","sourceRoot":"","sources":["../../src/helpers/httpMethods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,0BAA0B,CAAA;AAE7E;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE;KAC3B,CAAC,IAAI,aAAa,GAAG;QACpB,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,eAAe,EAAE,MAAM,CAAA;KACxB;CA+CO,CAAA;AAEV,yCAAyC;AACzC,QAAA,MAAM,YAAY,6CAA8C,CAAA;AAChE,KAAK,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/C,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB,WACpB,aAAa,KACpB,MAAM,IAAI,UAAyD,CAAA;AAEtE;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAAgB,MAAM;WAhEzC,MAAM;WACN,MAAM;qBACI,MAAM;CAuE1B,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"httpMethods.d.ts","sourceRoot":"","sources":["../../src/helpers/httpMethods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,0BAA0B,CAAA;AAE7E;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE;KAC3B,CAAC,IAAI,aAAa,GAAG;QACpB,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,eAAe,EAAE,MAAM,CAAA;KACxB;CA+CO,CAAA;AAEV,yCAAyC;AACzC,QAAA,MAAM,YAAY,6CAA8C,CAAA;AAChE,KAAK,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/C,0DAA0D;AAC1D,eAAO,MAAM,iBAAiB,WACpB,aAAa,KACpB,MAAM,IAAI,UAAyD,CAAA;AAEtE;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAAgB,MAAM;WAhEzC,MAAM;WACN,MAAM;qBACI,MAAM;CAuE1B,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,YAAY,YACd,MAAM,GAAG,SAAS,KAC1B,MAAM,IAAI,aACsD,CAAA"}
|
|
@@ -67,6 +67,6 @@ const getHttpMethodInfo = (methodName) => {
|
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
69
|
/** Type guard which takes in a string and returns true if it is in fact an HTTPMethod */
|
|
70
|
-
const isHttpMethod = (method) => requestMethods.includes(method);
|
|
70
|
+
const isHttpMethod = (method) => method ? requestMethods.includes(method) : false;
|
|
71
71
|
|
|
72
72
|
export { REQUEST_METHODS, canMethodHaveBody, getHttpMethodInfo, isHttpMethod };
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"specification",
|
|
17
17
|
"yaml"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.2.
|
|
19
|
+
"version": "0.2.92",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
@@ -117,8 +117,8 @@
|
|
|
117
117
|
"yaml": "^2.4.5",
|
|
118
118
|
"zod": "^3.23.8",
|
|
119
119
|
"@scalar/object-utils": "1.1.12",
|
|
120
|
-
"@scalar/themes": "0.9.58",
|
|
121
120
|
"@scalar/openapi-types": "0.1.5",
|
|
121
|
+
"@scalar/themes": "0.9.58",
|
|
122
122
|
"@scalar/types": "0.0.25"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
@@ -126,8 +126,8 @@
|
|
|
126
126
|
"vite": "^5.4.10",
|
|
127
127
|
"vitest": "^1.6.0",
|
|
128
128
|
"zod-to-ts": "github:amritk/zod-to-ts#build",
|
|
129
|
+
"@scalar/openapi-parser": "0.10.2",
|
|
129
130
|
"@scalar/build-tooling": "0.1.12",
|
|
130
|
-
"@scalar/openapi-parser": "0.10.1",
|
|
131
131
|
"@scalar/openapi-types": "0.1.5"
|
|
132
132
|
},
|
|
133
133
|
"scripts": {
|