express-zod-api 11.1.0 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +4 -4
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +14 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## Version 11
|
|
4
4
|
|
|
5
|
+
### v11.1.1
|
|
6
|
+
|
|
7
|
+
- Technical update, no new features.
|
|
8
|
+
- `@tsconfig/node16` base version is 16.1.0.
|
|
9
|
+
- Using `node:` prefix for importing builtin modules.
|
|
10
|
+
- `typescript` v5.1.6, `esbuild` v0.18.10 and `rollup` v3.25.3.
|
|
11
|
+
|
|
5
12
|
### v11.1.0
|
|
6
13
|
|
|
7
14
|
- Sourcemaps are removed from the distribution.
|
package/README.md
CHANGED
|
@@ -708,11 +708,11 @@ The documentation on these arguments you may find [here](http://expressjs.com/en
|
|
|
708
708
|
|
|
709
709
|
```typescript
|
|
710
710
|
import { Routing, ServeStatic } from "express-zod-api";
|
|
711
|
-
import
|
|
711
|
+
import { join } from "node:path";
|
|
712
712
|
|
|
713
713
|
const routing: Routing = {
|
|
714
714
|
// path /public serves static files from ./assets
|
|
715
|
-
public: new ServeStatic(
|
|
715
|
+
public: new ServeStatic(join(__dirname, "assets"), {
|
|
716
716
|
dotfiles: "deny",
|
|
717
717
|
index: false,
|
|
718
718
|
redirect: false,
|
|
@@ -808,10 +808,10 @@ Consuming the generated client requires Typescript version 4.1 or higher.
|
|
|
808
808
|
|
|
809
809
|
```typescript
|
|
810
810
|
// example client-generator.ts
|
|
811
|
-
import
|
|
811
|
+
import { writeFileSync } from "node:fs";
|
|
812
812
|
import { Integration } from "express-zod-api";
|
|
813
813
|
|
|
814
|
-
|
|
814
|
+
writeFileSync(
|
|
815
815
|
"./frontend/client.ts",
|
|
816
816
|
new Integration({
|
|
817
817
|
routing,
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import compression from 'compression';
|
|
|
2
2
|
import { NextHandleFunction } from 'connect';
|
|
3
3
|
import express, { Request, Response, Express } from 'express';
|
|
4
4
|
import fileUpload, { UploadedFile } from 'express-fileupload';
|
|
5
|
-
import https, { ServerOptions } from 'https';
|
|
5
|
+
import https, { ServerOptions } from 'node:https';
|
|
6
6
|
import winston, { Logger } from 'winston';
|
|
7
7
|
import { z, ZodTypeDef, ZodType, ParseInput, ParseReturnType, ZodError } from 'zod';
|
|
8
8
|
import { HttpError } from 'http-errors';
|
package/dist/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"11.1.
|
|
1
|
+
{"type":"module","version":"11.1.1"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import compression from 'compression';
|
|
|
2
2
|
import { NextHandleFunction } from 'connect';
|
|
3
3
|
import express, { Request, Response, Express } from 'express';
|
|
4
4
|
import fileUpload, { UploadedFile } from 'express-fileupload';
|
|
5
|
-
import https, { ServerOptions } from 'https';
|
|
5
|
+
import https, { ServerOptions } from 'node:https';
|
|
6
6
|
import winston, { Logger } from 'winston';
|
|
7
7
|
import { z, ZodTypeDef, ZodType, ParseInput, ParseReturnType, ZodError } from 'zod';
|
|
8
8
|
import { HttpError } from 'http-errors';
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-zod-api",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"description": "A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "ts-node example/index.ts",
|
|
8
|
-
"build": "yarn build:compile && yarn build:
|
|
9
|
-
"build:compile": "tsup",
|
|
10
|
-
"build:
|
|
8
|
+
"build": "yarn build:compile && yarn build:tests && yarn build:assets",
|
|
9
|
+
"build:compile": "tsup && mv dist/index.d.mts dist/esm/index.d.ts",
|
|
10
|
+
"build:tests": "yarn build:intTest && yarn build:esmTest",
|
|
11
|
+
"build:intTest": "ts-node tools/integration-test.ts && yarn install --cwd ./tests/integration && ts-node tools/int-test-package.ts",
|
|
12
|
+
"build:esmTest": "ts-node tools/esm-test.ts && yarn install --cwd ./tests/esm && ts-node tools/esm-test-package.ts",
|
|
13
|
+
"build:assets": "yarn build:swagger && yarn build:client && yarn build:license",
|
|
11
14
|
"build:swagger": "ts-node example/generate-open-api-schema.ts > example/example.swagger.yaml",
|
|
12
15
|
"build:client": "ts-node example/generate-client.ts > example/example.client.ts && yarn prettier example/example.client.ts --write",
|
|
13
16
|
"build:license": "ts-node tools/license.ts > ./LICENSE",
|
|
14
|
-
"build:intTest": "ts-node tools/integration-test.ts && yarn install --cwd ./tests/integration && ts-node tools/int-test-package.ts",
|
|
15
|
-
"build:esmTest": "ts-node tools/esm-test.ts && yarn install --cwd ./tests/esm && ts-node tools/esm-test-package.ts",
|
|
16
17
|
"test": "yarn test:types && yarn test:jest && yarn test:badge",
|
|
17
18
|
"test:int": "jest ./tests/integration",
|
|
18
19
|
"test:esm": "jest ./tests/esm",
|
|
@@ -20,10 +21,10 @@
|
|
|
20
21
|
"test:types": "tsc --noEmit",
|
|
21
22
|
"test:jest": "jest --detectOpenHandles ./tests/unit ./tests/system",
|
|
22
23
|
"test:badge": "make-coverage-badge --output-path ./coverage.svg",
|
|
23
|
-
"lint": "eslint
|
|
24
|
+
"lint": "eslint src example tests tools && yarn prettier *.md --check",
|
|
24
25
|
"mdfix": "prettier *.md --write",
|
|
25
|
-
"precommit": "yarn
|
|
26
|
-
"prepublishOnly": "yarn
|
|
26
|
+
"precommit": "yarn build && yarn lint && yarn test && git add example/example.swagger.yaml example/example.client.ts ./LICENSE ./coverage.svg",
|
|
27
|
+
"prepublishOnly": "yarn build && yarn lint && yarn test",
|
|
27
28
|
"postversion": "git push && git push --tags",
|
|
28
29
|
"install_hooks": "husky install"
|
|
29
30
|
},
|
|
@@ -81,13 +82,13 @@
|
|
|
81
82
|
"devDependencies": {
|
|
82
83
|
"@swc/core": "^1.3.39",
|
|
83
84
|
"@swc/jest": "^0.2.24",
|
|
84
|
-
"@tsconfig/node16": "^1.0
|
|
85
|
+
"@tsconfig/node16": "^16.1.0",
|
|
85
86
|
"@types/cors": "^2.8.12",
|
|
86
87
|
"@types/express": "^4.17.13",
|
|
87
88
|
"@types/has-ansi": "^5.0.0",
|
|
88
89
|
"@types/jest": "^29.0.0",
|
|
89
90
|
"@types/mime": "^3.0.1",
|
|
90
|
-
"@types/node-fetch": "^2.6.
|
|
91
|
+
"@types/node-fetch": "^2.6.4",
|
|
91
92
|
"@types/ramda": "^0.29.0",
|
|
92
93
|
"@types/triple-beam": "^1.3.2",
|
|
93
94
|
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
|
@@ -99,6 +100,7 @@
|
|
|
99
100
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
100
101
|
"eslint-config-prettier": "^8.5.0",
|
|
101
102
|
"eslint-plugin-import": "^2.26.0",
|
|
103
|
+
"eslint-plugin-local-rules": "^1.3.2",
|
|
102
104
|
"eslint-plugin-prettier": "^4.2.1",
|
|
103
105
|
"express": "^4.18.2",
|
|
104
106
|
"form-data": "^4.0.0",
|
|
@@ -107,7 +109,7 @@
|
|
|
107
109
|
"jest": "^29.0.2",
|
|
108
110
|
"make-coverage-badge": "^1.2.0",
|
|
109
111
|
"mockdate": "^3.0.5",
|
|
110
|
-
"node-fetch": "^2.6.
|
|
112
|
+
"node-fetch": "^2.6.11",
|
|
111
113
|
"prettier": "2.8.8",
|
|
112
114
|
"strip-ansi": "^6.0.1",
|
|
113
115
|
"ts-node": "^10.9.1",
|