@kintone/plugin-manifest-validator
Advanced tools
Comparing version 4.0.2 to 5.0.0
@@ -6,2 +6,44 @@ # Change Log | ||
# [5.0.0](https://github.com/kintone/js-sdk/compare/@kintone/plugin-manifest-validator@4.0.2...@kintone/plugin-manifest-validator@5.0.0) (2021-03-09) | ||
### Bug Fixes | ||
* **deps:** update dependency ajv to ^7.0.4 ([10cb494](https://github.com/kintone/js-sdk/commit/10cb4943f2446a8e3170759d5da8cc2390a3eeef)) | ||
### chore | ||
* **deps:** update dependency ajv to v7 ([#636](https://github.com/kintone/js-sdk/issues/636)) ([a5490d5](https://github.com/kintone/js-sdk/commit/a5490d5702de9f32b06e1511f1e924388e7510c4)) | ||
### BREAKING CHANGES | ||
* **deps:** The format of dataPath and message in an error object have been changed. | ||
dataPath: .desktop.css[0] -> /desktop/css/0 | ||
message: *** is a required property -> *** should have required property 'version' | ||
* fix: put maxItems in the correct location | ||
* refactor: remove unnecessary code | ||
* refactor: define SchemaValidateFunction locally | ||
* test: add a test for maxItems | ||
* chore: add a note for PR that expose SchemaValidateFunction | ||
* types: regenerate manifest-schema.d.ts | ||
* docs: update an error object format | ||
* docs: update a link to the documentation for validation errors | ||
Co-authored-by: Renovate Bot <bot@renovateapp.com> | ||
Co-authored-by: Toru Kobayashi <koba0004@gmail.com> | ||
## [4.0.2](https://github.com/kintone/js-sdk/compare/@kintone/plugin-manifest-validator@4.0.1...@kintone/plugin-manifest-validator@4.0.2) (2021-03-02) | ||
@@ -8,0 +50,0 @@ |
@@ -166,7 +166,7 @@ { | ||
"maxFileSize": "20MB" | ||
}], | ||
"maxItems": 30 | ||
} | ||
}] | ||
}, | ||
"maxItems": 30 | ||
} | ||
} | ||
} |
@@ -1,5 +0,5 @@ | ||
import Ajv from "ajv"; | ||
import { ErrorObject } from "ajv"; | ||
declare type ValidateResult = { | ||
valid: boolean | PromiseLike<any>; | ||
errors: null | Ajv.ErrorObject[]; | ||
errors: null | ErrorObject[]; | ||
}; | ||
@@ -6,0 +6,0 @@ declare const _default: (json: Record<string, any>, options?: { |
@@ -31,4 +31,2 @@ "use strict"; | ||
allErrors: true, | ||
unknownFormats: true, | ||
errorDataPath: "property", | ||
formats: { | ||
@@ -40,8 +38,2 @@ "http-url": (str) => validate_https_url_1.default(str, true), | ||
}); | ||
ajv.removeKeyword("propertyNames"); | ||
ajv.removeKeyword("contains"); | ||
ajv.removeKeyword("const"); | ||
ajv.removeKeyword("if"); | ||
ajv.removeKeyword("then"); | ||
ajv.removeKeyword("else"); | ||
const validateMaxFileSize = (schema, data) => { | ||
@@ -54,3 +46,2 @@ // schema: max file size like "512KB" or 123 (in bytes) | ||
validateMaxFileSize.errors = [ | ||
// @ts-expect-error TODO: Ajv.ErrorObject has need fixing. | ||
{ | ||
@@ -67,3 +58,4 @@ keyword: "maxFileSize", | ||
}; | ||
ajv.addKeyword("maxFileSize", { | ||
ajv.addKeyword({ | ||
keyword: "maxFileSize", | ||
validate: validateMaxFileSize, | ||
@@ -70,0 +62,0 @@ }); |
@@ -8,3 +8,410 @@ /* tslint:disable */ | ||
export type Resources = string[]; | ||
export type Resources = | ||
| [] | ||
| [string] | ||
| [string, string] | ||
| [string, string, string] | ||
| [string, string, string, string] | ||
| [string, string, string, string, string] | ||
| [string, string, string, string, string, string] | ||
| [string, string, string, string, string, string, string] | ||
| [string, string, string, string, string, string, string, string] | ||
| [string, string, string, string, string, string, string, string, string] | ||
| [string, string, string, string, string, string, string, string, string, string] | ||
| [string, string, string, string, string, string, string, string, string, string, string] | ||
| [string, string, string, string, string, string, string, string, string, string, string, string] | ||
| [string, string, string, string, string, string, string, string, string, string, string, string, string] | ||
| [string, string, string, string, string, string, string, string, string, string, string, string, string, string] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
] | ||
| [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
]; | ||
@@ -11,0 +418,0 @@ export interface KintonePluginManifestJson { |
@@ -166,7 +166,7 @@ { | ||
"maxFileSize": "20MB" | ||
}], | ||
"maxItems": 30 | ||
} | ||
}] | ||
}, | ||
"maxItems": 30 | ||
} | ||
} | ||
} |
{ | ||
"name": "@kintone/plugin-manifest-validator", | ||
"version": "4.0.2", | ||
"version": "5.0.0", | ||
"author": "Teppei Sato <teppeis@gmail.com>", | ||
@@ -27,3 +27,3 @@ "engines": { | ||
"dependencies": { | ||
"ajv": "^6.12.6", | ||
"ajv": "^7.0.4", | ||
"bytes": "^3.1.0" | ||
@@ -52,3 +52,3 @@ }, | ||
"license": "MIT", | ||
"gitHead": "2da8da6551151e6bfee48740d46f82e7b1d21a5f" | ||
"gitHead": "230bd05abff8e1e30814cfb34891d0cfbda6b754" | ||
} |
@@ -30,7 +30,7 @@ @kintone/plugin-manifest-validator | ||
[ajv error objects](https://github.com/epoberezkin/ajv#validation-errors) is like: | ||
[ajv error objects](https://ajv.js.org/docs/api.html#validation-errors) is like: | ||
```js | ||
{ | ||
dataPath: '.version', | ||
dataPath: '/version', | ||
keyword: 'type', | ||
@@ -37,0 +37,0 @@ message: 'should be integer', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244278
903
1056
+ Addedajv@7.2.4(transitive)
+ Addedjson-schema-traverse@1.0.0(transitive)
+ Addedrequire-from-string@2.0.2(transitive)
- Removedajv@6.12.6(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
Updatedajv@^7.0.4