Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@scalar/oas-utils

Package Overview
Dependencies
Maintainers
0
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scalar/oas-utils - npm Package Compare versions

Comparing version 0.2.41 to 0.2.42

10

CHANGELOG.md
# @scalar/oas-utils
## 0.2.42
### Patch Changes
- 5483fc3: fix: File is not defined
- Updated dependencies [a07cfc8]
- Updated dependencies [023ca15]
- Updated dependencies [85872b6]
- @scalar/types@0.0.7
## 0.2.41

@@ -4,0 +14,0 @@

2

dist/entities/workspace/spec/index.js
export { createRequest } from './requests.js';
export { createRequestExample, createRequestExampleParameter } from './request-examples.js';
export { blobSchema, createRequestExample, createRequestExampleParameter } from './request-examples.js';

@@ -5,2 +5,21 @@ import { deepMerge } from '@scalar/object-utils/merge';

// Define the Blob schema
const blobSchema = z.object({
size: z.number().nonnegative('Blob size must be a non-negative number').int(), // Size of the Blob
type: z.string(), // MIME type of the Blob
arrayBuffer: z.function().returns(z.promise(z.instanceof(ArrayBuffer))), // Returns a Promise of ArrayBuffer
slice: z
.function()
.args(z.number().optional(), z.number().optional(), z.string().optional())
.returns(z.any()), // Returns a Blob (any type for now)
stream: z.function().returns(z.instanceof((ReadableStream))), // Returns a ReadableStream of Uint8Array
text: z.function().returns(z.promise(z.string())), // Returns a Promise of string
});
const fileSchema = z
.object({
name: z.string(),
lastModified: z.number(),
webkitRelativePath: z.string(),
})
.extend(blobSchema.shape);
const requestExampleParametersSchema = z.object({

@@ -10,3 +29,3 @@ key: z.string().default(''),

enabled: z.boolean().default(true),
file: z.any().optional(),
file: fileSchema.optional(),
description: z.string().optional(),

@@ -58,3 +77,3 @@ /** Params are linked to parents such as path params and global headers/cookies */

.default({}),
binary: z.instanceof(File).optional(),
binary: fileSchema.optional(),
activeBody: z

@@ -80,2 +99,2 @@ .union([z.literal('raw'), z.literal('formData'), z.literal('binary')])

export { createRequestExample, createRequestExampleParameter };
export { blobSchema, createRequestExample, createRequestExampleParameter };

@@ -19,3 +19,3 @@ {

],
"version": "0.2.41",
"version": "0.2.42",
"engines": {

@@ -93,5 +93,5 @@ "node": ">=18"

"zod": "^3.22.4",
"@scalar/object-utils": "1.1.7",
"@scalar/themes": "0.9.28",
"@scalar/types": "0.0.6"
"@scalar/types": "0.0.7",
"@scalar/object-utils": "1.1.7"
},

@@ -103,5 +103,5 @@ "devDependencies": {

"vitest": "^1.6.0",
"@scalar/openapi-types": "0.1.0",
"@scalar/build-tooling": "0.1.10",
"@scalar/openapi-parser": "0.8.1",
"@scalar/openapi-types": "0.1.0"
"@scalar/openapi-parser": "0.8.1"
},

@@ -108,0 +108,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc