New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More ā†’
Socket
Sign inDemoInstall
Socket

express-zod-api

Package Overview
Dependencies
Maintainers
1
Versions
432
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-zod-api - npm Package Versions

13
ā€¦
44

21.11.3

Diff

robintail
published 20.22.2 ā€¢

robintail
published 22.4.1 ā€¢

Changelog

Source

v22.4.1

  • Fixed a bug that could lead to duplicate properties in generated client types:
    • If the middleware and/or endpoint schemas had the same property, it was duplicated by Integration.
    • The issue was introduced in v20.15.3 and reported by @bobgubko.
// reproduction
factory
  .addMiddleware({
    input: z.object({ query: z.string() }), // ...
  })
  .build({
    input: z.object({ query: z.string() }), // ...
  });
type Before = {
  query: string;
  query: string; // <ā€” bug #2352
};
type After = {
  query: string;
};
robintail
published 22.4.0 ā€¢

Changelog

Source

v22.4.0

  • Feat: ability to supply extra data to a custom implementation of the generated client:
    • You can instantiate the client class with an implementation accepting an optional context of your choice;
    • The public .provide() method can now accept an additional argument having the type of that context;
    • The problem on missing such ability was reported by @LucWag.
import { Client, Implementation } from "./generated-client.ts";

interface MyCtx {
  extraKey: string;
}

const implementation: Implementation<MyCtx> = async (
  method,
  path,
  params,
  ctx, // ctx is optional MyCtx
) => {};

const client = new Client(implementation);

client.provide("get /v1/user/retrieve", { id: "10" }, { extraKey: "123456" });
robintail
published 22.3.1 ā€¢

Changelog

Source

v22.3.1

  • Fixed issue on emitting server-sent events (SSE), introduced in v21.5.0:
    • Emitting SSE failed due to internal error flush is not a function having compression disabled in config;
    • The .flush() method of response is a feature of compression (optional peer dependency);
    • It is required to call the method when compression is enabled;
    • This version fixes the issue by calling the method conditionally;
    • This bug was reported by @bobgubko.
robintail
published 21.11.2 ā€¢

robintail
published 22.3.0 ā€¢

Changelog

Source

v22.3.0

  • Feat: Subscription class for consuming Server-sent events:
    • The Integration can now also generate a frontend helper class Subscription to ease SSE support;
    • The new class establishes an EventSource instance and exposes it as the public source property;
    • The class also provides the public on method for your typed listeners;
    • You can configure the generated class name using subscriptionClassName option (default: Subscription);
    • The feature is only applicable to the variant option set to client (default).
import { Subscription } from "./client.ts"; // the generated file

new Subscription("get /v1/events/stream", {}).on("time", (time) => {});
robintail
published 22.2.0 ā€¢

Changelog

Source

v22.2.0

  • Feat: detecting headers from Middleware::security declarations:
    • When headers are enabled within inputSources of config, the Documentation generator can now identify them among other inputs additionally by using the security declarations of middlewares attached to an Endpoint;
    • This approach enables handling of custom headers without x- prefix.
const authMiddleware = new Middleware({
  security: { type: "header", name: "token" },
});
robintail
published 22.1.1 ā€¢

Changelog

Source

v22.1.1

  • This version contains an important technical simplification of routines related to processing of security declarations of the used Middleware when generating API Documentation.
    • No changes to the operation are expected. This refactoring is required for a feature that will be released later.
robintail
published 22.1.0 ā€¢

Changelog

Source

v22.1.0

  • Feat: ability to configure the generated client class name:
    • New option clientClassName for Integration::constructor() argument, default: Client.
  • Feat: default implementation for the generated client:
    • The argument of the generated client class constructor became optional;
    • The Implementation previously suggested as an example (using fetch) became the one used by default;
    • You may no longer need to write the implementation if the default one suits your needs.
import { Integration } from "express-zod-api";
new Integration({ clientClassName: "FancyClient" });
import { FancyClient } from "./generated-client.ts";
const client = new FancyClient(/* optional implementation */);
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