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
0
Versions
428
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-zod-api - npm Package Versions

1
4143

1.0.0

Diff

Changelog

Source

v1.0.0

  • First version based on the stable Zod release.
  • Zod version is v3.0.2.
  • Other dependencies has been upgraded to the latest versions as well.

Version 0

robintail
published 0.7.2 •

Changelog

Source

v0.7.2

  • Readme file updates:
    • Transformations
    • ResultHandler
    • better examples
robintail
published 0.7.1 •

Changelog

Source

v0.7.1

  • Readme file updates:
    • Concept description update.
    • Excess property check according to the new features of version 0.7.0.
  • Refactoring of defaultResultHandler and ResultHandler calls in server.ts.
robintail
published 0.7.0 •

Changelog

Source

v0.7.0

  • Zod version is v3.0.0-beta.1.
  • Ability to use z.ZodIntersection and z.ZodUnion as an I/O schema for handlers and middlewares.
// example
const middleware = createMiddleware({
  input: z
    .object({
      one: z.string(),
    })
    .or(
      z.object({
        two: z.number(),
      }),
    ),
  middleware: async ({ input }) => ({
    input, // => type: { one: string } | { two: number }
  }),
});
  • Ability to use z.transform() in handler's output schema.
// example
const endpoint = factory.build({
  methods: ["post"],
  input: z.object({}),
  output: z.object({
    value: z.string().transform((str) => str.length),
  }),
  handler: async ({ input, options }) => ({
    value: "test", // => in response: { value: 4 }
  }),
});
  • Supplying parameters to EndpointsFactory::constructor() is now prohibited. Please use .addMiddleware() and .setResultHandler() as the right way in order to achieve the correct input schema type in handlers.
robintail
published 0.6.1 •

Changelog

Source

v0.6.1

  • Nothing special. Just new logo and the dataflow diagram update.
robintail
published 0.6.0 •

Changelog

Source

v0.6.0

  • OpenAPI / Swagger specification generator now supports ZodNullable, ZodOptional, ZodUnion and ZodIntersection properties.
robintail
published 0.5.0 •

Changelog

Source

v0.5.0

  • ConfigType changes:
// before
export interface ConfigType {
  server: {
    listen: number | string;
    cors: boolean;
    jsonParser?: NextHandleFunction;
    resultHandler?: ResultHandler;
  };
  logger: LoggerConfig | winston.Logger;
}

// after
export type ConfigType = (
  | {
      server: {
        // server configuration
        listen: number | string; // preserved
        jsonParser?: NextHandleFunction; // preserved
      };
    }
  | {
      // or your custom express app
      app: Express;
    }
) & {
  cors: boolean; // moved
  resultHandler?: ResultHandler; // moved
  logger: LoggerConfig | Logger;
};
  • More convenient way to attach routing to your custom express app:
// before
initRouting({ app, logger, config, routing });
// after
const config: ConfigType = { app /* ..., */ };
attachRouting(config, routing);
robintail
published 0.4.1 •

Changelog

Source

v0.4.1

  • Minor Readme file fixes and clarifications.
  • Nice dataflow diagram.
robintail
published 0.4.0 •

Changelog

Source

v0.4.0

  • Ability to specify your custom Winston logger in config.
  • createLogger() now accepts LoggerConfig as an argument:
// before
createLogger(config);
// after
createLogger(config.logger);
robintail
published 0.3.1 •

Changelog

Source

v0.3.1

  • Minor Readme file fixes and clarifications.
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