forked from johnbillion/wp-json-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
42 lines (42 loc) · 2.57 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"name": "wp-json-schemas",
"version": "2.4.0",
"description": "JSON schemas for WordPress PHP objects and REST API responses",
"main": "schema.json",
"files": [
"schemas"
],
"homepage": "https://github.com/johnbillion/wp-json-schemas",
"funding": "https://github.com/sponsors/johnbillion",
"repository": {
"type": "git",
"url": "git+https://github.com/johnbillion/wp-json-schemas.git"
},
"keywords": [
"schemas",
"wordpress"
],
"author": "John Blackbourn",
"license": "MIT",
"devDependencies": {
"ajv-cli": "^3.1.0",
"json-schema-to-typescript": "^10.1.4",
"typescript": ">=3"
},
"scripts": {
"version": "cd packages/wp-types && npm version $(node -p -e \"require('../../package.json').version\") && git add .",
"build-wp-types": "json2ts -i schema.json -o packages/wp-types/index.ts --style.trailingComma=all --style.useTabs && cat packages/wp-types/append.ts >> packages/wp-types/index.ts",
"test-wp-types": "tsc packages/wp-types/tests/test.ts --noEmit --strict",
"test-post": "ajv validate -m tests/hyper-schema.json -s schemas/post.json -d \"tests/data/post/*.json\" -r \"schemas/**/*.json\"",
"test-user": "ajv validate -m tests/hyper-schema.json -s schemas/user.json -d \"tests/data/user/*.json\" -r \"schemas/**/*.json\"",
"test-tag": "ajv validate -m tests/hyper-schema.json -s schemas/term.json -d \"tests/data/tag/*.json\" -r \"schemas/**/*.json\"",
"test-category": "ajv validate -m tests/hyper-schema.json -s schemas/term.json -d \"tests/data/category/*.json\" -r \"schemas/**/*.json\"",
"test-comment": "ajv validate -m tests/hyper-schema.json -s schemas/comment.json -d \"tests/data/comment/*.json\" -r \"schemas/**/*.json\"",
"test-error": "ajv validate -m tests/hyper-schema.json -s schemas/error.json -d \"tests/data/error/*.json\" -r \"schemas/**/*.json\"",
"test-rest-api-posts": "ajv validate -m tests/hyper-schema.json -s schemas/rest-api/posts.json -d \"tests/data/rest-api/posts/*.json\" -r \"schemas/**/*.json\"",
"test-rest-api-search-results": "ajv validate -m tests/hyper-schema.json -s schemas/rest-api/search-results.json -d \"tests/data/rest-api/search-results/*.json\" -r \"schemas/**/*.json\"",
"test-rest-api-types": "ajv validate -m tests/hyper-schema.json -s schemas/rest-api/types.json -d \"tests/data/rest-api/types/*.json\" -r \"schemas/**/*.json\"",
"test-rest-api-taxonomies": "ajv validate -m tests/hyper-schema.json -s schemas/rest-api/taxonomies.json -d \"tests/data/rest-api/taxonomies/*.json\" -r \"schemas/**/*.json\"",
"validate": "ajv compile -m tests/hyper-schema.json -s schema.json -r \"schemas/**/*.json\""
}
}