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
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.68 to 0.2.69

7

CHANGELOG.md
# @scalar/oas-utils
## 0.2.69
### Patch Changes
- 8c5d767: feat: add support for PKCE auth code flow
- 359ee2d: fix: updates path regex
## 0.2.68

@@ -4,0 +11,0 @@

2

dist/entities/spec/index.js

@@ -7,2 +7,2 @@ export { collectionSchema, extendedCollectionSchema } from './collection.js';

export { oasParameterSchema, parameterStyleSchema, parameterTypeSchema } from './parameters.js';
export { authExampleFromSchema, oasOauthFlowSchema, oasSecurityRequirementSchema, oasSecuritySchemeSchema, securityApiKeySchema, securityHttpSchema, securityOauthSchema, securityOpenIdSchema, securitySchemeApiKeyIn, securitySchemeExampleValueSchema, securitySchemeSchema } from './security.js';
export { authExampleFromSchema, oasOauthFlowSchema, oasSecurityRequirementSchema, oasSecuritySchemeSchema, pkceOptions, securityApiKeySchema, securityHttpSchema, securityOauthSchema, securityOpenIdSchema, securitySchemeApiKeyIn, securitySchemeExampleValueSchema, securitySchemeSchema } from './security.js';

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

export type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>;
/** Options for the x-usePkce extension */
export declare const pkceOptions: readonly ["SHA-256", "plain", "no"];
export declare const oasOauthFlowSchema: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{

@@ -287,2 +289,8 @@ /**

authorizationUrl: z.ZodDefault<z.ZodString>;
/**
* Whether to use PKCE for the authorization code flow.
*
* TODO: add docs
*/
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;

@@ -298,2 +306,3 @@ tokenUrl: z.ZodDefault<z.ZodString>;

tokenUrl: string;
'x-usePkce': "SHA-256" | "plain" | "no";
}, {

@@ -307,2 +316,3 @@ type: "authorizationCode";

tokenUrl?: string | undefined;
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
}>]>>>;

@@ -413,2 +423,8 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{

authorizationUrl: z.ZodDefault<z.ZodString>;
/**
* Whether to use PKCE for the authorization code flow.
*
* TODO: add docs
*/
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;

@@ -424,2 +440,3 @@ tokenUrl: z.ZodDefault<z.ZodString>;

tokenUrl: string;
'x-usePkce': "SHA-256" | "plain" | "no";
}, {

@@ -433,2 +450,3 @@ type: "authorizationCode";

tokenUrl?: string | undefined;
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
}>]>>>;

@@ -472,2 +490,3 @@ /** Extension to save the client Id associated with an oauth flow */

tokenUrl: string;
'x-usePkce': "SHA-256" | "plain" | "no";
};

@@ -508,2 +527,3 @@ 'x-scalar-client-id': string;

tokenUrl?: string | undefined;
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
} | undefined;

@@ -672,2 +692,8 @@ 'x-scalar-client-id'?: string | undefined;

authorizationUrl: z.ZodDefault<z.ZodString>;
/**
* Whether to use PKCE for the authorization code flow.
*
* TODO: add docs
*/
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;

@@ -683,2 +709,3 @@ tokenUrl: z.ZodDefault<z.ZodString>;

tokenUrl: string;
'x-usePkce': "SHA-256" | "plain" | "no";
}, {

@@ -692,2 +719,3 @@ type: "authorizationCode";

tokenUrl?: string | undefined;
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
}>]>>>;

@@ -725,2 +753,3 @@ /** Extension to save the client Id associated with an oauth flow */

tokenUrl: string;
'x-usePkce': "SHA-256" | "plain" | "no";
};

@@ -759,2 +788,3 @@ 'x-scalar-client-id': string;

tokenUrl?: string | undefined;
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
} | undefined;

@@ -969,2 +999,8 @@ 'x-scalar-client-id'?: string | undefined;

authorizationUrl: z.ZodDefault<z.ZodString>;
/**
* Whether to use PKCE for the authorization code flow.
*
* TODO: add docs
*/
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;

@@ -980,2 +1016,3 @@ tokenUrl: z.ZodDefault<z.ZodString>;

tokenUrl: string;
'x-usePkce': "SHA-256" | "plain" | "no";
}, {

@@ -989,2 +1026,3 @@ type: "authorizationCode";

tokenUrl?: string | undefined;
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
}>]>>>;

@@ -1028,2 +1066,3 @@ /** Extension to save the client Id associated with an oauth flow */

tokenUrl: string;
'x-usePkce': "SHA-256" | "plain" | "no";
};

@@ -1064,2 +1103,3 @@ 'x-scalar-client-id': string;

tokenUrl?: string | undefined;
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
} | undefined;

@@ -1066,0 +1106,0 @@ 'x-scalar-client-id'?: string | undefined;

@@ -176,2 +176,4 @@ import { schemaModel } from '../../helpers/schema-model.js';

: '';
/** Options for the x-usePkce extension */
const pkceOptions = ['SHA-256', 'plain', 'no'];
const oasOauthFlowSchema = z

@@ -202,2 +204,8 @@ .discriminatedUnion('type', [

authorizationUrl,
/**
* Whether to use PKCE for the authorization code flow.
*
* TODO: add docs
*/
'x-usePkce': z.enum(pkceOptions).optional().default('no'),
'x-scalar-redirect-uri': z

@@ -248,2 +256,2 @@ .string()

export { authExampleFromSchema, oasOauthFlowSchema, oasSecurityRequirementSchema, oasSecuritySchemeSchema, securityApiKeySchema, securityHttpSchema, securityOauthSchema, securityOpenIdSchema, securitySchemeApiKeyIn, securitySchemeExampleValueSchema, securitySchemeSchema };
export { authExampleFromSchema, oasOauthFlowSchema, oasSecurityRequirementSchema, oasSecuritySchemeSchema, pkceOptions, securityApiKeySchema, securityHttpSchema, securityOauthSchema, securityOpenIdSchema, securitySchemeApiKeyIn, securitySchemeExampleValueSchema, securitySchemeSchema };
const variableRegex = /{{((?:[^{}]|{[^{}]*})*)}}/g;
const pathRegex = /(?<!{){([^{}]+)}(?!})/g;
const pathRegex = /(?:{)([^{}]+)}(?!})/g;
export { pathRegex, variableRegex };

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

tokenUrl: string;
'x-usePkce': "SHA-256" | "plain" | "no";
};

@@ -269,0 +270,0 @@ uid: string;

@@ -188,2 +188,3 @@ import { parseLocalStorage } from '../local-storage.js';

...base,
'x-usePkce': 'no',
'x-scalar-redirect-uri': ('redirectUri' in flow ? flow.redirectUri : '') || '',

@@ -190,0 +191,0 @@ 'authorizationUrl': flow.authorizationUrl || '',

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

],
"version": "0.2.68",
"version": "0.2.69",
"engines": {

@@ -112,4 +112,4 @@ "node": ">=18"

"@scalar/themes": "0.9.45",
"@scalar/openapi-types": "0.1.4",
"@scalar/types": "0.0.18"
"@scalar/types": "0.0.18",
"@scalar/openapi-types": "0.1.4"
},

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

"zod-to-ts": "^1.2.0",
"@scalar/build-tooling": "0.1.11",
"@scalar/openapi-parser": "0.8.8",
"@scalar/openapi-types": "0.1.4",
"@scalar/openapi-parser": "0.8.8"
"@scalar/build-tooling": "0.1.11"
},

@@ -126,0 +126,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