{"versions":{"1.6.1":{"name":"ajv-formats-draft2019","version":"1.6.1","description":"Plugin for AJV that adds support for some of string formats adding in the draft2019 JSON Schema.","main":"index.js","scripts":{"start":"node index.js","test":"mocha index.test.js","format":"prettier --write '**/*.{js,md}'"},"author":{"name":"Carlo Quinonez","email":"carlo@machina.bio"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/luzlab/ajv-formats-draft2019.git"},"dependencies":{"punycode":"^2.1.1","schemes":"^1.4.0","smtp-address-parser":"^1.0.3","uri-js":"^4.4.1"},"peerDependencies":{"ajv":"*"},"devDependencies":{"ajv":"^8","mocha":"^9.0.3","prettier":"^2.3.2"},"gitHead":"e63633f327ffb5bb4709ca50a801e594474fb149","bugs":{"url":"https://github.com/luzlab/ajv-formats-draft2019/issues"},"homepage":"https://github.com/luzlab/ajv-formats-draft2019#readme","_id":"ajv-formats-draft2019@1.6.1","_nodeVersion":"12.20.1","_npmVersion":"7.16.0","dist":{"shasum":"6affe2220e7828360793776f1976de0420acccfb","size":6245,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/ajv-formats-draft2019/-/ajv-formats-draft2019-1.6.1.tgz","integrity":"sha512-JQPvavpkWDvIsBp2Z33UkYCtXCSpW4HD3tAZ+oL4iEFOk9obQZffx0yANwECt6vzr6ET+7HN5czRyqXbnq/u0Q=="},"_npmUser":{"name":"anonymous","email":"carlo@machina.bio"},"directories":{},"maintainers":[{"name":"anonymous","email":"carlo@studiofathom.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajv-formats-draft2019_1.6.1_1628568058737_0.7229188983862012"},"_hasShrinkwrap":false,"publish_time":1628568058856,"_cnpm_publish_time":1628568058856,"_cnpmcore_publish_time":"2021-12-16T11:52:50.197Z","contributors":[]},"1.6.0":{"name":"ajv-formats-draft2019","version":"1.6.0","description":"Plugin for AJV that adds support for some of string formats adding in the draft2019 JSON Schema.","main":"index.js","scripts":{"start":"node index.js","test":"mocha index.test.js","format":"prettier --write '**/*.{js,md}'"},"author":{"name":"Carlo Quinonez","email":"carlo@machina.bio"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/luzlab/ajv-formats-draft2019.git"},"dependencies":{"punycode":"^2.1.1","schemes":"^1.3.0","smtp-address-parser":"^1.0.3","uri-js":"^4.4.1"},"peerDependencies":{"ajv":"*"},"devDependencies":{"ajv":"^8","mocha":"^9.0.3","prettier":"^2.3.2"},"gitHead":"486e1607d33d764a2a91d8b7b0fe4d4fe4cb2dac","bugs":{"url":"https://github.com/luzlab/ajv-formats-draft2019/issues"},"homepage":"https://github.com/luzlab/ajv-formats-draft2019#readme","_id":"ajv-formats-draft2019@1.6.0","_nodeVersion":"12.20.1","_npmVersion":"7.16.0","dist":{"shasum":"334b55d2e352a7520c64f6c16869346ad1fd78d7","size":6182,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/ajv-formats-draft2019/-/ajv-formats-draft2019-1.6.0.tgz","integrity":"sha512-Z6s4Ep6Emmt7ekJUwN9PZjKKuzgKAfmSxybnRp+c23y+d36IFUPUhtWZR23oNDxwU3RigrQOmu+VCX/3ITN+IA=="},"_npmUser":{"name":"anonymous","email":"carlo@machina.bio"},"directories":{},"maintainers":[{"name":"anonymous","email":"carlo@studiofathom.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajv-formats-draft2019_1.6.0_1627678220246_0.9289426553522036"},"_hasShrinkwrap":false,"publish_time":1627678220415,"_cnpm_publish_time":1627678220415,"_cnpmcore_publish_time":"2021-12-16T11:52:50.407Z","contributors":[]},"1.5.0":{"name":"ajv-formats-draft2019","version":"1.5.0","description":"Plugin for AJV that adds support for some of string formats adding in the draft2019 JSON Schema.","main":"index.js","scripts":{"start":"node index.js","test":"mocha index.test.js","format":"prettier --write '**/*.{js,md}'"},"author":{"name":"Carlo Quinonez","email":"carlo@machina.bio"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/luzlab/ajv-formats-draft2019.git"},"dependencies":{"punycode":"^2.1.1","schemes":"^1.3.0","smtp-address-parser":"^1.0.3","uri-js":"^4.4.1"},"peerDependencies":{"ajv":"*"},"devDependencies":{"ajv":"^6.10.2","mocha":"^9.0.3","prettier":"^2.3.2"},"gitHead":"98d0c1b0c4d31d92e134525213e639755fce4da2","bugs":{"url":"https://github.com/luzlab/ajv-formats-draft2019/issues"},"homepage":"https://github.com/luzlab/ajv-formats-draft2019#readme","_id":"ajv-formats-draft2019@1.5.0","_nodeVersion":"12.20.1","_npmVersion":"7.16.0","dist":{"shasum":"d964e63ac78f423dc19a1a4dd289d5b658c147bf","size":6092,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/ajv-formats-draft2019/-/ajv-formats-draft2019-1.5.0.tgz","integrity":"sha512-3NWKzMdPHowhUk53vQpA6WWw8ziZAvKp/2OG+jPTVVjVefI/YEsSCwy5JxoVBZH24jL664f1Ce7m0nvjys+kPw=="},"_npmUser":{"name":"anonymous","email":"carlo@machina.bio"},"directories":{},"maintainers":[{"name":"anonymous","email":"carlo@studiofathom.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajv-formats-draft2019_1.5.0_1627676705654_0.4038313517864043"},"_hasShrinkwrap":false,"publish_time":1627676705855,"_cnpm_publish_time":1627676705855,"_cnpmcore_publish_time":"2021-12-16T11:52:50.616Z","contributors":[]},"1.4.4":{"name":"ajv-formats-draft2019","version":"1.4.4","description":"Plugin for AJV that adds support for some of string formats adding in the draft2019 JSON Schema.","main":"index.js","scripts":{"start":"node index.js","test":"mocha index.test.js","format":"prettier --write '**/*.{js,md}'"},"author":{"name":"Carlo Quinonez","email":"carlo@machina.bio"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/luzlab/ajv-formats-draft2019.git"},"dependencies":{"punycode":"^2.1.1","schemes":"^1.1.1","smtp-address-parser":"^1.0.3","uri-js":"^4.2.2"},"peerDependencies":{"ajv":"*"},"devDependencies":{"ajv":"^6.10.2","mocha":"^7.0.0","prettier":"^1.19.1"},"gitHead":"71f2c2890a7210451953dd1e462cce396d4b7a7b","bugs":{"url":"https://github.com/luzlab/ajv-formats-draft2019/issues"},"homepage":"https://github.com/luzlab/ajv-formats-draft2019#readme","_id":"ajv-formats-draft2019@1.4.4","_nodeVersion":"12.20.1","_npmVersion":"7.16.0","dist":{"shasum":"0f2168feef06fdbd8e88216b9dfc175d3eb95773","size":6040,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/ajv-formats-draft2019/-/ajv-formats-draft2019-1.4.4.tgz","integrity":"sha512-VPw74/LXGhgFuOpLbi/6jY04k+pdfcBjC7fzkPLQHsc7YXdtM2Z4mwESDXduynGjEXBABbGU5ibbv53+EqlmgQ=="},"_npmUser":{"name":"anonymous","email":"carlo@machina.bio"},"directories":{},"maintainers":[{"name":"anonymous","email":"carlo@studiofathom.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajv-formats-draft2019_1.4.4_1627675193346_0.6580217813584797"},"_hasShrinkwrap":false,"publish_time":1627675193834,"_cnpm_publish_time":1627675193834,"_cnpmcore_publish_time":"2021-12-16T11:52:50.885Z","contributors":[]},"1.4.3":{"name":"ajv-formats-draft2019","version":"1.4.3","description":"Plugin for AJV that adds support for some of string formats adding in the draft2019 JSON Schema.","main":"index.js","scripts":{"start":"node index.js","test":"mocha index.test.js","format":"prettier --write '**/*.{js,md}'"},"author":{"name":"Carlo Quinonez","email":"carlo@machina.bio"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/luzlab/ajv-formats-draft2019.git"},"dependencies":{"isemail":"^3.2.0","punycode":"^2.1.1","schemes":"^1.1.1","uri-js":"^4.2.2"},"peerDependencies":{"ajv":"*"},"devDependencies":{"ajv":"^6.10.2","mocha":"^7.0.0","prettier":"^1.19.1"},"gitHead":"8aa4dda86ee04543d30b18b44a64921074896f79","bugs":{"url":"https://github.com/luzlab/ajv-formats-draft2019/issues"},"homepage":"https://github.com/luzlab/ajv-formats-draft2019#readme","_id":"ajv-formats-draft2019@1.4.3","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"shasum":"d305a5294d6d04aa6067cb3a53ad6628a650afdd","size":5589,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/ajv-formats-draft2019/-/ajv-formats-draft2019-1.4.3.tgz","integrity":"sha512-QPZGACI62TyfOg9jhYhXNGRXI/6yZ5bGfv2pT3ldAgg/lFlJk9wZlS6DKsMpApQKG+SJtL75SbCoLdY2xlEhfw=="},"maintainers":[{"name":"anonymous","email":"carlo@studiofathom.com"}],"_npmUser":{"name":"anonymous","email":"carlo@machina.bio"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajv-formats-draft2019_1.4.3_1586535255216_0.42960290757246256"},"_hasShrinkwrap":false,"publish_time":1586535255336,"_cnpm_publish_time":1586535255336,"_cnpmcore_publish_time":"2021-12-16T11:52:51.137Z","contributors":[]},"1.4.2":{"name":"ajv-formats-draft2019","version":"1.4.2","description":"Plugin for AJV that adds support for some of string formats adding in the draft2019 JSON Schema.","main":"index.js","scripts":{"start":"node index.js","test":"mocha index.test.js","format":"prettier --write '**/*.{js,md}'"},"author":{"name":"Carlo Quinonez","email":"carlo@machina.bio"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/luzlab/ajv-formats-draft2019.git"},"dependencies":{"isemail":"^3.2.0","punycode":"^2.1.1","schemes":"^1.1.1","uri-js":"^4.2.2"},"peerDependencies":{"ajv":"*"},"devDependencies":{"ajv":"^6.10.2","mocha":"^7.0.0","prettier":"^1.19.1"},"gitHead":"eb8e7e4ccaf735f6754155d7e0a7aedfa80034fa","bugs":{"url":"https://github.com/luzlab/ajv-formats-draft2019/issues"},"homepage":"https://github.com/luzlab/ajv-formats-draft2019#readme","_id":"ajv-formats-draft2019@1.4.2","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"shasum":"9dff8138daab8cae983d5a59b5e801fb7db1e77a","size":5589,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/ajv-formats-draft2019/-/ajv-formats-draft2019-1.4.2.tgz","integrity":"sha512-m91huabJPrdKBJY9Wv0ByEQ+BVhgq29O3y/cnob7ctQAkIZ4FORAl+AwPHQXe/JVYRg99wOqAIzkpPH8z2jGWA=="},"maintainers":[{"name":"anonymous","email":"carlo@studiofathom.com"}],"_npmUser":{"name":"anonymous","email":"carlo@machina.bio"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajv-formats-draft2019_1.4.2_1584041553600_0.9286928303991555"},"_hasShrinkwrap":false,"publish_time":1584041553742,"_cnpm_publish_time":1584041553742,"_cnpmcore_publish_time":"2021-12-16T11:52:51.311Z","contributors":[]},"0.0.2":{"name":"ajv-formats-draft2019","version":"0.0.2","description":"publish","repository":{"type":"git","url":"git+https://github.com/npm/security-holder.git"},"bugs":{"url":"https://github.com/npm/security-holder/issues"},"homepage":"https://github.com/npm/security-holder#readme","_id":"ajv-formats-draft2019@0.0.2","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"shasum":"911d822b666785f04685ff1096716f1a1ef74518","size":425,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/ajv-formats-draft2019/-/ajv-formats-draft2019-0.0.2.tgz","integrity":"sha512-O1l0QGu2osz03o22mqprwsOBRbBINaIcTpm3tzwuHtad+rq1ikJWgJ/R49dmYXhrNZiguMYOYDLdbsYhPxXYdg=="},"maintainers":[{"name":"anonymous","email":"carlo@studiofathom.com"}],"_npmUser":{"name":"anonymous","email":"judith@npmjs.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajv-formats-draft2019_0.0.2_1583866467961_0.0964885112349767"},"_hasShrinkwrap":false,"publish_time":1583866468090,"_cnpm_publish_time":1583866468090,"_cnpmcore_publish_time":"2021-12-16T11:52:51.529Z","contributors":[]}},"dist-tags":{"latest":"1.6.1"},"name":"ajv-formats-draft2019","time":{"created":"2022-01-27T09:02:42.267Z","modified":"2023-07-28T14:08:04.065Z","1.6.1":"2021-08-10T04:00:58.856Z","1.6.0":"2021-07-30T20:50:20.415Z","1.5.0":"2021-07-30T20:25:05.855Z","1.4.4":"2021-07-30T19:59:53.834Z","1.4.3":"2020-04-10T16:14:15.336Z","1.4.2":"2020-03-12T19:32:33.742Z","0.0.2":"2020-03-10T18:54:28.090Z"},"readme":"# ajv-formats-draft2019\n\nAn AJV plugin adding support for draft2019 formats missing from AJV.\n\nCurrently, `iri`, `iri-reference`, `idn-email`, `idn-hostname`, and `duration`\nformats are supported. `duration` was added in draft 2019. The `uuid` format was\nadded in draft2019, but is already supported by the `ajv-formats` package.\n\n[![Node.js CI](https://github.com/luzlab/ajv-formats-draft2019/actions/workflows/node.js.yml/badge.svg)](https://github.com/luzlab/ajv-formats-draft2019/actions/workflows/node.js.yml)\n\n## Using international formats with pre-draft2019 JSON schemas\n\nThe `idn-email` and `idn-hostname` formats are implemented per RFC 1123, however\nearlier JSON schemas specify RFC 1034. This is probably just fine, but you have\nbeen warned...\n\n## Installation\n\n```sh\nnpm install --save ajv-formats-draft2019\n```\n\n## Usage\n\nThe default export is an `apply` function that patches an existing instance of\n`ajv`.\n\n```js\nconst Ajv = require('ajv');\nconst apply = require('ajv-formats-draft2019');\nconst ajv = new Ajv();\napply(ajv); // returns ajv instance, allowing chaining\n\nlet schema = {\n  type: 'string',\n  format: 'idn-email',\n};\najv.validate(schema, 'квіточка@пошта.укр'); // returns true\n```\n\nThe `apply` function also accepts a second optional parameter to specify which\nformats to add to the `ajv` instance.\n\n```js\nconst Ajv = require('ajv');\nconst apply = require('ajv-formats-draft2019');\nconst ajv = new Ajv();\n\n// Install only the idn-email and iri formats\napply(ajv, { formats: ['idn-email', 'iri'] });\n```\n\nThe module also provides an alternate entrypoint `ajv-formats-draft2019/formats`\nthat works with the `ajv` constructor to add the formats to new instances.\n\n```js\nconst Ajv = require('ajv');\nconst formats = require('ajv-formats-draft2019/formats');\nconst ajv = new Ajv({ formats });\n\nlet schema = {\n  type: 'string',\n  format: 'idn-email',\n};\najv.validate(schema, 'квіточка@пошта.укр'); // returns true\n```\n\nUsing the `ajv-formats-draft2019/formats` entry point also allows cherry picking\nformats. Note the approach below only works for formats that don't contain a\nhypen `-` in the name. This approach may yield smaller packed bundles since it\nallows tree-shaking to remove unwanted validators and related dependencies.\n\n```js\nconst Ajv = require('ajv');\nconst { duration, iri } = require('ajv-formats-draft2019/formats');\nconst ajv = new Ajv({ formats: { duration, iri } });\n```\n\n## International formats\n\nThe library also provides an `idn` export to load only the international formats\n(ie. `iri`, `iri-reference`, `idn-hostname` and `idn-email`).\n\n```js\nconst Ajv = require('ajv');\nconst formats = require('ajv-formats-draft2019/idn');\nconst ajv = new Ajv({ formats });\n```\n\n## Formats\n\n### iri\n\nThe string is parsed with 'uri-js' and the scheme is checked against the list of\nknown IANA schemes. If it's a 'mailto' schemes, all of the `to:` addresses are\nvalidated, otherwise we check there IRI includes a path and is an absolute\nreference.\n\n### iri-reference\n\nAll valid IRIs are valid. Fragments must have a valid path and of type\n\"relative\", \"same-document\" or \"uri\". If there is a scheme, it must be valid.\n\nValidating a IRI references is challenging since the syntax is so permissive.\nBasically, any URL-safe string is a valid IRI syntactically. I struggled to find\n[negative test cases](https://github.com/luzlab/ajv-formats/blob/master/index.test.js#L240)\nwhen writing the unit tests for IRI-references. Consider:\n\n- `google.com` is NOT a valid IRI because it does not include a scheme.\n- `file.txt` is a valid IRI-reference\n- `/this:that` is a valid IRI-reference\n- `this:that` is a NOT a valid IRI-reference\n\n### idn-email\n\n[`smtp-address-parser`](https://www.npmjs.com/package/smtp-address-parser) is\nused to check the validity of the email.\n\n### idn-hostname\n\nThe hostname is converted to ascii with punycode and checked for a valid tld.\n\n### duration\n\nThe string is checked against a regex.\n\n## Releases\n\n### `v1.6.1`\n\n- Updated `schemes` dependency, adding support for `modbus+tcp` and `mqtt` in URIs.\n\n### `v1.6.0`\n\n- Fix tests to work with AJV v7+ and how `ajv` is exported, rather than changes\n  to this library.\n\n### `v1.5.0`\n\n- Upgrade dependencies\n\n### `v1.4.4`\n\n- The last release that's compatible with Node 8.\n- Fixed a bug when validated `mailto:` IRIs.","users":{}}