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

@scalar/oas-utils

Package Overview
Dependencies
Maintainers
8
Versions
100
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.47 to 0.2.48

10

CHANGELOG.md
# @scalar/oas-utils
## 0.2.48
### Patch Changes
- dc20180: feat(api-client): custom icons for collections
- Updated dependencies [f961940]
- Updated dependencies [f961940]
- @scalar/types@0.0.11
- @scalar/themes@0.9.32
## 0.2.47

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

4

dist/entities/spec/collection.d.ts

@@ -263,2 +263,4 @@ import { z } from 'zod';

webhooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
/** A custom icon representing the collection */
'x-scalar-icon': z.ZodDefault<z.ZodOptional<z.ZodString>>;
}, {

@@ -369,2 +371,3 @@ uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;

security: Record<string, string[]>[];
'x-scalar-icon': string;
securitySchemes: string[];

@@ -456,2 +459,3 @@ selectedServerUid: string;

webhooks?: Record<string, unknown> | undefined;
'x-scalar-icon'?: string | undefined;
securitySchemes?: string[] | undefined;

@@ -458,0 +462,0 @@ selectedServerUid?: string | undefined;

18

dist/entities/spec/collection.js

@@ -7,4 +7,4 @@ import { oasSecurityRequirementSchema, securitySchemeExampleValueSchema } from './security.js';

const oasCollectionSchema = z.object({
type: z.literal('collection').optional().default('collection'),
openapi: z
'type': z.literal('collection').optional().default('collection'),
'openapi': z
.union([

@@ -18,4 +18,4 @@ z.string(),

.default('3.1.0'),
jsonSchemaDialect: z.string().optional(),
info: oasInfoSchema.optional(),
'jsonSchemaDialect': z.string().optional(),
'info': oasInfoSchema.optional(),
/**

@@ -28,8 +28,10 @@ * A declaration of which security mechanisms can be used across the API. The list of

*/
security: z.array(oasSecurityRequirementSchema).optional().default([]),
externalDocs: oasExternalDocumentationSchema.optional(),
'security': z.array(oasSecurityRequirementSchema).optional().default([]),
'externalDocs': oasExternalDocumentationSchema.optional(),
/** TODO: Type these */
components: z.record(z.string(), z.unknown()).optional(),
'components': z.record(z.string(), z.unknown()).optional(),
/** TODO: Type these */
webhooks: z.record(z.string(), z.unknown()).optional(),
'webhooks': z.record(z.string(), z.unknown()).optional(),
/** A custom icon representing the collection */
'x-scalar-icon': z.string().optional().default('interface-content-folder'),
// These properties will be stripped out and mapped back as id lists

@@ -36,0 +38,0 @@ // servers

@@ -65,2 +65,3 @@ import type { v_0_0_0 } from '../../migrations/v-0.0.0/types.generated';

children: string[];
'x-scalar-icon': string;
}[];

@@ -67,0 +68,0 @@ cookies: v_0_0_0.Cookie[];

@@ -106,15 +106,16 @@ import { parseLocalStorage } from '../local-storage.js';

return {
type: 'collection',
openapi: c.spec?.openapi || '3.1.0',
info: c.spec?.info || { title: 'OpenAPI Spec', version: '0.0.1' },
security: c.spec?.security || [],
externalDocs: c.spec?.externalDocs,
uid: c.uid,
'type': 'collection',
'openapi': c.spec?.openapi || '3.1.0',
'info': c.spec?.info || { title: 'OpenAPI Spec', version: '0.0.1' },
'security': c.spec?.security || [],
'externalDocs': c.spec?.externalDocs,
'uid': c.uid,
securitySchemes,
selectedServerUid: c.selectedServerUid || c.spec?.serverUids?.[0] || '',
servers: c.spec?.serverUids || [],
requests: [...requestUids],
tags: [...tagUids],
'selectedServerUid': c.selectedServerUid || c.spec?.serverUids?.[0] || '',
'servers': c.spec?.serverUids || [],
'requests': [...requestUids],
'tags': [...tagUids],
auth,
children: c.childUids || [],
'children': c.childUids || [],
'x-scalar-icon': 'interface-content-folder',
};

@@ -121,0 +122,0 @@ });

@@ -11,2 +11,3 @@ import { type Collection, type Request } from '../entities/spec/index.js';

security: Record<string, string[]>[];
'x-scalar-icon': string;
securitySchemes: string[];

@@ -13,0 +14,0 @@ selectedServerUid: string;

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

],
"version": "0.2.47",
"version": "0.2.48",
"engines": {

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

"@scalar/object-utils": "1.1.9",
"@scalar/themes": "0.9.31",
"@scalar/openapi-types": "0.1.1",
"@scalar/types": "0.0.10"
"@scalar/themes": "0.9.32",
"@scalar/types": "0.0.11"
},

@@ -109,4 +109,4 @@ "devDependencies": {

"@scalar/build-tooling": "0.1.10",
"@scalar/openapi-types": "0.1.1",
"@scalar/openapi-parser": "0.8.3"
"@scalar/openapi-parser": "0.8.4",
"@scalar/openapi-types": "0.1.1"
},

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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