Skip to content

Commit

Permalink
fix: fix next args
Browse files Browse the repository at this point in the history
  • Loading branch information
longgui.wjb committed Apr 25, 2022
1 parent 3b376c7 commit dc91595
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/middleware-version/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import semver from "semver";
import type { Handler } from "@dawnjs/types";
import type { IOpts } from "./types";

const handler: Handler<IOpts, { version: string }> = opts => {
const handler: Handler<IOpts, string> = opts => {
return async (next, ctx) => {
const envOpts = JSON.parse(decodeURIComponent(process.env.DN_ARGV || "{}"));
const versionEnv = envOpts.version || {};
Expand Down Expand Up @@ -90,7 +90,7 @@ const handler: Handler<IOpts, { version: string }> = opts => {
ctx.version = ctx.project.version;
ctx.console.warn("版本已更新为:", ctx.project.version);

next({ version: ctx.project.version });
next(ctx.project.version);
};
};

Expand Down

0 comments on commit dc91595

Please sign in to comment.