From 44fc7b209c545299bfd648823252ead421bbf032 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Tue, 25 Nov 2025 15:37:24 +0530 Subject: [PATCH 01/25] Add test IDs to draft2020-12/enum.json using normalized schema hash (POC for #698) --- package.json | 11 +- scripts/add-test-ids.js | 74 ++++ scripts/check-test-ids.js | 143 ++++++ scripts/load-remotes.js | 36 ++ scripts/normalize.js | 212 +++++++++ tests/draft2020-12/enum.json | 815 ++++++++++++++++++++--------------- 6 files changed, 954 insertions(+), 337 deletions(-) create mode 100644 scripts/add-test-ids.js create mode 100644 scripts/check-test-ids.js create mode 100644 scripts/load-remotes.js create mode 100644 scripts/normalize.js diff --git a/package.json b/package.json index 75da9e29..67058746 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "json-schema-test-suite", "version": "0.1.0", + "type": "module", "description": "A language agnostic test suite for the JSON Schema specifications", "repository": "github:json-schema-org/JSON-Schema-Test-Suite", "keywords": [ @@ -8,5 +9,13 @@ "tests" ], "author": "http://json-schema.org", - "license": "MIT" + "license": "MIT", + "dependencies": { + "@hyperjump/browser": "^1.3.1", + "@hyperjump/json-pointer": "^1.1.1", + "@hyperjump/json-schema": "^1.17.2", + "@hyperjump/pact": "^1.4.0", + "@hyperjump/uri": "^1.3.2", + "json-stringify-deterministic": "^1.0.12" + } } diff --git a/scripts/add-test-ids.js b/scripts/add-test-ids.js new file mode 100644 index 00000000..295414e2 --- /dev/null +++ b/scripts/add-test-ids.js @@ -0,0 +1,74 @@ +import * as fs from "node:fs"; +import * as crypto from "node:crypto"; +import jsonStringify from "json-stringify-deterministic"; +import { normalize } from "./normalize.js"; +import { loadRemotes } from "./load-remotes.js"; + +const DIALECT_MAP = { + "https://json-schema.org/draft/2020-12/schema": "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema": "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#": "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#": "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#": "http://json-schema.org/draft-04/schema#" +}; + +function getDialectUri(schema) { + if (schema.$schema && DIALECT_MAP[schema.$schema]) { + return DIALECT_MAP[schema.$schema]; + } + return "https://json-schema.org/draft/2020-12/schema"; +} + +function generateTestId(normalizedSchema, testData, testValid) { + return crypto + .createHash("md5") + .update(jsonStringify(normalizedSchema) + jsonStringify(testData) + testValid) + .digest("hex"); +} + +async function addIdsToFile(filePath) { + console.log("Reading:", filePath); + const tests = JSON.parse(fs.readFileSync(filePath, "utf8")); + let changed = false; + let added = 0; + + if (!Array.isArray(tests)) { + console.log("Expected an array at top level, got:", typeof tests); + return; + } + + for (const testCase of tests) { + if (!Array.isArray(testCase.tests)) continue; + + const dialectUri = getDialectUri(testCase.schema || {}); + const normalizedSchema = await normalize(testCase.schema || true, dialectUri); + + for (const test of testCase.tests) { + if (!test.id) { + test.id = generateTestId(normalizedSchema, test.data, test.valid); + changed = true; + added++; + } + } + } + + if (changed) { + fs.writeFileSync(filePath, JSON.stringify(tests, null, 2) + "\n"); + console.log(`✓ Added ${added} IDs`); + } else { + console.log("✓ All tests already have IDs"); + } +} + +// Load remotes for all dialects +const remotesPaths = ["./remotes"]; +for (const dialectUri of Object.values(DIALECT_MAP)) { + for (const path of remotesPaths) { + if (fs.existsSync(path)) { + loadRemotes(dialectUri, path); + } + } +} + +const filePath = process.argv[2] || "tests/draft2020-12/enum.json"; +addIdsToFile(filePath).catch(console.error); \ No newline at end of file diff --git a/scripts/check-test-ids.js b/scripts/check-test-ids.js new file mode 100644 index 00000000..feed6513 --- /dev/null +++ b/scripts/check-test-ids.js @@ -0,0 +1,143 @@ +import * as fs from "node:fs"; +import * as path from "node:path"; +import * as crypto from "node:crypto"; +import jsonStringify from "json-stringify-deterministic"; +import { normalize } from "./normalize.js"; +import { loadRemotes } from "./load-remotes.js"; + +const DIALECT_MAP = { + "https://json-schema.org/draft/2020-12/schema": "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema": "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#": "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#": "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#": "http://json-schema.org/draft-04/schema#" +}; + +function* jsonFiles(dir) { + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + const full = path.join(dir, entry.name); + if (entry.isDirectory()) { + yield* jsonFiles(full); + } else if (entry.isFile() && entry.name.endsWith(".json")) { + yield full; + } + } +} + +function getDialectUri(schema) { + if (schema.$schema && DIALECT_MAP[schema.$schema]) { + return DIALECT_MAP[schema.$schema]; + } + return "https://json-schema.org/draft/2020-12/schema"; +} + +function generateTestId(normalizedSchema, testData, testValid) { + return crypto + .createHash("md5") + .update(jsonStringify(normalizedSchema) + jsonStringify(testData) + testValid) + .digest("hex"); +} + +async function checkVersion(dir) { + const missingIdFiles = new Set(); + const duplicateIdFiles = new Set(); + const mismatchedIdFiles = new Set(); + const idMap = new Map(); + + console.log(`Checking tests in ${dir}...`); + + for (const file of jsonFiles(dir)) { + const tests = JSON.parse(fs.readFileSync(file, "utf8")); + + for (let i = 0; i < tests.length; i++) { + const testCase = tests[i]; + if (!Array.isArray(testCase.tests)) continue; + + const dialectUri = getDialectUri(testCase.schema || {}); + const normalizedSchema = await normalize(testCase.schema || true, dialectUri); + + for (let j = 0; j < testCase.tests.length; j++) { + const test = testCase.tests[j]; + + if (!test.id) { + missingIdFiles.add(file); + console.log(` ✗ Missing ID: ${file} | ${testCase.description} | ${test.description}`); + continue; + } + + const expectedId = generateTestId(normalizedSchema, test.data, test.valid); + + if (test.id !== expectedId) { + mismatchedIdFiles.add(file); + console.log(` ✗ Mismatched ID: ${file}`); + console.log(` Test: ${testCase.description} | ${test.description}`); + console.log(` Current ID: ${test.id}`); + console.log(` Expected ID: ${expectedId}`); + } + + if (idMap.has(test.id)) { + const existing = idMap.get(test.id); + duplicateIdFiles.add(file); + duplicateIdFiles.add(existing.file); + console.log(` ✗ Duplicate ID: ${test.id}`); + console.log(` First: ${existing.file} | ${existing.testCase} | ${existing.test}`); + console.log(` Second: ${file} | ${testCase.description} | ${test.description}`); + } else { + idMap.set(test.id, { + file, + testCase: testCase.description, + test: test.description + }); + } + } + } + } + + console.log("\n" + "=".repeat(60)); + console.log("Summary:"); + console.log("=".repeat(60)); + + console.log("\nFiles with missing IDs:"); + if (missingIdFiles.size === 0) { + console.log(" ✓ None"); + } else { + for (const f of missingIdFiles) console.log(` - ${f}`); + } + + console.log("\nFiles with mismatched IDs:"); + if (mismatchedIdFiles.size === 0) { + console.log(" ✓ None"); + } else { + for (const f of mismatchedIdFiles) console.log(` - ${f}`); + } + + console.log("\nFiles with duplicate IDs:"); + if (duplicateIdFiles.size === 0) { + console.log(" ✓ None"); + } else { + for (const f of duplicateIdFiles) console.log(` - ${f}`); + } + + const hasErrors = missingIdFiles.size > 0 || mismatchedIdFiles.size > 0 || duplicateIdFiles.size > 0; + + console.log("\n" + "=".repeat(60)); + if (hasErrors) { + console.log("❌ Check failed - issues found"); + process.exit(1); + } else { + console.log("✅ All checks passed!"); + } +} + +// Load remotes +const remotesPaths = ["./remotes"]; +for (const dialectUri of Object.values(DIALECT_MAP)) { + for (const path of remotesPaths) { + if (fs.existsSync(path)) { + loadRemotes(dialectUri, path); + } + } +} + +const dir = process.argv[2] || "tests/draft2020-12"; +checkVersion(dir).catch(console.error); \ No newline at end of file diff --git a/scripts/load-remotes.js b/scripts/load-remotes.js new file mode 100644 index 00000000..f7ab7aff --- /dev/null +++ b/scripts/load-remotes.js @@ -0,0 +1,36 @@ +// scripts/load-remotes.js +import * as fs from "node:fs"; +import { toAbsoluteIri } from "@hyperjump/uri"; +import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; + +// Keep track of which remote URLs we've already registered +const loadedRemotes = new Set(); + +export const loadRemotes = (dialectId, filePath, url = "") => { + if (!fs.existsSync(filePath)) { + console.warn(`Warning: Remotes path not found: ${filePath}`); + return; + } + + fs.readdirSync(filePath, { withFileTypes: true }).forEach((entry) => { + if (entry.isFile() && entry.name.endsWith(".json")) { + const remotePath = `${filePath}/${entry.name}`; + const remoteUrl = `http://localhost:1234${url}/${entry.name}`; + + // If we've already registered this URL once, skip it + if (loadedRemotes.has(remoteUrl)) { + return; + } + + const remote = JSON.parse(fs.readFileSync(remotePath, "utf8")); + + // Only register if $schema matches dialect OR there's no $schema + if (!remote.$schema || toAbsoluteIri(remote.$schema) === dialectId) { + registerSchema(remote, remoteUrl, dialectId); + loadedRemotes.add(remoteUrl); // ✅ Remember we've registered it + } + } else if (entry.isDirectory()) { + loadRemotes(dialectId, `${filePath}/${entry.name}`, `${url}/${entry.name}`); + } + }); +}; diff --git a/scripts/normalize.js b/scripts/normalize.js new file mode 100644 index 00000000..bad333fc --- /dev/null +++ b/scripts/normalize.js @@ -0,0 +1,212 @@ +import * as Schema from "@hyperjump/browser"; +import * as Pact from "@hyperjump/pact"; +import * as JsonPointer from "@hyperjump/json-pointer"; +import { toAbsoluteIri } from "@hyperjump/uri"; +import { registerSchema, unregisterSchema } from "@hyperjump/json-schema/draft-2020-12"; +import { getSchema, getKeywordId } from "@hyperjump/json-schema/experimental"; +import "@hyperjump/json-schema/draft-2019-09"; +import "@hyperjump/json-schema/draft-07"; +import "@hyperjump/json-schema/draft-06"; +import "@hyperjump/json-schema/draft-04"; + + +// =========================================== +// CHANGE #2 (ADDED): sanitize file:// $id +// =========================================== +const sanitizeTopLevelId = (schema) => { + if (typeof schema !== "object" || schema === null) return schema; + const copy = { ...schema }; + if (typeof copy.$id === "string" && copy.$id.startsWith("file:")) { + delete copy.$id; + } + return copy; +}; +// =========================================== + + +export const normalize = async (rawSchema, dialectUri) => { + const schemaUri = "https://test-suite.json-schema.org/main"; + + // =========================================== + // CHANGE #2 (APPLIED HERE) + // =========================================== + const safeSchema = sanitizeTopLevelId(rawSchema); + // =========================================== + + try { + // BEFORE: registerSchema(rawSchema, schemaUri, dialectUri) + registerSchema(safeSchema, schemaUri, dialectUri); + + const schema = await getSchema(schemaUri); + const ast = { metaData: {} }; + await compile(schema, ast); + return ast; + } finally { + unregisterSchema(schemaUri); + } +}; + +const compile = async (schema, ast) => { + if (!(schema.document.baseUri in ast.metaData)) { + ast.metaData[schema.document.baseUri] = { + anchors: schema.document.anchors, + dynamicAnchors: schema.document.dynamicAnchors + }; + } + + const url = canonicalUri(schema); + if (!(url in ast)) { + const schemaValue = Schema.value(schema); + if (!["object", "boolean"].includes(typeof schemaValue)) { + throw Error(`No schema found at '${url}'`); + } + + if (typeof schemaValue === "boolean") { + ast[url] = schemaValue; + } else { + ast[url] = []; + for await (const [keyword, keywordSchema] of Schema.entries(schema)) { + const keywordUri = getKeywordId(keyword, schema.document.dialectId); + if (!keywordUri || keywordUri === "https://json-schema.org/keyword/comment") { + continue; + } + + ast[url].push({ + keyword: keywordUri, + location: JsonPointer.append(keyword, canonicalUri(schema)), + value: await getKeywordHandler(keywordUri)(keywordSchema, ast, schema) + }); + } + } + } + + return url; +}; + +const canonicalUri = (schema) => `${schema.document.baseUri}#${encodeURI(schema.cursor)}`; + +const getKeywordHandler = (keywordUri) => { + if (keywordUri in keywordHandlers) { + return keywordHandlers[keywordUri]; + } else if (keywordUri.startsWith("https://json-schema.org/keyword/unknown#")) { + return keywordHandlers["https://json-schema.org/keyword/unknown"]; + } else { + throw Error(`Missing handler for keyword: ${keywordUri}`); + } +}; + +const simpleValue = (keyword) => Schema.value(keyword); + +const simpleApplicator = (keyword, ast) => compile(keyword, ast); + +const objectApplicator = (keyword, ast) => { + return Pact.pipe( + Schema.entries(keyword), + Pact.asyncMap(async ([propertyName, subSchema]) => [propertyName, await compile(subSchema, ast)]), + Pact.asyncCollectObject + ); +}; + +const arrayApplicator = (keyword, ast) => { + return Pact.pipe( + Schema.iter(keyword), + Pact.asyncMap(async (subSchema) => await compile(subSchema, ast)), + Pact.asyncCollectArray + ); +}; + +const keywordHandlers = { + "https://json-schema.org/keyword/additionalProperties": simpleApplicator, + "https://json-schema.org/keyword/allOf": arrayApplicator, + "https://json-schema.org/keyword/anyOf": arrayApplicator, + "https://json-schema.org/keyword/const": simpleValue, + "https://json-schema.org/keyword/contains": simpleApplicator, + "https://json-schema.org/keyword/contentEncoding": simpleValue, + "https://json-schema.org/keyword/contentMediaType": simpleValue, + "https://json-schema.org/keyword/contentSchema": simpleApplicator, + "https://json-schema.org/keyword/default": simpleValue, + "https://json-schema.org/keyword/definitions": objectApplicator, + "https://json-schema.org/keyword/dependentRequired": simpleValue, + "https://json-schema.org/keyword/dependentSchemas": objectApplicator, + "https://json-schema.org/keyword/deprecated": simpleValue, + "https://json-schema.org/keyword/description": simpleValue, + "https://json-schema.org/keyword/dynamicRef": simpleValue, // base dynamicRef + + // =========================================== + // CHANGE #1 (ADDED): draft-2020-12/dynamicRef + // =========================================== + "https://json-schema.org/keyword/draft-2020-12/dynamicRef": simpleValue, + // =========================================== + + "https://json-schema.org/keyword/else": simpleApplicator, + "https://json-schema.org/keyword/enum": simpleValue, + "https://json-schema.org/keyword/examples": simpleValue, + "https://json-schema.org/keyword/exclusiveMaximum": simpleValue, + "https://json-schema.org/keyword/exclusiveMinimum": simpleValue, + "https://json-schema.org/keyword/if": simpleApplicator, + "https://json-schema.org/keyword/items": simpleApplicator, + "https://json-schema.org/keyword/maxContains": simpleValue, + "https://json-schema.org/keyword/maxItems": simpleValue, + "https://json-schema.org/keyword/maxLength": simpleValue, + "https://json-schema.org/keyword/maxProperties": simpleValue, + "https://json-schema.org/keyword/maximum": simpleValue, + "https://json-schema.org/keyword/minContains": simpleValue, + "https://json-schema.org/keyword/minItems": simpleValue, + "https://json-schema.org/keyword/minLength": simpleValue, + "https://json-schema.org/keyword/minProperties": simpleValue, + "https://json-schema.org/keyword/minimum": simpleValue, + "https://json-schema.org/keyword/multipleOf": simpleValue, + "https://json-schema.org/keyword/not": simpleApplicator, + "https://json-schema.org/keyword/oneOf": arrayApplicator, + "https://json-schema.org/keyword/pattern": simpleValue, + "https://json-schema.org/keyword/patternProperties": objectApplicator, + "https://json-schema.org/keyword/prefixItems": arrayApplicator, + "https://json-schema.org/keyword/properties": objectApplicator, + "https://json-schema.org/keyword/propertyNames": simpleApplicator, + "https://json-schema.org/keyword/readOnly": simpleValue, + "https://json-schema.org/keyword/ref": compile, + "https://json-schema.org/keyword/required": simpleValue, + "https://json-schema.org/keyword/title": simpleValue, + "https://json-schema.org/keyword/then": simpleApplicator, + "https://json-schema.org/keyword/type": simpleValue, + "https://json-schema.org/keyword/unevaluatedItems": simpleApplicator, + "https://json-schema.org/keyword/unevaluatedProperties": simpleApplicator, + "https://json-schema.org/keyword/uniqueItems": simpleValue, + "https://json-schema.org/keyword/unknown": simpleValue, + "https://json-schema.org/keyword/writeOnly": simpleValue, + + "https://json-schema.org/keyword/draft-2020-12/format": simpleValue, + "https://json-schema.org/keyword/draft-2020-12/format-assertion": simpleValue, + + "https://json-schema.org/keyword/draft-2019-09/formatAssertion": simpleValue, + "https://json-schema.org/keyword/draft-2019-09/format": simpleValue, + + "https://json-schema.org/keyword/draft-07/format": simpleValue, + + "https://json-schema.org/keyword/draft-06/contains": simpleApplicator, + "https://json-schema.org/keyword/draft-06/format": simpleValue, + + "https://json-schema.org/keyword/draft-04/additionalItems": simpleApplicator, + "https://json-schema.org/keyword/draft-04/dependencies": (keyword, ast) => { + return Pact.pipe( + Schema.entries(keyword), + Pact.asyncMap(async ([propertyName, schema]) => { + return [ + propertyName, + Schema.typeOf(schema) === "array" ? Schema.value(schema) : await compile(schema, ast) + ]; + }), + Pact.asyncCollectObject + ); + }, + "https://json-schema.org/keyword/draft-04/exclusiveMaximum": simpleValue, + "https://json-schema.org/keyword/draft-04/exclusiveMinimum": simpleValue, + "https://json-schema.org/keyword/draft-04/format": simpleValue, + "https://json-schema.org/keyword/draft-04/items": (keyword, ast) => { + return Schema.typeOf(keyword) === "array" + ? arrayApplicator(keyword, ast) + : simpleApplicator(keyword, ast); + }, + "https://json-schema.org/keyword/draft-04/maximum": simpleValue, + "https://json-schema.org/keyword/draft-04/minimum": simpleValue +}; diff --git a/tests/draft2020-12/enum.json b/tests/draft2020-12/enum.json index c8f35eac..9b87484b 100644 --- a/tests/draft2020-12/enum.json +++ b/tests/draft2020-12/enum.json @@ -1,358 +1,501 @@ [ - { - "description": "simple enum validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [1, 2, 3] - }, - "tests": [ - { - "description": "one of the enum is valid", - "data": 1, - "valid": true - }, - { - "description": "something else is invalid", - "data": 4, - "valid": false - } - ] + { + "description": "simple enum validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 1, + 2, + 3 + ] }, - { - "description": "heterogeneous enum validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [6, "foo", [], true, {"foo": 12}] - }, - "tests": [ - { - "description": "one of the enum is valid", - "data": [], - "valid": true - }, - { - "description": "something else is invalid", - "data": null, - "valid": false - }, - { - "description": "objects are deep compared", - "data": {"foo": false}, - "valid": false - }, - { - "description": "valid object matches", - "data": {"foo": 12}, - "valid": true - }, - { - "description": "extra properties in object is invalid", - "data": {"foo": 12, "boo": 42}, - "valid": false - } - ] + "tests": [ + { + "description": "one of the enum is valid", + "data": 1, + "valid": true, + "id": "bc16cb75d14903a732326a24d1416757" + }, + { + "description": "something else is invalid", + "data": 4, + "valid": false, + "id": "2ea4a168ef00d32d444b3d49dc5a617d" + } + ] + }, + { + "description": "heterogeneous enum validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 6, + "foo", + [], + true, + { + "foo": 12 + } + ] }, - { - "description": "heterogeneous enum-with-null validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [6, null] + "tests": [ + { + "description": "one of the enum is valid", + "data": [], + "valid": true, + "id": "e31a02b023906271a7f40576a03df0de" + }, + { + "description": "something else is invalid", + "data": null, + "valid": false, + "id": "b47e0170004d316b00a5151b0d2b566c" + }, + { + "description": "objects are deep compared", + "data": { + "foo": false }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "number is valid", - "data": 6, - "valid": true - }, - { - "description": "something else is invalid", - "data": "test", - "valid": false - } - ] - }, - { - "description": "enums in properties", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type":"object", - "properties": { - "foo": {"enum":["foo"]}, - "bar": {"enum":["bar"]} - }, - "required": ["bar"] + "valid": false, + "id": "7285822674e57f31de9c7280fa9d8900" + }, + { + "description": "valid object matches", + "data": { + "foo": 12 }, - "tests": [ - { - "description": "both properties are valid", - "data": {"foo":"foo", "bar":"bar"}, - "valid": true - }, - { - "description": "wrong foo value", - "data": {"foo":"foot", "bar":"bar"}, - "valid": false - }, - { - "description": "wrong bar value", - "data": {"foo":"foo", "bar":"bart"}, - "valid": false - }, - { - "description": "missing optional property is valid", - "data": {"bar":"bar"}, - "valid": true - }, - { - "description": "missing required property is invalid", - "data": {"foo":"foo"}, - "valid": false - }, - { - "description": "missing all properties is invalid", - "data": {}, - "valid": false - } - ] - }, - { - "description": "enum with escaped characters", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": ["foo\nbar", "foo\rbar"] + "valid": true, + "id": "27ffbacf5774ff2354458a6954ed1591" + }, + { + "description": "extra properties in object is invalid", + "data": { + "foo": 12, + "boo": 42 }, - "tests": [ - { - "description": "member 1 is valid", - "data": "foo\nbar", - "valid": true - }, - { - "description": "member 2 is valid", - "data": "foo\rbar", - "valid": true - }, - { - "description": "another string is invalid", - "data": "abc", - "valid": false - } - ] + "valid": false, + "id": "e220c92cdef194c74c49f9b7eb86b211" + } + ] + }, + { + "description": "heterogeneous enum-with-null validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 6, + null + ] }, - { - "description": "enum with false does not match 0", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [false] + "tests": [ + { + "description": "null is valid", + "data": null, + "valid": true, + "id": "326f454f3db2a5fb76d797b43c812285" + }, + { + "description": "number is valid", + "data": 6, + "valid": true, + "id": "9884c0daef3095b4ff88c309bc87a620" + }, + { + "description": "something else is invalid", + "data": "test", + "valid": false, + "id": "4032c1754a28b94e914f8dfea1e12a26" + } + ] + }, + { + "description": "enums in properties", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "foo": { + "enum": [ + "foo" + ] }, - "tests": [ - { - "description": "false is valid", - "data": false, - "valid": true - }, - { - "description": "integer zero is invalid", - "data": 0, - "valid": false - }, - { - "description": "float zero is invalid", - "data": 0.0, - "valid": false - } - ] + "bar": { + "enum": [ + "bar" + ] + } + }, + "required": [ + "bar" + ] }, - { - "description": "enum with [false] does not match [0]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [[false]] + "tests": [ + { + "description": "both properties are valid", + "data": { + "foo": "foo", + "bar": "bar" }, - "tests": [ - { - "description": "[false] is valid", - "data": [false], - "valid": true - }, - { - "description": "[0] is invalid", - "data": [0], - "valid": false - }, - { - "description": "[0.0] is invalid", - "data": [0.0], - "valid": false - } - ] - }, - { - "description": "enum with true does not match 1", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [true] + "valid": true, + "id": "dba127f9663272184ec3ea3072676b4d" + }, + { + "description": "wrong foo value", + "data": { + "foo": "foot", + "bar": "bar" }, - "tests": [ - { - "description": "true is valid", - "data": true, - "valid": true - }, - { - "description": "integer one is invalid", - "data": 1, - "valid": false - }, - { - "description": "float one is invalid", - "data": 1.0, - "valid": false - } - ] - }, - { - "description": "enum with [true] does not match [1]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [[true]] + "valid": false, + "id": "0f0cca9923128d29922561fe7d92a436" + }, + { + "description": "wrong bar value", + "data": { + "foo": "foo", + "bar": "bart" }, - "tests": [ - { - "description": "[true] is valid", - "data": [true], - "valid": true - }, - { - "description": "[1] is invalid", - "data": [1], - "valid": false - }, - { - "description": "[1.0] is invalid", - "data": [1.0], - "valid": false - } - ] - }, - { - "description": "enum with 0 does not match false", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [0] + "valid": false, + "id": "d32cef9094b8a87100a57cee099310d4" + }, + { + "description": "missing optional property is valid", + "data": { + "bar": "bar" }, - "tests": [ - { - "description": "false is invalid", - "data": false, - "valid": false - }, - { - "description": "integer zero is valid", - "data": 0, - "valid": true - }, - { - "description": "float zero is valid", - "data": 0.0, - "valid": true - } - ] - }, - { - "description": "enum with [0] does not match [false]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [[0]] + "valid": true, + "id": "23a7c86ef0b1e3cac9ebb6175de888d0" + }, + { + "description": "missing required property is invalid", + "data": { + "foo": "foo" }, - "tests": [ - { - "description": "[false] is invalid", - "data": [false], - "valid": false - }, - { - "description": "[0] is valid", - "data": [0], - "valid": true - }, - { - "description": "[0.0] is valid", - "data": [0.0], - "valid": true - } + "valid": false, + "id": "61ac5943d52ba688c77e26a1a7b5d174" + }, + { + "description": "missing all properties is invalid", + "data": {}, + "valid": false, + "id": "8b7be28a144634955b915ad780f4f2a5" + } + ] + }, + { + "description": "enum with escaped characters", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + "foo\nbar", + "foo\rbar" + ] + }, + "tests": [ + { + "description": "member 1 is valid", + "data": "foo\nbar", + "valid": true, + "id": "056ae2b9aad469dd32a63b1c97716c6e" + }, + { + "description": "member 2 is valid", + "data": "foo\rbar", + "valid": true, + "id": "ade764a27bb0fed294cefb1b6b275cd5" + }, + { + "description": "another string is invalid", + "data": "abc", + "valid": false, + "id": "1faca62e488e50dc47de0b3a26751477" + } + ] + }, + { + "description": "enum with false does not match 0", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + false + ] + }, + "tests": [ + { + "description": "false is valid", + "data": false, + "valid": true, + "id": "4e5b4da53732e4fdeaa5ed74127363bc" + }, + { + "description": "integer zero is invalid", + "data": 0, + "valid": false, + "id": "24f12f5bf7ae6be32a9634be17835176" + }, + { + "description": "float zero is invalid", + "data": 0, + "valid": false, + "id": "24f12f5bf7ae6be32a9634be17835176" + } + ] + }, + { + "description": "enum with [false] does not match [0]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + false ] + ] }, - { - "description": "enum with 1 does not match true", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [1] - }, - "tests": [ - { - "description": "true is invalid", - "data": true, - "valid": false - }, - { - "description": "integer one is valid", - "data": 1, - "valid": true - }, - { - "description": "float one is valid", - "data": 1.0, - "valid": true - } + "tests": [ + { + "description": "[false] is valid", + "data": [ + false + ], + "valid": true, + "id": "9fe1fb5471d006782fe7ead4aa9909fa" + }, + { + "description": "[0] is invalid", + "data": [ + 0 + ], + "valid": false, + "id": "8fc4591c8c9ddf9bd41a234d5fa24521" + }, + { + "description": "[0.0] is invalid", + "data": [ + 0 + ], + "valid": false, + "id": "8fc4591c8c9ddf9bd41a234d5fa24521" + } + ] + }, + { + "description": "enum with true does not match 1", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + true + ] + }, + "tests": [ + { + "description": "true is valid", + "data": true, + "valid": true, + "id": "71738e4d71680e268bbee31fc43a4932" + }, + { + "description": "integer one is invalid", + "data": 1, + "valid": false, + "id": "e8901b103bcc1340391efd3e02420500" + }, + { + "description": "float one is invalid", + "data": 1, + "valid": false, + "id": "e8901b103bcc1340391efd3e02420500" + } + ] + }, + { + "description": "enum with [true] does not match [1]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + true ] + ] }, - { - "description": "enum with [1] does not match [true]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [[1]] - }, - "tests": [ - { - "description": "[true] is invalid", - "data": [true], - "valid": false - }, - { - "description": "[1] is valid", - "data": [1], - "valid": true - }, - { - "description": "[1.0] is valid", - "data": [1.0], - "valid": true - } + "tests": [ + { + "description": "[true] is valid", + "data": [ + true + ], + "valid": true, + "id": "44049e91dee93b7dafd9cdbc0156a604" + }, + { + "description": "[1] is invalid", + "data": [ + 1 + ], + "valid": false, + "id": "f8b1b069fd03b04f07f5b70786cb916c" + }, + { + "description": "[1.0] is invalid", + "data": [ + 1 + ], + "valid": false, + "id": "f8b1b069fd03b04f07f5b70786cb916c" + } + ] + }, + { + "description": "enum with 0 does not match false", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 0 + ] + }, + "tests": [ + { + "description": "false is invalid", + "data": false, + "valid": false, + "id": "5cedc4948cc5d6744fa620039487ac15" + }, + { + "description": "integer zero is valid", + "data": 0, + "valid": true, + "id": "133e04205807df77ac09e730c237aba4" + }, + { + "description": "float zero is valid", + "data": 0, + "valid": true, + "id": "133e04205807df77ac09e730c237aba4" + } + ] + }, + { + "description": "enum with [0] does not match [false]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + 0 ] + ] }, - { - "description": "nul characters in strings", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ "hello\u0000there" ] - }, - "tests": [ - { - "description": "match string with nul", - "data": "hello\u0000there", - "valid": true - }, - { - "description": "do not match string lacking nul", - "data": "hellothere", - "valid": false - } + "tests": [ + { + "description": "[false] is invalid", + "data": [ + false + ], + "valid": false, + "id": "e6da8d988a7c265913e24eaed91af3de" + }, + { + "description": "[0] is valid", + "data": [ + 0 + ], + "valid": true, + "id": "10ba58a9539f8558892d28d2f5e3493d" + }, + { + "description": "[0.0] is valid", + "data": [ + 0 + ], + "valid": true, + "id": "10ba58a9539f8558892d28d2f5e3493d" + } + ] + }, + { + "description": "enum with 1 does not match true", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 1 + ] + }, + "tests": [ + { + "description": "true is invalid", + "data": true, + "valid": false, + "id": "a8356b24823e955bc3895c25b9e442eb" + }, + { + "description": "integer one is valid", + "data": 1, + "valid": true, + "id": "603d6607a05072c21bcbff4578494e22" + }, + { + "description": "float one is valid", + "data": 1, + "valid": true, + "id": "603d6607a05072c21bcbff4578494e22" + } + ] + }, + { + "description": "enum with [1] does not match [true]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + 1 ] - } + ] + }, + "tests": [ + { + "description": "[true] is invalid", + "data": [ + true + ], + "valid": false, + "id": "732eec1f5b7fdf6d24c40d77072628e3" + }, + { + "description": "[1] is valid", + "data": [ + 1 + ], + "valid": true, + "id": "8064c0569b7c7a17631d0dc802090303" + }, + { + "description": "[1.0] is valid", + "data": [ + 1 + ], + "valid": true, + "id": "8064c0569b7c7a17631d0dc802090303" + } + ] + }, + { + "description": "nul characters in strings", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + "hello\u0000there" + ] + }, + "tests": [ + { + "description": "match string with nul", + "data": "hello\u0000there", + "valid": true, + "id": "d94ca2719908ab9c789d7c71e4cc93e4" + }, + { + "description": "do not match string lacking nul", + "data": "hellothere", + "valid": false, + "id": "a2c7a2aa3202a473dc03b5a8fcc070e9" + } + ] + } ] From d2980e451a44296cb93b0022ae14dc3461e0b229 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Tue, 25 Nov 2025 16:08:09 +0530 Subject: [PATCH 02/25] Allow optional id property on tests in test-schema --- test-schema.json | 224 ++++++++++++++++++++++++----------------------- 1 file changed, 114 insertions(+), 110 deletions(-) diff --git a/test-schema.json b/test-schema.json index 0087c5e3..fee5a644 100644 --- a/test-schema.json +++ b/test-schema.json @@ -1,124 +1,128 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/tests/test-schema", - "description": "A schema for files contained within this suite", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json-schema.org/tests/test-schema", + "description": "A schema for files contained within this suite", - "type": "array", - "minItems": 1, - "items": { - "description": "An individual test case, containing multiple tests of a single schema's behavior", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual test case, containing multiple tests of a single schema's behavior", - "type": "object", - "required": [ "description", "schema", "tests" ], - "properties": { - "description": { - "description": "The test case description", - "type": "string" + "type": "object", + "required": ["description", "schema", "tests"], + "properties": { + "description": { + "description": "The test case description", + "type": "string" + }, + "comment": { + "description": "Any additional comments about the test case", + "type": "string" + }, + "schema": { + "description": "A valid JSON Schema (one written for the corresponding version directory that the file sits within)." + }, + "tests": { + "description": "A set of related tests all using the same schema", + "type": "array", + "items": { "$ref": "#/$defs/test" }, + "minItems": 1 + }, + "specification": { + "description": "A reference to a specification document which defines the behavior tested by this test case. Typically this should be a JSON Schema specification document, though in cases where the JSON Schema specification points to another RFC it should contain *both* the portion of the JSON Schema specification which indicates what RFC (and section) to follow as *well* as information on where in that specification the behavior is specified.", + + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "properties": { + "core": { + "description": "A section in official JSON Schema core drafts", + "url": "https://json-schema.org/specification-links", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" }, - "comment": { - "description": "Any additional comments about the test case", - "type": "string" + "validation": { + "description": "A section in official JSON Schema validation drafts", + "url": "https://json-schema.org/specification-links", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" }, - "schema": { - "description": "A valid JSON Schema (one written for the corresponding version directory that the file sits within)." + "ecma262": { + "description": "A section in official ECMA 262 specification for defining regular expressions", + "url": "https://262.ecma-international.org/", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" }, - "tests": { - "description": "A set of related tests all using the same schema", - "type": "array", - "items": { "$ref": "#/$defs/test" }, - "minItems": 1 + "perl5": { + "description": "A section name in Perl documentation for defining regular expressions", + "url": "https://perldoc.perl.org/perlre", + "type": "string" }, - "specification":{ - "description": "A reference to a specification document which defines the behavior tested by this test case. Typically this should be a JSON Schema specification document, though in cases where the JSON Schema specification points to another RFC it should contain *both* the portion of the JSON Schema specification which indicates what RFC (and section) to follow as *well* as information on where in that specification the behavior is specified.", - - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items":{ - "properties": { - "core": { - "description": "A section in official JSON Schema core drafts", - "url": "https://json-schema.org/specification-links", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type":"string" - }, - "validation": { - "description": "A section in official JSON Schema validation drafts", - "url": "https://json-schema.org/specification-links", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type":"string" - }, - "ecma262": { - "description": "A section in official ECMA 262 specification for defining regular expressions", - "url": "https://262.ecma-international.org/", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type":"string" - }, - "perl5": { - "description": "A section name in Perl documentation for defining regular expressions", - "url": "https://perldoc.perl.org/perlre", - "type":"string" - }, - "quote": { - "description": "Quote describing the test case", - "type":"string" - } - }, - "patternProperties": { - "^rfc\\d+$": { - "description": "A section in official RFC for the given rfc number", - "url": "https://www.rfc-editor.org/", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type":"string" - }, - "^iso\\d+$": { - "description": "A section in official ISO for the given iso number", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" - } - }, - "additionalProperties": { "type": "string" }, - "minProperties": 1, - "propertyNames": { - "oneOf": [ - { - "pattern": "^((iso)|(rfc))[0-9]+$" - }, - { - "enum": [ "core", "validation", "ecma262", "perl5", "quote" ] - } - ] - } - } + "quote": { + "description": "Quote describing the test case", + "type": "string" } - }, - "additionalProperties": false + }, + "patternProperties": { + "^rfc\\d+$": { + "description": "A section in official RFC for the given rfc number", + "url": "https://www.rfc-editor.org/", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "^iso\\d+$": { + "description": "A section in official ISO for the given iso number", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + } + }, + "additionalProperties": { "type": "string" }, + "minProperties": 1, + "propertyNames": { + "oneOf": [ + { + "pattern": "^((iso)|(rfc))[0-9]+$" + }, + { + "enum": ["core", "validation", "ecma262", "perl5", "quote"] + } + ] + } + } + } }, + "additionalProperties": false + }, - "$defs": { - "test": { - "description": "A single test", + "$defs": { + "test": { + "description": "A single test", - "type": "object", - "required": [ "description", "data", "valid" ], - "properties": { - "description": { - "description": "The test description, briefly explaining which behavior it exercises", - "type": "string" - }, - "comment": { - "description": "Any additional comments about the test", - "type": "string" - }, - "data": { - "description": "The instance which should be validated against the schema in \"schema\"." - }, - "valid": { - "description": "Whether the validation process of this instance should consider the instance valid or not", - "type": "boolean" - } - }, - "additionalProperties": false + "type": "object", + "required": ["description", "data", "valid"], + "properties": { + "description": { + "description": "The test description, briefly explaining which behavior it exercises", + "type": "string" + }, + "comment": { + "description": "Any additional comments about the test", + "type": "string" + }, + "data": { + "description": "The instance which should be validated against the schema in \"schema\"." + }, + "valid": { + "description": "Whether the validation process of this instance should consider the instance valid or not", + "type": "boolean" + }, + "id": { + "description": "Stable identifier for this test", + "type": "string" } + }, + "additionalProperties": false } + } } From 8b990ad0c5f3bea708ebdcc67617e04dfd9dc306 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Wed, 17 Dec 2025 17:39:14 +0530 Subject: [PATCH 03/25] Fix script based on reviews --- scripts/add-test-ids.js | 75 ++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/scripts/add-test-ids.js b/scripts/add-test-ids.js index 295414e2..ce1ab879 100644 --- a/scripts/add-test-ids.js +++ b/scripts/add-test-ids.js @@ -5,20 +5,13 @@ import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; const DIALECT_MAP = { - "https://json-schema.org/draft/2020-12/schema": "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema": "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#": "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#": "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#": "http://json-schema.org/draft-04/schema#" + "draft2020-12": "https://json-schema.org/draft/2020-12/schema", + "draft2019-09": "https://json-schema.org/draft/2019-09/schema", + "draft7": "http://json-schema.org/draft-07/schema#", + "draft6": "http://json-schema.org/draft-06/schema#", + "draft4": "http://json-schema.org/draft-04/schema#" }; -function getDialectUri(schema) { - if (schema.$schema && DIALECT_MAP[schema.$schema]) { - return DIALECT_MAP[schema.$schema]; - } - return "https://json-schema.org/draft/2020-12/schema"; -} - function generateTestId(normalizedSchema, testData, testValid) { return crypto .createHash("md5") @@ -26,49 +19,55 @@ function generateTestId(normalizedSchema, testData, testValid) { .digest("hex"); } -async function addIdsToFile(filePath) { +async function addIdsToFile(filePath, dialectUri) { console.log("Reading:", filePath); const tests = JSON.parse(fs.readFileSync(filePath, "utf8")); - let changed = false; let added = 0; - if (!Array.isArray(tests)) { - console.log("Expected an array at top level, got:", typeof tests); - return; - } - for (const testCase of tests) { - if (!Array.isArray(testCase.tests)) continue; - - const dialectUri = getDialectUri(testCase.schema || {}); - const normalizedSchema = await normalize(testCase.schema || true, dialectUri); + // Pass dialectUri from directory, not from schema + // @hyperjump/json-schema handles the schema's $schema internally + const normalizedSchema = await normalize(testCase.schema, dialectUri); for (const test of testCase.tests) { if (!test.id) { test.id = generateTestId(normalizedSchema, test.data, test.valid); - changed = true; added++; } } } - if (changed) { - fs.writeFileSync(filePath, JSON.stringify(tests, null, 2) + "\n"); - console.log(`✓ Added ${added} IDs`); + if (added > 0) { + fs.writeFileSync(filePath, JSON.stringify(tests, null, 4) + "\n"); + console.log(` Added ${added} IDs`); } else { - console.log("✓ All tests already have IDs"); + console.log(" All tests already have IDs"); } } -// Load remotes for all dialects -const remotesPaths = ["./remotes"]; -for (const dialectUri of Object.values(DIALECT_MAP)) { - for (const path of remotesPaths) { - if (fs.existsSync(path)) { - loadRemotes(dialectUri, path); - } - } +// Get dialect from command line argument (e.g., "draft2020-12") +const dialectArg = process.argv[2]; +if (!dialectArg || !DIALECT_MAP[dialectArg]) { + console.error("Usage: node add-test-ids.js [file-path]"); + console.error("Available dialects:", Object.keys(DIALECT_MAP).join(", ")); + process.exit(1); } -const filePath = process.argv[2] || "tests/draft2020-12/enum.json"; -addIdsToFile(filePath).catch(console.error); \ No newline at end of file +const dialectUri = DIALECT_MAP[dialectArg]; +const filePath = process.argv[3]; + +// Load remotes only for the specified dialect +loadRemotes(dialectUri, "./remotes"); + +if (filePath) { + // Process single file + addIdsToFile(filePath, dialectUri); +} else { + // Process all files in the dialect directory + const testDir = `tests/${dialectArg}`; + const files = fs.readdirSync(testDir).filter(f => f.endsWith('.json')); + + for (const file of files) { + await addIdsToFile(`${testDir}/${file}`, dialectUri); + } +} \ No newline at end of file From 7a2270be4db5aa861e8605c62834b9d4d639e1da Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Tue, 6 Jan 2026 00:31:16 +0530 Subject: [PATCH 04/25] adding jsoc-parser and updating according to the reviews --- scripts/add-test-ids.js | 57 +++++++++++----- scripts/check-test-ids.js | 137 +++++++++++++++++++------------------- scripts/load-remotes.js | 15 ++++- 3 files changed, 121 insertions(+), 88 deletions(-) diff --git a/scripts/add-test-ids.js b/scripts/add-test-ids.js index ce1ab879..e0fd996d 100644 --- a/scripts/add-test-ids.js +++ b/scripts/add-test-ids.js @@ -1,9 +1,11 @@ import * as fs from "node:fs"; import * as crypto from "node:crypto"; import jsonStringify from "json-stringify-deterministic"; +import { parse, modify, applyEdits } from "jsonc-parser"; import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; + const DIALECT_MAP = { "draft2020-12": "https://json-schema.org/draft/2020-12/schema", "draft2019-09": "https://json-schema.org/draft/2019-09/schema", @@ -12,40 +14,67 @@ const DIALECT_MAP = { "draft4": "http://json-schema.org/draft-04/schema#" }; + function generateTestId(normalizedSchema, testData, testValid) { return crypto .createHash("md5") - .update(jsonStringify(normalizedSchema) + jsonStringify(testData) + testValid) + .update( + jsonStringify(normalizedSchema) + + jsonStringify(testData) + + testValid + ) .digest("hex"); } async function addIdsToFile(filePath, dialectUri) { console.log("Reading:", filePath); - const tests = JSON.parse(fs.readFileSync(filePath, "utf8")); + + const text = fs.readFileSync(filePath, "utf8"); + const tests = parse(text); + let edits = []; let added = 0; - for (const testCase of tests) { - // Pass dialectUri from directory, not from schema - // @hyperjump/json-schema handles the schema's $schema internally + for (let i = 0; i < tests.length; i++) { + const testCase = tests[i]; const normalizedSchema = await normalize(testCase.schema, dialectUri); - for (const test of testCase.tests) { + for (let j = 0; j < testCase.tests.length; j++) { + const test = testCase.tests[j]; + if (!test.id) { - test.id = generateTestId(normalizedSchema, test.data, test.valid); + const id = generateTestId( + normalizedSchema, + test.data, + test.valid + ); + + const path = [i, "tests", j, "id"]; + + edits.push( + ...modify(text, path, id, { + formattingOptions: { + insertSpaces: true, + tabSize: 2 + } + }) + ); + added++; } } } if (added > 0) { - fs.writeFileSync(filePath, JSON.stringify(tests, null, 4) + "\n"); + const updatedText = applyEdits(text, edits); + fs.writeFileSync(filePath, updatedText); console.log(` Added ${added} IDs`); } else { console.log(" All tests already have IDs"); } } -// Get dialect from command line argument (e.g., "draft2020-12") +//CLI stuff + const dialectArg = process.argv[2]; if (!dialectArg || !DIALECT_MAP[dialectArg]) { console.error("Usage: node add-test-ids.js [file-path]"); @@ -60,14 +89,12 @@ const filePath = process.argv[3]; loadRemotes(dialectUri, "./remotes"); if (filePath) { - // Process single file - addIdsToFile(filePath, dialectUri); + await addIdsToFile(filePath, dialectUri); } else { - // Process all files in the dialect directory const testDir = `tests/${dialectArg}`; - const files = fs.readdirSync(testDir).filter(f => f.endsWith('.json')); - + const files = fs.readdirSync(testDir).filter(f => f.endsWith(".json")); + for (const file of files) { await addIdsToFile(`${testDir}/${file}`, dialectUri); } -} \ No newline at end of file +} diff --git a/scripts/check-test-ids.js b/scripts/check-test-ids.js index feed6513..3001536d 100644 --- a/scripts/check-test-ids.js +++ b/scripts/check-test-ids.js @@ -5,13 +5,8 @@ import jsonStringify from "json-stringify-deterministic"; import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; -const DIALECT_MAP = { - "https://json-schema.org/draft/2020-12/schema": "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema": "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#": "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#": "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#": "http://json-schema.org/draft-04/schema#" -}; + +// Helpers function* jsonFiles(dir) { for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { @@ -24,102 +19,105 @@ function* jsonFiles(dir) { } } -function getDialectUri(schema) { - if (schema.$schema && DIALECT_MAP[schema.$schema]) { - return DIALECT_MAP[schema.$schema]; +function dialectFromDir(dir) { + const draft = path.basename(dir); + + switch (draft) { + case "draft2020-12": + return "https://json-schema.org/draft/2020-12/schema"; + case "draft2019-09": + return "https://json-schema.org/draft/2019-09/schema"; + case "draft7": + return "http://json-schema.org/draft-07/schema#"; + case "draft6": + return "http://json-schema.org/draft-06/schema#"; + case "draft4": + return "http://json-schema.org/draft-04/schema#"; + default: + throw new Error(`Unknown draft directory: ${draft}`); } - return "https://json-schema.org/draft/2020-12/schema"; } function generateTestId(normalizedSchema, testData, testValid) { return crypto .createHash("md5") - .update(jsonStringify(normalizedSchema) + jsonStringify(testData) + testValid) + .update( + jsonStringify(normalizedSchema) + + jsonStringify(testData) + + testValid + ) .digest("hex"); } + + async function checkVersion(dir) { const missingIdFiles = new Set(); - const duplicateIdFiles = new Set(); const mismatchedIdFiles = new Set(); - const idMap = new Map(); - console.log(`Checking tests in ${dir}...`); + const dialectUri = dialectFromDir(dir); - for (const file of jsonFiles(dir)) { - const tests = JSON.parse(fs.readFileSync(file, "utf8")); + console.log(`Checking tests in ${dir}...`); + console.log(`Using dialect: ${dialectUri}`); - for (let i = 0; i < tests.length; i++) { - const testCase = tests[i]; - if (!Array.isArray(testCase.tests)) continue; + // Load remotes ONCE for this dialect + const remotesPath = "./remotes"; + if (fs.existsSync(remotesPath)) { + loadRemotes(dialectUri, remotesPath); + } - const dialectUri = getDialectUri(testCase.schema || {}); - const normalizedSchema = await normalize(testCase.schema || true, dialectUri); + for (const file of jsonFiles(dir)) { + const testCases = JSON.parse(fs.readFileSync(file, "utf8")); - for (let j = 0; j < testCase.tests.length; j++) { - const test = testCase.tests[j]; + for (const testCase of testCases) { + const normalizedSchema = await normalize(testCase.schema, dialectUri); + for (const test of testCase.tests) { if (!test.id) { missingIdFiles.add(file); - console.log(` ✗ Missing ID: ${file} | ${testCase.description} | ${test.description}`); + console.log( + ` ✗ Missing ID: ${file} | ${testCase.description} | ${test.description}` + ); continue; } - const expectedId = generateTestId(normalizedSchema, test.data, test.valid); + const expectedId = generateTestId( + normalizedSchema, + test.data, + test.valid + ); if (test.id !== expectedId) { mismatchedIdFiles.add(file); console.log(` ✗ Mismatched ID: ${file}`); - console.log(` Test: ${testCase.description} | ${test.description}`); + console.log( + ` Test: ${testCase.description} | ${test.description}` + ); console.log(` Current ID: ${test.id}`); console.log(` Expected ID: ${expectedId}`); } - - if (idMap.has(test.id)) { - const existing = idMap.get(test.id); - duplicateIdFiles.add(file); - duplicateIdFiles.add(existing.file); - console.log(` ✗ Duplicate ID: ${test.id}`); - console.log(` First: ${existing.file} | ${existing.testCase} | ${existing.test}`); - console.log(` Second: ${file} | ${testCase.description} | ${test.description}`); - } else { - idMap.set(test.id, { - file, - testCase: testCase.description, - test: test.description - }); - } } } } + //Summary console.log("\n" + "=".repeat(60)); console.log("Summary:"); console.log("=".repeat(60)); console.log("\nFiles with missing IDs:"); - if (missingIdFiles.size === 0) { - console.log(" ✓ None"); - } else { - for (const f of missingIdFiles) console.log(` - ${f}`); - } + missingIdFiles.size === 0 + ? console.log(" ✓ None") + : [...missingIdFiles].forEach(f => console.log(` - ${f}`)); console.log("\nFiles with mismatched IDs:"); - if (mismatchedIdFiles.size === 0) { - console.log(" ✓ None"); - } else { - for (const f of mismatchedIdFiles) console.log(` - ${f}`); - } + mismatchedIdFiles.size === 0 + ? console.log(" ✓ None") + : [...mismatchedIdFiles].forEach(f => console.log(` - ${f}`)); - console.log("\nFiles with duplicate IDs:"); - if (duplicateIdFiles.size === 0) { - console.log(" ✓ None"); - } else { - for (const f of duplicateIdFiles) console.log(` - ${f}`); - } + const hasErrors = + missingIdFiles.size > 0 || mismatchedIdFiles.size > 0; - const hasErrors = missingIdFiles.size > 0 || mismatchedIdFiles.size > 0 || duplicateIdFiles.size > 0; - console.log("\n" + "=".repeat(60)); if (hasErrors) { console.log("❌ Check failed - issues found"); @@ -129,15 +127,14 @@ async function checkVersion(dir) { } } -// Load remotes -const remotesPaths = ["./remotes"]; -for (const dialectUri of Object.values(DIALECT_MAP)) { - for (const path of remotesPaths) { - if (fs.existsSync(path)) { - loadRemotes(dialectUri, path); - } - } + +// CLI + + +const dir = process.argv[2]; +if (!dir) { + console.error("Usage: node scripts/check-test-ids.js "); + process.exit(1); } -const dir = process.argv[2] || "tests/draft2020-12"; -checkVersion(dir).catch(console.error); \ No newline at end of file +await checkVersion(dir); diff --git a/scripts/load-remotes.js b/scripts/load-remotes.js index f7ab7aff..eb775cbf 100644 --- a/scripts/load-remotes.js +++ b/scripts/load-remotes.js @@ -17,20 +17,29 @@ export const loadRemotes = (dialectId, filePath, url = "") => { const remotePath = `${filePath}/${entry.name}`; const remoteUrl = `http://localhost:1234${url}/${entry.name}`; - // If we've already registered this URL once, skip it + // Skip if already registered if (loadedRemotes.has(remoteUrl)) { return; } const remote = JSON.parse(fs.readFileSync(remotePath, "utf8")); + // FIXEDhere + if (typeof remote.$id === "string" && remote.$id.startsWith("file:")) { + remote.$id = remote.$id.replace(/^file:/, "x-file:"); + } + // Only register if $schema matches dialect OR there's no $schema if (!remote.$schema || toAbsoluteIri(remote.$schema) === dialectId) { registerSchema(remote, remoteUrl, dialectId); - loadedRemotes.add(remoteUrl); // ✅ Remember we've registered it + loadedRemotes.add(remoteUrl); } } else if (entry.isDirectory()) { - loadRemotes(dialectId, `${filePath}/${entry.name}`, `${url}/${entry.name}`); + loadRemotes( + dialectId, + `${filePath}/${entry.name}`, + `${url}/${entry.name}` + ); } }); }; From 6cc0f8f144be2d880cd572c655d9deb47b28333e Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Fri, 9 Jan 2026 02:03:15 +0530 Subject: [PATCH 05/25] minor changes as per review --- node_modules/.bin/uuid | 16 + node_modules/.bin/uuid.cmd | 17 + node_modules/.bin/uuid.ps1 | 28 + node_modules/.package-lock.json | 156 ++ .../@hyperjump/browser/.gitattributes | 1 + node_modules/@hyperjump/browser/LICENCE | 21 + node_modules/@hyperjump/browser/README.md | 249 +++ node_modules/@hyperjump/browser/package.json | 57 + node_modules/@hyperjump/json-pointer/LICENSE | 21 + .../@hyperjump/json-pointer/README.md | 102 + .../@hyperjump/json-pointer/package.json | 32 + .../@hyperjump/json-schema-formats/LICENSE | 21 + .../@hyperjump/json-schema-formats/README.md | 42 + .../json-schema-formats/package.json | 60 + .../json-schema-formats/src/date-math.js | 120 ++ .../draft-bhutton-relative-json-pointer-00.js | 18 + .../json-schema-formats/src/ecma262.js | 13 + .../json-schema-formats/src/index.d.ts | 170 ++ .../json-schema-formats/src/index.js | 33 + .../json-schema-formats/src/rfc1123.js | 13 + .../json-schema-formats/src/rfc2673.js | 12 + .../json-schema-formats/src/rfc3339.js | 78 + .../json-schema-formats/src/rfc3986.js | 17 + .../json-schema-formats/src/rfc3987.js | 17 + .../json-schema-formats/src/rfc4122.js | 20 + .../json-schema-formats/src/rfc4291.js | 18 + .../json-schema-formats/src/rfc5321.js | 46 + .../json-schema-formats/src/rfc6531.js | 55 + .../json-schema-formats/src/rfc6570.js | 38 + .../json-schema-formats/src/rfc6901.js | 14 + .../json-schema-formats/src/uts46.js | 20 + node_modules/@hyperjump/json-schema/LICENSE | 21 + node_modules/@hyperjump/json-schema/README.md | 966 ++++++++++ .../annotations/annotated-instance.d.ts | 4 + .../annotations/annotated-instance.js | 20 + .../json-schema/annotations/index.d.ts | 21 + .../json-schema/annotations/index.js | 45 + .../json-schema/annotations/test-utils.d.ts | 1 + .../json-schema/annotations/test-utils.js | 38 + .../annotations/validation-error.js | 7 + .../@hyperjump/json-schema/bundle/index.d.ts | 14 + .../@hyperjump/json-schema/bundle/index.js | 83 + .../json-schema/draft-04/additionalItems.js | 38 + .../json-schema/draft-04/dependencies.js | 36 + .../json-schema/draft-04/exclusiveMaximum.js | 5 + .../json-schema/draft-04/exclusiveMinimum.js | 5 + .../@hyperjump/json-schema/draft-04/format.js | 31 + .../@hyperjump/json-schema/draft-04/id.js | 1 + .../json-schema/draft-04/index.d.ts | 43 + .../@hyperjump/json-schema/draft-04/index.js | 71 + .../@hyperjump/json-schema/draft-04/items.js | 57 + .../json-schema/draft-04/maximum.js | 25 + .../json-schema/draft-04/minimum.js | 25 + .../@hyperjump/json-schema/draft-04/ref.js | 1 + .../@hyperjump/json-schema/draft-04/schema.js | 149 ++ .../json-schema/draft-06/contains.js | 15 + .../@hyperjump/json-schema/draft-06/format.js | 34 + .../json-schema/draft-06/index.d.ts | 49 + .../@hyperjump/json-schema/draft-06/index.js | 70 + .../@hyperjump/json-schema/draft-06/schema.js | 154 ++ .../@hyperjump/json-schema/draft-07/format.js | 42 + .../json-schema/draft-07/index.d.ts | 55 + .../@hyperjump/json-schema/draft-07/index.js | 78 + .../@hyperjump/json-schema/draft-07/schema.js | 172 ++ .../draft-2019-09/format-assertion.js | 44 + .../json-schema/draft-2019-09/format.js | 44 + .../json-schema/draft-2019-09/index.d.ts | 66 + .../json-schema/draft-2019-09/index.js | 118 ++ .../draft-2019-09/meta/applicator.js | 55 + .../json-schema/draft-2019-09/meta/content.js | 17 + .../json-schema/draft-2019-09/meta/core.js | 57 + .../json-schema/draft-2019-09/meta/format.js | 14 + .../draft-2019-09/meta/meta-data.js | 37 + .../draft-2019-09/meta/validation.js | 98 + .../draft-2019-09/recursiveAnchor.js | 1 + .../json-schema/draft-2019-09/schema.js | 42 + .../draft-2020-12/dynamicAnchor.js | 1 + .../json-schema/draft-2020-12/dynamicRef.js | 38 + .../draft-2020-12/format-assertion.js | 43 + .../json-schema/draft-2020-12/format.js | 44 + .../json-schema/draft-2020-12/index.d.ts | 67 + .../json-schema/draft-2020-12/index.js | 126 ++ .../draft-2020-12/meta/applicator.js | 46 + .../json-schema/draft-2020-12/meta/content.js | 14 + .../json-schema/draft-2020-12/meta/core.js | 54 + .../draft-2020-12/meta/format-annotation.js | 11 + .../draft-2020-12/meta/format-assertion.js | 11 + .../draft-2020-12/meta/meta-data.js | 34 + .../draft-2020-12/meta/unevaluated.js | 12 + .../draft-2020-12/meta/validation.js | 95 + .../json-schema/draft-2020-12/schema.js | 44 + .../json-schema/formats/handlers/date-time.js | 7 + .../json-schema/formats/handlers/date.js | 7 + .../formats/handlers/draft-04/hostname.js | 7 + .../json-schema/formats/handlers/duration.js | 7 + .../json-schema/formats/handlers/email.js | 7 + .../json-schema/formats/handlers/hostname.js | 7 + .../json-schema/formats/handlers/idn-email.js | 7 + .../formats/handlers/idn-hostname.js | 7 + .../json-schema/formats/handlers/ipv4.js | 7 + .../json-schema/formats/handlers/ipv6.js | 7 + .../formats/handlers/iri-reference.js | 7 + .../json-schema/formats/handlers/iri.js | 7 + .../formats/handlers/json-pointer.js | 7 + .../json-schema/formats/handlers/regex.js | 7 + .../formats/handlers/relative-json-pointer.js | 7 + .../json-schema/formats/handlers/time.js | 7 + .../formats/handlers/uri-reference.js | 7 + .../formats/handlers/uri-template.js | 7 + .../json-schema/formats/handlers/uri.js | 7 + .../json-schema/formats/handlers/uuid.js | 7 + .../@hyperjump/json-schema/formats/index.js | 11 + .../@hyperjump/json-schema/formats/lite.js | 38 + .../json-schema/openapi-3-0/dialect.js | 174 ++ .../json-schema/openapi-3-0/discriminator.js | 10 + .../json-schema/openapi-3-0/example.js | 10 + .../json-schema/openapi-3-0/externalDocs.js | 10 + .../json-schema/openapi-3-0/index.d.ts | 298 +++ .../json-schema/openapi-3-0/index.js | 77 + .../json-schema/openapi-3-0/nullable.js | 10 + .../json-schema/openapi-3-0/schema.js | 1368 ++++++++++++++ .../json-schema/openapi-3-0/type.js | 22 + .../@hyperjump/json-schema/openapi-3-0/xml.js | 10 + .../json-schema/openapi-3-1/dialect/base.js | 22 + .../json-schema/openapi-3-1/index.d.ts | 364 ++++ .../json-schema/openapi-3-1/index.js | 49 + .../json-schema/openapi-3-1/meta/base.js | 77 + .../json-schema/openapi-3-1/schema-base.js | 33 + .../openapi-3-1/schema-draft-04.js | 33 + .../openapi-3-1/schema-draft-06.js | 33 + .../openapi-3-1/schema-draft-07.js | 33 + .../openapi-3-1/schema-draft-2019-09.js | 33 + .../openapi-3-1/schema-draft-2020-12.js | 33 + .../json-schema/openapi-3-1/schema.js | 1407 ++++++++++++++ .../json-schema/openapi-3-2/dialect/base.js | 22 + .../json-schema/openapi-3-2/index.d.ts | 415 ++++ .../json-schema/openapi-3-2/index.js | 47 + .../json-schema/openapi-3-2/meta/base.js | 102 + .../json-schema/openapi-3-2/schema-base.js | 32 + .../openapi-3-2/schema-draft-04.js | 33 + .../openapi-3-2/schema-draft-06.js | 33 + .../openapi-3-2/schema-draft-07.js | 33 + .../openapi-3-2/schema-draft-2019-09.js | 33 + .../openapi-3-2/schema-draft-2020-12.js | 33 + .../json-schema/openapi-3-2/schema.js | 1665 +++++++++++++++++ .../@hyperjump/json-schema/package.json | 83 + .../v1/extension-tests/conditional.json | 289 +++ .../v1/extension-tests/itemPattern.json | 462 +++++ .../@hyperjump/json-schema/v1/index.d.ts | 68 + .../@hyperjump/json-schema/v1/index.js | 116 ++ .../json-schema/v1/meta/applicator.js | 73 + .../@hyperjump/json-schema/v1/meta/content.js | 10 + .../@hyperjump/json-schema/v1/meta/core.js | 50 + .../@hyperjump/json-schema/v1/meta/format.js | 8 + .../json-schema/v1/meta/meta-data.js | 14 + .../json-schema/v1/meta/unevaluated.js | 9 + .../json-schema/v1/meta/validation.js | 65 + .../@hyperjump/json-schema/v1/schema.js | 24 + node_modules/@hyperjump/pact/LICENSE | 21 + node_modules/@hyperjump/pact/README.md | 76 + node_modules/@hyperjump/pact/package.json | 45 + node_modules/@hyperjump/pact/src/async.js | 24 + node_modules/@hyperjump/pact/src/curry.d.ts | 13 + node_modules/@hyperjump/pact/src/curry.js | 15 + node_modules/@hyperjump/pact/src/index.d.ts | 443 +++++ node_modules/@hyperjump/pact/src/index.js | 487 +++++ .../@hyperjump/pact/src/type-utils.d.ts | 5 + node_modules/@hyperjump/uri/LICENSE | 21 + node_modules/@hyperjump/uri/README.md | 129 ++ node_modules/@hyperjump/uri/package.json | 39 + node_modules/content-type/HISTORY.md | 29 + node_modules/content-type/LICENSE | 22 + node_modules/content-type/README.md | 94 + node_modules/content-type/index.js | 225 +++ node_modules/content-type/package.json | 42 + node_modules/idn-hostname/#/tests/0/0.json | 5 + node_modules/idn-hostname/#/tests/0/1.json | 5 + node_modules/idn-hostname/#/tests/0/10.json | 5 + node_modules/idn-hostname/#/tests/0/11.json | 5 + node_modules/idn-hostname/#/tests/0/12.json | 5 + node_modules/idn-hostname/#/tests/0/13.json | 5 + node_modules/idn-hostname/#/tests/0/14.json | 5 + node_modules/idn-hostname/#/tests/0/15.json | 5 + node_modules/idn-hostname/#/tests/0/16.json | 5 + node_modules/idn-hostname/#/tests/0/17.json | 5 + node_modules/idn-hostname/#/tests/0/18.json | 5 + node_modules/idn-hostname/#/tests/0/19.json | 5 + node_modules/idn-hostname/#/tests/0/2.json | 5 + node_modules/idn-hostname/#/tests/0/20.json | 6 + node_modules/idn-hostname/#/tests/0/21.json | 6 + node_modules/idn-hostname/#/tests/0/22.json | 6 + node_modules/idn-hostname/#/tests/0/23.json | 6 + node_modules/idn-hostname/#/tests/0/24.json | 6 + node_modules/idn-hostname/#/tests/0/25.json | 6 + node_modules/idn-hostname/#/tests/0/26.json | 6 + node_modules/idn-hostname/#/tests/0/27.json | 6 + node_modules/idn-hostname/#/tests/0/28.json | 6 + node_modules/idn-hostname/#/tests/0/29.json | 6 + node_modules/idn-hostname/#/tests/0/3.json | 5 + node_modules/idn-hostname/#/tests/0/30.json | 6 + node_modules/idn-hostname/#/tests/0/31.json | 6 + node_modules/idn-hostname/#/tests/0/32.json | 6 + node_modules/idn-hostname/#/tests/0/33.json | 6 + node_modules/idn-hostname/#/tests/0/34.json | 6 + node_modules/idn-hostname/#/tests/0/35.json | 6 + node_modules/idn-hostname/#/tests/0/36.json | 6 + node_modules/idn-hostname/#/tests/0/37.json | 6 + node_modules/idn-hostname/#/tests/0/38.json | 6 + node_modules/idn-hostname/#/tests/0/39.json | 6 + node_modules/idn-hostname/#/tests/0/4.json | 5 + node_modules/idn-hostname/#/tests/0/40.json | 6 + node_modules/idn-hostname/#/tests/0/41.json | 6 + node_modules/idn-hostname/#/tests/0/42.json | 6 + node_modules/idn-hostname/#/tests/0/43.json | 6 + node_modules/idn-hostname/#/tests/0/44.json | 6 + node_modules/idn-hostname/#/tests/0/45.json | 6 + node_modules/idn-hostname/#/tests/0/46.json | 6 + node_modules/idn-hostname/#/tests/0/47.json | 6 + node_modules/idn-hostname/#/tests/0/48.json | 6 + node_modules/idn-hostname/#/tests/0/49.json | 6 + node_modules/idn-hostname/#/tests/0/5.json | 5 + node_modules/idn-hostname/#/tests/0/50.json | 6 + node_modules/idn-hostname/#/tests/0/51.json | 6 + node_modules/idn-hostname/#/tests/0/52.json | 6 + node_modules/idn-hostname/#/tests/0/53.json | 6 + node_modules/idn-hostname/#/tests/0/54.json | 6 + node_modules/idn-hostname/#/tests/0/55.json | 6 + node_modules/idn-hostname/#/tests/0/56.json | 6 + node_modules/idn-hostname/#/tests/0/57.json | 6 + node_modules/idn-hostname/#/tests/0/58.json | 6 + node_modules/idn-hostname/#/tests/0/59.json | 6 + node_modules/idn-hostname/#/tests/0/6.json | 5 + node_modules/idn-hostname/#/tests/0/60.json | 6 + node_modules/idn-hostname/#/tests/0/61.json | 6 + node_modules/idn-hostname/#/tests/0/62.json | 6 + node_modules/idn-hostname/#/tests/0/63.json | 5 + node_modules/idn-hostname/#/tests/0/64.json | 5 + node_modules/idn-hostname/#/tests/0/65.json | 5 + node_modules/idn-hostname/#/tests/0/66.json | 5 + node_modules/idn-hostname/#/tests/0/67.json | 5 + node_modules/idn-hostname/#/tests/0/68.json | 5 + node_modules/idn-hostname/#/tests/0/69.json | 5 + node_modules/idn-hostname/#/tests/0/7.json | 5 + node_modules/idn-hostname/#/tests/0/70.json | 5 + node_modules/idn-hostname/#/tests/0/71.json | 5 + node_modules/idn-hostname/#/tests/0/72.json | 5 + node_modules/idn-hostname/#/tests/0/73.json | 5 + node_modules/idn-hostname/#/tests/0/74.json | 5 + node_modules/idn-hostname/#/tests/0/75.json | 5 + node_modules/idn-hostname/#/tests/0/76.json | 5 + node_modules/idn-hostname/#/tests/0/77.json | 5 + node_modules/idn-hostname/#/tests/0/78.json | 5 + node_modules/idn-hostname/#/tests/0/79.json | 5 + node_modules/idn-hostname/#/tests/0/8.json | 5 + node_modules/idn-hostname/#/tests/0/80.json | 5 + node_modules/idn-hostname/#/tests/0/81.json | 5 + node_modules/idn-hostname/#/tests/0/82.json | 5 + node_modules/idn-hostname/#/tests/0/83.json | 5 + node_modules/idn-hostname/#/tests/0/84.json | 5 + node_modules/idn-hostname/#/tests/0/85.json | 5 + node_modules/idn-hostname/#/tests/0/86.json | 5 + node_modules/idn-hostname/#/tests/0/87.json | 5 + node_modules/idn-hostname/#/tests/0/88.json | 5 + node_modules/idn-hostname/#/tests/0/89.json | 5 + node_modules/idn-hostname/#/tests/0/9.json | 5 + node_modules/idn-hostname/#/tests/0/90.json | 5 + node_modules/idn-hostname/#/tests/0/91.json | 5 + node_modules/idn-hostname/#/tests/0/92.json | 5 + node_modules/idn-hostname/#/tests/0/93.json | 5 + node_modules/idn-hostname/#/tests/0/94.json | 5 + node_modules/idn-hostname/#/tests/0/95.json | 6 + .../idn-hostname/#/tests/0/schema.json | 4 + node_modules/idn-hostname/LICENSE | 21 + .../idn-hostname/idnaMappingTableCompact.json | 1 + node_modules/idn-hostname/index.d.ts | 32 + node_modules/idn-hostname/index.js | 172 ++ node_modules/idn-hostname/package.json | 33 + node_modules/idn-hostname/readme.md | 302 +++ .../json-stringify-deterministic/LICENSE.md | 21 + .../json-stringify-deterministic/README.md | 143 ++ .../json-stringify-deterministic/package.json | 101 + node_modules/jsonc-parser/CHANGELOG.md | 76 + node_modules/jsonc-parser/LICENSE.md | 21 + node_modules/jsonc-parser/README.md | 364 ++++ node_modules/jsonc-parser/SECURITY.md | 41 + node_modules/jsonc-parser/package.json | 37 + node_modules/just-curry-it/CHANGELOG.md | 25 + node_modules/just-curry-it/LICENSE | 21 + node_modules/just-curry-it/README.md | 43 + node_modules/just-curry-it/index.cjs | 40 + node_modules/just-curry-it/index.d.ts | 18 + node_modules/just-curry-it/index.mjs | 42 + node_modules/just-curry-it/index.tests.ts | 72 + node_modules/just-curry-it/package.json | 32 + node_modules/just-curry-it/rollup.config.js | 3 + node_modules/punycode/LICENSE-MIT.txt | 20 + node_modules/punycode/README.md | 148 ++ node_modules/punycode/package.json | 58 + node_modules/punycode/punycode.es6.js | 444 +++++ node_modules/punycode/punycode.js | 443 +++++ node_modules/uuid/CHANGELOG.md | 274 +++ node_modules/uuid/CONTRIBUTING.md | 18 + node_modules/uuid/LICENSE.md | 9 + node_modules/uuid/README.md | 466 +++++ node_modules/uuid/package.json | 135 ++ node_modules/uuid/wrapper.mjs | 10 + package-lock.json | 172 ++ package.json | 3 + scripts/add-test-ids.js | 17 +- scripts/check-test-ids.js | 29 +- scripts/load-remotes.js | 18 +- scripts/normalize.js | 21 +- scripts/utils/generateTestIds.js | 13 + scripts/utils/jsonfiles.js | 11 + test-schema.json | 230 +-- tests/draft2020-12/enum.json | 860 ++++----- 316 files changed, 19804 insertions(+), 662 deletions(-) create mode 100644 node_modules/.bin/uuid create mode 100644 node_modules/.bin/uuid.cmd create mode 100644 node_modules/.bin/uuid.ps1 create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@hyperjump/browser/.gitattributes create mode 100644 node_modules/@hyperjump/browser/LICENCE create mode 100644 node_modules/@hyperjump/browser/README.md create mode 100644 node_modules/@hyperjump/browser/package.json create mode 100644 node_modules/@hyperjump/json-pointer/LICENSE create mode 100644 node_modules/@hyperjump/json-pointer/README.md create mode 100644 node_modules/@hyperjump/json-pointer/package.json create mode 100644 node_modules/@hyperjump/json-schema-formats/LICENSE create mode 100644 node_modules/@hyperjump/json-schema-formats/README.md create mode 100644 node_modules/@hyperjump/json-schema-formats/package.json create mode 100644 node_modules/@hyperjump/json-schema-formats/src/date-math.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/ecma262.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema-formats/src/index.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc1123.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc2673.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3339.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3986.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3987.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc4122.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc4291.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc5321.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6531.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6570.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6901.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/uts46.js create mode 100644 node_modules/@hyperjump/json-schema/LICENSE create mode 100644 node_modules/@hyperjump/json-schema/README.md create mode 100644 node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts create mode 100644 node_modules/@hyperjump/json-schema/annotations/annotated-instance.js create mode 100644 node_modules/@hyperjump/json-schema/annotations/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/annotations/index.js create mode 100644 node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts create mode 100644 node_modules/@hyperjump/json-schema/annotations/test-utils.js create mode 100644 node_modules/@hyperjump/json-schema/annotations/validation-error.js create mode 100644 node_modules/@hyperjump/json-schema/bundle/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/bundle/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/additionalItems.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/dependencies.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/id.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-04/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/items.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/maximum.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/minimum.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/ref.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/schema.js create mode 100644 node_modules/@hyperjump/json-schema/draft-06/contains.js create mode 100644 node_modules/@hyperjump/json-schema/draft-06/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-06/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-06/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-06/schema.js create mode 100644 node_modules/@hyperjump/json-schema/draft-07/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-07/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-07/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-07/schema.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/schema.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/schema.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/date-time.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/date.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/duration.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/email.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/hostname.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/iri.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/regex.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/time.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uuid.js create mode 100644 node_modules/@hyperjump/json-schema/formats/index.js create mode 100644 node_modules/@hyperjump/json-schema/formats/lite.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/example.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/index.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/schema.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/type.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/xml.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/index.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/index.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema.js create mode 100644 node_modules/@hyperjump/json-schema/package.json create mode 100644 node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json create mode 100644 node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json create mode 100644 node_modules/@hyperjump/json-schema/v1/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/v1/index.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/applicator.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/content.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/core.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/format.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/meta-data.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/validation.js create mode 100644 node_modules/@hyperjump/json-schema/v1/schema.js create mode 100644 node_modules/@hyperjump/pact/LICENSE create mode 100644 node_modules/@hyperjump/pact/README.md create mode 100644 node_modules/@hyperjump/pact/package.json create mode 100644 node_modules/@hyperjump/pact/src/async.js create mode 100644 node_modules/@hyperjump/pact/src/curry.d.ts create mode 100644 node_modules/@hyperjump/pact/src/curry.js create mode 100644 node_modules/@hyperjump/pact/src/index.d.ts create mode 100644 node_modules/@hyperjump/pact/src/index.js create mode 100644 node_modules/@hyperjump/pact/src/type-utils.d.ts create mode 100644 node_modules/@hyperjump/uri/LICENSE create mode 100644 node_modules/@hyperjump/uri/README.md create mode 100644 node_modules/@hyperjump/uri/package.json create mode 100644 node_modules/content-type/HISTORY.md create mode 100644 node_modules/content-type/LICENSE create mode 100644 node_modules/content-type/README.md create mode 100644 node_modules/content-type/index.js create mode 100644 node_modules/content-type/package.json create mode 100644 node_modules/idn-hostname/#/tests/0/0.json create mode 100644 node_modules/idn-hostname/#/tests/0/1.json create mode 100644 node_modules/idn-hostname/#/tests/0/10.json create mode 100644 node_modules/idn-hostname/#/tests/0/11.json create mode 100644 node_modules/idn-hostname/#/tests/0/12.json create mode 100644 node_modules/idn-hostname/#/tests/0/13.json create mode 100644 node_modules/idn-hostname/#/tests/0/14.json create mode 100644 node_modules/idn-hostname/#/tests/0/15.json create mode 100644 node_modules/idn-hostname/#/tests/0/16.json create mode 100644 node_modules/idn-hostname/#/tests/0/17.json create mode 100644 node_modules/idn-hostname/#/tests/0/18.json create mode 100644 node_modules/idn-hostname/#/tests/0/19.json create mode 100644 node_modules/idn-hostname/#/tests/0/2.json create mode 100644 node_modules/idn-hostname/#/tests/0/20.json create mode 100644 node_modules/idn-hostname/#/tests/0/21.json create mode 100644 node_modules/idn-hostname/#/tests/0/22.json create mode 100644 node_modules/idn-hostname/#/tests/0/23.json create mode 100644 node_modules/idn-hostname/#/tests/0/24.json create mode 100644 node_modules/idn-hostname/#/tests/0/25.json create mode 100644 node_modules/idn-hostname/#/tests/0/26.json create mode 100644 node_modules/idn-hostname/#/tests/0/27.json create mode 100644 node_modules/idn-hostname/#/tests/0/28.json create mode 100644 node_modules/idn-hostname/#/tests/0/29.json create mode 100644 node_modules/idn-hostname/#/tests/0/3.json create mode 100644 node_modules/idn-hostname/#/tests/0/30.json create mode 100644 node_modules/idn-hostname/#/tests/0/31.json create mode 100644 node_modules/idn-hostname/#/tests/0/32.json create mode 100644 node_modules/idn-hostname/#/tests/0/33.json create mode 100644 node_modules/idn-hostname/#/tests/0/34.json create mode 100644 node_modules/idn-hostname/#/tests/0/35.json create mode 100644 node_modules/idn-hostname/#/tests/0/36.json create mode 100644 node_modules/idn-hostname/#/tests/0/37.json create mode 100644 node_modules/idn-hostname/#/tests/0/38.json create mode 100644 node_modules/idn-hostname/#/tests/0/39.json create mode 100644 node_modules/idn-hostname/#/tests/0/4.json create mode 100644 node_modules/idn-hostname/#/tests/0/40.json create mode 100644 node_modules/idn-hostname/#/tests/0/41.json create mode 100644 node_modules/idn-hostname/#/tests/0/42.json create mode 100644 node_modules/idn-hostname/#/tests/0/43.json create mode 100644 node_modules/idn-hostname/#/tests/0/44.json create mode 100644 node_modules/idn-hostname/#/tests/0/45.json create mode 100644 node_modules/idn-hostname/#/tests/0/46.json create mode 100644 node_modules/idn-hostname/#/tests/0/47.json create mode 100644 node_modules/idn-hostname/#/tests/0/48.json create mode 100644 node_modules/idn-hostname/#/tests/0/49.json create mode 100644 node_modules/idn-hostname/#/tests/0/5.json create mode 100644 node_modules/idn-hostname/#/tests/0/50.json create mode 100644 node_modules/idn-hostname/#/tests/0/51.json create mode 100644 node_modules/idn-hostname/#/tests/0/52.json create mode 100644 node_modules/idn-hostname/#/tests/0/53.json create mode 100644 node_modules/idn-hostname/#/tests/0/54.json create mode 100644 node_modules/idn-hostname/#/tests/0/55.json create mode 100644 node_modules/idn-hostname/#/tests/0/56.json create mode 100644 node_modules/idn-hostname/#/tests/0/57.json create mode 100644 node_modules/idn-hostname/#/tests/0/58.json create mode 100644 node_modules/idn-hostname/#/tests/0/59.json create mode 100644 node_modules/idn-hostname/#/tests/0/6.json create mode 100644 node_modules/idn-hostname/#/tests/0/60.json create mode 100644 node_modules/idn-hostname/#/tests/0/61.json create mode 100644 node_modules/idn-hostname/#/tests/0/62.json create mode 100644 node_modules/idn-hostname/#/tests/0/63.json create mode 100644 node_modules/idn-hostname/#/tests/0/64.json create mode 100644 node_modules/idn-hostname/#/tests/0/65.json create mode 100644 node_modules/idn-hostname/#/tests/0/66.json create mode 100644 node_modules/idn-hostname/#/tests/0/67.json create mode 100644 node_modules/idn-hostname/#/tests/0/68.json create mode 100644 node_modules/idn-hostname/#/tests/0/69.json create mode 100644 node_modules/idn-hostname/#/tests/0/7.json create mode 100644 node_modules/idn-hostname/#/tests/0/70.json create mode 100644 node_modules/idn-hostname/#/tests/0/71.json create mode 100644 node_modules/idn-hostname/#/tests/0/72.json create mode 100644 node_modules/idn-hostname/#/tests/0/73.json create mode 100644 node_modules/idn-hostname/#/tests/0/74.json create mode 100644 node_modules/idn-hostname/#/tests/0/75.json create mode 100644 node_modules/idn-hostname/#/tests/0/76.json create mode 100644 node_modules/idn-hostname/#/tests/0/77.json create mode 100644 node_modules/idn-hostname/#/tests/0/78.json create mode 100644 node_modules/idn-hostname/#/tests/0/79.json create mode 100644 node_modules/idn-hostname/#/tests/0/8.json create mode 100644 node_modules/idn-hostname/#/tests/0/80.json create mode 100644 node_modules/idn-hostname/#/tests/0/81.json create mode 100644 node_modules/idn-hostname/#/tests/0/82.json create mode 100644 node_modules/idn-hostname/#/tests/0/83.json create mode 100644 node_modules/idn-hostname/#/tests/0/84.json create mode 100644 node_modules/idn-hostname/#/tests/0/85.json create mode 100644 node_modules/idn-hostname/#/tests/0/86.json create mode 100644 node_modules/idn-hostname/#/tests/0/87.json create mode 100644 node_modules/idn-hostname/#/tests/0/88.json create mode 100644 node_modules/idn-hostname/#/tests/0/89.json create mode 100644 node_modules/idn-hostname/#/tests/0/9.json create mode 100644 node_modules/idn-hostname/#/tests/0/90.json create mode 100644 node_modules/idn-hostname/#/tests/0/91.json create mode 100644 node_modules/idn-hostname/#/tests/0/92.json create mode 100644 node_modules/idn-hostname/#/tests/0/93.json create mode 100644 node_modules/idn-hostname/#/tests/0/94.json create mode 100644 node_modules/idn-hostname/#/tests/0/95.json create mode 100644 node_modules/idn-hostname/#/tests/0/schema.json create mode 100644 node_modules/idn-hostname/LICENSE create mode 100644 node_modules/idn-hostname/idnaMappingTableCompact.json create mode 100644 node_modules/idn-hostname/index.d.ts create mode 100644 node_modules/idn-hostname/index.js create mode 100644 node_modules/idn-hostname/package.json create mode 100644 node_modules/idn-hostname/readme.md create mode 100644 node_modules/json-stringify-deterministic/LICENSE.md create mode 100644 node_modules/json-stringify-deterministic/README.md create mode 100644 node_modules/json-stringify-deterministic/package.json create mode 100644 node_modules/jsonc-parser/CHANGELOG.md create mode 100644 node_modules/jsonc-parser/LICENSE.md create mode 100644 node_modules/jsonc-parser/README.md create mode 100644 node_modules/jsonc-parser/SECURITY.md create mode 100644 node_modules/jsonc-parser/package.json create mode 100644 node_modules/just-curry-it/CHANGELOG.md create mode 100644 node_modules/just-curry-it/LICENSE create mode 100644 node_modules/just-curry-it/README.md create mode 100644 node_modules/just-curry-it/index.cjs create mode 100644 node_modules/just-curry-it/index.d.ts create mode 100644 node_modules/just-curry-it/index.mjs create mode 100644 node_modules/just-curry-it/index.tests.ts create mode 100644 node_modules/just-curry-it/package.json create mode 100644 node_modules/just-curry-it/rollup.config.js create mode 100644 node_modules/punycode/LICENSE-MIT.txt create mode 100644 node_modules/punycode/README.md create mode 100644 node_modules/punycode/package.json create mode 100644 node_modules/punycode/punycode.es6.js create mode 100644 node_modules/punycode/punycode.js create mode 100644 node_modules/uuid/CHANGELOG.md create mode 100644 node_modules/uuid/CONTRIBUTING.md create mode 100644 node_modules/uuid/LICENSE.md create mode 100644 node_modules/uuid/README.md create mode 100644 node_modules/uuid/package.json create mode 100644 node_modules/uuid/wrapper.mjs create mode 100644 package-lock.json create mode 100644 scripts/utils/generateTestIds.js create mode 100644 scripts/utils/jsonfiles.js diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 100644 index 00000000..0c2d4696 --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@" +else + exec node "$basedir/../uuid/dist/bin/uuid" "$@" +fi diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd new file mode 100644 index 00000000..0f2376ea --- /dev/null +++ b/node_modules/.bin/uuid.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %* diff --git a/node_modules/.bin/uuid.ps1 b/node_modules/.bin/uuid.ps1 new file mode 100644 index 00000000..78046284 --- /dev/null +++ b/node_modules/.bin/uuid.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args + } else { + & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args + } else { + & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 00000000..a7b6eda0 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,156 @@ +{ + "name": "json-schema-test-suite", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@hyperjump/browser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.1.tgz", + "integrity": "sha512-Le5XZUjnVqVjkgLYv6yyWgALat/0HpB1XaCPuCZ+GCFki9NvXloSZITIJ0H+wRW7mb9At1SxvohKBbNQbrr/cw==", + "license": "MIT", + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.5", + "just-curry-it": "^5.3.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-pointer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.1.tgz", + "integrity": "sha512-M0T3s7TC2JepoWPMZQn1W6eYhFh06OXwpMqL+8c5wMVpvnCKNsPgpu9u7WyCI03xVQti8JAeAy4RzUa6SYlJLA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-schema": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.2.tgz", + "integrity": "sha512-pCysQu2kPZFcqyJmiU5JauzPHQIQa9i9F7+S5ui8OiwcdsBZUOjdY1rfSnqgaM5sNeR3akNVXKB/WgxNEnJrWw==", + "license": "MIT", + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/json-schema-formats": "^1.0.0", + "@hyperjump/pact": "^1.2.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.4", + "json-stringify-deterministic": "^1.0.12", + "just-curry-it": "^5.3.0", + "uuid": "^9.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "peerDependencies": { + "@hyperjump/browser": "^1.1.0" + } + }, + "node_modules/@hyperjump/json-schema-formats": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-formats/-/json-schema-formats-1.0.1.tgz", + "integrity": "sha512-qvcIxysnMfcPxyPSFFzzo28o2BN1CNT5b0tQXNUP0kaFpvptQNDg8SCLvlnMg2sYxuiuqna8+azGBaBthiskAw==", + "license": "MIT", + "dependencies": { + "@hyperjump/uri": "^1.3.2", + "idn-hostname": "^15.1.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/hyperjump-io" + } + }, + "node_modules/@hyperjump/pact": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.4.0.tgz", + "integrity": "sha512-01Q7VY6BcAkp9W31Fv+ciiZycxZHGlR2N6ba9BifgyclHYHdbaZgITo0U6QMhYRlem4k8pf8J31/tApxvqAz8A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/uri": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.2.tgz", + "integrity": "sha512-OFo5oxuSEz1ktF/LDdBTptlnPyZ66jywLO4fJRuAhnr7NGnsiL2CPoj1JRVaDqVy0nXvWNsC8O8Muw9DR++eEg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/idn-hostname": { + "version": "15.1.8", + "resolved": "https://registry.npmjs.org/idn-hostname/-/idn-hostname-15.1.8.tgz", + "integrity": "sha512-MmLwddtSVyMtzYxx+xs2IFEbfyg/facubL/mEaAoJX/XIfjt1ly5QhPByihf4yrxZYbkQfRZVEnBgISv/e2ZWw==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + } + }, + "node_modules/json-stringify-deterministic": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", + "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/just-curry-it": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", + "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==", + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + } + } +} diff --git a/node_modules/@hyperjump/browser/.gitattributes b/node_modules/@hyperjump/browser/.gitattributes new file mode 100644 index 00000000..fcadb2cf --- /dev/null +++ b/node_modules/@hyperjump/browser/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/node_modules/@hyperjump/browser/LICENCE b/node_modules/@hyperjump/browser/LICENCE new file mode 100644 index 00000000..6e9846cf --- /dev/null +++ b/node_modules/@hyperjump/browser/LICENCE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/browser/README.md b/node_modules/@hyperjump/browser/README.md new file mode 100644 index 00000000..10c09bdf --- /dev/null +++ b/node_modules/@hyperjump/browser/README.md @@ -0,0 +1,249 @@ +# Hyperjump - Browser + +The Hyperjump Browser is a generic client for traversing JSON Reference ([JRef]) +and other [JRef]-compatible media types in a way that abstracts the references +without loosing information. + +## Install + +This module is designed for node.js (ES Modules, TypeScript) and browsers. It +should work in Bun and Deno as well, but the test runner doesn't work in these +environments, so this module may be less stable in those environments. + +### Node.js + +```bash +npm install @hyperjump/browser +``` + +## JRef Browser + +This example uses the API at +[https://swapi.hyperjump.io](https://explore.hyperjump.io#https://swapi.hyperjump.io/api/films/1). +It's a variation of the [Star Wars API (SWAPI)](https://swapi.dev) implemented +using the [JRef] media type. + +```javascript +import { get, step, value, iter } from "@hyperjump/browser"; + +const aNewHope = await get("https://swapi.hyperjump.io/api/films/1"); +const characters = await get("#/characters", aNewHope); // Or +const characters = await step("characters", aNewHope); + +for await (const character of iter(characters)) { + const name = await step("name", character); + value(name); // => Luke Skywalker, etc. +} +``` + +You can also work with files on the file system. When working with files, media +types are determined by file extensions. The [JRef] media type uses the `.jref` +extension. + +```javascript +import { get, value } from "@hyperjump/browser"; + +const lukeSkywalker = await get("./api/people/1.jref"); // Paths resolve relative to the current working directory +const name = await step("name", lukeSkywalker); +value(name); // => Luke Skywalker +``` + +### API + +* get(uri: string, browser?: Browser): Promise\ + + Retrieve a document located at the given URI. Support for [JRef] is built + in. See the [Media Types](#media-type) section for information on how + to support other media types. Support for `http(s):` and `file:` URI schemes + are built in. See the [Uri Schemes](#uri-schemes) section for information on + how to support other URI schemes. +* value(browser: Browser) => JRef + + Get the JRef compatible value the document represents. +* typeOf(browser: Browser) => JRefType + + Works the same as the `typeof` keyword. It will return one of the JSON types + (null, boolean, number, string, array, object) or "reference". If the value + is not one of these types, it will throw an error. +* has(key: string, browser: Browser) => boolean + + Returns whether or not a property is present in the object that the browser + represents. +* length(browser: Browser) => number + + Get the length of the array that the browser represents. +* step(key: string | number, browser: Browser) => Promise\ + + Move the browser cursor by the given "key" value. This is analogous to + indexing into an object or array (`foo[key]`). This function supports + curried application. +* iter(browser: Browser) => AsyncGenerator\ + + Iterate over the items in the array that the document represents. +* entries(browser: Browser) => AsyncGenerator\<[string, Browser]> + + Similar to `Object.entries`, but yields Browsers for values. +* values(browser: Browser) => AsyncGenerator\ + + Similar to `Object.values`, but yields Browsers for values. +* keys(browser: Browser) => Generator\ + + Similar to `Object.keys`. + +## Media Types + +Support for the [JRef] media type is included by default, but you can add +support for any media type you like as long as it can be represented in a +[JRef]-compatible way. + +```javascript +import { addMediaTypePlugin, removeMediaTypePlugin, setMediaTypeQuality } from "@hyperjump/browser"; +import YAML from "yaml"; + +// Add support for YAML version of JRef (YRef) +addMediaTypePlugin("application/reference+yaml", { + parse: async (response) => { + return { + baseUri: response.url, + root: (response) => YAML.parse(await response.text(), (key, value) => { + return value !== null && typeof value.$ref === "string" + ? new Reference(value.$ref) + : value; + }, + anchorLocation: (fragment) => decodeUri(fragment ?? ""); + }; + }, + fileMatcher: (path) => path.endsWith(".jref") +}); + +// Prefer "YRef" over JRef by reducing the quality for JRef. +setMediaTypeQuality("application/reference+json", 0.9); + +// Only support YRef by removing JRef support. +removeMediaTypePlugin("application/reference+json"); +``` + +### API + +* addMediaTypePlugin(contentType: string, plugin: MediaTypePlugin): void + + Add support for additional media types. + + * type MediaTypePlugin + * parse: (response: Response) => Document + * [quality](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values): + number (defaults to `1`) +* removeMediaTypePlugin(contentType: string): void + + Removed support or a media type. +* setMediaTypeQuality(contentType: string, quality: number): void; + + Set the + [quality](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values) + that will be used in the + [Accept](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept) + header of requests to indicate to servers what media types are preferred + over others. +* acceptableMediaTypes(): string; + + Build an `Accept` request header from the registered media type plugins. + This function is used internally. You would only need it if you're writing a + custom `http(s):` URI scheme plugin. + +## URI Schemes + +By default, `http(s):` and `file:` URIs are supported. You can add support for +additional URI schemes using plugins. + +```javascript +import { addUriSchemePlugin, removeUriSchemePlugin, retrieve } from "@hyperjump/browser"; + +// Add support for the `urn:` scheme +addUriSchemePlugin("urn", { + parse: (urn, baseUri) => { + let { nid, nss, query, fragment } = parseUrn(urn); + nid = nid.toLowerCase(); + + if (!mappings[nid]?.[nss]) { + throw Error(`Not Found -- ${urn}`); + } + + let uri = mappings[nid][nss]; + uri += query ? "?" + query : ""; + uri += fragment ? "#" + fragment : ""; + + return retrieve(uri, baseUri); + } +}); + +// Only support `urn:` by removing default plugins +removeUriSchemePlugin("http"); +removeUriSchemePlugin("https"); +removeUriSchemePlugin("file"); +``` + +### API +* addUriSchemePlugin(scheme: string, plugin: UriSchemePlugin): void + + Add support for additional URI schemes. + + * type UriSchemePlugin + * retrieve: (uri: string, baseUri?: string) => Promise\ +* removeUriSchemePlugin(scheme: string): void + + Remove support for a URI scheme. +* retrieve(uri: string, baseUri?: string) => Promise\ + + This is used internally, but you may need it if mapping names to locators + such as in the example above. + +## JRef + +`parse` and `stringify` [JRef] values using the same API as the `JSON` built-in +functions including `reviver` and `replacer` functions. + +```javascript +import { parse, stringify, jrefTypeOf } from "@hyperjump/browser/jref"; + +const blogPostJref = `{ + "title": "Working with JRef", + "author": { "$ref": "/author/jdesrosiers" }, + "content": "lorem ipsum dolor sit amet", +}`; +const blogPost = parse(blogPostJref); +jrefTypeOf(blogPost.author) // => "reference" +blogPost.author.href; // => "/author/jdesrosiers" + +stringify(blogPost, null, " ") === blogPostJref // => true +``` + +### API +export type Replacer = (key: string, value: unknown) => unknown; + +* parse: (jref: string, reviver?: (key: string, value: unknown) => unknown) => JRef; + + Same as `JSON.parse`, but converts `{ "$ref": "..." }` to `Reference` + objects. +* stringify: (value: JRef, replacer?: (string | number)[] | null | Replacer, space?: string | number) => string; + + Same as `JSON.stringify`, but converts `Reference` objects to `{ "$ref": + "... " }` +* jrefTypeOf: (value: unknown) => "object" | "array" | "string" | "number" | "boolean" | "null" | "reference" | "undefined"; + +## Contributing + +### Tests + +Run the tests + +```bash +npm test +``` + +Run the tests with a continuous test runner + +```bash +npm test -- --watch +``` + +[JRef]: https://github.com/hyperjump-io/browser/blob/main/lib/jref/SPECIFICATION.md diff --git a/node_modules/@hyperjump/browser/package.json b/node_modules/@hyperjump/browser/package.json new file mode 100644 index 00000000..7749969e --- /dev/null +++ b/node_modules/@hyperjump/browser/package.json @@ -0,0 +1,57 @@ +{ + "name": "@hyperjump/browser", + "version": "1.3.1", + "description": "Browse JSON-compatible data with hypermedia references", + "type": "module", + "main": "./lib/index.js", + "exports": { + ".": "./lib/index.js", + "./jref": "./lib/jref/index.js" + }, + "browser": { + "./lib/index.js": "./lib/index.browser.js", + "./lib/browser/context-uri.js": "./lib/browser/context-uri.browser.js" + }, + "scripts": { + "clean": "xargs -a .gitignore rm -rf", + "lint": "eslint lib", + "type-check": "tsc --noEmit", + "test": "vitest --watch=false" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hyperjump-io/browser.git" + }, + "keywords": [ + "json", + "reference", + "jref", + "hypermedia", + "$ref" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "typescript": "*", + "typescript-eslint": "*", + "undici": "*", + "vitest": "*" + }, + "engines": { + "node": ">=18.0.0" + }, + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.5", + "just-curry-it": "^5.3.0" + } +} diff --git a/node_modules/@hyperjump/json-pointer/LICENSE b/node_modules/@hyperjump/json-pointer/LICENSE new file mode 100644 index 00000000..183e8491 --- /dev/null +++ b/node_modules/@hyperjump/json-pointer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/json-pointer/README.md b/node_modules/@hyperjump/json-pointer/README.md new file mode 100644 index 00000000..9ebf05db --- /dev/null +++ b/node_modules/@hyperjump/json-pointer/README.md @@ -0,0 +1,102 @@ +# JSON Pointer + +This is an implementation of RFC-6901 JSON Pointer. JSON Pointer is designed for +referring to data values within a JSON document. It's designed to be URL +friendly so it can be used as a URL fragment that points to a specific part of +the JSON document. + +## Installation + +Includes support for node.js (ES Modules, TypeScript) and browsers. + +```bash +npm install @hyperjump/json-pointer +``` + +## Usage + +```javascript +import * as JsonPointer from "@hyperjump/json-pointer"; + +const value = { + "foo": { + "bar": 42 + } +}; + +// Construct pointers +const fooPointer = JsonPointer.append("foo", JsonPointer.nil); // "/foo" +const fooBarPointer = JsonPointer.append(fooPointer, "bar"); // "/foo/bar" + +// Get a value from a pointer +const getFooBar = JsonPointer.get(fooBarPointer); +getFooBar(value); // 42 + +// Set a value from a pointer +// New value is returned without modifying the original +const setFooBar = JsonPointer.set(fooBarPointer); +setFooBar(value, 33); // { "foo": { "bar": 33 } } + +// Assign a value from a pointer +// The original value is changed and no value is returned +const assignFooBar = JsonPointer.assign(fooBarPointer); +assignFooBar(value, 33); // { "foo": { "bar": 33 } } + +// Unset a value from a pointer +// New value is returned without modifying the original +const unsetFooBar = JsonPointer.unset(fooBarPointer); +setFooBar(value); // { "foo": {} } + +// Delete a value from a pointer +// The original value is changed and no value is returned +const deleteFooBar = JsonPointer.remove(fooBarPointer); +deleteFooBar(value); // { "foo": {} } +``` + +## API + +* **nil**: "" + + The empty pointer. +* **pointerSegments**: (pointer: string) => Generator\ + + An iterator for the segments of a JSON Pointer that handles escaping. +* **append**: (segment: string, pointer: string) => string + + Append a segment to a JSON Pointer. +* **get**: (pointer: string, subject: any) => any + + Use a JSON Pointer to get a value. This function can be curried. +* **set**: (pointer: string, subject: any, value: any) => any + + Immutably set a value using a JSON Pointer. Returns a new version of + `subject` with the value set. The original `subject` is not changed, but the + value isn't entirely cloned. Values that aren't changed will point to + the same value as the original. This function can be curried. +* **assign**: (pointer: string, subject: any, value: any) => void + + Mutate a value using a JSON Pointer. This function can be curried. +* **unset**: (pointer: string, subject: any) => any + + Immutably delete a value using a JSON Pointer. Returns a new version of + `subject` without the value. The original `subject` is not changed, but the + value isn't entirely cloned. Values that aren't changed will point to the + same value as the original. This function can be curried. +* **remove**: (pointer: string, subject: any) => void + + Delete a value using a JSON Pointer. This function can be curried. + +## Contributing + +### Tests + +Run the tests + +```bash +npm test +``` + +Run the tests with a continuous test runner +```bash +npm test -- --watch +``` diff --git a/node_modules/@hyperjump/json-pointer/package.json b/node_modules/@hyperjump/json-pointer/package.json new file mode 100644 index 00000000..fd33dee0 --- /dev/null +++ b/node_modules/@hyperjump/json-pointer/package.json @@ -0,0 +1,32 @@ +{ + "name": "@hyperjump/json-pointer", + "version": "1.1.1", + "description": "An RFC-6901 JSON Pointer implementation", + "type": "module", + "main": "./lib/index.js", + "exports": "./lib/index.js", + "scripts": { + "lint": "eslint lib", + "test": "vitest --watch=false", + "type-check": "tsc --noEmit" + }, + "repository": "github:hyperjump-io/json-pointer", + "keywords": [ + "JSON Pointer", + "RFC-6901" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "typescript-eslint": "*", + "vitest": "*" + } +} diff --git a/node_modules/@hyperjump/json-schema-formats/LICENSE b/node_modules/@hyperjump/json-schema-formats/LICENSE new file mode 100644 index 00000000..82597103 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/json-schema-formats/README.md b/node_modules/@hyperjump/json-schema-formats/README.md new file mode 100644 index 00000000..a6d49704 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/README.md @@ -0,0 +1,42 @@ +# Hyperjump - JSON Schema Formats + +A collection of validation functions for the JSON Schema `format` keyword. + +## Install + +This module is designed for Node.js (ES Modules, TypeScript) and browsers. It +should work in Bun and Deno as well, but the test runner doesn't work in these +environments, so this module may be less stable in those environments. + +### Node.js + +```bash +npm install @hyperjump/json-schema-formats +``` + +### TypeScript + +This package uses the package.json "exports" field. [TypeScript understands +"exports"](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing), +but you need to change a couple settings in your `tsconfig.json` for it to work. + +```jsonc + "module": "Node16", // or "NodeNext" + "moduleResolution": "Node16", // or "NodeNext" +``` + +## API + + + +## Contributing + +Contributions are welcome! Please create an issue to propose and discuss any +changes you'd like to make before implementing it. If it's an obvious bug with +an obvious solution or something simple like a fixing a typo, creating an issue +isn't required. You can just send a PR without creating an issue. Before +submitting any code, please remember to first run the following tests. + +- `npm test` (Tests can also be run continuously using `npm test -- --watch`) +- `npm run lint` +- `npm run type-check` diff --git a/node_modules/@hyperjump/json-schema-formats/package.json b/node_modules/@hyperjump/json-schema-formats/package.json new file mode 100644 index 00000000..1e13b05b --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/package.json @@ -0,0 +1,60 @@ +{ + "name": "@hyperjump/json-schema-formats", + "version": "1.0.1", + "description": "A collection of validation functions for the JSON Schema `format` keyword.", + "keywords": [ + "JSON Schema", + "format", + "rfc3339", + "date", + "date-time", + "duration", + "email", + "hostname", + "idn-hostname", + "idn-email", + "ipv4", + "ipv6", + "iri", + "iri-reference", + "json-pointer", + "regex", + "relative-json-pointer", + "time", + "uri", + "uri-reference", + "uri-template", + "uuid" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "repository": "github:hyperjump-io/json-schema-formats", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/hyperjump-io" + }, + "type": "module", + "exports": { + ".": "./src/index.js" + }, + "scripts": { + "lint": "eslint src", + "test": "vitest run", + "type-check": "tsc --noEmit", + "docs": "typedoc --excludeExternals" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "json-schema-test-suite": "github:json-schema-org/json-schema-test-suite", + "typedoc": "*", + "typescript-eslint": "*", + "vitest": "*" + }, + "dependencies": { + "@hyperjump/uri": "^1.3.2", + "idn-hostname": "^15.1.2" + } +} diff --git a/node_modules/@hyperjump/json-schema-formats/src/date-math.js b/node_modules/@hyperjump/json-schema-formats/src/date-math.js new file mode 100644 index 00000000..60d28c72 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/date-math.js @@ -0,0 +1,120 @@ +/** @type (month: string, year: number) => number */ +export const daysInMonth = (month, year) => { + switch (month) { + case "01": + case "Jan": + case "03": + case "Mar": + case "05": + case "May": + case "07": + case "Jul": + case "08": + case "Aug": + case "10": + case "Oct": + case "12": + case "Dec": + return 31; + case "04": + case "Apr": + case "06": + case "Jun": + case "09": + case "Sep": + case "11": + case "Nov": + return 30; + case "02": + case "Feb": + return isLeapYear(year) ? 29 : 28; + default: + return 0; + } +}; + +/** @type (year: number) => boolean */ +export const isLeapYear = (year) => { + return (year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)); +}; + +/** @type (date: Date) => boolean */ +export const hasLeapSecond = (date) => { + const utcDate = `${date.getUTCFullYear()}-${date.getUTCMonth() + 1}-${date.getUTCDate()}`; + return leapSecondDates.has(utcDate) + && date.getUTCHours() === 23 + && date.getUTCMinutes() === 59; +}; + +const leapSecondDates = new Set([ + "1960-12-31", + "1961-07-31", + "1961-12-31", + "1963-10-31", + "1963-12-31", + "1964-03-31", + "1964-08-31", + "1964-12-31", + "1965-02-28", + "1965-06-30", + "1965-08-31", + "1965-12-31", + "1968-01-31", + "1971-12-31", + "1972-06-30", + "1972-12-31", + "1973-12-31", + "1974-12-31", + "1975-12-31", + "1976-12-31", + "1977-12-31", + "1978-12-31", + "1979-12-31", + "1981-06-30", + "1982-06-30", + "1983-06-30", + "1985-06-30", + "1987-12-31", + "1989-12-31", + "1990-12-31", + "1992-06-30", + "1993-06-30", + "1994-06-30", + "1995-12-31", + "1997-06-30", + "1998-12-31", + "2005-12-31", + "2008-12-31", + "2012-06-30", + "2015-06-30", + "2016-12-31" +]); + +/** @type (dayName: string) => number */ +export const dayOfWeekId = (dayName) => { + switch (dayName) { + case "Sun": + case "Sunday": + return 0; + case "Mon": + case "Monday": + return 1; + case "Tue": + case "Tuesday": + return 2; + case "Wed": + case "Wednesday": + return 3; + case "Thu": + case "Thursday": + return 4; + case "Fri": + case "Friday": + return 5; + case "Sat": + case "Saturday": + return 6; + default: + return -1; + } +}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js b/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js new file mode 100644 index 00000000..2b829b4f --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js @@ -0,0 +1,18 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const unescaped = `[\\u{00}-\\u{2E}\\u{30}-\\u{7D}\\u{7F}-\\u{10FFFF}]`; // %x2F ('/') and %x7E ('~') are excluded from 'unescaped' +const escaped = `~[01]`; // representing '~' and '/', respectively +const referenceToken = `(?:${unescaped}|${escaped})*`; +const jsonPointer = `(?:/${referenceToken})*`; + +const nonNegativeInteger = `(?:0|[1-9][0-9]*)`; +const indexManipulation = `(?:[+-]${nonNegativeInteger})`; +const relativeJsonPointer = `${nonNegativeInteger}(?:${indexManipulation}?${jsonPointer}|#)`; + +/** + * @type API.isRelativeJsonPointer + * @function + */ +export const isRelativeJsonPointer = RegExp.prototype.test.bind(new RegExp(`^${relativeJsonPointer}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/ecma262.js b/node_modules/@hyperjump/json-schema-formats/src/ecma262.js new file mode 100644 index 00000000..47a91ebe --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/ecma262.js @@ -0,0 +1,13 @@ +/** + * @import * as API from "./index.d.ts" + */ + +/** @type API.isRegex */ +export const isRegex = (regex) => { + try { + new RegExp(regex, "u"); + return true; + } catch (_error) { + return false; + } +}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/index.d.ts b/node_modules/@hyperjump/json-schema-formats/src/index.d.ts new file mode 100644 index 00000000..31df2b91 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/index.d.ts @@ -0,0 +1,170 @@ +/** + * The 'date' format. Validates that a string represents a date according to + * [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). + * + * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) + */ +export const isDate: (date: string) => boolean; + +/** + * The 'time' format. Validates that a string represents a time according to + * [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). + * + * **NOTE**: Leap seconds are only allowed on specific dates. Since there is no date + * in this context, leap seconds are never allowed. + * + * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) + */ +export const isTime: (time: string) => boolean; + +/** + * The 'date-time' format. Validates that a string represents a date-time + * according to [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). + * + * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) + */ +export const isDateTime: (dateTime: string) => boolean; + +/** + * The 'duration' format. Validates that a string represents a duration + * according to [RFC 3339, Appendix A](https://www.rfc-editor.org/rfc/rfc3339.html#appendix-A). + * + * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) + */ +export const isDuration: (duration: string) => boolean; + +/** + * The 'email' format. Validates that a string represents an email as defined by + * the "Mailbox" ABNF rule in [RFC 5321, section 4.1.2](https://www.rfc-editor.org/rfc/rfc5321.html#section-4.1.2). + * + * @see [JSON Schema Core, section 7.3.2](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.2) + */ +export const isEmail: (email: string) => boolean; + +/** + * The 'idn-email' format. Validates that a string represents an email as + * defined by the "Mailbox" ABNF rule in [RFC 6531, section 3.3](https://www.rfc-editor.org/rfc/rfc6531.html#section-3.3). + * + * @see [JSON Schema Core, section 7.3.2](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.2) + */ +export const isIdnEmail: (email: string) => boolean; + +/** + * The 'hostname' format in draft-04 - draft-06. Validates that a string + * represents a hostname as defined by [RFC 1123, section 2.1](https://www.rfc-editor.org/rfc/rfc1123.html#section-2.1). + * + * **NOTE**: The 'hostname' format changed in draft-07. Use {@link isAsciiIdn} for + * draft-07 and later. + * + * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) + */ +export const isHostname: (hostname: string) => boolean; + +/** + * The 'hostname' format since draft-07. Validates that a string represents an + * IDNA2008 internationalized domain name consiting of only A-labels and NR-LDH + * labels as defined by [RFC 5890, section 2.3.2.1](https://www.rfc-editor.org/rfc/rfc5890.html#section-2.3.2.3). + * + * **NOTE**: The 'hostname' format changed in draft-07. Use {@link isHostname} + * for draft-06 and earlier. + * + * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) + */ +export const isAsciiIdn: (hostname: string) => boolean; + +/** + * The 'idn-hostname' format. Validates that a string represents an IDNA2008 + * internationalized domain name as defined by [RFC 5890, section 2.3.2.1](https://www.rfc-editor.org/rfc/rfc5890.html#section-2.3.2.1). + * + * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) + */ +export const isIdn: (hostname: string) => boolean; + +/** + * The 'ipv4' format. Validates that a string represents an IPv4 address + * according to the "dotted-quad" ABNF syntax as defined in + * [RFC 2673, section 3.2](https://www.rfc-editor.org/rfc/rfc2673.html#section-3.2). + * + * @see [JSON Schema Core, section 7.3.4](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.4) + */ +export const isIPv4: (ip: string) => boolean; + +/** + * The 'ipv6' format. Validates that a string represents an IPv6 address as + * defined in [RFC 4291, section 2.2](https://www.rfc-editor.org/rfc/rfc4291.html#section-2.2). + * + * @see [JSON Schema Core, section 7.3.4](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.4) + */ +export const isIPv6: (ip: string) => boolean; + +/** + * The 'uri' format. Validates that a string represents a URI as defined by [RFC + * 3986](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isUri: (uri: string) => boolean; + +/** + * The 'uri-reference' format. Validates that a string represents a URI + * Reference as defined by [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isUriReference: (uri: string) => boolean; + +/** + * The 'iri' format. Validates that a string represents an IRI as defined by + * [RFC 3987](https://www.rfc-editor.org/rfc/rfc3987.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isIri: (iri: string) => boolean; + +/** + * The 'iri-reference' format. Validates that a string represents an IRI + * Reference as defined by [RFC 3987](https://www.rfc-editor.org/rfc/rfc3987.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isIriReference: (iri: string) => boolean; + +/** + * The 'uuid' format. Validates that a string represents a UUID address as + * defined by [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isUuid: (uuid: string) => boolean; + +/** + * The 'uri-template' format. Validates that a string represents a URI Template + * as defined by [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html). + * + * @see [JSON Schema Core, section 7.3.6](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.6) + */ +export const isUriTemplate: (uriTemplate: string) => boolean; + +/** + * The 'json-pointer' format. Validates that a string represents a JSON Pointer + * as defined by [RFC 6901](https://www.rfc-editor.org/rfc/rfc6901.html). + * + * @see [JSON Schema Core, section 7.3.7](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.7) + */ +export const isJsonPointer: (pointer: string) => boolean; + +/** + * The 'relative-json-pointer' format. Validates that a string represents an IRI + * Reference as defined by [draft-bhutton-relative-json-pointer-00](https://datatracker.ietf.org/doc/html/draft-bhutton-relative-json-pointer-00). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isRelativeJsonPointer: (pointer: string) => boolean; + +/** + * The 'regex' format. Validates that a string represents a regular expression + * as defined by [ECMA-262](https://262.ecma-international.org/5.1/). + * + * @see [JSON Schema Core, section 7.3.8](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.8) + */ +export const isRegex: (regex: string) => boolean; diff --git a/node_modules/@hyperjump/json-schema-formats/src/index.js b/node_modules/@hyperjump/json-schema-formats/src/index.js new file mode 100644 index 00000000..7c81b5be --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/index.js @@ -0,0 +1,33 @@ +/** + * @module + */ + +// JSON Schema Validation - Dates, Times, and Duration +export { isDate, isTime, isDateTime, isDuration } from "./rfc3339.js"; + +// JSON Schema Validation - Email Addresses +export { isEmail } from "./rfc5321.js"; +export { isIdnEmail } from "./rfc6531.js"; + +// JSON Schema Validation - Hostnames +export { isHostname } from "./rfc1123.js"; +export { isAsciiIdn, isIdn } from "./uts46.js"; + +// JSON Schema Validation - IP Addresses +export { isIPv4 } from "./rfc2673.js"; +export { isIPv6 } from "./rfc4291.js"; + +// JSON Schema Validation - Resource Identifiers +export { isUri, isUriReference } from "./rfc3986.js"; +export { isIri, isIriReference } from "./rfc3987.js"; +export { isUuid } from "./rfc4122.js"; + +// JSON Schema Validation - URI Template +export { isUriTemplate } from "./rfc6570.js"; + +// JSON Schema Validation - JSON Pointers +export { isJsonPointer } from "./rfc6901.js"; +export { isRelativeJsonPointer } from "./draft-bhutton-relative-json-pointer-00.js"; + +// JSON Schema Validation - Regular Expressions +export { isRegex } from "./ecma262.js"; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js b/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js new file mode 100644 index 00000000..6f605adf --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js @@ -0,0 +1,13 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const label = `(?!-)[A-Za-z0-9-]{1,63}(? { + return domainPattern.test(hostname) && hostname.length < 256; +}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js b/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js new file mode 100644 index 00000000..02179fce --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js @@ -0,0 +1,12 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; +const ipV4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; + +/** + * @type API.isIPv4 + * @function + */ +export const isIPv4 = RegExp.prototype.test.bind(new RegExp(`^${ipV4Address}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js new file mode 100644 index 00000000..33175991 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js @@ -0,0 +1,78 @@ +import { daysInMonth, hasLeapSecond } from "./date-math.js"; + +/** + * @import * as API from "./index.d.ts" + */ + +const dateFullyear = `\\d{4}`; +const dateMonth = `(?:0[1-9]|1[0-2])`; // 01-12 +const dateMday = `(?:0[1-9]|[12][0-9]|3[01])`; // 01-28, 01-29, 01-30, 01-31 based on month/year +const fullDate = `(?${dateFullyear})-(?${dateMonth})-(?${dateMday})`; + +const datePattern = new RegExp(`^${fullDate}$`); + +/** @type API.isDate */ +export const isDate = (date) => { + const parsedDate = datePattern.exec(date)?.groups; + if (!parsedDate) { + return false; + } + + const day = Number.parseInt(parsedDate.day, 10); + const year = Number.parseInt(parsedDate.year, 10); + + return day <= daysInMonth(parsedDate.month, year); +}; + +const timeHour = `(?:[01]\\d|2[0-3])`; // 00-23 +const timeMinute = `[0-5]\\d`; // 00-59 +const timeSecond = `[0-5]\\d`; // 00-59 +const timeSecondAllowLeapSeconds = `(?[0-5]\\d|60)`; // 00-58, 00-59, 00-60 based on leap second rules +const timeSecfrac = `\\.\\d+`; +const timeNumoffset = `[+-]${timeHour}:${timeMinute}`; +const timeOffset = `(?:[zZ]|${timeNumoffset})`; +const partialTime = `${timeHour}:${timeMinute}:${timeSecond}(?:${timeSecfrac})?`; +const fullTime = `${partialTime}${timeOffset}`; + +/** + * @type API.isTime + * @function + */ +export const isTime = RegExp.prototype.test.bind(new RegExp(`^${fullTime}$`)); + +const timePattern = new RegExp(`^${timeHour}:${timeMinute}:${timeSecondAllowLeapSeconds}(?:${timeSecfrac})?${timeOffset}$`); + +/** @type (time: string) => { seconds: string } | undefined */ +const parseTime = (time) => { + return /** @type {{ seconds: string } | undefined} */ (timePattern.exec(time)?.groups); +}; + +/** @type API.isDateTime */ +export const isDateTime = (dateTime) => { + const date = dateTime.substring(0, 10); + const t = dateTime[10]; + const time = dateTime.substring(11); + const seconds = parseTime(time)?.seconds; + + return isDate(date) + && /^t$/i.test(t) + && !!seconds + && (seconds !== "60" || hasLeapSecond(new Date(`${date}T${time.replace("60", "59")}`))); +}; + +const durSecond = `\\d+S`; +const durMinute = `\\d+M(?:${durSecond})?`; +const durHour = `\\d+H(?:${durMinute})?`; +const durTime = `T(?:${durHour}|${durMinute}|${durSecond})`; +const durDay = `\\d+D`; +const durWeek = `\\d+W`; +const durMonth = `\\d+M(?:${durDay})?`; +const durYear = `\\d+Y(?:${durMonth})?`; +const durDate = `(?:${durDay}|${durMonth}|${durYear})(?:${durTime})?`; +const duration = `P(?:${durDate}|${durTime}|${durWeek})`; + +/** + * @type API.isDuration + * @function + */ +export const isDuration = RegExp.prototype.test.bind(new RegExp(`^${duration}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js new file mode 100644 index 00000000..400e0b28 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js @@ -0,0 +1,17 @@ +import * as Hyperjump from "@hyperjump/uri"; + +/** + * @import * as API from "./index.d.ts" + */ + +/** + * @type API.isUri + * @function + */ +export const isUri = Hyperjump.isUri; + +/** + * @type API.isUriReference + * @function + */ +export const isUriReference = Hyperjump.isUriReference; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js new file mode 100644 index 00000000..c804e103 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js @@ -0,0 +1,17 @@ +import * as Hyperjump from "@hyperjump/uri"; + +/** + * @import * as API from "./index.d.ts" + */ + +/** + * @type API.isIri + * @function + */ +export const isIri = Hyperjump.isIri; + +/** + * @type API.isIriReference + * @function + */ +export const isIriReference = Hyperjump.isIriReference; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js b/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js new file mode 100644 index 00000000..5737edda --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js @@ -0,0 +1,20 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const hexDigit = `[0-9a-fA-F]`; +const hexOctet = `(?:${hexDigit}{2})`; +const timeLow = `${hexOctet}{4}`; +const timeMid = `${hexOctet}{2}`; +const timeHighAndVersion = `${hexOctet}{2}`; +const clockSeqAndReserved = hexOctet; +const clockSeqLow = hexOctet; +const node = `${hexOctet}{6}`; + +const uuid = `${timeLow}\\-${timeMid}\\-${timeHighAndVersion}\\-${clockSeqAndReserved}${clockSeqLow}\\-${node}`; + +/** + * @type API.isUuid + * @function + */ +export const isUuid = RegExp.prototype.test.bind(new RegExp(`^${uuid}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js b/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js new file mode 100644 index 00000000..6fbd83ef --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js @@ -0,0 +1,18 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const hexdig = `[a-fA-F0-9]`; + +const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; +const ipV4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; + +const h16 = `${hexdig}{1,4}`; +const ls32 = `(?:${h16}:${h16}|${ipV4Address})`; +const ipV6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; + +/** + * @type API.isIPv6 + * @function + */ +export const isIPv6 = RegExp.prototype.test.bind(new RegExp(`^${ipV6Address}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js b/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js new file mode 100644 index 00000000..c7049993 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js @@ -0,0 +1,46 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const alpha = `[a-zA-Z]`; +const hexdig = `[\\da-fA-F]`; + +// Printable US-ASCII characters not including specials. +const atext = `[\\w!#$%&'*+\\-/=?^\`{|}~]`; +const atom = `${atext}+`; +const dotString = `${atom}(?:\\.${atom})*`; + +// Any ASCII graphic or space without blackslash-quoting except double-quote and the backslash itself. +const qtextSMTP = `[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]`; +// backslash followed by any ASCII graphic or space +const quotedPairSMTP = `\\\\[\\x20-\\x7E]`; +const qcontentSMTP = `(?:${qtextSMTP}|${quotedPairSMTP})`; +const quotedString = `"${qcontentSMTP}*"`; + +const localPart = `(?:${dotString}|${quotedString})`; // MAY be case-sensitive + +const letDig = `(?:${alpha}|\\d)`; +const ldhStr = `(?:${letDig}|-)*${letDig}`; +const subDomain = `${letDig}${ldhStr}?`; +const domain = `${subDomain}(?:\\.${subDomain})*`; + +const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; +const ipv4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; + +const h16 = `${hexdig}{1,4}`; +const ls32 = `(?:${h16}:${h16}|${ipv4Address})`; +const ipv6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; +const ipv6AddressLiteral = `IPv6:${ipv6Address}`; + +const dcontent = `[\\x21-\\x5A\\x5E-\\x7E]`; // Printable US-ASCII excluding "[", "\", "]" +const generalAddressLiteral = `${ldhStr}:${dcontent}+`; + +const addressLiteral = `\\[(?:${ipv4Address}|${ipv6AddressLiteral}|${generalAddressLiteral})]`; + +const mailbox = `${localPart}@(?:${domain}|${addressLiteral})`; + +/** + * @type API.isEmail + * @function + */ +export const isEmail = RegExp.prototype.test.bind(new RegExp(`^${mailbox}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js new file mode 100644 index 00000000..281bd7f2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js @@ -0,0 +1,55 @@ +import { isIdn } from "./uts46.js"; + +/** + * @import * as API from "./index.d.ts" + */ + +const ucschar = `[\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}]`; + +const alpha = `[a-zA-Z]`; +const hexdig = `[\\da-fA-F]`; + +// Printable US-ASCII characters not including specials. +const atext = `(?:[\\w!#$%&'*+\\-/=?^\`{|}~]|${ucschar})`; +const atom = `${atext}+`; +const dotString = `${atom}(?:\\.${atom})*`; + +// Any ASCII graphic or space without blackslash-quoting except double-quote and the backslash itself. +const qtextSMTP = `(?:[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]|${ucschar})`; +// backslash followed by any ASCII graphic or space +const quotedPairSMTP = `\\\\[\\x20-\\x7E]`; +const qcontentSMTP = `(?:${qtextSMTP}|${quotedPairSMTP})`; +const quotedString = `"${qcontentSMTP}*"`; + +const localPart = `(?:${dotString}|${quotedString})`; // MAY be case-sensitive + +const letDig = `(?:${alpha}|\\d)`; +const ldhStr = `(?:${letDig}|-)*${letDig}`; +const letDigUcs = `(?:${alpha}|\\d|${ucschar})`; +const ldhStrUcs = `(?:${letDigUcs}|-)*${letDigUcs}`; +const subDomain = `${letDigUcs}${ldhStrUcs}?`; +const domain = `${subDomain}(?:\\.${subDomain})*`; + +const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; +const ipv4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; + +const h16 = `${hexdig}{1,4}`; +const ls32 = `(?:${h16}:${h16}|${ipv4Address})`; +const ipv6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; +const ipv6AddressLiteral = `IPv6:${ipv6Address}`; + +const dcontent = `[\\x21-\\x5A\\x5E-\\x7E]`; // Printable US-ASCII excluding "[", "\", "]" +const generalAddressLiteral = `${ldhStr}:${dcontent}+`; + +const addressLiteral = `\\[(?:${ipv4Address}|${ipv6AddressLiteral}|${generalAddressLiteral})\\]`; + +const mailbox = `(?${localPart})@(?:(?${addressLiteral})|(?${domain}))`; + +const mailboxPattern = new RegExp(`^${mailbox}$`, "u"); + +/** @type API.isIdnEmail */ +export const isIdnEmail = (email) => { + const parsedEmail = mailboxPattern.exec(email)?.groups; + + return !!parsedEmail && (!parsedEmail.domain || isIdn(parsedEmail.domain)); +}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js new file mode 100644 index 00000000..e144a93e --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js @@ -0,0 +1,38 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const alpha = `[a-zA-Z]`; +const hexdig = `[\\da-fA-F]`; +const pctEncoded = `%${hexdig}${hexdig}`; + +const ucschar = `[\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}]`; + +const iprivate = `[\\u{E000}-\\u{F8FF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}]`; + +const opLevel2 = `[+#]`; +const opLevel3 = `[./;?&]`; +const opReserve = `[=,!@|]`; +const operator = `(?:${opLevel2}|${opLevel3}${opReserve})`; + +const varchar = `(?:${alpha}|\\d|_|${pctEncoded})`; +const varname = `${varchar}(?:\\.?${varchar})*`; +const maxLength = `(?:[1-9]|\\d{0,3})`; // positive integer < 10000 +const prefix = `:${maxLength}`; +const explode = `\\*`; +const modifierLevel4 = `(?:${prefix}|${explode})`; +const varspec = `${varname}${modifierLevel4}?`; +const variableList = `${varspec}(?:,${varspec})*`; + +const expression = `\\{${operator}?${variableList}\\}`; + +// any Unicode character except: CTL, SP, DQUOTE, "%" (aside from pct-encoded), "<", ">", "\", "^", "`", "{", "|", "}" +const literals = `(?:[\\x21\\x23-\\x24\\x26-\\x3B\\x3D\\x3F-\\x5B\\x5D\\x5F\\x61-\\x7A\\x7E]|${ucschar}|${iprivate}|${pctEncoded})`; + +const uriTemplate = `(?:${literals}|${expression})*`; + +/** + * @type API.isUriTemplate + * @function + */ +export const isUriTemplate = RegExp.prototype.test.bind(new RegExp(`^${uriTemplate}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js new file mode 100644 index 00000000..727df339 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js @@ -0,0 +1,14 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const unescaped = `[\\u{00}-\\u{2E}\\u{30}-\\u{7D}\\u{7F}-\\u{10FFFF}]`; // %x2F ('/') and %x7E ('~') are excluded from 'unescaped' +const escaped = `~[01]`; // representing '~' and '/', respectively +const referenceToken = `(?:${unescaped}|${escaped})*`; +const jsonPointer = `(?:/${referenceToken})*`; + +/** + * @type API.isJsonPointer + * @function + */ +export const isJsonPointer = RegExp.prototype.test.bind(new RegExp(`^${jsonPointer}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/uts46.js b/node_modules/@hyperjump/json-schema-formats/src/uts46.js new file mode 100644 index 00000000..fee52257 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/uts46.js @@ -0,0 +1,20 @@ +import { isIdnHostname } from "idn-hostname"; +import { isHostname } from "./rfc1123.js"; + +/** + * @import * as API from "./index.d.ts" + */ + +/** @type API.isAsciiIdn */ +export const isAsciiIdn = (hostname) => { + return isHostname(hostname) && isIdn(hostname); +}; + +/** @type API.isIdn */ +export const isIdn = (hostname) => { + try { + return isIdnHostname(hostname); + } catch (_error) { + return false; + } +}; diff --git a/node_modules/@hyperjump/json-schema/LICENSE b/node_modules/@hyperjump/json-schema/LICENSE new file mode 100644 index 00000000..b0718c34 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/json-schema/README.md b/node_modules/@hyperjump/json-schema/README.md new file mode 100644 index 00000000..2a84a170 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/README.md @@ -0,0 +1,966 @@ +# Hyperjump - JSON Schema + +A collection of modules for working with JSON Schemas. + +* Validate JSON-compatible values against a JSON Schemas + * Dialects: draft-2020-12, draft-2019-09, draft-07, draft-06, draft-04 + * Complete validation support for all formats defined for the `format` keyword + * Schemas can reference other schemas using a different dialect + * Work directly with schemas on the filesystem or HTTP +* OpenAPI + * Versions: 3.0, 3.1, 3.2 + * Validate an OpenAPI document + * Validate values against a schema from an OpenAPI document +* Create custom keywords, formats, vocabularies, and dialects +* Bundle multiple schemas into one document + * Uses the process defined in the 2020-12 specification but works with any + dialect. +* API for building non-validation JSON Schema tooling +* API for working with annotations + +## Install + +Includes support for node.js/bun.js (ES Modules, TypeScript) and browsers (works +with CSP +[`unsafe-eval`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_eval_expressions)). + +### Node.js + +```bash +npm install @hyperjump/json-schema +``` + +### TypeScript + +This package uses the package.json "exports" field. [TypeScript understands +"exports"](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing), +but you need to change a couple settings in your `tsconfig.json` for it to work. + +```jsonc + "module": "Node16", // or "NodeNext" + "moduleResolution": "Node16", // or "NodeNext" +``` + +### Versioning + +The API for this library is divided into two categories: Stable and +Experimental. The Stable API follows semantic versioning, but the Experimental +API may have backward-incompatible changes between minor versions. + +All experimental features are segregated into exports that include the word +"experimental" so you never accidentally depend on something that could change +or be removed in future releases. + +## Validation + +### Usage + +This library supports many versions of JSON Schema. Use the pattern +`@hyperjump/json-schema/*` to import the version you need. + +```javascript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +``` + +You can import support for additional versions as needed. + +```javascript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +import "@hyperjump/json-schema/draft-07"; +``` + +**Note**: The default export (`@hyperjump/json-schema`) is reserved for v1 of +JSON Schema that will hopefully be released in near future. + +**Validate schema from JavaScript** + +```javascript +registerSchema({ + $schema: "https://json-schema.org/draft/2020-12/schema", + type: "string" +}, "http://example.com/schemas/string"); + +const output = await validate("http://example.com/schemas/string", "foo"); +if (output.valid) { + console.log("Instance is valid :-)"); +} else { + console.log("Instance is invalid :-("); +} +``` + +**Compile schema** + +If you need to validate multiple instances against the same schema, you can +compile the schema into a reusable validation function. + +```javascript +const isString = await validate("http://example.com/schemas/string"); +const output1 = isString("foo"); +const output2 = isString(42); +``` + +**File-based and web-based schemas** + +Schemas that are available on the web can be loaded automatically without +needing to load them manually. + +```javascript +const output = await validate("http://example.com/schemas/string", "foo"); +``` + +When running on the server, you can also load schemas directly from the +filesystem. When fetching from the file system, there are limitations for +security reasons. You can only reference a schema identified by a file URI +scheme (**file**:///path/to/my/schemas) from another schema identified by a file +URI scheme. Also, a schema is not allowed to self-identify (`$id`) with a +`file:` URI scheme. + +```javascript +const output = await validate(`file://${__dirname}/string.schema.json`, "foo"); +``` + +If the schema URI is relative, the base URI in the browser is the browser +location and the base URI on the server is the current working directory. This +is the preferred way to work with file-based schemas on the server. + +```javascript +const output = await validate(`./string.schema.json`, "foo"); +``` + +You can add/modify/remove support for any URI scheme using the [plugin +system](https://github.com/hyperjump-io/browser/#uri-schemes) provided by +`@hyperjump/browser`. + +**Format** + +Format validation support needs to be explicitly loaded by importing +`@hyperjump/json-schema/formats`. Once loaded, it depends on the dialect whether +validation is enabled by default or not. You should explicitly enable/disable it +with the `setShouldValidateFormat` function. + +The `hostname`, `idn-hostname`, and `idn-email` validators are fairly large. If +you don't need support for those formats and bundle size is a concern, you can +use `@hyperjump/json-schema/formats-lite` instead to leave out support for those +formats. + +```javascript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +import { setShouldValidateFormat } from "@hyperjump/json-schema/formats"; + +const schemaUri = "https://example.com/number"; +registerSchema({ + "type": "string", + "format": "date" +}, schemaUri); + +setShouldValidateFormat(true); +const output = await validate(schemaUri, "Feb 29, 2031"); // { valid: false } +``` + +**OpenAPI** + +The OpenAPI 3.0 and 3.1 and 3.2 meta-schemas are pre-loaded and the OpenAPI JSON +Schema dialects for each of those versions is supported. A document with a +Content-Type of `application/openapi+json` (web) or a file extension of +`openapi.json` (filesystem) is understood as an OpenAPI document. + +Use the pattern `@hyperjump/json-schema/*` to import the version you need. The +available versions are `openapi-3-0` for 3.0, `openapi-3-1` for 3.1, and +`openapi-3-2` for 3.2. + +```javascript +import { validate } from "@hyperjump/json-schema/openapi-3-2"; + + +// Validate an OpenAPI 3.2 document +const output = await validate("https://spec.openapis.org/oas/3.2/schema-base", openapi); + +// Validate an instance against a schema in an OpenAPI 3.2 document +const output = await validate("./example.openapi.json#/components/schemas/foo", 42); +``` + +YAML support isn't built in, but you can add it by writing a +[MediaTypePlugin](https://github.com/hyperjump-io/browser/#media-types). You can +use the one at `lib/openapi.js` as an example and replace the JSON parts with +YAML. + +**Media types** + +This library uses media types to determine how to parse a retrieved document. It +will never assume the retrieved document is a schema. By default it's configured +to accept documents with a `application/schema+json` Content-Type header (web) +or a `.schema.json` file extension (filesystem). + +You can add/modify/remove support for any media-type using the [plugin +system](https://github.com/hyperjump-io/browser/#media-types) provided by +`@hyperjump/browser`. The following example shows how to add support for JSON +Schemas written in YAML. + +```javascript +import YAML from "yaml"; +import contentTypeParser from "content-type"; +import { addMediaTypePlugin } from "@hyperjump/browser"; +import { buildSchemaDocument } from "@hyperjump/json-schema/experimental"; + + +addMediaTypePlugin("application/schema+yaml", { + parse: async (response) => { + const contentType = contentTypeParser.parse(response.headers.get("content-type") ?? ""); + const contextDialectId = contentType.parameters.schema ?? contentType.parameters.profile; + + const foo = YAML.parse(await response.text()); + return buildSchemaDocument(foo, response.url, contextDialectId); + }, + fileMatcher: (path) => path.endsWith(".schema.yml") +}); +``` + +### API + +These are available from any of the exports that refer to a version of JSON +Schema, such as `@hyperjump/json-schema/draft-2020-12`. + +* **registerSchema**: (schema: object, retrievalUri?: string, defaultDialectId?: string) => void + + Add a schema the local schema registry. When this schema is needed, it will + be loaded from the register rather than the filesystem or network. If a + schema with the same identifier is already registered, an exception will be + throw. +* **unregisterSchema**: (uri: string) => void + + Remove a schema from the local schema registry. +* **getAllRegisteredSchemaUris**: () => string[] + + This function returns the URIs of all registered schemas +* **hasSchema**: (uri: string) => boolean + + Check if a schema with the given URI is already registered. +* _(deprecated)_ **addSchema**: (schema: object, retrievalUri?: string, defaultDialectId?: string) => void + + Load a schema manually rather than fetching it from the filesystem or over + the network. Any schema already registered with the same identifier will be + replaced with no warning. +* **validate**: (schemaURI: string, instance: any, outputFormat: ValidationOptions | OutputFormat = FLAG) => Promise\ + + Validate an instance against a schema. This function is curried to allow + compiling the schema once and applying it to multiple instances. +* **validate**: (schemaURI: string) => Promise\<(instance: any, outputFormat: ValidationOptions | OutputFormat = FLAG) => OutputUnit> + + Compiling a schema to a validation function. +* **FLAG**: "FLAG" + + An identifier for the `FLAG` output format as defined by the 2019-09 and + 2020-12 specifications. +* **InvalidSchemaError**: Error & { output: OutputUnit } + + This error is thrown if the schema being compiled is found to be invalid. + The `output` field contains an `OutputUnit` with information about the + error. You can use the `setMetaSchemaOutputFormat` configuration to set the + output format that is returned in `output`. +* **setMetaSchemaOutputFormat**: (outputFormat: OutputFormat) => void + + Set the output format used for validating schemas. +* **getMetaSchemaOutputFormat**: () => OutputFormat + + Get the output format used for validating schemas. +* **setShouldMetaValidate**: (isEnabled: boolean) => void + + Enable or disable validating schemas. +* **getShouldMetaValidate**: (isEnabled: boolean) => void + + Determine if validating schemas is enabled. + +**Type Definitions** + +The following types are used in the above definitions + +* **OutputFormat**: **FLAG** + + Only the `FLAG` output format is part of the Stable API. Additional [output + formats](#output-formats) are included as part of the Experimental API. +* **OutputUnit**: { valid: boolean } + + Output is an experimental feature of the JSON Schema specification. There + may be additional fields present in the OutputUnit, but only the `valid` + property should be considered part of the Stable API. +* **ValidationOptions**: + + * outputFormat?: OutputFormat + * plugins?: EvaluationPlugin[] + +## Bundling + +### Usage + +You can bundle schemas with external references into a single deliverable using +the official JSON Schema bundling process introduced in the 2020-12 +specification. Given a schema with external references, any external schemas +will be embedded in the schema resulting in a Compound Schema Document with all +the schemas necessary to evaluate the given schema in a single JSON document. + +The bundling process allows schemas to be embedded without needing to modify any +references which means you get the same output details whether you validate the +bundle or the original unbundled schemas. + +```javascript +import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; +import { bundle } from "@hyperjump/json-schema/bundle"; + + +registerSchema({ + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "type": "object", + "properties": { + "foo": { "$ref": "/string" } + } +}, "https://example.com/main"); + +registerSchema({ + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "type": "string" +}, "https://example.com/string"); + +const bundledSchema = await bundle("https://example.com/main"); // { +// "$schema": "https://json-schema.org/draft/2020-12/schema", +// +// "type": "object", +// "properties": { +// "foo": { "$ref": "/string" } +// }, +// +// "$defs": { +// "string": { +// "$id": "https://example.com/string", +// "type": "string" +// } +// } +// } +``` + +### API + +These are available from the `@hyperjump/json-schema/bundle` export. + +* **bundle**: (uri: string, options: Options) => Promise\ + + Create a bundled schema starting with the given schema. External schemas + will be fetched from the filesystem, the network, or the local schema + registry as needed. + + Options: + * alwaysIncludeDialect: boolean (default: false) -- Include dialect even + when it isn't strictly needed + * definitionNamingStrategy: "uri" | "uuid" (default: "uri") -- By default + the name used in definitions for embedded schemas will match the + identifier of the embedded schema. Alternatively, you can use a UUID + instead of the schema's URI. + * externalSchemas: string[] (default: []) -- A list of schemas URIs that + are available externally and should not be included in the bundle. + +## Experimental + +### Output Formats + +**Change the validation output format** + +The `FLAG` output format isn't very informative. You can change the output +format used for validation to get more information about failures. The official +output format is still evolving, so these may change or be replaced in the +future. This implementation currently supports the BASIC and DETAILED output +formats. + +```javascript +import { BASIC } from "@hyperjump/json-schema/experimental"; + + +const output = await validate("https://example.com/schema1", 42, BASIC); +``` + +**Change the schema validation output format** + +The output format used for validating schemas can be changed as well. + +```javascript +import { validate, setMetaSchemaOutputFormat } from "@hyperjump/json-schema/draft-2020-12"; +import { BASIC } from "@hyperjump/json-schema/experimental"; + + +setMetaSchemaOutputFormat(BASIC); +try { + const output = await validate("https://example.com/invalid-schema"); +} catch (error) { + console.log(error.output); +} +``` + +### Custom Keywords, Vocabularies, and Dialects + +In order to create and use a custom keyword, you need to define your keyword's +behavior, create a vocabulary that includes that keyword, and then create a +dialect that includes your vocabulary. + +Schemas are represented using the +[`@hyperjump/browser`](https://github.com/hyperjump-io/browser) package. You'll +use that API to traverse schemas. `@hyperjump/browser` uses async generators to +iterate over arrays and objects. If you like using higher order functions like +`map`/`filter`/`reduce`, see +[`@hyperjump/pact`](https://github.com/hyperjump-io/pact) for utilities for +working with generators and async generators. + +```javascript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +import { addKeyword, defineVocabulary, Validation } from "@hyperjump/json-schema/experimental"; +import * as Browser from "@hyperjump/browser"; + + +// Define a keyword that's an array of schemas that are applied sequentially +// using implication: A -> B -> C -> D +addKeyword({ + id: "https://example.com/keyword/implication", + + compile: async (schema, ast) => { + const subSchemas = []; + for await (const subSchema of Browser.iter(schema)) { + subSchemas.push(Validation.compile(subSchema, ast)); + } + return subSchemas; + + // Alternative using @hyperjump/pact + // return pipe( + // Browser.iter(schema), + // asyncMap((subSchema) => Validation.compile(subSchema, ast)), + // asyncCollectArray + // ); + }, + + interpret: (implies, instance, context) => { + return implies.reduce((valid, schema) => { + return !valid || Validation.interpret(schema, instance, context); + }, true); + } +}); + +// Create a vocabulary with this keyword and call it "implies" +defineVocabulary("https://example.com/vocab/logic", { + "implies": "https://example.com/keyword/implication" +}); + +// Create a vocabulary schema for this vocabulary +registerSchema({ + "$id": "https://example.com/meta/logic", + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$dynamicAnchor": "meta", + "properties": { + "implies": { + "type": "array", + "items": { "$dynamicRef": "meta" }, + "minItems": 2 + } + } +}); + +// Create a dialect schema adding this vocabulary to the standard JSON Schema +// vocabularies +registerSchema({ + "$id": "https://example.com/dialect/logic", + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true + "https://example.com/vocab/logic": true + }, + + "$dynamicAnchor": "meta", + + "allOf": [ + { "$ref": "https://json-schema.org/draft/2020-12/schema" }, + { "$ref": "/meta/logic" } + ] +}); + +// Use your dialect to validate a JSON instance +registerSchema({ + "$schema": "https://example.com/dialect/logic", + + "type": "number", + "implies": [ + { "minimum": 10 }, + { "multipleOf": 2 } + ] +}, "https://example.com/schema1"); +const output = await validate("https://example.com/schema1", 42); +``` + +### Custom Formats + +Custom formats work similarly to keywords. You define a format handler and then +associate that format handler with the format keyword that applies to the +dialects you're targeting. + +```JavaScript +import { registerSchema, validate, setShouldValidateFormat } from "@hyperjump/json-schema/draft-2020-12"; +import { addFormat, setFormatHandler } from "@hyperjump/json-schema/experimental"; + +const isoDateFormatUri = "https://example.com/format/iso-8601-date"; + +// Add the iso-date format handler +addFormat({ + id: isoDateFormatUri, + handler: (date) => new Date(date).toISOString() === date +}); + +// Add the "iso-date" format to the 2020-12 version of `format` +setFormatHandler("https://json-schema.org/keyword/draft-2020-12/format", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-2020-12/format-assertion", "iso-date", isoDateFormatUri); + +// Optional: Add the "iso-date" format to other dialects +setFormatHandler("https://json-schema.org/keyword/draft-2019-09/format", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-2019-09/format-assertion", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-07/format", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-06/format", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-04/format", "iso-date", isoDateFormatUri); + +const schemaUri = "https://example.com/main"; +registerSchema({ + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "type": "string", + "format": "iso-date" +}, schemaUri); + +setShouldValidateFormat(true); +const output = await validate(schemaUri, "Feb 28, 2031"); // { valid: false } +``` + +### Custom Meta Schema + +You can use a custom meta-schema to restrict users to a subset of JSON Schema +functionality. This example requires that no unknown keywords are used in the +schema. + +```javascript +registerSchema({ + "$id": "https://example.com/meta-schema1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true + }, + + "$dynamicAnchor": "meta", + + "$ref": "https://json-schema.org/draft/2020-12/schema", + "unevaluatedProperties": false +}); + +registerSchema({ + $schema: "https://example.com/meta-schema1", + type: "number", + foo: 42 +}, "https://example.com/schema1"); + +const output = await validate("https://example.com/schema1", 42); // Expect InvalidSchemaError +``` + +### EvaluationPlugins + +EvaluationPlugins allow you to hook into the validation process for various +purposes. There are hooks for before an after schema evaluation and before and +after keyword evaluation. (See the API section for the full interface) The +following is a simple example to record all the schema locations that were +evaluated. This could be used as part of a solution for determining test +coverage for a schema. + +```JavaScript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +import { BASIC } from "@hyperjump/json-schema/experimental.js"; + +class EvaluatedKeywordsPlugin { + constructor() { + this.schemaLocations = new Set(); + } + + beforeKeyword([, schemaUri]) { + this.schemaLocations.add(schemaUri); + } +} + +registerSchema({ + $schema: "https://json-schema.org/draft/2020-12/schema", + type: "object", + properties: { + foo: { type: "number" }, + bar: { type: "boolean" } + }, + required: ["foo"] +}, "https://schemas.hyperjump.io/main"); + +const evaluatedKeywordPlugin = new EvaluatedKeywordsPlugin(); + +await validate("https://schemas.hyperjump.io/main", { foo: 42 }, { + outputFormat: BASIC, + plugins: [evaluatedKeywordPlugin] +}); + +console.log(evaluatedKeywordPlugin.schemaLocations); +// Set(4) { +// 'https://schemas.hyperjump.io/main#/type', +// 'https://schemas.hyperjump.io/main#/properties', +// 'https://schemas.hyperjump.io/main#/properties/foo/type', +// 'https://schemas.hyperjump.io/main#/required' +// } + +// NOTE: #/properties/bar is not in the list because the instance doesn't include that property. +``` + +### API + +These are available from the `@hyperjump/json-schema/experimental` export. + +* **addKeyword**: (keywordHandler: Keyword) => void + + Define a keyword for use in a vocabulary. + + * **Keyword**: object + * id: string + + A URI that uniquely identifies the keyword. It should use a domain you + own to avoid conflict with keywords defined by others. + * compile: (schema: Browser, ast: AST, parentSchema: Browser) => Promise\ + + This function takes the keyword value, does whatever preprocessing it + can on it without an instance, and returns the result. The returned + value will be passed to the `interpret` function. The `ast` parameter + is needed for compiling sub-schemas. The `parentSchema` parameter is + primarily useful for looking up the value of an adjacent keyword that + might effect this one. + * interpret: (compiledKeywordValue: any, instance: JsonNode, context: ValidationContext) => boolean + + This function takes the value returned by the `compile` function and + the instance value that is being validated and returns whether the + value is valid or not. The other parameters are only needed for + validating sub-schemas. + * simpleApplicator?: boolean + + Some applicator keywords just apply schemas and don't do any + validation of its own. In these cases, it isn't helpful to include + them in BASIC output. This flag is used to trim those nodes from the + output. + * annotation?: (compiledKeywordValue: any) => any | undefined + + If the keyword is an annotation, it will need to implement this + function to return the annotation. + * plugin?: EvaluationPlugin + + If the keyword needs to track state during the evaluation process, you + can include an EvaluationPlugin that will get added only when this + keyword is present in the schema. + + * **ValidationContext**: object + * ast: AST + * plugins: EvaluationPlugins[] +* **addFormat**: (formatHandler: Format) => void + + Add a format handler. + + * **Format**: object + * id: string + + A URI that uniquely identifies the format. It should use a domain you + own to avoid conflict with keywords defined by others. + * handler: (value: any) => boolean + + A function that takes the value and returns a boolean determining if + it passes validation for the format. +* **setFormatHandler**: (keywordUri: string, formatName: string, formatUri: string) => void + + Add support for a format to the specified keyword. +* **removeFormatHandler**: (keywordUri, formatName) => void + + Remove support for a format from the specified keyword. +* **defineVocabulary**: (id: string, keywords: { [keyword: string]: string }) => void + + Define a vocabulary that maps keyword name to keyword URIs defined using + `addKeyword`. +* **getKeywordId**: (keywordName: string, dialectId: string) => string + + Get the identifier for a keyword by its name. +* **getKeyword**: (keywordId: string) => Keyword + + Get a keyword object by its URI. This is useful for building non-validation + tooling. +* **getKeywordByName**: (keywordName: string, dialectId: string) => Keyword + + Get a keyword object by its name. This is useful for building non-validation + tooling. +* **getKeywordName**: (dialectId: string, keywordId: string) => string + + Determine a keyword's name given its URI a dialect URI. This is useful when + defining a keyword that depends on the value of another keyword (such as how + `contains` depends on `minContains` and `maxContains`). +* **loadDialect**: (dialectId: string, dialect: { [vocabularyId: string] }, allowUnknownKeywords: boolean = false) => void + + Define a dialect. In most cases, dialects are loaded automatically from the + `$vocabulary` keyword in the meta-schema. The only time you would need to + load a dialect manually is if you're creating a distinct version of JSON + Schema rather than creating a dialect of an existing version of JSON Schema. +* **unloadDialect**: (dialectId: string) => void + + Remove a dialect. You shouldn't need to use this function. It's called for + you when you call `unregisterSchema`. +* **Validation**: Keyword + + A Keyword object that represents a "validate" operation. You would use this + for compiling and evaluating sub-schemas when defining a custom keyword. + +* **getSchema**: (uri: string, browser?: Browser) => Promise\ + + Get a schema by it's URI taking the local schema registry into account. +* **buildSchemaDocument**: (schema: SchemaObject | boolean, retrievalUri?: string, contextDialectId?: string) => SchemaDocument + + Build a SchemaDocument from a JSON-compatible value. You might use this if + you're creating a custom media type plugin, such as supporting JSON Schemas + in YAML. +* **canonicalUri**: (schema: Browser) => string + + Returns a URI for the schema. +* **toSchema**: (schema: Browser, options: ToSchemaOptions) => object + + Get a raw schema from a Schema Document. + + * **ToSchemaOptions**: object + + * contextDialectId: string (default: "") -- If the dialect of the schema + matches this value, the `$schema` keyword will be omitted. + * includeDialect: "auto" | "always" | "never" (default: "auto") -- If + "auto", `$schema` will only be included if it differs from + `contextDialectId`. + * contextUri: string (default: "") -- `$id`s will be relative to this + URI. + * includeEmbedded: boolean (default: true) -- If false, embedded schemas + will be unbundled from the schema. +* **compile**: (schema: Browser) => Promise\ + + Return a compiled schema. This is useful if you're creating tooling for + something other than validation. +* **interpret**: (schema: CompiledSchema, instance: JsonNode, outputFormat: OutputFormat = BASIC) => OutputUnit + + A curried function for validating an instance against a compiled schema. + This can be useful for creating custom output formats. + +* **OutputFormat**: **FLAG** | **BASIC** + + In addition to the `FLAG` output format in the Stable API, the Experimental + API includes support for the `BASIC` format as specified in the 2019-09 + specification (with some minor customizations). This implementation doesn't + include annotations or human readable error messages. The output can be + processed to create human readable error messages as needed. + +* **EvaluationPlugin**: object + * beforeSchema?(url: string, instance: JsonNode, context: Context): void + * beforeKeyword?(keywordNode: CompiledSchemaNode, instance: JsonNode, context: Context, schemaContext: Context, keyword: Keyword): void + * afterKeyword?(keywordNode: CompiledSchemaNode, instance: JsonNode, context: Context, valid: boolean, schemaContext: Context, keyword: Keyword): void + * afterSchema?(url: string, instance: JsonNode, context: Context, valid: boolean): void + +## Instance API (experimental) + +These functions are available from the +`@hyperjump/json-schema/instance/experimental` export. + +This library uses JsonNode objects to represent instances. You'll work with +these objects if you create a custom keyword. + +This API uses generators to iterate over arrays and objects. If you like using +higher order functions like `map`/`filter`/`reduce`, see +[`@hyperjump/pact`](https://github.com/hyperjump-io/pact) for utilities for +working with generators and async generators. + +* **fromJs**: (value: any, uri?: string) => JsonNode + + Construct a JsonNode from a JavaScript value. +* **cons**: (baseUri: string, pointer: string, value: any, type: string, children: JsonNode[], parent?: JsonNode) => JsonNode + + Construct a JsonNode. This is used internally. You probably want `fromJs` + instead. +* **get**: (url: string, instance: JsonNode) => JsonNode + + Apply a same-resource reference to a JsonNode. +* **uri**: (instance: JsonNode) => string + + Returns a URI for the value the JsonNode represents. +* **value**: (instance: JsonNode) => any + + Returns the value the JsonNode represents. +* **has**: (key: string, instance: JsonNode) => boolean + + Returns whether or not "key" is a property name in a JsonNode that + represents an object. +* **typeOf**: (instance: JsonNode) => string + + The JSON type of the JsonNode. In addition to the standard JSON types, + there's also the `property` type that indicates a property name/value pair + in an object. +* **step**: (key: string, instance: JsonNode) => JsonType + + Similar to indexing into a object or array using the `[]` operator. +* **iter**: (instance: JsonNode) => Generator\ + + Iterate over the items in the array that the JsonNode represents. +* **entries**: (instance: JsonNode) => Generator\<[JsonNode, JsonNode]> + + Similar to `Object.entries`, but yields JsonNodes for keys and values. +* **values**: (instance: JsonNode) => Generator\ + + Similar to `Object.values`, but yields JsonNodes for values. +* **keys**: (instance: JsonNode) => Generator\ + + Similar to `Object.keys`, but yields JsonNodes for keys. +* **length**: (instance: JsonNode) => number + + Similar to `Array.prototype.length`. + +## Annotations (experimental) +JSON Schema is for annotating JSON instances as well as validating them. This +module provides utilities for working with JSON documents annotated with JSON +Schema. + +### Usage +An annotated JSON document is represented as a +(JsonNode)[#instance-api-experimental] AST. You can use this AST to traverse +the data structure and get annotations for the values it represents. + +```javascript +import { registerSchema } from "@hyperjump/json-schema/draft/2020-12"; +import { annotate } from "@hyperjump/json-schema/annotations/experimental"; +import * as AnnotatedInstance from "@hyperjump/json-schema/annotated-instance/experimental"; + + +const schemaId = "https://example.com/foo"; +const dialectId = "https://json-schema.org/draft/2020-12/schema"; + +registerSchema({ + "$schema": dialectId, + + "title": "Person", + "unknown": "foo", + + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/name", + "deprecated": true + }, + "givenName": { + "$ref": "#/$defs/name", + "title": "Given Name" + }, + "familyName": { + "$ref": "#/$defs/name", + "title": "Family Name" + } + }, + + "$defs": { + "name": { + "type": "string", + "title": "Name" + } + } +}, schemaId); + +const instance = await annotate(schemaId, { + name: "Jason Desrosiers", + givenName: "Jason", + familyName: "Desrosiers" +}); + +// Get the title of the instance +const titles = AnnotatedInstance.annotation(instance, "title", dialectId); // => ["Person"] + +// Unknown keywords are collected as annotations +const unknowns = AnnotatedInstance.annotation(instance, "unknown", dialectId); // => ["foo"] + +// The type keyword doesn't produce annotations +const types = AnnotatedInstance.annotation(instance, "type", dialectId); // => [] + +// Get the title of each of the properties in the object +for (const [propertyNameNode, propertyInstance] of AnnotatedInstance.entries(instance)) { + const propertyName = AnnotatedInstance.value(propertyName); + console.log(propertyName, AnnotatedInstance.annotation(propertyInstance, "title", dialectId)); +} + +// List all locations in the instance that are deprecated +for (const deprecated of AnnotatedInstance.annotatedWith(instance, "deprecated", dialectId)) { + if (AnnotatedInstance.annotation(deprecated, "deprecated", dialectId)[0]) { + logger.warn(`The value at '${deprecated.pointer}' has been deprecated.`); // => (Example) "WARN: The value at '/name' has been deprecated." + } +} +``` + +### API +These are available from the `@hyperjump/json-schema/annotations/experimental` +export. + +* **annotate**: (schemaUri: string, instance: any, outputFormat: OutputFormat = BASIC) => Promise\ + + Annotate an instance using the given schema. The function is curried to + allow compiling the schema once and applying it to multiple instances. This + may throw an [InvalidSchemaError](#api) if there is a problem with the + schema or a ValidationError if the instance doesn't validate against the + schema. +* **interpret**: (compiledSchema: CompiledSchema, instance: JsonNode, outputFormat: OutputFormat = BASIC) => JsonNode + + Annotate a JsonNode object rather than a plain JavaScript value. This might + be useful when building tools on top of the annotation functionality, but + you probably don't need it. +* **ValidationError**: Error & { output: OutputUnit } + The `output` field contains an `OutputUnit` with information about the + error. + +## AnnotatedInstance API (experimental) +These are available from the +`@hyperjump/json-schema/annotated-instance/experimental` export. The +following functions are available in addition to the functions available in the +[Instance API](#instance-api-experimental). + +* **annotation**: (instance: JsonNode, keyword: string, dialect?: string): any[]; + + Get the annotations for a keyword for the value represented by the JsonNode. +* **annotatedWith**: (instance: JsonNode, keyword: string, dialect?: string): Generator; + + Get all JsonNodes that are annotated with the given keyword. +* **setAnnotation**: (instance: JsonNode, keywordId: string, value: any) => JsonNode + + Add an annotation to an instance. This is used internally, you probably + don't need it. + +## Contributing + +### Tests + +Run the tests + +```bash +npm test +``` + +Run the tests with a continuous test runner + +```bash +npm test -- --watch +``` diff --git a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts new file mode 100644 index 00000000..206df4f9 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts @@ -0,0 +1,4 @@ +export const annotation: (instance: JsonNode, keyword: string, dialectUri?: string) => A[]; +export const annotatedWith: (instance: A, keyword: string, dialectUri?: string) => Generator; + +export * from "../lib/instance.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js new file mode 100644 index 00000000..47b4c092 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js @@ -0,0 +1,20 @@ +import * as Instance from "../lib/instance.js"; +import { getKeywordId } from "../lib/keywords.js"; + + +const defaultDialectId = "https://json-schema.org/v1"; + +export const annotation = (node, keyword, dialect = defaultDialectId) => { + const keywordUri = getKeywordId(keyword, dialect); + return node.annotations[keywordUri] ?? []; +}; + +export const annotatedWith = function* (instance, keyword, dialectId = defaultDialectId) { + for (const node of Instance.allNodes(instance)) { + if (annotation(node, keyword, dialectId).length > 0) { + yield node; + } + } +}; + +export * from "../lib/instance.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/index.d.ts b/node_modules/@hyperjump/json-schema/annotations/index.d.ts new file mode 100644 index 00000000..75de9ce8 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/index.d.ts @@ -0,0 +1,21 @@ +import type { OutputFormat, Output, ValidationOptions } from "../lib/index.js"; +import type { CompiledSchema } from "../lib/experimental.js"; +import type { JsonNode } from "../lib/instance.js"; +import type { Json } from "@hyperjump/json-pointer"; + + +export const annotate: ( + (schemaUrl: string, value: Json, options?: OutputFormat | ValidationOptions) => Promise +) & ( + (schemaUrl: string) => Promise +); + +export type Annotator = (value: Json, options?: OutputFormat | ValidationOptions) => JsonNode; + +export const interpret: (compiledSchema: CompiledSchema, value: JsonNode, options?: OutputFormat | ValidationOptions) => JsonNode; + +export class ValidationError extends Error { + public output: Output & { valid: false }; + + public constructor(output: Output); +} diff --git a/node_modules/@hyperjump/json-schema/annotations/index.js b/node_modules/@hyperjump/json-schema/annotations/index.js new file mode 100644 index 00000000..82c3d7fd --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/index.js @@ -0,0 +1,45 @@ +import { ValidationError } from "./validation-error.js"; +import { + getSchema, + compile, + interpret as validate, + BASIC, + AnnotationsPlugin +} from "../lib/experimental.js"; +import * as Instance from "../lib/instance.js"; + + +export const annotate = async (schemaUri, json = undefined, options = undefined) => { + const schema = await getSchema(schemaUri); + const compiled = await compile(schema); + const interpretAst = (json, options) => interpret(compiled, Instance.fromJs(json), options); + + return json === undefined ? interpretAst : interpretAst(json, options); +}; + +export const interpret = (compiledSchema, instance, options = BASIC) => { + const annotationsPlugin = new AnnotationsPlugin(); + const plugins = options.plugins ?? []; + + const output = validate(compiledSchema, instance, { + outputFormat: typeof options === "string" ? options : options.outputFormat ?? BASIC, + plugins: [annotationsPlugin, ...plugins] + }); + + if (!output.valid) { + throw new ValidationError(output); + } + + for (const annotation of annotationsPlugin.annotations) { + const node = Instance.get(annotation.instanceLocation, instance); + const keyword = annotation.keyword; + if (!node.annotations[keyword]) { + node.annotations[keyword] = []; + } + node.annotations[keyword].unshift(annotation.annotation); + } + + return instance; +}; + +export { ValidationError } from "./validation-error.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts b/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts new file mode 100644 index 00000000..da8693cf --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts @@ -0,0 +1 @@ +export const isCompatible: (compatibility: string | undefined, versionUnderTest: number) => boolean; diff --git a/node_modules/@hyperjump/json-schema/annotations/test-utils.js b/node_modules/@hyperjump/json-schema/annotations/test-utils.js new file mode 100644 index 00000000..5841ca7f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/test-utils.js @@ -0,0 +1,38 @@ +export const isCompatible = (compatibility, versionUnderTest) => { + if (compatibility === undefined) { + return true; + } + + const constraints = compatibility.split(","); + for (const constraint of constraints) { + const matches = /(?<=|>=|=)?(?\d+)/.exec(constraint); + if (!matches) { + throw Error(`Invalid compatibility string: ${compatibility}`); + } + + const operator = matches[1] ?? ">="; + const version = parseInt(matches[2], 10); + + switch (operator) { + case ">=": + if (versionUnderTest < version) { + return false; + } + break; + case "<=": + if (versionUnderTest > version) { + return false; + } + break; + case "=": + if (versionUnderTest !== version) { + return false; + } + break; + default: + throw Error(`Unsupported contraint operator: ${operator}`); + } + } + + return true; +}; diff --git a/node_modules/@hyperjump/json-schema/annotations/validation-error.js b/node_modules/@hyperjump/json-schema/annotations/validation-error.js new file mode 100644 index 00000000..b0804723 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/validation-error.js @@ -0,0 +1,7 @@ +export class ValidationError extends Error { + constructor(output) { + super("Validation Error"); + this.name = this.constructor.name; + this.output = output; + } +} diff --git a/node_modules/@hyperjump/json-schema/bundle/index.d.ts b/node_modules/@hyperjump/json-schema/bundle/index.d.ts new file mode 100644 index 00000000..94c6c912 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/bundle/index.d.ts @@ -0,0 +1,14 @@ +import type { SchemaObject } from "../lib/index.js"; + + +export const bundle: (uri: string, options?: BundleOptions) => Promise; +export const URI: "uri"; +export const UUID: "uuid"; + +export type BundleOptions = { + alwaysIncludeDialect?: boolean; + definitionNamingStrategy?: DefinitionNamingStrategy; + externalSchemas?: string[]; +}; + +export type DefinitionNamingStrategy = "uri" | "uuid"; diff --git a/node_modules/@hyperjump/json-schema/bundle/index.js b/node_modules/@hyperjump/json-schema/bundle/index.js new file mode 100644 index 00000000..99c6fe94 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/bundle/index.js @@ -0,0 +1,83 @@ +import { v4 as uuid } from "uuid"; +import { jrefTypeOf } from "@hyperjump/browser/jref"; +import * as JsonPointer from "@hyperjump/json-pointer"; +import { resolveIri, toAbsoluteIri } from "@hyperjump/uri"; +import { getSchema, toSchema, getKeywordName } from "../lib/experimental.js"; + + +export const URI = "uri", UUID = "uuid"; + +const defaultOptions = { + alwaysIncludeDialect: false, + definitionNamingStrategy: URI, + externalSchemas: [] +}; + +export const bundle = async (url, options = {}) => { + const fullOptions = { ...defaultOptions, ...options }; + + const mainSchema = await getSchema(url); + fullOptions.contextUri = mainSchema.document.baseUri; + fullOptions.contextDialectId = mainSchema.document.dialectId; + + const bundled = toSchema(mainSchema); + fullOptions.bundlingLocation = "/" + getKeywordName(fullOptions.contextDialectId, "https://json-schema.org/keyword/definitions"); + if (JsonPointer.get(fullOptions.bundlingLocation, bundled) === undefined) { + JsonPointer.assign(fullOptions.bundlingLocation, bundled, {}); + } + + return await doBundling(mainSchema.uri, bundled, fullOptions); +}; + +const doBundling = async (schemaUri, bundled, fullOptions, contextSchema, visited = new Set()) => { + visited.add(schemaUri); + + const schema = await getSchema(schemaUri, contextSchema); + for (const reference of allReferences(schema.document.root)) { + const uri = toAbsoluteIri(resolveIri(reference.href, schema.document.baseUri)); + if (visited.has(uri) || fullOptions.externalSchemas.includes(uri) || (uri in schema.document.embedded && !(uri in schema._cache))) { + continue; + } + + const externalSchema = await getSchema(uri, contextSchema); + const embeddedSchema = toSchema(externalSchema, { + contextUri: externalSchema.document.baseUri.startsWith("file:") ? fullOptions.contextUri : undefined, + includeDialect: fullOptions.alwaysIncludeDialect ? "always" : "auto", + contextDialectId: fullOptions.contextDialectId + }); + let id; + if (fullOptions.definitionNamingStrategy === URI) { + const idToken = getKeywordName(externalSchema.document.dialectId, "https://json-schema.org/keyword/id") + || getKeywordName(externalSchema.document.dialectId, "https://json-schema.org/keyword/draft-04/id"); + id = embeddedSchema[idToken]; + } else if (fullOptions.definitionNamingStrategy === UUID) { + id = uuid(); + } else { + throw Error(`Unknown definition naming stragety: ${fullOptions.definitionNamingStrategy}`); + } + const pointer = JsonPointer.append(id, fullOptions.bundlingLocation); + JsonPointer.assign(pointer, bundled, embeddedSchema); + + bundled = await doBundling(uri, bundled, fullOptions, schema, visited); + } + + return bundled; +}; + +const allReferences = function* (node) { + switch (jrefTypeOf(node)) { + case "object": + for (const property in node) { + yield* allReferences(node[property]); + } + break; + case "array": + for (const item of node) { + yield* allReferences(item); + } + break; + case "reference": + yield node; + break; + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js b/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js new file mode 100644 index 00000000..da09d332 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js @@ -0,0 +1,38 @@ +import { drop } from "@hyperjump/pact"; +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getKeywordName, Validation } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/additionalItems"; + +const compile = async (schema, ast, parentSchema) => { + const itemsKeywordName = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/items"); + const items = await Browser.step(itemsKeywordName, parentSchema); + const numberOfItems = Browser.typeOf(items) === "array" ? Browser.length(items) : Number.MAX_SAFE_INTEGER; + + return [numberOfItems, await Validation.compile(schema, ast)]; +}; + +const interpret = ([numberOfItems, additionalItems], instance, context) => { + if (Instance.typeOf(instance) !== "array") { + return true; + } + + let isValid = true; + let index = numberOfItems; + for (const item of drop(numberOfItems, Instance.iter(instance))) { + if (!Validation.interpret(additionalItems, item, context)) { + isValid = false; + } + + context.evaluatedItems?.add(index); + index++; + } + + return isValid; +}; + +const simpleApplicator = true; + +export default { id, compile, interpret, simpleApplicator }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/dependencies.js b/node_modules/@hyperjump/json-schema/draft-04/dependencies.js new file mode 100644 index 00000000..60e96ce5 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/dependencies.js @@ -0,0 +1,36 @@ +import { pipe, asyncMap, asyncCollectArray } from "@hyperjump/pact"; +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { Validation } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/dependencies"; + +const compile = (schema, ast) => pipe( + Browser.entries(schema), + asyncMap(async ([key, dependency]) => [ + key, + Browser.typeOf(dependency) === "array" ? Browser.value(dependency) : await Validation.compile(dependency, ast) + ]), + asyncCollectArray +); + +const interpret = (dependencies, instance, context) => { + if (Instance.typeOf(instance) !== "object") { + return true; + } + + return dependencies.every(([propertyName, dependency]) => { + if (!Instance.has(propertyName, instance)) { + return true; + } + + if (Array.isArray(dependency)) { + return dependency.every((key) => Instance.has(key, instance)); + } else { + return Validation.interpret(dependency, instance, context); + } + }); +}; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js new file mode 100644 index 00000000..5acd1aa0 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js @@ -0,0 +1,5 @@ +const id = "https://json-schema.org/keyword/draft-04/exclusiveMaximum"; +const compile = (schema) => schema.value; +const interpret = () => true; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js new file mode 100644 index 00000000..26e00941 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js @@ -0,0 +1,5 @@ +const id = "https://json-schema.org/keyword/draft-04/exclusiveMinimum"; +const compile = (schema) => schema.value; +const interpret = () => true; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/format.js b/node_modules/@hyperjump/json-schema/draft-04/format.js new file mode 100644 index 00000000..e4854f83 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/format.js @@ -0,0 +1,31 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-04/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (getShouldValidateFormat() === false) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "email": "https://json-schema.org/format/email", + "hostname": "https://json-schema.org/format/draft-04/hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/id.js b/node_modules/@hyperjump/json-schema/draft-04/id.js new file mode 100644 index 00000000..b5f6df1b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/id.js @@ -0,0 +1 @@ +export default { id: "https://json-schema.org/keyword/draft-04/id" }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/index.d.ts b/node_modules/@hyperjump/json-schema/draft-04/index.d.ts new file mode 100644 index 00000000..ed6460b2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/index.d.ts @@ -0,0 +1,43 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft04 = { + $ref: string; +} | { + $schema?: "http://json-schema.org/draft-04/schema#"; + id?: string; + title?: string; + description?: string; + default?: Json; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: boolean; + minimum?: number; + exclusiveMinimum?: boolean; + maxLength?: number; + minLength?: number; + pattern?: string; + additionalItems?: boolean | JsonSchemaDraft04; + items?: JsonSchemaDraft04 | JsonSchemaDraft04[]; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxProperties?: number; + minProperties?: number; + required?: string[]; + additionalProperties?: boolean | JsonSchemaDraft04; + definitions?: Record; + properties?: Record; + patternProperties?: Record; + dependencies?: Record; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri"; + allOf?: JsonSchemaDraft04[]; + anyOf?: JsonSchemaDraft04[]; + oneOf?: JsonSchemaDraft04[]; + not?: JsonSchemaDraft04; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-04/index.js b/node_modules/@hyperjump/json-schema/draft-04/index.js new file mode 100644 index 00000000..5ab69ea8 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/index.js @@ -0,0 +1,71 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import metaSchema from "./schema.js"; +import additionalItems from "./additionalItems.js"; +import dependencies from "./dependencies.js"; +import exclusiveMaximum from "./exclusiveMaximum.js"; +import exclusiveMinimum from "./exclusiveMinimum.js"; +import id from "./id.js"; +import items from "./items.js"; +import format from "./format.js"; +import maximum from "./maximum.js"; +import minimum from "./minimum.js"; +import ref from "./ref.js"; + + +addKeyword(additionalItems); +addKeyword(dependencies); +addKeyword(exclusiveMaximum); +addKeyword(exclusiveMinimum); +addKeyword(maximum); +addKeyword(minimum); +addKeyword(id); +addKeyword(items); +addKeyword(format); +addKeyword(ref); + +const jsonSchemaVersion = "http://json-schema.org/draft-04/schema"; + +defineVocabulary(jsonSchemaVersion, { + "id": "https://json-schema.org/keyword/draft-04/id", + "$ref": "https://json-schema.org/keyword/draft-04/ref", + "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "default": "https://json-schema.org/keyword/default", + "definitions": "https://json-schema.org/keyword/definitions", + "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", + "description": "https://json-schema.org/keyword/description", + "enum": "https://json-schema.org/keyword/enum", + "exclusiveMaximum": "https://json-schema.org/keyword/draft-04/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/draft-04/exclusiveMinimum", + "format": "https://json-schema.org/keyword/draft-04/format", + "items": "https://json-schema.org/keyword/draft-04/items", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/draft-04/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/draft-04/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "pattern": "https://json-schema.org/keyword/pattern", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "properties": "https://json-schema.org/keyword/properties", + "required": "https://json-schema.org/keyword/required", + "title": "https://json-schema.org/keyword/title", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +loadDialect(jsonSchemaVersion, { + [jsonSchemaVersion]: true +}, true); + +registerSchema(metaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-04/items.js b/node_modules/@hyperjump/json-schema/draft-04/items.js new file mode 100644 index 00000000..9d1ece4b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/items.js @@ -0,0 +1,57 @@ +import { pipe, asyncMap, asyncCollectArray, zip } from "@hyperjump/pact"; +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { Validation } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/items"; + +const compile = (schema, ast) => { + if (Browser.typeOf(schema) === "array") { + return pipe( + Browser.iter(schema), + asyncMap((itemSchema) => Validation.compile(itemSchema, ast)), + asyncCollectArray + ); + } else { + return Validation.compile(schema, ast); + } +}; + +const interpret = (items, instance, context) => { + if (Instance.typeOf(instance) !== "array") { + return true; + } + + let isValid = true; + let index = 0; + + if (typeof items === "string") { + for (const item of Instance.iter(instance)) { + if (!Validation.interpret(items, item, context)) { + isValid = false; + } + + context.evaluatedItems?.add(index++); + } + } else { + for (const [tupleItem, tupleInstance] of zip(items, Instance.iter(instance))) { + if (!tupleInstance) { + break; + } + + if (!Validation.interpret(tupleItem, tupleInstance, context)) { + isValid = false; + } + + context.evaluatedItems?.add(index); + index++; + } + } + + return isValid; +}; + +const simpleApplicator = true; + +export default { id, compile, interpret, simpleApplicator }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/maximum.js b/node_modules/@hyperjump/json-schema/draft-04/maximum.js new file mode 100644 index 00000000..a2a889ce --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/maximum.js @@ -0,0 +1,25 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getKeywordName } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/maximum"; + +const compile = async (schema, _ast, parentSchema) => { + const exclusiveMaximumKeyword = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/exclusiveMaximum"); + const exclusiveMaximum = await Browser.step(exclusiveMaximumKeyword, parentSchema); + const isExclusive = Browser.value(exclusiveMaximum); + + return [Browser.value(schema), isExclusive]; +}; + +const interpret = ([maximum, isExclusive], instance) => { + if (Instance.typeOf(instance) !== "number") { + return true; + } + + const value = Instance.value(instance); + return isExclusive ? value < maximum : value <= maximum; +}; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/minimum.js b/node_modules/@hyperjump/json-schema/draft-04/minimum.js new file mode 100644 index 00000000..c0146aba --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/minimum.js @@ -0,0 +1,25 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getKeywordName } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/minimum"; + +const compile = async (schema, _ast, parentSchema) => { + const exclusiveMinimumKeyword = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/exclusiveMinimum"); + const exclusiveMinimum = await Browser.step(exclusiveMinimumKeyword, parentSchema); + const isExclusive = Browser.value(exclusiveMinimum); + + return [Browser.value(schema), isExclusive]; +}; + +const interpret = ([minimum, isExclusive], instance) => { + if (Instance.typeOf(instance) !== "number") { + return true; + } + + const value = Instance.value(instance); + return isExclusive ? value > minimum : value >= minimum; +}; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/ref.js b/node_modules/@hyperjump/json-schema/draft-04/ref.js new file mode 100644 index 00000000..5e714c50 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/ref.js @@ -0,0 +1 @@ +export default { id: "https://json-schema.org/keyword/draft-04/ref" }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/schema.js b/node_modules/@hyperjump/json-schema/draft-04/schema.js new file mode 100644 index 00000000..130d72f4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/schema.js @@ -0,0 +1,149 @@ +export default { + "id": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "positiveInteger": { + "type": "integer", + "minimum": 0 + }, + "positiveIntegerDefault0": { + "allOf": [{ "$ref": "#/definitions/positiveInteger" }, { "default": 0 }] + }, + "simpleTypes": { + "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + } + }, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "$schema": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": {}, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { "$ref": "#/definitions/positiveInteger" }, + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": {} + }, + "maxItems": { "$ref": "#/definitions/positiveInteger" }, + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { "type": "string" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "dependencies": { + "exclusiveMaximum": ["maximum"], + "exclusiveMinimum": ["minimum"] + }, + "default": {} +}; diff --git a/node_modules/@hyperjump/json-schema/draft-06/contains.js b/node_modules/@hyperjump/json-schema/draft-06/contains.js new file mode 100644 index 00000000..628fe03e --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/contains.js @@ -0,0 +1,15 @@ +import { some } from "@hyperjump/pact"; +import * as Instance from "../lib/instance.js"; +import { Validation } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-06/contains"; + +const compile = (schema, ast) => Validation.compile(schema, ast); + +const interpret = (contains, instance, context) => { + return Instance.typeOf(instance) !== "array" + || some((item) => Validation.interpret(contains, item, context), Instance.iter(instance)); +}; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-06/format.js b/node_modules/@hyperjump/json-schema/draft-06/format.js new file mode 100644 index 00000000..5c8cdf23 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/format.js @@ -0,0 +1,34 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-06/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (getShouldValidateFormat() === false) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "email": "https://json-schema.org/format/email", + "hostname": "https://json-schema.org/format/draft-04/hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-06/index.d.ts b/node_modules/@hyperjump/json-schema/draft-06/index.d.ts new file mode 100644 index 00000000..becf03fa --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/index.d.ts @@ -0,0 +1,49 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft06Ref = { + $ref: string; +}; +export type JsonSchemaDraft06Object = { + $schema?: "http://json-schema.org/draft-06/schema#"; + $id?: string; + title?: string; + description?: string; + default?: Json; + examples?: Json[]; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + additionalItems?: JsonSchemaDraft06; + items?: JsonSchemaDraft06 | JsonSchemaDraft06[]; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + contains?: JsonSchemaDraft06; + maxProperties?: number; + minProperties?: number; + required?: string[]; + additionalProperties?: JsonSchemaDraft06; + definitions?: Record; + properties?: Record; + patternProperties?: Record; + dependencies?: Record; + propertyNames?: JsonSchemaDraft06; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "uri-template" | "json-pointer"; + allOf?: JsonSchemaDraft06[]; + anyOf?: JsonSchemaDraft06[]; + oneOf?: JsonSchemaDraft06[]; + not?: JsonSchemaDraft06; +}; +export type JsonSchemaDraft06 = boolean | JsonSchemaDraft06Ref | JsonSchemaDraft06Object; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-06/index.js b/node_modules/@hyperjump/json-schema/draft-06/index.js new file mode 100644 index 00000000..ac8b1a7c --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/index.js @@ -0,0 +1,70 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; + +import metaSchema from "./schema.js"; +import additionalItems from "../draft-04/additionalItems.js"; +import contains from "./contains.js"; +import dependencies from "../draft-04/dependencies.js"; +import id from "../draft-04/id.js"; +import items from "../draft-04/items.js"; +import format from "./format.js"; +import ref from "../draft-04/ref.js"; + + +addKeyword(additionalItems); +addKeyword(dependencies); +addKeyword(contains); +addKeyword(id); +addKeyword(items); +addKeyword(format); +addKeyword(ref); + +const jsonSchemaVersion = "http://json-schema.org/draft-06/schema"; + +defineVocabulary(jsonSchemaVersion, { + "$id": "https://json-schema.org/keyword/draft-04/id", + "$ref": "https://json-schema.org/keyword/draft-04/ref", + "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "const": "https://json-schema.org/keyword/const", + "contains": "https://json-schema.org/keyword/draft-06/contains", + "default": "https://json-schema.org/keyword/default", + "definitions": "https://json-schema.org/keyword/definitions", + "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", + "description": "https://json-schema.org/keyword/description", + "enum": "https://json-schema.org/keyword/enum", + "examples": "https://json-schema.org/keyword/examples", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "format": "https://json-schema.org/keyword/draft-06/format", + "items": "https://json-schema.org/keyword/draft-04/items", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "pattern": "https://json-schema.org/keyword/pattern", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "properties": "https://json-schema.org/keyword/properties", + "propertyNames": "https://json-schema.org/keyword/propertyNames", + "required": "https://json-schema.org/keyword/required", + "title": "https://json-schema.org/keyword/title", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +loadDialect(jsonSchemaVersion, { + [jsonSchemaVersion]: true +}, true); + +registerSchema(metaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-06/schema.js b/node_modules/@hyperjump/json-schema/draft-06/schema.js new file mode 100644 index 00000000..3ebf9910 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/schema.js @@ -0,0 +1,154 @@ +export default { + "$schema": "http://json-schema.org/draft-06/schema#", + "$id": "http://json-schema.org/draft-06/schema#", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { "$ref": "#/definitions/nonNegativeInteger" }, + { "default": 0 } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + }, + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": {}, + "examples": { + "type": "array", + "items": {} + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, + "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { "$ref": "#" }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": {} + }, + "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, + "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { "$ref": "#" }, + "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, + "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { "$ref": "#" }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "propertyNames": { "$ref": "#" }, + "const": {}, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { "type": "string" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "default": {} +}; diff --git a/node_modules/@hyperjump/json-schema/draft-07/format.js b/node_modules/@hyperjump/json-schema/draft-07/format.js new file mode 100644 index 00000000..0da3477f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-07/format.js @@ -0,0 +1,42 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-07/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (getShouldValidateFormat() === false) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-07/index.d.ts b/node_modules/@hyperjump/json-schema/draft-07/index.d.ts new file mode 100644 index 00000000..33a0cdcb --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-07/index.d.ts @@ -0,0 +1,55 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft07 = boolean | { + $ref: string; +} | { + $schema?: "http://json-schema.org/draft-07/schema#"; + $id?: string; + $comment?: string; + title?: string; + description?: string; + default?: Json; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + additionalItems?: JsonSchemaDraft07; + items?: JsonSchemaDraft07 | JsonSchemaDraft07[]; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + contains?: JsonSchemaDraft07; + maxProperties?: number; + minProperties?: number; + required?: string[]; + additionalProperties?: JsonSchemaDraft07; + definitions?: Record; + properties?: Record; + patternProperties?: Record; + dependencies?: Record; + propertyNames?: JsonSchemaDraft07; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + format?: "date-time" | "date" | "time" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + if?: JsonSchemaDraft07; + then?: JsonSchemaDraft07; + else?: JsonSchemaDraft07; + allOf?: JsonSchemaDraft07[]; + anyOf?: JsonSchemaDraft07[]; + oneOf?: JsonSchemaDraft07[]; + not?: JsonSchemaDraft07; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-07/index.js b/node_modules/@hyperjump/json-schema/draft-07/index.js new file mode 100644 index 00000000..0bdbfaa5 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-07/index.js @@ -0,0 +1,78 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; + +import metaSchema from "./schema.js"; +import additionalItems from "../draft-04/additionalItems.js"; +import contains from "../draft-06/contains.js"; +import dependencies from "../draft-04/dependencies.js"; +import items from "../draft-04/items.js"; +import id from "../draft-04/id.js"; +import format from "./format.js"; +import ref from "../draft-04/ref.js"; + + +addKeyword(additionalItems); +addKeyword(contains); +addKeyword(dependencies); +addKeyword(id); +addKeyword(items); +addKeyword(format); +addKeyword(ref); + +const jsonSchemaVersion = "http://json-schema.org/draft-07/schema"; + +defineVocabulary(jsonSchemaVersion, { + "$id": "https://json-schema.org/keyword/draft-04/id", + "$ref": "https://json-schema.org/keyword/draft-04/ref", + "$comment": "https://json-schema.org/keyword/comment", + "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "const": "https://json-schema.org/keyword/const", + "contains": "https://json-schema.org/keyword/draft-06/contains", + "contentEncoding": "https://json-schema.org/keyword/contentEncoding", + "contentMediaType": "https://json-schema.org/keyword/contentMediaType", + "default": "https://json-schema.org/keyword/default", + "definitions": "https://json-schema.org/keyword/definitions", + "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", + "description": "https://json-schema.org/keyword/description", + "enum": "https://json-schema.org/keyword/enum", + "examples": "https://json-schema.org/keyword/examples", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "format": "https://json-schema.org/keyword/draft-07/format", + "if": "https://json-schema.org/keyword/if", + "then": "https://json-schema.org/keyword/then", + "else": "https://json-schema.org/keyword/else", + "items": "https://json-schema.org/keyword/draft-04/items", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "pattern": "https://json-schema.org/keyword/pattern", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "properties": "https://json-schema.org/keyword/properties", + "propertyNames": "https://json-schema.org/keyword/propertyNames", + "readOnly": "https://json-schema.org/keyword/readOnly", + "required": "https://json-schema.org/keyword/required", + "title": "https://json-schema.org/keyword/title", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems", + "writeOnly": "https://json-schema.org/keyword/writeOnly" +}); + +loadDialect(jsonSchemaVersion, { + [jsonSchemaVersion]: true +}, true); + +registerSchema(metaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-07/schema.js b/node_modules/@hyperjump/json-schema/draft-07/schema.js new file mode 100644 index 00000000..83aa3de6 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-07/schema.js @@ -0,0 +1,172 @@ +export default { + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://json-schema.org/draft-07/schema#", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { "$ref": "#/definitions/nonNegativeInteger" }, + { "default": 0 } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + }, + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$comment": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, + "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { "$ref": "#" }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": true + }, + "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, + "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { "$ref": "#" }, + "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, + "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { "$ref": "#" }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "propertyNames": { "format": "regex" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "propertyNames": { "$ref": "#" }, + "const": true, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { "type": "string" }, + "contentMediaType": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "if": { "$ref": "#" }, + "then": { "$ref": "#" }, + "else": { "$ref": "#" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "default": true +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js new file mode 100644 index 00000000..4f884d29 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js @@ -0,0 +1,44 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-2019-09/format-assertion"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (getShouldValidateFormat() === false) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "duration": "https://json-schema.org/format/duration", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uuid": "https://json-schema.org/format/uuid", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/format.js b/node_modules/@hyperjump/json-schema/draft-2019-09/format.js new file mode 100644 index 00000000..2129b595 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/format.js @@ -0,0 +1,44 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-2019-09/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (!getShouldValidateFormat()) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "duration": "https://json-schema.org/format/duration", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uuid": "https://json-schema.org/format/uuid", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts b/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts new file mode 100644 index 00000000..6b332238 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts @@ -0,0 +1,66 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft201909Object = { + $schema?: "https://json-schema.org/draft/2019-09/schema"; + $id?: string; + $anchor?: string; + $ref?: string; + $recursiveRef?: "#"; + $recursiveAnchor?: boolean; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: JsonSchemaDraft201909; + unevaluatedItems?: JsonSchemaDraft201909; + items?: JsonSchemaDraft201909 | JsonSchemaDraft201909[]; + contains?: JsonSchemaDraft201909; + additionalProperties?: JsonSchemaDraft201909; + unevaluatedProperties?: JsonSchemaDraft201909; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: JsonSchemaDraft201909; + if?: JsonSchemaDraft201909; + then?: JsonSchemaDraft201909; + else?: JsonSchemaDraft201909; + allOf?: JsonSchemaDraft201909[]; + anyOf?: JsonSchemaDraft201909[]; + oneOf?: JsonSchemaDraft201909[]; + not?: JsonSchemaDraft201909; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: JsonSchemaDraft201909; +}; +export type JsonSchemaDraft201909 = boolean | JsonSchemaDraft201909Object; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/index.js b/node_modules/@hyperjump/json-schema/draft-2019-09/index.js new file mode 100644 index 00000000..8abfa4e6 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/index.js @@ -0,0 +1,118 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; + +import metaSchema from "./schema.js"; +import coreMetaSchema from "./meta/core.js"; +import applicatorMetaSchema from "./meta/applicator.js"; +import validationMetaSchema from "./meta/validation.js"; +import metaDataMetaSchema from "./meta/meta-data.js"; +import formatMetaSchema from "./meta/format.js"; +import contentMetaSchema from "./meta/content.js"; + +import additionalItems from "../draft-04/additionalItems.js"; +import items from "../draft-04/items.js"; +import formatAssertion from "./format-assertion.js"; +import format from "./format.js"; +import recursiveAnchor from "./recursiveAnchor.js"; +import recursiveRef from "../draft-2020-12/dynamicRef.js"; + + +addKeyword(additionalItems); +addKeyword(items); +addKeyword(formatAssertion); +addKeyword(format); +addKeyword(recursiveAnchor); +addKeyword(recursiveRef); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/core", { + "$anchor": "https://json-schema.org/keyword/anchor", + "$comment": "https://json-schema.org/keyword/comment", + "$defs": "https://json-schema.org/keyword/definitions", + "$recursiveAnchor": "https://json-schema.org/keyword/draft-2019-09/recursiveAnchor", + "$recursiveRef": "https://json-schema.org/keyword/draft-2020-12/dynamicRef", + "$id": "https://json-schema.org/keyword/id", + "$ref": "https://json-schema.org/keyword/ref", + "$vocabulary": "https://json-schema.org/keyword/vocabulary" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/applicator", { + "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "contains": "https://json-schema.org/keyword/contains", + "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", + "if": "https://json-schema.org/keyword/if", + "then": "https://json-schema.org/keyword/then", + "else": "https://json-schema.org/keyword/else", + "items": "https://json-schema.org/keyword/draft-04/items", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "properties": "https://json-schema.org/keyword/properties", + "propertyNames": "https://json-schema.org/keyword/propertyNames", + "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", + "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/validation", { + "const": "https://json-schema.org/keyword/const", + "enum": "https://json-schema.org/keyword/enum", + "dependentRequired": "https://json-schema.org/keyword/dependentRequired", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "maxContains": "https://json-schema.org/keyword/maxContains", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minContains": "https://json-schema.org/keyword/minContains", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "pattern": "https://json-schema.org/keyword/pattern", + "required": "https://json-schema.org/keyword/required", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/meta-data", { + "default": "https://json-schema.org/keyword/default", + "deprecated": "https://json-schema.org/keyword/deprecated", + "description": "https://json-schema.org/keyword/description", + "examples": "https://json-schema.org/keyword/examples", + "readOnly": "https://json-schema.org/keyword/readOnly", + "title": "https://json-schema.org/keyword/title", + "writeOnly": "https://json-schema.org/keyword/writeOnly" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/format", { + "format": "https://json-schema.org/keyword/draft-2019-09/format-assertion" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/content", { + "contentEncoding": "https://json-schema.org/keyword/contentEncoding", + "contentMediaType": "https://json-schema.org/keyword/contentMediaType", + "contentSchema": "https://json-schema.org/keyword/contentSchema" +}); + +loadDialect("https://json-schema.org/draft/2019-09/schema", { + "https://json-schema.org/draft/2019-09/vocab/core": true, + "https://json-schema.org/draft/2019-09/vocab/applicator": true, + "https://json-schema.org/draft/2019-09/vocab/validation": true, + "https://json-schema.org/draft/2019-09/vocab/meta-data": true, + "https://json-schema.org/draft/2019-09/vocab/format": true, + "https://json-schema.org/draft/2019-09/vocab/content": true +}, true); + +registerSchema(metaSchema); +registerSchema(coreMetaSchema); +registerSchema(applicatorMetaSchema); +registerSchema(validationMetaSchema); +registerSchema(metaDataMetaSchema); +registerSchema(formatMetaSchema); +registerSchema(contentMetaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js new file mode 100644 index 00000000..3ff97a46 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js @@ -0,0 +1,55 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/applicator", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/applicator": true + }, + "$recursiveAnchor": true, + + "title": "Applicator vocabulary meta-schema", + "properties": { + "additionalItems": { "$recursiveRef": "#" }, + "unevaluatedItems": { "$recursiveRef": "#" }, + "items": { + "anyOf": [ + { "$recursiveRef": "#" }, + { "$ref": "#/$defs/schemaArray" } + ] + }, + "contains": { "$recursiveRef": "#" }, + "additionalProperties": { "$recursiveRef": "#" }, + "unevaluatedProperties": { "$recursiveRef": "#" }, + "properties": { + "type": "object", + "additionalProperties": { "$recursiveRef": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$recursiveRef": "#" }, + "propertyNames": { "format": "regex" }, + "default": {} + }, + "dependentSchemas": { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + }, + "propertyNames": { "$recursiveRef": "#" }, + "if": { "$recursiveRef": "#" }, + "then": { "$recursiveRef": "#" }, + "else": { "$recursiveRef": "#" }, + "allOf": { "$ref": "#/$defs/schemaArray" }, + "anyOf": { "$ref": "#/$defs/schemaArray" }, + "oneOf": { "$ref": "#/$defs/schemaArray" }, + "not": { "$recursiveRef": "#" } + }, + "$defs": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$recursiveRef": "#" } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js new file mode 100644 index 00000000..c62760f3 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js @@ -0,0 +1,17 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/content", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/content": true + }, + "$recursiveAnchor": true, + + "title": "Content vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "contentMediaType": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "contentSchema": { "$recursiveRef": "#" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js new file mode 100644 index 00000000..ea5fefa1 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js @@ -0,0 +1,57 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/core", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/core": true + }, + "$recursiveAnchor": true, + + "title": "Core vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference", + "$comment": "Non-empty fragments not allowed.", + "pattern": "^[^#]*#?$" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$anchor": { + "type": "string", + "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$recursiveRef": { + "type": "string", + "format": "uri-reference" + }, + "$recursiveAnchor": { + "type": "boolean", + "default": false + }, + "$vocabulary": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "$comment": { + "type": "string" + }, + "$defs": { + "type": "object", + "additionalProperties": { "$recursiveRef": "#" }, + "default": {} + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js new file mode 100644 index 00000000..888ddf1b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js @@ -0,0 +1,14 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/format", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/format": true + }, + "$recursiveAnchor": true, + + "title": "Format vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "format": { "type": "string" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js new file mode 100644 index 00000000..63f0c4c2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js @@ -0,0 +1,37 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/meta-data", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/meta-data": true + }, + "$recursiveAnchor": true, + + "title": "Meta-data vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "deprecated": { + "type": "boolean", + "default": false + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js new file mode 100644 index 00000000..5dec0619 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js @@ -0,0 +1,98 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/validation", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/validation": true + }, + "$recursiveAnchor": true, + + "title": "Validation vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "minContains": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 1 + }, + "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/$defs/stringArray" }, + "dependentRequired": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/stringArray" + } + }, + "const": true, + "enum": { + "type": "array", + "items": true + }, + "type": { + "anyOf": [ + { "$ref": "#/$defs/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/$defs/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + } + }, + "$defs": { + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 0 + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js b/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js new file mode 100644 index 00000000..c2e74085 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js @@ -0,0 +1 @@ +export default { id: "https://json-schema.org/keyword/draft-2019-09/recursiveAnchor" }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js b/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js new file mode 100644 index 00000000..76add3e1 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js @@ -0,0 +1,42 @@ +export default { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/core": true, + "https://json-schema.org/draft/2019-09/vocab/applicator": true, + "https://json-schema.org/draft/2019-09/vocab/validation": true, + "https://json-schema.org/draft/2019-09/vocab/meta-data": true, + "https://json-schema.org/draft/2019-09/vocab/format": false, + "https://json-schema.org/draft/2019-09/vocab/content": true + }, + "$recursiveAnchor": true, + + "title": "Core and Validation specifications meta-schema", + "allOf": [ + { "$ref": "meta/core" }, + { "$ref": "meta/applicator" }, + { "$ref": "meta/validation" }, + { "$ref": "meta/meta-data" }, + { "$ref": "meta/format" }, + { "$ref": "meta/content" } + ], + "type": ["object", "boolean"], + "properties": { + "definitions": { + "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", + "type": "object", + "additionalProperties": { "$recursiveRef": "#" }, + "default": {} + }, + "dependencies": { + "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$recursiveRef": "#" }, + { "$ref": "meta/validation#/$defs/stringArray" } + ] + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js new file mode 100644 index 00000000..0e49b934 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js @@ -0,0 +1 @@ +export default { id: "https://json-schema.org/keyword/draft-2020-12/dynamicAnchor" }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js new file mode 100644 index 00000000..a5f2581b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js @@ -0,0 +1,38 @@ +import * as Browser from "@hyperjump/browser"; +import { Validation, canonicalUri } from "../lib/experimental.js"; +import { toAbsoluteUri, uriFragment } from "../lib/common.js"; + + +const id = "https://json-schema.org/keyword/draft-2020-12/dynamicRef"; + +const compile = async (dynamicRef, ast) => { + const fragment = uriFragment(Browser.value(dynamicRef)); + const referencedSchema = await Browser.get(Browser.value(dynamicRef), dynamicRef); + await Validation.compile(referencedSchema, ast); + return [referencedSchema.document.baseUri, fragment, canonicalUri(referencedSchema)]; +}; + +const interpret = ([id, fragment, ref], instance, context) => { + if (fragment in context.ast.metaData[id].dynamicAnchors) { + context.dynamicAnchors = { ...context.ast.metaData[id].dynamicAnchors, ...context.dynamicAnchors }; + return Validation.interpret(context.dynamicAnchors[fragment], instance, context); + } else { + return Validation.interpret(ref, instance, context); + } +}; + +const simpleApplicator = true; + +const plugin = { + beforeSchema(url, _instance, context) { + context.dynamicAnchors = { + ...context.ast.metaData[toAbsoluteUri(url)].dynamicAnchors, + ...context.dynamicAnchors + }; + }, + beforeKeyword(_url, _instance, context, schemaContext) { + context.dynamicAnchors = schemaContext.dynamicAnchors; + } +}; + +export default { id, compile, interpret, simpleApplicator, plugin }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js new file mode 100644 index 00000000..2eecf321 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js @@ -0,0 +1,43 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-2020-12/format-assertion"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + const handler = getFormatHandler(formats[format]); + if (!handler) { + throw Error(`The '${format}' format is not supported.`); + } + + return handler(Instance.value(instance)); +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "duration": "https://json-schema.org/format/duration", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uuid": "https://json-schema.org/format/uuid", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/format.js b/node_modules/@hyperjump/json-schema/draft-2020-12/format.js new file mode 100644 index 00000000..d1550e2a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/format.js @@ -0,0 +1,44 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-2020-12/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (!getShouldValidateFormat()) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "duration": "https://json-schema.org/format/duration", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uuid": "https://json-schema.org/format/uuid", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts b/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts new file mode 100644 index 00000000..75f26f9d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts @@ -0,0 +1,67 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft202012Object = { + $schema?: "https://json-schema.org/draft/2020-12/schema"; + $id?: string; + $anchor?: string; + $ref?: string; + $dynamicRef?: string; + $dynamicAnchor?: string; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: JsonSchemaDraft202012; + unevaluatedItems?: JsonSchemaDraft202012; + prefixItems?: JsonSchemaDraft202012[]; + items?: JsonSchemaDraft202012; + contains?: JsonSchemaDraft202012; + additionalProperties?: JsonSchemaDraft202012; + unevaluatedProperties?: JsonSchemaDraft202012; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: JsonSchemaDraft202012; + if?: JsonSchemaDraft202012; + then?: JsonSchemaDraft202012; + else?: JsonSchemaDraft202012; + allOf?: JsonSchemaDraft202012[]; + anyOf?: JsonSchemaDraft202012[]; + oneOf?: JsonSchemaDraft202012[]; + not?: JsonSchemaDraft202012; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: JsonSchemaDraft202012; +}; +export type JsonSchemaDraft202012 = boolean | JsonSchemaDraft202012Object; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/index.js b/node_modules/@hyperjump/json-schema/draft-2020-12/index.js new file mode 100644 index 00000000..971a7391 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/index.js @@ -0,0 +1,126 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; + +import metaSchema from "./schema.js"; +import coreMetaSchema from "./meta/core.js"; +import applicatorMetaSchema from "./meta/applicator.js"; +import validationMetaSchema from "./meta/validation.js"; +import metaDataMetaSchema from "./meta/meta-data.js"; +import formatAnnotationMetaSchema from "./meta/format-annotation.js"; +import formatAssertionMetaSchema from "./meta/format-assertion.js"; +import contentMetaSchema from "./meta/content.js"; +import unevaluatedMetaSchema from "./meta/unevaluated.js"; + +import dynamicAnchor from "./dynamicAnchor.js"; +import dynamicRef from "./dynamicRef.js"; +import format from "./format.js"; +import formatAssertion from "./format-assertion.js"; + + +addKeyword(dynamicRef); +addKeyword(dynamicAnchor); +addKeyword(format); +addKeyword(formatAssertion); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/core", { + "$anchor": "https://json-schema.org/keyword/anchor", + "$comment": "https://json-schema.org/keyword/comment", + "$defs": "https://json-schema.org/keyword/definitions", + "$dynamicAnchor": "https://json-schema.org/keyword/draft-2020-12/dynamicAnchor", + "$dynamicRef": "https://json-schema.org/keyword/draft-2020-12/dynamicRef", + "$id": "https://json-schema.org/keyword/id", + "$ref": "https://json-schema.org/keyword/ref", + "$vocabulary": "https://json-schema.org/keyword/vocabulary" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/applicator", { + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "contains": "https://json-schema.org/keyword/contains", + "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", + "if": "https://json-schema.org/keyword/if", + "then": "https://json-schema.org/keyword/then", + "else": "https://json-schema.org/keyword/else", + "items": "https://json-schema.org/keyword/items", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "prefixItems": "https://json-schema.org/keyword/prefixItems", + "properties": "https://json-schema.org/keyword/properties", + "propertyNames": "https://json-schema.org/keyword/propertyNames" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/validation", { + "const": "https://json-schema.org/keyword/const", + "dependentRequired": "https://json-schema.org/keyword/dependentRequired", + "enum": "https://json-schema.org/keyword/enum", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "maxContains": "https://json-schema.org/keyword/maxContains", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minContains": "https://json-schema.org/keyword/minContains", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "pattern": "https://json-schema.org/keyword/pattern", + "required": "https://json-schema.org/keyword/required", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/meta-data", { + "default": "https://json-schema.org/keyword/default", + "deprecated": "https://json-schema.org/keyword/deprecated", + "description": "https://json-schema.org/keyword/description", + "examples": "https://json-schema.org/keyword/examples", + "readOnly": "https://json-schema.org/keyword/readOnly", + "title": "https://json-schema.org/keyword/title", + "writeOnly": "https://json-schema.org/keyword/writeOnly" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/format-annotation", { + "format": "https://json-schema.org/keyword/draft-2020-12/format" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/format-assertion", { + "format": "https://json-schema.org/keyword/draft-2020-12/format-assertion" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/content", { + "contentEncoding": "https://json-schema.org/keyword/contentEncoding", + "contentMediaType": "https://json-schema.org/keyword/contentMediaType", + "contentSchema": "https://json-schema.org/keyword/contentSchema" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/unevaluated", { + "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", + "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" +}); + +loadDialect("https://json-schema.org/draft/2020-12/schema", { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true +}, true); + +registerSchema(metaSchema); +registerSchema(coreMetaSchema); +registerSchema(applicatorMetaSchema); +registerSchema(validationMetaSchema); +registerSchema(metaDataMetaSchema); +registerSchema(formatAnnotationMetaSchema); +registerSchema(formatAssertionMetaSchema); +registerSchema(contentMetaSchema); +registerSchema(unevaluatedMetaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js new file mode 100644 index 00000000..cce8a3a2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js @@ -0,0 +1,46 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/applicator", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Applicator vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "prefixItems": { "$ref": "#/$defs/schemaArray" }, + "items": { "$dynamicRef": "#meta" }, + "contains": { "$dynamicRef": "#meta" }, + "additionalProperties": { "$dynamicRef": "#meta" }, + "properties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "#meta" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "#meta" }, + "propertyNames": { "format": "regex" }, + "default": {} + }, + "dependentSchemas": { + "type": "object", + "additionalProperties": { + "$dynamicRef": "#meta" + } + }, + "propertyNames": { "$dynamicRef": "#meta" }, + "if": { "$dynamicRef": "#meta" }, + "then": { "$dynamicRef": "#meta" }, + "else": { "$dynamicRef": "#meta" }, + "allOf": { "$ref": "#/$defs/schemaArray" }, + "anyOf": { "$ref": "#/$defs/schemaArray" }, + "oneOf": { "$ref": "#/$defs/schemaArray" }, + "not": { "$dynamicRef": "#meta" } + }, + "$defs": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$dynamicRef": "#meta" } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js new file mode 100644 index 00000000..f6bd4171 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js @@ -0,0 +1,14 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/content", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Content vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "contentMediaType": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "contentSchema": { "$dynamicRef": "#meta" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js new file mode 100644 index 00000000..f2473e40 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js @@ -0,0 +1,54 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/core", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Core vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference", + "$comment": "Non-empty fragments not allowed.", + "pattern": "^[^#]*#?$" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$anchor": { + "type": "string", + "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$dynamicRef": { + "type": "string", + "format": "uri-reference" + }, + "$dynamicAnchor": { + "type": "string", + "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" + }, + "$vocabulary": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "$comment": { + "type": "string" + }, + "$defs": { + "type": "object", + "additionalProperties": { "$dynamicRef": "#meta" }, + "default": {} + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js new file mode 100644 index 00000000..4d7675d6 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js @@ -0,0 +1,11 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Format vocabulary meta-schema for annotation results", + "type": ["object", "boolean"], + "properties": { + "format": { "type": "string" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js new file mode 100644 index 00000000..09248f38 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js @@ -0,0 +1,11 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/format-assertion", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Format vocabulary meta-schema for assertion results", + "type": ["object", "boolean"], + "properties": { + "format": { "type": "string" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js new file mode 100644 index 00000000..7da3361f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js @@ -0,0 +1,34 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/meta-data", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Meta-data vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "deprecated": { + "type": "boolean", + "default": false + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js new file mode 100644 index 00000000..1a9ab172 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js @@ -0,0 +1,12 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Unevaluated applicator vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "unevaluatedItems": { "$dynamicRef": "#meta" }, + "unevaluatedProperties": { "$dynamicRef": "#meta" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js new file mode 100644 index 00000000..944ea40a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js @@ -0,0 +1,95 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/validation", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Validation vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "minContains": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 1 + }, + "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/$defs/stringArray" }, + "dependentRequired": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/stringArray" + } + }, + "const": true, + "enum": { + "type": "array", + "items": true + }, + "type": { + "anyOf": [ + { "$ref": "#/$defs/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/$defs/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + } + }, + "$defs": { + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 0 + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js b/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js new file mode 100644 index 00000000..d01a036d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js @@ -0,0 +1,44 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json-schema.org/draft/2020-12/schema", + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true + }, + "$dynamicAnchor": "meta", + + "title": "Core and Validation specifications meta-schema", + "allOf": [ + { "$ref": "meta/core" }, + { "$ref": "meta/applicator" }, + { "$ref": "meta/unevaluated" }, + { "$ref": "meta/validation" }, + { "$ref": "meta/meta-data" }, + { "$ref": "meta/format-annotation" }, + { "$ref": "meta/content" } + ], + "type": ["object", "boolean"], + "properties": { + "definitions": { + "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", + "type": "object", + "additionalProperties": { "$dynamicRef": "#meta" }, + "default": {} + }, + "dependencies": { + "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$dynamicRef": "#meta" }, + { "$ref": "meta/validation#/$defs/stringArray" } + ] + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js b/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js new file mode 100644 index 00000000..50901147 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js @@ -0,0 +1,7 @@ +import { isDateTime } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/date-time", + handler: (dateTime) => typeof dateTime !== "string" || isDateTime(dateTime) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/date.js b/node_modules/@hyperjump/json-schema/formats/handlers/date.js new file mode 100644 index 00000000..3c7de2ba --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/date.js @@ -0,0 +1,7 @@ +import { isDate } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/date", + handler: (date) => typeof date !== "string" || isDate(date) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js new file mode 100644 index 00000000..02344e4f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js @@ -0,0 +1,7 @@ +import { isAsciiIdn } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/draft-04/hostname", + handler: (hostname) => typeof hostname !== "string" || isAsciiIdn(hostname) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/duration.js b/node_modules/@hyperjump/json-schema/formats/handlers/duration.js new file mode 100644 index 00000000..33d21220 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/duration.js @@ -0,0 +1,7 @@ +import { isDuration } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/duration", + handler: (duration) => typeof duration !== "string" || isDuration(duration) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/email.js b/node_modules/@hyperjump/json-schema/formats/handlers/email.js new file mode 100644 index 00000000..c335b627 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/email.js @@ -0,0 +1,7 @@ +import { isEmail } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/email", + handler: (email) => typeof email !== "string" || isEmail(email) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js new file mode 100644 index 00000000..43b79a34 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js @@ -0,0 +1,7 @@ +import { isAsciiIdn } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/hostname", + handler: (hostname) => typeof hostname !== "string" || isAsciiIdn(hostname) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js b/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js new file mode 100644 index 00000000..c12e42a4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js @@ -0,0 +1,7 @@ +import { isIdnEmail } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/idn-email", + handler: (email) => typeof email !== "string" || isIdnEmail(email) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js new file mode 100644 index 00000000..b790e251 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js @@ -0,0 +1,7 @@ +import { isIdn } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/idn-hostname", + handler: (hostname) => typeof hostname !== "string" || isIdn(hostname) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js b/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js new file mode 100644 index 00000000..bdc5c35a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js @@ -0,0 +1,7 @@ +import { isIPv4 } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/ipv4", + handler: (ip) => typeof ip !== "string" || isIPv4(ip) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js b/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js new file mode 100644 index 00000000..69d785d2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js @@ -0,0 +1,7 @@ +import { isIPv6 } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/ipv6", + handler: (ip) => typeof ip !== "string" || isIPv6(ip) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js b/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js new file mode 100644 index 00000000..0b4c6836 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js @@ -0,0 +1,7 @@ +import { isIriReference } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/iri-reference", + handler: (uri) => typeof uri !== "string" || isIriReference(uri) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/iri.js b/node_modules/@hyperjump/json-schema/formats/handlers/iri.js new file mode 100644 index 00000000..e6a34efb --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/iri.js @@ -0,0 +1,7 @@ +import { isIri } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/iri", + handler: (uri) => typeof uri !== "string" || isIri(uri) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js b/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js new file mode 100644 index 00000000..1ab64048 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js @@ -0,0 +1,7 @@ +import { isJsonPointer } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/json-pointer", + handler: (pointer) => typeof pointer !== "string" || isJsonPointer(pointer) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/regex.js b/node_modules/@hyperjump/json-schema/formats/handlers/regex.js new file mode 100644 index 00000000..c6ebca60 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/regex.js @@ -0,0 +1,7 @@ +import { isRegex } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/regex", + handler: (regex) => typeof regex !== "string" || isRegex(regex) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js b/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js new file mode 100644 index 00000000..e8fe386a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js @@ -0,0 +1,7 @@ +import { isRelativeJsonPointer } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/relative-json-pointer", + handler: (pointer) => typeof pointer !== "string" || isRelativeJsonPointer(pointer) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/time.js b/node_modules/@hyperjump/json-schema/formats/handlers/time.js new file mode 100644 index 00000000..c98d5b2f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/time.js @@ -0,0 +1,7 @@ +import { isTime } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/time", + handler: (time) => typeof time !== "string" || isTime(time) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js new file mode 100644 index 00000000..4cb2f1ba --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js @@ -0,0 +1,7 @@ +import { isUriReference } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/uri-reference", + handler: (uri) => typeof uri !== "string" || isUriReference(uri) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js new file mode 100644 index 00000000..94febf40 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js @@ -0,0 +1,7 @@ +import { isUriTemplate } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/uri-template", + handler: (uriTemplate) => typeof uriTemplate !== "string" || isUriTemplate(uriTemplate) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri.js new file mode 100644 index 00000000..af883d85 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/uri.js @@ -0,0 +1,7 @@ +import { isUri } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/uri", + handler: (uri) => typeof uri !== "string" || isUri(uri) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js b/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js new file mode 100644 index 00000000..c25de033 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js @@ -0,0 +1,7 @@ +import { isUuid } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/uuid", + handler: (uuid) => typeof uuid !== "string" || isUuid(uuid) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/index.js b/node_modules/@hyperjump/json-schema/formats/index.js new file mode 100644 index 00000000..c613edf0 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/index.js @@ -0,0 +1,11 @@ +import { addFormat } from "../lib/keywords.js"; +import "./lite.js"; + +import idnEmail from "./handlers/idn-email.js"; +import hostname from "./handlers/hostname.js"; +import idnHostname from "./handlers/idn-hostname.js"; + + +addFormat(idnEmail); +addFormat(hostname); +addFormat(idnHostname); diff --git a/node_modules/@hyperjump/json-schema/formats/lite.js b/node_modules/@hyperjump/json-schema/formats/lite.js new file mode 100644 index 00000000..f1d6aa64 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/lite.js @@ -0,0 +1,38 @@ +import { addFormat } from "../lib/keywords.js"; + +import draft04Hostname from "./handlers/draft-04/hostname.js"; +import dateTime from "./handlers/date-time.js"; +import date from "./handlers/date.js"; +import time from "./handlers/time.js"; +import duration from "./handlers/duration.js"; +import email from "./handlers/email.js"; +import ipv4 from "./handlers/ipv4.js"; +import ipv6 from "./handlers/ipv6.js"; +import uri from "./handlers/uri.js"; +import uriReference from "./handlers/uri-reference.js"; +import iri from "./handlers/iri.js"; +import iriReference from "./handlers/iri-reference.js"; +import uuid from "./handlers/uuid.js"; +import uriTemplate from "./handlers/uri-template.js"; +import jsonPointer from "./handlers/json-pointer.js"; +import relativeJsonPointer from "./handlers/relative-json-pointer.js"; +import regex from "./handlers/regex.js"; + + +addFormat(draft04Hostname); +addFormat(dateTime); +addFormat(date); +addFormat(time); +addFormat(duration); +addFormat(email); +addFormat(ipv4); +addFormat(ipv6); +addFormat(uri); +addFormat(uriReference); +addFormat(iri); +addFormat(iriReference); +addFormat(uuid); +addFormat(uriTemplate); +addFormat(jsonPointer); +addFormat(relativeJsonPointer); +addFormat(regex); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js b/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js new file mode 100644 index 00000000..82a59522 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js @@ -0,0 +1,174 @@ +export default { + "id": "https://spec.openapis.org/oas/3.0/dialect", + "$schema": "http://json-schema.org/draft-04/schema#", + + "type": "object", + "properties": { + "title": { "type": "string" }, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { "type": "number" }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { "type": "number" }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { "$ref": "#/definitions/positiveInteger" }, + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/definitions/positiveInteger" }, + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "required": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": false + }, + "type": { "enum": ["array", "boolean", "integer", "number", "object", "string"] }, + "not": { "$ref": "#" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "items": { "$ref": "#" }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" } + }, + "additionalProperties": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "description": { "type": "string" }, + "format": { "type": "string" }, + "default": {}, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { "$ref": "#/definitions/Discriminator" }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": {}, + "externalDocs": { "$ref": "#/definitions/ExternalDocumentation" }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { "$ref": "#/definitions/XML" }, + "$ref": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + + "anyOf": [ + { + "not": { "required": ["$ref"] } + }, + { "maxProperties": 1 } + ], + + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "positiveInteger": { + "type": "integer", + "minimum": 0 + }, + "positiveIntegerDefault0": { + "allOf": [{ "$ref": "#/definitions/positiveInteger" }, { "default": 0 }] + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ExternalDocumentation": { + "type": "object", + "required": ["url"], + "properties": { + "description": { "type": "string" }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "XML": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { "type": "string" }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js b/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js new file mode 100644 index 00000000..f45aa21d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/discriminator"; + +const compile = (schema) => Browser.value(schema); +const interpret = () => true; +const annotation = (discriminator) => discriminator; + +export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/example.js b/node_modules/@hyperjump/json-schema/openapi-3-0/example.js new file mode 100644 index 00000000..98bc5869 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/example.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/example"; + +const compile = (schema) => Browser.value(schema); +const interpret = () => true; +const annotation = (example) => example; + +export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js b/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js new file mode 100644 index 00000000..bfee8163 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/externalDocs"; + +const compile = (schema) => Browser.value(schema); +const interpret = () => true; +const annotation = (externalDocs) => externalDocs; + +export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts new file mode 100644 index 00000000..825de2a2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts @@ -0,0 +1,298 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type OasSchema30 = { + $ref: string; +} | { + title?: string; + description?: string; + default?: Json; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: boolean; + minimum?: number; + exclusiveMinimum?: boolean; + maxLength?: number; + minLength?: number; + pattern?: string; + items?: OasSchema30; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxProperties?: number; + minProperties?: number; + required?: string[]; + additionalProperties?: boolean | OasSchema30; + properties?: Record; + enum?: Json[]; + type?: JsonSchemaType; + nullable?: boolean; + format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri" | "int32" | "int64" | "float" | "double" | "byte" | "binary" | "date" | "password"; + allOf?: OasSchema30[]; + anyOf?: OasSchema30[]; + oneOf?: OasSchema30[]; + not?: OasSchema30; + example?: Json; + discriminator?: Discriminator; + externalDocs?: ExternalDocs; + xml?: Xml; +}; + +type Discriminator = { + propertyName: string; + mappings?: Record; +}; + +type ExternalDocs = { + url: string; + description?: string; +}; + +type Xml = { + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; +}; + +export type OpenApi30 = { + openapi: string; + info: Info; + externalDocs?: ExternalDocs; + servers?: Server[]; + security?: SecurityRequirement[]; + tags?: Tag[]; + paths: Paths; + components?: Components; +}; + +type Reference = { + $ref: "string"; +}; + +type Info = { + title: string; + description?: string; + termsOfService?: string; + contact?: Contact; + license?: License; + version: string; +}; + +type Contact = { + name?: string; + url?: string; + email?: string; +}; + +type License = { + name: string; + url?: string; +}; + +type Server = { + url: string; + description?: string; + variables?: Record; +}; + +type ServerVariable = { + enum?: string[]; + default: string; + description?: string; +}; + +type Components = { + schemas?: Record; + responses?: Record; + parameters?: Record; + examples?: Record; + requestBodies?: Record; + headers?: Record; + securitySchemes: Record; + links: Record; + callbacks: Record; +}; + +type Response = { + description: string; + headers?: Record; + content?: Record; + links?: Record; +}; + +type MediaType = { + schema?: OasSchema30; + example?: unknown; + examples?: Record; + encoding?: Record; +}; + +type Example = { + summary?: string; + description?: string; + value?: unknown; + externalValue?: string; +}; + +type Header = { + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; + style?: "simple"; + explode?: boolean; + allowReserved?: boolean; + schema?: OasSchema30; + content?: Record; + example?: unknown; + examples: Record; +}; + +type Paths = Record; + +type PathItem = { + $ref?: string; + summary?: string; + description?: string; + servers: Server[]; + parameters: (Parameter | Reference)[]; + get?: Operation; + put?: Operation; + post?: Operation; + delete?: Operation; + options?: Operation; + head?: Operation; + patch?: Operation; + trace?: Operation; +}; + +type Operation = { + tags?: string[]; + summary?: string; + description?: string; + externalDocs?: ExternalDocs; + operationId?: string; + parameters?: (Parameter | Reference)[]; + requestBody?: RequestBody | Reference; + responses: Responses; + callbacks?: Record; + deprecated?: boolean; + security?: SecurityRequirement[]; + servers?: Server[]; +}; + +type Responses = Record; + +type SecurityRequirement = Record; + +type Tag = { + name: string; + description?: string; + externalDocs?: ExternalDocs; +}; + +type Parameter = { + name: string; + in: string; + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; + style?: string; + explode?: boolean; + allowReserved?: boolean; + schema?: OasSchema30; + content?: Record; + example?: unknown; + examples?: Record; +}; + +type RequestBody = { + description?: string; + content: Record; + required?: boolean; +}; + +type SecurityScheme = APIKeySecurityScheme | HTTPSecurityScheme | OAuth2SecurityScheme | OpenIdConnectSecurityScheme; + +type APIKeySecurityScheme = { + type: "apiKey"; + name: string; + in: "header" | "query" | "cookie"; + description?: string; +}; + +type HTTPSecurityScheme = { + scheme: string; + bearerFormat?: string; + description?: string; + type: "http"; +}; + +type OAuth2SecurityScheme = { + type: "oauth2"; + flows: OAuthFlows; + description?: string; +}; + +type OpenIdConnectSecurityScheme = { + type: "openIdConnect"; + openIdConnectUrl: string; + description?: string; +}; + +type OAuthFlows = { + implicit?: ImplicitOAuthFlow; + password?: PasswordOAuthFlow; + clientCredentials?: ClientCredentialsFlow; + authorizationCode?: AuthorizationCodeOAuthFlow; +}; + +type ImplicitOAuthFlow = { + authorizationUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type PasswordOAuthFlow = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type ClientCredentialsFlow = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type AuthorizationCodeOAuthFlow = { + authorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type Link = { + operationId?: string; + operationRef?: string; + parameters?: Record; + requestBody?: unknown; + description?: string; + server?: Server; +}; + +type Callback = Record; + +type Encoding = { + contentType?: string; + headers?: Record; + style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; + explode?: boolean; + allowReserved?: boolean; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/index.js b/node_modules/@hyperjump/json-schema/openapi-3-0/index.js new file mode 100644 index 00000000..d75b9009 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/index.js @@ -0,0 +1,77 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import "../lib/openapi.js"; + +import dialectSchema from "./dialect.js"; +import schema from "./schema.js"; + +import discriminator from "./discriminator.js"; +import example from "./example.js"; +import externalDocs from "./externalDocs.js"; +import nullable from "./nullable.js"; +import type from "./type.js"; +import xml from "./xml.js"; + + +export * from "../draft-04/index.js"; + +addKeyword(discriminator); +addKeyword(example); +addKeyword(externalDocs); +addKeyword(nullable); +addKeyword(type); +addKeyword(xml); + +const jsonSchemaVersion = "https://spec.openapis.org/oas/3.0/dialect"; + +defineVocabulary(jsonSchemaVersion, { + "$ref": "https://json-schema.org/keyword/draft-04/ref", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "default": "https://json-schema.org/keyword/default", + "deprecated": "https://json-schema.org/keyword/deprecated", + "description": "https://json-schema.org/keyword/description", + "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", + "enum": "https://json-schema.org/keyword/enum", + "example": "https://spec.openapis.org/oas/3.0/keyword/example", + "exclusiveMaximum": "https://json-schema.org/keyword/draft-04/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/draft-04/exclusiveMinimum", + "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", + "format": "https://json-schema.org/keyword/draft-04/format", + "items": "https://json-schema.org/keyword/draft-04/items", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/draft-04/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/draft-04/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "not": "https://json-schema.org/keyword/not", + "nullable": "https://spec.openapis.org/oas/3.0/keyword/nullable", + "oneOf": "https://json-schema.org/keyword/oneOf", + "pattern": "https://json-schema.org/keyword/pattern", + "properties": "https://json-schema.org/keyword/properties", + "readOnly": "https://json-schema.org/keyword/readOnly", + "required": "https://json-schema.org/keyword/required", + "title": "https://json-schema.org/keyword/title", + "type": "https://spec.openapis.org/oas/3.0/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems", + "writeOnly": "https://json-schema.org/keyword/writeOnly", + "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" +}); + +loadDialect(jsonSchemaVersion, { + [jsonSchemaVersion]: true +}); + +loadDialect("https://spec.openapis.org/oas/3.0/schema", { + [jsonSchemaVersion]: true +}); + +registerSchema(dialectSchema); + +registerSchema(schema, "https://spec.openapis.org/oas/3.0/schema"); +registerSchema(schema, "https://spec.openapis.org/oas/3.0/schema/latest"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js b/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js new file mode 100644 index 00000000..0d5450c4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/nullable"; + +const compile = (schema) => Browser.value(schema); + +const interpret = () => true; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js new file mode 100644 index 00000000..c715879e --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js @@ -0,0 +1,1368 @@ +export default { + "id": "https://spec.openapis.org/oas/3.0/schema/2021-09-28", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Validation schema for OpenAPI Specification 3.0.X.", + "type": "object", + "required": [ + "openapi", + "info", + "paths" + ], + "properties": { + "openapi": { + "type": "string", + "pattern": "^3\\.0\\.\\d(-.+)?$" + }, + "info": { + "$ref": "#/definitions/Info" + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + }, + "uniqueItems": true + }, + "paths": { + "$ref": "#/definitions/Paths" + }, + "components": { + "$ref": "#/definitions/Components" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "definitions": { + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } + } + }, + "Info": { + "type": "object", + "required": [ + "title", + "version" + ], + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "termsOfService": { + "type": "string", + "format": "uri-reference" + }, + "contact": { + "$ref": "#/definitions/Contact" + }, + "license": { + "$ref": "#/definitions/License" + }, + "version": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Contact": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "License": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Server": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ServerVariable" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ServerVariable": { + "type": "object", + "required": [ + "default" + ], + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Components": { + "type": "object", + "properties": { + "schemas": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { "$ref": "#/definitions/Schema" } + } + }, + "responses": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Response" + } + ] + } + } + }, + "parameters": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Parameter" + } + ] + } + } + }, + "examples": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Example" + } + ] + } + } + }, + "requestBodies": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/RequestBody" + } + ] + } + } + }, + "headers": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Header" + } + ] + } + } + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "links": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Link" + } + ] + } + } + }, + "callbacks": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Callback" + } + ] + } + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Schema": { "$ref": "/oas/3.0/dialect" }, + "Response": { + "type": "object", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Header" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + } + }, + "links": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Link" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "MediaType": { + "type": "object", + "properties": { + "schema": { "$ref": "#/definitions/Schema" }, + "example": { + }, + "examples": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Example" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "encoding": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Encoding" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/ExampleXORExamples" + } + ] + }, + "Example": { + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "value": { + }, + "externalValue": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Header": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "required": { + "type": "boolean", + "default": false + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "allowEmptyValue": { + "type": "boolean", + "default": false + }, + "style": { + "type": "string", + "enum": [ + "simple" + ], + "default": "simple" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean", + "default": false + }, + "schema": { "$ref": "#/definitions/Schema" }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "example": { + }, + "examples": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Example" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/ExampleXORExamples" + }, + { + "$ref": "#/definitions/SchemaXORContent" + } + ] + }, + "Paths": { + "type": "object", + "patternProperties": { + "^\\/": { + "$ref": "#/definitions/PathItem" + }, + "^x-": { + } + }, + "additionalProperties": false + }, + "PathItem": { + "type": "object", + "properties": { + "$ref": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + }, + "parameters": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Parameter" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "uniqueItems": true + } + }, + "patternProperties": { + "^(get|put|post|delete|options|head|patch|trace)$": { + "$ref": "#/definitions/Operation" + }, + "^x-": { + } + }, + "additionalProperties": false + }, + "Operation": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Parameter" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "uniqueItems": true + }, + "requestBody": { + "oneOf": [ + { + "$ref": "#/definitions/RequestBody" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "responses": { + "$ref": "#/definitions/Responses" + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Callback" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Responses": { + "type": "object", + "properties": { + "default": { + "oneOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "patternProperties": { + "^[1-5](?:\\d{2}|XX)$": { + "oneOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "^x-": { + } + }, + "minProperties": 1, + "additionalProperties": false + }, + "SecurityRequirement": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ExampleXORExamples": { + "description": "Example and examples are mutually exclusive", + "not": { + "required": [ + "example", + "examples" + ] + } + }, + "SchemaXORContent": { + "description": "Schema and content are mutually exclusive, at least one is required", + "not": { + "required": [ + "schema", + "content" + ] + }, + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ], + "description": "Some properties are not allowed if content is present", + "allOf": [ + { + "not": { + "required": [ + "style" + ] + } + }, + { + "not": { + "required": [ + "explode" + ] + } + }, + { + "not": { + "required": [ + "allowReserved" + ] + } + }, + { + "not": { + "required": [ + "example" + ] + } + }, + { + "not": { + "required": [ + "examples" + ] + } + } + ] + } + ] + }, + "Parameter": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "in": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean", + "default": false + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "allowEmptyValue": { + "type": "boolean", + "default": false + }, + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean", + "default": false + }, + "schema": { "$ref": "#/definitions/Schema" }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "example": { + }, + "examples": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Example" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "required": [ + "name", + "in" + ], + "allOf": [ + { + "$ref": "#/definitions/ExampleXORExamples" + }, + { + "$ref": "#/definitions/SchemaXORContent" + }, + { + "$ref": "#/definitions/ParameterLocation" + } + ] + }, + "ParameterLocation": { + "description": "Parameter location", + "oneOf": [ + { + "description": "Parameter in path", + "required": [ + "required" + ], + "properties": { + "in": { + "enum": [ + "path" + ] + }, + "style": { + "enum": [ + "matrix", + "label", + "simple" + ], + "default": "simple" + }, + "required": { + "enum": [ + true + ] + } + } + }, + { + "description": "Parameter in query", + "properties": { + "in": { + "enum": [ + "query" + ] + }, + "style": { + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ], + "default": "form" + } + } + }, + { + "description": "Parameter in header", + "properties": { + "in": { + "enum": [ + "header" + ] + }, + "style": { + "enum": [ + "simple" + ], + "default": "simple" + } + } + }, + { + "description": "Parameter in cookie", + "properties": { + "in": { + "enum": [ + "cookie" + ] + }, + "style": { + "enum": [ + "form" + ], + "default": "form" + } + } + } + ] + }, + "RequestBody": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "description": { + "type": "string" + }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + } + }, + "required": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/APIKeySecurityScheme" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/OAuth2SecurityScheme" + }, + { + "$ref": "#/definitions/OpenIdConnectSecurityScheme" + } + ] + }, + "APIKeySecurityScheme": { + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "HTTPSecurityScheme": { + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "bearerFormat": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "oneOf": [ + { + "description": "Bearer", + "properties": { + "scheme": { + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + } + }, + { + "description": "Non Bearer", + "not": { + "required": [ + "bearerFormat" + ] + }, + "properties": { + "scheme": { + "not": { + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + } + } + } + ] + }, + "OAuth2SecurityScheme": { + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flows": { + "$ref": "#/definitions/OAuthFlows" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "OpenIdConnectSecurityScheme": { + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri-reference" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "OAuthFlows": { + "type": "object", + "properties": { + "implicit": { + "$ref": "#/definitions/ImplicitOAuthFlow" + }, + "password": { + "$ref": "#/definitions/PasswordOAuthFlow" + }, + "clientCredentials": { + "$ref": "#/definitions/ClientCredentialsFlow" + }, + "authorizationCode": { + "$ref": "#/definitions/AuthorizationCodeOAuthFlow" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ImplicitOAuthFlow": { + "type": "object", + "required": [ + "authorizationUrl", + "scopes" + ], + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "PasswordOAuthFlow": { + "type": "object", + "required": [ + "tokenUrl", + "scopes" + ], + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ClientCredentialsFlow": { + "type": "object", + "required": [ + "tokenUrl", + "scopes" + ], + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "AuthorizationCodeOAuthFlow": { + "type": "object", + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ], + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Link": { + "type": "object", + "properties": { + "operationId": { + "type": "string" + }, + "operationRef": { + "type": "string", + "format": "uri-reference" + }, + "parameters": { + "type": "object", + "additionalProperties": { + } + }, + "requestBody": { + }, + "description": { + "type": "string" + }, + "server": { + "$ref": "#/definitions/Server" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "not": { + "description": "Operation Id and Operation Ref are mutually exclusive", + "required": [ + "operationId", + "operationRef" + ] + } + }, + "Callback": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/PathItem" + }, + "patternProperties": { + "^x-": { + } + } + }, + "Encoding": { + "type": "object", + "properties": { + "contentType": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Header" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "style": { + "type": "string", + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean", + "default": false + } + }, + "additionalProperties": false + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/type.js b/node_modules/@hyperjump/json-schema/openapi-3-0/type.js new file mode 100644 index 00000000..1cf47195 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/type.js @@ -0,0 +1,22 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getKeywordName } from "../lib/experimental.js"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/type"; + +const compile = async (schema, _ast, parentSchema) => { + const nullableKeyword = getKeywordName(schema.document.dialectId, "https://spec.openapis.org/oas/3.0/keyword/nullable"); + const nullable = await Browser.step(nullableKeyword, parentSchema); + return Browser.value(nullable) === true ? ["null", Browser.value(schema)] : Browser.value(schema); +}; + +const interpret = (type, instance) => typeof type === "string" + ? isTypeOf(instance)(type) + : type.some(isTypeOf(instance)); + +const isTypeOf = (instance) => (type) => type === "integer" + ? Instance.typeOf(instance) === "number" && Number.isInteger(Instance.value(instance)) + : Instance.typeOf(instance) === type; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js b/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js new file mode 100644 index 00000000..e6476570 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/xml"; + +const compile = (schema) => Browser.value(schema); +const interpret = () => true; +const annotation = (xml) => xml; + +export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js new file mode 100644 index 00000000..6a2f4b5b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js @@ -0,0 +1,22 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + "$dynamicAnchor": "meta", + + "title": "OpenAPI 3.1 Schema Object Dialect", + "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.1 Descriptions", + + "allOf": [ + { "$ref": "https://json-schema.org/draft/2020-12/schema" }, + { "$ref": "https://spec.openapis.org/oas/3.1/meta/base" } + ] +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts new file mode 100644 index 00000000..a437246f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts @@ -0,0 +1,364 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type OasSchema31 = boolean | { + $schema?: "https://spec.openapis.org/oas/3.1/dialect/base"; + $id?: string; + $anchor?: string; + $ref?: string; + $dynamicRef?: string; + $dynamicAnchor?: string; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: OasSchema31; + unevaluatedItems?: OasSchema31; + prefixItems?: OasSchema31[]; + items?: OasSchema31; + contains?: OasSchema31; + additionalProperties?: OasSchema31; + unevaluatedProperties?: OasSchema31; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: OasSchema31; + if?: OasSchema31; + then?: OasSchema31; + else?: OasSchema31; + allOf?: OasSchema31[]; + anyOf?: OasSchema31[]; + oneOf?: OasSchema31[]; + not?: OasSchema31; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: OasSchema31; + example?: Json; + discriminator?: Discriminator; + externalDocs?: ExternalDocs; + xml?: Xml; +}; + +type Discriminator = { + propertyName: string; + mappings?: Record; +}; + +type ExternalDocs = { + url: string; + description?: string; +}; + +type Xml = { + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; +}; + +export type OpenApi = { + openapi: string; + info: Info; + jsonSchemaDialect?: string; + servers?: Server[]; + security?: SecurityRequirement[]; + tags?: Tag[]; + externalDocs?: ExternalDocumentation; + paths?: Record; + webhooks?: Record; + components?: Components; +}; + +type Info = { + title: string; + summary?: string; + description?: string; + termsOfService?: string; + contact?: Contact; + license?: License; + version: string; +}; + +type Contact = { + name?: string; + url?: string; + email?: string; +}; + +type License = { + name: string; + url?: string; + identifier?: string; +}; + +type Server = { + url: string; + description?: string; + variables?: Record; +}; + +type ServerVariable = { + enum?: string[]; + default: string; + description?: string; +}; + +type Components = { + schemas?: Record; + responses?: Record; + parameters?: Record; + examples?: Record; + requestBodies?: Record; + headers?: Record; + securitySchemes?: Record; + links?: Record; + callbacks?: Record; + pathItems?: Record; +}; + +type PathItem = { + summary?: string; + description?: string; + servers?: Server[]; + parameters?: (Parameter | Reference)[]; + get?: Operation; + put?: Operation; + post?: Operation; + delete?: Operation; + options?: Operation; + head?: Operation; + patch?: Operation; + trace?: Operation; +}; + +type Operation = { + tags?: string[]; + summary?: string; + description?: string; + externalDocs?: ExternalDocumentation; + operationId?: string; + parameters?: (Parameter | Reference)[]; + requestBody?: RequestBody | Reference; + responses?: Record; + callbacks?: Record; + deprecated?: boolean; + security?: SecurityRequirement[]; + servers?: Server[]; +}; + +type ExternalDocumentation = { + description?: string; + url: string; +}; + +export type Parameter = { + name: string; + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; +} & ( + ( + { + in: "path"; + required: true; + } & ( + ({ style?: "matrix" | "label" | "simple" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "query"; + } & ( + ({ style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "header"; + } & ( + ({ style?: "simple" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "cookie"; + } & ( + ({ style?: "form" } & SchemaParameter) + | ContentParameter + ) + ) +); + +type ContentParameter = { + schema?: never; + content: Record; +}; + +type SchemaParameter = { + explode?: boolean; + allowReserved?: boolean; + schema: OasSchema32; + content?: never; +} & Examples; + +type RequestBody = { + description?: string; + content: Content; + required?: boolean; +}; + +type Content = Record; + +type MediaType = { + schema?: OasSchema31; + encoding?: Record; +} & Examples; + +type Encoding = { + contentType?: string; + headers?: Record; + style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; + explode?: boolean; + allowReserved?: boolean; +}; + +type Response = { + description: string; + headers?: Record; + content?: Content; + links?: Record; +}; + +type Callbacks = Record; + +type Example = { + summary?: string; + description?: string; + value?: Json; + externalValue?: string; +}; + +type Link = { + operationRef?: string; + operationId?: string; + parameters?: Record; + requestBody?: Json; + description?: string; + server?: Server; +}; + +type Header = { + description?: string; + required?: boolean; + deprecated?: boolean; + schema?: OasSchema31; + style?: "simple"; + explode?: boolean; + content?: Content; +}; + +type Tag = { + name: string; + description?: string; + externalDocs?: ExternalDocumentation; +}; + +type Reference = { + $ref: string; + summary?: string; + description?: string; +}; + +type SecurityScheme = { + type: "apiKey"; + description?: string; + name: string; + in: "query" | "header" | "cookie"; +} | { + type: "http"; + description?: string; + scheme: string; + bearerFormat?: string; +} | { + type: "mutualTLS"; + description?: string; +} | { + type: "oauth2"; + description?: string; + flows: OauthFlows; +} | { + type: "openIdConnect"; + description?: string; + openIdConnectUrl: string; +}; + +type OauthFlows = { + implicit?: Implicit; + password?: Password; + clientCredentials?: ClientCredentials; + authorizationCode?: AuthorizationCode; +}; + +type Implicit = { + authorizationUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type Password = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type ClientCredentials = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type AuthorizationCode = { + authorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type SecurityRequirement = Record; + +type Examples = { + example?: Json; + examples?: Record; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/index.js b/node_modules/@hyperjump/json-schema/openapi-3-1/index.js new file mode 100644 index 00000000..a2840f53 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/index.js @@ -0,0 +1,49 @@ +import { addKeyword, defineVocabulary } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import "../lib/openapi.js"; + +import dialectSchema from "./dialect/base.js"; +import vocabularySchema from "./meta/base.js"; +import schema from "./schema.js"; +import schemaBase from "./schema-base.js"; +import schemaDraft2020 from "./schema-draft-2020-12.js"; +import schemaDraft2019 from "./schema-draft-2019-09.js"; +import schemaDraft07 from "./schema-draft-07.js"; +import schemaDraft06 from "./schema-draft-06.js"; +import schemaDraft04 from "./schema-draft-04.js"; + +import discriminator from "../openapi-3-0/discriminator.js"; +import example from "../openapi-3-0/example.js"; +import externalDocs from "../openapi-3-0/externalDocs.js"; +import xml from "../openapi-3-0/xml.js"; + + +export * from "../draft-2020-12/index.js"; + +addKeyword(discriminator); +addKeyword(example); +addKeyword(externalDocs); +addKeyword(xml); + +defineVocabulary("https://spec.openapis.org/oas/3.1/vocab/base", { + "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", + "example": "https://spec.openapis.org/oas/3.0/keyword/example", + "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", + "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" +}); + +registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.1/meta/base"); +registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.1/dialect/base"); + +// Current Schemas +registerSchema(schema, "https://spec.openapis.org/oas/3.1/schema"); +registerSchema(schema, "https://spec.openapis.org/oas/3.1/schema/latest"); +registerSchema(schemaBase, "https://spec.openapis.org/oas/3.1/schema-base"); +registerSchema(schemaBase, "https://spec.openapis.org/oas/3.1/schema-base/latest"); + +// Alternative dialect schemas +registerSchema(schemaDraft2020, "https://spec.openapis.org/oas/3.1/schema-draft-2020-12"); +registerSchema(schemaDraft2019, "https://spec.openapis.org/oas/3.1/schema-draft-2019-09"); +registerSchema(schemaDraft07, "https://spec.openapis.org/oas/3.1/schema-draft-07"); +registerSchema(schemaDraft06, "https://spec.openapis.org/oas/3.1/schema-draft-06"); +registerSchema(schemaDraft04, "https://spec.openapis.org/oas/3.1/schema-draft-04"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js new file mode 100644 index 00000000..303423f1 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js @@ -0,0 +1,77 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "OAS Base Vocabulary", + "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", + + "type": ["object", "boolean"], + "properties": { + "example": true, + "discriminator": { "$ref": "#/$defs/discriminator" }, + "externalDocs": { "$ref": "#/$defs/external-docs" }, + "xml": { "$ref": "#/$defs/xml" } + }, + "$defs": { + "extensible": { + "patternProperties": { + "^x-": true + } + }, + "discriminator": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": ["propertyName"], + "unevaluatedProperties": false + }, + "external-docs": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri-reference" + }, + "description": { + "type": "string" + } + }, + "required": ["url"], + "unevaluatedProperties": false + }, + "xml": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean" + }, + "wrapped": { + "type": "boolean" + } + }, + "unevaluatedProperties": false + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js new file mode 100644 index 00000000..a84f8ab7 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://spec.openapis.org/oas/3.1/dialect/base" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js new file mode 100644 index 00000000..c91acddc --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "OpenAPI v3.1.x documents using draft-04 JSON Schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-04/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js new file mode 100644 index 00000000..87186cf0 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "OpenAPI v3.1.x documents using draft-06 JSON Schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-06/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js new file mode 100644 index 00000000..f4d2f8b5 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "OpenAPI v3.1.x documents using draft-07 JSON Schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-07/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js new file mode 100644 index 00000000..11f27166 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "openapi v3.1.x documents using 2019-09 json schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonschemadialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://json-schema.org/draft/2019-09/schema" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js new file mode 100644 index 00000000..1b0367f8 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "openapi v3.1.x documents using 2020-12 json schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonschemadialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://json-schema.org/draft/2020-12/schema" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js new file mode 100644 index 00000000..6aed8baa --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js @@ -0,0 +1,1407 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "The description of OpenAPI v3.1.x Documents without Schema Object validation", + "type": "object", + "properties": { + "openapi": { + "type": "string", + "pattern": "^3\\.1\\.\\d+(-.+)?$" + }, + "info": { + "$ref": "#/$defs/info" + }, + "jsonSchemaDialect": { + "type": "string", + "format": "uri-reference", + "default": "https://spec.openapis.org/oas/3.1/dialect/base" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + }, + "default": [ + { + "url": "/" + } + ] + }, + "paths": { + "$ref": "#/$defs/paths" + }, + "webhooks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "components": { + "$ref": "#/$defs/components" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/$defs/security-requirement" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/$defs/tag" + } + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + } + }, + "required": [ + "openapi", + "info" + ], + "anyOf": [ + { + "required": [ + "paths" + ] + }, + { + "required": [ + "components" + ] + }, + { + "required": [ + "webhooks" + ] + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "$defs": { + "info": { + "$comment": "https://spec.openapis.org/oas/v3.1#info-object", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "termsOfService": { + "type": "string", + "format": "uri-reference" + }, + "contact": { + "$ref": "#/$defs/contact" + }, + "license": { + "$ref": "#/$defs/license" + }, + "version": { + "type": "string" + } + }, + "required": [ + "title", + "version" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "contact": { + "$comment": "https://spec.openapis.org/oas/v3.1#contact-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "license": { + "$comment": "https://spec.openapis.org/oas/v3.1#license-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "name" + ], + "dependentSchemas": { + "identifier": { + "not": { + "required": [ + "url" + ] + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "server": { + "$comment": "https://spec.openapis.org/oas/v3.1#server-object", + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/server-variable" + } + } + }, + "required": [ + "url" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "server-variable": { + "$comment": "https://spec.openapis.org/oas/v3.1#server-variable-object", + "type": "object", + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "default" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "components": { + "$comment": "https://spec.openapis.org/oas/v3.1#components-object", + "type": "object", + "properties": { + "schemas": { + "type": "object", + "additionalProperties": { + "$dynamicRef": "#meta" + } + }, + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/response-or-reference" + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/parameter-or-reference" + } + }, + "examples": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/example-or-reference" + } + }, + "requestBodies": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/request-body-or-reference" + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "securitySchemes": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/security-scheme-or-reference" + } + }, + "links": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/link-or-reference" + } + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/callbacks-or-reference" + } + }, + "pathItems": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + } + }, + "patternProperties": { + "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { + "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", + "propertyNames": { + "pattern": "^[a-zA-Z0-9._-]+$" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "paths": { + "$comment": "https://spec.openapis.org/oas/v3.1#paths-object", + "type": "object", + "patternProperties": { + "^/": { + "$ref": "#/$defs/path-item" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "path-item": { + "$comment": "https://spec.openapis.org/oas/v3.1#path-item-object", + "type": "object", + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + } + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/$defs/parameter-or-reference" + } + }, + "get": { + "$ref": "#/$defs/operation" + }, + "put": { + "$ref": "#/$defs/operation" + }, + "post": { + "$ref": "#/$defs/operation" + }, + "delete": { + "$ref": "#/$defs/operation" + }, + "options": { + "$ref": "#/$defs/operation" + }, + "head": { + "$ref": "#/$defs/operation" + }, + "patch": { + "$ref": "#/$defs/operation" + }, + "trace": { + "$ref": "#/$defs/operation" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "operation": { + "$comment": "https://spec.openapis.org/oas/v3.1#operation-object", + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/$defs/parameter-or-reference" + } + }, + "requestBody": { + "$ref": "#/$defs/request-body-or-reference" + }, + "responses": { + "$ref": "#/$defs/responses" + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/callbacks-or-reference" + } + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/$defs/security-requirement" + } + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "external-documentation": { + "$comment": "https://spec.openapis.org/oas/v3.1#external-documentation-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "url" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "parameter": { + "$comment": "https://spec.openapis.org/oas/v3.1#parameter-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "in": { + "enum": [ + "query", + "header", + "path", + "cookie" + ] + }, + "description": { + "type": "string" + }, + "required": { + "default": false, + "type": "boolean" + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "content": { + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 + } + }, + "required": [ + "name", + "in" + ], + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ] + } + ], + "if": { + "properties": { + "in": { + "const": "query" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "allowEmptyValue": { + "default": false, + "type": "boolean" + } + } + }, + "dependentSchemas": { + "schema": { + "properties": { + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + } + }, + "allOf": [ + { + "$ref": "#/$defs/examples" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" + }, + { + "$ref": "#/$defs/styles-for-form" + } + ], + "$defs": { + "styles-for-path": { + "if": { + "properties": { + "in": { + "const": "path" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "style": { + "default": "simple", + "enum": [ + "matrix", + "label", + "simple" + ] + }, + "required": { + "const": true + } + }, + "required": [ + "required" + ] + } + }, + "styles-for-header": { + "if": { + "properties": { + "in": { + "const": "header" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "style": { + "default": "simple", + "const": "simple" + } + } + } + }, + "styles-for-query": { + "if": { + "properties": { + "in": { + "const": "query" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "style": { + "default": "form", + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + "allowReserved": { + "default": false, + "type": "boolean" + } + } + } + }, + "styles-for-cookie": { + "if": { + "properties": { + "in": { + "const": "cookie" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "style": { + "default": "form", + "const": "form" + } + } + } + } + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "parameter-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/parameter" + } + }, + "request-body": { + "$comment": "https://spec.openapis.org/oas/v3.1#request-body-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "content": { + "$ref": "#/$defs/content" + }, + "required": { + "default": false, + "type": "boolean" + } + }, + "required": [ + "content" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "request-body-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/request-body" + } + }, + "content": { + "$comment": "https://spec.openapis.org/oas/v3.1#fixed-fields-10", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/media-type" + }, + "propertyNames": { + "format": "media-range" + } + }, + "media-type": { + "$comment": "https://spec.openapis.org/oas/v3.1#media-type-object", + "type": "object", + "properties": { + "schema": { + "$dynamicRef": "#meta" + }, + "encoding": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/encoding" + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/examples" + } + ], + "unevaluatedProperties": false + }, + "encoding": { + "$comment": "https://spec.openapis.org/oas/v3.1#encoding-object", + "type": "object", + "properties": { + "contentType": { + "type": "string", + "format": "media-range" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "style": { + "default": "form", + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "default": false, + "type": "boolean" + } + }, + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/styles-for-form" + } + ], + "unevaluatedProperties": false + }, + "responses": { + "$comment": "https://spec.openapis.org/oas/v3.1#responses-object", + "type": "object", + "properties": { + "default": { + "$ref": "#/$defs/response-or-reference" + } + }, + "patternProperties": { + "^[1-5](?:[0-9]{2}|XX)$": { + "$ref": "#/$defs/response-or-reference" + } + }, + "minProperties": 1, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "if": { + "$comment": "either default, or at least one response code property must exist", + "patternProperties": { + "^[1-5](?:[0-9]{2}|XX)$": false + } + }, + "then": { + "required": [ + "default" + ] + } + }, + "response": { + "$comment": "https://spec.openapis.org/oas/v3.1#response-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "content": { + "$ref": "#/$defs/content" + }, + "links": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/link-or-reference" + } + } + }, + "required": [ + "description" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "response-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/response" + } + }, + "callbacks": { + "$comment": "https://spec.openapis.org/oas/v3.1#callback-object", + "type": "object", + "$ref": "#/$defs/specification-extensions", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "callbacks-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/callbacks" + } + }, + "example": { + "$comment": "https://spec.openapis.org/oas/v3.1#example-object", + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "value": true, + "externalValue": { + "type": "string", + "format": "uri-reference" + } + }, + "not": { + "required": [ + "value", + "externalValue" + ] + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "example-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/example" + } + }, + "link": { + "$comment": "https://spec.openapis.org/oas/v3.1#link-object", + "type": "object", + "properties": { + "operationRef": { + "type": "string", + "format": "uri-reference" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "$ref": "#/$defs/map-of-strings" + }, + "requestBody": true, + "description": { + "type": "string" + }, + "body": { + "$ref": "#/$defs/server" + } + }, + "oneOf": [ + { + "required": [ + "operationRef" + ] + }, + { + "required": [ + "operationId" + ] + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "link-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/link" + } + }, + "header": { + "$comment": "https://spec.openapis.org/oas/v3.1#header-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "required": { + "default": false, + "type": "boolean" + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "content": { + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 + } + }, + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ] + } + ], + "dependentSchemas": { + "schema": { + "properties": { + "style": { + "default": "simple", + "const": "simple" + }, + "explode": { + "default": false, + "type": "boolean" + } + }, + "$ref": "#/$defs/examples" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "header-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/header" + } + }, + "tag": { + "$comment": "https://spec.openapis.org/oas/v3.1#tag-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + } + }, + "required": [ + "name" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "reference": { + "$comment": "https://spec.openapis.org/oas/v3.1#reference-object", + "type": "object", + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "schema": { + "$comment": "https://spec.openapis.org/oas/v3.1#schema-object", + "$dynamicAnchor": "meta", + "type": [ + "object", + "boolean" + ] + }, + "security-scheme": { + "$comment": "https://spec.openapis.org/oas/v3.1#security-scheme-object", + "type": "object", + "properties": { + "type": { + "enum": [ + "apiKey", + "http", + "mutualTLS", + "oauth2", + "openIdConnect" + ] + }, + "description": { + "type": "string" + } + }, + "required": [ + "type" + ], + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-apikey" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-http" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-oauth2" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-oidc" + } + ], + "unevaluatedProperties": false, + "$defs": { + "type-apikey": { + "if": { + "properties": { + "type": { + "const": "apiKey" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "name": { + "type": "string" + }, + "in": { + "enum": [ + "query", + "header", + "cookie" + ] + } + }, + "required": [ + "name", + "in" + ] + } + }, + "type-http": { + "if": { + "properties": { + "type": { + "const": "http" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "scheme": { + "type": "string" + } + }, + "required": [ + "scheme" + ] + } + }, + "type-http-bearer": { + "if": { + "properties": { + "type": { + "const": "http" + }, + "scheme": { + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + }, + "required": [ + "type", + "scheme" + ] + }, + "then": { + "properties": { + "bearerFormat": { + "type": "string" + } + } + } + }, + "type-oauth2": { + "if": { + "properties": { + "type": { + "const": "oauth2" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "flows": { + "$ref": "#/$defs/oauth-flows" + } + }, + "required": [ + "flows" + ] + } + }, + "type-oidc": { + "if": { + "properties": { + "type": { + "const": "openIdConnect" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "openIdConnectUrl": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "openIdConnectUrl" + ] + } + } + } + }, + "security-scheme-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/security-scheme" + } + }, + "oauth-flows": { + "type": "object", + "properties": { + "implicit": { + "$ref": "#/$defs/oauth-flows/$defs/implicit" + }, + "password": { + "$ref": "#/$defs/oauth-flows/$defs/password" + }, + "clientCredentials": { + "$ref": "#/$defs/oauth-flows/$defs/client-credentials" + }, + "authorizationCode": { + "$ref": "#/$defs/oauth-flows/$defs/authorization-code" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "$defs": { + "implicit": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "authorizationUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "password": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "client-credentials": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "authorization-code": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + } + } + }, + "security-requirement": { + "$comment": "https://spec.openapis.org/oas/v3.1#security-requirement-object", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "specification-extensions": { + "$comment": "https://spec.openapis.org/oas/v3.1#specification-extensions", + "patternProperties": { + "^x-": true + } + }, + "examples": { + "properties": { + "example": true, + "examples": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/example-or-reference" + } + } + } + }, + "map-of-strings": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "styles-for-form": { + "if": { + "properties": { + "style": { + "const": "form" + } + }, + "required": [ + "style" + ] + }, + "then": { + "properties": { + "explode": { + "default": true + } + } + }, + "else": { + "properties": { + "explode": { + "default": false + } + } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js new file mode 100644 index 00000000..3c606117 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js @@ -0,0 +1,22 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + "$dynamicAnchor": "meta", + + "title": "OpenAPI 3.2 Schema Object Dialect", + "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.2.x Descriptions", + + "allOf": [ + { "$ref": "https://json-schema.org/draft/2020-12/schema" }, + { "$ref": "https://spec.openapis.org/oas/3.2/meta" } + ] +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts new file mode 100644 index 00000000..80b94a5c --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts @@ -0,0 +1,415 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type OasSchema32 = boolean | { + $schema?: "https://spec.openapis.org/oas/3.2/dialect/base"; + $id?: string; + $anchor?: string; + $ref?: string; + $dynamicRef?: string; + $dynamicAnchor?: string; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: OasSchema32; + unevaluatedItems?: OasSchema32; + prefixItems?: OasSchema32[]; + items?: OasSchema32; + contains?: OasSchema32; + additionalProperties?: OasSchema32; + unevaluatedProperties?: OasSchema32; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: OasSchema32; + if?: OasSchema32; + then?: OasSchema32; + else?: OasSchema32; + allOf?: OasSchema32[]; + anyOf?: OasSchema32[]; + oneOf?: OasSchema32[]; + not?: OasSchema32; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: OasSchema32; + example?: Json; + discriminator?: Discriminator; + externalDocs?: ExternalDocs; + xml?: Xml; +}; + +type Discriminator = { + propertyName: string; + mappings?: Record; + defaultMapping?: string; +}; + +type ExternalDocs = { + url: string; + description?: string; +}; + +type Xml = { + nodeType?: "element" | "attribute" | "text" | "cdata" | "none"; + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; +}; + +export type OpenApi = { + openapi: string; + $self?: string; + info: Info; + jsonSchemaDialect?: string; + servers?: Server[]; + paths?: Record; + webhooks?: Record; + components?: Components; + security?: SecurityRequirement[]; + tags?: Tag[]; + externalDocs?: ExternalDocs; +}; + +type Info = { + title: string; + summary?: string; + description?: string; + termsOfService?: string; + contact?: Contact; + license?: License; + version: string; +}; + +type Contact = { + name?: string; + url?: string; + email?: string; +}; + +type License = { + name: string; + identifier?: string; + url?: string; +}; + +type Server = { + url: string; + description?: string; + name?: string; + variables?: Record; +}; + +type ServerVariable = { + enum?: string[]; + default: string; + description?: string; +}; + +type Components = { + schemas?: Record; + responses?: Record; + parameters?: Record; + examples?: Record; + requestBodies?: Record; + headers?: Record; + securitySchemes?: Record; + links?: Record; + callbacks?: Record; + pathItems?: Record; + mediaTypes?: Record; +}; + +type PathItem = { + $ref?: string; + summary?: string; + description?: string; + get?: Operation; + put?: Operation; + post?: Operation; + delete?: Operation; + options?: Operation; + head?: Operation; + patch?: Operation; + trace?: Operation; + query?: Operation; + additionOperations?: Record; + servers?: Server[]; + parameters?: (Parameter | Reference)[]; +}; + +type Operation = { + tags?: string[]; + summary?: string; + description?: string; + externalDocs?: ExternalDocs; + operationId?: string; + parameters?: (Parameter | Reference)[]; + requestBody?: RequestBody | Reference; + responses?: Responses; + callbacks?: Record; + deprecated?: boolean; + security?: SecurityRequirement[]; + servers?: Server[]; +}; + +export type Parameter = { + name: string; + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; +} & Examples & ( + ( + { + in: "path"; + required: true; + } & ( + ({ style?: "matrix" | "label" | "simple" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "query"; + } & ( + ({ style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "header"; + } & ( + ({ style?: "simple" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "cookie"; + } & ( + ({ style?: "cookie" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { in: "querystring" } & ContentParameter + ) +); + +type ContentParameter = { + schema?: never; + content: Record; +}; + +type SchemaParameter = { + explode?: boolean; + allowReserved?: boolean; + schema: OasSchema32; + content?: never; +}; + +type RequestBody = { + description?: string; + content: Record; + required?: boolean; +}; + +type MediaType = { + schema?: OasSchema32; + itemSchema?: OasSchema32; +} & Examples & ({ + encoding?: Record; + prefixEncoding?: never; + itemEncoding?: never; +} | { + encoding?: never; + prefixEncoding?: Encoding[]; + itemEncoding?: Encoding; +}); + +type Encoding = { + contentType?: string; + headers?: Record; + style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; + explode?: boolean; + allowReserved?: boolean; +} & ({ + encoding?: Record; + prefixEncoding?: never; + itemEncoding?: never; +} | { + encoding?: never; + prefixEncoding?: Encoding[]; + itemEncoding?: Encoding; +}); + +type Responses = { + default?: Response | Reference; +} & Record; + +type Response = { + summary?: string; + description?: string; + headers?: Record; + content?: Record; + links?: Record; +}; + +type Callbacks = Record; + +type Examples = { + example?: Json; + examples?: Record; +}; + +type Example = { + summary?: string; + description?: string; +} & ({ + value?: Json; + dataValue?: never; + serializedValue?: never; + externalValue?: never; +} | { + value?: never; + dataValue?: Json; + serializedValue?: string; + externalValue?: string; +}); + +type Link = { + operationRef?: string; + operationId?: string; + parameters?: Record; + requestBody?: Json; + description?: string; + server?: Server; +}; + +type Header = { + description?: string; + required?: boolean; + deprecated?: boolean; +} & Examples & ({ + style?: "simple"; + explode?: boolean; + schema: OasSchema32; +} | { + content: Record; +}); + +type Tag = { + name: string; + summary?: string; + description?: string; + externalDocs?: ExternalDocs; + parent?: string; + kind?: string; +}; + +type Reference = { + $ref: string; + summary?: string; + description?: string; +}; + +type SecurityScheme = { + type: "apiKey"; + description?: string; + name: string; + in: "query" | "header" | "cookie"; + deprecated?: boolean; +} | { + type: "http"; + description?: string; + scheme: string; + bearerFormat?: string; + deprecated?: boolean; +} | { + type: "mutualTLS"; + description?: string; + deprecated?: boolean; +} | { + type: "oauth2"; + description?: string; + flows: OauthFlows; + oauth2MetadataUrl?: string; + deprecated?: boolean; +} | { + type: "openIdConnect"; + description?: string; + openIdConnectUrl: string; + deprecated?: boolean; +}; + +type OauthFlows = { + implicit?: Implicit; + password?: Password; + clientCredentials?: ClientCredentials; + authorizationCode?: AuthorizationCode; + deviceAuthorization?: DeviceAuthorization; +}; + +type Implicit = { + authorizationUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type Password = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type ClientCredentials = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type AuthorizationCode = { + authorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type DeviceAuthorization = { + deviceAuthorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type SecurityRequirement = Record; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/index.js b/node_modules/@hyperjump/json-schema/openapi-3-2/index.js new file mode 100644 index 00000000..9e03b679 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/index.js @@ -0,0 +1,47 @@ +import { addKeyword, defineVocabulary } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import "../lib/openapi.js"; + +import dialectSchema from "./dialect/base.js"; +import vocabularySchema from "./meta/base.js"; +import schema from "./schema.js"; +import schemaBase from "./schema-base.js"; +import schemaDraft2020 from "./schema-draft-2020-12.js"; +import schemaDraft2019 from "./schema-draft-2019-09.js"; +import schemaDraft07 from "./schema-draft-07.js"; +import schemaDraft06 from "./schema-draft-06.js"; +import schemaDraft04 from "./schema-draft-04.js"; + +import discriminator from "../openapi-3-0/discriminator.js"; +import example from "../openapi-3-0/example.js"; +import externalDocs from "../openapi-3-0/externalDocs.js"; +import xml from "../openapi-3-0/xml.js"; + + +export * from "../draft-2020-12/index.js"; + +addKeyword(discriminator); +addKeyword(example); +addKeyword(externalDocs); +addKeyword(xml); + +defineVocabulary("https://spec.openapis.org/oas/3.2/vocab/base", { + "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", + "example": "https://spec.openapis.org/oas/3.0/keyword/example", + "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", + "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" +}); + +registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.2/meta"); +registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.2/dialect"); + +// Current Schemas +registerSchema(schema, "https://spec.openapis.org/oas/3.2/schema"); +registerSchema(schemaBase, "https://spec.openapis.org/oas/3.2/schema-base"); + +// Alternative dialect schemas +registerSchema(schemaDraft2020, "https://spec.openapis.org/oas/3.2/schema-draft-2020-12"); +registerSchema(schemaDraft2019, "https://spec.openapis.org/oas/3.2/schema-draft-2019-09"); +registerSchema(schemaDraft07, "https://spec.openapis.org/oas/3.2/schema-draft-07"); +registerSchema(schemaDraft06, "https://spec.openapis.org/oas/3.2/schema-draft-06"); +registerSchema(schemaDraft04, "https://spec.openapis.org/oas/3.2/schema-draft-04"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js new file mode 100644 index 00000000..472ceeb4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js @@ -0,0 +1,102 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "OAS Base Vocabulary", + "description": "A JSON Schema Vocabulary used in the OpenAPI JSON Schema Dialect", + + "type": ["object", "boolean"], + "properties": { + "discriminator": { "$ref": "#/$defs/discriminator" }, + "example": { "deprecated": true }, + "externalDocs": { "$ref": "#/$defs/external-docs" }, + "xml": { "$ref": "#/$defs/xml" } + }, + + "$defs": { + "extensible": { + "patternProperties": { + "^x-": true + } + }, + + "discriminator": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "defaultMapping": { + "type": "string" + } + }, + "required": ["propertyName"], + "unevaluatedProperties": false + }, + "external-docs": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri-reference" + }, + "description": { + "type": "string" + } + }, + "required": ["url"], + "unevaluatedProperties": false + }, + "xml": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "nodeType": { + "type": "string", + "enum": [ + "element", + "attribute", + "text", + "cdata", + "none" + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "iri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "deprecated": true + }, + "wrapped": { + "type": "boolean", + "deprecated": true + } + }, + "dependentSchemas": { + "nodeType": { + "properties": { + "attribute": false, + "wrapped": false + } + } + }, + "unevaluatedProperties": false + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js new file mode 100644 index 00000000..8e10c6bb --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js @@ -0,0 +1,32 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the OpenAPI JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://spec.openapis.org/oas/3.2/dialect" }, + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js new file mode 100644 index 00000000..c7bf4347 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the draft-04 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-04/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js new file mode 100644 index 00000000..5057827d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the draft-06 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-06/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js new file mode 100644 index 00000000..e163db4b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the draft-07 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-07/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js new file mode 100644 index 00000000..8cf69a7d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the 2019-09 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonschemadialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://json-schema.org/draft/2019-09/schema" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js new file mode 100644 index 00000000..013dac42 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the 2020-12 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonschemadialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://json-schema.org/draft/2020-12/schema" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js new file mode 100644 index 00000000..18fd4aa4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js @@ -0,0 +1,1665 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "The description of OpenAPI v3.2.x Documents without Schema Object validation", + "type": "object", + "properties": { + "openapi": { + "type": "string", + "pattern": "^3\\.2\\.\\d+(-.+)?$" + }, + "$self": { + "type": "string", + "format": "uri-reference", + "$comment": "MUST NOT contain a fragment", + "pattern": "^[^#]*$" + }, + "info": { + "$ref": "#/$defs/info" + }, + "jsonSchemaDialect": { + "type": "string", + "format": "uri-reference", + "default": "https://spec.openapis.org/oas/3.1/dialect" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + }, + "default": [ + { + "url": "/" + } + ] + }, + "paths": { + "$ref": "#/$defs/paths" + }, + "webhooks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "components": { + "$ref": "#/$defs/components" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/$defs/security-requirement" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/$defs/tag" + } + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + } + }, + "required": [ + "openapi", + "info" + ], + "anyOf": [ + { + "required": [ + "paths" + ] + }, + { + "required": [ + "components" + ] + }, + { + "required": [ + "webhooks" + ] + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "$defs": { + "info": { + "$comment": "https://spec.openapis.org/oas/v3.2#info-object", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "termsOfService": { + "type": "string", + "format": "uri-reference" + }, + "contact": { + "$ref": "#/$defs/contact" + }, + "license": { + "$ref": "#/$defs/license" + }, + "version": { + "type": "string" + } + }, + "required": [ + "title", + "version" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "contact": { + "$comment": "https://spec.openapis.org/oas/v3.2#contact-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "license": { + "$comment": "https://spec.openapis.org/oas/v3.2#license-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "name" + ], + "dependentSchemas": { + "identifier": { + "not": { + "required": [ + "url" + ] + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "server": { + "$comment": "https://spec.openapis.org/oas/v3.2#server-object", + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/server-variable" + } + } + }, + "required": [ + "url" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "server-variable": { + "$comment": "https://spec.openapis.org/oas/v3.2#server-variable-object", + "type": "object", + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "default" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "components": { + "$comment": "https://spec.openapis.org/oas/v3.2#components-object", + "type": "object", + "properties": { + "schemas": { + "type": "object", + "additionalProperties": { + "$dynamicRef": "#meta" + } + }, + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/response-or-reference" + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/parameter-or-reference" + } + }, + "examples": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/example-or-reference" + } + }, + "requestBodies": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/request-body-or-reference" + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "securitySchemes": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/security-scheme-or-reference" + } + }, + "links": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/link-or-reference" + } + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/callbacks-or-reference" + } + }, + "pathItems": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "mediaTypes": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/media-type-or-reference" + } + } + }, + "patternProperties": { + "^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems|mediaTypes)$": { + "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", + "propertyNames": { + "pattern": "^[a-zA-Z0-9._-]+$" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "paths": { + "$comment": "https://spec.openapis.org/oas/v3.2#paths-object", + "type": "object", + "patternProperties": { + "^/": { + "$ref": "#/$defs/path-item" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "path-item": { + "$comment": "https://spec.openapis.org/oas/v3.2#path-item-object", + "type": "object", + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + } + }, + "parameters": { + "$ref": "#/$defs/parameters" + }, + "additionalOperations": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/operation" + }, + "propertyNames": { + "$comment": "RFC9110 restricts methods to \"1*tchar\" in ABNF", + "pattern": "^[a-zA-Z0-9!#$%&'*+.^_`|~-]+$", + "not": { + "enum": [ + "GET", + "PUT", + "POST", + "DELETE", + "OPTIONS", + "HEAD", + "PATCH", + "TRACE", + "QUERY" + ] + } + } + }, + "get": { + "$ref": "#/$defs/operation" + }, + "put": { + "$ref": "#/$defs/operation" + }, + "post": { + "$ref": "#/$defs/operation" + }, + "delete": { + "$ref": "#/$defs/operation" + }, + "options": { + "$ref": "#/$defs/operation" + }, + "head": { + "$ref": "#/$defs/operation" + }, + "patch": { + "$ref": "#/$defs/operation" + }, + "trace": { + "$ref": "#/$defs/operation" + }, + "query": { + "$ref": "#/$defs/operation" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "operation": { + "$comment": "https://spec.openapis.org/oas/v3.2#operation-object", + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "$ref": "#/$defs/parameters" + }, + "requestBody": { + "$ref": "#/$defs/request-body-or-reference" + }, + "responses": { + "$ref": "#/$defs/responses" + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/callbacks-or-reference" + } + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/$defs/security-requirement" + } + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "external-documentation": { + "$comment": "https://spec.openapis.org/oas/v3.2#external-documentation-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "url" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/$defs/parameter-or-reference" + }, + "not": { + "allOf": [ + { + "contains": { + "type": "object", + "properties": { + "in": { + "const": "query" + } + }, + "required": [ + "in" + ] + } + }, + { + "contains": { + "type": "object", + "properties": { + "in": { + "const": "querystring" + } + }, + "required": [ + "in" + ] + } + } + ] + }, + "contains": { + "type": "object", + "properties": { + "in": { + "const": "querystring" + } + }, + "required": [ + "in" + ] + }, + "minContains": 0, + "maxContains": 1 + }, + "parameter": { + "$comment": "https://spec.openapis.org/oas/v3.2#parameter-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "in": { + "enum": [ + "query", + "querystring", + "header", + "path", + "cookie" + ] + }, + "description": { + "type": "string" + }, + "required": { + "default": false, + "type": "boolean" + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "content": { + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 + } + }, + "required": [ + "name", + "in" + ], + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ] + } + ], + "allOf": [ + { + "$ref": "#/$defs/examples" + }, + { + "$ref": "#/$defs/specification-extensions" + }, + { + "if": { + "properties": { + "in": { + "const": "query" + } + } + }, + "then": { + "properties": { + "allowEmptyValue": { + "default": false, + "type": "boolean" + } + } + } + }, + { + "if": { + "properties": { + "in": { + "const": "querystring" + } + } + }, + "then": { + "required": [ + "content" + ] + } + } + ], + "dependentSchemas": { + "schema": { + "properties": { + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "default": false, + "type": "boolean" + } + }, + "allOf": [ + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" + }, + { + "$ref": "#/$defs/styles-for-form" + } + ], + "$defs": { + "styles-for-path": { + "if": { + "properties": { + "in": { + "const": "path" + } + } + }, + "then": { + "properties": { + "style": { + "default": "simple", + "enum": [ + "matrix", + "label", + "simple" + ] + }, + "required": { + "const": true + } + }, + "required": [ + "required" + ] + } + }, + "styles-for-header": { + "if": { + "properties": { + "in": { + "const": "header" + } + } + }, + "then": { + "properties": { + "style": { + "default": "simple", + "const": "simple" + } + } + } + }, + "styles-for-query": { + "if": { + "properties": { + "in": { + "const": "query" + } + } + }, + "then": { + "properties": { + "style": { + "default": "form", + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + } + } + } + }, + "styles-for-cookie": { + "if": { + "properties": { + "in": { + "const": "cookie" + } + } + }, + "then": { + "properties": { + "style": { + "default": "form", + "enum": [ + "form", + "cookie" + ] + } + } + } + } + } + } + }, + "unevaluatedProperties": false + }, + "parameter-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/parameter" + } + }, + "request-body": { + "$comment": "https://spec.openapis.org/oas/v3.2#request-body-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "content": { + "$ref": "#/$defs/content" + }, + "required": { + "default": false, + "type": "boolean" + } + }, + "required": [ + "content" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "request-body-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/request-body" + } + }, + "content": { + "$comment": "https://spec.openapis.org/oas/v3.2#fixed-fields-10", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/media-type-or-reference" + }, + "propertyNames": { + "format": "media-range" + } + }, + "media-type": { + "$comment": "https://spec.openapis.org/oas/v3.2#media-type-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "itemSchema": { + "$dynamicRef": "#meta" + }, + "encoding": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/encoding" + } + }, + "prefixEncoding": { + "type": "array", + "items": { + "$ref": "#/$defs/encoding" + } + }, + "itemEncoding": { + "$ref": "#/$defs/encoding" + } + }, + "dependentSchemas": { + "encoding": { + "properties": { + "prefixEncoding": false, + "itemEncoding": false + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/examples" + }, + { + "$ref": "#/$defs/specification-extensions" + } + ], + "unevaluatedProperties": false + }, + "media-type-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/media-type" + } + }, + "encoding": { + "$comment": "https://spec.openapis.org/oas/v3.2#encoding-object", + "type": "object", + "properties": { + "contentType": { + "type": "string", + "format": "media-range" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "style": { + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean" + }, + "encoding": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/encoding" + } + }, + "prefixEncoding": { + "type": "array", + "items": { + "$ref": "#/$defs/encoding" + } + }, + "itemEncoding": { + "$ref": "#/$defs/encoding" + } + }, + "dependentSchemas": { + "encoding": { + "properties": { + "prefixEncoding": false, + "itemEncoding": false + } + }, + "style": { + "properties": { + "allowReserved": { + "default": false + } + } + }, + "explode": { + "properties": { + "style": { + "default": "form" + }, + "allowReserved": { + "default": false + } + } + }, + "allowReserved": { + "properties": { + "style": { + "default": "form" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/styles-for-form" + } + ], + "unevaluatedProperties": false + }, + "responses": { + "$comment": "https://spec.openapis.org/oas/v3.2#responses-object", + "type": "object", + "properties": { + "default": { + "$ref": "#/$defs/response-or-reference" + } + }, + "patternProperties": { + "^[1-5](?:[0-9]{2}|XX)$": { + "$ref": "#/$defs/response-or-reference" + } + }, + "minProperties": 1, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "if": { + "$comment": "either default, or at least one response code property must exist", + "patternProperties": { + "^[1-5](?:[0-9]{2}|XX)$": false + } + }, + "then": { + "required": [ + "default" + ] + } + }, + "response": { + "$comment": "https://spec.openapis.org/oas/v3.2#response-object", + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "content": { + "$ref": "#/$defs/content" + }, + "links": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/link-or-reference" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "response-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/response" + } + }, + "callbacks": { + "$comment": "https://spec.openapis.org/oas/v3.2#callback-object", + "type": "object", + "$ref": "#/$defs/specification-extensions", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "callbacks-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/callbacks" + } + }, + "example": { + "$comment": "https://spec.openapis.org/oas/v3.2#example-object", + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dataValue": true, + "serializedValue": { + "type": "string" + }, + "value": true, + "externalValue": { + "type": "string", + "format": "uri-reference" + } + }, + "allOf": [ + { + "not": { + "required": [ + "value", + "externalValue" + ] + } + }, + { + "not": { + "required": [ + "value", + "dataValue" + ] + } + }, + { + "not": { + "required": [ + "value", + "serializedValue" + ] + } + }, + { + "not": { + "required": [ + "serializedValue", + "externalValue" + ] + } + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "example-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/example" + } + }, + "link": { + "$comment": "https://spec.openapis.org/oas/v3.2#link-object", + "type": "object", + "properties": { + "operationRef": { + "type": "string", + "format": "uri-reference" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "$ref": "#/$defs/map-of-strings" + }, + "requestBody": true, + "description": { + "type": "string" + }, + "server": { + "$ref": "#/$defs/server" + } + }, + "oneOf": [ + { + "required": [ + "operationRef" + ] + }, + { + "required": [ + "operationId" + ] + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "link-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/link" + } + }, + "header": { + "$comment": "https://spec.openapis.org/oas/v3.2#header-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "required": { + "default": false, + "type": "boolean" + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "content": { + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 + } + }, + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ] + } + ], + "dependentSchemas": { + "schema": { + "properties": { + "style": { + "default": "simple", + "const": "simple" + }, + "explode": { + "default": false, + "type": "boolean" + }, + "allowReserved": { + "default": false, + "type": "boolean" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/examples" + }, + { + "$ref": "#/$defs/specification-extensions" + } + ], + "unevaluatedProperties": false + }, + "header-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/header" + } + }, + "tag": { + "$comment": "https://spec.openapis.org/oas/v3.2#tag-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + }, + "parent": { + "type": "string" + }, + "kind": { + "type": "string" + } + }, + "required": [ + "name" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "reference": { + "$comment": "https://spec.openapis.org/oas/v3.2#reference-object", + "type": "object", + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "schema": { + "$comment": "https://spec.openapis.org/oas/v3.2#schema-object", + "$dynamicAnchor": "meta", + "type": [ + "object", + "boolean" + ] + }, + "security-scheme": { + "$comment": "https://spec.openapis.org/oas/v3.2#security-scheme-object", + "type": "object", + "properties": { + "type": { + "enum": [ + "apiKey", + "http", + "mutualTLS", + "oauth2", + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "deprecated": { + "default": false, + "type": "boolean" + } + }, + "required": [ + "type" + ], + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-apikey" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-http" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-oauth2" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-oidc" + } + ], + "unevaluatedProperties": false, + "$defs": { + "type-apikey": { + "if": { + "properties": { + "type": { + "const": "apiKey" + } + } + }, + "then": { + "properties": { + "name": { + "type": "string" + }, + "in": { + "enum": [ + "query", + "header", + "cookie" + ] + } + }, + "required": [ + "name", + "in" + ] + } + }, + "type-http": { + "if": { + "properties": { + "type": { + "const": "http" + } + } + }, + "then": { + "properties": { + "scheme": { + "type": "string" + } + }, + "required": [ + "scheme" + ] + } + }, + "type-http-bearer": { + "if": { + "properties": { + "type": { + "const": "http" + }, + "scheme": { + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + }, + "required": [ + "type", + "scheme" + ] + }, + "then": { + "properties": { + "bearerFormat": { + "type": "string" + } + } + } + }, + "type-oauth2": { + "if": { + "properties": { + "type": { + "const": "oauth2" + } + } + }, + "then": { + "properties": { + "flows": { + "$ref": "#/$defs/oauth-flows" + }, + "oauth2MetadataUrl": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "flows" + ] + } + }, + "type-oidc": { + "if": { + "properties": { + "type": { + "const": "openIdConnect" + } + } + }, + "then": { + "properties": { + "openIdConnectUrl": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "openIdConnectUrl" + ] + } + } + } + }, + "security-scheme-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/security-scheme" + } + }, + "oauth-flows": { + "type": "object", + "properties": { + "implicit": { + "$ref": "#/$defs/oauth-flows/$defs/implicit" + }, + "password": { + "$ref": "#/$defs/oauth-flows/$defs/password" + }, + "clientCredentials": { + "$ref": "#/$defs/oauth-flows/$defs/client-credentials" + }, + "authorizationCode": { + "$ref": "#/$defs/oauth-flows/$defs/authorization-code" + }, + "deviceAuthorization": { + "$ref": "#/$defs/oauth-flows/$defs/device-authorization" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "$defs": { + "implicit": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "authorizationUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "password": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "client-credentials": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "authorization-code": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "device-authorization": { + "type": "object", + "properties": { + "deviceAuthorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "deviceAuthorizationUrl", + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + } + } + }, + "security-requirement": { + "$comment": "https://spec.openapis.org/oas/v3.2#security-requirement-object", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "specification-extensions": { + "$comment": "https://spec.openapis.org/oas/v3.2#specification-extensions", + "patternProperties": { + "^x-": true + } + }, + "examples": { + "properties": { + "example": true, + "examples": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/example-or-reference" + } + } + }, + "not": { + "required": [ + "example", + "examples" + ] + } + }, + "map-of-strings": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "styles-for-form": { + "if": { + "properties": { + "style": { + "const": "form" + } + }, + "required": [ + "style" + ] + }, + "then": { + "properties": { + "explode": { + "default": true + } + } + }, + "else": { + "properties": { + "explode": { + "default": false + } + } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/package.json b/node_modules/@hyperjump/json-schema/package.json new file mode 100644 index 00000000..5ebfd609 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/package.json @@ -0,0 +1,83 @@ +{ + "name": "@hyperjump/json-schema", + "version": "1.17.2", + "description": "A JSON Schema validator with support for custom keywords, vocabularies, and dialects", + "type": "module", + "main": "./v1/index.js", + "exports": { + ".": "./v1/index.js", + "./draft-04": "./draft-04/index.js", + "./draft-06": "./draft-06/index.js", + "./draft-07": "./draft-07/index.js", + "./draft-2019-09": "./draft-2019-09/index.js", + "./draft-2020-12": "./draft-2020-12/index.js", + "./openapi-3-0": "./openapi-3-0/index.js", + "./openapi-3-1": "./openapi-3-1/index.js", + "./openapi-3-2": "./openapi-3-2/index.js", + "./experimental": "./lib/experimental.js", + "./instance/experimental": "./lib/instance.js", + "./annotations/experimental": "./annotations/index.js", + "./annotated-instance/experimental": "./annotations/annotated-instance.js", + "./bundle": "./bundle/index.js", + "./formats": "./formats/index.js", + "./formats-lite": "./formats/lite.js" + }, + "scripts": { + "clean": "xargs -a .gitignore rm -rf", + "lint": "eslint lib v1 draft-* openapi-* bundle annotations", + "test": "vitest --watch=false", + "check-types": "tsc --noEmit" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hyperjump-io/json-schema.git" + }, + "keywords": [ + "JSON Schema", + "json-schema", + "jsonschema", + "JSON", + "Schema", + "2020-12", + "2019-09", + "draft-07", + "draft-06", + "draft-04", + "vocabulary", + "vocabularies" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/content-type": "*", + "@types/node": "*", + "@types/uuid": "*", + "@vitest/coverage-v8": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "json-schema-test-suite": "github:json-schema-org/JSON-Schema-Test-Suite", + "typescript": "*", + "typescript-eslint": "*", + "undici": "*", + "vitest": "*", + "yaml": "*" + }, + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/json-schema-formats": "^1.0.0", + "@hyperjump/pact": "^1.2.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.4", + "json-stringify-deterministic": "^1.0.12", + "just-curry-it": "^5.3.0", + "uuid": "^9.0.0" + }, + "peerDependencies": { + "@hyperjump/browser": "^1.1.0" + } +} diff --git a/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json b/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json new file mode 100644 index 00000000..4ffcd9dd --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json @@ -0,0 +1,289 @@ +[ + { + "description": "if - then", + "schema": { + "conditional": [ + { "type": "string" }, + { "maxLength": 5 } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails", + "data": 42, + "valid": true + } + ] + }, + { + "description": "if - then - else", + "schema": { + "conditional": [ + { "type": "string" }, + { "maxLength": 5 }, + { "type": "number" } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails, else passes", + "data": 42, + "valid": true + }, + { + "description": "if fails, else fails", + "data": true, + "valid": false + } + ] + }, + { + "description": "if - then - elseif - then", + "schema": { + "conditional": [ + { "type": "string" }, + { "maxLength": 5 }, + { "type": "number" }, + { "maximum": 50 } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails, elseif passes, then passes", + "data": 42, + "valid": true + }, + { + "description": "if fails, elseif passes, then fails", + "data": 100, + "valid": false + }, + { + "description": "if fails, elseif fails", + "data": true, + "valid": true + } + ] + }, + { + "description": "if - then - elseif - then - else", + "schema": { + "conditional": [ + { "type": "string" }, + { "maxLength": 5 }, + { "type": "number" }, + { "maximum": 50 }, + { "const": true } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails, elseif passes, then passes", + "data": 42, + "valid": true + }, + { + "description": "if fails, elseif passes, then fails", + "data": 100, + "valid": false + }, + { + "description": "if fails, elseif fails, else passes", + "data": true, + "valid": true + }, + { + "description": "if fails, elseif fails, else fails", + "data": false, + "valid": false + } + ] + }, + { + "description": "nested if - then - elseif - then - else", + "schema": { + "conditional": [ + [ + { "type": "string" }, + { "maxLength": 5 } + ], + [ + { "type": "number" }, + { "maximum": 50 } + ], + { "const": true } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails, elseif passes, then passes", + "data": 42, + "valid": true + }, + { + "description": "if fails, elseif passes, then fails", + "data": 100, + "valid": false + }, + { + "description": "if fails, elseif fails, else passes", + "data": true, + "valid": true + }, + { + "description": "if fails, elseif fails, else fails", + "data": false, + "valid": false + } + ] + }, + { + "description": "if - then - else with unevaluatedProperties", + "schema": { + "allOf": [ + { + "properties": { + "foo": {} + }, + "conditional": [ + { "required": ["foo"] }, + { + "properties": { + "bar": {} + } + }, + { + "properties": { + "baz": {} + } + } + ] + } + ], + "unevaluatedProperties": false + }, + "tests": [ + { + "description": "if foo, then bar is allowed", + "data": { "foo": 42, "bar": true }, + "valid": true + }, + { + "description": "if foo, then baz is not allowed", + "data": { "foo": 42, "baz": true }, + "valid": false + }, + { + "description": "if not foo, then baz is allowed", + "data": { "baz": true }, + "valid": true + }, + { + "description": "if not foo, then bar is not allowed", + "data": { "bar": true }, + "valid": false + } + ] + }, + { + "description": "if - then - else with unevaluatedItems", + "schema": { + "allOf": [ + { + "conditional": [ + { "prefixItems": [{ "const": "foo" }] }, + { + "prefixItems": [{}, { "const": "bar" }] + }, + { + "prefixItems": [{}, { "const": "baz" }] + } + ] + } + ], + "unevaluatedItems": false + }, + "tests": [ + { + "description": "foo, bar", + "data": ["foo", "bar"], + "valid": true + }, + { + "description": "foo, baz", + "data": ["foo", "baz"], + "valid": false + }, + { + "description": "foo, bar, additional", + "data": ["foo", "bar", ""], + "valid": false + }, + { + "description": "not-foo, baz", + "data": ["not-foo", "baz"], + "valid": true + }, + { + "description": "not-foo, bar", + "data": ["not-foo", "bar"], + "valid": false + }, + { + "description": "not-foo, baz, additional", + "data": ["not-foo", "baz", ""], + "valid": false + } + ] + } +] diff --git a/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json b/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json new file mode 100644 index 00000000..b1387804 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json @@ -0,0 +1,462 @@ +[ + { + "description": "itemPattern ``", + "schema": { + "itemPattern": [] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": true + }, + { + "description": "a", + "data": ["a"], + "valid": false + } + ] + }, + { + "description": "itemPattern `a`", + "schema": { + "itemPattern": [ + { "const": "a" } + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": true + }, + { + "description": "b", + "data": ["b"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": false + } + ] + }, + { + "description": "itemPattern `ab`", + "schema": { + "itemPattern": [ + { "const": "a" }, + { "const": "b" } + ] + }, + "tests": [ + { + "description": "a", + "data": ["a"], + "valid": false + }, + { + "description": "aa", + "data": ["a", "a"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + } + ] + }, + { + "description": "itemPattern `a+b`", + "schema": { + "itemPattern": [ + { "const": "a" }, "+", + { "const": "b" } + ] + }, + "tests": [ + { + "description": "b", + "data": ["b"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "aab", + "data": ["a", "a", "b"], + "valid": true + }, + { + "description": "aaab", + "data": ["a", "a", "a", "b"], + "valid": true + } + ] + }, + { + "description": "itemPattern `a*b`", + "schema": { + "itemPattern": [ + { "const": "a" }, "*", + { "const": "b" } + ] + }, + "tests": [ + { + "description": "b", + "data": ["b"], + "valid": true + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "aab", + "data": ["a", "a", "b"], + "valid": true + }, + { + "description": "aaab", + "data": ["a", "a", "a", "b"], + "valid": true + } + ] + }, + { + "description": "itemPattern `(ab)+`", + "schema": { + "itemPattern": [ + [ + { "const": "a" }, + { "const": "b" } + ], "+" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "aba", + "data": ["a", "b", "a"], + "valid": false + }, + { + "description": "abab", + "data": ["a", "b", "a", "b"], + "valid": true + }, + { + "description": "ababa", + "data": ["a", "b", "a", "b", "a"], + "valid": false + } + ] + }, + { + "description": "itemPattern `a(b+c)*`", + "schema": { + "itemPattern": [ + { "const": "a" }, + [ + { "const": "b" }, "+", + { "const": "c" } + ], "*" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": true + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": false + }, + { + "description": "abc", + "data": ["a", "b", "c"], + "valid": true + }, + { + "description": "abbc", + "data": ["a", "b", "b", "c"], + "valid": true + }, + { + "description": "abbbc", + "data": ["a", "b", "b", "b", "c"], + "valid": true + }, + { + "description": "abcbc", + "data": ["a", "b", "c", "b", "c"], + "valid": true + }, + { + "description": "abcb", + "data": ["a", "b", "c", "b"], + "valid": false + }, + { + "description": "abbcbc", + "data": ["a", "b", "b", "c", "b", "c"], + "valid": true + }, + { + "description": "abcbbc", + "data": ["a", "b", "c", "b", "b", "c"], + "valid": true + }, + { + "description": "abbcbbc", + "data": ["a", "b", "b", "c", "b", "b", "c"], + "valid": true + }, + { + "description": "abbcbbcb", + "data": ["a", "b", "b", "c", "b", "b", "c", "b"], + "valid": false + } + ] + }, + { + "description": "itemPattern `(abc)*abd`", + "schema": { + "itemPattern": [ + [ + { "const": "a" }, + { "const": "b" }, + { "const": "c" } + ], "*", + { "const": "a" }, + { "const": "b" }, + { "const": "d" } + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "abc", + "data": ["a", "b", "c"], + "valid": false + }, + { + "description": "abd", + "data": ["a", "b", "d"], + "valid": true + }, + { + "description": "abcabd", + "data": ["a", "b", "c", "a", "b", "d"], + "valid": true + }, + { + "description": "abcabcabd", + "data": ["a", "b", "c", "a", "b", "c", "a", "b", "d"], + "valid": true + }, + { + "description": "abcabcabda", + "data": ["a", "b", "c", "a", "b", "c", "a", "b", "d", "a"], + "valid": false + } + ] + }, + { + "description": "itemPattern `(ab|bd)+`", + "schema": { + "itemPattern": [ + [ + { "const": "a" }, + { "const": "b" }, + "|", + { "const": "c" }, + { "const": "d" } + ], "+" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "cd", + "data": ["c", "d"], + "valid": true + }, + { + "description": "abab", + "data": ["a", "b", "a", "b"], + "valid": true + }, + { + "description": "abcd", + "data": ["a", "b", "c", "d"], + "valid": true + }, + { + "description": "abc", + "data": ["a", "b", "c"], + "valid": false + } + ] + }, + { + "description": "itemPattern `ab?|c`", + "schema": { + "itemPattern": [ + { "const": "a" }, + { "const": "b" }, "?", + "|", + { "const": "c" } + ] + }, + "tests": [ + { + "description": "a", + "data": ["a"], + "valid": true + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "c", + "data": ["c"], + "valid": true + }, + { + "description": "ac", + "data": ["a", "c"], + "valid": false + } + ] + }, + { + "description": "itemPattern `a*(ab)+`", + "schema": { + "itemPattern": [ + { "const": "a" }, "*", + [ + { "const": "a" }, + { "const": "b" } + ], "+" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "aab", + "data": ["a", "a", "b"], + "valid": true + }, + { + "description": "aabab", + "data": ["a", "a", "b", "a", "b"], + "valid": true + }, + { + "description": "aaab", + "data": ["a", "a", "a", "b"], + "valid": true + } + ] + }, + { + "description": "itemPattern `(a+)+`", + "schema": { + "itemPattern": [ + [ + { "const": "a" }, "+" + ], "+" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": true + }, + { + "description": "aa", + "data": ["a", "a"], + "valid": true + }, + { + "description": "aaaaaaaaaaaaaaaa", + "data": ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"], + "valid": true + }, + { + "description": "aaaaaaaaaaaaaaaaX", + "data": ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "X"], + "valid": false + } + ] + } +] diff --git a/node_modules/@hyperjump/json-schema/v1/index.d.ts b/node_modules/@hyperjump/json-schema/v1/index.d.ts new file mode 100644 index 00000000..878ea277 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/index.d.ts @@ -0,0 +1,68 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaType = JsonSchemaType; + +export type JsonSchemaV1 = boolean | { + $schema?: "https://json-schema.org/v1"; + $id?: string; + $anchor?: string; + $ref?: string; + $dynamicRef?: string; + $dynamicAnchor?: string; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: JsonSchema; + unevaluatedItems?: JsonSchema; + prefixItems?: JsonSchema[]; + items?: JsonSchema; + contains?: JsonSchema; + additionalProperties?: JsonSchema; + unevaluatedProperties?: JsonSchema; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: JsonSchema; + if?: JsonSchema; + then?: JsonSchema; + else?: JsonSchema; + allOf?: JsonSchema[]; + anyOf?: JsonSchema[]; + oneOf?: JsonSchema[]; + not?: JsonSchema; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: JsonSchema; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/v1/index.js b/node_modules/@hyperjump/json-schema/v1/index.js new file mode 100644 index 00000000..3743f600 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/index.js @@ -0,0 +1,116 @@ +import { defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import "../formats/lite.js"; + +import metaSchema from "./schema.js"; +import coreMetaSchema from "./meta/core.js"; +import applicatorMetaSchema from "./meta/applicator.js"; +import validationMetaSchema from "./meta/validation.js"; +import metaDataMetaSchema from "./meta/meta-data.js"; +import formatMetaSchema from "./meta/format.js"; +import contentMetaSchema from "./meta/content.js"; +import unevaluatedMetaSchema from "./meta/unevaluated.js"; + + +defineVocabulary("https://json-schema.org/v1/vocab/core", { + "$anchor": "https://json-schema.org/keyword/anchor", + "$comment": "https://json-schema.org/keyword/comment", + "$defs": "https://json-schema.org/keyword/definitions", + "$dynamicAnchor": "https://json-schema.org/keyword/dynamicAnchor", + "$dynamicRef": "https://json-schema.org/keyword/dynamicRef", + "$id": "https://json-schema.org/keyword/id", + "$ref": "https://json-schema.org/keyword/ref", + "$vocabulary": "https://json-schema.org/keyword/vocabulary" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/applicator", { + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "contains": "https://json-schema.org/keyword/contains", + "minContains": "https://json-schema.org/keyword/minContains", + "maxContains": "https://json-schema.org/keyword/maxContains", + "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", + "if": "https://json-schema.org/keyword/if", + "then": "https://json-schema.org/keyword/then", + "else": "https://json-schema.org/keyword/else", + "conditional": "https://json-schema.org/keyword/conditional", + "items": "https://json-schema.org/keyword/items", + "itemPattern": "https://json-schema.org/keyword/itemPattern", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "prefixItems": "https://json-schema.org/keyword/prefixItems", + "properties": "https://json-schema.org/keyword/properties", + "propertyDependencies": "https://json-schema.org/keyword/propertyDependencies", + "propertyNames": "https://json-schema.org/keyword/propertyNames" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/validation", { + "const": "https://json-schema.org/keyword/const", + "dependentRequired": "https://json-schema.org/keyword/dependentRequired", + "enum": "https://json-schema.org/keyword/enum", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "requireAllExcept": "https://json-schema.org/keyword/requireAllExcept", + "pattern": "https://json-schema.org/keyword/pattern", + "required": "https://json-schema.org/keyword/required", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/meta-data", { + "default": "https://json-schema.org/keyword/default", + "deprecated": "https://json-schema.org/keyword/deprecated", + "description": "https://json-schema.org/keyword/description", + "examples": "https://json-schema.org/keyword/examples", + "readOnly": "https://json-schema.org/keyword/readOnly", + "title": "https://json-schema.org/keyword/title", + "writeOnly": "https://json-schema.org/keyword/writeOnly" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/format", { + "format": "https://json-schema.org/keyword/format" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/content", { + "contentEncoding": "https://json-schema.org/keyword/contentEncoding", + "contentMediaType": "https://json-schema.org/keyword/contentMediaType", + "contentSchema": "https://json-schema.org/keyword/contentSchema" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/unevaluated", { + "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", + "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" +}); + +const dialectId = "https://json-schema.org/v1"; +loadDialect(dialectId, { + "https://json-schema.org/v1/vocab/core": true, + "https://json-schema.org/v1/vocab/applicator": true, + "https://json-schema.org/v1/vocab/validation": true, + "https://json-schema.org/v1/vocab/meta-data": true, + "https://json-schema.org/v1/vocab/format": true, + "https://json-schema.org/v1/vocab/content": true, + "https://json-schema.org/v1/vocab/unevaluated": true +}); + +registerSchema(metaSchema, dialectId); +registerSchema(coreMetaSchema, "https://json-schema.org/v1/meta/core"); +registerSchema(applicatorMetaSchema, "https://json-schema.org/v1/meta/applicator"); +registerSchema(validationMetaSchema, "https://json-schema.org/v1/meta/validation"); +registerSchema(metaDataMetaSchema, "https://json-schema.org/v1/meta/meta-data"); +registerSchema(formatMetaSchema, "https://json-schema.org/v1/meta/format"); +registerSchema(contentMetaSchema, "https://json-schema.org/v1/meta/content"); +registerSchema(unevaluatedMetaSchema, "https://json-schema.org/v1/meta/unevaluated"); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/applicator.js b/node_modules/@hyperjump/json-schema/v1/meta/applicator.js new file mode 100644 index 00000000..47aabb2e --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/applicator.js @@ -0,0 +1,73 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Applicator vocabulary meta-schema", + + "properties": { + "prefixItems": { "$ref": "#/$defs/schemaArray" }, + "items": { "$dynamicRef": "meta" }, + "contains": { "$dynamicRef": "meta" }, + "itemPattern": { "$ref": "#/$defs/itemPattern" }, + "additionalProperties": { "$dynamicRef": "meta" }, + "properties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" } + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" }, + "propertyNames": { "format": "regex" } + }, + "dependentSchemas": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" } + }, + "propertyDependencies": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" } + } + }, + "propertyNames": { "$dynamicRef": "meta" }, + "if": { "$dynamicRef": "meta" }, + "then": { "$dynamicRef": "meta" }, + "else": { "$dynamicRef": "meta" }, + "conditional": { + "type": "array", + "items": { + "if": { "type": "array" }, + "then": { + "items": { "$dynamicRef": "meta" } + }, + "else": { "$dynamicRef": "meta" } + } + }, + "allOf": { "$ref": "#/$defs/schemaArray" }, + "anyOf": { "$ref": "#/$defs/schemaArray" }, + "oneOf": { "$ref": "#/$defs/schemaArray" }, + "not": { "$dynamicRef": "meta" } + }, + + "$defs": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$dynamicRef": "meta" } + }, + "itemPattern": { + "type": "array", + "itemPattern": [ + [ + { + "if": { "type": "array" }, + "then": { "$ref": "#/$defs/itemPattern" }, + "else": { "$dynamicRef": "meta" } + }, + { "enum": ["?", "*", "+"] }, "?", + "|", + { "const": "|" } + ], "*" + ] + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/content.js b/node_modules/@hyperjump/json-schema/v1/meta/content.js new file mode 100644 index 00000000..13d81dde --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/content.js @@ -0,0 +1,10 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Content vocabulary meta-schema", + + "properties": { + "contentMediaType": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "contentSchema": { "$dynamicRef": "meta" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/core.js b/node_modules/@hyperjump/json-schema/v1/meta/core.js new file mode 100644 index 00000000..10380051 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/core.js @@ -0,0 +1,50 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Core vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference", + "$comment": "Non-empty fragments not allowed.", + "pattern": "^[^#]*#?$" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$anchor": { "$ref": "#/$defs/anchor" }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$dynamicRef": { + "type": "string", + "pattern": "^#?[A-Za-z_][-A-Za-z0-9._]*$" + }, + "$dynamicAnchor": { "$ref": "#/$defs/anchor" }, + "$vocabulary": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "$comment": { "type": "string" }, + "$defs": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" } + } + }, + + "$defs": { + "anchor": { + "type": "string", + "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/format.js b/node_modules/@hyperjump/json-schema/v1/meta/format.js new file mode 100644 index 00000000..1b4afb96 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/format.js @@ -0,0 +1,8 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Format vocabulary meta-schema", + + "properties": { + "format": { "type": "string" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js b/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js new file mode 100644 index 00000000..9cdd1e0a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js @@ -0,0 +1,14 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Meta-data vocabulary meta-schema", + + "properties": { + "title": { "type": "string" }, + "description": { "type": "string" }, + "default": true, + "deprecated": { "type": "boolean" }, + "readOnly": { "type": "boolean" }, + "writeOnly": { "type": "boolean" }, + "examples": { "type": "array" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js b/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js new file mode 100644 index 00000000..d65d3723 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js @@ -0,0 +1,9 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Unevaluated applicator vocabulary meta-schema", + + "properties": { + "unevaluatedItems": { "$dynamicRef": "meta" }, + "unevaluatedProperties": { "$dynamicRef": "meta" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/validation.js b/node_modules/@hyperjump/json-schema/v1/meta/validation.js new file mode 100644 index 00000000..c04e7ce6 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/validation.js @@ -0,0 +1,65 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Validation vocabulary meta-schema", + + "properties": { + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { "type": "number" }, + "exclusiveMaximum": { "type": "number" }, + "minimum": { "type": "number" }, + "exclusiveMinimum": { "type": "number" }, + "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "minLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "minItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "uniqueItems": { "type": "boolean" }, + "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "minContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "minProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "required": { "$ref": "#/$defs/stringArray" }, + "optional": { "$ref": "#/$defs/stringArray" }, + "dependentRequired": { + "type": "object", + "additionalProperties": { "$ref": "#/$defs/stringArray" } + }, + "const": true, + "enum": { + "type": "array", + "items": true + }, + "type": { + "anyOf": [ + { "$ref": "#/$defs/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/$defs/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + } + }, + + "$defs": { + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "simpleTypes": { + "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/schema.js b/node_modules/@hyperjump/json-schema/v1/schema.js new file mode 100644 index 00000000..189e2e5a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/schema.js @@ -0,0 +1,24 @@ +export default { + "$schema": "https://json-schema.org/v1", + "$vocabulary": { + "https://json-schema.org/v1/vocab/core": true, + "https://json-schema.org/v1/vocab/applicator": true, + "https://json-schema.org/v1/vocab/unevaluated": true, + "https://json-schema.org/v1/vocab/validation": true, + "https://json-schema.org/v1/vocab/meta-data": true, + "https://json-schema.org/v1/vocab/format": true, + "https://json-schema.org/v1/vocab/content": true + }, + "title": "Core and Validation specifications meta-schema", + + "$dynamicAnchor": "meta", + + "allOf": [ + { "$ref": "/v1/meta/core" }, + { "$ref": "/v1/meta/applicator" }, + { "$ref": "/v1/meta/validation" }, + { "$ref": "/v1/meta/meta-data" }, + { "$ref": "/v1/meta/format" }, + { "$ref": "/v1/meta/content" } + ] +}; diff --git a/node_modules/@hyperjump/pact/LICENSE b/node_modules/@hyperjump/pact/LICENSE new file mode 100644 index 00000000..6e9846cf --- /dev/null +++ b/node_modules/@hyperjump/pact/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/pact/README.md b/node_modules/@hyperjump/pact/README.md new file mode 100644 index 00000000..32c4cf04 --- /dev/null +++ b/node_modules/@hyperjump/pact/README.md @@ -0,0 +1,76 @@ +# Hyperjump Pact + +Hyperjump Pact is a utility library that provides higher order functions for +working with iterators and async iterators. + +## Installation +Designed for node.js (ES Modules, TypeScript) and browsers. + +```bash +npm install @hyperjump/pact --save +``` + +## Usage + +```javascript +import { pipe, range, map, filter, reduce } from "@hyperjump/pact"; + + +const result = pipe( + range(1, 10), + filter((n) => n % 2 === 0), + map((n) => n * 2), + reduce((sum, n) => sum + n, 0) +); +console.log(result); +``` + +```javascript +import { pipe, asyncMap, asyncFilter, asyncReduce } from "@hyperjump/pact"; +// You can alternatively import the async functions without the prefix +// import { pipe, map, filter, reduce } from "@hyperjump/pact/async"; + + +const asyncSequence = async function* () { + yield 1; + yield 2; + yield 3; + yield 4; + yield 5; +}; + +for await (const value of asyncSequence()) { + console.log(value); +} + +const result = await pipe( + asyncSequence(), + asyncFilter((n) => n % 2 === 0), + asyncMap((n) => n * 2), + asyncReduce((sum, n) => sum + n, 0) +); +console.log(result); +``` + +## API + +https://pact.hyperjump.io + +## Contributing + +### Tests + +Run the tests + +```bash +npm test +``` + +Run the tests with a continuous test runner + +```bash +npm test -- --watch +``` + +[hyperjump]: https://github.com/hyperjump-io/browser +[jref]: https://github.com/hyperjump-io/browser/blob/master/src/json-reference/README.md diff --git a/node_modules/@hyperjump/pact/package.json b/node_modules/@hyperjump/pact/package.json new file mode 100644 index 00000000..b478643c --- /dev/null +++ b/node_modules/@hyperjump/pact/package.json @@ -0,0 +1,45 @@ +{ + "name": "@hyperjump/pact", + "version": "1.4.0", + "description": "Higher order functions for iterators and async iterators", + "type": "module", + "main": "./src/index.js", + "exports": { + ".": "./src/index.js", + "./async": "./src/async.js" + }, + "scripts": { + "lint": "eslint src", + "test": "vitest --watch=false", + "type-check": "tsc --noEmit", + "docs": "typedoc --excludeExternals" + }, + "repository": "github:hyperjump-io/pact", + "keywords": [ + "Hyperjump", + "Promise", + "higher order functions", + "iterator", + "async iterator", + "generator", + "async generator", + "async" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "^22.13.5", + "@typescript-eslint/eslint-plugin": "*", + "@typescript-eslint/parser": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "typedoc": "^0.27.9", + "typescript-eslint": "*", + "vitest": "*" + } +} diff --git a/node_modules/@hyperjump/pact/src/async.js b/node_modules/@hyperjump/pact/src/async.js new file mode 100644 index 00000000..e01e4b43 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/async.js @@ -0,0 +1,24 @@ +export { + asyncMap as map, + asyncTap as tap, + asyncFilter as filter, + asyncScan as scan, + asyncFlatten as flatten, + asyncDrop as drop, + asyncTake as take, + asyncHead as head, + range, + asyncEmpty as empty, + asyncZip as zip, + asyncConcat as concat, + asyncReduce as reduce, + asyncEvery as every, + asyncSome as some, + asyncCount as count, + asyncCollectArray as collectArray, + asyncCollectSet as collectSet, + asyncCollectMap as collectMap, + asyncCollectObject as collectObject, + asyncJoin as join, + pipe +} from "./index.js"; diff --git a/node_modules/@hyperjump/pact/src/curry.d.ts b/node_modules/@hyperjump/pact/src/curry.d.ts new file mode 100644 index 00000000..17ea2fd4 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/curry.d.ts @@ -0,0 +1,13 @@ +export const curry: ( + (curriedFn: (a: A) => (iterable: I) => R) => ( + (a: A, iterable: I) => R + ) & ( + (a: A) => (iterable: I) => R + ) +) & ( + (curriedFn: (a: A, b: B) => (iterable: I) => R) => ( + (a: A, b: B, iterable: I) => R + ) & ( + (a: A, b: B) => (iterable: I) => R + ) +); diff --git a/node_modules/@hyperjump/pact/src/curry.js b/node_modules/@hyperjump/pact/src/curry.js new file mode 100644 index 00000000..862c56f7 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/curry.js @@ -0,0 +1,15 @@ +/** + * @import * as API from "./curry.d.ts" + */ + + +// eslint-disable-next-line @stylistic/no-extra-parens +export const curry = /** @type API.curry */ ((fn) => (...args) => { + /** @typedef {Parameters>[0]} I */ + + const firstApplication = fn.length === 1 + ? /** @type Extract any> */ (fn)(args[0]) + : fn(args[0], args[1]); + const iterable = /** @type I */ (args[fn.length]); // eslint-disable-line @typescript-eslint/no-unsafe-assignment + return iterable === undefined ? firstApplication : firstApplication(iterable); +}); diff --git a/node_modules/@hyperjump/pact/src/index.d.ts b/node_modules/@hyperjump/pact/src/index.d.ts new file mode 100644 index 00000000..2b31bdc6 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/index.d.ts @@ -0,0 +1,443 @@ +import type { LastReturnType } from "./type-utils.d.ts"; + + +/** + * Apply a function to every value in the iterator + */ +export const map: ( + (fn: Mapper, iterator: Iterable) => Generator +) & ( + (fn: Mapper) => (iterator: Iterable) => Generator +); +export type Mapper = (item: A) => B; + +/** + * Same as `map`, but works with AsyncIterables and async mapping functions. + */ +export const asyncMap: ( + (fn: AsyncMapper, iterator: Iterable | AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncMapper) => (iterator: Iterable | AsyncIterable) => AsyncGenerator +); +export type AsyncMapper = (item: A) => Promise | B; + +/** + * Apply a function to every value in the iterator, but yield the original + * value, not the result of the function. + */ +export const tap: ( + (fn: Tapper, iterator: Iterable) => Generator +) & ( + (fn: Tapper) => (iterator: Iterable) => Generator +); +export type Tapper = (item: A) => void; + +/** + * Same as `tap`, but works with AsyncIterables. + */ +export const asyncTap: ( + (fn: AsyncTapper, iterator: AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncTapper) => (iterator: AsyncIterable) => AsyncGenerator +); +export type AsyncTapper = (item: A) => Promise | void; + +/** + * Yields only the values in the iterator that pass the predicate function. + */ +export const filter: ( + (fn: Predicate, iterator: Iterable) => Generator +) & ( + (fn: Predicate) => (iterator: Iterable) => Generator +); +export type Predicate = (item: A) => boolean; + +/** + * Same as `filter`, but works with AsyncIterables and async predicate + * functions. + */ +export const asyncFilter: ( + (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => AsyncGenerator +); +export type AsyncPredicate = (item: A) => Promise | boolean; + +/** + * Same as `reduce` except it emits the accumulated value after each update + */ +export const scan: ( + (fn: Reducer, acc: B, iter: Iterable) => Generator +) & ( + (fn: Reducer, acc: B) => (iter: Iterable) => Generator +); + +/** + * Same as `scan`, but works with AsyncIterables and async predicate + * functions. + */ +export const asyncScan: ( + (fn: AsyncReducer, acc: B, iter: Iterable | AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncReducer, acc: B) => (iter: Iterable | AsyncIterable) => AsyncGenerator +); + +/** + * Yields values from the iterator with all sub-iterator elements concatenated + * into it recursively up to the specified depth. + */ +export const flatten: (iterator: NestedIterable, depth?: number) => Generator>; +export type NestedIterable = Iterable>; + +/** + * Same as `flatten`, but works with AsyncGenerators. + */ +export const asyncFlatten: (iterator: NestedIterable | NestedAsyncIterable, depth?: number) => AsyncGenerator | NestedAsyncIterable>; +export type NestedAsyncIterable = AsyncIterable | NestedIterable>; + +/** + * Yields all the values in the iterator except for the first `n` values. + */ +export const drop: ( + (count: number, iterator: Iterable) => Generator +) & ( + (count: number) => (iterator: Iterable) => Generator +); + +/** + * Same as `drop`, but works with AsyncIterables. + */ +export const asyncDrop: ( + (count: number, iterator: AsyncIterable) => AsyncGenerator +) & ( + (count: number) => (iterator: AsyncIterable) => AsyncGenerator +); + +/** + * Same as `drop` but instead of dropping a specific number of values, it drops + * values until the `fn(value)` is `false` and then yields the remaining values. + */ +export const dropWhile: ( + (fn: Predicate, iterator: Iterable) => Generator +) & ( + (fn: Predicate) => (iterator: Iterable) => Generator +); + +/** + * Same as `dropWhile`, but works with AsyncIterables. + */ +export const asyncDropWhile: ( + (fn: AsyncPredicate, iterator: AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncPredicate) => (iterator: AsyncIterable) => AsyncGenerator +); + +/** + * Yields the first `n` values in the iterator. + */ +export const take: ( + (count: number, iterator: Iterable) => Generator +) & ( + (count: number) => (iterator: Iterable) => Generator +); + +/** + * Same as `take`, but works with AsyncIterables. + */ +export const asyncTake: ( + (count: number, iterator: AsyncIterable) => AsyncGenerator +) & ( + (count: number) => (iterator: AsyncIterable) => AsyncGenerator +); + +/** + * Same as `take` but instead of yielding a specific number of values, it yields + * values as long as the `fn(value)` returns `true` and drops the rest. + */ +export const takeWhile: ( + (fn: Predicate, iterator: Iterable) => Generator +) & ( + (fn: Predicate) => (iterator: Iterable) => Generator +); + +/** + * Same as `takeWhile`, but works with AsyncGenerators. + */ +export const asyncTakeWhile: ( + (fn: AsyncPredicate, iterator: AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncPredicate) => (iterator: AsyncIterable) => AsyncGenerator +); + +/** + * Returns the first value in the iterator. + */ +export const head: (iterator: Iterable) => A | undefined; + +/** + * Same as `head`, but works with AsyncGenerators. + */ +export const asyncHead: (iterator: AsyncIterable) => Promise; + +/** + * Yields numbers starting from `from` until `to`. If `to` is not passed, the + * iterator will be infinite. + */ +export const range: (from: number, to?: number) => Generator; + +/** + * Yields nothing. + */ +export const empty: () => Generator; + +/** + * Yields nothing asynchronously. + */ +export const asyncEmpty: () => AsyncGenerator; + +/** + * Yields tuples containing a value from each iterator. The iterator will have + * the same length as `iter1`. If `iter1` is longer than `iter2`, the second + * value of the tuple will be undefined. If `iter2` is longer than `iter1`, the + * remaining values in `iter2` will be ignored. + */ +export const zip: (iter1: Iterable, iter2: Iterable) => Generator<[A, B]>; + +/** + * Same as `zip` but works with AsyncIterables. + */ +export const asyncZip: (iter1: AsyncIterable, iter2: AsyncIterable) => AsyncGenerator<[A, B]>; + +/** + * Yields values from each iterator in order. + */ +export const concat: (...iters: Iterable[]) => Generator; + +/** + * Same as `concat` but works with AsyncIterables. + */ +export const asyncConcat: (...iters: (Iterable | AsyncIterable)[]) => AsyncGenerator; + +/** + * Reduce an iterator to a single value. + */ +export const reduce: ( + (fn: Reducer, acc: B, iter: Iterable) => B +) & ( + (fn: Reducer, acc: B) => (iter: Iterable) => B +); +export type Reducer = (acc: B, item: A) => B; + +/** + * Same as `reduce`, but works with AsyncGenerators and async reducer functions. + */ +export const asyncReduce: ( + (fn: AsyncReducer, acc: B, iter: Iterable | AsyncIterable) => Promise +) & ( + (fn: AsyncReducer, acc: B) => (iter: Iterable | AsyncIterable) => Promise +); +export type AsyncReducer = (acc: B, item: A) => Promise | B; + +/** + * Returns a boolean indicating whether or not all values in the iterator passes + * the predicate function. + */ +export const every: ( + (fn: Predicate, iterator: Iterable) => boolean +) & ( + (fn: Predicate) => (iterator: Iterable) => boolean +); + +/** + * Same as `every`, but works with AsyncIterables and async predicate functions. + */ +export const asyncEvery: ( + (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise +) & ( + (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise +); + +/** + * Returns a boolean indicating whether or not there exists a value in the + * iterator that passes the predicate function. + */ +export const some: ( + (fn: Predicate, iterator: Iterable) => boolean +) & ( + (fn: Predicate) => (iterator: Iterable) => boolean +); + +/** + * Same as `some`, but works with AsyncIterables and async predicate functions. + */ +export const asyncSome: ( + (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise +) & ( + (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise +); + +/** + * Returns the first value that passes the predicate function. + */ +export const find: ( + (fn: Predicate, iterator: Iterable) => A +) & ( + (fn: Predicate) => (iterator: Iterable) => A +); + +/** + * Same as `find`, but works with AsyncIterables and async predicate functions. + */ +export const asyncFind: ( + (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise +) & ( + (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise +); + +/** + * Returns the number of items in the iterator. + */ +export const count: (iterator: Iterable) => number; + +/** + * Same as `count`, but works with AsyncIterables. + */ +export const asyncCount: (iterator: AsyncIterable) => Promise; + +/** + * Collect all the items in the iterator into an array. + */ +export const collectArray: (iterator: Iterable) => A[]; + +/** + * Same as `collectArray`, but works with AsyncIterables. + */ +export const asyncCollectArray: (iterator: AsyncIterable) => Promise; + +/** + * Collect all the items in the iterator into a Set. + */ +export const collectSet: (iterator: Iterable) => Set; + +/** + * Same as `collectSet`, but works with AsyncIterables. + */ +export const asyncCollectSet: (iterator: AsyncIterable) => Promise>; + +/** + * Collect all the key/value tuples in the iterator into a Map. + */ +export const collectMap: (iterator: Iterable<[A, B]>) => Map; + +/** + * Same as `collectMap`, but works with AsyncGenerators. + */ +export const asyncCollectMap: (iterator: AsyncIterable<[A, B]>) => Promise>; + +/** + * Collect all the key/value tuples in the iterator into an Object. + */ +export const collectObject: (iterator: Iterable<[string, A]>) => Record; + +/** + * Same as `collectObject`, but works with AsyncGenerators. + */ +export const asyncCollectObject: (iterator: AsyncIterable<[string, A]>) => Promise>; + +/** + * Collect all the items in the iterator into a string separated by the + * separator token. + */ +export const join: ( + (separator: string, iterator: Iterable) => string +) & ( + (separator: string) => (iterator: Iterable) => string +); + +/** + * Same as `join`, but works with AsyncIterables. + */ +export const asyncJoin: ( + (separator: string, iterator: AsyncIterable) => Promise +) & ( + (separator: string) => (iterator: AsyncIterable) => Promise +); + +/** + * Starting with an iterator, apply any number of functions to transform the + * values and return the result. + */ +export const pipe: ( + (initialValue: A, ...fns: [ + (a: A) => B + ]) => B +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C + ]) => C +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D + ]) => D +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (c: D) => E + ]) => E +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F + ]) => F +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F, + (f: F) => G + ]) => G +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F, + (f: F) => G, + (g: G) => H + ]) => H +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F, + (f: F) => G, + (g: G) => H, + (h: H) => I + ]) => I +) & ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + any)[]>(initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F, + (f: F) => G, + (g: G) => H, + (h: H) => I, + ...J + ]) => LastReturnType +); diff --git a/node_modules/@hyperjump/pact/src/index.js b/node_modules/@hyperjump/pact/src/index.js new file mode 100644 index 00000000..e7ee8d8c --- /dev/null +++ b/node_modules/@hyperjump/pact/src/index.js @@ -0,0 +1,487 @@ +/** + * @module pact + */ + +import { curry } from "./curry.js"; + +/** + * @import { AsyncIterableItem, IterableItem } from "./type-utils.d.ts" + * @import * as API from "./index.d.ts" + */ + + +/** @type API.map */ +export const map = curry((fn) => function* (iter) { + for (const n of iter) { + yield fn(n); + } +}); + +/** @type API.asyncMap */ +export const asyncMap = curry((fn) => async function* (iter) { + for await (const n of iter) { + yield fn(n); + } +}); + +/** @type API.tap */ +export const tap = curry((fn) => function* (iter) { + for (const n of iter) { + fn(n); + yield n; + } +}); + +/** @type API.asyncTap */ +export const asyncTap = curry((fn) => async function* (iter) { + for await (const n of iter) { + await fn(n); + yield n; + } +}); + +/** @type API.filter */ +export const filter = curry((fn) => function* (iter) { + for (const n of iter) { + if (fn(n)) { + yield n; + } + } +}); + +/** @type API.asyncFilter */ +export const asyncFilter = curry((fn) => async function* (iter) { + for await (const n of iter) { + if (await fn(n)) { + yield n; + } + } +}); + + +export const scan = /** @type API.scan */ (curry( + // eslint-disable-next-line @stylistic/no-extra-parens + /** @type API.scan */ ((fn, acc) => function* (iter) { + for (const item of iter) { + acc = fn(acc, /** @type any */ (item)); + yield acc; + } + }) +)); + + +export const asyncScan = /** @type API.asyncScan */ (curry( + // eslint-disable-next-line @stylistic/no-extra-parens + /** @type API.asyncScan */ ((fn, acc) => async function* (iter) { + for await (const item of iter) { + acc = await fn(acc, /** @type any */ (item)); + yield acc; + } + }) +)); + +/** @type API.flatten */ +export const flatten = function* (iter, depth = 1) { + for (const n of iter) { + if (depth > 0 && n && typeof n === "object" && Symbol.iterator in n) { + yield* flatten(n, depth - 1); + } else { + yield n; + } + } +}; + +/** @type API.asyncFlatten */ +export const asyncFlatten = async function* (iter, depth = 1) { + for await (const n of iter) { + if (depth > 0 && n && typeof n === "object" && (Symbol.asyncIterator in n || Symbol.iterator in n)) { + yield* asyncFlatten(n, depth - 1); + } else { + yield n; + } + } +}; + +/** @type API.drop */ +export const drop = curry((count) => function* (iter) { + let index = 0; + for (const item of iter) { + if (index++ >= count) { + yield item; + } + } +}); + +/** @type API.asyncDrop */ +export const asyncDrop = curry((count) => async function* (iter) { + let index = 0; + for await (const item of iter) { + if (index++ >= count) { + yield item; + } + } +}); + +/** @type API.dropWhile */ +export const dropWhile = curry((fn) => function* (iter) { + let dropping = true; + for (const n of iter) { + if (dropping) { + if (fn(n)) { + continue; + } else { + dropping = false; + } + } + + yield n; + } +}); + +/** @type API.asyncDropWhile */ +export const asyncDropWhile = curry((fn) => async function* (iter) { + let dropping = true; + for await (const n of iter) { + if (dropping) { + if (await fn(n)) { + continue; + } else { + dropping = false; + } + } + + yield n; + } +}); + +/** @type API.take */ +export const take = curry((count) => function* (iter) { + const iterator = getIterator(iter); + + let current; + while (count-- > 0 && !(current = iterator.next())?.done) { + yield current.value; + } +}); + +/** @type API.asyncTake */ +export const asyncTake = curry((count) => async function* (iter) { + const iterator = getAsyncIterator(iter); + + let current; + while (count-- > 0 && !(current = await iterator.next())?.done) { + yield current.value; + } +}); + +/** @type API.takeWhile */ +export const takeWhile = curry((fn) => function* (iter) { + for (const n of iter) { + if (fn(n)) { + yield n; + } else { + break; + } + } +}); + +/** @type API.asyncTakeWhile */ +export const asyncTakeWhile = curry((fn) => async function* (iter) { + for await (const n of iter) { + if (await fn(n)) { + yield n; + } else { + break; + } + } +}); + +/** @type API.head */ +export const head = (iter) => { + const iterator = getIterator(iter); + const result = iterator.next(); + + return result.done ? undefined : result.value; +}; + +/** @type API.asyncHead */ +export const asyncHead = async (iter) => { + const iterator = getAsyncIterator(iter); + const result = await iterator.next(); + + return result.done ? undefined : result.value; +}; + +/** @type API.range */ +export const range = function* (from, to) { + for (let n = from; to === undefined || n < to; n++) { + yield n; + } +}; + +/** @type API.empty */ +export const empty = function* () {}; + +/** @type API.asyncEmpty */ +export const asyncEmpty = async function* () {}; + +/** @type API.zip */ +export const zip = function* (a, b) { + const bIter = getIterator(b); + for (const item1 of a) { + yield [item1, bIter.next().value]; + } +}; + +/** @type API.asyncZip */ +export const asyncZip = async function* (a, b) { + const bIter = getAsyncIterator(b); + for await (const item1 of a) { + yield [item1, (await bIter.next()).value]; + } +}; + +/** @type API.concat */ +export const concat = function* (...iters) { + for (const iter of iters) { + yield* iter; + } +}; + +/** @type API.asyncConcat */ +export const asyncConcat = async function* (...iters) { + for (const iter of iters) { + yield* iter; + } +}; + +export const reduce = /** @type API.reduce */ (curry( + // eslint-disable-next-line @stylistic/no-extra-parens + /** @type API.reduce */ ((fn, acc) => (iter) => { + for (const item of iter) { + acc = fn(acc, /** @type any */ (item)); + } + + return acc; + }) +)); + + +export const asyncReduce = /** @type API.asyncReduce */ (curry( + // eslint-disable-next-line @stylistic/no-extra-parens + /** @type API.asyncReduce */ ((fn, acc) => async (iter) => { + for await (const item of iter) { + acc = await fn(acc, /** @type any */ (item)); + } + + return acc; + }) +)); + +/** @type API.every */ +export const every = curry((fn) => (iter) => { + for (const item of iter) { + if (!fn(item)) { + return false; + } + } + + return true; +}); + +/** @type API.asyncEvery */ +export const asyncEvery = curry((fn) => async (iter) => { + for await (const item of iter) { + if (!await fn(item)) { + return false; + } + } + + return true; +}); + +/** @type API.some */ +export const some = curry((fn) => (iter) => { + for (const item of iter) { + if (fn(item)) { + return true; + } + } + + return false; +}); + +/** @type API.asyncSome */ +export const asyncSome = curry((fn) => async (iter) => { + for await (const item of iter) { + if (await fn(item)) { + return true; + } + } + + return false; +}); + +/** @type API.find */ +export const find = curry((fn) => (iter) => { + for (const item of iter) { + if (fn(item)) { + return item; + } + } +}); + +/** @type API.asyncFind */ +export const asyncFind = curry((fn) => async (iter) => { + for await (const item of iter) { + if (await fn(item)) { + return item; + } + } +}); + +/** @type API.count */ +export const count = (iter) => reduce((count) => count + 1, 0, iter); + +/** @type API.asyncCount */ +export const asyncCount = (iter) => asyncReduce((count) => count + 1, 0, iter); + +/** @type API.collectArray */ +export const collectArray = (iter) => [...iter]; + +/** @type API.asyncCollectArray */ +export const asyncCollectArray = async (iter) => { + const result = []; + for await (const item of iter) { + result.push(item); + } + + return result; +}; + +/** @type API.collectSet */ +export const collectSet = (iter) => { + /** @type Set> */ + const result = new Set(); + for (const item of iter) { + result.add(item); + } + + return result; +}; + +/** @type API.asyncCollectSet */ +export const asyncCollectSet = async (iter) => { + /** @type Set> */ + const result = new Set(); + for await (const item of iter) { + result.add(item); + } + + return result; +}; + +/** @type API.collectMap */ +export const collectMap = (iter) => { + /** @typedef {IterableItem[0]} K */ + /** @typedef {IterableItem[1]} V */ + + /** @type Map */ + const result = new Map(); + for (const [key, value] of iter) { + result.set(key, value); + } + + return result; +}; + +/** @type API.asyncCollectMap */ +export const asyncCollectMap = async (iter) => { + /** @typedef {AsyncIterableItem[0]} K */ + /** @typedef {AsyncIterableItem[1]} V */ + + /** @type Map */ + const result = new Map(); + for await (const [key, value] of iter) { + result.set(key, value); + } + + return result; +}; + +/** @type API.collectObject */ +export const collectObject = (iter) => { + /** @typedef {IterableItem[1]} V */ + + /** @type Record */ + const result = Object.create(null); // eslint-disable-line @typescript-eslint/no-unsafe-assignment + for (const [key, value] of iter) { + result[key] = value; + } + + return result; +}; + +/** @type API.asyncCollectObject */ +export const asyncCollectObject = async (iter) => { + /** @typedef {AsyncIterableItem[1]} V */ + + /** @type Record */ + const result = Object.create(null); // eslint-disable-line @typescript-eslint/no-unsafe-assignment + for await (const [key, value] of iter) { + result[key] = value; + } + + return result; +}; + +/** @type API.join */ +export const join = curry((separator) => (iter) => { + let result = head(iter) ?? ""; + + for (const n of iter) { + result += separator + n; + } + + return result; +}); + +/** @type API.asyncJoin */ +export const asyncJoin = curry((separator) => async (iter) => { + let result = await asyncHead(iter) ?? ""; + + for await (const n of iter) { + result += separator + n; + } + + return result; +}); + +/** @type (iter: Iterable) => Iterator */ +const getIterator = (iter) => { + if (typeof iter?.[Symbol.iterator] === "function") { + return iter[Symbol.iterator](); + } else { + throw TypeError("`iter` is not iterable"); + } +}; + +/** @type (iter: Iterable | AsyncIterable) => AsyncIterator */ +const getAsyncIterator = (iter) => { + if (Symbol.asyncIterator in iter && typeof iter[Symbol.asyncIterator] === "function") { + return iter[Symbol.asyncIterator](); + } else if (Symbol.iterator in iter && typeof iter[Symbol.iterator] === "function") { + return asyncMap((a) => a, iter); + } else { + throw TypeError("`iter` is not iterable"); + } +}; + +/** @type API.pipe */ +// eslint-disable-next-line @stylistic/no-extra-parens +export const pipe = /** @type (acc: any, ...fns: ((a: any) => any)[]) => any */ ( + (acc, ...fns) => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return reduce((acc, fn) => fn(acc), acc, fns); + } +); diff --git a/node_modules/@hyperjump/pact/src/type-utils.d.ts b/node_modules/@hyperjump/pact/src/type-utils.d.ts new file mode 100644 index 00000000..b808ebc1 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/type-utils.d.ts @@ -0,0 +1,5 @@ +export type IterableItem = T extends Iterable ? U : never; +export type AsyncIterableItem = T extends AsyncIterable ? U : never; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type LastReturnType any)[]> = T extends [...any, (...args: any) => infer R] ? R : never; diff --git a/node_modules/@hyperjump/uri/LICENSE b/node_modules/@hyperjump/uri/LICENSE new file mode 100644 index 00000000..6e9846cf --- /dev/null +++ b/node_modules/@hyperjump/uri/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/uri/README.md b/node_modules/@hyperjump/uri/README.md new file mode 100644 index 00000000..79bfc451 --- /dev/null +++ b/node_modules/@hyperjump/uri/README.md @@ -0,0 +1,129 @@ +# URI +A small and fast library for validating, parsing, and resolving URIs +([RFC 3986](https://www.rfc-editor.org/rfc/rfc3986)) and IRIs +([RFC 3987](https://www.rfc-editor.org/rfc/rfc3987)). + +## Install +Designed for node.js (ES Modules, TypeScript) and browsers. + +``` +npm install @hyperjump/uri +``` + +## Usage +```javascript +import { resolveUri, parseUri, isUri, isIri } from "@hyperjump/uri" + +const resolved = resolveUri("foo/bar", "http://example.com/aaa/bbb"); // https://example.com/aaa/foo/bar + +const components = parseUri("https://jason@example.com:80/foo?bar#baz"); // { +// scheme: "https", +// authority: "jason@example.com:80", +// userinfo: "jason", +// host: "example.com", +// port: "80", +// path: "/foo", +// query: "bar", +// fragment: "baz" +// } + +const a = isUri("http://examplé.org/rosé#"); // false +const a = isIri("http://examplé.org/rosé#"); // true +``` + +## API +### Resolve Relative References +These functions resolve relative-references against a base URI/IRI. The base +URI/IRI must be absolute, meaning it must have a scheme (`https`) and no +fragment (`#foo`). The resolution process will [normalize](#normalize) the +result. + +* **resolveUri**: (uriReference: string, baseUri: string) => string +* **resolveIri**: (iriReference: string, baseIri: string) => string + +### Normalize +These functions apply the following normalization rules. +1. Decode any unnecessarily percent-encoded characters. +2. Convert any lowercase characters in the hex numbers of percent-encoded + characters to uppercase. +3. Resolve and remove any dot-segments (`/.`, `/..`) in paths. +4. Convert the scheme to lowercase. +5. Convert the authority to lowercase. + +* **normalizeUri**: (uri: string) => string +* **normalizeIri**: (iri: string) => string + +### To Relative +These functions convert a non-relative URI/IRI into a relative URI/IRI given a +base. + +* **toRelativeUri**: (uri: string, relativeTo: string) => string +* **toRelativeIri**: (iri: string, relativeTo: string) => string + +### URI +A [URI](https://www.rfc-editor.org/rfc/rfc3986#section-3) is not relative and +may include a fragment. + +* **isUri**: (value: string) => boolean +* **parseUri**: (value: string) => IdentifierComponents +* **toAbsoluteUri**: (value: string) => string + + Takes a URI and strips its fragment component if it exists. + +### URI-Reference +A [URI-reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.1) may be +relative. + +* **isUriReference**: (value: string) => boolean +* **parseUriReference**: (value: string) => IdentifierComponents + +### absolute-URI +An [absolute-URI](https://www.rfc-editor.org/rfc/rfc3986#section-4.3) is not +relative an does not include a fragment. + +* **isAbsoluteUri**: (value: string) => boolean +* **parseAbsoluteUri**: (value: string) => IdentifierComponents + +### IRI +An IRI is not relative and may include a fragment. + +* **isIri**: (value: string) => boolean +* **parseIri**: (value: string) => IdentifierComponents +* **toAbsoluteIri**: (value: string) => string + + Takes an IRI and strips its fragment component if it exists. + +### IRI-reference +An IRI-reference may be relative. + +* **isIriReference**: (value: string) => boolean +* **parseIriReference**: (value: string) => IdentifierComponents + +### absolute-IRI +An absolute-IRI is not relative an does not include a fragment. + +* **isAbsoluteIri**: (value: string) => boolean +* **parseAbsoluteIri**: (value: string) => IdentifierComponents + +### Types +* **IdentifierComponents** + * **scheme**: string + * **authority**: string + * **userinfo**: string + * **host**: string + * **port**: string + * **path**: string + * **query**: string + * **fragment**: string + +## Contributing +### Tests +Run the tests +``` +npm test +``` + +Run the tests with a continuous test runner +``` +npm test -- --watch +``` diff --git a/node_modules/@hyperjump/uri/package.json b/node_modules/@hyperjump/uri/package.json new file mode 100644 index 00000000..f2753292 --- /dev/null +++ b/node_modules/@hyperjump/uri/package.json @@ -0,0 +1,39 @@ +{ + "name": "@hyperjump/uri", + "version": "1.3.2", + "description": "A small and fast library for validating parsing and resolving URIs and IRIs", + "type": "module", + "main": "./lib/index.js", + "exports": "./lib/index.js", + "scripts": { + "lint": "eslint lib", + "test": "vitest --watch=false", + "type-check": "tsc --noEmit" + }, + "repository": "github:hyperjump-io/uri", + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "keywords": [ + "URI", + "IRI", + "resolve", + "relative", + "parse", + "RFC3986", + "RFC-3986", + "RFC3987", + "RFC-3987" + ], + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "^22.13.0", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "typescript-eslint": "*", + "vitest": "*" + } +} diff --git a/node_modules/content-type/HISTORY.md b/node_modules/content-type/HISTORY.md new file mode 100644 index 00000000..45836713 --- /dev/null +++ b/node_modules/content-type/HISTORY.md @@ -0,0 +1,29 @@ +1.0.5 / 2023-01-29 +================== + + * perf: skip value escaping when unnecessary + +1.0.4 / 2017-09-11 +================== + + * perf: skip parameter parsing when no parameters + +1.0.3 / 2017-09-10 +================== + + * perf: remove argument reassignment + +1.0.2 / 2016-05-09 +================== + + * perf: enable strict mode + +1.0.1 / 2015-02-13 +================== + + * Improve missing `Content-Type` header error message + +1.0.0 / 2015-02-01 +================== + + * Initial implementation, derived from `media-typer@0.3.0` diff --git a/node_modules/content-type/LICENSE b/node_modules/content-type/LICENSE new file mode 100644 index 00000000..34b1a2de --- /dev/null +++ b/node_modules/content-type/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/content-type/README.md b/node_modules/content-type/README.md new file mode 100644 index 00000000..c1a922a9 --- /dev/null +++ b/node_modules/content-type/README.md @@ -0,0 +1,94 @@ +# content-type + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +Create and parse HTTP Content-Type header according to RFC 7231 + +## Installation + +```sh +$ npm install content-type +``` + +## API + +```js +var contentType = require('content-type') +``` + +### contentType.parse(string) + +```js +var obj = contentType.parse('image/svg+xml; charset=utf-8') +``` + +Parse a `Content-Type` header. This will return an object with the following +properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): + + - `type`: The media type (the type and subtype, always lower case). + Example: `'image/svg+xml'` + + - `parameters`: An object of the parameters in the media type (name of parameter + always lower case). Example: `{charset: 'utf-8'}` + +Throws a `TypeError` if the string is missing or invalid. + +### contentType.parse(req) + +```js +var obj = contentType.parse(req) +``` + +Parse the `Content-Type` header from the given `req`. Short-cut for +`contentType.parse(req.headers['content-type'])`. + +Throws a `TypeError` if the `Content-Type` header is missing or invalid. + +### contentType.parse(res) + +```js +var obj = contentType.parse(res) +``` + +Parse the `Content-Type` header set on the given `res`. Short-cut for +`contentType.parse(res.getHeader('content-type'))`. + +Throws a `TypeError` if the `Content-Type` header is missing or invalid. + +### contentType.format(obj) + +```js +var str = contentType.format({ + type: 'image/svg+xml', + parameters: { charset: 'utf-8' } +}) +``` + +Format an object into a `Content-Type` header. This will return a string of the +content type for the given object with the following properties (examples are +shown that produce the string `'image/svg+xml; charset=utf-8'`): + + - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'` + + - `parameters`: An object of the parameters in the media type (name of the + parameter will be lower-cased). Example: `{charset: 'utf-8'}` + +Throws a `TypeError` if the object contains an invalid type or parameter names. + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/content-type/master?label=ci +[ci-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/content-type/master +[coveralls-url]: https://coveralls.io/r/jshttp/content-type?branch=master +[node-image]: https://badgen.net/npm/node/content-type +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/content-type +[npm-url]: https://npmjs.org/package/content-type +[npm-version-image]: https://badgen.net/npm/v/content-type diff --git a/node_modules/content-type/index.js b/node_modules/content-type/index.js new file mode 100644 index 00000000..41840e7b --- /dev/null +++ b/node_modules/content-type/index.js @@ -0,0 +1,225 @@ +/*! + * content-type + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 + * + * parameter = token "=" ( token / quoted-string ) + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + * / DIGIT / ALPHA + * ; any VCHAR, except delimiters + * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE + * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text + * obs-text = %x80-FF + * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) + */ +var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g // eslint-disable-line no-control-regex +var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ // eslint-disable-line no-control-regex +var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ + +/** + * RegExp to match quoted-pair in RFC 7230 sec 3.2.6 + * + * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) + * obs-text = %x80-FF + */ +var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g // eslint-disable-line no-control-regex + +/** + * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6 + */ +var QUOTE_REGEXP = /([\\"])/g + +/** + * RegExp to match type in RFC 7231 sec 3.1.1.1 + * + * media-type = type "/" subtype + * type = token + * subtype = token + */ +var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ + +/** + * Module exports. + * @public + */ + +exports.format = format +exports.parse = parse + +/** + * Format object to media type. + * + * @param {object} obj + * @return {string} + * @public + */ + +function format (obj) { + if (!obj || typeof obj !== 'object') { + throw new TypeError('argument obj is required') + } + + var parameters = obj.parameters + var type = obj.type + + if (!type || !TYPE_REGEXP.test(type)) { + throw new TypeError('invalid type') + } + + var string = type + + // append parameters + if (parameters && typeof parameters === 'object') { + var param + var params = Object.keys(parameters).sort() + + for (var i = 0; i < params.length; i++) { + param = params[i] + + if (!TOKEN_REGEXP.test(param)) { + throw new TypeError('invalid parameter name') + } + + string += '; ' + param + '=' + qstring(parameters[param]) + } + } + + return string +} + +/** + * Parse media type to object. + * + * @param {string|object} string + * @return {Object} + * @public + */ + +function parse (string) { + if (!string) { + throw new TypeError('argument string is required') + } + + // support req/res-like objects as argument + var header = typeof string === 'object' + ? getcontenttype(string) + : string + + if (typeof header !== 'string') { + throw new TypeError('argument string is required to be a string') + } + + var index = header.indexOf(';') + var type = index !== -1 + ? header.slice(0, index).trim() + : header.trim() + + if (!TYPE_REGEXP.test(type)) { + throw new TypeError('invalid media type') + } + + var obj = new ContentType(type.toLowerCase()) + + // parse parameters + if (index !== -1) { + var key + var match + var value + + PARAM_REGEXP.lastIndex = index + + while ((match = PARAM_REGEXP.exec(header))) { + if (match.index !== index) { + throw new TypeError('invalid parameter format') + } + + index += match[0].length + key = match[1].toLowerCase() + value = match[2] + + if (value.charCodeAt(0) === 0x22 /* " */) { + // remove quotes + value = value.slice(1, -1) + + // remove escapes + if (value.indexOf('\\') !== -1) { + value = value.replace(QESC_REGEXP, '$1') + } + } + + obj.parameters[key] = value + } + + if (index !== header.length) { + throw new TypeError('invalid parameter format') + } + } + + return obj +} + +/** + * Get content-type from req/res objects. + * + * @param {object} + * @return {Object} + * @private + */ + +function getcontenttype (obj) { + var header + + if (typeof obj.getHeader === 'function') { + // res-like + header = obj.getHeader('content-type') + } else if (typeof obj.headers === 'object') { + // req-like + header = obj.headers && obj.headers['content-type'] + } + + if (typeof header !== 'string') { + throw new TypeError('content-type header is missing from object') + } + + return header +} + +/** + * Quote a string if necessary. + * + * @param {string} val + * @return {string} + * @private + */ + +function qstring (val) { + var str = String(val) + + // no need to quote tokens + if (TOKEN_REGEXP.test(str)) { + return str + } + + if (str.length > 0 && !TEXT_REGEXP.test(str)) { + throw new TypeError('invalid parameter value') + } + + return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' +} + +/** + * Class to represent a content type. + * @private + */ +function ContentType (type) { + this.parameters = Object.create(null) + this.type = type +} diff --git a/node_modules/content-type/package.json b/node_modules/content-type/package.json new file mode 100644 index 00000000..9db19f63 --- /dev/null +++ b/node_modules/content-type/package.json @@ -0,0 +1,42 @@ +{ + "name": "content-type", + "description": "Create and parse HTTP Content-Type header", + "version": "1.0.5", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "content-type", + "http", + "req", + "res", + "rfc7231" + ], + "repository": "jshttp/content-type", + "devDependencies": { + "deep-equal": "1.0.1", + "eslint": "8.32.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.27.5", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "10.2.0", + "nyc": "15.1.0" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/node_modules/idn-hostname/#/tests/0/0.json b/node_modules/idn-hostname/#/tests/0/0.json new file mode 100644 index 00000000..29be3a6e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/0.json @@ -0,0 +1,5 @@ +{ + "description": "valid internationalized hostname", + "data": "例子.测试", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/1.json b/node_modules/idn-hostname/#/tests/0/1.json new file mode 100644 index 00000000..52473165 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/1.json @@ -0,0 +1,5 @@ +{ + "description": "valid hostname with mixed scripts", + "data": "xn--fsqu00a.xn--0zwm56d", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/10.json b/node_modules/idn-hostname/#/tests/0/10.json new file mode 100644 index 00000000..12c8a6a7 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/10.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with segment longer than 63 chars", + "data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.example.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/11.json b/node_modules/idn-hostname/#/tests/0/11.json new file mode 100644 index 00000000..0ca8d8bc --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/11.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with more than 255 characters", + "data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/12.json b/node_modules/idn-hostname/#/tests/0/12.json new file mode 100644 index 00000000..17a459c2 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/12.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with trailing dot", + "data": "example.com.", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/13.json b/node_modules/idn-hostname/#/tests/0/13.json new file mode 100644 index 00000000..48d0662d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/13.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with leading dot", + "data": ".example.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/14.json b/node_modules/idn-hostname/#/tests/0/14.json new file mode 100644 index 00000000..157d272b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/14.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with consecutive dots", + "data": "example..com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/15.json b/node_modules/idn-hostname/#/tests/0/15.json new file mode 100644 index 00000000..8cf58357 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/15.json @@ -0,0 +1,5 @@ +{ + "description": "valid hostname with single segment (no TLD)", + "data": "localhost", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/16.json b/node_modules/idn-hostname/#/tests/0/16.json new file mode 100644 index 00000000..080d12fd --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/16.json @@ -0,0 +1,5 @@ +{ + "description": "a valid host name (example.test in Hangul)", + "data": "실례.테스트", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/17.json b/node_modules/idn-hostname/#/tests/0/17.json new file mode 100644 index 00000000..eaa73f4f --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/17.json @@ -0,0 +1,5 @@ +{ + "description": "illegal first char U+302E Hangul single dot tone mark", + "data": "〮실례.테스트", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/18.json b/node_modules/idn-hostname/#/tests/0/18.json new file mode 100644 index 00000000..aead92cc --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/18.json @@ -0,0 +1,5 @@ +{ + "description": "contains illegal char U+302E Hangul single dot tone mark", + "data": "실〮례.테스트", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/19.json b/node_modules/idn-hostname/#/tests/0/19.json new file mode 100644 index 00000000..a736381a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/19.json @@ -0,0 +1,5 @@ +{ + "description": "a host name with a component too long", + "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/2.json b/node_modules/idn-hostname/#/tests/0/2.json new file mode 100644 index 00000000..5478ea8a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/2.json @@ -0,0 +1,5 @@ +{ + "description": "valid hostname with alphanumeric characters and hyphens", + "data": "sub-example.example.com", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/20.json b/node_modules/idn-hostname/#/tests/0/20.json new file mode 100644 index 00000000..4b51d1c9 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/20.json @@ -0,0 +1,6 @@ +{ + "description": "invalid label, correct Punycode", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc3492#section-7.1", + "data": "-> $1.00 <--", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/21.json b/node_modules/idn-hostname/#/tests/0/21.json new file mode 100644 index 00000000..c1067bff --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/21.json @@ -0,0 +1,6 @@ +{ + "description": "valid Chinese Punycode", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4", + "data": "xn--ihqwcrb4cv8a8dqg056pqjye", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/22.json b/node_modules/idn-hostname/#/tests/0/22.json new file mode 100644 index 00000000..488f177d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/22.json @@ -0,0 +1,6 @@ +{ + "description": "invalid Punycode", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", + "data": "xn--X", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/23.json b/node_modules/idn-hostname/#/tests/0/23.json new file mode 100644 index 00000000..88390d45 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/23.json @@ -0,0 +1,6 @@ +{ + "description": "U-label contains \"--\" after the 3rd and 4th position", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", + "data": "XN--a--aaaa", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/24.json b/node_modules/idn-hostname/#/tests/0/24.json new file mode 100644 index 00000000..cf2ceddd --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/24.json @@ -0,0 +1,6 @@ +{ + "description": "U-label starts with a dash", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", + "data": "-hello", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/25.json b/node_modules/idn-hostname/#/tests/0/25.json new file mode 100644 index 00000000..499915b1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/25.json @@ -0,0 +1,6 @@ +{ + "description": "U-label ends with a dash", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", + "data": "hello-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/26.json b/node_modules/idn-hostname/#/tests/0/26.json new file mode 100644 index 00000000..5c633fd5 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/26.json @@ -0,0 +1,6 @@ +{ + "description": "U-label starts and ends with a dash", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", + "data": "-hello-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/27.json b/node_modules/idn-hostname/#/tests/0/27.json new file mode 100644 index 00000000..eb6b9a83 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/27.json @@ -0,0 +1,6 @@ +{ + "description": "Begins with a Spacing Combining Mark", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", + "data": "ःhello", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/28.json b/node_modules/idn-hostname/#/tests/0/28.json new file mode 100644 index 00000000..31a795fe --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/28.json @@ -0,0 +1,6 @@ +{ + "description": "Begins with a Nonspacing Mark", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", + "data": "̀hello", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/29.json b/node_modules/idn-hostname/#/tests/0/29.json new file mode 100644 index 00000000..f83cf23d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/29.json @@ -0,0 +1,6 @@ +{ + "description": "Begins with an Enclosing Mark", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", + "data": "҈hello", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/3.json b/node_modules/idn-hostname/#/tests/0/3.json new file mode 100644 index 00000000..c2bb63df --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/3.json @@ -0,0 +1,5 @@ +{ + "description": "valid hostname with multiple internationalized segments", + "data": "测试.例子.测试", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/30.json b/node_modules/idn-hostname/#/tests/0/30.json new file mode 100644 index 00000000..c031e01c --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/30.json @@ -0,0 +1,6 @@ +{ + "description": "Exceptions that are PVALID, left-to-right chars", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "ßς་〇", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/31.json b/node_modules/idn-hostname/#/tests/0/31.json new file mode 100644 index 00000000..82a336f8 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/31.json @@ -0,0 +1,6 @@ +{ + "description": "Exceptions that are PVALID, right-to-left chars", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "۽۾", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/32.json b/node_modules/idn-hostname/#/tests/0/32.json new file mode 100644 index 00000000..307224a3 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/32.json @@ -0,0 +1,6 @@ +{ + "description": "Exceptions that are DISALLOWED, right-to-left chars", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "ـߺ", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/33.json b/node_modules/idn-hostname/#/tests/0/33.json new file mode 100644 index 00000000..75572ff1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/33.json @@ -0,0 +1,6 @@ +{ + "description": "Exceptions that are DISALLOWED, left-to-right chars", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start", + "data": "〱〲〳〴〵〮〯〻", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/34.json b/node_modules/idn-hostname/#/tests/0/34.json new file mode 100644 index 00000000..50b230dd --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/34.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with no preceding 'l'", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "a·l", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/35.json b/node_modules/idn-hostname/#/tests/0/35.json new file mode 100644 index 00000000..b1c5b6d8 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/35.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with nothing preceding", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "·l", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/36.json b/node_modules/idn-hostname/#/tests/0/36.json new file mode 100644 index 00000000..969b50e8 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/36.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with no following 'l'", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "l·a", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/37.json b/node_modules/idn-hostname/#/tests/0/37.json new file mode 100644 index 00000000..8902a6e1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/37.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with nothing following", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "l·", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/38.json b/node_modules/idn-hostname/#/tests/0/38.json new file mode 100644 index 00000000..e7a7f73a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/38.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with surrounding 'l's", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "l·l", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/39.json b/node_modules/idn-hostname/#/tests/0/39.json new file mode 100644 index 00000000..feead6d4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/39.json @@ -0,0 +1,6 @@ +{ + "description": "Greek KERAIA not followed by Greek", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", + "data": "α͵S", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/4.json b/node_modules/idn-hostname/#/tests/0/4.json new file mode 100644 index 00000000..f65e220a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/4.json @@ -0,0 +1,5 @@ +{ + "description": "ZERO WIDTH NON-JOINER (U+200C) not preceded by a Virama", + "data": "exam‌ple.测试", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/40.json b/node_modules/idn-hostname/#/tests/0/40.json new file mode 100644 index 00000000..c2ff2e6e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/40.json @@ -0,0 +1,6 @@ +{ + "description": "Greek KERAIA not followed by anything", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", + "data": "α͵", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/41.json b/node_modules/idn-hostname/#/tests/0/41.json new file mode 100644 index 00000000..09e8d145 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/41.json @@ -0,0 +1,6 @@ +{ + "description": "Greek KERAIA followed by Greek", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", + "data": "α͵β", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/42.json b/node_modules/idn-hostname/#/tests/0/42.json new file mode 100644 index 00000000..f0953aac --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/42.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERESH not preceded by Hebrew", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", + "data": "A׳ב", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/43.json b/node_modules/idn-hostname/#/tests/0/43.json new file mode 100644 index 00000000..9c56dea4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/43.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERESH not preceded by anything", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", + "data": "׳ב", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/44.json b/node_modules/idn-hostname/#/tests/0/44.json new file mode 100644 index 00000000..104be9f6 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/44.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERESH preceded by Hebrew", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", + "data": "א׳ב", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/45.json b/node_modules/idn-hostname/#/tests/0/45.json new file mode 100644 index 00000000..f24c59ee --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/45.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERSHAYIM not preceded by Hebrew", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", + "data": "A״ב", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/46.json b/node_modules/idn-hostname/#/tests/0/46.json new file mode 100644 index 00000000..94e004a0 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/46.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERSHAYIM not preceded by anything", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", + "data": "״ב", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/47.json b/node_modules/idn-hostname/#/tests/0/47.json new file mode 100644 index 00000000..faf362d6 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/47.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERSHAYIM preceded by Hebrew", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", + "data": "א״ב", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/48.json b/node_modules/idn-hostname/#/tests/0/48.json new file mode 100644 index 00000000..184db77b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/48.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "def・abc", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/49.json b/node_modules/idn-hostname/#/tests/0/49.json new file mode 100644 index 00000000..443d6870 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/49.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with no other characters", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "・", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/5.json b/node_modules/idn-hostname/#/tests/0/5.json new file mode 100644 index 00000000..1b2f583f --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/5.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with space", + "data": "ex ample.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/50.json b/node_modules/idn-hostname/#/tests/0/50.json new file mode 100644 index 00000000..08dd95c9 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/50.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with Hiragana", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "・ぁ", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/51.json b/node_modules/idn-hostname/#/tests/0/51.json new file mode 100644 index 00000000..34da1179 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/51.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with Katakana", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "・ァ", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/52.json b/node_modules/idn-hostname/#/tests/0/52.json new file mode 100644 index 00000000..fa79802b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/52.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with Han", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "・丈", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/53.json b/node_modules/idn-hostname/#/tests/0/53.json new file mode 100644 index 00000000..ba5614e5 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/53.json @@ -0,0 +1,6 @@ +{ + "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", + "data": "٠۰", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/54.json b/node_modules/idn-hostname/#/tests/0/54.json new file mode 100644 index 00000000..81386902 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/54.json @@ -0,0 +1,6 @@ +{ + "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", + "data": "ب٠ب", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/55.json b/node_modules/idn-hostname/#/tests/0/55.json new file mode 100644 index 00000000..81c3dd69 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/55.json @@ -0,0 +1,6 @@ +{ + "description": "Extended Arabic-Indic digits mixed with ASCII digits", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", + "data": "۰0", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/56.json b/node_modules/idn-hostname/#/tests/0/56.json new file mode 100644 index 00000000..22bc8471 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/56.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH JOINER not preceded by Virama", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", + "data": "क‍ष", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/57.json b/node_modules/idn-hostname/#/tests/0/57.json new file mode 100644 index 00000000..22728cc5 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/57.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH JOINER not preceded by anything", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", + "data": "‍ष", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/58.json b/node_modules/idn-hostname/#/tests/0/58.json new file mode 100644 index 00000000..49187f3e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/58.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH JOINER preceded by Virama", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", + "data": "क्‍ष", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/59.json b/node_modules/idn-hostname/#/tests/0/59.json new file mode 100644 index 00000000..01d03a3e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/59.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH NON-JOINER preceded by Virama", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", + "data": "क्‌ष", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/6.json b/node_modules/idn-hostname/#/tests/0/6.json new file mode 100644 index 00000000..21d8c4be --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/6.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname starting with hyphen", + "data": "-example.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/60.json b/node_modules/idn-hostname/#/tests/0/60.json new file mode 100644 index 00000000..8a924362 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/60.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches context joining rule", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", + "data": "بي‌بي", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/61.json b/node_modules/idn-hostname/#/tests/0/61.json new file mode 100644 index 00000000..7ee18591 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/61.json @@ -0,0 +1,6 @@ +{ + "description": "Labels with \"--\" in the third and fourth positions are ACE labels and must start with \"xn\" (RFC 5891 §4.2.1).", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.1", + "data": "ab--cd", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/62.json b/node_modules/idn-hostname/#/tests/0/62.json new file mode 100644 index 00000000..96f8516a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/62.json @@ -0,0 +1,6 @@ +{ + "description": "Labels with \"--\" in the third and fourth positions are ACE labels and must start with \"xn\" (RFC 5891 §4.2.1).", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.1", + "data": "xn--cd.ef--gh", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/63.json b/node_modules/idn-hostname/#/tests/0/63.json new file mode 100644 index 00000000..01ca77ad --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/63.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 1 — L-branch pass: label starts with L and contains L", + "data": "gk", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/64.json b/node_modules/idn-hostname/#/tests/0/64.json new file mode 100644 index 00000000..2f1262ca --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/64.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 1 — R-branch pass: label starts with R and contains R", + "data": "אב", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/65.json b/node_modules/idn-hostname/#/tests/0/65.json new file mode 100644 index 00000000..93583c70 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/65.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 1 — R-branch fail: contains R but doesn't start with R", + "data": "gא", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/66.json b/node_modules/idn-hostname/#/tests/0/66.json new file mode 100644 index 00000000..aa44b499 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/66.json @@ -0,0 +1,5 @@ +{ + "description": "BiDi rules not affecting label that does not contain RTL chars", + "data": "1host", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/67.json b/node_modules/idn-hostname/#/tests/0/67.json new file mode 100644 index 00000000..c7f30f14 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/67.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 2 — pass: starts R and uses allowed classes (R, EN)", + "data": "א1", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/68.json b/node_modules/idn-hostname/#/tests/0/68.json new file mode 100644 index 00000000..9b832ab3 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/68.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 2 — pass: starts AL and uses allowed classes (AL, AN)", + "data": "ا١", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/69.json b/node_modules/idn-hostname/#/tests/0/69.json new file mode 100644 index 00000000..b562344d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/69.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 2 — fail: starts R but contains L (disallowed)", + "data": "אg", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/7.json b/node_modules/idn-hostname/#/tests/0/7.json new file mode 100644 index 00000000..2597c58d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/7.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname ending with hyphen", + "data": "example-.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/70.json b/node_modules/idn-hostname/#/tests/0/70.json new file mode 100644 index 00000000..1edde449 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/70.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 2 — fail: starts AL but contains L (disallowed)", + "data": "اG", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/71.json b/node_modules/idn-hostname/#/tests/0/71.json new file mode 100644 index 00000000..1ccd8aac --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/71.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 3 — pass: starts R and last strong is EN", + "data": "א1", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/72.json b/node_modules/idn-hostname/#/tests/0/72.json new file mode 100644 index 00000000..73146711 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/72.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 3 — pass: starts AL and last strong is AN", + "data": "ا١", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/73.json b/node_modules/idn-hostname/#/tests/0/73.json new file mode 100644 index 00000000..bb52198a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/73.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 3 — fail: starts R but last strong is ES (not allowed)", + "data": "א-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/74.json b/node_modules/idn-hostname/#/tests/0/74.json new file mode 100644 index 00000000..a0e22808 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/74.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 3 — fail: starts AL but last strong is ES (not allowed)", + "data": "ا-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/75.json b/node_modules/idn-hostname/#/tests/0/75.json new file mode 100644 index 00000000..5e02851a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/75.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 4 violation: mixed AN with EN", + "data": "ثال١234ثال", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/76.json b/node_modules/idn-hostname/#/tests/0/76.json new file mode 100644 index 00000000..91f812a9 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/76.json @@ -0,0 +1,5 @@ +{ + "description": "AN only in label not affected by BiDi rules (no R or AL char present)", + "data": "١٢", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/77.json b/node_modules/idn-hostname/#/tests/0/77.json new file mode 100644 index 00000000..97337bec --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/77.json @@ -0,0 +1,5 @@ +{ + "description": "mixed EN and AN not affected by BiDi rules (no R or AL char present)", + "data": "1١", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/78.json b/node_modules/idn-hostname/#/tests/0/78.json new file mode 100644 index 00000000..3c478f2b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/78.json @@ -0,0 +1,5 @@ +{ + "description": "mixed AN and EN not affected by BiDi rules (no R or AL char present)", + "data": "١2", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/79.json b/node_modules/idn-hostname/#/tests/0/79.json new file mode 100644 index 00000000..09ad123f --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/79.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 5 — pass: starts L and contains EN (allowed)", + "data": "g1", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/8.json b/node_modules/idn-hostname/#/tests/0/8.json new file mode 100644 index 00000000..ad99f4c1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/8.json @@ -0,0 +1,5 @@ +{ + "description": "invalid tld starting with hyphen", + "data": "example.-com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/80.json b/node_modules/idn-hostname/#/tests/0/80.json new file mode 100644 index 00000000..d010e22e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/80.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 5 — pass: starts L and contains ES (allowed)", + "data": "a-b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/81.json b/node_modules/idn-hostname/#/tests/0/81.json new file mode 100644 index 00000000..6f5574cd --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/81.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 5 — fail: starts L but contains R (disallowed)", + "data": "gא", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/82.json b/node_modules/idn-hostname/#/tests/0/82.json new file mode 100644 index 00000000..94c29690 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/82.json @@ -0,0 +1,5 @@ +{ + "description": "mixed L with AN not affected by BiDi rules (no R or AL char present)", + "data": "g١", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/83.json b/node_modules/idn-hostname/#/tests/0/83.json new file mode 100644 index 00000000..ec5ac2c4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/83.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 6 — pass: starts L and ends with L", + "data": "gk", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/84.json b/node_modules/idn-hostname/#/tests/0/84.json new file mode 100644 index 00000000..bd4a1c9e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/84.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 6 — pass: starts L and ends with EN", + "data": "g1", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/85.json b/node_modules/idn-hostname/#/tests/0/85.json new file mode 100644 index 00000000..6aa832a5 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/85.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 6 — fail: starts L and ends with ET (not L or EN)", + "data": "g#", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/86.json b/node_modules/idn-hostname/#/tests/0/86.json new file mode 100644 index 00000000..c0388bb3 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/86.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 6 — fail: starts L and ends with ET (not L or EN)", + "data": "g%", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/87.json b/node_modules/idn-hostname/#/tests/0/87.json new file mode 100644 index 00000000..1dce58d4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/87.json @@ -0,0 +1,5 @@ +{ + "description": "single dot", + "data": ".", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/88.json b/node_modules/idn-hostname/#/tests/0/88.json new file mode 100644 index 00000000..6d1f4659 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/88.json @@ -0,0 +1,5 @@ +{ + "description": "single ideographic full stop", + "data": "。", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/89.json b/node_modules/idn-hostname/#/tests/0/89.json new file mode 100644 index 00000000..11f8e66a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/89.json @@ -0,0 +1,5 @@ +{ + "description": "single fullwidth full stop", + "data": ".", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/9.json b/node_modules/idn-hostname/#/tests/0/9.json new file mode 100644 index 00000000..979d1c53 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/9.json @@ -0,0 +1,5 @@ +{ + "description": "invalid tld ending with hyphen", + "data": "example.com-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/90.json b/node_modules/idn-hostname/#/tests/0/90.json new file mode 100644 index 00000000..c501b98b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/90.json @@ -0,0 +1,5 @@ +{ + "description": "single halfwidth ideographic full stop", + "data": "。", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/91.json b/node_modules/idn-hostname/#/tests/0/91.json new file mode 100644 index 00000000..324c76d1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/91.json @@ -0,0 +1,5 @@ +{ + "description": "dot as label separator", + "data": "a.b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/92.json b/node_modules/idn-hostname/#/tests/0/92.json new file mode 100644 index 00000000..1068e4cc --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/92.json @@ -0,0 +1,5 @@ +{ + "description": "ideographic full stop as label separator", + "data": "a。b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/93.json b/node_modules/idn-hostname/#/tests/0/93.json new file mode 100644 index 00000000..9c3421f6 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/93.json @@ -0,0 +1,5 @@ +{ + "description": "fullwidth full stop as label separator", + "data": "a.b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/94.json b/node_modules/idn-hostname/#/tests/0/94.json new file mode 100644 index 00000000..175759f8 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/94.json @@ -0,0 +1,5 @@ +{ + "description": "halfwidth ideographic full stop as label separator", + "data": "a。b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/95.json b/node_modules/idn-hostname/#/tests/0/95.json new file mode 100644 index 00000000..349f57f4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/95.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with surrounding 'l's as A-Label", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "xn--ll-0ea", + "valid": true +} diff --git a/node_modules/idn-hostname/#/tests/0/schema.json b/node_modules/idn-hostname/#/tests/0/schema.json new file mode 100644 index 00000000..c21edcbc --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/schema.json @@ -0,0 +1,4 @@ +{ + "description": "An internationalized hostname as defined by RFC5890, RFC5891, RFC5892, RFC5893, RFC3492 and UTS#46", + "$ref": "#/#/#/#/idn-hostname" +} diff --git a/node_modules/idn-hostname/LICENSE b/node_modules/idn-hostname/LICENSE new file mode 100644 index 00000000..5446d3a8 --- /dev/null +++ b/node_modules/idn-hostname/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 SorinGFS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/idn-hostname/idnaMappingTableCompact.json b/node_modules/idn-hostname/idnaMappingTableCompact.json new file mode 100644 index 00000000..a90116ea --- /dev/null +++ b/node_modules/idn-hostname/idnaMappingTableCompact.json @@ -0,0 +1 @@ +{"props":["valid","mapped","deviation","ignored","disallowed"],"viramas":[2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5909,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,68159,69702,69744,69759,69817,69939,69940,70080,70197,70378,70477,70722,70850,71103,71231,71350,71467,71737,71997,71998,72160,72244,72263,72345,72767,73028,73029,73111,73537,73538],"ranges":[[45,45,0],[48,57,0],[65,90,1],[97,122,0],[170,170,1],[173,173,3],[178,179,1],[181,181,1],[183,183,0],[185,186,1],[188,190,1],[192,214,1],[216,222,1],[223,223,2],[224,246,0],[248,255,0],[256,256,1],[257,257,0],[258,258,1],[259,259,0],[260,260,1],[261,261,0],[262,262,1],[263,263,0],[264,264,1],[265,265,0],[266,266,1],[267,267,0],[268,268,1],[269,269,0],[270,270,1],[271,271,0],[272,272,1],[273,273,0],[274,274,1],[275,275,0],[276,276,1],[277,277,0],[278,278,1],[279,279,0],[280,280,1],[281,281,0],[282,282,1],[283,283,0],[284,284,1],[285,285,0],[286,286,1],[287,287,0],[288,288,1],[289,289,0],[290,290,1],[291,291,0],[292,292,1],[293,293,0],[294,294,1],[295,295,0],[296,296,1],[297,297,0],[298,298,1],[299,299,0],[300,300,1],[301,301,0],[302,302,1],[303,303,0],[304,304,1],[305,305,0],[306,306,1],[308,308,1],[309,309,0],[310,310,1],[311,312,0],[313,313,1],[314,314,0],[315,315,1],[316,316,0],[317,317,1],[318,318,0],[319,319,1],[321,321,1],[322,322,0],[323,323,1],[324,324,0],[325,325,1],[326,326,0],[327,327,1],[328,328,0],[329,330,1],[331,331,0],[332,332,1],[333,333,0],[334,334,1],[335,335,0],[336,336,1],[337,337,0],[338,338,1],[339,339,0],[340,340,1],[341,341,0],[342,342,1],[343,343,0],[344,344,1],[345,345,0],[346,346,1],[347,347,0],[348,348,1],[349,349,0],[350,350,1],[351,351,0],[352,352,1],[353,353,0],[354,354,1],[355,355,0],[356,356,1],[357,357,0],[358,358,1],[359,359,0],[360,360,1],[361,361,0],[362,362,1],[363,363,0],[364,364,1],[365,365,0],[366,366,1],[367,367,0],[368,368,1],[369,369,0],[370,370,1],[371,371,0],[372,372,1],[373,373,0],[374,374,1],[375,375,0],[376,377,1],[378,378,0],[379,379,1],[380,380,0],[381,381,1],[382,382,0],[383,383,1],[384,384,0],[385,386,1],[387,387,0],[388,388,1],[389,389,0],[390,391,1],[392,392,0],[393,395,1],[396,397,0],[398,401,1],[402,402,0],[403,404,1],[405,405,0],[406,408,1],[409,411,0],[412,413,1],[414,414,0],[415,416,1],[417,417,0],[418,418,1],[419,419,0],[420,420,1],[421,421,0],[422,423,1],[424,424,0],[425,425,1],[426,427,0],[428,428,1],[429,429,0],[430,431,1],[432,432,0],[433,435,1],[436,436,0],[437,437,1],[438,438,0],[439,440,1],[441,443,0],[444,444,1],[445,451,0],[452,452,1],[455,455,1],[458,458,1],[461,461,1],[462,462,0],[463,463,1],[464,464,0],[465,465,1],[466,466,0],[467,467,1],[468,468,0],[469,469,1],[470,470,0],[471,471,1],[472,472,0],[473,473,1],[474,474,0],[475,475,1],[476,477,0],[478,478,1],[479,479,0],[480,480,1],[481,481,0],[482,482,1],[483,483,0],[484,484,1],[485,485,0],[486,486,1],[487,487,0],[488,488,1],[489,489,0],[490,490,1],[491,491,0],[492,492,1],[493,493,0],[494,494,1],[495,496,0],[497,497,1],[500,500,1],[501,501,0],[502,504,1],[505,505,0],[506,506,1],[507,507,0],[508,508,1],[509,509,0],[510,510,1],[511,511,0],[512,512,1],[513,513,0],[514,514,1],[515,515,0],[516,516,1],[517,517,0],[518,518,1],[519,519,0],[520,520,1],[521,521,0],[522,522,1],[523,523,0],[524,524,1],[525,525,0],[526,526,1],[527,527,0],[528,528,1],[529,529,0],[530,530,1],[531,531,0],[532,532,1],[533,533,0],[534,534,1],[535,535,0],[536,536,1],[537,537,0],[538,538,1],[539,539,0],[540,540,1],[541,541,0],[542,542,1],[543,543,0],[544,544,1],[545,545,0],[546,546,1],[547,547,0],[548,548,1],[549,549,0],[550,550,1],[551,551,0],[552,552,1],[553,553,0],[554,554,1],[555,555,0],[556,556,1],[557,557,0],[558,558,1],[559,559,0],[560,560,1],[561,561,0],[562,562,1],[563,569,0],[570,571,1],[572,572,0],[573,574,1],[575,576,0],[577,577,1],[578,578,0],[579,582,1],[583,583,0],[584,584,1],[585,585,0],[586,586,1],[587,587,0],[588,588,1],[589,589,0],[590,590,1],[591,687,0],[688,696,1],[697,705,0],[710,721,0],[736,740,1],[748,748,0],[750,750,0],[768,831,0],[832,833,1],[834,834,0],[835,837,1],[838,846,0],[847,847,3],[848,879,0],[880,880,1],[881,881,0],[882,882,1],[883,883,0],[884,884,1],[885,885,0],[886,886,1],[887,887,0],[891,893,0],[895,895,1],[902,906,1],[908,908,1],[910,911,1],[912,912,0],[913,929,1],[931,939,1],[940,961,0],[962,962,2],[963,974,0],[975,982,1],[983,983,0],[984,984,1],[985,985,0],[986,986,1],[987,987,0],[988,988,1],[989,989,0],[990,990,1],[991,991,0],[992,992,1],[993,993,0],[994,994,1],[995,995,0],[996,996,1],[997,997,0],[998,998,1],[999,999,0],[1000,1000,1],[1001,1001,0],[1002,1002,1],[1003,1003,0],[1004,1004,1],[1005,1005,0],[1006,1006,1],[1007,1007,0],[1008,1010,1],[1011,1011,0],[1012,1013,1],[1015,1015,1],[1016,1016,0],[1017,1018,1],[1019,1020,0],[1021,1071,1],[1072,1119,0],[1120,1120,1],[1121,1121,0],[1122,1122,1],[1123,1123,0],[1124,1124,1],[1125,1125,0],[1126,1126,1],[1127,1127,0],[1128,1128,1],[1129,1129,0],[1130,1130,1],[1131,1131,0],[1132,1132,1],[1133,1133,0],[1134,1134,1],[1135,1135,0],[1136,1136,1],[1137,1137,0],[1138,1138,1],[1139,1139,0],[1140,1140,1],[1141,1141,0],[1142,1142,1],[1143,1143,0],[1144,1144,1],[1145,1145,0],[1146,1146,1],[1147,1147,0],[1148,1148,1],[1149,1149,0],[1150,1150,1],[1151,1151,0],[1152,1152,1],[1153,1153,0],[1155,1159,0],[1162,1162,1],[1163,1163,0],[1164,1164,1],[1165,1165,0],[1166,1166,1],[1167,1167,0],[1168,1168,1],[1169,1169,0],[1170,1170,1],[1171,1171,0],[1172,1172,1],[1173,1173,0],[1174,1174,1],[1175,1175,0],[1176,1176,1],[1177,1177,0],[1178,1178,1],[1179,1179,0],[1180,1180,1],[1181,1181,0],[1182,1182,1],[1183,1183,0],[1184,1184,1],[1185,1185,0],[1186,1186,1],[1187,1187,0],[1188,1188,1],[1189,1189,0],[1190,1190,1],[1191,1191,0],[1192,1192,1],[1193,1193,0],[1194,1194,1],[1195,1195,0],[1196,1196,1],[1197,1197,0],[1198,1198,1],[1199,1199,0],[1200,1200,1],[1201,1201,0],[1202,1202,1],[1203,1203,0],[1204,1204,1],[1205,1205,0],[1206,1206,1],[1207,1207,0],[1208,1208,1],[1209,1209,0],[1210,1210,1],[1211,1211,0],[1212,1212,1],[1213,1213,0],[1214,1214,1],[1215,1215,0],[1217,1217,1],[1218,1218,0],[1219,1219,1],[1220,1220,0],[1221,1221,1],[1222,1222,0],[1223,1223,1],[1224,1224,0],[1225,1225,1],[1226,1226,0],[1227,1227,1],[1228,1228,0],[1229,1229,1],[1230,1231,0],[1232,1232,1],[1233,1233,0],[1234,1234,1],[1235,1235,0],[1236,1236,1],[1237,1237,0],[1238,1238,1],[1239,1239,0],[1240,1240,1],[1241,1241,0],[1242,1242,1],[1243,1243,0],[1244,1244,1],[1245,1245,0],[1246,1246,1],[1247,1247,0],[1248,1248,1],[1249,1249,0],[1250,1250,1],[1251,1251,0],[1252,1252,1],[1253,1253,0],[1254,1254,1],[1255,1255,0],[1256,1256,1],[1257,1257,0],[1258,1258,1],[1259,1259,0],[1260,1260,1],[1261,1261,0],[1262,1262,1],[1263,1263,0],[1264,1264,1],[1265,1265,0],[1266,1266,1],[1267,1267,0],[1268,1268,1],[1269,1269,0],[1270,1270,1],[1271,1271,0],[1272,1272,1],[1273,1273,0],[1274,1274,1],[1275,1275,0],[1276,1276,1],[1277,1277,0],[1278,1278,1],[1279,1279,0],[1280,1280,1],[1281,1281,0],[1282,1282,1],[1283,1283,0],[1284,1284,1],[1285,1285,0],[1286,1286,1],[1287,1287,0],[1288,1288,1],[1289,1289,0],[1290,1290,1],[1291,1291,0],[1292,1292,1],[1293,1293,0],[1294,1294,1],[1295,1295,0],[1296,1296,1],[1297,1297,0],[1298,1298,1],[1299,1299,0],[1300,1300,1],[1301,1301,0],[1302,1302,1],[1303,1303,0],[1304,1304,1],[1305,1305,0],[1306,1306,1],[1307,1307,0],[1308,1308,1],[1309,1309,0],[1310,1310,1],[1311,1311,0],[1312,1312,1],[1313,1313,0],[1314,1314,1],[1315,1315,0],[1316,1316,1],[1317,1317,0],[1318,1318,1],[1319,1319,0],[1320,1320,1],[1321,1321,0],[1322,1322,1],[1323,1323,0],[1324,1324,1],[1325,1325,0],[1326,1326,1],[1327,1327,0],[1329,1366,1],[1369,1369,0],[1376,1414,0],[1415,1415,1],[1416,1416,0],[1425,1469,0],[1471,1471,0],[1473,1474,0],[1476,1477,0],[1479,1479,0],[1488,1514,0],[1519,1524,0],[1552,1562,0],[1568,1599,0],[1601,1641,0],[1646,1652,0],[1653,1656,1],[1657,1747,0],[1749,1756,0],[1759,1768,0],[1770,1791,0],[1808,1866,0],[1869,1969,0],[1984,2037,0],[2045,2045,0],[2048,2093,0],[2112,2139,0],[2144,2154,0],[2160,2183,0],[2185,2190,0],[2200,2273,0],[2275,2391,0],[2392,2399,1],[2400,2403,0],[2406,2415,0],[2417,2435,0],[2437,2444,0],[2447,2448,0],[2451,2472,0],[2474,2480,0],[2482,2482,0],[2486,2489,0],[2492,2500,0],[2503,2504,0],[2507,2510,0],[2519,2519,0],[2524,2525,1],[2527,2527,1],[2528,2531,0],[2534,2545,0],[2556,2556,0],[2558,2558,0],[2561,2563,0],[2565,2570,0],[2575,2576,0],[2579,2600,0],[2602,2608,0],[2610,2610,0],[2611,2611,1],[2613,2613,0],[2614,2614,1],[2616,2617,0],[2620,2620,0],[2622,2626,0],[2631,2632,0],[2635,2637,0],[2641,2641,0],[2649,2651,1],[2652,2652,0],[2654,2654,1],[2662,2677,0],[2689,2691,0],[2693,2701,0],[2703,2705,0],[2707,2728,0],[2730,2736,0],[2738,2739,0],[2741,2745,0],[2748,2757,0],[2759,2761,0],[2763,2765,0],[2768,2768,0],[2784,2787,0],[2790,2799,0],[2809,2815,0],[2817,2819,0],[2821,2828,0],[2831,2832,0],[2835,2856,0],[2858,2864,0],[2866,2867,0],[2869,2873,0],[2876,2884,0],[2887,2888,0],[2891,2893,0],[2901,2903,0],[2908,2909,1],[2911,2915,0],[2918,2927,0],[2929,2929,0],[2946,2947,0],[2949,2954,0],[2958,2960,0],[2962,2965,0],[2969,2970,0],[2972,2972,0],[2974,2975,0],[2979,2980,0],[2984,2986,0],[2990,3001,0],[3006,3010,0],[3014,3016,0],[3018,3021,0],[3024,3024,0],[3031,3031,0],[3046,3055,0],[3072,3084,0],[3086,3088,0],[3090,3112,0],[3114,3129,0],[3132,3140,0],[3142,3144,0],[3146,3149,0],[3157,3158,0],[3160,3162,0],[3165,3165,0],[3168,3171,0],[3174,3183,0],[3200,3203,0],[3205,3212,0],[3214,3216,0],[3218,3240,0],[3242,3251,0],[3253,3257,0],[3260,3268,0],[3270,3272,0],[3274,3277,0],[3285,3286,0],[3293,3294,0],[3296,3299,0],[3302,3311,0],[3313,3315,0],[3328,3340,0],[3342,3344,0],[3346,3396,0],[3398,3400,0],[3402,3406,0],[3412,3415,0],[3423,3427,0],[3430,3439,0],[3450,3455,0],[3457,3459,0],[3461,3478,0],[3482,3505,0],[3507,3515,0],[3517,3517,0],[3520,3526,0],[3530,3530,0],[3535,3540,0],[3542,3542,0],[3544,3551,0],[3558,3567,0],[3570,3571,0],[3585,3634,0],[3635,3635,1],[3636,3642,0],[3648,3662,0],[3664,3673,0],[3713,3714,0],[3716,3716,0],[3718,3722,0],[3724,3747,0],[3749,3749,0],[3751,3762,0],[3763,3763,1],[3764,3773,0],[3776,3780,0],[3782,3782,0],[3784,3790,0],[3792,3801,0],[3804,3805,1],[3806,3807,0],[3840,3840,0],[3851,3851,0],[3852,3852,1],[3864,3865,0],[3872,3881,0],[3893,3893,0],[3895,3895,0],[3897,3897,0],[3902,3906,0],[3907,3907,1],[3908,3911,0],[3913,3916,0],[3917,3917,1],[3918,3921,0],[3922,3922,1],[3923,3926,0],[3927,3927,1],[3928,3931,0],[3932,3932,1],[3933,3944,0],[3945,3945,1],[3946,3948,0],[3953,3954,0],[3955,3955,1],[3956,3956,0],[3957,3961,1],[3962,3968,0],[3969,3969,1],[3970,3972,0],[3974,3986,0],[3987,3987,1],[3988,3991,0],[3993,3996,0],[3997,3997,1],[3998,4001,0],[4002,4002,1],[4003,4006,0],[4007,4007,1],[4008,4011,0],[4012,4012,1],[4013,4024,0],[4025,4025,1],[4026,4028,0],[4038,4038,0],[4096,4169,0],[4176,4253,0],[4295,4295,1],[4301,4301,1],[4304,4346,0],[4348,4348,1],[4349,4351,0],[4608,4680,0],[4682,4685,0],[4688,4694,0],[4696,4696,0],[4698,4701,0],[4704,4744,0],[4746,4749,0],[4752,4784,0],[4786,4789,0],[4792,4798,0],[4800,4800,0],[4802,4805,0],[4808,4822,0],[4824,4880,0],[4882,4885,0],[4888,4954,0],[4957,4959,0],[4992,5007,0],[5024,5109,0],[5112,5117,1],[5121,5740,0],[5743,5759,0],[5761,5786,0],[5792,5866,0],[5873,5880,0],[5888,5909,0],[5919,5940,0],[5952,5971,0],[5984,5996,0],[5998,6000,0],[6002,6003,0],[6016,6067,0],[6070,6099,0],[6103,6103,0],[6108,6109,0],[6112,6121,0],[6155,6155,3],[6159,6159,3],[6160,6169,0],[6176,6264,0],[6272,6314,0],[6320,6389,0],[6400,6430,0],[6432,6443,0],[6448,6459,0],[6470,6509,0],[6512,6516,0],[6528,6571,0],[6576,6601,0],[6608,6617,0],[6656,6683,0],[6688,6750,0],[6752,6780,0],[6783,6793,0],[6800,6809,0],[6823,6823,0],[6832,6845,0],[6847,6862,0],[6912,6988,0],[6992,7001,0],[7019,7027,0],[7040,7155,0],[7168,7223,0],[7232,7241,0],[7245,7293,0],[7296,7300,1],[7302,7304,1],[7312,7354,1],[7357,7359,1],[7376,7378,0],[7380,7418,0],[7424,7467,0],[7468,7470,1],[7471,7471,0],[7472,7482,1],[7483,7483,0],[7484,7501,1],[7502,7502,0],[7503,7530,1],[7531,7543,0],[7544,7544,1],[7545,7578,0],[7579,7615,1],[7616,7679,0],[7680,7680,1],[7681,7681,0],[7682,7682,1],[7683,7683,0],[7684,7684,1],[7685,7685,0],[7686,7686,1],[7687,7687,0],[7688,7688,1],[7689,7689,0],[7690,7690,1],[7691,7691,0],[7692,7692,1],[7693,7693,0],[7694,7694,1],[7695,7695,0],[7696,7696,1],[7697,7697,0],[7698,7698,1],[7699,7699,0],[7700,7700,1],[7701,7701,0],[7702,7702,1],[7703,7703,0],[7704,7704,1],[7705,7705,0],[7706,7706,1],[7707,7707,0],[7708,7708,1],[7709,7709,0],[7710,7710,1],[7711,7711,0],[7712,7712,1],[7713,7713,0],[7714,7714,1],[7715,7715,0],[7716,7716,1],[7717,7717,0],[7718,7718,1],[7719,7719,0],[7720,7720,1],[7721,7721,0],[7722,7722,1],[7723,7723,0],[7724,7724,1],[7725,7725,0],[7726,7726,1],[7727,7727,0],[7728,7728,1],[7729,7729,0],[7730,7730,1],[7731,7731,0],[7732,7732,1],[7733,7733,0],[7734,7734,1],[7735,7735,0],[7736,7736,1],[7737,7737,0],[7738,7738,1],[7739,7739,0],[7740,7740,1],[7741,7741,0],[7742,7742,1],[7743,7743,0],[7744,7744,1],[7745,7745,0],[7746,7746,1],[7747,7747,0],[7748,7748,1],[7749,7749,0],[7750,7750,1],[7751,7751,0],[7752,7752,1],[7753,7753,0],[7754,7754,1],[7755,7755,0],[7756,7756,1],[7757,7757,0],[7758,7758,1],[7759,7759,0],[7760,7760,1],[7761,7761,0],[7762,7762,1],[7763,7763,0],[7764,7764,1],[7765,7765,0],[7766,7766,1],[7767,7767,0],[7768,7768,1],[7769,7769,0],[7770,7770,1],[7771,7771,0],[7772,7772,1],[7773,7773,0],[7774,7774,1],[7775,7775,0],[7776,7776,1],[7777,7777,0],[7778,7778,1],[7779,7779,0],[7780,7780,1],[7781,7781,0],[7782,7782,1],[7783,7783,0],[7784,7784,1],[7785,7785,0],[7786,7786,1],[7787,7787,0],[7788,7788,1],[7789,7789,0],[7790,7790,1],[7791,7791,0],[7792,7792,1],[7793,7793,0],[7794,7794,1],[7795,7795,0],[7796,7796,1],[7797,7797,0],[7798,7798,1],[7799,7799,0],[7800,7800,1],[7801,7801,0],[7802,7802,1],[7803,7803,0],[7804,7804,1],[7805,7805,0],[7806,7806,1],[7807,7807,0],[7808,7808,1],[7809,7809,0],[7810,7810,1],[7811,7811,0],[7812,7812,1],[7813,7813,0],[7814,7814,1],[7815,7815,0],[7816,7816,1],[7817,7817,0],[7818,7818,1],[7819,7819,0],[7820,7820,1],[7821,7821,0],[7822,7822,1],[7823,7823,0],[7824,7824,1],[7825,7825,0],[7826,7826,1],[7827,7827,0],[7828,7828,1],[7829,7833,0],[7834,7835,1],[7836,7837,0],[7838,7838,1],[7839,7839,0],[7840,7840,1],[7841,7841,0],[7842,7842,1],[7843,7843,0],[7844,7844,1],[7845,7845,0],[7846,7846,1],[7847,7847,0],[7848,7848,1],[7849,7849,0],[7850,7850,1],[7851,7851,0],[7852,7852,1],[7853,7853,0],[7854,7854,1],[7855,7855,0],[7856,7856,1],[7857,7857,0],[7858,7858,1],[7859,7859,0],[7860,7860,1],[7861,7861,0],[7862,7862,1],[7863,7863,0],[7864,7864,1],[7865,7865,0],[7866,7866,1],[7867,7867,0],[7868,7868,1],[7869,7869,0],[7870,7870,1],[7871,7871,0],[7872,7872,1],[7873,7873,0],[7874,7874,1],[7875,7875,0],[7876,7876,1],[7877,7877,0],[7878,7878,1],[7879,7879,0],[7880,7880,1],[7881,7881,0],[7882,7882,1],[7883,7883,0],[7884,7884,1],[7885,7885,0],[7886,7886,1],[7887,7887,0],[7888,7888,1],[7889,7889,0],[7890,7890,1],[7891,7891,0],[7892,7892,1],[7893,7893,0],[7894,7894,1],[7895,7895,0],[7896,7896,1],[7897,7897,0],[7898,7898,1],[7899,7899,0],[7900,7900,1],[7901,7901,0],[7902,7902,1],[7903,7903,0],[7904,7904,1],[7905,7905,0],[7906,7906,1],[7907,7907,0],[7908,7908,1],[7909,7909,0],[7910,7910,1],[7911,7911,0],[7912,7912,1],[7913,7913,0],[7914,7914,1],[7915,7915,0],[7916,7916,1],[7917,7917,0],[7918,7918,1],[7919,7919,0],[7920,7920,1],[7921,7921,0],[7922,7922,1],[7923,7923,0],[7924,7924,1],[7925,7925,0],[7926,7926,1],[7927,7927,0],[7928,7928,1],[7929,7929,0],[7930,7930,1],[7931,7931,0],[7932,7932,1],[7933,7933,0],[7934,7934,1],[7935,7943,0],[7944,7951,1],[7952,7957,0],[7960,7965,1],[7968,7975,0],[7976,7983,1],[7984,7991,0],[7992,7999,1],[8000,8005,0],[8008,8013,1],[8016,8023,0],[8025,8025,1],[8027,8027,1],[8029,8029,1],[8031,8031,1],[8032,8039,0],[8040,8047,1],[8048,8048,0],[8049,8049,1],[8050,8050,0],[8051,8051,1],[8052,8052,0],[8053,8053,1],[8054,8054,0],[8055,8055,1],[8056,8056,0],[8057,8057,1],[8058,8058,0],[8059,8059,1],[8060,8060,0],[8061,8061,1],[8064,8111,1],[8112,8113,0],[8114,8116,1],[8118,8118,0],[8119,8124,1],[8126,8126,1],[8130,8132,1],[8134,8134,0],[8135,8140,1],[8144,8146,0],[8147,8147,1],[8150,8151,0],[8152,8155,1],[8160,8162,0],[8163,8163,1],[8164,8167,0],[8168,8172,1],[8178,8180,1],[8182,8182,0],[8183,8188,1],[8203,8203,3],[8204,8204,2],[8205,8205,0],[8209,8209,1],[8243,8244,1],[8246,8247,1],[8279,8279,1],[8288,8288,3],[8292,8292,3],[8304,8305,1],[8308,8313,1],[8315,8315,1],[8319,8329,1],[8331,8331,1],[8336,8348,1],[8360,8360,1],[8450,8451,1],[8455,8455,1],[8457,8459,1],[8463,8464,1],[8466,8466,1],[8469,8470,1],[8473,8475,1],[8480,8482,1],[8484,8484,1],[8486,8486,1],[8488,8488,1],[8490,8493,1],[8495,8495,1],[8497,8497,1],[8499,8505,1],[8507,8509,1],[8511,8512,1],[8517,8517,1],[8519,8521,1],[8526,8526,0],[8528,8575,1],[8580,8580,0],[8585,8585,1],[8748,8749,1],[8751,8752,1],[9001,9002,1],[9312,9331,1],[9398,9450,1],[10764,10764,1],[10972,10972,1],[11264,11311,1],[11312,11359,0],[11360,11360,1],[11361,11361,0],[11362,11364,1],[11365,11366,0],[11367,11367,1],[11368,11368,0],[11369,11369,1],[11370,11370,0],[11371,11371,1],[11372,11372,0],[11373,11376,1],[11377,11377,0],[11378,11378,1],[11379,11380,0],[11381,11381,1],[11382,11387,0],[11388,11392,1],[11393,11393,0],[11394,11394,1],[11395,11395,0],[11396,11396,1],[11397,11397,0],[11398,11398,1],[11399,11399,0],[11400,11400,1],[11401,11401,0],[11402,11402,1],[11403,11403,0],[11404,11404,1],[11405,11405,0],[11406,11406,1],[11407,11407,0],[11408,11408,1],[11409,11409,0],[11410,11410,1],[11411,11411,0],[11412,11412,1],[11413,11413,0],[11414,11414,1],[11415,11415,0],[11416,11416,1],[11417,11417,0],[11418,11418,1],[11419,11419,0],[11420,11420,1],[11421,11421,0],[11422,11422,1],[11423,11423,0],[11424,11424,1],[11425,11425,0],[11426,11426,1],[11427,11427,0],[11428,11428,1],[11429,11429,0],[11430,11430,1],[11431,11431,0],[11432,11432,1],[11433,11433,0],[11434,11434,1],[11435,11435,0],[11436,11436,1],[11437,11437,0],[11438,11438,1],[11439,11439,0],[11440,11440,1],[11441,11441,0],[11442,11442,1],[11443,11443,0],[11444,11444,1],[11445,11445,0],[11446,11446,1],[11447,11447,0],[11448,11448,1],[11449,11449,0],[11450,11450,1],[11451,11451,0],[11452,11452,1],[11453,11453,0],[11454,11454,1],[11455,11455,0],[11456,11456,1],[11457,11457,0],[11458,11458,1],[11459,11459,0],[11460,11460,1],[11461,11461,0],[11462,11462,1],[11463,11463,0],[11464,11464,1],[11465,11465,0],[11466,11466,1],[11467,11467,0],[11468,11468,1],[11469,11469,0],[11470,11470,1],[11471,11471,0],[11472,11472,1],[11473,11473,0],[11474,11474,1],[11475,11475,0],[11476,11476,1],[11477,11477,0],[11478,11478,1],[11479,11479,0],[11480,11480,1],[11481,11481,0],[11482,11482,1],[11483,11483,0],[11484,11484,1],[11485,11485,0],[11486,11486,1],[11487,11487,0],[11488,11488,1],[11489,11489,0],[11490,11490,1],[11491,11492,0],[11499,11499,1],[11500,11500,0],[11501,11501,1],[11502,11505,0],[11506,11506,1],[11507,11507,0],[11520,11557,0],[11559,11559,0],[11565,11565,0],[11568,11623,0],[11631,11631,1],[11647,11670,0],[11680,11686,0],[11688,11694,0],[11696,11702,0],[11704,11710,0],[11712,11718,0],[11720,11726,0],[11728,11734,0],[11736,11742,0],[11744,11775,0],[11823,11823,0],[11935,11935,1],[12019,12019,1],[12032,12245,1],[12290,12290,1],[12293,12295,0],[12330,12333,0],[12342,12342,1],[12344,12346,1],[12348,12348,0],[12353,12438,0],[12441,12442,0],[12445,12446,0],[12447,12447,1],[12449,12542,0],[12543,12543,1],[12549,12591,0],[12593,12643,1],[12645,12686,1],[12690,12703,1],[12704,12735,0],[12784,12799,0],[12868,12871,1],[12880,12926,1],[12928,13249,1],[13251,13254,1],[13256,13271,1],[13273,13311,1],[13312,19903,0],[19968,42124,0],[42192,42237,0],[42240,42508,0],[42512,42539,0],[42560,42560,1],[42561,42561,0],[42562,42562,1],[42563,42563,0],[42564,42564,1],[42565,42565,0],[42566,42566,1],[42567,42567,0],[42568,42568,1],[42569,42569,0],[42570,42570,1],[42571,42571,0],[42572,42572,1],[42573,42573,0],[42574,42574,1],[42575,42575,0],[42576,42576,1],[42577,42577,0],[42578,42578,1],[42579,42579,0],[42580,42580,1],[42581,42581,0],[42582,42582,1],[42583,42583,0],[42584,42584,1],[42585,42585,0],[42586,42586,1],[42587,42587,0],[42588,42588,1],[42589,42589,0],[42590,42590,1],[42591,42591,0],[42592,42592,1],[42593,42593,0],[42594,42594,1],[42595,42595,0],[42596,42596,1],[42597,42597,0],[42598,42598,1],[42599,42599,0],[42600,42600,1],[42601,42601,0],[42602,42602,1],[42603,42603,0],[42604,42604,1],[42605,42607,0],[42612,42621,0],[42623,42623,0],[42624,42624,1],[42625,42625,0],[42626,42626,1],[42627,42627,0],[42628,42628,1],[42629,42629,0],[42630,42630,1],[42631,42631,0],[42632,42632,1],[42633,42633,0],[42634,42634,1],[42635,42635,0],[42636,42636,1],[42637,42637,0],[42638,42638,1],[42639,42639,0],[42640,42640,1],[42641,42641,0],[42642,42642,1],[42643,42643,0],[42644,42644,1],[42645,42645,0],[42646,42646,1],[42647,42647,0],[42648,42648,1],[42649,42649,0],[42650,42650,1],[42651,42651,0],[42652,42653,1],[42654,42725,0],[42736,42737,0],[42775,42783,0],[42786,42786,1],[42787,42787,0],[42788,42788,1],[42789,42789,0],[42790,42790,1],[42791,42791,0],[42792,42792,1],[42793,42793,0],[42794,42794,1],[42795,42795,0],[42796,42796,1],[42797,42797,0],[42798,42798,1],[42799,42801,0],[42802,42802,1],[42803,42803,0],[42804,42804,1],[42805,42805,0],[42806,42806,1],[42807,42807,0],[42808,42808,1],[42809,42809,0],[42810,42810,1],[42811,42811,0],[42812,42812,1],[42813,42813,0],[42814,42814,1],[42815,42815,0],[42816,42816,1],[42817,42817,0],[42818,42818,1],[42819,42819,0],[42820,42820,1],[42821,42821,0],[42822,42822,1],[42823,42823,0],[42824,42824,1],[42825,42825,0],[42826,42826,1],[42827,42827,0],[42828,42828,1],[42829,42829,0],[42830,42830,1],[42831,42831,0],[42832,42832,1],[42833,42833,0],[42834,42834,1],[42835,42835,0],[42836,42836,1],[42837,42837,0],[42838,42838,1],[42839,42839,0],[42840,42840,1],[42841,42841,0],[42842,42842,1],[42843,42843,0],[42844,42844,1],[42845,42845,0],[42846,42846,1],[42847,42847,0],[42848,42848,1],[42849,42849,0],[42850,42850,1],[42851,42851,0],[42852,42852,1],[42853,42853,0],[42854,42854,1],[42855,42855,0],[42856,42856,1],[42857,42857,0],[42858,42858,1],[42859,42859,0],[42860,42860,1],[42861,42861,0],[42862,42862,1],[42863,42863,0],[42864,42864,1],[42865,42872,0],[42873,42873,1],[42874,42874,0],[42875,42875,1],[42876,42876,0],[42877,42878,1],[42879,42879,0],[42880,42880,1],[42881,42881,0],[42882,42882,1],[42883,42883,0],[42884,42884,1],[42885,42885,0],[42886,42886,1],[42887,42888,0],[42891,42891,1],[42892,42892,0],[42893,42893,1],[42894,42895,0],[42896,42896,1],[42897,42897,0],[42898,42898,1],[42899,42901,0],[42902,42902,1],[42903,42903,0],[42904,42904,1],[42905,42905,0],[42906,42906,1],[42907,42907,0],[42908,42908,1],[42909,42909,0],[42910,42910,1],[42911,42911,0],[42912,42912,1],[42913,42913,0],[42914,42914,1],[42915,42915,0],[42916,42916,1],[42917,42917,0],[42918,42918,1],[42919,42919,0],[42920,42920,1],[42921,42921,0],[42922,42926,1],[42927,42927,0],[42928,42932,1],[42933,42933,0],[42934,42934,1],[42935,42935,0],[42936,42936,1],[42937,42937,0],[42938,42938,1],[42939,42939,0],[42940,42940,1],[42941,42941,0],[42942,42942,1],[42943,42943,0],[42944,42944,1],[42945,42945,0],[42946,42946,1],[42947,42947,0],[42948,42951,1],[42952,42952,0],[42953,42953,1],[42954,42954,0],[42960,42960,1],[42961,42961,0],[42963,42963,0],[42965,42965,0],[42966,42966,1],[42967,42967,0],[42968,42968,1],[42969,42969,0],[42994,42997,1],[42998,42999,0],[43000,43001,1],[43002,43047,0],[43052,43052,0],[43072,43123,0],[43136,43205,0],[43216,43225,0],[43232,43255,0],[43259,43259,0],[43261,43309,0],[43312,43347,0],[43392,43456,0],[43471,43481,0],[43488,43518,0],[43520,43574,0],[43584,43597,0],[43600,43609,0],[43616,43638,0],[43642,43714,0],[43739,43741,0],[43744,43759,0],[43762,43766,0],[43777,43782,0],[43785,43790,0],[43793,43798,0],[43808,43814,0],[43816,43822,0],[43824,43866,0],[43868,43871,1],[43872,43880,0],[43881,43881,1],[43888,43967,1],[43968,44010,0],[44012,44013,0],[44016,44025,0],[44032,55203,0],[63744,63751,1],[63753,64013,1],[64014,64015,0],[64016,64016,1],[64017,64017,0],[64018,64018,1],[64019,64020,0],[64021,64030,1],[64031,64031,0],[64032,64032,1],[64033,64033,0],[64034,64034,1],[64035,64036,0],[64037,64038,1],[64039,64041,0],[64042,64093,1],[64095,64109,1],[64112,64217,1],[64256,64261,1],[64275,64279,1],[64285,64285,1],[64286,64286,0],[64287,64296,1],[64298,64310,1],[64312,64316,1],[64318,64318,1],[64320,64321,1],[64323,64324,1],[64326,64336,1],[64338,64338,1],[64342,64342,1],[64346,64346,1],[64350,64350,1],[64354,64354,1],[64358,64358,1],[64362,64362,1],[64366,64366,1],[64370,64370,1],[64374,64374,1],[64378,64378,1],[64382,64382,1],[64386,64386,1],[64388,64388,1],[64390,64390,1],[64392,64392,1],[64394,64394,1],[64396,64396,1],[64398,64398,1],[64402,64402,1],[64406,64406,1],[64410,64410,1],[64414,64414,1],[64416,64416,1],[64420,64420,1],[64422,64422,1],[64426,64426,1],[64430,64430,1],[64432,64432,1],[64467,64467,1],[64471,64471,1],[64473,64473,1],[64475,64475,1],[64477,64478,1],[64480,64480,1],[64482,64482,1],[64484,64484,1],[64488,64488,1],[64490,64490,1],[64492,64492,1],[64494,64494,1],[64496,64496,1],[64498,64498,1],[64500,64500,1],[64502,64502,1],[64505,64505,1],[64508,64508,1],[64512,64605,1],[64612,64828,1],[64848,64849,1],[64851,64856,1],[64858,64863,1],[64865,64866,1],[64868,64868,1],[64870,64871,1],[64873,64874,1],[64876,64876,1],[64878,64879,1],[64881,64881,1],[64883,64886,1],[64888,64892,1],[64894,64899,1],[64901,64901,1],[64903,64903,1],[64905,64911,1],[64914,64919,1],[64921,64924,1],[64926,64967,1],[65008,65017,1],[65020,65020,1],[65024,65024,3],[65041,65041,1],[65047,65048,1],[65056,65071,0],[65073,65074,1],[65081,65092,1],[65105,65105,1],[65112,65112,1],[65117,65118,1],[65123,65123,1],[65137,65137,1],[65139,65139,0],[65143,65143,1],[65145,65145,1],[65147,65147,1],[65149,65149,1],[65151,65153,1],[65155,65155,1],[65157,65157,1],[65159,65159,1],[65161,65161,1],[65165,65165,1],[65167,65167,1],[65171,65171,1],[65173,65173,1],[65177,65177,1],[65181,65181,1],[65185,65185,1],[65189,65189,1],[65193,65193,1],[65195,65195,1],[65197,65197,1],[65199,65199,1],[65201,65201,1],[65205,65205,1],[65209,65209,1],[65213,65213,1],[65217,65217,1],[65221,65221,1],[65225,65225,1],[65229,65229,1],[65233,65233,1],[65237,65237,1],[65241,65241,1],[65245,65245,1],[65249,65249,1],[65253,65253,1],[65257,65257,1],[65261,65261,1],[65263,65263,1],[65265,65265,1],[65269,65269,1],[65271,65271,1],[65273,65273,1],[65275,65275,1],[65279,65279,3],[65293,65294,1],[65296,65305,1],[65313,65338,1],[65345,65370,1],[65375,65439,1],[65441,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65504,65506,1],[65508,65510,1],[65512,65518,1],[65536,65547,0],[65549,65574,0],[65576,65594,0],[65596,65597,0],[65599,65613,0],[65616,65629,0],[65664,65786,0],[66045,66045,0],[66176,66204,0],[66208,66256,0],[66272,66272,0],[66304,66335,0],[66349,66368,0],[66370,66377,0],[66384,66426,0],[66432,66461,0],[66464,66499,0],[66504,66511,0],[66560,66599,1],[66600,66717,0],[66720,66729,0],[66736,66771,1],[66776,66811,0],[66816,66855,0],[66864,66915,0],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,0],[66979,66993,0],[66995,67001,0],[67003,67004,0],[67072,67382,0],[67392,67413,0],[67424,67431,0],[67456,67456,0],[67457,67461,1],[67463,67504,1],[67506,67514,1],[67584,67589,0],[67592,67592,0],[67594,67637,0],[67639,67640,0],[67644,67644,0],[67647,67669,0],[67680,67702,0],[67712,67742,0],[67808,67826,0],[67828,67829,0],[67840,67861,0],[67872,67897,0],[67968,68023,0],[68030,68031,0],[68096,68099,0],[68101,68102,0],[68108,68115,0],[68117,68119,0],[68121,68149,0],[68152,68154,0],[68159,68159,0],[68192,68220,0],[68224,68252,0],[68288,68295,0],[68297,68326,0],[68352,68405,0],[68416,68437,0],[68448,68466,0],[68480,68497,0],[68608,68680,0],[68736,68786,1],[68800,68850,0],[68864,68903,0],[68912,68921,0],[69248,69289,0],[69291,69292,0],[69296,69297,0],[69373,69404,0],[69415,69415,0],[69424,69456,0],[69488,69509,0],[69552,69572,0],[69600,69622,0],[69632,69702,0],[69734,69749,0],[69759,69818,0],[69826,69826,0],[69840,69864,0],[69872,69881,0],[69888,69940,0],[69942,69951,0],[69956,69959,0],[69968,70003,0],[70006,70006,0],[70016,70084,0],[70089,70092,0],[70094,70106,0],[70108,70108,0],[70144,70161,0],[70163,70199,0],[70206,70209,0],[70272,70278,0],[70280,70280,0],[70282,70285,0],[70287,70301,0],[70303,70312,0],[70320,70378,0],[70384,70393,0],[70400,70403,0],[70405,70412,0],[70415,70416,0],[70419,70440,0],[70442,70448,0],[70450,70451,0],[70453,70457,0],[70459,70468,0],[70471,70472,0],[70475,70477,0],[70480,70480,0],[70487,70487,0],[70493,70499,0],[70502,70508,0],[70512,70516,0],[70656,70730,0],[70736,70745,0],[70750,70753,0],[70784,70853,0],[70855,70855,0],[70864,70873,0],[71040,71093,0],[71096,71104,0],[71128,71133,0],[71168,71232,0],[71236,71236,0],[71248,71257,0],[71296,71352,0],[71360,71369,0],[71424,71450,0],[71453,71467,0],[71472,71481,0],[71488,71494,0],[71680,71738,0],[71840,71871,1],[71872,71913,0],[71935,71942,0],[71945,71945,0],[71948,71955,0],[71957,71958,0],[71960,71989,0],[71991,71992,0],[71995,72003,0],[72016,72025,0],[72096,72103,0],[72106,72151,0],[72154,72161,0],[72163,72164,0],[72192,72254,0],[72263,72263,0],[72272,72345,0],[72349,72349,0],[72368,72440,0],[72704,72712,0],[72714,72758,0],[72760,72768,0],[72784,72793,0],[72818,72847,0],[72850,72871,0],[72873,72886,0],[72960,72966,0],[72968,72969,0],[72971,73014,0],[73018,73018,0],[73020,73021,0],[73023,73031,0],[73040,73049,0],[73056,73061,0],[73063,73064,0],[73066,73102,0],[73104,73105,0],[73107,73112,0],[73120,73129,0],[73440,73462,0],[73472,73488,0],[73490,73530,0],[73534,73538,0],[73552,73561,0],[73648,73648,0],[73728,74649,0],[74880,75075,0],[77712,77808,0],[77824,78895,0],[78912,78933,0],[82944,83526,0],[92160,92728,0],[92736,92766,0],[92768,92777,0],[92784,92862,0],[92864,92873,0],[92880,92909,0],[92912,92916,0],[92928,92982,0],[92992,92995,0],[93008,93017,0],[93027,93047,0],[93053,93071,0],[93760,93791,1],[93792,93823,0],[93952,94026,0],[94031,94087,0],[94095,94111,0],[94176,94177,0],[94179,94180,0],[94192,94193,0],[94208,100343,0],[100352,101589,0],[101632,101640,0],[110576,110579,0],[110581,110587,0],[110589,110590,0],[110592,110882,0],[110898,110898,0],[110928,110930,0],[110933,110933,0],[110948,110951,0],[110960,111355,0],[113664,113770,0],[113776,113788,0],[113792,113800,0],[113808,113817,0],[113821,113822,0],[113824,113824,3],[118528,118573,0],[118576,118598,0],[119134,119140,1],[119227,119232,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,119970,1],[119973,119974,1],[119977,119980,1],[119982,119993,1],[119995,119995,1],[119997,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120134,1],[120138,120144,1],[120146,120485,1],[120488,120531,1],[120533,120589,1],[120591,120647,1],[120649,120705,1],[120707,120763,1],[120765,120778,1],[120782,120831,1],[121344,121398,0],[121403,121452,0],[121461,121461,0],[121476,121476,0],[121499,121503,0],[121505,121519,0],[122624,122654,0],[122661,122666,0],[122880,122886,0],[122888,122904,0],[122907,122913,0],[122915,122916,0],[122918,122922,0],[122928,122989,1],[123023,123023,0],[123136,123180,0],[123184,123197,0],[123200,123209,0],[123214,123214,0],[123536,123566,0],[123584,123641,0],[124112,124153,0],[124896,124902,0],[124904,124907,0],[124909,124910,0],[124912,124926,0],[124928,125124,0],[125136,125142,0],[125184,125217,1],[125218,125259,0],[125264,125273,0],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126500,1],[126503,126503,1],[126505,126514,1],[126516,126519,1],[126521,126521,1],[126523,126523,1],[126530,126530,1],[126535,126535,1],[126537,126537,1],[126539,126539,1],[126541,126543,1],[126545,126546,1],[126548,126548,1],[126551,126551,1],[126553,126553,1],[126555,126555,1],[126557,126557,1],[126559,126559,1],[126561,126562,1],[126564,126564,1],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126590,1],[126592,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[127274,127278,1],[127280,127311,1],[127338,127340,1],[127376,127376,1],[127488,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[130032,130041,1],[131072,173791,0],[173824,177977,0],[177984,178205,0],[178208,183969,0],[183984,191456,0],[191472,192093,0],[194560,194609,1],[194612,194629,1],[194631,194663,1],[194665,194666,1],[194668,194675,1],[194677,194705,1],[194707,194708,1],[194710,194846,1],[194848,194860,1],[194862,194886,1],[194888,194909,1],[194912,195006,1],[195008,195070,1],[195072,195101,1],[196608,201546,0],[201552,205743,0],[917760,917760,3]],"mappings":{"65":[97],"66":[98],"67":[99],"68":[100],"69":[101],"70":[102],"71":[103],"72":[104],"73":[105],"74":[106],"75":[107],"76":[108],"77":[109],"78":[110],"79":[111],"80":[112],"81":[113],"82":[114],"83":[115],"84":[116],"85":[117],"86":[118],"87":[119],"88":[120],"89":[121],"90":[122],"160":[32],"168":[32,776],"170":[97],"175":[32,772],"178":[50],"179":[51],"180":[32,769],"181":[956],"184":[32,807],"185":[49],"186":[111],"188":[49,8260,52],"189":[49,8260,50],"190":[51,8260,52],"192":[224],"193":[225],"194":[226],"195":[227],"196":[228],"197":[229],"198":[230],"199":[231],"200":[232],"201":[233],"202":[234],"203":[235],"204":[236],"205":[237],"206":[238],"207":[239],"208":[240],"209":[241],"210":[242],"211":[243],"212":[244],"213":[245],"214":[246],"216":[248],"217":[249],"218":[250],"219":[251],"220":[252],"221":[253],"222":[254],"223":[115,115],"256":[257],"258":[259],"260":[261],"262":[263],"264":[265],"266":[267],"268":[269],"270":[271],"272":[273],"274":[275],"276":[277],"278":[279],"280":[281],"282":[283],"284":[285],"286":[287],"288":[289],"290":[291],"292":[293],"294":[295],"296":[297],"298":[299],"300":[301],"302":[303],"304":[105,775],"306":[105,106],"308":[309],"310":[311],"313":[314],"315":[316],"317":[318],"319":[108,183],"321":[322],"323":[324],"325":[326],"327":[328],"329":[700,110],"330":[331],"332":[333],"334":[335],"336":[337],"338":[339],"340":[341],"342":[343],"344":[345],"346":[347],"348":[349],"350":[351],"352":[353],"354":[355],"356":[357],"358":[359],"360":[361],"362":[363],"364":[365],"366":[367],"368":[369],"370":[371],"372":[373],"374":[375],"376":[255],"377":[378],"379":[380],"381":[382],"383":[115],"385":[595],"386":[387],"388":[389],"390":[596],"391":[392],"393":[598],"394":[599],"395":[396],"398":[477],"399":[601],"400":[603],"401":[402],"403":[608],"404":[611],"406":[617],"407":[616],"408":[409],"412":[623],"413":[626],"415":[629],"416":[417],"418":[419],"420":[421],"422":[640],"423":[424],"425":[643],"428":[429],"430":[648],"431":[432],"433":[650],"434":[651],"435":[436],"437":[438],"439":[658],"440":[441],"444":[445],"452":[100,382],"455":[108,106],"458":[110,106],"461":[462],"463":[464],"465":[466],"467":[468],"469":[470],"471":[472],"473":[474],"475":[476],"478":[479],"480":[481],"482":[483],"484":[485],"486":[487],"488":[489],"490":[491],"492":[493],"494":[495],"497":[100,122],"500":[501],"502":[405],"503":[447],"504":[505],"506":[507],"508":[509],"510":[511],"512":[513],"514":[515],"516":[517],"518":[519],"520":[521],"522":[523],"524":[525],"526":[527],"528":[529],"530":[531],"532":[533],"534":[535],"536":[537],"538":[539],"540":[541],"542":[543],"544":[414],"546":[547],"548":[549],"550":[551],"552":[553],"554":[555],"556":[557],"558":[559],"560":[561],"562":[563],"570":[11365],"571":[572],"573":[410],"574":[11366],"577":[578],"579":[384],"580":[649],"581":[652],"582":[583],"584":[585],"586":[587],"588":[589],"590":[591],"688":[104],"689":[614],"690":[106],"691":[114],"692":[633],"693":[635],"694":[641],"695":[119],"696":[121],"728":[32,774],"729":[32,775],"730":[32,778],"731":[32,808],"732":[32,771],"733":[32,779],"736":[611],"737":[108],"738":[115],"739":[120],"740":[661],"832":[768],"833":[769],"835":[787],"836":[776,769],"837":[953],"880":[881],"882":[883],"884":[697],"886":[887],"890":[32,953],"894":[59],"895":[1011],"900":[32,769],"901":[32,776,769],"902":[940],"903":[183],"904":[941],"905":[942],"906":[943],"908":[972],"910":[973],"911":[974],"913":[945],"914":[946],"915":[947],"916":[948],"917":[949],"918":[950],"919":[951],"920":[952],"921":[953],"922":[954],"923":[955],"924":[956],"925":[957],"926":[958],"927":[959],"928":[960],"929":[961],"931":[963],"932":[964],"933":[965],"934":[966],"935":[967],"936":[968],"937":[969],"938":[970],"939":[971],"962":[963],"975":[983],"976":[946],"977":[952],"978":[965],"979":[973],"980":[971],"981":[966],"982":[960],"984":[985],"986":[987],"988":[989],"990":[991],"992":[993],"994":[995],"996":[997],"998":[999],"1000":[1001],"1002":[1003],"1004":[1005],"1006":[1007],"1008":[954],"1009":[961],"1010":[963],"1012":[952],"1013":[949],"1015":[1016],"1017":[963],"1018":[1019],"1021":[891],"1022":[892],"1023":[893],"1024":[1104],"1025":[1105],"1026":[1106],"1027":[1107],"1028":[1108],"1029":[1109],"1030":[1110],"1031":[1111],"1032":[1112],"1033":[1113],"1034":[1114],"1035":[1115],"1036":[1116],"1037":[1117],"1038":[1118],"1039":[1119],"1040":[1072],"1041":[1073],"1042":[1074],"1043":[1075],"1044":[1076],"1045":[1077],"1046":[1078],"1047":[1079],"1048":[1080],"1049":[1081],"1050":[1082],"1051":[1083],"1052":[1084],"1053":[1085],"1054":[1086],"1055":[1087],"1056":[1088],"1057":[1089],"1058":[1090],"1059":[1091],"1060":[1092],"1061":[1093],"1062":[1094],"1063":[1095],"1064":[1096],"1065":[1097],"1066":[1098],"1067":[1099],"1068":[1100],"1069":[1101],"1070":[1102],"1071":[1103],"1120":[1121],"1122":[1123],"1124":[1125],"1126":[1127],"1128":[1129],"1130":[1131],"1132":[1133],"1134":[1135],"1136":[1137],"1138":[1139],"1140":[1141],"1142":[1143],"1144":[1145],"1146":[1147],"1148":[1149],"1150":[1151],"1152":[1153],"1162":[1163],"1164":[1165],"1166":[1167],"1168":[1169],"1170":[1171],"1172":[1173],"1174":[1175],"1176":[1177],"1178":[1179],"1180":[1181],"1182":[1183],"1184":[1185],"1186":[1187],"1188":[1189],"1190":[1191],"1192":[1193],"1194":[1195],"1196":[1197],"1198":[1199],"1200":[1201],"1202":[1203],"1204":[1205],"1206":[1207],"1208":[1209],"1210":[1211],"1212":[1213],"1214":[1215],"1217":[1218],"1219":[1220],"1221":[1222],"1223":[1224],"1225":[1226],"1227":[1228],"1229":[1230],"1232":[1233],"1234":[1235],"1236":[1237],"1238":[1239],"1240":[1241],"1242":[1243],"1244":[1245],"1246":[1247],"1248":[1249],"1250":[1251],"1252":[1253],"1254":[1255],"1256":[1257],"1258":[1259],"1260":[1261],"1262":[1263],"1264":[1265],"1266":[1267],"1268":[1269],"1270":[1271],"1272":[1273],"1274":[1275],"1276":[1277],"1278":[1279],"1280":[1281],"1282":[1283],"1284":[1285],"1286":[1287],"1288":[1289],"1290":[1291],"1292":[1293],"1294":[1295],"1296":[1297],"1298":[1299],"1300":[1301],"1302":[1303],"1304":[1305],"1306":[1307],"1308":[1309],"1310":[1311],"1312":[1313],"1314":[1315],"1316":[1317],"1318":[1319],"1320":[1321],"1322":[1323],"1324":[1325],"1326":[1327],"1329":[1377],"1330":[1378],"1331":[1379],"1332":[1380],"1333":[1381],"1334":[1382],"1335":[1383],"1336":[1384],"1337":[1385],"1338":[1386],"1339":[1387],"1340":[1388],"1341":[1389],"1342":[1390],"1343":[1391],"1344":[1392],"1345":[1393],"1346":[1394],"1347":[1395],"1348":[1396],"1349":[1397],"1350":[1398],"1351":[1399],"1352":[1400],"1353":[1401],"1354":[1402],"1355":[1403],"1356":[1404],"1357":[1405],"1358":[1406],"1359":[1407],"1360":[1408],"1361":[1409],"1362":[1410],"1363":[1411],"1364":[1412],"1365":[1413],"1366":[1414],"1415":[1381,1410],"1653":[1575,1652],"1654":[1608,1652],"1655":[1735,1652],"1656":[1610,1652],"2392":[2325,2364],"2393":[2326,2364],"2394":[2327,2364],"2395":[2332,2364],"2396":[2337,2364],"2397":[2338,2364],"2398":[2347,2364],"2399":[2351,2364],"2524":[2465,2492],"2525":[2466,2492],"2527":[2479,2492],"2611":[2610,2620],"2614":[2616,2620],"2649":[2582,2620],"2650":[2583,2620],"2651":[2588,2620],"2654":[2603,2620],"2908":[2849,2876],"2909":[2850,2876],"3635":[3661,3634],"3763":[3789,3762],"3804":[3755,3737],"3805":[3755,3745],"3852":[3851],"3907":[3906,4023],"3917":[3916,4023],"3922":[3921,4023],"3927":[3926,4023],"3932":[3931,4023],"3945":[3904,4021],"3955":[3953,3954],"3957":[3953,3956],"3958":[4018,3968],"3959":[4018,3953,3968],"3960":[4019,3968],"3961":[4019,3953,3968],"3969":[3953,3968],"3987":[3986,4023],"3997":[3996,4023],"4002":[4001,4023],"4007":[4006,4023],"4012":[4011,4023],"4025":[3984,4021],"4295":[11559],"4301":[11565],"4348":[4316],"5112":[5104],"5113":[5105],"5114":[5106],"5115":[5107],"5116":[5108],"5117":[5109],"7296":[1074],"7297":[1076],"7298":[1086],"7299":[1089],"7300":[1090],"7302":[1098],"7303":[1123],"7304":[42571],"7312":[4304],"7313":[4305],"7314":[4306],"7315":[4307],"7316":[4308],"7317":[4309],"7318":[4310],"7319":[4311],"7320":[4312],"7321":[4313],"7322":[4314],"7323":[4315],"7324":[4316],"7325":[4317],"7326":[4318],"7327":[4319],"7328":[4320],"7329":[4321],"7330":[4322],"7331":[4323],"7332":[4324],"7333":[4325],"7334":[4326],"7335":[4327],"7336":[4328],"7337":[4329],"7338":[4330],"7339":[4331],"7340":[4332],"7341":[4333],"7342":[4334],"7343":[4335],"7344":[4336],"7345":[4337],"7346":[4338],"7347":[4339],"7348":[4340],"7349":[4341],"7350":[4342],"7351":[4343],"7352":[4344],"7353":[4345],"7354":[4346],"7357":[4349],"7358":[4350],"7359":[4351],"7468":[97],"7469":[230],"7470":[98],"7472":[100],"7473":[101],"7474":[477],"7475":[103],"7476":[104],"7477":[105],"7478":[106],"7479":[107],"7480":[108],"7481":[109],"7482":[110],"7484":[111],"7485":[547],"7486":[112],"7487":[114],"7488":[116],"7489":[117],"7490":[119],"7491":[97],"7492":[592],"7493":[593],"7494":[7426],"7495":[98],"7496":[100],"7497":[101],"7498":[601],"7499":[603],"7500":[604],"7501":[103],"7503":[107],"7504":[109],"7505":[331],"7506":[111],"7507":[596],"7508":[7446],"7509":[7447],"7510":[112],"7511":[116],"7512":[117],"7513":[7453],"7514":[623],"7515":[118],"7516":[7461],"7517":[946],"7518":[947],"7519":[948],"7520":[966],"7521":[967],"7522":[105],"7523":[114],"7524":[117],"7525":[118],"7526":[946],"7527":[947],"7528":[961],"7529":[966],"7530":[967],"7544":[1085],"7579":[594],"7580":[99],"7581":[597],"7582":[240],"7583":[604],"7584":[102],"7585":[607],"7586":[609],"7587":[613],"7588":[616],"7589":[617],"7590":[618],"7591":[7547],"7592":[669],"7593":[621],"7594":[7557],"7595":[671],"7596":[625],"7597":[624],"7598":[626],"7599":[627],"7600":[628],"7601":[629],"7602":[632],"7603":[642],"7604":[643],"7605":[427],"7606":[649],"7607":[650],"7608":[7452],"7609":[651],"7610":[652],"7611":[122],"7612":[656],"7613":[657],"7614":[658],"7615":[952],"7680":[7681],"7682":[7683],"7684":[7685],"7686":[7687],"7688":[7689],"7690":[7691],"7692":[7693],"7694":[7695],"7696":[7697],"7698":[7699],"7700":[7701],"7702":[7703],"7704":[7705],"7706":[7707],"7708":[7709],"7710":[7711],"7712":[7713],"7714":[7715],"7716":[7717],"7718":[7719],"7720":[7721],"7722":[7723],"7724":[7725],"7726":[7727],"7728":[7729],"7730":[7731],"7732":[7733],"7734":[7735],"7736":[7737],"7738":[7739],"7740":[7741],"7742":[7743],"7744":[7745],"7746":[7747],"7748":[7749],"7750":[7751],"7752":[7753],"7754":[7755],"7756":[7757],"7758":[7759],"7760":[7761],"7762":[7763],"7764":[7765],"7766":[7767],"7768":[7769],"7770":[7771],"7772":[7773],"7774":[7775],"7776":[7777],"7778":[7779],"7780":[7781],"7782":[7783],"7784":[7785],"7786":[7787],"7788":[7789],"7790":[7791],"7792":[7793],"7794":[7795],"7796":[7797],"7798":[7799],"7800":[7801],"7802":[7803],"7804":[7805],"7806":[7807],"7808":[7809],"7810":[7811],"7812":[7813],"7814":[7815],"7816":[7817],"7818":[7819],"7820":[7821],"7822":[7823],"7824":[7825],"7826":[7827],"7828":[7829],"7834":[97,702],"7835":[7777],"7838":[223],"7840":[7841],"7842":[7843],"7844":[7845],"7846":[7847],"7848":[7849],"7850":[7851],"7852":[7853],"7854":[7855],"7856":[7857],"7858":[7859],"7860":[7861],"7862":[7863],"7864":[7865],"7866":[7867],"7868":[7869],"7870":[7871],"7872":[7873],"7874":[7875],"7876":[7877],"7878":[7879],"7880":[7881],"7882":[7883],"7884":[7885],"7886":[7887],"7888":[7889],"7890":[7891],"7892":[7893],"7894":[7895],"7896":[7897],"7898":[7899],"7900":[7901],"7902":[7903],"7904":[7905],"7906":[7907],"7908":[7909],"7910":[7911],"7912":[7913],"7914":[7915],"7916":[7917],"7918":[7919],"7920":[7921],"7922":[7923],"7924":[7925],"7926":[7927],"7928":[7929],"7930":[7931],"7932":[7933],"7934":[7935],"7944":[7936],"7945":[7937],"7946":[7938],"7947":[7939],"7948":[7940],"7949":[7941],"7950":[7942],"7951":[7943],"7960":[7952],"7961":[7953],"7962":[7954],"7963":[7955],"7964":[7956],"7965":[7957],"7976":[7968],"7977":[7969],"7978":[7970],"7979":[7971],"7980":[7972],"7981":[7973],"7982":[7974],"7983":[7975],"7992":[7984],"7993":[7985],"7994":[7986],"7995":[7987],"7996":[7988],"7997":[7989],"7998":[7990],"7999":[7991],"8008":[8000],"8009":[8001],"8010":[8002],"8011":[8003],"8012":[8004],"8013":[8005],"8025":[8017],"8027":[8019],"8029":[8021],"8031":[8023],"8040":[8032],"8041":[8033],"8042":[8034],"8043":[8035],"8044":[8036],"8045":[8037],"8046":[8038],"8047":[8039],"8049":[940],"8051":[941],"8053":[942],"8055":[943],"8057":[972],"8059":[973],"8061":[974],"8064":[7936,953],"8065":[7937,953],"8066":[7938,953],"8067":[7939,953],"8068":[7940,953],"8069":[7941,953],"8070":[7942,953],"8071":[7943,953],"8072":[7936,953],"8073":[7937,953],"8074":[7938,953],"8075":[7939,953],"8076":[7940,953],"8077":[7941,953],"8078":[7942,953],"8079":[7943,953],"8080":[7968,953],"8081":[7969,953],"8082":[7970,953],"8083":[7971,953],"8084":[7972,953],"8085":[7973,953],"8086":[7974,953],"8087":[7975,953],"8088":[7968,953],"8089":[7969,953],"8090":[7970,953],"8091":[7971,953],"8092":[7972,953],"8093":[7973,953],"8094":[7974,953],"8095":[7975,953],"8096":[8032,953],"8097":[8033,953],"8098":[8034,953],"8099":[8035,953],"8100":[8036,953],"8101":[8037,953],"8102":[8038,953],"8103":[8039,953],"8104":[8032,953],"8105":[8033,953],"8106":[8034,953],"8107":[8035,953],"8108":[8036,953],"8109":[8037,953],"8110":[8038,953],"8111":[8039,953],"8114":[8048,953],"8115":[945,953],"8116":[940,953],"8119":[8118,953],"8120":[8112],"8121":[8113],"8122":[8048],"8123":[940],"8124":[945,953],"8125":[32,787],"8126":[953],"8127":[32,787],"8128":[32,834],"8129":[32,776,834],"8130":[8052,953],"8131":[951,953],"8132":[942,953],"8135":[8134,953],"8136":[8050],"8137":[941],"8138":[8052],"8139":[942],"8140":[951,953],"8141":[32,787,768],"8142":[32,787,769],"8143":[32,787,834],"8147":[912],"8152":[8144],"8153":[8145],"8154":[8054],"8155":[943],"8157":[32,788,768],"8158":[32,788,769],"8159":[32,788,834],"8163":[944],"8168":[8160],"8169":[8161],"8170":[8058],"8171":[973],"8172":[8165],"8173":[32,776,768],"8174":[32,776,769],"8175":[96],"8178":[8060,953],"8179":[969,953],"8180":[974,953],"8183":[8182,953],"8184":[8056],"8185":[972],"8186":[8060],"8187":[974],"8188":[969,953],"8189":[32,769],"8190":[32,788],"8192":[32],"8204":[],"8209":[8208],"8215":[32,819],"8239":[32],"8243":[8242,8242],"8244":[8242,8242,8242],"8246":[8245,8245],"8247":[8245,8245,8245],"8252":[33,33],"8254":[32,773],"8263":[63,63],"8264":[63,33],"8265":[33,63],"8279":[8242,8242,8242,8242],"8287":[32],"8304":[48],"8305":[105],"8308":[52],"8309":[53],"8310":[54],"8311":[55],"8312":[56],"8313":[57],"8314":[43],"8315":[8722],"8316":[61],"8317":[40],"8318":[41],"8319":[110],"8320":[48],"8321":[49],"8322":[50],"8323":[51],"8324":[52],"8325":[53],"8326":[54],"8327":[55],"8328":[56],"8329":[57],"8330":[43],"8331":[8722],"8332":[61],"8333":[40],"8334":[41],"8336":[97],"8337":[101],"8338":[111],"8339":[120],"8340":[601],"8341":[104],"8342":[107],"8343":[108],"8344":[109],"8345":[110],"8346":[112],"8347":[115],"8348":[116],"8360":[114,115],"8448":[97,47,99],"8449":[97,47,115],"8450":[99],"8451":[176,99],"8453":[99,47,111],"8454":[99,47,117],"8455":[603],"8457":[176,102],"8458":[103],"8459":[104],"8463":[295],"8464":[105],"8466":[108],"8469":[110],"8470":[110,111],"8473":[112],"8474":[113],"8475":[114],"8480":[115,109],"8481":[116,101,108],"8482":[116,109],"8484":[122],"8486":[969],"8488":[122],"8490":[107],"8491":[229],"8492":[98],"8493":[99],"8495":[101],"8497":[102],"8499":[109],"8500":[111],"8501":[1488],"8502":[1489],"8503":[1490],"8504":[1491],"8505":[105],"8507":[102,97,120],"8508":[960],"8509":[947],"8511":[960],"8512":[8721],"8517":[100],"8519":[101],"8520":[105],"8521":[106],"8528":[49,8260,55],"8529":[49,8260,57],"8530":[49,8260,49,48],"8531":[49,8260,51],"8532":[50,8260,51],"8533":[49,8260,53],"8534":[50,8260,53],"8535":[51,8260,53],"8536":[52,8260,53],"8537":[49,8260,54],"8538":[53,8260,54],"8539":[49,8260,56],"8540":[51,8260,56],"8541":[53,8260,56],"8542":[55,8260,56],"8543":[49,8260],"8544":[105],"8545":[105,105],"8546":[105,105,105],"8547":[105,118],"8548":[118],"8549":[118,105],"8550":[118,105,105],"8551":[118,105,105,105],"8552":[105,120],"8553":[120],"8554":[120,105],"8555":[120,105,105],"8556":[108],"8557":[99],"8558":[100],"8559":[109],"8560":[105],"8561":[105,105],"8562":[105,105,105],"8563":[105,118],"8564":[118],"8565":[118,105],"8566":[118,105,105],"8567":[118,105,105,105],"8568":[105,120],"8569":[120],"8570":[120,105],"8571":[120,105,105],"8572":[108],"8573":[99],"8574":[100],"8575":[109],"8585":[48,8260,51],"8748":[8747,8747],"8749":[8747,8747,8747],"8751":[8750,8750],"8752":[8750,8750,8750],"9001":[12296],"9002":[12297],"9312":[49],"9313":[50],"9314":[51],"9315":[52],"9316":[53],"9317":[54],"9318":[55],"9319":[56],"9320":[57],"9321":[49,48],"9322":[49,49],"9323":[49,50],"9324":[49,51],"9325":[49,52],"9326":[49,53],"9327":[49,54],"9328":[49,55],"9329":[49,56],"9330":[49,57],"9331":[50,48],"9332":[40,49,41],"9333":[40,50,41],"9334":[40,51,41],"9335":[40,52,41],"9336":[40,53,41],"9337":[40,54,41],"9338":[40,55,41],"9339":[40,56,41],"9340":[40,57,41],"9341":[40,49,48,41],"9342":[40,49,49,41],"9343":[40,49,50,41],"9344":[40,49,51,41],"9345":[40,49,52,41],"9346":[40,49,53,41],"9347":[40,49,54,41],"9348":[40,49,55,41],"9349":[40,49,56,41],"9350":[40,49,57,41],"9351":[40,50,48,41],"9372":[40,97,41],"9373":[40,98,41],"9374":[40,99,41],"9375":[40,100,41],"9376":[40,101,41],"9377":[40,102,41],"9378":[40,103,41],"9379":[40,104,41],"9380":[40,105,41],"9381":[40,106,41],"9382":[40,107,41],"9383":[40,108,41],"9384":[40,109,41],"9385":[40,110,41],"9386":[40,111,41],"9387":[40,112,41],"9388":[40,113,41],"9389":[40,114,41],"9390":[40,115,41],"9391":[40,116,41],"9392":[40,117,41],"9393":[40,118,41],"9394":[40,119,41],"9395":[40,120,41],"9396":[40,121,41],"9397":[40,122,41],"9398":[97],"9399":[98],"9400":[99],"9401":[100],"9402":[101],"9403":[102],"9404":[103],"9405":[104],"9406":[105],"9407":[106],"9408":[107],"9409":[108],"9410":[109],"9411":[110],"9412":[111],"9413":[112],"9414":[113],"9415":[114],"9416":[115],"9417":[116],"9418":[117],"9419":[118],"9420":[119],"9421":[120],"9422":[121],"9423":[122],"9424":[97],"9425":[98],"9426":[99],"9427":[100],"9428":[101],"9429":[102],"9430":[103],"9431":[104],"9432":[105],"9433":[106],"9434":[107],"9435":[108],"9436":[109],"9437":[110],"9438":[111],"9439":[112],"9440":[113],"9441":[114],"9442":[115],"9443":[116],"9444":[117],"9445":[118],"9446":[119],"9447":[120],"9448":[121],"9449":[122],"9450":[48],"10764":[8747,8747,8747,8747],"10868":[58,58,61],"10869":[61,61],"10870":[61,61,61],"10972":[10973,824],"11264":[11312],"11265":[11313],"11266":[11314],"11267":[11315],"11268":[11316],"11269":[11317],"11270":[11318],"11271":[11319],"11272":[11320],"11273":[11321],"11274":[11322],"11275":[11323],"11276":[11324],"11277":[11325],"11278":[11326],"11279":[11327],"11280":[11328],"11281":[11329],"11282":[11330],"11283":[11331],"11284":[11332],"11285":[11333],"11286":[11334],"11287":[11335],"11288":[11336],"11289":[11337],"11290":[11338],"11291":[11339],"11292":[11340],"11293":[11341],"11294":[11342],"11295":[11343],"11296":[11344],"11297":[11345],"11298":[11346],"11299":[11347],"11300":[11348],"11301":[11349],"11302":[11350],"11303":[11351],"11304":[11352],"11305":[11353],"11306":[11354],"11307":[11355],"11308":[11356],"11309":[11357],"11310":[11358],"11311":[11359],"11360":[11361],"11362":[619],"11363":[7549],"11364":[637],"11367":[11368],"11369":[11370],"11371":[11372],"11373":[593],"11374":[625],"11375":[592],"11376":[594],"11378":[11379],"11381":[11382],"11388":[106],"11389":[118],"11390":[575],"11391":[576],"11392":[11393],"11394":[11395],"11396":[11397],"11398":[11399],"11400":[11401],"11402":[11403],"11404":[11405],"11406":[11407],"11408":[11409],"11410":[11411],"11412":[11413],"11414":[11415],"11416":[11417],"11418":[11419],"11420":[11421],"11422":[11423],"11424":[11425],"11426":[11427],"11428":[11429],"11430":[11431],"11432":[11433],"11434":[11435],"11436":[11437],"11438":[11439],"11440":[11441],"11442":[11443],"11444":[11445],"11446":[11447],"11448":[11449],"11450":[11451],"11452":[11453],"11454":[11455],"11456":[11457],"11458":[11459],"11460":[11461],"11462":[11463],"11464":[11465],"11466":[11467],"11468":[11469],"11470":[11471],"11472":[11473],"11474":[11475],"11476":[11477],"11478":[11479],"11480":[11481],"11482":[11483],"11484":[11485],"11486":[11487],"11488":[11489],"11490":[11491],"11499":[11500],"11501":[11502],"11506":[11507],"11631":[11617],"11935":[27597],"12019":[40863],"12032":[19968],"12033":[20008],"12034":[20022],"12035":[20031],"12036":[20057],"12037":[20101],"12038":[20108],"12039":[20128],"12040":[20154],"12041":[20799],"12042":[20837],"12043":[20843],"12044":[20866],"12045":[20886],"12046":[20907],"12047":[20960],"12048":[20981],"12049":[20992],"12050":[21147],"12051":[21241],"12052":[21269],"12053":[21274],"12054":[21304],"12055":[21313],"12056":[21340],"12057":[21353],"12058":[21378],"12059":[21430],"12060":[21448],"12061":[21475],"12062":[22231],"12063":[22303],"12064":[22763],"12065":[22786],"12066":[22794],"12067":[22805],"12068":[22823],"12069":[22899],"12070":[23376],"12071":[23424],"12072":[23544],"12073":[23567],"12074":[23586],"12075":[23608],"12076":[23662],"12077":[23665],"12078":[24027],"12079":[24037],"12080":[24049],"12081":[24062],"12082":[24178],"12083":[24186],"12084":[24191],"12085":[24308],"12086":[24318],"12087":[24331],"12088":[24339],"12089":[24400],"12090":[24417],"12091":[24435],"12092":[24515],"12093":[25096],"12094":[25142],"12095":[25163],"12096":[25903],"12097":[25908],"12098":[25991],"12099":[26007],"12100":[26020],"12101":[26041],"12102":[26080],"12103":[26085],"12104":[26352],"12105":[26376],"12106":[26408],"12107":[27424],"12108":[27490],"12109":[27513],"12110":[27571],"12111":[27595],"12112":[27604],"12113":[27611],"12114":[27663],"12115":[27668],"12116":[27700],"12117":[28779],"12118":[29226],"12119":[29238],"12120":[29243],"12121":[29247],"12122":[29255],"12123":[29273],"12124":[29275],"12125":[29356],"12126":[29572],"12127":[29577],"12128":[29916],"12129":[29926],"12130":[29976],"12131":[29983],"12132":[29992],"12133":[30000],"12134":[30091],"12135":[30098],"12136":[30326],"12137":[30333],"12138":[30382],"12139":[30399],"12140":[30446],"12141":[30683],"12142":[30690],"12143":[30707],"12144":[31034],"12145":[31160],"12146":[31166],"12147":[31348],"12148":[31435],"12149":[31481],"12150":[31859],"12151":[31992],"12152":[32566],"12153":[32593],"12154":[32650],"12155":[32701],"12156":[32769],"12157":[32780],"12158":[32786],"12159":[32819],"12160":[32895],"12161":[32905],"12162":[33251],"12163":[33258],"12164":[33267],"12165":[33276],"12166":[33292],"12167":[33307],"12168":[33311],"12169":[33390],"12170":[33394],"12171":[33400],"12172":[34381],"12173":[34411],"12174":[34880],"12175":[34892],"12176":[34915],"12177":[35198],"12178":[35211],"12179":[35282],"12180":[35328],"12181":[35895],"12182":[35910],"12183":[35925],"12184":[35960],"12185":[35997],"12186":[36196],"12187":[36208],"12188":[36275],"12189":[36523],"12190":[36554],"12191":[36763],"12192":[36784],"12193":[36789],"12194":[37009],"12195":[37193],"12196":[37318],"12197":[37324],"12198":[37329],"12199":[38263],"12200":[38272],"12201":[38428],"12202":[38582],"12203":[38585],"12204":[38632],"12205":[38737],"12206":[38750],"12207":[38754],"12208":[38761],"12209":[38859],"12210":[38893],"12211":[38899],"12212":[38913],"12213":[39080],"12214":[39131],"12215":[39135],"12216":[39318],"12217":[39321],"12218":[39340],"12219":[39592],"12220":[39640],"12221":[39647],"12222":[39717],"12223":[39727],"12224":[39730],"12225":[39740],"12226":[39770],"12227":[40165],"12228":[40565],"12229":[40575],"12230":[40613],"12231":[40635],"12232":[40643],"12233":[40653],"12234":[40657],"12235":[40697],"12236":[40701],"12237":[40718],"12238":[40723],"12239":[40736],"12240":[40763],"12241":[40778],"12242":[40786],"12243":[40845],"12244":[40860],"12245":[40864],"12288":[32],"12290":[46],"12342":[12306],"12344":[21313],"12345":[21316],"12346":[21317],"12443":[32,12441],"12444":[32,12442],"12447":[12424,12426],"12543":[12467,12488],"12593":[4352],"12594":[4353],"12595":[4522],"12596":[4354],"12597":[4524],"12598":[4525],"12599":[4355],"12600":[4356],"12601":[4357],"12602":[4528],"12603":[4529],"12604":[4530],"12605":[4531],"12606":[4532],"12607":[4533],"12608":[4378],"12609":[4358],"12610":[4359],"12611":[4360],"12612":[4385],"12613":[4361],"12614":[4362],"12615":[4363],"12616":[4364],"12617":[4365],"12618":[4366],"12619":[4367],"12620":[4368],"12621":[4369],"12622":[4370],"12623":[4449],"12624":[4450],"12625":[4451],"12626":[4452],"12627":[4453],"12628":[4454],"12629":[4455],"12630":[4456],"12631":[4457],"12632":[4458],"12633":[4459],"12634":[4460],"12635":[4461],"12636":[4462],"12637":[4463],"12638":[4464],"12639":[4465],"12640":[4466],"12641":[4467],"12642":[4468],"12643":[4469],"12645":[4372],"12646":[4373],"12647":[4551],"12648":[4552],"12649":[4556],"12650":[4558],"12651":[4563],"12652":[4567],"12653":[4569],"12654":[4380],"12655":[4573],"12656":[4575],"12657":[4381],"12658":[4382],"12659":[4384],"12660":[4386],"12661":[4387],"12662":[4391],"12663":[4393],"12664":[4395],"12665":[4396],"12666":[4397],"12667":[4398],"12668":[4399],"12669":[4402],"12670":[4406],"12671":[4416],"12672":[4423],"12673":[4428],"12674":[4593],"12675":[4594],"12676":[4439],"12677":[4440],"12678":[4441],"12679":[4484],"12680":[4485],"12681":[4488],"12682":[4497],"12683":[4498],"12684":[4500],"12685":[4510],"12686":[4513],"12690":[19968],"12691":[20108],"12692":[19977],"12693":[22235],"12694":[19978],"12695":[20013],"12696":[19979],"12697":[30002],"12698":[20057],"12699":[19993],"12700":[19969],"12701":[22825],"12702":[22320],"12703":[20154],"12800":[40,4352,41],"12801":[40,4354,41],"12802":[40,4355,41],"12803":[40,4357,41],"12804":[40,4358,41],"12805":[40,4359,41],"12806":[40,4361,41],"12807":[40,4363,41],"12808":[40,4364,41],"12809":[40,4366,41],"12810":[40,4367,41],"12811":[40,4368,41],"12812":[40,4369,41],"12813":[40,4370,41],"12814":[40,44032,41],"12815":[40,45208,41],"12816":[40,45796,41],"12817":[40,46972,41],"12818":[40,47560,41],"12819":[40,48148,41],"12820":[40,49324,41],"12821":[40,50500,41],"12822":[40,51088,41],"12823":[40,52264,41],"12824":[40,52852,41],"12825":[40,53440,41],"12826":[40,54028,41],"12827":[40,54616,41],"12828":[40,51452,41],"12829":[40,50724,51204,41],"12830":[40,50724,54980,41],"12832":[40,19968,41],"12833":[40,20108,41],"12834":[40,19977,41],"12835":[40,22235,41],"12836":[40,20116,41],"12837":[40,20845,41],"12838":[40,19971,41],"12839":[40,20843,41],"12840":[40,20061,41],"12841":[40,21313,41],"12842":[40,26376,41],"12843":[40,28779,41],"12844":[40,27700,41],"12845":[40,26408,41],"12846":[40,37329,41],"12847":[40,22303,41],"12848":[40,26085,41],"12849":[40,26666,41],"12850":[40,26377,41],"12851":[40,31038,41],"12852":[40,21517,41],"12853":[40,29305,41],"12854":[40,36001,41],"12855":[40,31069,41],"12856":[40,21172,41],"12857":[40,20195,41],"12858":[40,21628,41],"12859":[40,23398,41],"12860":[40,30435,41],"12861":[40,20225,41],"12862":[40,36039,41],"12863":[40,21332,41],"12864":[40,31085,41],"12865":[40,20241,41],"12866":[40,33258,41],"12867":[40,33267,41],"12868":[21839],"12869":[24188],"12870":[25991],"12871":[31631],"12880":[112,116,101],"12881":[50,49],"12882":[50,50],"12883":[50,51],"12884":[50,52],"12885":[50,53],"12886":[50,54],"12887":[50,55],"12888":[50,56],"12889":[50,57],"12890":[51,48],"12891":[51,49],"12892":[51,50],"12893":[51,51],"12894":[51,52],"12895":[51,53],"12896":[4352],"12897":[4354],"12898":[4355],"12899":[4357],"12900":[4358],"12901":[4359],"12902":[4361],"12903":[4363],"12904":[4364],"12905":[4366],"12906":[4367],"12907":[4368],"12908":[4369],"12909":[4370],"12910":[44032],"12911":[45208],"12912":[45796],"12913":[46972],"12914":[47560],"12915":[48148],"12916":[49324],"12917":[50500],"12918":[51088],"12919":[52264],"12920":[52852],"12921":[53440],"12922":[54028],"12923":[54616],"12924":[52280,44256],"12925":[51452,51032],"12926":[50864],"12928":[19968],"12929":[20108],"12930":[19977],"12931":[22235],"12932":[20116],"12933":[20845],"12934":[19971],"12935":[20843],"12936":[20061],"12937":[21313],"12938":[26376],"12939":[28779],"12940":[27700],"12941":[26408],"12942":[37329],"12943":[22303],"12944":[26085],"12945":[26666],"12946":[26377],"12947":[31038],"12948":[21517],"12949":[29305],"12950":[36001],"12951":[31069],"12952":[21172],"12953":[31192],"12954":[30007],"12955":[22899],"12956":[36969],"12957":[20778],"12958":[21360],"12959":[27880],"12960":[38917],"12961":[20241],"12962":[20889],"12963":[27491],"12964":[19978],"12965":[20013],"12966":[19979],"12967":[24038],"12968":[21491],"12969":[21307],"12970":[23447],"12971":[23398],"12972":[30435],"12973":[20225],"12974":[36039],"12975":[21332],"12976":[22812],"12977":[51,54],"12978":[51,55],"12979":[51,56],"12980":[51,57],"12981":[52,48],"12982":[52,49],"12983":[52,50],"12984":[52,51],"12985":[52,52],"12986":[52,53],"12987":[52,54],"12988":[52,55],"12989":[52,56],"12990":[52,57],"12991":[53,48],"12992":[49,26376],"12993":[50,26376],"12994":[51,26376],"12995":[52,26376],"12996":[53,26376],"12997":[54,26376],"12998":[55,26376],"12999":[56,26376],"13000":[57,26376],"13001":[49,48,26376],"13002":[49,49,26376],"13003":[49,50,26376],"13004":[104,103],"13005":[101,114,103],"13006":[101,118],"13007":[108,116,100],"13008":[12450],"13009":[12452],"13010":[12454],"13011":[12456],"13012":[12458],"13013":[12459],"13014":[12461],"13015":[12463],"13016":[12465],"13017":[12467],"13018":[12469],"13019":[12471],"13020":[12473],"13021":[12475],"13022":[12477],"13023":[12479],"13024":[12481],"13025":[12484],"13026":[12486],"13027":[12488],"13028":[12490],"13029":[12491],"13030":[12492],"13031":[12493],"13032":[12494],"13033":[12495],"13034":[12498],"13035":[12501],"13036":[12504],"13037":[12507],"13038":[12510],"13039":[12511],"13040":[12512],"13041":[12513],"13042":[12514],"13043":[12516],"13044":[12518],"13045":[12520],"13046":[12521],"13047":[12522],"13048":[12523],"13049":[12524],"13050":[12525],"13051":[12527],"13052":[12528],"13053":[12529],"13054":[12530],"13055":[20196,21644],"13056":[12450,12497,12540,12488],"13057":[12450,12523,12501,12449],"13058":[12450,12531,12506,12450],"13059":[12450,12540,12523],"13060":[12452,12491,12531,12464],"13061":[12452,12531,12481],"13062":[12454,12457,12531],"13063":[12456,12473,12463,12540,12489],"13064":[12456,12540,12459,12540],"13065":[12458,12531,12473],"13066":[12458,12540,12512],"13067":[12459,12452,12522],"13068":[12459,12521,12483,12488],"13069":[12459,12525,12522,12540],"13070":[12460,12525,12531],"13071":[12460,12531,12510],"13072":[12462,12460],"13073":[12462,12491,12540],"13074":[12461,12517,12522,12540],"13075":[12462,12523,12480,12540],"13076":[12461,12525],"13077":[12461,12525,12464,12521,12512],"13078":[12461,12525,12513,12540,12488,12523],"13079":[12461,12525,12527,12483,12488],"13080":[12464,12521,12512],"13081":[12464,12521,12512,12488,12531],"13082":[12463,12523,12476,12452,12525],"13083":[12463,12525,12540,12493],"13084":[12465,12540,12473],"13085":[12467,12523,12490],"13086":[12467,12540,12509],"13087":[12469,12452,12463,12523],"13088":[12469,12531,12481,12540,12512],"13089":[12471,12522,12531,12464],"13090":[12475,12531,12481],"13091":[12475,12531,12488],"13092":[12480,12540,12473],"13093":[12487,12471],"13094":[12489,12523],"13095":[12488,12531],"13096":[12490,12494],"13097":[12494,12483,12488],"13098":[12495,12452,12484],"13099":[12497,12540,12475,12531,12488],"13100":[12497,12540,12484],"13101":[12496,12540,12524,12523],"13102":[12500,12450,12473,12488,12523],"13103":[12500,12463,12523],"13104":[12500,12467],"13105":[12499,12523],"13106":[12501,12449,12521,12483,12489],"13107":[12501,12451,12540,12488],"13108":[12502,12483,12471,12455,12523],"13109":[12501,12521,12531],"13110":[12504,12463,12479,12540,12523],"13111":[12506,12477],"13112":[12506,12491,12498],"13113":[12504,12523,12484],"13114":[12506,12531,12473],"13115":[12506,12540,12472],"13116":[12505,12540,12479],"13117":[12509,12452,12531,12488],"13118":[12508,12523,12488],"13119":[12507,12531],"13120":[12509,12531,12489],"13121":[12507,12540,12523],"13122":[12507,12540,12531],"13123":[12510,12452,12463,12525],"13124":[12510,12452,12523],"13125":[12510,12483,12495],"13126":[12510,12523,12463],"13127":[12510,12531,12471,12519,12531],"13128":[12511,12463,12525,12531],"13129":[12511,12522],"13130":[12511,12522,12496,12540,12523],"13131":[12513,12460],"13132":[12513,12460,12488,12531],"13133":[12513,12540,12488,12523],"13134":[12516,12540,12489],"13135":[12516,12540,12523],"13136":[12518,12450,12531],"13137":[12522,12483,12488,12523],"13138":[12522,12521],"13139":[12523,12500,12540],"13140":[12523,12540,12502,12523],"13141":[12524,12512],"13142":[12524,12531,12488,12466,12531],"13143":[12527,12483,12488],"13144":[48,28857],"13145":[49,28857],"13146":[50,28857],"13147":[51,28857],"13148":[52,28857],"13149":[53,28857],"13150":[54,28857],"13151":[55,28857],"13152":[56,28857],"13153":[57,28857],"13154":[49,48,28857],"13155":[49,49,28857],"13156":[49,50,28857],"13157":[49,51,28857],"13158":[49,52,28857],"13159":[49,53,28857],"13160":[49,54,28857],"13161":[49,55,28857],"13162":[49,56,28857],"13163":[49,57,28857],"13164":[50,48,28857],"13165":[50,49,28857],"13166":[50,50,28857],"13167":[50,51,28857],"13168":[50,52,28857],"13169":[104,112,97],"13170":[100,97],"13171":[97,117],"13172":[98,97,114],"13173":[111,118],"13174":[112,99],"13175":[100,109],"13176":[100,109,50],"13177":[100,109,51],"13178":[105,117],"13179":[24179,25104],"13180":[26157,21644],"13181":[22823,27491],"13182":[26126,27835],"13183":[26666,24335,20250,31038],"13184":[112,97],"13185":[110,97],"13186":[956,97],"13187":[109,97],"13188":[107,97],"13189":[107,98],"13190":[109,98],"13191":[103,98],"13192":[99,97,108],"13193":[107,99,97,108],"13194":[112,102],"13195":[110,102],"13196":[956,102],"13197":[956,103],"13198":[109,103],"13199":[107,103],"13200":[104,122],"13201":[107,104,122],"13202":[109,104,122],"13203":[103,104,122],"13204":[116,104,122],"13205":[956,108],"13206":[109,108],"13207":[100,108],"13208":[107,108],"13209":[102,109],"13210":[110,109],"13211":[956,109],"13212":[109,109],"13213":[99,109],"13214":[107,109],"13215":[109,109,50],"13216":[99,109,50],"13217":[109,50],"13218":[107,109,50],"13219":[109,109,51],"13220":[99,109,51],"13221":[109,51],"13222":[107,109,51],"13223":[109,8725,115],"13224":[109,8725,115,50],"13225":[112,97],"13226":[107,112,97],"13227":[109,112,97],"13228":[103,112,97],"13229":[114,97,100],"13230":[114,97,100,8725,115],"13231":[114,97,100,8725,115,50],"13232":[112,115],"13233":[110,115],"13234":[956,115],"13235":[109,115],"13236":[112,118],"13237":[110,118],"13238":[956,118],"13239":[109,118],"13240":[107,118],"13241":[109,118],"13242":[112,119],"13243":[110,119],"13244":[956,119],"13245":[109,119],"13246":[107,119],"13247":[109,119],"13248":[107,969],"13249":[109,969],"13251":[98,113],"13252":[99,99],"13253":[99,100],"13254":[99,8725,107,103],"13256":[100,98],"13257":[103,121],"13258":[104,97],"13259":[104,112],"13260":[105,110],"13261":[107,107],"13262":[107,109],"13263":[107,116],"13264":[108,109],"13265":[108,110],"13266":[108,111,103],"13267":[108,120],"13268":[109,98],"13269":[109,105,108],"13270":[109,111,108],"13271":[112,104],"13273":[112,112,109],"13274":[112,114],"13275":[115,114],"13276":[115,118],"13277":[119,98],"13278":[118,8725,109],"13279":[97,8725,109],"13280":[49,26085],"13281":[50,26085],"13282":[51,26085],"13283":[52,26085],"13284":[53,26085],"13285":[54,26085],"13286":[55,26085],"13287":[56,26085],"13288":[57,26085],"13289":[49,48,26085],"13290":[49,49,26085],"13291":[49,50,26085],"13292":[49,51,26085],"13293":[49,52,26085],"13294":[49,53,26085],"13295":[49,54,26085],"13296":[49,55,26085],"13297":[49,56,26085],"13298":[49,57,26085],"13299":[50,48,26085],"13300":[50,49,26085],"13301":[50,50,26085],"13302":[50,51,26085],"13303":[50,52,26085],"13304":[50,53,26085],"13305":[50,54,26085],"13306":[50,55,26085],"13307":[50,56,26085],"13308":[50,57,26085],"13309":[51,48,26085],"13310":[51,49,26085],"13311":[103,97,108],"42560":[42561],"42562":[42563],"42564":[42565],"42566":[42567],"42568":[42569],"42570":[42571],"42572":[42573],"42574":[42575],"42576":[42577],"42578":[42579],"42580":[42581],"42582":[42583],"42584":[42585],"42586":[42587],"42588":[42589],"42590":[42591],"42592":[42593],"42594":[42595],"42596":[42597],"42598":[42599],"42600":[42601],"42602":[42603],"42604":[42605],"42624":[42625],"42626":[42627],"42628":[42629],"42630":[42631],"42632":[42633],"42634":[42635],"42636":[42637],"42638":[42639],"42640":[42641],"42642":[42643],"42644":[42645],"42646":[42647],"42648":[42649],"42650":[42651],"42652":[1098],"42653":[1100],"42786":[42787],"42788":[42789],"42790":[42791],"42792":[42793],"42794":[42795],"42796":[42797],"42798":[42799],"42802":[42803],"42804":[42805],"42806":[42807],"42808":[42809],"42810":[42811],"42812":[42813],"42814":[42815],"42816":[42817],"42818":[42819],"42820":[42821],"42822":[42823],"42824":[42825],"42826":[42827],"42828":[42829],"42830":[42831],"42832":[42833],"42834":[42835],"42836":[42837],"42838":[42839],"42840":[42841],"42842":[42843],"42844":[42845],"42846":[42847],"42848":[42849],"42850":[42851],"42852":[42853],"42854":[42855],"42856":[42857],"42858":[42859],"42860":[42861],"42862":[42863],"42864":[42863],"42873":[42874],"42875":[42876],"42877":[7545],"42878":[42879],"42880":[42881],"42882":[42883],"42884":[42885],"42886":[42887],"42891":[42892],"42893":[613],"42896":[42897],"42898":[42899],"42902":[42903],"42904":[42905],"42906":[42907],"42908":[42909],"42910":[42911],"42912":[42913],"42914":[42915],"42916":[42917],"42918":[42919],"42920":[42921],"42922":[614],"42923":[604],"42924":[609],"42925":[620],"42926":[618],"42928":[670],"42929":[647],"42930":[669],"42931":[43859],"42932":[42933],"42934":[42935],"42936":[42937],"42938":[42939],"42940":[42941],"42942":[42943],"42944":[42945],"42946":[42947],"42948":[42900],"42949":[642],"42950":[7566],"42951":[42952],"42953":[42954],"42960":[42961],"42966":[42967],"42968":[42969],"42994":[99],"42995":[102],"42996":[113],"42997":[42998],"43000":[295],"43001":[339],"43868":[42791],"43869":[43831],"43870":[619],"43871":[43858],"43881":[653],"43888":[5024],"43889":[5025],"43890":[5026],"43891":[5027],"43892":[5028],"43893":[5029],"43894":[5030],"43895":[5031],"43896":[5032],"43897":[5033],"43898":[5034],"43899":[5035],"43900":[5036],"43901":[5037],"43902":[5038],"43903":[5039],"43904":[5040],"43905":[5041],"43906":[5042],"43907":[5043],"43908":[5044],"43909":[5045],"43910":[5046],"43911":[5047],"43912":[5048],"43913":[5049],"43914":[5050],"43915":[5051],"43916":[5052],"43917":[5053],"43918":[5054],"43919":[5055],"43920":[5056],"43921":[5057],"43922":[5058],"43923":[5059],"43924":[5060],"43925":[5061],"43926":[5062],"43927":[5063],"43928":[5064],"43929":[5065],"43930":[5066],"43931":[5067],"43932":[5068],"43933":[5069],"43934":[5070],"43935":[5071],"43936":[5072],"43937":[5073],"43938":[5074],"43939":[5075],"43940":[5076],"43941":[5077],"43942":[5078],"43943":[5079],"43944":[5080],"43945":[5081],"43946":[5082],"43947":[5083],"43948":[5084],"43949":[5085],"43950":[5086],"43951":[5087],"43952":[5088],"43953":[5089],"43954":[5090],"43955":[5091],"43956":[5092],"43957":[5093],"43958":[5094],"43959":[5095],"43960":[5096],"43961":[5097],"43962":[5098],"43963":[5099],"43964":[5100],"43965":[5101],"43966":[5102],"43967":[5103],"63744":[35912],"63745":[26356],"63746":[36554],"63747":[36040],"63748":[28369],"63749":[20018],"63750":[21477],"63751":[40860],"63753":[22865],"63754":[37329],"63755":[21895],"63756":[22856],"63757":[25078],"63758":[30313],"63759":[32645],"63760":[34367],"63761":[34746],"63762":[35064],"63763":[37007],"63764":[27138],"63765":[27931],"63766":[28889],"63767":[29662],"63768":[33853],"63769":[37226],"63770":[39409],"63771":[20098],"63772":[21365],"63773":[27396],"63774":[29211],"63775":[34349],"63776":[40478],"63777":[23888],"63778":[28651],"63779":[34253],"63780":[35172],"63781":[25289],"63782":[33240],"63783":[34847],"63784":[24266],"63785":[26391],"63786":[28010],"63787":[29436],"63788":[37070],"63789":[20358],"63790":[20919],"63791":[21214],"63792":[25796],"63793":[27347],"63794":[29200],"63795":[30439],"63796":[32769],"63797":[34310],"63798":[34396],"63799":[36335],"63800":[38706],"63801":[39791],"63802":[40442],"63803":[30860],"63804":[31103],"63805":[32160],"63806":[33737],"63807":[37636],"63808":[40575],"63809":[35542],"63810":[22751],"63811":[24324],"63812":[31840],"63813":[32894],"63814":[29282],"63815":[30922],"63816":[36034],"63817":[38647],"63818":[22744],"63819":[23650],"63820":[27155],"63821":[28122],"63822":[28431],"63823":[32047],"63824":[32311],"63825":[38475],"63826":[21202],"63827":[32907],"63828":[20956],"63829":[20940],"63830":[31260],"63831":[32190],"63832":[33777],"63833":[38517],"63834":[35712],"63835":[25295],"63836":[27138],"63837":[35582],"63838":[20025],"63839":[23527],"63840":[24594],"63841":[29575],"63842":[30064],"63843":[21271],"63844":[30971],"63845":[20415],"63846":[24489],"63847":[19981],"63848":[27852],"63849":[25976],"63850":[32034],"63851":[21443],"63852":[22622],"63853":[30465],"63854":[33865],"63855":[35498],"63856":[27578],"63857":[36784],"63858":[27784],"63859":[25342],"63860":[33509],"63861":[25504],"63862":[30053],"63863":[20142],"63864":[20841],"63865":[20937],"63866":[26753],"63867":[31975],"63868":[33391],"63869":[35538],"63870":[37327],"63871":[21237],"63872":[21570],"63873":[22899],"63874":[24300],"63875":[26053],"63876":[28670],"63877":[31018],"63878":[38317],"63879":[39530],"63880":[40599],"63881":[40654],"63882":[21147],"63883":[26310],"63884":[27511],"63885":[36706],"63886":[24180],"63887":[24976],"63888":[25088],"63889":[25754],"63890":[28451],"63891":[29001],"63892":[29833],"63893":[31178],"63894":[32244],"63895":[32879],"63896":[36646],"63897":[34030],"63898":[36899],"63899":[37706],"63900":[21015],"63901":[21155],"63902":[21693],"63903":[28872],"63904":[35010],"63905":[35498],"63906":[24265],"63907":[24565],"63908":[25467],"63909":[27566],"63910":[31806],"63911":[29557],"63912":[20196],"63913":[22265],"63914":[23527],"63915":[23994],"63916":[24604],"63917":[29618],"63918":[29801],"63919":[32666],"63920":[32838],"63921":[37428],"63922":[38646],"63923":[38728],"63924":[38936],"63925":[20363],"63926":[31150],"63927":[37300],"63928":[38584],"63929":[24801],"63930":[20102],"63931":[20698],"63932":[23534],"63933":[23615],"63934":[26009],"63935":[27138],"63936":[29134],"63937":[30274],"63938":[34044],"63939":[36988],"63940":[40845],"63941":[26248],"63942":[38446],"63943":[21129],"63944":[26491],"63945":[26611],"63946":[27969],"63947":[28316],"63948":[29705],"63949":[30041],"63950":[30827],"63951":[32016],"63952":[39006],"63953":[20845],"63954":[25134],"63955":[38520],"63956":[20523],"63957":[23833],"63958":[28138],"63959":[36650],"63960":[24459],"63961":[24900],"63962":[26647],"63963":[29575],"63964":[38534],"63965":[21033],"63966":[21519],"63967":[23653],"63968":[26131],"63969":[26446],"63970":[26792],"63971":[27877],"63972":[29702],"63973":[30178],"63974":[32633],"63975":[35023],"63976":[35041],"63977":[37324],"63978":[38626],"63979":[21311],"63980":[28346],"63981":[21533],"63982":[29136],"63983":[29848],"63984":[34298],"63985":[38563],"63986":[40023],"63987":[40607],"63988":[26519],"63989":[28107],"63990":[33256],"63991":[31435],"63992":[31520],"63993":[31890],"63994":[29376],"63995":[28825],"63996":[35672],"63997":[20160],"63998":[33590],"63999":[21050],"64000":[20999],"64001":[24230],"64002":[25299],"64003":[31958],"64004":[23429],"64005":[27934],"64006":[26292],"64007":[36667],"64008":[34892],"64009":[38477],"64010":[35211],"64011":[24275],"64012":[20800],"64013":[21952],"64016":[22618],"64018":[26228],"64021":[20958],"64022":[29482],"64023":[30410],"64024":[31036],"64025":[31070],"64026":[31077],"64027":[31119],"64028":[38742],"64029":[31934],"64030":[32701],"64032":[34322],"64034":[35576],"64037":[36920],"64038":[37117],"64042":[39151],"64043":[39164],"64044":[39208],"64045":[40372],"64046":[37086],"64047":[38583],"64048":[20398],"64049":[20711],"64050":[20813],"64051":[21193],"64052":[21220],"64053":[21329],"64054":[21917],"64055":[22022],"64056":[22120],"64057":[22592],"64058":[22696],"64059":[23652],"64060":[23662],"64061":[24724],"64062":[24936],"64063":[24974],"64064":[25074],"64065":[25935],"64066":[26082],"64067":[26257],"64068":[26757],"64069":[28023],"64070":[28186],"64071":[28450],"64072":[29038],"64073":[29227],"64074":[29730],"64075":[30865],"64076":[31038],"64077":[31049],"64078":[31048],"64079":[31056],"64080":[31062],"64081":[31069],"64082":[31117],"64083":[31118],"64084":[31296],"64085":[31361],"64086":[31680],"64087":[32244],"64088":[32265],"64089":[32321],"64090":[32626],"64091":[32773],"64092":[33261],"64093":[33401],"64095":[33879],"64096":[35088],"64097":[35222],"64098":[35585],"64099":[35641],"64100":[36051],"64101":[36104],"64102":[36790],"64103":[36920],"64104":[38627],"64105":[38911],"64106":[38971],"64107":[24693],"64108":[148206],"64109":[33304],"64112":[20006],"64113":[20917],"64114":[20840],"64115":[20352],"64116":[20805],"64117":[20864],"64118":[21191],"64119":[21242],"64120":[21917],"64121":[21845],"64122":[21913],"64123":[21986],"64124":[22618],"64125":[22707],"64126":[22852],"64127":[22868],"64128":[23138],"64129":[23336],"64130":[24274],"64131":[24281],"64132":[24425],"64133":[24493],"64134":[24792],"64135":[24910],"64136":[24840],"64137":[24974],"64138":[24928],"64139":[25074],"64140":[25140],"64141":[25540],"64142":[25628],"64143":[25682],"64144":[25942],"64145":[26228],"64146":[26391],"64147":[26395],"64148":[26454],"64149":[27513],"64150":[27578],"64151":[27969],"64152":[28379],"64153":[28363],"64154":[28450],"64155":[28702],"64156":[29038],"64157":[30631],"64158":[29237],"64159":[29359],"64160":[29482],"64161":[29809],"64162":[29958],"64163":[30011],"64164":[30237],"64165":[30239],"64166":[30410],"64167":[30427],"64168":[30452],"64169":[30538],"64170":[30528],"64171":[30924],"64172":[31409],"64173":[31680],"64174":[31867],"64175":[32091],"64176":[32244],"64177":[32574],"64178":[32773],"64179":[33618],"64180":[33775],"64181":[34681],"64182":[35137],"64183":[35206],"64184":[35222],"64185":[35519],"64186":[35576],"64187":[35531],"64188":[35585],"64189":[35582],"64190":[35565],"64191":[35641],"64192":[35722],"64193":[36104],"64194":[36664],"64195":[36978],"64196":[37273],"64197":[37494],"64198":[38524],"64199":[38627],"64200":[38742],"64201":[38875],"64202":[38911],"64203":[38923],"64204":[38971],"64205":[39698],"64206":[40860],"64207":[141386],"64208":[141380],"64209":[144341],"64210":[15261],"64211":[16408],"64212":[16441],"64213":[152137],"64214":[154832],"64215":[163539],"64216":[40771],"64217":[40846],"64256":[102,102],"64257":[102,105],"64258":[102,108],"64259":[102,102,105],"64260":[102,102,108],"64261":[115,116],"64275":[1396,1398],"64276":[1396,1381],"64277":[1396,1387],"64278":[1406,1398],"64279":[1396,1389],"64285":[1497,1460],"64287":[1522,1463],"64288":[1506],"64289":[1488],"64290":[1491],"64291":[1492],"64292":[1499],"64293":[1500],"64294":[1501],"64295":[1512],"64296":[1514],"64297":[43],"64298":[1513,1473],"64299":[1513,1474],"64300":[1513,1468,1473],"64301":[1513,1468,1474],"64302":[1488,1463],"64303":[1488,1464],"64304":[1488,1468],"64305":[1489,1468],"64306":[1490,1468],"64307":[1491,1468],"64308":[1492,1468],"64309":[1493,1468],"64310":[1494,1468],"64312":[1496,1468],"64313":[1497,1468],"64314":[1498,1468],"64315":[1499,1468],"64316":[1500,1468],"64318":[1502,1468],"64320":[1504,1468],"64321":[1505,1468],"64323":[1507,1468],"64324":[1508,1468],"64326":[1510,1468],"64327":[1511,1468],"64328":[1512,1468],"64329":[1513,1468],"64330":[1514,1468],"64331":[1493,1465],"64332":[1489,1471],"64333":[1499,1471],"64334":[1508,1471],"64335":[1488,1500],"64336":[1649],"64338":[1659],"64342":[1662],"64346":[1664],"64350":[1658],"64354":[1663],"64358":[1657],"64362":[1700],"64366":[1702],"64370":[1668],"64374":[1667],"64378":[1670],"64382":[1671],"64386":[1677],"64388":[1676],"64390":[1678],"64392":[1672],"64394":[1688],"64396":[1681],"64398":[1705],"64402":[1711],"64406":[1715],"64410":[1713],"64414":[1722],"64416":[1723],"64420":[1728],"64422":[1729],"64426":[1726],"64430":[1746],"64432":[1747],"64467":[1709],"64471":[1735],"64473":[1734],"64475":[1736],"64477":[1735,1652],"64478":[1739],"64480":[1733],"64482":[1737],"64484":[1744],"64488":[1609],"64490":[1574,1575],"64492":[1574,1749],"64494":[1574,1608],"64496":[1574,1735],"64498":[1574,1734],"64500":[1574,1736],"64502":[1574,1744],"64505":[1574,1609],"64508":[1740],"64512":[1574,1580],"64513":[1574,1581],"64514":[1574,1605],"64515":[1574,1609],"64516":[1574,1610],"64517":[1576,1580],"64518":[1576,1581],"64519":[1576,1582],"64520":[1576,1605],"64521":[1576,1609],"64522":[1576,1610],"64523":[1578,1580],"64524":[1578,1581],"64525":[1578,1582],"64526":[1578,1605],"64527":[1578,1609],"64528":[1578,1610],"64529":[1579,1580],"64530":[1579,1605],"64531":[1579,1609],"64532":[1579,1610],"64533":[1580,1581],"64534":[1580,1605],"64535":[1581,1580],"64536":[1581,1605],"64537":[1582,1580],"64538":[1582,1581],"64539":[1582,1605],"64540":[1587,1580],"64541":[1587,1581],"64542":[1587,1582],"64543":[1587,1605],"64544":[1589,1581],"64545":[1589,1605],"64546":[1590,1580],"64547":[1590,1581],"64548":[1590,1582],"64549":[1590,1605],"64550":[1591,1581],"64551":[1591,1605],"64552":[1592,1605],"64553":[1593,1580],"64554":[1593,1605],"64555":[1594,1580],"64556":[1594,1605],"64557":[1601,1580],"64558":[1601,1581],"64559":[1601,1582],"64560":[1601,1605],"64561":[1601,1609],"64562":[1601,1610],"64563":[1602,1581],"64564":[1602,1605],"64565":[1602,1609],"64566":[1602,1610],"64567":[1603,1575],"64568":[1603,1580],"64569":[1603,1581],"64570":[1603,1582],"64571":[1603,1604],"64572":[1603,1605],"64573":[1603,1609],"64574":[1603,1610],"64575":[1604,1580],"64576":[1604,1581],"64577":[1604,1582],"64578":[1604,1605],"64579":[1604,1609],"64580":[1604,1610],"64581":[1605,1580],"64582":[1605,1581],"64583":[1605,1582],"64584":[1605,1605],"64585":[1605,1609],"64586":[1605,1610],"64587":[1606,1580],"64588":[1606,1581],"64589":[1606,1582],"64590":[1606,1605],"64591":[1606,1609],"64592":[1606,1610],"64593":[1607,1580],"64594":[1607,1605],"64595":[1607,1609],"64596":[1607,1610],"64597":[1610,1580],"64598":[1610,1581],"64599":[1610,1582],"64600":[1610,1605],"64601":[1610,1609],"64602":[1610,1610],"64603":[1584,1648],"64604":[1585,1648],"64605":[1609,1648],"64606":[32,1612,1617],"64607":[32,1613,1617],"64608":[32,1614,1617],"64609":[32,1615,1617],"64610":[32,1616,1617],"64611":[32,1617,1648],"64612":[1574,1585],"64613":[1574,1586],"64614":[1574,1605],"64615":[1574,1606],"64616":[1574,1609],"64617":[1574,1610],"64618":[1576,1585],"64619":[1576,1586],"64620":[1576,1605],"64621":[1576,1606],"64622":[1576,1609],"64623":[1576,1610],"64624":[1578,1585],"64625":[1578,1586],"64626":[1578,1605],"64627":[1578,1606],"64628":[1578,1609],"64629":[1578,1610],"64630":[1579,1585],"64631":[1579,1586],"64632":[1579,1605],"64633":[1579,1606],"64634":[1579,1609],"64635":[1579,1610],"64636":[1601,1609],"64637":[1601,1610],"64638":[1602,1609],"64639":[1602,1610],"64640":[1603,1575],"64641":[1603,1604],"64642":[1603,1605],"64643":[1603,1609],"64644":[1603,1610],"64645":[1604,1605],"64646":[1604,1609],"64647":[1604,1610],"64648":[1605,1575],"64649":[1605,1605],"64650":[1606,1585],"64651":[1606,1586],"64652":[1606,1605],"64653":[1606,1606],"64654":[1606,1609],"64655":[1606,1610],"64656":[1609,1648],"64657":[1610,1585],"64658":[1610,1586],"64659":[1610,1605],"64660":[1610,1606],"64661":[1610,1609],"64662":[1610,1610],"64663":[1574,1580],"64664":[1574,1581],"64665":[1574,1582],"64666":[1574,1605],"64667":[1574,1607],"64668":[1576,1580],"64669":[1576,1581],"64670":[1576,1582],"64671":[1576,1605],"64672":[1576,1607],"64673":[1578,1580],"64674":[1578,1581],"64675":[1578,1582],"64676":[1578,1605],"64677":[1578,1607],"64678":[1579,1605],"64679":[1580,1581],"64680":[1580,1605],"64681":[1581,1580],"64682":[1581,1605],"64683":[1582,1580],"64684":[1582,1605],"64685":[1587,1580],"64686":[1587,1581],"64687":[1587,1582],"64688":[1587,1605],"64689":[1589,1581],"64690":[1589,1582],"64691":[1589,1605],"64692":[1590,1580],"64693":[1590,1581],"64694":[1590,1582],"64695":[1590,1605],"64696":[1591,1581],"64697":[1592,1605],"64698":[1593,1580],"64699":[1593,1605],"64700":[1594,1580],"64701":[1594,1605],"64702":[1601,1580],"64703":[1601,1581],"64704":[1601,1582],"64705":[1601,1605],"64706":[1602,1581],"64707":[1602,1605],"64708":[1603,1580],"64709":[1603,1581],"64710":[1603,1582],"64711":[1603,1604],"64712":[1603,1605],"64713":[1604,1580],"64714":[1604,1581],"64715":[1604,1582],"64716":[1604,1605],"64717":[1604,1607],"64718":[1605,1580],"64719":[1605,1581],"64720":[1605,1582],"64721":[1605,1605],"64722":[1606,1580],"64723":[1606,1581],"64724":[1606,1582],"64725":[1606,1605],"64726":[1606,1607],"64727":[1607,1580],"64728":[1607,1605],"64729":[1607,1648],"64730":[1610,1580],"64731":[1610,1581],"64732":[1610,1582],"64733":[1610,1605],"64734":[1610,1607],"64735":[1574,1605],"64736":[1574,1607],"64737":[1576,1605],"64738":[1576,1607],"64739":[1578,1605],"64740":[1578,1607],"64741":[1579,1605],"64742":[1579,1607],"64743":[1587,1605],"64744":[1587,1607],"64745":[1588,1605],"64746":[1588,1607],"64747":[1603,1604],"64748":[1603,1605],"64749":[1604,1605],"64750":[1606,1605],"64751":[1606,1607],"64752":[1610,1605],"64753":[1610,1607],"64754":[1600,1614,1617],"64755":[1600,1615,1617],"64756":[1600,1616,1617],"64757":[1591,1609],"64758":[1591,1610],"64759":[1593,1609],"64760":[1593,1610],"64761":[1594,1609],"64762":[1594,1610],"64763":[1587,1609],"64764":[1587,1610],"64765":[1588,1609],"64766":[1588,1610],"64767":[1581,1609],"64768":[1581,1610],"64769":[1580,1609],"64770":[1580,1610],"64771":[1582,1609],"64772":[1582,1610],"64773":[1589,1609],"64774":[1589,1610],"64775":[1590,1609],"64776":[1590,1610],"64777":[1588,1580],"64778":[1588,1581],"64779":[1588,1582],"64780":[1588,1605],"64781":[1588,1585],"64782":[1587,1585],"64783":[1589,1585],"64784":[1590,1585],"64785":[1591,1609],"64786":[1591,1610],"64787":[1593,1609],"64788":[1593,1610],"64789":[1594,1609],"64790":[1594,1610],"64791":[1587,1609],"64792":[1587,1610],"64793":[1588,1609],"64794":[1588,1610],"64795":[1581,1609],"64796":[1581,1610],"64797":[1580,1609],"64798":[1580,1610],"64799":[1582,1609],"64800":[1582,1610],"64801":[1589,1609],"64802":[1589,1610],"64803":[1590,1609],"64804":[1590,1610],"64805":[1588,1580],"64806":[1588,1581],"64807":[1588,1582],"64808":[1588,1605],"64809":[1588,1585],"64810":[1587,1585],"64811":[1589,1585],"64812":[1590,1585],"64813":[1588,1580],"64814":[1588,1581],"64815":[1588,1582],"64816":[1588,1605],"64817":[1587,1607],"64818":[1588,1607],"64819":[1591,1605],"64820":[1587,1580],"64821":[1587,1581],"64822":[1587,1582],"64823":[1588,1580],"64824":[1588,1581],"64825":[1588,1582],"64826":[1591,1605],"64827":[1592,1605],"64828":[1575,1611],"64848":[1578,1580,1605],"64849":[1578,1581,1580],"64851":[1578,1581,1605],"64852":[1578,1582,1605],"64853":[1578,1605,1580],"64854":[1578,1605,1581],"64855":[1578,1605,1582],"64856":[1580,1605,1581],"64858":[1581,1605,1610],"64859":[1581,1605,1609],"64860":[1587,1581,1580],"64861":[1587,1580,1581],"64862":[1587,1580,1609],"64863":[1587,1605,1581],"64865":[1587,1605,1580],"64866":[1587,1605,1605],"64868":[1589,1581,1581],"64870":[1589,1605,1605],"64871":[1588,1581,1605],"64873":[1588,1580,1610],"64874":[1588,1605,1582],"64876":[1588,1605,1605],"64878":[1590,1581,1609],"64879":[1590,1582,1605],"64881":[1591,1605,1581],"64883":[1591,1605,1605],"64884":[1591,1605,1610],"64885":[1593,1580,1605],"64886":[1593,1605,1605],"64888":[1593,1605,1609],"64889":[1594,1605,1605],"64890":[1594,1605,1610],"64891":[1594,1605,1609],"64892":[1601,1582,1605],"64894":[1602,1605,1581],"64895":[1602,1605,1605],"64896":[1604,1581,1605],"64897":[1604,1581,1610],"64898":[1604,1581,1609],"64899":[1604,1580,1580],"64901":[1604,1582,1605],"64903":[1604,1605,1581],"64905":[1605,1581,1580],"64906":[1605,1581,1605],"64907":[1605,1581,1610],"64908":[1605,1580,1581],"64909":[1605,1580,1605],"64910":[1605,1582,1580],"64911":[1605,1582,1605],"64914":[1605,1580,1582],"64915":[1607,1605,1580],"64916":[1607,1605,1605],"64917":[1606,1581,1605],"64918":[1606,1581,1609],"64919":[1606,1580,1605],"64921":[1606,1580,1609],"64922":[1606,1605,1610],"64923":[1606,1605,1609],"64924":[1610,1605,1605],"64926":[1576,1582,1610],"64927":[1578,1580,1610],"64928":[1578,1580,1609],"64929":[1578,1582,1610],"64930":[1578,1582,1609],"64931":[1578,1605,1610],"64932":[1578,1605,1609],"64933":[1580,1605,1610],"64934":[1580,1581,1609],"64935":[1580,1605,1609],"64936":[1587,1582,1609],"64937":[1589,1581,1610],"64938":[1588,1581,1610],"64939":[1590,1581,1610],"64940":[1604,1580,1610],"64941":[1604,1605,1610],"64942":[1610,1581,1610],"64943":[1610,1580,1610],"64944":[1610,1605,1610],"64945":[1605,1605,1610],"64946":[1602,1605,1610],"64947":[1606,1581,1610],"64948":[1602,1605,1581],"64949":[1604,1581,1605],"64950":[1593,1605,1610],"64951":[1603,1605,1610],"64952":[1606,1580,1581],"64953":[1605,1582,1610],"64954":[1604,1580,1605],"64955":[1603,1605,1605],"64956":[1604,1580,1605],"64957":[1606,1580,1581],"64958":[1580,1581,1610],"64959":[1581,1580,1610],"64960":[1605,1580,1610],"64961":[1601,1605,1610],"64962":[1576,1581,1610],"64963":[1603,1605,1605],"64964":[1593,1580,1605],"64965":[1589,1605,1605],"64966":[1587,1582,1610],"64967":[1606,1580,1610],"65008":[1589,1604,1746],"65009":[1602,1604,1746],"65010":[1575,1604,1604,1607],"65011":[1575,1603,1576,1585],"65012":[1605,1581,1605,1583],"65013":[1589,1604,1593,1605],"65014":[1585,1587,1608,1604],"65015":[1593,1604,1610,1607],"65016":[1608,1587,1604,1605],"65017":[1589,1604,1609],"65018":[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],"65019":[1580,1604,32,1580,1604,1575,1604,1607],"65020":[1585,1740,1575,1604],"65040":[44],"65041":[12289],"65043":[58],"65044":[59],"65045":[33],"65046":[63],"65047":[12310],"65048":[12311],"65073":[8212],"65074":[8211],"65075":[95],"65077":[40],"65078":[41],"65079":[123],"65080":[125],"65081":[12308],"65082":[12309],"65083":[12304],"65084":[12305],"65085":[12298],"65086":[12299],"65087":[12296],"65088":[12297],"65089":[12300],"65090":[12301],"65091":[12302],"65092":[12303],"65095":[91],"65096":[93],"65097":[32,773],"65101":[95],"65104":[44],"65105":[12289],"65108":[59],"65109":[58],"65110":[63],"65111":[33],"65112":[8212],"65113":[40],"65114":[41],"65115":[123],"65116":[125],"65117":[12308],"65118":[12309],"65119":[35],"65120":[38],"65121":[42],"65122":[43],"65123":[45],"65124":[60],"65125":[62],"65126":[61],"65128":[92],"65129":[36],"65130":[37],"65131":[64],"65136":[32,1611],"65137":[1600,1611],"65138":[32,1612],"65140":[32,1613],"65142":[32,1614],"65143":[1600,1614],"65144":[32,1615],"65145":[1600,1615],"65146":[32,1616],"65147":[1600,1616],"65148":[32,1617],"65149":[1600,1617],"65150":[32,1618],"65151":[1600,1618],"65152":[1569],"65153":[1570],"65155":[1571],"65157":[1572],"65159":[1573],"65161":[1574],"65165":[1575],"65167":[1576],"65171":[1577],"65173":[1578],"65177":[1579],"65181":[1580],"65185":[1581],"65189":[1582],"65193":[1583],"65195":[1584],"65197":[1585],"65199":[1586],"65201":[1587],"65205":[1588],"65209":[1589],"65213":[1590],"65217":[1591],"65221":[1592],"65225":[1593],"65229":[1594],"65233":[1601],"65237":[1602],"65241":[1603],"65245":[1604],"65249":[1605],"65253":[1606],"65257":[1607],"65261":[1608],"65263":[1609],"65265":[1610],"65269":[1604,1570],"65271":[1604,1571],"65273":[1604,1573],"65275":[1604,1575],"65281":[33],"65282":[34],"65283":[35],"65284":[36],"65285":[37],"65286":[38],"65287":[39],"65288":[40],"65289":[41],"65290":[42],"65291":[43],"65292":[44],"65293":[45],"65294":[46],"65295":[47],"65296":[48],"65297":[49],"65298":[50],"65299":[51],"65300":[52],"65301":[53],"65302":[54],"65303":[55],"65304":[56],"65305":[57],"65306":[58],"65307":[59],"65308":[60],"65309":[61],"65310":[62],"65311":[63],"65312":[64],"65313":[97],"65314":[98],"65315":[99],"65316":[100],"65317":[101],"65318":[102],"65319":[103],"65320":[104],"65321":[105],"65322":[106],"65323":[107],"65324":[108],"65325":[109],"65326":[110],"65327":[111],"65328":[112],"65329":[113],"65330":[114],"65331":[115],"65332":[116],"65333":[117],"65334":[118],"65335":[119],"65336":[120],"65337":[121],"65338":[122],"65339":[91],"65340":[92],"65341":[93],"65342":[94],"65343":[95],"65344":[96],"65345":[97],"65346":[98],"65347":[99],"65348":[100],"65349":[101],"65350":[102],"65351":[103],"65352":[104],"65353":[105],"65354":[106],"65355":[107],"65356":[108],"65357":[109],"65358":[110],"65359":[111],"65360":[112],"65361":[113],"65362":[114],"65363":[115],"65364":[116],"65365":[117],"65366":[118],"65367":[119],"65368":[120],"65369":[121],"65370":[122],"65371":[123],"65372":[124],"65373":[125],"65374":[126],"65375":[10629],"65376":[10630],"65377":[46],"65378":[12300],"65379":[12301],"65380":[12289],"65381":[12539],"65382":[12530],"65383":[12449],"65384":[12451],"65385":[12453],"65386":[12455],"65387":[12457],"65388":[12515],"65389":[12517],"65390":[12519],"65391":[12483],"65392":[12540],"65393":[12450],"65394":[12452],"65395":[12454],"65396":[12456],"65397":[12458],"65398":[12459],"65399":[12461],"65400":[12463],"65401":[12465],"65402":[12467],"65403":[12469],"65404":[12471],"65405":[12473],"65406":[12475],"65407":[12477],"65408":[12479],"65409":[12481],"65410":[12484],"65411":[12486],"65412":[12488],"65413":[12490],"65414":[12491],"65415":[12492],"65416":[12493],"65417":[12494],"65418":[12495],"65419":[12498],"65420":[12501],"65421":[12504],"65422":[12507],"65423":[12510],"65424":[12511],"65425":[12512],"65426":[12513],"65427":[12514],"65428":[12516],"65429":[12518],"65430":[12520],"65431":[12521],"65432":[12522],"65433":[12523],"65434":[12524],"65435":[12525],"65436":[12527],"65437":[12531],"65438":[12441],"65439":[12442],"65441":[4352],"65442":[4353],"65443":[4522],"65444":[4354],"65445":[4524],"65446":[4525],"65447":[4355],"65448":[4356],"65449":[4357],"65450":[4528],"65451":[4529],"65452":[4530],"65453":[4531],"65454":[4532],"65455":[4533],"65456":[4378],"65457":[4358],"65458":[4359],"65459":[4360],"65460":[4385],"65461":[4361],"65462":[4362],"65463":[4363],"65464":[4364],"65465":[4365],"65466":[4366],"65467":[4367],"65468":[4368],"65469":[4369],"65470":[4370],"65474":[4449],"65475":[4450],"65476":[4451],"65477":[4452],"65478":[4453],"65479":[4454],"65482":[4455],"65483":[4456],"65484":[4457],"65485":[4458],"65486":[4459],"65487":[4460],"65490":[4461],"65491":[4462],"65492":[4463],"65493":[4464],"65494":[4465],"65495":[4466],"65498":[4467],"65499":[4468],"65500":[4469],"65504":[162],"65505":[163],"65506":[172],"65507":[32,772],"65508":[166],"65509":[165],"65510":[8361],"65512":[9474],"65513":[8592],"65514":[8593],"65515":[8594],"65516":[8595],"65517":[9632],"65518":[9675],"66560":[66600],"66561":[66601],"66562":[66602],"66563":[66603],"66564":[66604],"66565":[66605],"66566":[66606],"66567":[66607],"66568":[66608],"66569":[66609],"66570":[66610],"66571":[66611],"66572":[66612],"66573":[66613],"66574":[66614],"66575":[66615],"66576":[66616],"66577":[66617],"66578":[66618],"66579":[66619],"66580":[66620],"66581":[66621],"66582":[66622],"66583":[66623],"66584":[66624],"66585":[66625],"66586":[66626],"66587":[66627],"66588":[66628],"66589":[66629],"66590":[66630],"66591":[66631],"66592":[66632],"66593":[66633],"66594":[66634],"66595":[66635],"66596":[66636],"66597":[66637],"66598":[66638],"66599":[66639],"66736":[66776],"66737":[66777],"66738":[66778],"66739":[66779],"66740":[66780],"66741":[66781],"66742":[66782],"66743":[66783],"66744":[66784],"66745":[66785],"66746":[66786],"66747":[66787],"66748":[66788],"66749":[66789],"66750":[66790],"66751":[66791],"66752":[66792],"66753":[66793],"66754":[66794],"66755":[66795],"66756":[66796],"66757":[66797],"66758":[66798],"66759":[66799],"66760":[66800],"66761":[66801],"66762":[66802],"66763":[66803],"66764":[66804],"66765":[66805],"66766":[66806],"66767":[66807],"66768":[66808],"66769":[66809],"66770":[66810],"66771":[66811],"66928":[66967],"66929":[66968],"66930":[66969],"66931":[66970],"66932":[66971],"66933":[66972],"66934":[66973],"66935":[66974],"66936":[66975],"66937":[66976],"66938":[66977],"66940":[66979],"66941":[66980],"66942":[66981],"66943":[66982],"66944":[66983],"66945":[66984],"66946":[66985],"66947":[66986],"66948":[66987],"66949":[66988],"66950":[66989],"66951":[66990],"66952":[66991],"66953":[66992],"66954":[66993],"66956":[66995],"66957":[66996],"66958":[66997],"66959":[66998],"66960":[66999],"66961":[67000],"66962":[67001],"66964":[67003],"66965":[67004],"67457":[720],"67458":[721],"67459":[230],"67460":[665],"67461":[595],"67463":[675],"67464":[43878],"67465":[677],"67466":[676],"67467":[598],"67468":[599],"67469":[7569],"67470":[600],"67471":[606],"67472":[681],"67473":[612],"67474":[610],"67475":[608],"67476":[667],"67477":[295],"67478":[668],"67479":[615],"67480":[644],"67481":[682],"67482":[683],"67483":[620],"67484":[122628],"67485":[42894],"67486":[622],"67487":[122629],"67488":[654],"67489":[122630],"67490":[248],"67491":[630],"67492":[631],"67493":[113],"67494":[634],"67495":[122632],"67496":[637],"67497":[638],"67498":[640],"67499":[680],"67500":[678],"67501":[43879],"67502":[679],"67503":[648],"67504":[11377],"67506":[655],"67507":[673],"67508":[674],"67509":[664],"67510":[448],"67511":[449],"67512":[450],"67513":[122634],"67514":[122654],"68736":[68800],"68737":[68801],"68738":[68802],"68739":[68803],"68740":[68804],"68741":[68805],"68742":[68806],"68743":[68807],"68744":[68808],"68745":[68809],"68746":[68810],"68747":[68811],"68748":[68812],"68749":[68813],"68750":[68814],"68751":[68815],"68752":[68816],"68753":[68817],"68754":[68818],"68755":[68819],"68756":[68820],"68757":[68821],"68758":[68822],"68759":[68823],"68760":[68824],"68761":[68825],"68762":[68826],"68763":[68827],"68764":[68828],"68765":[68829],"68766":[68830],"68767":[68831],"68768":[68832],"68769":[68833],"68770":[68834],"68771":[68835],"68772":[68836],"68773":[68837],"68774":[68838],"68775":[68839],"68776":[68840],"68777":[68841],"68778":[68842],"68779":[68843],"68780":[68844],"68781":[68845],"68782":[68846],"68783":[68847],"68784":[68848],"68785":[68849],"68786":[68850],"71840":[71872],"71841":[71873],"71842":[71874],"71843":[71875],"71844":[71876],"71845":[71877],"71846":[71878],"71847":[71879],"71848":[71880],"71849":[71881],"71850":[71882],"71851":[71883],"71852":[71884],"71853":[71885],"71854":[71886],"71855":[71887],"71856":[71888],"71857":[71889],"71858":[71890],"71859":[71891],"71860":[71892],"71861":[71893],"71862":[71894],"71863":[71895],"71864":[71896],"71865":[71897],"71866":[71898],"71867":[71899],"71868":[71900],"71869":[71901],"71870":[71902],"71871":[71903],"93760":[93792],"93761":[93793],"93762":[93794],"93763":[93795],"93764":[93796],"93765":[93797],"93766":[93798],"93767":[93799],"93768":[93800],"93769":[93801],"93770":[93802],"93771":[93803],"93772":[93804],"93773":[93805],"93774":[93806],"93775":[93807],"93776":[93808],"93777":[93809],"93778":[93810],"93779":[93811],"93780":[93812],"93781":[93813],"93782":[93814],"93783":[93815],"93784":[93816],"93785":[93817],"93786":[93818],"93787":[93819],"93788":[93820],"93789":[93821],"93790":[93822],"93791":[93823],"119134":[119127,119141],"119135":[119128,119141],"119136":[119128,119141,119150],"119137":[119128,119141,119151],"119138":[119128,119141,119152],"119139":[119128,119141,119153],"119140":[119128,119141,119154],"119227":[119225,119141],"119228":[119226,119141],"119229":[119225,119141,119150],"119230":[119226,119141,119150],"119231":[119225,119141,119151],"119232":[119226,119141,119151],"119808":[97],"119809":[98],"119810":[99],"119811":[100],"119812":[101],"119813":[102],"119814":[103],"119815":[104],"119816":[105],"119817":[106],"119818":[107],"119819":[108],"119820":[109],"119821":[110],"119822":[111],"119823":[112],"119824":[113],"119825":[114],"119826":[115],"119827":[116],"119828":[117],"119829":[118],"119830":[119],"119831":[120],"119832":[121],"119833":[122],"119834":[97],"119835":[98],"119836":[99],"119837":[100],"119838":[101],"119839":[102],"119840":[103],"119841":[104],"119842":[105],"119843":[106],"119844":[107],"119845":[108],"119846":[109],"119847":[110],"119848":[111],"119849":[112],"119850":[113],"119851":[114],"119852":[115],"119853":[116],"119854":[117],"119855":[118],"119856":[119],"119857":[120],"119858":[121],"119859":[122],"119860":[97],"119861":[98],"119862":[99],"119863":[100],"119864":[101],"119865":[102],"119866":[103],"119867":[104],"119868":[105],"119869":[106],"119870":[107],"119871":[108],"119872":[109],"119873":[110],"119874":[111],"119875":[112],"119876":[113],"119877":[114],"119878":[115],"119879":[116],"119880":[117],"119881":[118],"119882":[119],"119883":[120],"119884":[121],"119885":[122],"119886":[97],"119887":[98],"119888":[99],"119889":[100],"119890":[101],"119891":[102],"119892":[103],"119894":[105],"119895":[106],"119896":[107],"119897":[108],"119898":[109],"119899":[110],"119900":[111],"119901":[112],"119902":[113],"119903":[114],"119904":[115],"119905":[116],"119906":[117],"119907":[118],"119908":[119],"119909":[120],"119910":[121],"119911":[122],"119912":[97],"119913":[98],"119914":[99],"119915":[100],"119916":[101],"119917":[102],"119918":[103],"119919":[104],"119920":[105],"119921":[106],"119922":[107],"119923":[108],"119924":[109],"119925":[110],"119926":[111],"119927":[112],"119928":[113],"119929":[114],"119930":[115],"119931":[116],"119932":[117],"119933":[118],"119934":[119],"119935":[120],"119936":[121],"119937":[122],"119938":[97],"119939":[98],"119940":[99],"119941":[100],"119942":[101],"119943":[102],"119944":[103],"119945":[104],"119946":[105],"119947":[106],"119948":[107],"119949":[108],"119950":[109],"119951":[110],"119952":[111],"119953":[112],"119954":[113],"119955":[114],"119956":[115],"119957":[116],"119958":[117],"119959":[118],"119960":[119],"119961":[120],"119962":[121],"119963":[122],"119964":[97],"119966":[99],"119967":[100],"119970":[103],"119973":[106],"119974":[107],"119977":[110],"119978":[111],"119979":[112],"119980":[113],"119982":[115],"119983":[116],"119984":[117],"119985":[118],"119986":[119],"119987":[120],"119988":[121],"119989":[122],"119990":[97],"119991":[98],"119992":[99],"119993":[100],"119995":[102],"119997":[104],"119998":[105],"119999":[106],"120000":[107],"120001":[108],"120002":[109],"120003":[110],"120005":[112],"120006":[113],"120007":[114],"120008":[115],"120009":[116],"120010":[117],"120011":[118],"120012":[119],"120013":[120],"120014":[121],"120015":[122],"120016":[97],"120017":[98],"120018":[99],"120019":[100],"120020":[101],"120021":[102],"120022":[103],"120023":[104],"120024":[105],"120025":[106],"120026":[107],"120027":[108],"120028":[109],"120029":[110],"120030":[111],"120031":[112],"120032":[113],"120033":[114],"120034":[115],"120035":[116],"120036":[117],"120037":[118],"120038":[119],"120039":[120],"120040":[121],"120041":[122],"120042":[97],"120043":[98],"120044":[99],"120045":[100],"120046":[101],"120047":[102],"120048":[103],"120049":[104],"120050":[105],"120051":[106],"120052":[107],"120053":[108],"120054":[109],"120055":[110],"120056":[111],"120057":[112],"120058":[113],"120059":[114],"120060":[115],"120061":[116],"120062":[117],"120063":[118],"120064":[119],"120065":[120],"120066":[121],"120067":[122],"120068":[97],"120069":[98],"120071":[100],"120072":[101],"120073":[102],"120074":[103],"120077":[106],"120078":[107],"120079":[108],"120080":[109],"120081":[110],"120082":[111],"120083":[112],"120084":[113],"120086":[115],"120087":[116],"120088":[117],"120089":[118],"120090":[119],"120091":[120],"120092":[121],"120094":[97],"120095":[98],"120096":[99],"120097":[100],"120098":[101],"120099":[102],"120100":[103],"120101":[104],"120102":[105],"120103":[106],"120104":[107],"120105":[108],"120106":[109],"120107":[110],"120108":[111],"120109":[112],"120110":[113],"120111":[114],"120112":[115],"120113":[116],"120114":[117],"120115":[118],"120116":[119],"120117":[120],"120118":[121],"120119":[122],"120120":[97],"120121":[98],"120123":[100],"120124":[101],"120125":[102],"120126":[103],"120128":[105],"120129":[106],"120130":[107],"120131":[108],"120132":[109],"120134":[111],"120138":[115],"120139":[116],"120140":[117],"120141":[118],"120142":[119],"120143":[120],"120144":[121],"120146":[97],"120147":[98],"120148":[99],"120149":[100],"120150":[101],"120151":[102],"120152":[103],"120153":[104],"120154":[105],"120155":[106],"120156":[107],"120157":[108],"120158":[109],"120159":[110],"120160":[111],"120161":[112],"120162":[113],"120163":[114],"120164":[115],"120165":[116],"120166":[117],"120167":[118],"120168":[119],"120169":[120],"120170":[121],"120171":[122],"120172":[97],"120173":[98],"120174":[99],"120175":[100],"120176":[101],"120177":[102],"120178":[103],"120179":[104],"120180":[105],"120181":[106],"120182":[107],"120183":[108],"120184":[109],"120185":[110],"120186":[111],"120187":[112],"120188":[113],"120189":[114],"120190":[115],"120191":[116],"120192":[117],"120193":[118],"120194":[119],"120195":[120],"120196":[121],"120197":[122],"120198":[97],"120199":[98],"120200":[99],"120201":[100],"120202":[101],"120203":[102],"120204":[103],"120205":[104],"120206":[105],"120207":[106],"120208":[107],"120209":[108],"120210":[109],"120211":[110],"120212":[111],"120213":[112],"120214":[113],"120215":[114],"120216":[115],"120217":[116],"120218":[117],"120219":[118],"120220":[119],"120221":[120],"120222":[121],"120223":[122],"120224":[97],"120225":[98],"120226":[99],"120227":[100],"120228":[101],"120229":[102],"120230":[103],"120231":[104],"120232":[105],"120233":[106],"120234":[107],"120235":[108],"120236":[109],"120237":[110],"120238":[111],"120239":[112],"120240":[113],"120241":[114],"120242":[115],"120243":[116],"120244":[117],"120245":[118],"120246":[119],"120247":[120],"120248":[121],"120249":[122],"120250":[97],"120251":[98],"120252":[99],"120253":[100],"120254":[101],"120255":[102],"120256":[103],"120257":[104],"120258":[105],"120259":[106],"120260":[107],"120261":[108],"120262":[109],"120263":[110],"120264":[111],"120265":[112],"120266":[113],"120267":[114],"120268":[115],"120269":[116],"120270":[117],"120271":[118],"120272":[119],"120273":[120],"120274":[121],"120275":[122],"120276":[97],"120277":[98],"120278":[99],"120279":[100],"120280":[101],"120281":[102],"120282":[103],"120283":[104],"120284":[105],"120285":[106],"120286":[107],"120287":[108],"120288":[109],"120289":[110],"120290":[111],"120291":[112],"120292":[113],"120293":[114],"120294":[115],"120295":[116],"120296":[117],"120297":[118],"120298":[119],"120299":[120],"120300":[121],"120301":[122],"120302":[97],"120303":[98],"120304":[99],"120305":[100],"120306":[101],"120307":[102],"120308":[103],"120309":[104],"120310":[105],"120311":[106],"120312":[107],"120313":[108],"120314":[109],"120315":[110],"120316":[111],"120317":[112],"120318":[113],"120319":[114],"120320":[115],"120321":[116],"120322":[117],"120323":[118],"120324":[119],"120325":[120],"120326":[121],"120327":[122],"120328":[97],"120329":[98],"120330":[99],"120331":[100],"120332":[101],"120333":[102],"120334":[103],"120335":[104],"120336":[105],"120337":[106],"120338":[107],"120339":[108],"120340":[109],"120341":[110],"120342":[111],"120343":[112],"120344":[113],"120345":[114],"120346":[115],"120347":[116],"120348":[117],"120349":[118],"120350":[119],"120351":[120],"120352":[121],"120353":[122],"120354":[97],"120355":[98],"120356":[99],"120357":[100],"120358":[101],"120359":[102],"120360":[103],"120361":[104],"120362":[105],"120363":[106],"120364":[107],"120365":[108],"120366":[109],"120367":[110],"120368":[111],"120369":[112],"120370":[113],"120371":[114],"120372":[115],"120373":[116],"120374":[117],"120375":[118],"120376":[119],"120377":[120],"120378":[121],"120379":[122],"120380":[97],"120381":[98],"120382":[99],"120383":[100],"120384":[101],"120385":[102],"120386":[103],"120387":[104],"120388":[105],"120389":[106],"120390":[107],"120391":[108],"120392":[109],"120393":[110],"120394":[111],"120395":[112],"120396":[113],"120397":[114],"120398":[115],"120399":[116],"120400":[117],"120401":[118],"120402":[119],"120403":[120],"120404":[121],"120405":[122],"120406":[97],"120407":[98],"120408":[99],"120409":[100],"120410":[101],"120411":[102],"120412":[103],"120413":[104],"120414":[105],"120415":[106],"120416":[107],"120417":[108],"120418":[109],"120419":[110],"120420":[111],"120421":[112],"120422":[113],"120423":[114],"120424":[115],"120425":[116],"120426":[117],"120427":[118],"120428":[119],"120429":[120],"120430":[121],"120431":[122],"120432":[97],"120433":[98],"120434":[99],"120435":[100],"120436":[101],"120437":[102],"120438":[103],"120439":[104],"120440":[105],"120441":[106],"120442":[107],"120443":[108],"120444":[109],"120445":[110],"120446":[111],"120447":[112],"120448":[113],"120449":[114],"120450":[115],"120451":[116],"120452":[117],"120453":[118],"120454":[119],"120455":[120],"120456":[121],"120457":[122],"120458":[97],"120459":[98],"120460":[99],"120461":[100],"120462":[101],"120463":[102],"120464":[103],"120465":[104],"120466":[105],"120467":[106],"120468":[107],"120469":[108],"120470":[109],"120471":[110],"120472":[111],"120473":[112],"120474":[113],"120475":[114],"120476":[115],"120477":[116],"120478":[117],"120479":[118],"120480":[119],"120481":[120],"120482":[121],"120483":[122],"120484":[305],"120485":[567],"120488":[945],"120489":[946],"120490":[947],"120491":[948],"120492":[949],"120493":[950],"120494":[951],"120495":[952],"120496":[953],"120497":[954],"120498":[955],"120499":[956],"120500":[957],"120501":[958],"120502":[959],"120503":[960],"120504":[961],"120505":[952],"120506":[963],"120507":[964],"120508":[965],"120509":[966],"120510":[967],"120511":[968],"120512":[969],"120513":[8711],"120514":[945],"120515":[946],"120516":[947],"120517":[948],"120518":[949],"120519":[950],"120520":[951],"120521":[952],"120522":[953],"120523":[954],"120524":[955],"120525":[956],"120526":[957],"120527":[958],"120528":[959],"120529":[960],"120530":[961],"120531":[963],"120533":[964],"120534":[965],"120535":[966],"120536":[967],"120537":[968],"120538":[969],"120539":[8706],"120540":[949],"120541":[952],"120542":[954],"120543":[966],"120544":[961],"120545":[960],"120546":[945],"120547":[946],"120548":[947],"120549":[948],"120550":[949],"120551":[950],"120552":[951],"120553":[952],"120554":[953],"120555":[954],"120556":[955],"120557":[956],"120558":[957],"120559":[958],"120560":[959],"120561":[960],"120562":[961],"120563":[952],"120564":[963],"120565":[964],"120566":[965],"120567":[966],"120568":[967],"120569":[968],"120570":[969],"120571":[8711],"120572":[945],"120573":[946],"120574":[947],"120575":[948],"120576":[949],"120577":[950],"120578":[951],"120579":[952],"120580":[953],"120581":[954],"120582":[955],"120583":[956],"120584":[957],"120585":[958],"120586":[959],"120587":[960],"120588":[961],"120589":[963],"120591":[964],"120592":[965],"120593":[966],"120594":[967],"120595":[968],"120596":[969],"120597":[8706],"120598":[949],"120599":[952],"120600":[954],"120601":[966],"120602":[961],"120603":[960],"120604":[945],"120605":[946],"120606":[947],"120607":[948],"120608":[949],"120609":[950],"120610":[951],"120611":[952],"120612":[953],"120613":[954],"120614":[955],"120615":[956],"120616":[957],"120617":[958],"120618":[959],"120619":[960],"120620":[961],"120621":[952],"120622":[963],"120623":[964],"120624":[965],"120625":[966],"120626":[967],"120627":[968],"120628":[969],"120629":[8711],"120630":[945],"120631":[946],"120632":[947],"120633":[948],"120634":[949],"120635":[950],"120636":[951],"120637":[952],"120638":[953],"120639":[954],"120640":[955],"120641":[956],"120642":[957],"120643":[958],"120644":[959],"120645":[960],"120646":[961],"120647":[963],"120649":[964],"120650":[965],"120651":[966],"120652":[967],"120653":[968],"120654":[969],"120655":[8706],"120656":[949],"120657":[952],"120658":[954],"120659":[966],"120660":[961],"120661":[960],"120662":[945],"120663":[946],"120664":[947],"120665":[948],"120666":[949],"120667":[950],"120668":[951],"120669":[952],"120670":[953],"120671":[954],"120672":[955],"120673":[956],"120674":[957],"120675":[958],"120676":[959],"120677":[960],"120678":[961],"120679":[952],"120680":[963],"120681":[964],"120682":[965],"120683":[966],"120684":[967],"120685":[968],"120686":[969],"120687":[8711],"120688":[945],"120689":[946],"120690":[947],"120691":[948],"120692":[949],"120693":[950],"120694":[951],"120695":[952],"120696":[953],"120697":[954],"120698":[955],"120699":[956],"120700":[957],"120701":[958],"120702":[959],"120703":[960],"120704":[961],"120705":[963],"120707":[964],"120708":[965],"120709":[966],"120710":[967],"120711":[968],"120712":[969],"120713":[8706],"120714":[949],"120715":[952],"120716":[954],"120717":[966],"120718":[961],"120719":[960],"120720":[945],"120721":[946],"120722":[947],"120723":[948],"120724":[949],"120725":[950],"120726":[951],"120727":[952],"120728":[953],"120729":[954],"120730":[955],"120731":[956],"120732":[957],"120733":[958],"120734":[959],"120735":[960],"120736":[961],"120737":[952],"120738":[963],"120739":[964],"120740":[965],"120741":[966],"120742":[967],"120743":[968],"120744":[969],"120745":[8711],"120746":[945],"120747":[946],"120748":[947],"120749":[948],"120750":[949],"120751":[950],"120752":[951],"120753":[952],"120754":[953],"120755":[954],"120756":[955],"120757":[956],"120758":[957],"120759":[958],"120760":[959],"120761":[960],"120762":[961],"120763":[963],"120765":[964],"120766":[965],"120767":[966],"120768":[967],"120769":[968],"120770":[969],"120771":[8706],"120772":[949],"120773":[952],"120774":[954],"120775":[966],"120776":[961],"120777":[960],"120778":[989],"120782":[48],"120783":[49],"120784":[50],"120785":[51],"120786":[52],"120787":[53],"120788":[54],"120789":[55],"120790":[56],"120791":[57],"120792":[48],"120793":[49],"120794":[50],"120795":[51],"120796":[52],"120797":[53],"120798":[54],"120799":[55],"120800":[56],"120801":[57],"120802":[48],"120803":[49],"120804":[50],"120805":[51],"120806":[52],"120807":[53],"120808":[54],"120809":[55],"120810":[56],"120811":[57],"120812":[48],"120813":[49],"120814":[50],"120815":[51],"120816":[52],"120817":[53],"120818":[54],"120819":[55],"120820":[56],"120821":[57],"120822":[48],"120823":[49],"120824":[50],"120825":[51],"120826":[52],"120827":[53],"120828":[54],"120829":[55],"120830":[56],"120831":[57],"122928":[1072],"122929":[1073],"122930":[1074],"122931":[1075],"122932":[1076],"122933":[1077],"122934":[1078],"122935":[1079],"122936":[1080],"122937":[1082],"122938":[1083],"122939":[1084],"122940":[1086],"122941":[1087],"122942":[1088],"122943":[1089],"122944":[1090],"122945":[1091],"122946":[1092],"122947":[1093],"122948":[1094],"122949":[1095],"122950":[1096],"122951":[1099],"122952":[1101],"122953":[1102],"122954":[42633],"122955":[1241],"122956":[1110],"122957":[1112],"122958":[1257],"122959":[1199],"122960":[1231],"122961":[1072],"122962":[1073],"122963":[1074],"122964":[1075],"122965":[1076],"122966":[1077],"122967":[1078],"122968":[1079],"122969":[1080],"122970":[1082],"122971":[1083],"122972":[1086],"122973":[1087],"122974":[1089],"122975":[1091],"122976":[1092],"122977":[1093],"122978":[1094],"122979":[1095],"122980":[1096],"122981":[1098],"122982":[1099],"122983":[1169],"122984":[1110],"122985":[1109],"122986":[1119],"122987":[1195],"122988":[42577],"122989":[1201],"125184":[125218],"125185":[125219],"125186":[125220],"125187":[125221],"125188":[125222],"125189":[125223],"125190":[125224],"125191":[125225],"125192":[125226],"125193":[125227],"125194":[125228],"125195":[125229],"125196":[125230],"125197":[125231],"125198":[125232],"125199":[125233],"125200":[125234],"125201":[125235],"125202":[125236],"125203":[125237],"125204":[125238],"125205":[125239],"125206":[125240],"125207":[125241],"125208":[125242],"125209":[125243],"125210":[125244],"125211":[125245],"125212":[125246],"125213":[125247],"125214":[125248],"125215":[125249],"125216":[125250],"125217":[125251],"126464":[1575],"126465":[1576],"126466":[1580],"126467":[1583],"126469":[1608],"126470":[1586],"126471":[1581],"126472":[1591],"126473":[1610],"126474":[1603],"126475":[1604],"126476":[1605],"126477":[1606],"126478":[1587],"126479":[1593],"126480":[1601],"126481":[1589],"126482":[1602],"126483":[1585],"126484":[1588],"126485":[1578],"126486":[1579],"126487":[1582],"126488":[1584],"126489":[1590],"126490":[1592],"126491":[1594],"126492":[1646],"126493":[1722],"126494":[1697],"126495":[1647],"126497":[1576],"126498":[1580],"126500":[1607],"126503":[1581],"126505":[1610],"126506":[1603],"126507":[1604],"126508":[1605],"126509":[1606],"126510":[1587],"126511":[1593],"126512":[1601],"126513":[1589],"126514":[1602],"126516":[1588],"126517":[1578],"126518":[1579],"126519":[1582],"126521":[1590],"126523":[1594],"126530":[1580],"126535":[1581],"126537":[1610],"126539":[1604],"126541":[1606],"126542":[1587],"126543":[1593],"126545":[1589],"126546":[1602],"126548":[1588],"126551":[1582],"126553":[1590],"126555":[1594],"126557":[1722],"126559":[1647],"126561":[1576],"126562":[1580],"126564":[1607],"126567":[1581],"126568":[1591],"126569":[1610],"126570":[1603],"126572":[1605],"126573":[1606],"126574":[1587],"126575":[1593],"126576":[1601],"126577":[1589],"126578":[1602],"126580":[1588],"126581":[1578],"126582":[1579],"126583":[1582],"126585":[1590],"126586":[1592],"126587":[1594],"126588":[1646],"126590":[1697],"126592":[1575],"126593":[1576],"126594":[1580],"126595":[1583],"126596":[1607],"126597":[1608],"126598":[1586],"126599":[1581],"126600":[1591],"126601":[1610],"126603":[1604],"126604":[1605],"126605":[1606],"126606":[1587],"126607":[1593],"126608":[1601],"126609":[1589],"126610":[1602],"126611":[1585],"126612":[1588],"126613":[1578],"126614":[1579],"126615":[1582],"126616":[1584],"126617":[1590],"126618":[1592],"126619":[1594],"126625":[1576],"126626":[1580],"126627":[1583],"126629":[1608],"126630":[1586],"126631":[1581],"126632":[1591],"126633":[1610],"126635":[1604],"126636":[1605],"126637":[1606],"126638":[1587],"126639":[1593],"126640":[1601],"126641":[1589],"126642":[1602],"126643":[1585],"126644":[1588],"126645":[1578],"126646":[1579],"126647":[1582],"126648":[1584],"126649":[1590],"126650":[1592],"126651":[1594],"127233":[48,44],"127234":[49,44],"127235":[50,44],"127236":[51,44],"127237":[52,44],"127238":[53,44],"127239":[54,44],"127240":[55,44],"127241":[56,44],"127242":[57,44],"127248":[40,97,41],"127249":[40,98,41],"127250":[40,99,41],"127251":[40,100,41],"127252":[40,101,41],"127253":[40,102,41],"127254":[40,103,41],"127255":[40,104,41],"127256":[40,105,41],"127257":[40,106,41],"127258":[40,107,41],"127259":[40,108,41],"127260":[40,109,41],"127261":[40,110,41],"127262":[40,111,41],"127263":[40,112,41],"127264":[40,113,41],"127265":[40,114,41],"127266":[40,115,41],"127267":[40,116,41],"127268":[40,117,41],"127269":[40,118,41],"127270":[40,119,41],"127271":[40,120,41],"127272":[40,121,41],"127273":[40,122,41],"127274":[12308,115,12309],"127275":[99],"127276":[114],"127277":[99,100],"127278":[119,122],"127280":[97],"127281":[98],"127282":[99],"127283":[100],"127284":[101],"127285":[102],"127286":[103],"127287":[104],"127288":[105],"127289":[106],"127290":[107],"127291":[108],"127292":[109],"127293":[110],"127294":[111],"127295":[112],"127296":[113],"127297":[114],"127298":[115],"127299":[116],"127300":[117],"127301":[118],"127302":[119],"127303":[120],"127304":[121],"127305":[122],"127306":[104,118],"127307":[109,118],"127308":[115,100],"127309":[115,115],"127310":[112,112,118],"127311":[119,99],"127338":[109,99],"127339":[109,100],"127340":[109,114],"127376":[100,106],"127488":[12411,12363],"127489":[12467,12467],"127490":[12469],"127504":[25163],"127505":[23383],"127506":[21452],"127507":[12487],"127508":[20108],"127509":[22810],"127510":[35299],"127511":[22825],"127512":[20132],"127513":[26144],"127514":[28961],"127515":[26009],"127516":[21069],"127517":[24460],"127518":[20877],"127519":[26032],"127520":[21021],"127521":[32066],"127522":[29983],"127523":[36009],"127524":[22768],"127525":[21561],"127526":[28436],"127527":[25237],"127528":[25429],"127529":[19968],"127530":[19977],"127531":[36938],"127532":[24038],"127533":[20013],"127534":[21491],"127535":[25351],"127536":[36208],"127537":[25171],"127538":[31105],"127539":[31354],"127540":[21512],"127541":[28288],"127542":[26377],"127543":[26376],"127544":[30003],"127545":[21106],"127546":[21942],"127547":[37197],"127552":[12308,26412,12309],"127553":[12308,19977,12309],"127554":[12308,20108,12309],"127555":[12308,23433,12309],"127556":[12308,28857,12309],"127557":[12308,25171,12309],"127558":[12308,30423,12309],"127559":[12308,21213,12309],"127560":[12308,25943,12309],"127568":[24471],"127569":[21487],"130032":[48],"130033":[49],"130034":[50],"130035":[51],"130036":[52],"130037":[53],"130038":[54],"130039":[55],"130040":[56],"130041":[57],"194560":[20029],"194561":[20024],"194562":[20033],"194563":[131362],"194564":[20320],"194565":[20398],"194566":[20411],"194567":[20482],"194568":[20602],"194569":[20633],"194570":[20711],"194571":[20687],"194572":[13470],"194573":[132666],"194574":[20813],"194575":[20820],"194576":[20836],"194577":[20855],"194578":[132380],"194579":[13497],"194580":[20839],"194581":[20877],"194582":[132427],"194583":[20887],"194584":[20900],"194585":[20172],"194586":[20908],"194587":[20917],"194588":[168415],"194589":[20981],"194590":[20995],"194591":[13535],"194592":[21051],"194593":[21062],"194594":[21106],"194595":[21111],"194596":[13589],"194597":[21191],"194598":[21193],"194599":[21220],"194600":[21242],"194601":[21253],"194602":[21254],"194603":[21271],"194604":[21321],"194605":[21329],"194606":[21338],"194607":[21363],"194608":[21373],"194609":[21375],"194612":[133676],"194613":[28784],"194614":[21450],"194615":[21471],"194616":[133987],"194617":[21483],"194618":[21489],"194619":[21510],"194620":[21662],"194621":[21560],"194622":[21576],"194623":[21608],"194624":[21666],"194625":[21750],"194626":[21776],"194627":[21843],"194628":[21859],"194629":[21892],"194631":[21913],"194632":[21931],"194633":[21939],"194634":[21954],"194635":[22294],"194636":[22022],"194637":[22295],"194638":[22097],"194639":[22132],"194640":[20999],"194641":[22766],"194642":[22478],"194643":[22516],"194644":[22541],"194645":[22411],"194646":[22578],"194647":[22577],"194648":[22700],"194649":[136420],"194650":[22770],"194651":[22775],"194652":[22790],"194653":[22810],"194654":[22818],"194655":[22882],"194656":[136872],"194657":[136938],"194658":[23020],"194659":[23067],"194660":[23079],"194661":[23000],"194662":[23142],"194663":[14062],"194665":[23304],"194666":[23358],"194668":[137672],"194669":[23491],"194670":[23512],"194671":[23527],"194672":[23539],"194673":[138008],"194674":[23551],"194675":[23558],"194677":[23586],"194678":[14209],"194679":[23648],"194680":[23662],"194681":[23744],"194682":[23693],"194683":[138724],"194684":[23875],"194685":[138726],"194686":[23918],"194687":[23915],"194688":[23932],"194689":[24033],"194690":[24034],"194691":[14383],"194692":[24061],"194693":[24104],"194694":[24125],"194695":[24169],"194696":[14434],"194697":[139651],"194698":[14460],"194699":[24240],"194700":[24243],"194701":[24246],"194702":[24266],"194703":[172946],"194704":[24318],"194705":[140081],"194707":[33281],"194708":[24354],"194710":[14535],"194711":[144056],"194712":[156122],"194713":[24418],"194714":[24427],"194715":[14563],"194716":[24474],"194717":[24525],"194718":[24535],"194719":[24569],"194720":[24705],"194721":[14650],"194722":[14620],"194723":[24724],"194724":[141012],"194725":[24775],"194726":[24904],"194727":[24908],"194728":[24910],"194729":[24908],"194730":[24954],"194731":[24974],"194732":[25010],"194733":[24996],"194734":[25007],"194735":[25054],"194736":[25074],"194737":[25078],"194738":[25104],"194739":[25115],"194740":[25181],"194741":[25265],"194742":[25300],"194743":[25424],"194744":[142092],"194745":[25405],"194746":[25340],"194747":[25448],"194748":[25475],"194749":[25572],"194750":[142321],"194751":[25634],"194752":[25541],"194753":[25513],"194754":[14894],"194755":[25705],"194756":[25726],"194757":[25757],"194758":[25719],"194759":[14956],"194760":[25935],"194761":[25964],"194762":[143370],"194763":[26083],"194764":[26360],"194765":[26185],"194766":[15129],"194767":[26257],"194768":[15112],"194769":[15076],"194770":[20882],"194771":[20885],"194772":[26368],"194773":[26268],"194774":[32941],"194775":[17369],"194776":[26391],"194777":[26395],"194778":[26401],"194779":[26462],"194780":[26451],"194781":[144323],"194782":[15177],"194783":[26618],"194784":[26501],"194785":[26706],"194786":[26757],"194787":[144493],"194788":[26766],"194789":[26655],"194790":[26900],"194791":[15261],"194792":[26946],"194793":[27043],"194794":[27114],"194795":[27304],"194796":[145059],"194797":[27355],"194798":[15384],"194799":[27425],"194800":[145575],"194801":[27476],"194802":[15438],"194803":[27506],"194804":[27551],"194805":[27578],"194806":[27579],"194807":[146061],"194808":[138507],"194809":[146170],"194810":[27726],"194811":[146620],"194812":[27839],"194813":[27853],"194814":[27751],"194815":[27926],"194816":[27966],"194817":[28023],"194818":[27969],"194819":[28009],"194820":[28024],"194821":[28037],"194822":[146718],"194823":[27956],"194824":[28207],"194825":[28270],"194826":[15667],"194827":[28363],"194828":[28359],"194829":[147153],"194830":[28153],"194831":[28526],"194832":[147294],"194833":[147342],"194834":[28614],"194835":[28729],"194836":[28702],"194837":[28699],"194838":[15766],"194839":[28746],"194840":[28797],"194841":[28791],"194842":[28845],"194843":[132389],"194844":[28997],"194845":[148067],"194846":[29084],"194848":[29224],"194849":[29237],"194850":[29264],"194851":[149000],"194852":[29312],"194853":[29333],"194854":[149301],"194855":[149524],"194856":[29562],"194857":[29579],"194858":[16044],"194859":[29605],"194860":[16056],"194862":[29767],"194863":[29788],"194864":[29809],"194865":[29829],"194866":[29898],"194867":[16155],"194868":[29988],"194869":[150582],"194870":[30014],"194871":[150674],"194872":[30064],"194873":[139679],"194874":[30224],"194875":[151457],"194876":[151480],"194877":[151620],"194878":[16380],"194879":[16392],"194880":[30452],"194881":[151795],"194882":[151794],"194883":[151833],"194884":[151859],"194885":[30494],"194886":[30495],"194888":[30538],"194889":[16441],"194890":[30603],"194891":[16454],"194892":[16534],"194893":[152605],"194894":[30798],"194895":[30860],"194896":[30924],"194897":[16611],"194898":[153126],"194899":[31062],"194900":[153242],"194901":[153285],"194902":[31119],"194903":[31211],"194904":[16687],"194905":[31296],"194906":[31306],"194907":[31311],"194908":[153980],"194909":[154279],"194912":[16898],"194913":[154539],"194914":[31686],"194915":[31689],"194916":[16935],"194917":[154752],"194918":[31954],"194919":[17056],"194920":[31976],"194921":[31971],"194922":[32000],"194923":[155526],"194924":[32099],"194925":[17153],"194926":[32199],"194927":[32258],"194928":[32325],"194929":[17204],"194930":[156200],"194931":[156231],"194932":[17241],"194933":[156377],"194934":[32634],"194935":[156478],"194936":[32661],"194937":[32762],"194938":[32773],"194939":[156890],"194940":[156963],"194941":[32864],"194942":[157096],"194943":[32880],"194944":[144223],"194945":[17365],"194946":[32946],"194947":[33027],"194948":[17419],"194949":[33086],"194950":[23221],"194951":[157607],"194952":[157621],"194953":[144275],"194954":[144284],"194955":[33281],"194956":[33284],"194957":[36766],"194958":[17515],"194959":[33425],"194960":[33419],"194961":[33437],"194962":[21171],"194963":[33457],"194964":[33459],"194965":[33469],"194966":[33510],"194967":[158524],"194968":[33509],"194969":[33565],"194970":[33635],"194971":[33709],"194972":[33571],"194973":[33725],"194974":[33767],"194975":[33879],"194976":[33619],"194977":[33738],"194978":[33740],"194979":[33756],"194980":[158774],"194981":[159083],"194982":[158933],"194983":[17707],"194984":[34033],"194985":[34035],"194986":[34070],"194987":[160714],"194988":[34148],"194989":[159532],"194990":[17757],"194991":[17761],"194992":[159665],"194993":[159954],"194994":[17771],"194995":[34384],"194996":[34396],"194997":[34407],"194998":[34409],"194999":[34473],"195000":[34440],"195001":[34574],"195002":[34530],"195003":[34681],"195004":[34600],"195005":[34667],"195006":[34694],"195008":[34785],"195009":[34817],"195010":[17913],"195011":[34912],"195012":[34915],"195013":[161383],"195014":[35031],"195015":[35038],"195016":[17973],"195017":[35066],"195018":[13499],"195019":[161966],"195020":[162150],"195021":[18110],"195022":[18119],"195023":[35488],"195024":[35565],"195025":[35722],"195026":[35925],"195027":[162984],"195028":[36011],"195029":[36033],"195030":[36123],"195031":[36215],"195032":[163631],"195033":[133124],"195034":[36299],"195035":[36284],"195036":[36336],"195037":[133342],"195038":[36564],"195039":[36664],"195040":[165330],"195041":[165357],"195042":[37012],"195043":[37105],"195044":[37137],"195045":[165678],"195046":[37147],"195047":[37432],"195048":[37591],"195049":[37592],"195050":[37500],"195051":[37881],"195052":[37909],"195053":[166906],"195054":[38283],"195055":[18837],"195056":[38327],"195057":[167287],"195058":[18918],"195059":[38595],"195060":[23986],"195061":[38691],"195062":[168261],"195063":[168474],"195064":[19054],"195065":[19062],"195066":[38880],"195067":[168970],"195068":[19122],"195069":[169110],"195070":[38923],"195072":[38953],"195073":[169398],"195074":[39138],"195075":[19251],"195076":[39209],"195077":[39335],"195078":[39362],"195079":[39422],"195080":[19406],"195081":[170800],"195082":[39698],"195083":[40000],"195084":[40189],"195085":[19662],"195086":[19693],"195087":[40295],"195088":[172238],"195089":[19704],"195090":[172293],"195091":[172558],"195092":[172689],"195093":[40635],"195094":[19798],"195095":[40697],"195096":[40702],"195097":[40709],"195098":[40719],"195099":[40726],"195100":[40763],"195101":[173568]},"bidi_ranges":[[0,8,"BN"],[9,9,"S"],[10,10,"B"],[11,11,"S"],[12,12,"WS"],[13,13,"B"],[14,27,"BN"],[28,30,"B"],[31,31,"S"],[32,32,"WS"],[33,34,"ON"],[35,37,"ET"],[38,42,"ON"],[43,43,"ES"],[44,44,"CS"],[45,45,"ES"],[46,47,"CS"],[48,57,"EN"],[58,58,"CS"],[59,64,"ON"],[65,90,"L"],[91,96,"ON"],[97,122,"L"],[123,126,"ON"],[127,132,"BN"],[133,133,"B"],[134,159,"BN"],[160,160,"CS"],[161,161,"ON"],[162,165,"ET"],[166,169,"ON"],[170,170,"L"],[171,172,"ON"],[173,173,"BN"],[174,175,"ON"],[176,177,"ET"],[178,179,"EN"],[180,180,"ON"],[181,181,"L"],[182,184,"ON"],[185,185,"EN"],[186,186,"L"],[187,191,"ON"],[192,214,"L"],[215,215,"ON"],[216,246,"L"],[247,247,"ON"],[248,696,"L"],[697,698,"ON"],[699,705,"L"],[706,719,"ON"],[720,721,"L"],[722,735,"ON"],[736,740,"L"],[741,749,"ON"],[750,750,"L"],[751,767,"ON"],[768,879,"NSM"],[880,883,"L"],[884,885,"ON"],[886,887,"L"],[890,893,"L"],[894,894,"ON"],[895,895,"L"],[900,901,"ON"],[902,902,"L"],[903,903,"ON"],[904,906,"L"],[908,908,"L"],[910,929,"L"],[931,1013,"L"],[1014,1014,"ON"],[1015,1154,"L"],[1155,1161,"NSM"],[1162,1327,"L"],[1329,1366,"L"],[1369,1417,"L"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1488,1514,"R"],[1519,1524,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1805,"AL"],[1807,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1869,1957,"AL"],[1958,1968,"NSM"],[1969,1969,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2042,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2096,2110,"R"],[2112,2136,"R"],[2137,2139,"NSM"],[2142,2142,"R"],[2144,2154,"AL"],[2160,2190,"AL"],[2192,2193,"AN"],[2200,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2307,2361,"L"],[2362,2362,"NSM"],[2363,2363,"L"],[2364,2364,"NSM"],[2365,2368,"L"],[2369,2376,"NSM"],[2377,2380,"L"],[2381,2381,"NSM"],[2382,2384,"L"],[2385,2391,"NSM"],[2392,2401,"L"],[2402,2403,"NSM"],[2404,2432,"L"],[2433,2433,"NSM"],[2434,2435,"L"],[2437,2444,"L"],[2447,2448,"L"],[2451,2472,"L"],[2474,2480,"L"],[2482,2482,"L"],[2486,2489,"L"],[2492,2492,"NSM"],[2493,2496,"L"],[2497,2500,"NSM"],[2503,2504,"L"],[2507,2508,"L"],[2509,2509,"NSM"],[2510,2510,"L"],[2519,2519,"L"],[2524,2525,"L"],[2527,2529,"L"],[2530,2531,"NSM"],[2534,2545,"L"],[2546,2547,"ET"],[2548,2554,"L"],[2555,2555,"ET"],[2556,2557,"L"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2563,2563,"L"],[2565,2570,"L"],[2575,2576,"L"],[2579,2600,"L"],[2602,2608,"L"],[2610,2611,"L"],[2613,2614,"L"],[2616,2617,"L"],[2620,2620,"NSM"],[2622,2624,"L"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2649,2652,"L"],[2654,2654,"L"],[2662,2671,"L"],[2672,2673,"NSM"],[2674,2676,"L"],[2677,2677,"NSM"],[2678,2678,"L"],[2689,2690,"NSM"],[2691,2691,"L"],[2693,2701,"L"],[2703,2705,"L"],[2707,2728,"L"],[2730,2736,"L"],[2738,2739,"L"],[2741,2745,"L"],[2748,2748,"NSM"],[2749,2752,"L"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2761,2761,"L"],[2763,2764,"L"],[2765,2765,"NSM"],[2768,2768,"L"],[2784,2785,"L"],[2786,2787,"NSM"],[2790,2800,"L"],[2801,2801,"ET"],[2809,2809,"L"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2818,2819,"L"],[2821,2828,"L"],[2831,2832,"L"],[2835,2856,"L"],[2858,2864,"L"],[2866,2867,"L"],[2869,2873,"L"],[2876,2876,"NSM"],[2877,2878,"L"],[2879,2879,"NSM"],[2880,2880,"L"],[2881,2884,"NSM"],[2887,2888,"L"],[2891,2892,"L"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2903,2903,"L"],[2908,2909,"L"],[2911,2913,"L"],[2914,2915,"NSM"],[2918,2935,"L"],[2946,2946,"NSM"],[2947,2947,"L"],[2949,2954,"L"],[2958,2960,"L"],[2962,2965,"L"],[2969,2970,"L"],[2972,2972,"L"],[2974,2975,"L"],[2979,2980,"L"],[2984,2986,"L"],[2990,3001,"L"],[3006,3007,"L"],[3008,3008,"NSM"],[3009,3010,"L"],[3014,3016,"L"],[3018,3020,"L"],[3021,3021,"NSM"],[3024,3024,"L"],[3031,3031,"L"],[3046,3058,"L"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3073,3075,"L"],[3076,3076,"NSM"],[3077,3084,"L"],[3086,3088,"L"],[3090,3112,"L"],[3114,3129,"L"],[3132,3132,"NSM"],[3133,3133,"L"],[3134,3136,"NSM"],[3137,3140,"L"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3160,3162,"L"],[3165,3165,"L"],[3168,3169,"L"],[3170,3171,"NSM"],[3174,3183,"L"],[3191,3191,"L"],[3192,3198,"ON"],[3199,3200,"L"],[3201,3201,"NSM"],[3202,3212,"L"],[3214,3216,"L"],[3218,3240,"L"],[3242,3251,"L"],[3253,3257,"L"],[3260,3260,"NSM"],[3261,3268,"L"],[3270,3272,"L"],[3274,3275,"L"],[3276,3277,"NSM"],[3285,3286,"L"],[3293,3294,"L"],[3296,3297,"L"],[3298,3299,"NSM"],[3302,3311,"L"],[3313,3315,"L"],[3328,3329,"NSM"],[3330,3340,"L"],[3342,3344,"L"],[3346,3386,"L"],[3387,3388,"NSM"],[3389,3392,"L"],[3393,3396,"NSM"],[3398,3400,"L"],[3402,3404,"L"],[3405,3405,"NSM"],[3406,3407,"L"],[3412,3425,"L"],[3426,3427,"NSM"],[3430,3455,"L"],[3457,3457,"NSM"],[3458,3459,"L"],[3461,3478,"L"],[3482,3505,"L"],[3507,3515,"L"],[3517,3517,"L"],[3520,3526,"L"],[3530,3530,"NSM"],[3535,3537,"L"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3544,3551,"L"],[3558,3567,"L"],[3570,3572,"L"],[3585,3632,"L"],[3633,3633,"NSM"],[3634,3635,"L"],[3636,3642,"NSM"],[3647,3647,"ET"],[3648,3654,"L"],[3655,3662,"NSM"],[3663,3675,"L"],[3713,3714,"L"],[3716,3716,"L"],[3718,3722,"L"],[3724,3747,"L"],[3749,3749,"L"],[3751,3760,"L"],[3761,3761,"NSM"],[3762,3763,"L"],[3764,3772,"NSM"],[3773,3773,"L"],[3776,3780,"L"],[3782,3782,"L"],[3784,3790,"NSM"],[3792,3801,"L"],[3804,3807,"L"],[3840,3863,"L"],[3864,3865,"NSM"],[3866,3892,"L"],[3893,3893,"NSM"],[3894,3894,"L"],[3895,3895,"NSM"],[3896,3896,"L"],[3897,3897,"NSM"],[3898,3901,"ON"],[3902,3911,"L"],[3913,3948,"L"],[3953,3966,"NSM"],[3967,3967,"L"],[3968,3972,"NSM"],[3973,3973,"L"],[3974,3975,"NSM"],[3976,3980,"L"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4030,4037,"L"],[4038,4038,"NSM"],[4039,4044,"L"],[4046,4058,"L"],[4096,4140,"L"],[4141,4144,"NSM"],[4145,4145,"L"],[4146,4151,"NSM"],[4152,4152,"L"],[4153,4154,"NSM"],[4155,4156,"L"],[4157,4158,"NSM"],[4159,4183,"L"],[4184,4185,"NSM"],[4186,4189,"L"],[4190,4192,"NSM"],[4193,4208,"L"],[4209,4212,"NSM"],[4213,4225,"L"],[4226,4226,"NSM"],[4227,4228,"L"],[4229,4230,"NSM"],[4231,4236,"L"],[4237,4237,"NSM"],[4238,4252,"L"],[4253,4253,"NSM"],[4254,4293,"L"],[4295,4295,"L"],[4301,4301,"L"],[4304,4680,"L"],[4682,4685,"L"],[4688,4694,"L"],[4696,4696,"L"],[4698,4701,"L"],[4704,4744,"L"],[4746,4749,"L"],[4752,4784,"L"],[4786,4789,"L"],[4792,4798,"L"],[4800,4800,"L"],[4802,4805,"L"],[4808,4822,"L"],[4824,4880,"L"],[4882,4885,"L"],[4888,4954,"L"],[4957,4959,"NSM"],[4960,4988,"L"],[4992,5007,"L"],[5008,5017,"ON"],[5024,5109,"L"],[5112,5117,"L"],[5120,5120,"ON"],[5121,5759,"L"],[5760,5760,"WS"],[5761,5786,"L"],[5787,5788,"ON"],[5792,5880,"L"],[5888,5905,"L"],[5906,5908,"NSM"],[5909,5909,"L"],[5919,5937,"L"],[5938,5939,"NSM"],[5940,5942,"L"],[5952,5969,"L"],[5970,5971,"NSM"],[5984,5996,"L"],[5998,6000,"L"],[6002,6003,"NSM"],[6016,6067,"L"],[6068,6069,"NSM"],[6070,6070,"L"],[6071,6077,"NSM"],[6078,6085,"L"],[6086,6086,"NSM"],[6087,6088,"L"],[6089,6099,"NSM"],[6100,6106,"L"],[6107,6107,"ET"],[6108,6108,"L"],[6109,6109,"NSM"],[6112,6121,"L"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6160,6169,"L"],[6176,6264,"L"],[6272,6276,"L"],[6277,6278,"NSM"],[6279,6312,"L"],[6313,6313,"NSM"],[6314,6314,"L"],[6320,6389,"L"],[6400,6430,"L"],[6432,6434,"NSM"],[6435,6438,"L"],[6439,6440,"NSM"],[6441,6443,"L"],[6448,6449,"L"],[6450,6450,"NSM"],[6451,6456,"L"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6470,6509,"L"],[6512,6516,"L"],[6528,6571,"L"],[6576,6601,"L"],[6608,6618,"L"],[6622,6655,"ON"],[6656,6678,"L"],[6679,6680,"NSM"],[6681,6682,"L"],[6683,6683,"NSM"],[6686,6741,"L"],[6742,6742,"NSM"],[6743,6743,"L"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6753,6753,"L"],[6754,6754,"NSM"],[6755,6756,"L"],[6757,6764,"NSM"],[6765,6770,"L"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6784,6793,"L"],[6800,6809,"L"],[6816,6829,"L"],[6832,6862,"NSM"],[6912,6915,"NSM"],[6916,6963,"L"],[6964,6964,"NSM"],[6965,6965,"L"],[6966,6970,"NSM"],[6971,6971,"L"],[6972,6972,"NSM"],[6973,6977,"L"],[6978,6978,"NSM"],[6979,6988,"L"],[6992,7018,"L"],[7019,7027,"NSM"],[7028,7038,"L"],[7040,7041,"NSM"],[7042,7073,"L"],[7074,7077,"NSM"],[7078,7079,"L"],[7080,7081,"NSM"],[7082,7082,"L"],[7083,7085,"NSM"],[7086,7141,"L"],[7142,7142,"NSM"],[7143,7143,"L"],[7144,7145,"NSM"],[7146,7148,"L"],[7149,7149,"NSM"],[7150,7150,"L"],[7151,7153,"NSM"],[7154,7155,"L"],[7164,7211,"L"],[7212,7219,"NSM"],[7220,7221,"L"],[7222,7223,"NSM"],[7227,7241,"L"],[7245,7304,"L"],[7312,7354,"L"],[7357,7367,"L"],[7376,7378,"NSM"],[7379,7379,"L"],[7380,7392,"NSM"],[7393,7393,"L"],[7394,7400,"NSM"],[7401,7404,"L"],[7405,7405,"NSM"],[7406,7411,"L"],[7412,7412,"NSM"],[7413,7415,"L"],[7416,7417,"NSM"],[7418,7418,"L"],[7424,7615,"L"],[7616,7679,"NSM"],[7680,7957,"L"],[7960,7965,"L"],[7968,8005,"L"],[8008,8013,"L"],[8016,8023,"L"],[8025,8025,"L"],[8027,8027,"L"],[8029,8029,"L"],[8031,8061,"L"],[8064,8116,"L"],[8118,8124,"L"],[8125,8125,"ON"],[8126,8126,"L"],[8127,8129,"ON"],[8130,8132,"L"],[8134,8140,"L"],[8141,8143,"ON"],[8144,8147,"L"],[8150,8155,"L"],[8157,8159,"ON"],[8160,8172,"L"],[8173,8175,"ON"],[8178,8180,"L"],[8182,8188,"L"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8206,8206,"L"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8234,"LRE"],[8235,8235,"RLE"],[8236,8236,"PDF"],[8237,8237,"LRO"],[8238,8238,"RLO"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8293,"BN"],[8294,8294,"LRI"],[8295,8295,"RLI"],[8296,8296,"FSI"],[8297,8297,"PDI"],[8298,8303,"BN"],[8304,8304,"EN"],[8305,8305,"L"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8319,8319,"L"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8336,8348,"L"],[8352,8384,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8450,8450,"L"],[8451,8454,"ON"],[8455,8455,"L"],[8456,8457,"ON"],[8458,8467,"L"],[8468,8468,"ON"],[8469,8469,"L"],[8470,8472,"ON"],[8473,8477,"L"],[8478,8483,"ON"],[8484,8484,"L"],[8485,8485,"ON"],[8486,8486,"L"],[8487,8487,"ON"],[8488,8488,"L"],[8489,8489,"ON"],[8490,8493,"L"],[8494,8494,"ET"],[8495,8505,"L"],[8506,8507,"ON"],[8508,8511,"L"],[8512,8516,"ON"],[8517,8521,"L"],[8522,8525,"ON"],[8526,8527,"L"],[8528,8543,"ON"],[8544,8584,"L"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9014,9082,"L"],[9083,9108,"ON"],[9109,9109,"L"],[9110,9254,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9372,9449,"L"],[9450,9899,"ON"],[9900,9900,"L"],[9901,10239,"ON"],[10240,10495,"L"],[10496,11123,"ON"],[11126,11157,"ON"],[11159,11263,"ON"],[11264,11492,"L"],[11493,11498,"ON"],[11499,11502,"L"],[11503,11505,"NSM"],[11506,11507,"L"],[11513,11519,"ON"],[11520,11557,"L"],[11559,11559,"L"],[11565,11565,"L"],[11568,11623,"L"],[11631,11632,"L"],[11647,11647,"NSM"],[11648,11670,"L"],[11680,11686,"L"],[11688,11694,"L"],[11696,11702,"L"],[11704,11710,"L"],[11712,11718,"L"],[11720,11726,"L"],[11728,11734,"L"],[11736,11742,"L"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12293,12295,"L"],[12296,12320,"ON"],[12321,12329,"L"],[12330,12333,"NSM"],[12334,12335,"L"],[12336,12336,"ON"],[12337,12341,"L"],[12342,12343,"ON"],[12344,12348,"L"],[12349,12351,"ON"],[12353,12438,"L"],[12441,12442,"NSM"],[12443,12444,"ON"],[12445,12447,"L"],[12448,12448,"ON"],[12449,12538,"L"],[12539,12539,"ON"],[12540,12543,"L"],[12549,12591,"L"],[12593,12686,"L"],[12688,12735,"L"],[12736,12771,"ON"],[12783,12783,"ON"],[12784,12828,"L"],[12829,12830,"ON"],[12832,12879,"L"],[12880,12895,"ON"],[12896,12923,"L"],[12924,12926,"ON"],[12927,12976,"L"],[12977,12991,"ON"],[12992,13003,"L"],[13004,13007,"ON"],[13008,13174,"L"],[13175,13178,"ON"],[13179,13277,"L"],[13278,13279,"ON"],[13280,13310,"L"],[13311,13311,"ON"],[13312,19903,"L"],[19904,19967,"ON"],[19968,42124,"L"],[42128,42182,"ON"],[42192,42508,"L"],[42509,42511,"ON"],[42512,42539,"L"],[42560,42606,"L"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42624,42653,"L"],[42654,42655,"NSM"],[42656,42735,"L"],[42736,42737,"NSM"],[42738,42743,"L"],[42752,42785,"ON"],[42786,42887,"L"],[42888,42888,"ON"],[42889,42954,"L"],[42960,42961,"L"],[42963,42963,"L"],[42965,42969,"L"],[42994,43009,"L"],[43010,43010,"NSM"],[43011,43013,"L"],[43014,43014,"NSM"],[43015,43018,"L"],[43019,43019,"NSM"],[43020,43044,"L"],[43045,43046,"NSM"],[43047,43047,"L"],[43048,43051,"ON"],[43052,43052,"NSM"],[43056,43063,"L"],[43064,43065,"ET"],[43072,43123,"L"],[43124,43127,"ON"],[43136,43203,"L"],[43204,43205,"NSM"],[43214,43225,"L"],[43232,43249,"NSM"],[43250,43262,"L"],[43263,43263,"NSM"],[43264,43301,"L"],[43302,43309,"NSM"],[43310,43334,"L"],[43335,43345,"NSM"],[43346,43347,"L"],[43359,43388,"L"],[43392,43394,"NSM"],[43395,43442,"L"],[43443,43443,"NSM"],[43444,43445,"L"],[43446,43449,"NSM"],[43450,43451,"L"],[43452,43453,"NSM"],[43454,43469,"L"],[43471,43481,"L"],[43486,43492,"L"],[43493,43493,"NSM"],[43494,43518,"L"],[43520,43560,"L"],[43561,43566,"NSM"],[43567,43568,"L"],[43569,43570,"NSM"],[43571,43572,"L"],[43573,43574,"NSM"],[43584,43586,"L"],[43587,43587,"NSM"],[43588,43595,"L"],[43596,43596,"NSM"],[43597,43597,"L"],[43600,43609,"L"],[43612,43643,"L"],[43644,43644,"NSM"],[43645,43695,"L"],[43696,43696,"NSM"],[43697,43697,"L"],[43698,43700,"NSM"],[43701,43702,"L"],[43703,43704,"NSM"],[43705,43709,"L"],[43710,43711,"NSM"],[43712,43712,"L"],[43713,43713,"NSM"],[43714,43714,"L"],[43739,43755,"L"],[43756,43757,"NSM"],[43758,43765,"L"],[43766,43766,"NSM"],[43777,43782,"L"],[43785,43790,"L"],[43793,43798,"L"],[43808,43814,"L"],[43816,43822,"L"],[43824,43881,"L"],[43882,43883,"ON"],[43888,44004,"L"],[44005,44005,"NSM"],[44006,44007,"L"],[44008,44008,"NSM"],[44009,44012,"L"],[44013,44013,"NSM"],[44016,44025,"L"],[44032,55203,"L"],[55216,55238,"L"],[55243,55291,"L"],[57344,64109,"L"],[64112,64217,"L"],[64256,64262,"L"],[64275,64279,"L"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64310,"R"],[64312,64316,"R"],[64318,64318,"R"],[64320,64321,"R"],[64323,64324,"R"],[64326,64335,"R"],[64336,64450,"AL"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64914,64967,"AL"],[64975,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65140,"AL"],[65142,65276,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65313,65338,"L"],[65339,65344,"ON"],[65345,65370,"L"],[65371,65381,"ON"],[65382,65470,"L"],[65474,65479,"L"],[65482,65487,"L"],[65490,65495,"L"],[65498,65500,"L"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65536,65547,"L"],[65549,65574,"L"],[65576,65594,"L"],[65596,65597,"L"],[65599,65613,"L"],[65616,65629,"L"],[65664,65786,"L"],[65792,65792,"L"],[65793,65793,"ON"],[65794,65794,"L"],[65799,65843,"L"],[65847,65855,"L"],[65856,65932,"ON"],[65933,65934,"L"],[65936,65948,"ON"],[65952,65952,"ON"],[66000,66044,"L"],[66045,66045,"NSM"],[66176,66204,"L"],[66208,66256,"L"],[66272,66272,"NSM"],[66273,66299,"EN"],[66304,66339,"L"],[66349,66378,"L"],[66384,66421,"L"],[66422,66426,"NSM"],[66432,66461,"L"],[66463,66499,"L"],[66504,66517,"L"],[66560,66717,"L"],[66720,66729,"L"],[66736,66771,"L"],[66776,66811,"L"],[66816,66855,"L"],[66864,66915,"L"],[66927,66938,"L"],[66940,66954,"L"],[66956,66962,"L"],[66964,66965,"L"],[66967,66977,"L"],[66979,66993,"L"],[66995,67001,"L"],[67003,67004,"L"],[67072,67382,"L"],[67392,67413,"L"],[67424,67431,"L"],[67456,67461,"L"],[67463,67504,"L"],[67506,67514,"L"],[67584,67589,"R"],[67592,67592,"R"],[67594,67637,"R"],[67639,67640,"R"],[67644,67644,"R"],[67647,67669,"R"],[67671,67742,"R"],[67751,67759,"R"],[67808,67826,"R"],[67828,67829,"R"],[67835,67867,"R"],[67871,67871,"ON"],[67872,67897,"R"],[67903,67903,"R"],[67968,68023,"R"],[68028,68047,"R"],[68050,68096,"R"],[68097,68099,"NSM"],[68101,68102,"NSM"],[68108,68111,"NSM"],[68112,68115,"R"],[68117,68119,"R"],[68121,68149,"R"],[68152,68154,"NSM"],[68159,68159,"NSM"],[68160,68168,"R"],[68176,68184,"R"],[68192,68255,"R"],[68288,68324,"R"],[68325,68326,"NSM"],[68331,68342,"R"],[68352,68405,"R"],[68409,68415,"ON"],[68416,68437,"R"],[68440,68466,"R"],[68472,68497,"R"],[68505,68508,"R"],[68521,68527,"R"],[68608,68680,"R"],[68736,68786,"R"],[68800,68850,"R"],[68858,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68912,68921,"AN"],[69216,69246,"AN"],[69248,69289,"R"],[69291,69292,"NSM"],[69293,69293,"R"],[69296,69297,"R"],[69373,69375,"NSM"],[69376,69415,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69465,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69513,"R"],[69552,69579,"R"],[69600,69622,"R"],[69632,69632,"L"],[69633,69633,"NSM"],[69634,69687,"L"],[69688,69702,"NSM"],[69703,69709,"L"],[69714,69733,"ON"],[69734,69743,"L"],[69744,69744,"NSM"],[69745,69746,"L"],[69747,69748,"NSM"],[69749,69749,"L"],[69759,69761,"NSM"],[69762,69810,"L"],[69811,69814,"NSM"],[69815,69816,"L"],[69817,69818,"NSM"],[69819,69825,"L"],[69826,69826,"NSM"],[69837,69837,"L"],[69840,69864,"L"],[69872,69881,"L"],[69888,69890,"NSM"],[69891,69926,"L"],[69927,69931,"NSM"],[69932,69932,"L"],[69933,69940,"NSM"],[69942,69959,"L"],[69968,70002,"L"],[70003,70003,"NSM"],[70004,70006,"L"],[70016,70017,"NSM"],[70018,70069,"L"],[70070,70078,"NSM"],[70079,70088,"L"],[70089,70092,"NSM"],[70093,70094,"L"],[70095,70095,"NSM"],[70096,70111,"L"],[70113,70132,"L"],[70144,70161,"L"],[70163,70190,"L"],[70191,70193,"NSM"],[70194,70195,"L"],[70196,70196,"NSM"],[70197,70197,"L"],[70198,70199,"NSM"],[70200,70205,"L"],[70206,70206,"NSM"],[70207,70208,"L"],[70209,70209,"NSM"],[70272,70278,"L"],[70280,70280,"L"],[70282,70285,"L"],[70287,70301,"L"],[70303,70313,"L"],[70320,70366,"L"],[70367,70367,"NSM"],[70368,70370,"L"],[70371,70378,"NSM"],[70384,70393,"L"],[70400,70401,"NSM"],[70402,70403,"L"],[70405,70412,"L"],[70415,70416,"L"],[70419,70440,"L"],[70442,70448,"L"],[70450,70451,"L"],[70453,70457,"L"],[70459,70460,"NSM"],[70461,70463,"L"],[70464,70464,"NSM"],[70465,70468,"L"],[70471,70472,"L"],[70475,70477,"L"],[70480,70480,"L"],[70487,70487,"L"],[70493,70499,"L"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70656,70711,"L"],[70712,70719,"NSM"],[70720,70721,"L"],[70722,70724,"NSM"],[70725,70725,"L"],[70726,70726,"NSM"],[70727,70747,"L"],[70749,70749,"L"],[70750,70750,"NSM"],[70751,70753,"L"],[70784,70834,"L"],[70835,70840,"NSM"],[70841,70841,"L"],[70842,70842,"NSM"],[70843,70846,"L"],[70847,70848,"NSM"],[70849,70849,"L"],[70850,70851,"NSM"],[70852,70855,"L"],[70864,70873,"L"],[71040,71089,"L"],[71090,71093,"NSM"],[71096,71099,"L"],[71100,71101,"NSM"],[71102,71102,"L"],[71103,71104,"NSM"],[71105,71131,"L"],[71132,71133,"NSM"],[71168,71218,"L"],[71219,71226,"NSM"],[71227,71228,"L"],[71229,71229,"NSM"],[71230,71230,"L"],[71231,71232,"NSM"],[71233,71236,"L"],[71248,71257,"L"],[71264,71276,"ON"],[71296,71338,"L"],[71339,71339,"NSM"],[71340,71340,"L"],[71341,71341,"NSM"],[71342,71343,"L"],[71344,71349,"NSM"],[71350,71350,"L"],[71351,71351,"NSM"],[71352,71353,"L"],[71360,71369,"L"],[71424,71450,"L"],[71453,71455,"NSM"],[71456,71457,"L"],[71458,71461,"NSM"],[71462,71462,"L"],[71463,71467,"NSM"],[71472,71494,"L"],[71680,71726,"L"],[71727,71735,"NSM"],[71736,71736,"L"],[71737,71738,"NSM"],[71739,71739,"L"],[71840,71922,"L"],[71935,71942,"L"],[71945,71945,"L"],[71948,71955,"L"],[71957,71958,"L"],[71960,71989,"L"],[71991,71992,"L"],[71995,71996,"NSM"],[71997,71997,"L"],[71998,71998,"NSM"],[71999,72002,"L"],[72003,72003,"NSM"],[72004,72006,"L"],[72016,72025,"L"],[72096,72103,"L"],[72106,72147,"L"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72156,72159,"L"],[72160,72160,"NSM"],[72161,72164,"L"],[72192,72192,"L"],[72193,72198,"NSM"],[72199,72200,"L"],[72201,72202,"NSM"],[72203,72242,"L"],[72243,72248,"NSM"],[72249,72250,"L"],[72251,72254,"NSM"],[72255,72262,"L"],[72263,72263,"NSM"],[72272,72272,"L"],[72273,72278,"NSM"],[72279,72280,"L"],[72281,72283,"NSM"],[72284,72329,"L"],[72330,72342,"NSM"],[72343,72343,"L"],[72344,72345,"NSM"],[72346,72354,"L"],[72368,72440,"L"],[72448,72457,"L"],[72704,72712,"L"],[72714,72751,"L"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72766,72773,"L"],[72784,72812,"L"],[72816,72847,"L"],[72850,72871,"NSM"],[72873,72873,"L"],[72874,72880,"NSM"],[72881,72881,"L"],[72882,72883,"NSM"],[72884,72884,"L"],[72885,72886,"NSM"],[72960,72966,"L"],[72968,72969,"L"],[72971,73008,"L"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73030,73030,"L"],[73031,73031,"NSM"],[73040,73049,"L"],[73056,73061,"L"],[73063,73064,"L"],[73066,73102,"L"],[73104,73105,"NSM"],[73107,73108,"L"],[73109,73109,"NSM"],[73110,73110,"L"],[73111,73111,"NSM"],[73112,73112,"L"],[73120,73129,"L"],[73440,73458,"L"],[73459,73460,"NSM"],[73461,73464,"L"],[73472,73473,"NSM"],[73474,73488,"L"],[73490,73525,"L"],[73526,73530,"NSM"],[73534,73535,"L"],[73536,73536,"NSM"],[73537,73537,"L"],[73538,73538,"NSM"],[73539,73561,"L"],[73648,73648,"L"],[73664,73684,"L"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[73727,74649,"L"],[74752,74862,"L"],[74864,74868,"L"],[74880,75075,"L"],[77712,77810,"L"],[77824,78911,"L"],[78912,78912,"NSM"],[78913,78918,"L"],[78919,78933,"NSM"],[82944,83526,"L"],[92160,92728,"L"],[92736,92766,"L"],[92768,92777,"L"],[92782,92862,"L"],[92864,92873,"L"],[92880,92909,"L"],[92912,92916,"NSM"],[92917,92917,"L"],[92928,92975,"L"],[92976,92982,"NSM"],[92983,92997,"L"],[93008,93017,"L"],[93019,93025,"L"],[93027,93047,"L"],[93053,93071,"L"],[93760,93850,"L"],[93952,94026,"L"],[94031,94031,"NSM"],[94032,94087,"L"],[94095,94098,"NSM"],[94099,94111,"L"],[94176,94177,"L"],[94178,94178,"ON"],[94179,94179,"L"],[94180,94180,"NSM"],[94192,94193,"L"],[94208,100343,"L"],[100352,101589,"L"],[101632,101640,"L"],[110576,110579,"L"],[110581,110587,"L"],[110589,110590,"L"],[110592,110882,"L"],[110898,110898,"L"],[110928,110930,"L"],[110933,110933,"L"],[110948,110951,"L"],[110960,111355,"L"],[113664,113770,"L"],[113776,113788,"L"],[113792,113800,"L"],[113808,113817,"L"],[113820,113820,"L"],[113821,113822,"NSM"],[113823,113823,"L"],[113824,113827,"BN"],[118528,118573,"NSM"],[118576,118598,"NSM"],[118608,118723,"L"],[118784,119029,"L"],[119040,119078,"L"],[119081,119142,"L"],[119143,119145,"NSM"],[119146,119154,"L"],[119155,119162,"BN"],[119163,119170,"NSM"],[119171,119172,"L"],[119173,119179,"NSM"],[119180,119209,"L"],[119210,119213,"NSM"],[119214,119272,"L"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119488,119507,"L"],[119520,119539,"L"],[119552,119638,"ON"],[119648,119672,"L"],[119808,119892,"L"],[119894,119964,"L"],[119966,119967,"L"],[119970,119970,"L"],[119973,119974,"L"],[119977,119980,"L"],[119982,119993,"L"],[119995,119995,"L"],[119997,120003,"L"],[120005,120069,"L"],[120071,120074,"L"],[120077,120084,"L"],[120086,120092,"L"],[120094,120121,"L"],[120123,120126,"L"],[120128,120132,"L"],[120134,120134,"L"],[120138,120144,"L"],[120146,120485,"L"],[120488,120538,"L"],[120539,120539,"ON"],[120540,120596,"L"],[120597,120597,"ON"],[120598,120654,"L"],[120655,120655,"ON"],[120656,120712,"L"],[120713,120713,"ON"],[120714,120770,"L"],[120771,120771,"ON"],[120772,120779,"L"],[120782,120831,"EN"],[120832,121343,"L"],[121344,121398,"NSM"],[121399,121402,"L"],[121403,121452,"NSM"],[121453,121460,"L"],[121461,121461,"NSM"],[121462,121475,"L"],[121476,121476,"NSM"],[121477,121483,"L"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122624,122654,"L"],[122661,122666,"L"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[122928,122989,"L"],[123023,123023,"NSM"],[123136,123180,"L"],[123184,123190,"NSM"],[123191,123197,"L"],[123200,123209,"L"],[123214,123215,"L"],[123536,123565,"L"],[123566,123566,"NSM"],[123584,123627,"L"],[123628,123631,"NSM"],[123632,123641,"L"],[123647,123647,"ET"],[124112,124139,"L"],[124140,124143,"NSM"],[124144,124153,"L"],[124896,124902,"L"],[124904,124907,"L"],[124909,124910,"L"],[124912,124926,"L"],[124928,125124,"R"],[125127,125135,"R"],[125136,125142,"NSM"],[125184,125251,"R"],[125252,125258,"NSM"],[125259,125259,"R"],[125264,125273,"R"],[125278,125279,"R"],[126065,126132,"AL"],[126209,126269,"AL"],[126464,126467,"AL"],[126469,126495,"AL"],[126497,126498,"AL"],[126500,126500,"AL"],[126503,126503,"AL"],[126505,126514,"AL"],[126516,126519,"AL"],[126521,126521,"AL"],[126523,126523,"AL"],[126530,126530,"AL"],[126535,126535,"AL"],[126537,126537,"AL"],[126539,126539,"AL"],[126541,126543,"AL"],[126545,126546,"AL"],[126548,126548,"AL"],[126551,126551,"AL"],[126553,126553,"AL"],[126555,126555,"AL"],[126557,126557,"AL"],[126559,126559,"AL"],[126561,126562,"AL"],[126564,126564,"AL"],[126567,126570,"AL"],[126572,126578,"AL"],[126580,126583,"AL"],[126585,126588,"AL"],[126590,126590,"AL"],[126592,126601,"AL"],[126603,126619,"AL"],[126625,126627,"AL"],[126629,126633,"AL"],[126635,126651,"AL"],[126704,126705,"ON"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127248,127278,"L"],[127279,127279,"ON"],[127280,127337,"L"],[127338,127343,"ON"],[127344,127404,"L"],[127405,127405,"ON"],[127462,127490,"L"],[127504,127547,"L"],[127552,127560,"L"],[127568,127569,"L"],[127584,127589,"ON"],[127744,128727,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128886,"ON"],[128891,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129201,"ON"],[129280,129619,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129672,"ON"],[129680,129725,"ON"],[129727,129733,"ON"],[129742,129755,"ON"],[129760,129768,"ON"],[129776,129784,"ON"],[129792,129938,"ON"],[129940,129994,"ON"],[130032,130041,"EN"],[131070,131071,"BN"],[131072,173791,"L"],[173824,177977,"L"],[177984,178205,"L"],[178208,183969,"L"],[183984,191456,"L"],[191472,192093,"L"],[194560,195101,"L"],[196606,196607,"BN"],[196608,201546,"L"],[201552,205743,"L"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918000,921599,"BN"],[983038,983039,"BN"],[983040,1048573,"L"],[1048574,1048575,"BN"],[1048576,1114109,"L"],[1114110,1114111,"BN"]],"joining_type_ranges":[[173,173,"T"],[768,879,"T"],[1155,1161,"T"],[1425,1469,"T"],[1471,1471,"T"],[1473,1474,"T"],[1476,1477,"T"],[1479,1479,"T"],[1552,1562,"T"],[1564,1564,"T"],[1568,1568,"D"],[1570,1573,"R"],[1574,1574,"D"],[1575,1575,"R"],[1576,1576,"D"],[1577,1577,"R"],[1578,1582,"D"],[1583,1586,"R"],[1587,1599,"D"],[1600,1600,"C"],[1601,1607,"D"],[1608,1608,"R"],[1609,1610,"D"],[1611,1631,"T"],[1646,1647,"D"],[1648,1648,"T"],[1649,1651,"R"],[1653,1655,"R"],[1656,1671,"D"],[1672,1689,"R"],[1690,1727,"D"],[1728,1728,"R"],[1729,1730,"D"],[1731,1739,"R"],[1740,1740,"D"],[1741,1741,"R"],[1742,1742,"D"],[1743,1743,"R"],[1744,1745,"D"],[1746,1747,"R"],[1749,1749,"R"],[1750,1756,"T"],[1759,1764,"T"],[1767,1768,"T"],[1770,1773,"T"],[1774,1775,"R"],[1786,1788,"D"],[1791,1791,"D"],[1807,1807,"T"],[1808,1808,"R"],[1809,1809,"T"],[1810,1812,"D"],[1813,1817,"R"],[1818,1821,"D"],[1822,1822,"R"],[1823,1831,"D"],[1832,1832,"R"],[1833,1833,"D"],[1834,1834,"R"],[1835,1835,"D"],[1836,1836,"R"],[1837,1838,"D"],[1839,1839,"R"],[1840,1866,"T"],[1869,1869,"R"],[1870,1880,"D"],[1881,1883,"R"],[1884,1898,"D"],[1899,1900,"R"],[1901,1904,"D"],[1905,1905,"R"],[1906,1906,"D"],[1907,1908,"R"],[1909,1911,"D"],[1912,1913,"R"],[1914,1919,"D"],[1958,1968,"T"],[1994,2026,"D"],[2027,2035,"T"],[2042,2042,"C"],[2045,2045,"T"],[2070,2073,"T"],[2075,2083,"T"],[2085,2087,"T"],[2089,2093,"T"],[2112,2112,"R"],[2113,2117,"D"],[2118,2119,"R"],[2120,2120,"D"],[2121,2121,"R"],[2122,2131,"D"],[2132,2132,"R"],[2133,2133,"D"],[2134,2136,"R"],[2137,2139,"T"],[2144,2144,"D"],[2146,2149,"D"],[2151,2151,"R"],[2152,2152,"D"],[2153,2154,"R"],[2160,2178,"R"],[2179,2181,"C"],[2182,2182,"D"],[2185,2189,"D"],[2190,2190,"R"],[2200,2207,"T"],[2208,2217,"D"],[2218,2220,"R"],[2222,2222,"R"],[2223,2224,"D"],[2225,2226,"R"],[2227,2232,"D"],[2233,2233,"R"],[2234,2248,"D"],[2250,2273,"T"],[2275,2306,"T"],[2362,2362,"T"],[2364,2364,"T"],[2369,2376,"T"],[2381,2381,"T"],[2385,2391,"T"],[2402,2403,"T"],[2433,2433,"T"],[2492,2492,"T"],[2497,2500,"T"],[2509,2509,"T"],[2530,2531,"T"],[2558,2558,"T"],[2561,2562,"T"],[2620,2620,"T"],[2625,2626,"T"],[2631,2632,"T"],[2635,2637,"T"],[2641,2641,"T"],[2672,2673,"T"],[2677,2677,"T"],[2689,2690,"T"],[2748,2748,"T"],[2753,2757,"T"],[2759,2760,"T"],[2765,2765,"T"],[2786,2787,"T"],[2810,2815,"T"],[2817,2817,"T"],[2876,2876,"T"],[2879,2879,"T"],[2881,2884,"T"],[2893,2893,"T"],[2901,2902,"T"],[2914,2915,"T"],[2946,2946,"T"],[3008,3008,"T"],[3021,3021,"T"],[3072,3072,"T"],[3076,3076,"T"],[3132,3132,"T"],[3134,3136,"T"],[3142,3144,"T"],[3146,3149,"T"],[3157,3158,"T"],[3170,3171,"T"],[3201,3201,"T"],[3260,3260,"T"],[3263,3263,"T"],[3270,3270,"T"],[3276,3277,"T"],[3298,3299,"T"],[3328,3329,"T"],[3387,3388,"T"],[3393,3396,"T"],[3405,3405,"T"],[3426,3427,"T"],[3457,3457,"T"],[3530,3530,"T"],[3538,3540,"T"],[3542,3542,"T"],[3633,3633,"T"],[3636,3642,"T"],[3655,3662,"T"],[3761,3761,"T"],[3764,3772,"T"],[3784,3790,"T"],[3864,3865,"T"],[3893,3893,"T"],[3895,3895,"T"],[3897,3897,"T"],[3953,3966,"T"],[3968,3972,"T"],[3974,3975,"T"],[3981,3991,"T"],[3993,4028,"T"],[4038,4038,"T"],[4141,4144,"T"],[4146,4151,"T"],[4153,4154,"T"],[4157,4158,"T"],[4184,4185,"T"],[4190,4192,"T"],[4209,4212,"T"],[4226,4226,"T"],[4229,4230,"T"],[4237,4237,"T"],[4253,4253,"T"],[4957,4959,"T"],[5906,5908,"T"],[5938,5939,"T"],[5970,5971,"T"],[6002,6003,"T"],[6068,6069,"T"],[6071,6077,"T"],[6086,6086,"T"],[6089,6099,"T"],[6109,6109,"T"],[6151,6151,"D"],[6154,6154,"C"],[6155,6157,"T"],[6159,6159,"T"],[6176,6264,"D"],[6277,6278,"T"],[6279,6312,"D"],[6313,6313,"T"],[6314,6314,"D"],[6432,6434,"T"],[6439,6440,"T"],[6450,6450,"T"],[6457,6459,"T"],[6679,6680,"T"],[6683,6683,"T"],[6742,6742,"T"],[6744,6750,"T"],[6752,6752,"T"],[6754,6754,"T"],[6757,6764,"T"],[6771,6780,"T"],[6783,6783,"T"],[6832,6862,"T"],[6912,6915,"T"],[6964,6964,"T"],[6966,6970,"T"],[6972,6972,"T"],[6978,6978,"T"],[7019,7027,"T"],[7040,7041,"T"],[7074,7077,"T"],[7080,7081,"T"],[7083,7085,"T"],[7142,7142,"T"],[7144,7145,"T"],[7149,7149,"T"],[7151,7153,"T"],[7212,7219,"T"],[7222,7223,"T"],[7376,7378,"T"],[7380,7392,"T"],[7394,7400,"T"],[7405,7405,"T"],[7412,7412,"T"],[7416,7417,"T"],[7616,7679,"T"],[8203,8203,"T"],[8205,8205,"C"],[8206,8207,"T"],[8234,8238,"T"],[8288,8292,"T"],[8298,8303,"T"],[8400,8432,"T"],[11503,11505,"T"],[11647,11647,"T"],[11744,11775,"T"],[12330,12333,"T"],[12441,12442,"T"],[42607,42610,"T"],[42612,42621,"T"],[42654,42655,"T"],[42736,42737,"T"],[43010,43010,"T"],[43014,43014,"T"],[43019,43019,"T"],[43045,43046,"T"],[43052,43052,"T"],[43072,43121,"D"],[43122,43122,"L"],[43204,43205,"T"],[43232,43249,"T"],[43263,43263,"T"],[43302,43309,"T"],[43335,43345,"T"],[43392,43394,"T"],[43443,43443,"T"],[43446,43449,"T"],[43452,43453,"T"],[43493,43493,"T"],[43561,43566,"T"],[43569,43570,"T"],[43573,43574,"T"],[43587,43587,"T"],[43596,43596,"T"],[43644,43644,"T"],[43696,43696,"T"],[43698,43700,"T"],[43703,43704,"T"],[43710,43711,"T"],[43713,43713,"T"],[43756,43757,"T"],[43766,43766,"T"],[44005,44005,"T"],[44008,44008,"T"],[44013,44013,"T"],[64286,64286,"T"],[65024,65039,"T"],[65056,65071,"T"],[65279,65279,"T"],[65529,65531,"T"],[66045,66045,"T"],[66272,66272,"T"],[66422,66426,"T"],[68097,68099,"T"],[68101,68102,"T"],[68108,68111,"T"],[68152,68154,"T"],[68159,68159,"T"],[68288,68292,"D"],[68293,68293,"R"],[68295,68295,"R"],[68297,68298,"R"],[68301,68301,"L"],[68302,68306,"R"],[68307,68310,"D"],[68311,68311,"L"],[68312,68316,"D"],[68317,68317,"R"],[68318,68320,"D"],[68321,68321,"R"],[68324,68324,"R"],[68325,68326,"T"],[68331,68334,"D"],[68335,68335,"R"],[68480,68480,"D"],[68481,68481,"R"],[68482,68482,"D"],[68483,68485,"R"],[68486,68488,"D"],[68489,68489,"R"],[68490,68491,"D"],[68492,68492,"R"],[68493,68493,"D"],[68494,68495,"R"],[68496,68496,"D"],[68497,68497,"R"],[68521,68524,"R"],[68525,68526,"D"],[68864,68864,"L"],[68865,68897,"D"],[68898,68898,"R"],[68899,68899,"D"],[68900,68903,"T"],[69291,69292,"T"],[69373,69375,"T"],[69424,69426,"D"],[69427,69427,"R"],[69428,69444,"D"],[69446,69456,"T"],[69457,69459,"D"],[69460,69460,"R"],[69488,69491,"D"],[69492,69493,"R"],[69494,69505,"D"],[69506,69509,"T"],[69552,69552,"D"],[69554,69555,"D"],[69556,69558,"R"],[69560,69560,"D"],[69561,69562,"R"],[69563,69564,"D"],[69565,69565,"R"],[69566,69567,"D"],[69569,69569,"D"],[69570,69571,"R"],[69572,69572,"D"],[69577,69577,"R"],[69578,69578,"D"],[69579,69579,"L"],[69633,69633,"T"],[69688,69702,"T"],[69744,69744,"T"],[69747,69748,"T"],[69759,69761,"T"],[69811,69814,"T"],[69817,69818,"T"],[69826,69826,"T"],[69888,69890,"T"],[69927,69931,"T"],[69933,69940,"T"],[70003,70003,"T"],[70016,70017,"T"],[70070,70078,"T"],[70089,70092,"T"],[70095,70095,"T"],[70191,70193,"T"],[70196,70196,"T"],[70198,70199,"T"],[70206,70206,"T"],[70209,70209,"T"],[70367,70367,"T"],[70371,70378,"T"],[70400,70401,"T"],[70459,70460,"T"],[70464,70464,"T"],[70502,70508,"T"],[70512,70516,"T"],[70712,70719,"T"],[70722,70724,"T"],[70726,70726,"T"],[70750,70750,"T"],[70835,70840,"T"],[70842,70842,"T"],[70847,70848,"T"],[70850,70851,"T"],[71090,71093,"T"],[71100,71101,"T"],[71103,71104,"T"],[71132,71133,"T"],[71219,71226,"T"],[71229,71229,"T"],[71231,71232,"T"],[71339,71339,"T"],[71341,71341,"T"],[71344,71349,"T"],[71351,71351,"T"],[71453,71455,"T"],[71458,71461,"T"],[71463,71467,"T"],[71727,71735,"T"],[71737,71738,"T"],[71995,71996,"T"],[71998,71998,"T"],[72003,72003,"T"],[72148,72151,"T"],[72154,72155,"T"],[72160,72160,"T"],[72193,72202,"T"],[72243,72248,"T"],[72251,72254,"T"],[72263,72263,"T"],[72273,72278,"T"],[72281,72283,"T"],[72330,72342,"T"],[72344,72345,"T"],[72752,72758,"T"],[72760,72765,"T"],[72767,72767,"T"],[72850,72871,"T"],[72874,72880,"T"],[72882,72883,"T"],[72885,72886,"T"],[73009,73014,"T"],[73018,73018,"T"],[73020,73021,"T"],[73023,73029,"T"],[73031,73031,"T"],[73104,73105,"T"],[73109,73109,"T"],[73111,73111,"T"],[73459,73460,"T"],[73472,73473,"T"],[73526,73530,"T"],[73536,73536,"T"],[73538,73538,"T"],[78896,78912,"T"],[78919,78933,"T"],[92912,92916,"T"],[92976,92982,"T"],[94031,94031,"T"],[94095,94098,"T"],[94180,94180,"T"],[113821,113822,"T"],[113824,113827,"T"],[118528,118573,"T"],[118576,118598,"T"],[119143,119145,"T"],[119155,119170,"T"],[119173,119179,"T"],[119210,119213,"T"],[119362,119364,"T"],[121344,121398,"T"],[121403,121452,"T"],[121461,121461,"T"],[121476,121476,"T"],[121499,121503,"T"],[121505,121519,"T"],[122880,122886,"T"],[122888,122904,"T"],[122907,122913,"T"],[122915,122916,"T"],[122918,122922,"T"],[123023,123023,"T"],[123184,123190,"T"],[123566,123566,"T"],[123628,123631,"T"],[124140,124143,"T"],[125136,125142,"T"],[125184,125251,"D"],[125252,125259,"T"],[917505,917505,"T"],[917536,917631,"T"],[917760,917999,"T"]]} \ No newline at end of file diff --git a/node_modules/idn-hostname/index.d.ts b/node_modules/idn-hostname/index.d.ts new file mode 100644 index 00000000..40a73f57 --- /dev/null +++ b/node_modules/idn-hostname/index.d.ts @@ -0,0 +1,32 @@ +import punycode = require('punycode/'); + +/** + * Validate a hostname. Returns true or throws a detailed error. + * + * @throws {SyntaxError} + */ +declare function isIdnHostname(hostname: string): true; + +/** + * Returns the ACE hostname or throws a detailed error (it also validates the input) + * + * @throws {SyntaxError} + */ +declare function idnHostname(hostname: string): string; + +/** + * Returns the uts46 mapped label (not hostname) or throws an error if the label + * has dissallowed or unassigned chars. + * + * @throws {SyntaxError} + */ +declare function uts46map(label: string): string; + +declare const IdnHostname: { + isIdnHostname: typeof isIdnHostname; + idnHostname: typeof idnHostname; + uts46map: typeof uts46map; + punycode: typeof punycode; +}; + +export = IdnHostname; diff --git a/node_modules/idn-hostname/index.js b/node_modules/idn-hostname/index.js new file mode 100644 index 00000000..fbedd84e --- /dev/null +++ b/node_modules/idn-hostname/index.js @@ -0,0 +1,172 @@ +'use strict'; +// IDNA2008 validator using idnaMappingTableCompact.json +const punycode = require('punycode/'); +const { props, viramas, ranges, mappings, bidi_ranges, joining_type_ranges } = require('./idnaMappingTableCompact.json'); +// --- Error classes (short messages; RFC refs included in message) --- +const throwIdnaContextJError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaContextJError" }); }; +const throwIdnaContextOError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaContextOError" }); }; +const throwIdnaUnicodeError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaUnicodeError" }); }; +const throwIdnaLengthError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaLengthError" }); }; +const throwIdnaSyntaxError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaSyntaxError" }); }; +const throwPunycodeError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "PunycodeError" }); }; +const throwIdnaBidiError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaBidiError" }); }; +// --- constants --- +const ZWNJ = 0x200c; +const ZWJ = 0x200d; +const MIDDLE_DOT = 0x00b7; +const GREEK_KERAIA = 0x0375; +const KATAKANA_MIDDLE_DOT = 0x30fb; +const HEBREW_GERESH = 0x05f3; +const HEBREW_GERSHAYIM = 0x05f4; +// Viramas (used for special ZWJ/ZWNJ acceptance) +const VIRAMAS = new Set(viramas); +// binary range lookup +function getRange(range, key) { + if (!Array.isArray(range) || range.length === 0) return null; + let lb = 0; + let ub = range.length - 1; + while (lb <= ub) { + const mid = (lb + ub) >> 1; + const r = range[mid]; + if (key < r[0]) ub = mid - 1; + else if (key > r[1]) lb = mid + 1; + else return r[2]; + } + return null; +} +// mapping label (disallowed chars were removed from ranges, so undefined means disallowed or unassigned) +function uts46map(label) { + const mappedCps = []; + for (let i = 0; i < label.length; ) { + const cp = label.codePointAt(i); + const prop = props[getRange(ranges, cp)]; + const maps = mappings[String(cp)]; + // mapping cases + if (prop === 'mapped' && Array.isArray(maps) && maps.length) { + for (const mcp of maps) mappedCps.push(mcp); + } else if (prop === 'valid' || prop === 'deviation') { + mappedCps.push(cp); + } else if (prop === 'ignored') { + // drop + } else { + throwIdnaUnicodeError(`${cpHex(cp)} is disallowed in hostname (RFC 5892, UTS #46).`); + } + i += cp > 0xffff ? 2 : 1; + } + // mapped → label + return String.fromCodePoint(...mappedCps); +} +// --- helpers --- +function cpHex(cp) { + return `char '${String.fromCodePoint(cp)}' ` + JSON.stringify('(U+' + cp.toString(16).toUpperCase().padStart(4, '0') + ')'); +} +// main validator +function isIdnHostname(hostname) { + // basic hostname checks + if (typeof hostname !== 'string') throwIdnaSyntaxError('Label must be a string (RFC 5890 §2.3.2.3).'); + // split hostname in labels by the separators defined in uts#46 §2.3 + const rawLabels = hostname.split(/[\x2E\uFF0E\u3002\uFF61]/); + if (rawLabels.some((label) => label.length === 0)) throwIdnaLengthError('Label cannot be empty (consecutive or leading/trailing dot) (RFC 5890 §2.3.2.3).'); + // checks per label (IDNA is defined for labels, not for parts of them and not for complete domain names. RFC 5890 §2.3.2.1) + let aceHostnameLength = 0; + for (const rawLabel of rawLabels) { + // ACE label (xn--) validation: decode and re-encode must match + let label = rawLabel; + if (/^xn--/i.test(rawLabel)) { + if (/[^\p{ASCII}]/u.test(rawLabel)) throwIdnaSyntaxError(`A-label '${rawLabel}' cannot contain non-ASCII character(s) (RFC 5890 §2.3.2.1).`); + const aceBody = rawLabel.slice(4); + try { + label = punycode.decode(aceBody); + } catch (e) { + throwPunycodeError(`Invalid ASCII Compatible Encoding (ACE) of label '${rawLabel}' (RFC 5891 §4.4 → RFC 3492).`); + } + if (!/[^\p{ASCII}]/u.test(label)) throwIdnaSyntaxError(`decoded A-label '${rawLabel}' result U-label '${label}' cannot be empty or all-ASCII character(s) (RFC 5890 §2.3.2.1).`); + if (punycode.encode(label) !== aceBody) throwPunycodeError(`Re-encode mismatch for ASCII Compatible Encoding (ACE) label '${rawLabel}' (RFC 5891 §4.4 → RFC 3492).`); + } + // mapping phase (here because decoded A-label may contain disallowed chars) + label = uts46map(label).normalize('NFC'); + // final ACE label lenght accounting + let aceLabel; + try { + aceLabel = /[^\p{ASCII}]/u.test(label) ? punycode.toASCII(label) : label; + } catch (e) { + throwPunycodeError(`ASCII conversion failed for '${label}' (RFC 3492).`); + } + if (aceLabel.length > 63) throwIdnaLengthError('Final ASCII Compatible Encoding (ACE) label cannot exceed 63 bytes (RFC 5890 §2.3.2.1).'); + aceHostnameLength += aceLabel.length + 1; + // hyphen rules (the other one is covered by bidi) + if (/^-|-$/.test(label)) throwIdnaSyntaxError('Label cannot begin or end with hyphen-minus (RFC 5891 §4.2.3.1).'); + if (label.indexOf('--') === 2) throwIdnaSyntaxError('Label cannot contain consecutive hyphen-minus in the 3rd and 4th positions (RFC 5891 §4.2.3.1).'); + // leading combining marks check (some are not covered by bidi) + if (/^\p{M}$/u.test(String.fromCodePoint(label.codePointAt(0)))) throwIdnaSyntaxError(`Label cannot begin with combining/enclosing mark ${cpHex(label.codePointAt(0))} (RFC 5891 §4.2.3.2).`); + // spread cps for context and bidi checks + const cps = Array.from(label).map((char) => char.codePointAt(0)); + let joinTypes = ''; + let digits = ''; + let bidiClasses = []; + // per-codepoint contextual checks + for (let j = 0; j < cps.length; j++) { + const cp = cps[j]; + // check ContextJ ZWNJ (uses joining types and virama rule) + if (cps.includes(ZWNJ)) { + joinTypes += VIRAMAS.has(cp) ? 'V' : cp === ZWNJ ? 'Z' : getRange(joining_type_ranges, cp) || 'U'; + if (j === cps.length - 1 && /(?![LD][T]*)(?= 0x0660 && cp <= 0x0669) || (cp >= 0x06f0 && cp <= 0x06f9)) digits += (cp < 0x06f0 ? 'a' : 'e' ); + if (j === cps.length - 1 && /^(?=.*a)(?=.*e).*$/.test(digits)) throwIdnaContextOError('Arabic-Indic digits cannot be mixed with Extended Arabic-Indic digits (RFC 5892 Appendix A.8/A.9).'); + // validate bidi + bidiClasses.push(getRange(bidi_ranges, cp)); + if (j === cps.length - 1 && (bidiClasses.includes('R') || bidiClasses.includes('AL'))) { + // order of chars in label (RFC 5890 §2.3.3) + if (bidiClasses[0] === 'R' || bidiClasses[0] === 'AL') { + for (let cls of bidiClasses) if (!['R', 'AL', 'AN', 'EN', 'ET', 'ES', 'CS', 'ON', 'BN', 'NSM'].includes(cls)) throwIdnaBidiError(`'${label}' breaks rule #2: Only R, AL, AN, EN, ET, ES, CS, ON, BN, NSM allowed in label (RFC 5893 §2.2)`); + if (!/(R|AL|EN|AN)(NSM)*$/.test(bidiClasses.join(''))) throwIdnaBidiError(`'${label}' breaks rule #3: label must end with R, AL, EN, or AN, followed by zero or more NSM (RFC 5893 §2.3)`); + if (bidiClasses.includes('EN') && bidiClasses.includes('AN')) throwIdnaBidiError(`'${label}' breaks rule #4: EN and AN cannot be mixed in the same label (RFC 5893 §2.4)`); + } else if (bidiClasses[0] === 'L') { + for (let cls of bidiClasses) if (!['L', 'EN', 'ET', 'ES', 'CS', 'ON', 'BN', 'NSM'].includes(cls)) throwIdnaBidiError(`'${label}' breaks rule #5: Only L, EN, ET, ES, CS, ON, BN, NSM allowed in label (RFC 5893 §2.5)`); + if (!/(L|EN)(NSM)*$/.test(bidiClasses.join(''))) throwIdnaBidiError(`'${label}' breaks rule #6: label must end with L or EN, followed by zero or more NSM (RFC 5893 §2.6)`); + } else { + throwIdnaBidiError(`'${label}' breaks rule #1: label must start with L or R or AL (RFC 5893 §2.1)`); + } + } + } + } + if (aceHostnameLength - 1 > 253) throwIdnaLengthError('Final ASCII Compatible Encoding (ACE) hostname cannot exceed 253 bytes (RFC 5890 → RFC 1034 §3.1).'); + return true; +} +// return ACE hostname if valid +const idnHostname = (string) => + isIdnHostname(string) && + punycode.toASCII( + string + .split('.') + .map((label) => uts46map(label).normalize('NFC')) + .join('.') + ); +// export +module.exports = { isIdnHostname, idnHostname, uts46map, punycode }; diff --git a/node_modules/idn-hostname/package.json b/node_modules/idn-hostname/package.json new file mode 100644 index 00000000..6d55ee34 --- /dev/null +++ b/node_modules/idn-hostname/package.json @@ -0,0 +1,33 @@ +{ + "name": "idn-hostname", + "version": "15.1.8", + "description": "An internationalized hostname validator as defined by RFC5890, RFC5891, RFC5892, RFC5893, RFC3492 and UTS#46", + "keywords": [ + "idn-hostname", + "idna", + "validation", + "unicode", + "mapping" + ], + "homepage": "https://github.com/SorinGFS/idn-hostname#readme", + "bugs": { + "url": "https://github.com/SorinGFS/idn-hostname/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/SorinGFS/idn-hostname.git" + }, + "license": "MIT", + "author": "SorinGFS", + "type": "commonjs", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "punycode": "^2.3.1" + }, + "devDependencies": { + "@types/punycode": "^2.1.4" + } +} diff --git a/node_modules/idn-hostname/readme.md b/node_modules/idn-hostname/readme.md new file mode 100644 index 00000000..7634e087 --- /dev/null +++ b/node_modules/idn-hostname/readme.md @@ -0,0 +1,302 @@ +--- + +title: IDN Hostname + +description: A validator for Internationalized Domain Names (`IDNA`) in conformance with the current standards. + +--- + +## Overview + +This is a validator for Internationalized Domain Names (`IDNA`) in conformance with the current standards (`RFC 5890 - 5891 - 5892 - 5893 - 3492`) and the current adoption level of Unicode (`UTS#46`) in javascript (`15.1.0`). + +**Browser/Engine Support:** Modern browsers (Chrome, Firefox, Safari, Edge) and Node.js (v18+). + +This document explains, in plain terms, what this validator does, which RFC/UTS rules it enforces, what it intentionally **does not** check, and gives some relevant examples so you can see how hostnames are classified. + +The data source for the validator is a `json` constructed as follows: + +- Baseline = Unicode `IdnaMappingTable` with allowed chars (based on props: valid/mapped/deviation/ignored/disallowed). +- Viramas = Unicode `DerivedCombiningClass` with `viramas`(Canonical_Combining_Class=Virama). +- Overlay 1 = Unicode `IdnaMappingTable` for mappings applied on top of the baseline. +- Overlay 2 = Unicode `DerivedJoinTypes` for join types (D,L,R,T,U) applied on top of the baseline. +- Overlay 3 = Unicode `DerivedBidiClass` for bidi classes (L,R,AL,NSM,EN,ES,ET,AN,CS,BN,B,S,WS,ON) applied on top of the baseline. + +## Usage + +**Install:** +```js title="js" +npm i idn-hostname +``` + +**Import the idn-hostname validator:** +```js title="js" +const { isIdnHostname } = require('idn-hostname'); +// the validator is returning true or detailed error +try { + if ( isIdnHostname('abc')) console.log(true); +} catch (error) { + console.log(error.message); +} +``` + +**Import the idn-hostname ACE converter:** +```js title="js" +const { idnHostname } = require('idn-hostname'); +// the idnHostname is returning the ACE hostname or detailed error (it also validates the input) +try { + const idna = idnHostname('abc'); +} catch (error) { + console.log(error.message); +} +``` + +**Import the punycode converter (convenient exposure of punycode functions):** +```js title="js" +const { idnHostname, punycode } = require('idn-hostname'); +// get the unicode version of an ACE hostname or detailed error +try { + const uLabel = punycode.toUnicode(idnHostname('abc')); + // or simply use the punycode API for some needs +} catch (error) { + console.log(error.message); +} +``` + +**Import the UTS46 mapping function:** +```js title="js" +const { uts46map } = require('idn-hostname'); +// the uts46map is returning the uts46 mapped label (not hostname) or an error if label has dissallowed or unassigned chars +try { + const label = uts46map('abc').normalize('NFC'); +} catch (error) { + console.log(error.message); +} +``` + +## Versioning + +Each release will have its `major` and `minor` version identical with the related `unicode` version, and the `minor` version variable. No `major` or `minor` (structural) changes are expected other than a `unicode` version based updated `json` data source. + +## What does (point-by-point) + +1. **Baseline data**: uses the Unicode `IdnaMappingTable` (RFC 5892 / Unicode UCD) decoded into per-code-point classes (PVALID, DISALLOWED, CONTEXTJ, CONTEXTO, UNASSIGNED). + + - Reference: RFC 5892 (IDNA Mapping Table derived from Unicode). + +2. **UTS#46 overlay**: applies UTS#46 statuses/mappings on top of the baseline. Where `UTS#46` marks a code point as `valid`, `mapped`, `deviation`, `ignored` or `disallowed`, those override the baseline for that codepoint. Mappings from `UTS#46` are stored in the `mappings` layer. + + - Reference: `UTS#46` (Unicode IDNA Compatibility Processing). + +3. **Join Types overlay**: uses the Unicode `DerivedJoinTypes` to apply char join types on top of the baseline. Mappings from Join Types are stored in the `joining_type_ranges` layer. + + - Reference: `RFC 5892` (The Unicode Code Points and IDNA). + +4. **BIDI overlay**: uses the Unicode `DerivedBidiClass` to apply BIDI derived classes on top of the baseline. Mappings from BIDI are stored in the `bidi_ranges` layer. + + - Reference: `RFC 5893` (Right-to-Left Scripts for IDNA). + +5. **Compact four-layer data source**: the script uses a compact JSON (`idnaMappingTableCompact.json`) merged from three data sources with: + + - `props` — list of property names (`valid`,`mapped`,`deviation`,`ignored`,`disallowed`), + - `viramas` — list of `virama` codepoints (Canonical_Combining_Class=Virama), + - `ranges` — merged contiguous ranges with a property index, + - `mappings` — map from code point → sequence of code points (for `mapped`/`deviation`), + - `joining_type_ranges` — merged contiguous ranges with a property index. + - `bidi_ranges` — merged contiguous ranges with a property index. + +6. **Mapping phase (at validation time)**: + + - For each input label the validator: + 1. Splits the hostname into labels (by `.` or alternate label separators). Empty labels are rejected. + 2. For each label, maps codepoints according to `mappings` (`valid` and `deviation` are passed as they are, `mapped` are replaced with the corresponding codepoints, `ignored` are ignored, any other chars are triggering `IdnaUnicodeError`). + 3. Normalizes the resulting mapped label with NFC. + 4. Checks length limits (label ≤ 63, full name ≤ 253 octets after ASCII punycode conversion). + 5. Validates label-level rules (leading combining/enclosing marks forbidden, hyphen rules, ACE/punycode re-encode correctness). + 6. Spreads each label into code points for contextual and bidi checks. + 7. Performs contextual checks (CONTEXTJ, CONTEXTO) using the `joining_type_ranges` from compact table (e.g. virama handling for ZWJ/ZWNJ, Catalan middle dot rule, Hebrew geresh/gershayim rule, Katakana middle dot contextual rule, Arabic digit mixing rule). + 8. Checks Bidi rules using the `bidi_ranges` from compact table. + - See the sections below for exact checks and RFC references. + +7. **Punycode / ACE checking**: + + - If a label starts with the ACE prefix `xn--`, the validator will decode the ACE part (using punycode), verify decoding succeeds, and re-encode to verify idempotency (the encoded value must match the original ACE, case-insensitive). + - If punycode decode or re-encode fails, the label is rejected. + - Reference: RFC 5890 §2.3.2.1, RFC 3492 (Punycode). + +8. **Leading/trailing/compressed-hyphens**: + + - Labels cannot start or end with `-` (LDH rule). + - ACE/punycode special rule: labels containing `--` at positions 3–4 (that’s the ACE indicator) and not starting with `xn` are invalid (RFC 5891 §4.2) + +9. **Combining/enclosing marks**: + + - A label may not start with General Category `M` — i.e. combining or enclosing mark at the start of a label is rejected. (RFC 5891 §4.2.3.2) + +10. **Contextual checks (exhaustive requirements from RFC 5892 A.1-A.9 appendices)**: + + - ZWNJ / ZWJ: allowed in context only (CONTEXTJ) (Appendix A.1/A.2, RFC 5892 and PR-37). Implemented checks: + - ZWJ/ZWNJ allowed without other contextual condition if preceded by a virama (a diacritic mark used in many Indic scripts to suppress the inherent vowel that normally follows a consonant). + - ZWNJ (if not preceded by virama) allowed only if joining context matches the RFC rules. + - Middle dot (U+00B7): allowed only between two `l` / `L` (Catalan rule). (RFC 5891 §4.2.3.3; RFC 5892 Appendix A.3) + - Greek keraia (U+0375): must be followed by a Greek letter. (RFC 5892 Appendix A.4) + - Hebrew geresh/gershayim (U+05F3 / U+05F4): must follow a Hebrew letter. (RFC 5892 Appendix A.5/A.6) + - Katakana middle dot (U+30FB): allowed if the label contains at least one character in Hiragana/Katakana/Han. (RFC 5892 Appendix A.7) + - Arabic/Extended Arabic digits: the mix of Arabic-Indic digits (U+0660–U+0669) with Extended Arabic-Indic digits (U+06F0–U+06F9) within the same label is not allowed. (RFC 5892 Appendix A.8/A.9) + +11. **Bidi enforcement**: + + - In the Unicode Bidirectional Algorithm (BiDi), characters are assigned to bidirectional classes that determine their behavior in mixed-direction text. These classes are used by the algorithm to resolve the order of characters. If given input is breaking one of the six Bidi rules the label is rejected. (RFC 5893) + +12. **Total and per-label length**: + + - Total ASCII length (after ASCII conversion of non-ASCII labels) must be ≤ 253 octets. (RFC 5890, RFC 3492) + +13. **Failure handling**: + + - The validator throws short errors (single-line, named exceptions) at the first fatal violation encountered (the smallest error ends the function). Each thrown error includes the RFC/UTS rule reference in its message. + +## What does _not_ do + +- This validator does not support `context` or `locale` specific [Special Casing](https://www.unicode.org/Public/16.0.0/ucd/SpecialCasing.txt) mappings. For such needs some sort of `mapping` must be done before using this validator. +- This validator does not support `UTS#46 useTransitional` backward compatibility flag. +- This validator does not support `UTS#46 STD3 ASCII rules`, when required they can be enforced on separate layer. +- This validator does not attempt to resolve or query DNS — it only validates label syntax/mapping/contextual/bidi rules. + +## Examples + +### PASS examples + +```yaml title="yaml" + - hostname: "a" # single char label + - hostname: "a⁠b" # contains WORD JOINER (U+2060), ignored in IDNA table + - hostname: "example" # multi char label + - hostname: "host123" # label with digits + - hostname: "test-domain" # label with hyphen-minus + - hostname: "my-site123" # label with hyphen-minus and digits + - hostname: "sub.domain" # multi-label + - hostname: "mañana" # contains U+00F1 + - hostname: "xn--maana-pta" # ACE for mañana + - hostname: "bücher" # contains U+00FC + - hostname: "xn--bcher-kva" # ACE for bücher + - hostname: "café" # contains U+00E9 + - hostname: "xn--caf-dma" # ACE for café + - hostname: "straße" # German sharp s; allowed via exceptions + - hostname: "façade" # French ç + - hostname: "élève" # French é and è + - hostname: "Γειά" # Greek + - hostname: "åland" # Swedish å + - hostname: "naïve" # Swedish ï + - hostname: "smörgåsbord" # Swedish ö + - hostname: "пример" # Cyrillic + - hostname: "пример.рф" # multi-label Cyrillic + - hostname: "xn--d1acpjx3f.xn--p1ai" # ACE for Cyrillic + - hostname: "مثال" # Arabic + - hostname: "דוגמה" # Hebrew + - hostname: "예시" # Korean Hangul + - hostname: "ひらがな" # Japanese Hiragana + - hostname: "カタカナ" # Japanese Katakana + - hostname: "例.例" # multi-label Japanese Katakana + - hostname: "例子" # Chinese Han + - hostname: "สาธิต" # Thai + - hostname: "ຕົວຢ່າງ" # Lao + - hostname: "उदाहरण" # Devanagari + - hostname: "क्‍ष" # Devanagari with Virama + ZWJ + - hostname: "क्‌ष" # Devanagari with Virama + ZWNJ + - hostname: "l·l" # Catalan middle dot between 'l' (U+00B7) + - hostname: "L·l" # Catalan middle dot between mixed case 'l' chars + - hostname: "L·L" # Catalan middle dot between 'L' (U+004C) + - hostname: "( "a".repeat(63) ) " # 63 'a's (label length OK) +``` + +### FAIL examples + +```yaml title="yaml" + - hostname: "" # empty hostname + - hostname: "-abc" # leading hyphen forbidden (LDH) + - hostname: "abc-" # trailing hyphen forbidden (LDH) + - hostname: "a b" # contains space + - hostname: "a b" # contains control/tab + - hostname: "a@b" # '@' + - hostname: ".abc" # leading dot → empty label + - hostname: "abc." # trailing dot → empty label (unless FQDN handling expects trailing dot) + - hostname: "a..b" # empty label between dots + - hostname: "a.b..c" # empty label between dots + - hostname: "a#b" # illegal char '#' + - hostname: "a$b" # illegal char '$' + - hostname: "abc/def" # contains slash + - hostname: "a\b" # contains backslash + - hostname: "a%b" # contains percent sign + - hostname: "a^b" # contains caret + - hostname: "a*b" # contains asterisk + - hostname: "a(b)c" # contains parentheses + - hostname: "a=b" # contains equal sign + - hostname: "a+b" # contains plus sign + - hostname: "a,b" # contains comma + - hostname: "a@b" # contains '@' + - hostname: "a;b" # contains semicolon + - hostname: "\n" # contains newline + - hostname: "·" # middle-dot without neighbors + - hostname: "a·" # middle-dot at end + - hostname: "·a" # middle-dot at start + - hostname: "a·l" # middle dot not between two 'l' (Catalan rule) + - hostname: "l·a" # middle dot not between two 'l' + - hostname: "α͵" # Greek keraia not followed by Greek + - hostname: "α͵S" # Greek keraia followed by non-Greek + - hostname: "٠۰" # Arabic-Indic & Extended Arabic-Indic digits mixed + - hostname: ( "a".repeat(64) ) # label length > 63 + - hostname: "￿" # noncharacter (U+FFFF) disallowed in IDNA table + - hostname: "a‌" # contains ZWNJ (U+200C) at end (contextual rules fail) + - hostname: "a‍" # contains ZWJ (U+200D) at end (contextual rules fail) + - hostname: "̀hello" # begins with combining mark (U+0300) + - hostname: "҈hello" # begins with enclosing mark (U+0488) + - hostname: "실〮례" # contains HANGUL SINGLE DOT TONE MARK (U+302E) + - hostname: "control\x01char" # contains control character + - hostname: "abc\u202Edef" # bidi formatting codepoint, disallowed in IDNA table + - hostname: "́" # contains combining mark (U+0301) + - hostname: "؜" # contains Arabic control (control U+061C) + - hostname: "۝" # Arabic end of ayah (control U+06DD) + - hostname: "〯" # Hangul double-dot (U+302F), disallowed in IDNA table + - hostname: "a￰b" # contains noncharacter (U+FFF0) in the middle + - hostname: "emoji😀" # emoji (U+1F600), disallowed in IDNA table + - hostname: "label\uD800" # contains high surrogate on its own + - hostname: "\uDC00label" # contains low surrogate on its own + - hostname: "a‎" # contains left-to-right mark (control formatting) + - hostname: "a‏" # contains right-to-left mark (control formatting) + - hostname: "xn--" # ACE prefix without payload + - hostname: "xn---" # triple hyphen-minus (extra '-') in ACE + - hostname: "xn---abc" # triple hyphen-minus followed by chars + - hostname: "xn--aa--bb" # ACE payload having hyphen-minus in the third and fourth position + - hostname: "xn--xn--double" # ACE payload that is also ACE + - hostname: "xn--X" # invalid punycode (decode fails) + - hostname: "xn--abcナ" # ACE containing non-ASCII char + - hostname: "xn--abc\x00" # ACE containing control/NUL + - hostname: "xn--abc\uFFFF" # ACE containing noncharacter +``` + +:::note + +Far from being exhaustive, the examples are illustrative and chosen to demonstrate rule coverage. Also: +- some of the characters are invisible, +- some unicode codepoints that cannot be represented in `yaml` (those having `\uXXXX`) should be considered as `json`. + +::: + +**References (specs)** + +- `RFC 5890` — Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework. +- `RFC 5891` — IDNA2008: Protocol and Implementation (label rules, contextual rules, ACE considerations). +- `RFC 5892` — IDNA Mapping Table (derived from Unicode). +- `RFC 5893` — Right-to-left Scripts: Bidirectional text handling for domain names. +- `RFC 3492` — Punycode (ACE / punycode algorithm). +- `UTS #46` — Unicode IDNA Compatibility Processing (mappings / deviations / transitional handling). + +:::info + +Links are intentionally not embedded here — use the RFC/UTS numbers to fetch authoritative copies on ietf.org and unicode.org. + +::: + +## Disclaimer + +Some hostnames above are language or script-specific examples — they are provided to exercise the mapping/context rules, not to endorse any particular registration practice. Also, there should be no expectation that results validated by this validator will be automatically accepted by registrants, they may apply their own additional rules on top of those defined by IDNA. diff --git a/node_modules/json-stringify-deterministic/LICENSE.md b/node_modules/json-stringify-deterministic/LICENSE.md new file mode 100644 index 00000000..6fdd0d27 --- /dev/null +++ b/node_modules/json-stringify-deterministic/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © 2016 Kiko Beats (https://github.com/Kikobeats) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/json-stringify-deterministic/README.md b/node_modules/json-stringify-deterministic/README.md new file mode 100644 index 00000000..aca277dc --- /dev/null +++ b/node_modules/json-stringify-deterministic/README.md @@ -0,0 +1,143 @@ +# json-stringify-deterministic + +![Last version](https://img.shields.io/github/tag/Kikobeats/json-stringify-deterministic.svg?style=flat-square) +[![Coverage Status](https://img.shields.io/coveralls/Kikobeats/json-stringify-deterministic.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/json-stringify-deterministic) +[![NPM Status](https://img.shields.io/npm/dm/json-stringify-deterministic.svg?style=flat-square)](https://www.npmjs.org/package/json-stringify-deterministic) + +> Deterministic version of `JSON.stringify()`, so you can get a consistent hash from stringified results. + +Similar to [json-stable-stringify](https://github.com/substack/json-stable-stringify) *but*: + +- No Dependencies. Minimal as possible. +- Better cycles detection. +- Support serialization for object without `.toJSON` (such as `RegExp`). +- Provides built-in TypeScript declarations. + +## Install + +```bash +npm install json-stringify-deterministic --save +``` + +## Usage + +```js +const stringify = require('json-stringify-deterministic') +const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 } + +console.log(stringify(obj)) +// => {"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} +``` + +## API + +### stringify(<obj>, [opts]) + +#### obj + +*Required*
+Type: `object` + +The input `object` to be serialized. + +#### opts + +##### opts.stringify + +Type: `function` +Default: `JSON.stringify` + +Determinate how to stringify primitives values. + +##### opts.cycles + +Type: `boolean` +Default: `false` + +Determinate how to resolve cycles. + +Under `true`, when a cycle is detected, `[Circular]` will be inserted in the node. + +##### opts.compare + +Type: `function` + +Custom comparison function for object keys. + +Your function `opts.compare` is called with these parameters: + +``` js +opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) +``` + +For example, to sort on the object key names in reverse order you could write: + +``` js +const stringify = require('json-stringify-deterministic') + +const obj = { c: 8, b: [{z: 6,y: 5,x: 4}, 7], a: 3 } +const objSerializer = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1 +}) + +console.log(objSerializer) +// => {"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} +``` + +Or if you wanted to sort on the object values in reverse order, you could write: + +```js +const stringify = require('json-stringify-deterministic') + +const obj = { d: 6, c: 5, b: [{ z: 3, y: 2, x: 1 }, 9], a: 10 } +const objtSerializer = stringify(obj, function (a, b) { + return a.value < b.value ? 1 : -1 +}) + +console.log(objtSerializer) +// => {"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} +``` + +##### opts.space + +Type: `string`
+Default: `''` + +If you specify `opts.space`, it will indent the output for pretty-printing. + +Valid values are strings (e.g. `{space: \t}`). For example: + +```js +const stringify = require('json-stringify-deterministic') + +const obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } } +const objSerializer = stringify(obj, { space: ' ' }) +console.log(objSerializer) +// => { +// "a": { +// "and": [ +// 1, +// 2, +// 3 +// ], +// "foo": "bar" +// }, +// "b": 1 +// } +``` + +##### opts.replacer + +Type: `function`
+ +The replacer parameter is a function `opts.replacer(key, value)` that behaves +the same as the replacer +[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter). + +## Related + +- [sort-keys-recursive](https://github.com/Kikobeats/sort-keys-recursive): Sort the keys of an array/object recursively. + +## License + +MIT © [Kiko Beats](https://github.com/Kikobeats). diff --git a/node_modules/json-stringify-deterministic/package.json b/node_modules/json-stringify-deterministic/package.json new file mode 100644 index 00000000..76ab7a65 --- /dev/null +++ b/node_modules/json-stringify-deterministic/package.json @@ -0,0 +1,101 @@ +{ + "name": "json-stringify-deterministic", + "description": "deterministic version of JSON.stringify() so you can get a consistent hash from stringified results.", + "homepage": "https://github.com/Kikobeats/json-stringify-deterministic", + "version": "1.0.12", + "types": "./lib/index.d.ts", + "main": "lib", + "author": { + "email": "josefrancisco.verdu@gmail.com", + "name": "Kiko Beats", + "url": "https://github.com/Kikobeats" + }, + "contributors": [ + { + "name": "Junxiao Shi", + "email": "sunnylandh@gmail.com" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/kikobeats/json-stringify-deterministic.git" + }, + "bugs": { + "url": "https://github.com/Kikobeats/json-stringify-deterministic/issues" + }, + "keywords": [ + "deterministic", + "hash", + "json", + "sort", + "stable", + "stringify" + ], + "devDependencies": { + "@commitlint/cli": "latest", + "@commitlint/config-conventional": "latest", + "@ksmithut/prettier-standard": "latest", + "c8": "latest", + "ci-publish": "latest", + "conventional-github-releaser": "latest", + "finepack": "latest", + "git-authors-cli": "latest", + "mocha": "latest", + "nano-staged": "latest", + "npm-check-updates": "latest", + "should": "latest", + "simple-git-hooks": "latest", + "standard": "latest", + "standard-markdown": "latest", + "standard-version": "latest" + }, + "engines": { + "node": ">= 4" + }, + "files": [ + "index.js", + "lib" + ], + "scripts": { + "clean": "rm -rf node_modules", + "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "lint": "standard && standard-markdown", + "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)", + "prerelease": "npm run update:check && npm run contributors", + "pretest": "npm run lint", + "release": "standard-version -a", + "release:github": "conventional-github-releaser -p angular", + "release:tags": "git push --follow-tags origin HEAD:master", + "test": "c8 mocha --require should", + "update": "ncu -u", + "update:check": "ncu -- --error-level 2" + }, + "license": "MIT", + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "nano-staged": { + "*.js": [ + "prettier-standard" + ], + "*.md": [ + "standard-markdown" + ], + "package.json": [ + "finepack" + ] + }, + "simple-git-hooks": { + "commit-msg": "npx commitlint --edit", + "pre-commit": "npx nano-staged" + }, + "standard": { + "globals": [ + "describe", + "it" + ] + } +} diff --git a/node_modules/jsonc-parser/CHANGELOG.md b/node_modules/jsonc-parser/CHANGELOG.md new file mode 100644 index 00000000..3414a3f1 --- /dev/null +++ b/node_modules/jsonc-parser/CHANGELOG.md @@ -0,0 +1,76 @@ +3.3.0 2022-06-24 +================= +- `JSONVisitor.onObjectBegin` and `JSONVisitor.onArrayBegin` can now return `false` to instruct the visitor that no children should be visited. + + +3.2.0 2022-08-30 +================= +- update the version of the bundled Javascript files to `es2020`. +- include all `const enum` values in the bundled JavaScript files (`ScanError`, `SyntaxKind`, `ParseErrorCode`). + +3.1.0 2022-07-07 +================== + * added new API `FormattingOptions.keepLines` : It leaves the initial line positions in the formatting. + +3.0.0 2020-11-13 +================== + * fixed API spec for `parseTree`. Can return `undefine` for empty input. + * added new API `FormattingOptions.insertFinalNewline`. + + +2.3.0 2020-07-03 +================== + * new API `ModificationOptions.isArrayInsertion`: If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then `modify` will insert a new item at that location instead of overwriting its contents. + * `ModificationOptions.formattingOptions` is now optional. If not set, newly inserted content will not be formatted. + + +2.2.0 2019-10-25 +================== + * added `ParseOptions.allowEmptyContent`. Default is `false`. + * new API `getNodeType`: Returns the type of a value returned by parse. + * `parse`: Fix issue with empty property name + +2.1.0 2019-03-29 +================== + * `JSONScanner` and `JSONVisitor` return lineNumber / character. + +2.0.0 2018-04-12 +================== + * renamed `Node.columnOffset` to `Node.colonOffset` + * new API `getNodePath`: Gets the JSON path of the given JSON DOM node + * new API `findNodeAtOffset`: Finds the most inner node at the given offset. If `includeRightBound` is set, also finds nodes that end at the given offset. + +1.0.3 2018-03-07 +================== + * provide ems modules + +1.0.2 2018-03-05 +================== + * added the `visit.onComment` API, reported when comments are allowed. + * added the `ParseErrorCode.InvalidCommentToken` enum value, reported when comments are disallowed. + +1.0.1 +================== + * added the `format` API: computes edits to format a JSON document. + * added the `modify` API: computes edits to insert, remove or replace a property or value in a JSON document. + * added the `allyEdits` API: applies edits to a document + +1.0.0 +================== + * remove nls dependency (remove `getParseErrorMessage`) + +0.4.2 / 2017-05-05 +================== + * added `ParseError.offset` & `ParseError.length` + +0.4.1 / 2017-04-02 +================== + * added `ParseOptions.allowTrailingComma` + +0.4.0 / 2017-02-23 +================== + * fix for `getLocation`. Now `getLocation` inside an object will always return a property from inside that property. Can be empty string if the object has no properties or if the offset is before a actual property `{ "a": { | }} will return location ['a', ' ']` + +0.3.0 / 2017-01-17 +================== + * Updating to typescript 2.0 \ No newline at end of file diff --git a/node_modules/jsonc-parser/LICENSE.md b/node_modules/jsonc-parser/LICENSE.md new file mode 100644 index 00000000..f54f08dc --- /dev/null +++ b/node_modules/jsonc-parser/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/jsonc-parser/README.md b/node_modules/jsonc-parser/README.md new file mode 100644 index 00000000..d569b706 --- /dev/null +++ b/node_modules/jsonc-parser/README.md @@ -0,0 +1,364 @@ +# jsonc-parser +Scanner and parser for JSON with comments. + +[![npm Package](https://img.shields.io/npm/v/jsonc-parser.svg?style=flat-square)](https://www.npmjs.org/package/jsonc-parser) +[![NPM Downloads](https://img.shields.io/npm/dm/jsonc-parser.svg)](https://npmjs.org/package/jsonc-parser) +[![Build Status](https://github.com/microsoft/node-jsonc-parser/workflows/Tests/badge.svg)](https://github.com/microsoft/node-jsonc-parser/workflows/Tests) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + +Why? +---- +JSONC is JSON with JavaScript style comments. This node module provides a scanner and fault tolerant parser that can process JSONC but is also useful for standard JSON. + - the *scanner* tokenizes the input string into tokens and token offsets + - the *visit* function implements a 'SAX' style parser with callbacks for the encountered properties and values. + - the *parseTree* function computes a hierarchical DOM with offsets representing the encountered properties and values. + - the *parse* function evaluates the JavaScript object represented by JSON string in a fault tolerant fashion. + - the *getLocation* API returns a location object that describes the property or value located at a given offset in a JSON document. + - the *findNodeAtLocation* API finds the node at a given location path in a JSON DOM. + - the *format* API computes edits to format a JSON document. + - the *modify* API computes edits to insert, remove or replace a property or value in a JSON document. + - the *applyEdits* API applies edits to a document. + +Installation +------------ + +``` +npm install --save jsonc-parser +``` + +API +--- + +### Scanner: +```typescript + +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export function createScanner(text: string, ignoreTrivia: boolean = false): JSONScanner; + +/** + * The scanner object, representing a JSON scanner at a position in the input string. + */ +export interface JSONScanner { + /** + * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. + */ + setPosition(pos: number): any; + /** + * Read the next token. Returns the token code. + */ + scan(): SyntaxKind; + /** + * Returns the zero-based current scan position, which is after the last read token. + */ + getPosition(): number; + /** + * Returns the last read token. + */ + getToken(): SyntaxKind; + /** + * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. + */ + getTokenValue(): string; + /** + * The zero-based start offset of the last read token. + */ + getTokenOffset(): number; + /** + * The length of the last read token. + */ + getTokenLength(): number; + /** + * The zero-based start line number of the last read token. + */ + getTokenStartLine(): number; + /** + * The zero-based start character (column) of the last read token. + */ + getTokenStartCharacter(): number; + /** + * An error code of the last scan. + */ + getTokenError(): ScanError; +} +``` + +### Parser: +```typescript + +export interface ParseOptions { + disallowComments?: boolean; + allowTrailingComma?: boolean; + allowEmptyContent?: boolean; +} +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore always check the errors list to find out if the input was valid. + */ +export declare function parse(text: string, errors?: {error: ParseErrorCode;}[], options?: ParseOptions): any; + +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export declare function visit(text: string, visitor: JSONVisitor, options?: ParseOptions): any; + +/** + * Visitor called by {@linkcode visit} when parsing JSON. + * + * The visitor functions have the following common parameters: + * - `offset`: Global offset within the JSON document, starting at 0 + * - `startLine`: Line number, starting at 0 + * - `startCharacter`: Start character (column) within the current line, starting at 0 + * + * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the + * current `JSONPath` within the document. + */ +export interface JSONVisitor { + /** + * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. + * When `false` is returned, the array items will not be visited. + */ + onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void | boolean; + + /** + * Invoked when a property is encountered. The offset and length represent the location of the property name. + * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the + * property name yet. + */ + onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. + */ + onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. + * When `false` is returned, the array items will not be visited.* + */ + onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void | boolean; + /** + * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. + */ + onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. + */ + onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. + */ + onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. + */ + onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked on an error. + */ + onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; +} + +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export declare function parseTree(text: string, errors?: ParseError[], options?: ParseOptions): Node | undefined; + +export declare type NodeType = "object" | "array" | "property" | "string" | "number" | "boolean" | "null"; +export interface Node { + type: NodeType; + value?: any; + offset: number; + length: number; + colonOffset?: number; + parent?: Node; + children?: Node[]; +} + +``` + +### Utilities: +```typescript +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export declare function stripComments(text: string, replaceCh?: string): string; + +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export declare function getLocation(text: string, position: number): Location; + +/** + * A {@linkcode JSONPath} segment. Either a string representing an object property name + * or a number (starting at 0) for array indices. + */ +export declare type Segment = string | number; +export declare type JSONPath = Segment[]; +export interface Location { + /** + * The previous property key or literal value (string, number, boolean or null) or undefined. + */ + previousNode?: Node; + /** + * The path describing the location in the JSON document. The path consists of a sequence strings + * representing an object property or numbers for array indices. + */ + path: JSONPath; + /** + * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). + * '*' will match a single segment, of any property name or index. + * '**' will match a sequence of segments or no segment, of any property name or index. + */ + matches: (patterns: JSONPath) => boolean; + /** + * If set, the location's offset is at a property key. + */ + isAtPropertyKey: boolean; +} + +/** + * Finds the node at the given path in a JSON DOM. + */ +export function findNodeAtLocation(root: Node, path: JSONPath): Node | undefined; + +/** + * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export function findNodeAtOffset(root: Node, offset: number, includeRightBound?: boolean) : Node | undefined; + +/** + * Gets the JSON path of the given JSON DOM node + */ +export function getNodePath(node: Node): JSONPath; + +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export function getNodeValue(node: Node): any; + +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function format(documentText: string, range: Range, options: FormattingOptions): EditResult; + +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; + +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export function applyEdits(text: string, edits: EditResult): string; + +/** + * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. + * It consist of one or more edits describing insertions, replacements or removals of text segments. + * * The offsets of the edits refer to the original state of the document. + * * No two edits change or remove the same range of text in the original document. + * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. + * * The order in the array defines which edit is applied first. + * To apply an edit result use {@linkcode applyEdits}. + * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. + */ +export type EditResult = Edit[]; + +/** + * Represents a text modification + */ +export interface Edit { + /** + * The start offset of the modification. + */ + offset: number; + /** + * The length of the modification. Must not be negative. Empty length represents an *insert*. + */ + length: number; + /** + * The new content. Empty content represents a *remove*. + */ + content: string; +} + +/** + * A text range in the document +*/ +export interface Range { + /** + * The start offset of the range. + */ + offset: number; + /** + * The length of the range. Must not be negative. + */ + length: number; +} + +/** + * Options used by {@linkcode format} when computing the formatting edit operations + */ +export interface FormattingOptions { + /** + * If indentation is based on spaces (`insertSpaces` = true), then what is the number of spaces that make an indent? + */ + tabSize: number; + /** + * Is indentation based on spaces? + */ + insertSpaces: boolean; + /** + * The default 'end of line' character + */ + eol: string; +} + +/** + * Options used by {@linkcode modify} when computing the modification edit operations + */ +export interface ModificationOptions { + /** + * Formatting options. If undefined, the newly inserted code will be inserted unformatted. + */ + formattingOptions?: FormattingOptions; + /** + * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then + * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. + */ + isArrayInsertion?: boolean; + /** + * Optional function to define the insertion index given an existing list of properties. + */ + getInsertionIndex?: (properties: string[]) => number; +} +``` + + +License +------- + +(MIT License) + +Copyright 2018, Microsoft diff --git a/node_modules/jsonc-parser/SECURITY.md b/node_modules/jsonc-parser/SECURITY.md new file mode 100644 index 00000000..f7b89984 --- /dev/null +++ b/node_modules/jsonc-parser/SECURITY.md @@ -0,0 +1,41 @@ + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). + + \ No newline at end of file diff --git a/node_modules/jsonc-parser/package.json b/node_modules/jsonc-parser/package.json new file mode 100644 index 00000000..6536a20b --- /dev/null +++ b/node_modules/jsonc-parser/package.json @@ -0,0 +1,37 @@ +{ + "name": "jsonc-parser", + "version": "3.3.1", + "description": "Scanner and parser for JSON with comments.", + "main": "./lib/umd/main.js", + "typings": "./lib/umd/main.d.ts", + "module": "./lib/esm/main.js", + "author": "Microsoft Corporation", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/node-jsonc-parser" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/microsoft/node-jsonc-parser/issues" + }, + "devDependencies": { + "@types/mocha": "^10.0.7", + "@types/node": "^18.x", + "@typescript-eslint/eslint-plugin": "^7.13.1", + "@typescript-eslint/parser": "^7.13.1", + "eslint": "^8.57.0", + "mocha": "^10.4.0", + "rimraf": "^5.0.7", + "typescript": "^5.4.2" + }, + "scripts": { + "prepack": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs", + "compile": "tsc -p ./src && npm run lint", + "compile-esm": "tsc -p ./src/tsconfig.esm.json", + "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", + "clean": "rimraf lib", + "watch": "tsc -w -p ./src", + "test": "npm run compile && mocha ./lib/umd/test", + "lint": "eslint src/**/*.ts" + } +} diff --git a/node_modules/just-curry-it/CHANGELOG.md b/node_modules/just-curry-it/CHANGELOG.md new file mode 100644 index 00000000..f05ab7b7 --- /dev/null +++ b/node_modules/just-curry-it/CHANGELOG.md @@ -0,0 +1,25 @@ +# just-curry-it + +## 5.3.0 + +### Minor Changes + +- Rename node module .js -> .cjs + +## 5.2.1 + +### Patch Changes + +- fix: reorder exports to set default last #488 + +## 5.2.0 + +### Minor Changes + +- package.json updates to fix #467 and #483 + +## 5.1.0 + +### Minor Changes + +- Enhanced Type Defintions diff --git a/node_modules/just-curry-it/LICENSE b/node_modules/just-curry-it/LICENSE new file mode 100644 index 00000000..5d2c6e57 --- /dev/null +++ b/node_modules/just-curry-it/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 angus croll + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/just-curry-it/README.md b/node_modules/just-curry-it/README.md new file mode 100644 index 00000000..83f07a29 --- /dev/null +++ b/node_modules/just-curry-it/README.md @@ -0,0 +1,43 @@ + + + +## just-curry-it + +Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing. +Guilt-free utilities for every occasion. + +[`🍦 Try it`](https://anguscroll.com/just/just-curry-it) + +```shell +npm install just-curry-it +``` +```shell +yarn add just-curry-it +``` + +Return a curried function + +```js +import curry from 'just-curry-it'; + +function add(a, b, c) { + return a + b + c; +} +curry(add)(1)(2)(3); // 6 +curry(add)(1)(2)(2); // 5 +curry(add)(2)(4, 3); // 9 + +function add(...args) { + return args.reduce((sum, n) => sum + n, 0) +} +var curryAdd4 = curry(add, 4) +curryAdd4(1)(2, 3)(4); // 10 + +function converter(ratio, input) { + return (input*ratio).toFixed(1); +} +const curriedConverter = curry(converter) +const milesToKm = curriedConverter(1.62); +milesToKm(35); // 56.7 +milesToKm(10); // 16.2 +``` diff --git a/node_modules/just-curry-it/index.cjs b/node_modules/just-curry-it/index.cjs new file mode 100644 index 00000000..8917dec9 --- /dev/null +++ b/node_modules/just-curry-it/index.cjs @@ -0,0 +1,40 @@ +module.exports = curry; + +/* + function add(a, b, c) { + return a + b + c; + } + curry(add)(1)(2)(3); // 6 + curry(add)(1)(2)(2); // 5 + curry(add)(2)(4, 3); // 9 + + function add(...args) { + return args.reduce((sum, n) => sum + n, 0) + } + var curryAdd4 = curry(add, 4) + curryAdd4(1)(2, 3)(4); // 10 + + function converter(ratio, input) { + return (input*ratio).toFixed(1); + } + const curriedConverter = curry(converter) + const milesToKm = curriedConverter(1.62); + milesToKm(35); // 56.7 + milesToKm(10); // 16.2 +*/ + +function curry(fn, arity) { + return function curried() { + if (arity == null) { + arity = fn.length; + } + var args = [].slice.call(arguments); + if (args.length >= arity) { + return fn.apply(this, args); + } else { + return function() { + return curried.apply(this, args.concat([].slice.call(arguments))); + }; + } + }; +} diff --git a/node_modules/just-curry-it/index.d.ts b/node_modules/just-curry-it/index.d.ts new file mode 100644 index 00000000..ab9e7b3a --- /dev/null +++ b/node_modules/just-curry-it/index.d.ts @@ -0,0 +1,18 @@ +export default curry; + +type MakeTuple = C['length'] extends LEN ? C : MakeTuple +type CurryOverload any, N extends unknown[], P extends unknown[]> = + N extends [infer L, ...infer R] + ? ((...args: [...P, L]) => CurryInternal) & CurryOverload + : () => CurryInternal +type CurryInternal any, N extends unknown[]> = + 0 extends N['length'] ? ReturnType : CurryOverload +type Curry any, LEN extends number | undefined = undefined, I extends any = any> = + 0 extends (LEN extends undefined ? Parameters['length'] : LEN) + ? () => ReturnType + : CurryInternal : MakeTuple> + +declare function curry any, L extends number>( + fn: F, + arity?: L | undefined, +) : Curry[number]>; diff --git a/node_modules/just-curry-it/index.mjs b/node_modules/just-curry-it/index.mjs new file mode 100644 index 00000000..c4c185b2 --- /dev/null +++ b/node_modules/just-curry-it/index.mjs @@ -0,0 +1,42 @@ +var functionCurry = curry; + +/* + function add(a, b, c) { + return a + b + c; + } + curry(add)(1)(2)(3); // 6 + curry(add)(1)(2)(2); // 5 + curry(add)(2)(4, 3); // 9 + + function add(...args) { + return args.reduce((sum, n) => sum + n, 0) + } + var curryAdd4 = curry(add, 4) + curryAdd4(1)(2, 3)(4); // 10 + + function converter(ratio, input) { + return (input*ratio).toFixed(1); + } + const curriedConverter = curry(converter) + const milesToKm = curriedConverter(1.62); + milesToKm(35); // 56.7 + milesToKm(10); // 16.2 +*/ + +function curry(fn, arity) { + return function curried() { + if (arity == null) { + arity = fn.length; + } + var args = [].slice.call(arguments); + if (args.length >= arity) { + return fn.apply(this, args); + } else { + return function() { + return curried.apply(this, args.concat([].slice.call(arguments))); + }; + } + }; +} + +export {functionCurry as default}; diff --git a/node_modules/just-curry-it/index.tests.ts b/node_modules/just-curry-it/index.tests.ts new file mode 100644 index 00000000..5bb51f16 --- /dev/null +++ b/node_modules/just-curry-it/index.tests.ts @@ -0,0 +1,72 @@ +import curry from './index' + +function add(a: number, b: number, c: number) { + return a + b + c; +} + +// OK +curry(add); +curry(add)(1); +curry(add)(1)(2); +curry(add)(1)(2)(3); + +curry(add, 1); +curry(add, 1)(1); + +function many(a: string, b: number, c: boolean, d: bigint, e: number[], f: string | undefined, g: Record): boolean { + return true +} +const return1 = curry(many)('')(123)(false)(BigInt(2))([1])(undefined)({}) +const return2 = curry(many)('', 123)(false, BigInt(2))([1], '123')({}) +const return3 = curry(many)('', 123, false)(BigInt(2), [1], undefined)({}) +const return4 = curry(many)('', 123, false, BigInt(2))([1], undefined, {}) +const return5 = curry(many)('', 123, false, BigInt(2), [1])(undefined, {}) +const return6 = curry(many)('', 123, false, BigInt(2), [1], undefined)({}) +const return7 = curry(many)('', 123, false)(BigInt(2), [1])(undefined)({}) +const returns: boolean[] = [return1, return2, return3, return4, return5, return6, return7] + +function dynamic(...args: string[]): number { + return args.length +} +const dy1 = curry(dynamic, 1)('') +const dy2 = curry(dynamic, 2)('')('') +const dy3 = curry(dynamic, 3)('')('')('') +const dys: number[] = [dy1, dy2, dy3] + +// not OK +// @ts-expect-error +curry(add, 1)(1)(2); +// @ts-expect-error +curry(add, 1)(1)(2)(3); +// @ts-expect-error +curry(add, 4)(''); + +// @ts-expect-error +curry(many)(123) +// @ts-expect-error +curry(many)('', 123)(123) +// @ts-expect-error +curry(many)('', 123, true)('') +// @ts-expect-error +curry(many)('', 123, true, BigInt(2))('') +// @ts-expect-error +curry(many)('', 123, true, BigInt(2), [1])(123) +// @ts-expect-error +curry(many)('', 123, true, BigInt(2), [1,1], '')('') +// @ts-expect-error +curry(dynamic)(123) + +// @ts-expect-error +curry(); +// @ts-expect-error +curry(add, {}); +// @ts-expect-error +curry(add, 'abc')(1); +// @ts-expect-error +curry(1); +// @ts-expect-error +curry('hello'); +// @ts-expect-error +curry({}); +// @ts-expect-error +curry().a(); diff --git a/node_modules/just-curry-it/package.json b/node_modules/just-curry-it/package.json new file mode 100644 index 00000000..b735efff --- /dev/null +++ b/node_modules/just-curry-it/package.json @@ -0,0 +1,32 @@ +{ + "name": "just-curry-it", + "version": "5.3.0", + "description": "return a curried function", + "type": "module", + "exports": { + ".": { + "types": "./index.d.ts", + "require": "./index.cjs", + "import": "./index.mjs" + }, + "./package.json": "./package.json" + }, + "main": "index.cjs", + "types": "index.d.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "rollup -c" + }, + "repository": "https://github.com/angus-c/just", + "keywords": [ + "function", + "curry", + "no-dependencies", + "just" + ], + "author": "Angus Croll", + "license": "MIT", + "bugs": { + "url": "https://github.com/angus-c/just/issues" + } +} \ No newline at end of file diff --git a/node_modules/just-curry-it/rollup.config.js b/node_modules/just-curry-it/rollup.config.js new file mode 100644 index 00000000..fb9d24a3 --- /dev/null +++ b/node_modules/just-curry-it/rollup.config.js @@ -0,0 +1,3 @@ +const createRollupConfig = require('../../config/createRollupConfig'); + +module.exports = createRollupConfig(__dirname); diff --git a/node_modules/punycode/LICENSE-MIT.txt b/node_modules/punycode/LICENSE-MIT.txt new file mode 100644 index 00000000..a41e0a7e --- /dev/null +++ b/node_modules/punycode/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/punycode/README.md b/node_modules/punycode/README.md new file mode 100644 index 00000000..f611016b --- /dev/null +++ b/node_modules/punycode/README.md @@ -0,0 +1,148 @@ +# Punycode.js [![punycode on npm](https://img.shields.io/npm/v/punycode)](https://www.npmjs.com/package/punycode) [![](https://data.jsdelivr.com/v1/package/npm/punycode/badge)](https://www.jsdelivr.com/package/npm/punycode) + +Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891). + +This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: + +* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) +* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) +* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) +* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) +* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) + +This project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated). + +This project provides a CommonJS module that uses ES2015+ features and JavaScript module, which work in modern Node.js versions and browsers. For the old Punycode.js version that offers the same functionality in a UMD build with support for older pre-ES2015 runtimes, including Rhino, Ringo, and Narwhal, see [v1.4.1](https://github.com/mathiasbynens/punycode.js/releases/tag/v1.4.1). + +## Installation + +Via [npm](https://www.npmjs.com/): + +```bash +npm install punycode --save +``` + +In [Node.js](https://nodejs.org/): + +> ⚠️ Note that userland modules don't hide core modules. +> For example, `require('punycode')` still imports the deprecated core module even if you executed `npm install punycode`. +> Use `require('punycode/')` to import userland modules rather than core modules. + +```js +const punycode = require('punycode/'); +``` + +## API + +### `punycode.decode(string)` + +Converts a Punycode string of ASCII symbols to a string of Unicode symbols. + +```js +// decode domain name parts +punycode.decode('maana-pta'); // 'mañana' +punycode.decode('--dqo34k'); // '☃-⌘' +``` + +### `punycode.encode(string)` + +Converts a string of Unicode symbols to a Punycode string of ASCII symbols. + +```js +// encode domain name parts +punycode.encode('mañana'); // 'maana-pta' +punycode.encode('☃-⌘'); // '--dqo34k' +``` + +### `punycode.toUnicode(input)` + +Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. + +```js +// decode domain names +punycode.toUnicode('xn--maana-pta.com'); +// → 'mañana.com' +punycode.toUnicode('xn----dqo34k.com'); +// → '☃-⌘.com' + +// decode email addresses +punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); +// → 'джумла@джpумлатест.bрфa' +``` + +### `punycode.toASCII(input)` + +Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. + +```js +// encode domain names +punycode.toASCII('mañana.com'); +// → 'xn--maana-pta.com' +punycode.toASCII('☃-⌘.com'); +// → 'xn----dqo34k.com' + +// encode email addresses +punycode.toASCII('джумла@джpумлатест.bрфa'); +// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' +``` + +### `punycode.ucs2` + +#### `punycode.ucs2.decode(string)` + +Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. + +```js +punycode.ucs2.decode('abc'); +// → [0x61, 0x62, 0x63] +// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: +punycode.ucs2.decode('\uD834\uDF06'); +// → [0x1D306] +``` + +#### `punycode.ucs2.encode(codePoints)` + +Creates a string based on an array of numeric code point values. + +```js +punycode.ucs2.encode([0x61, 0x62, 0x63]); +// → 'abc' +punycode.ucs2.encode([0x1D306]); +// → '\uD834\uDF06' +``` + +### `punycode.version` + +A string representing the current Punycode.js version number. + +## For maintainers + +### How to publish a new release + +1. On the `main` branch, bump the version number in `package.json`: + + ```sh + npm version patch -m 'Release v%s' + ``` + + Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). + + Note that this produces a Git commit + tag. + +1. Push the release commit and tag: + + ```sh + git push && git push --tags + ``` + + Our CI then automatically publishes the new release to npm, under both the [`punycode`](https://www.npmjs.com/package/punycode) and [`punycode.js`](https://www.npmjs.com/package/punycode.js) names. + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## License + +Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/punycode/package.json b/node_modules/punycode/package.json new file mode 100644 index 00000000..b8b76fc7 --- /dev/null +++ b/node_modules/punycode/package.json @@ -0,0 +1,58 @@ +{ + "name": "punycode", + "version": "2.3.1", + "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", + "homepage": "https://mths.be/punycode", + "main": "punycode.js", + "jsnext:main": "punycode.es6.js", + "module": "punycode.es6.js", + "engines": { + "node": ">=6" + }, + "keywords": [ + "punycode", + "unicode", + "idn", + "idna", + "dns", + "url", + "domain" + ], + "license": "MIT", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/mathiasbynens/punycode.js.git" + }, + "bugs": "https://github.com/mathiasbynens/punycode.js/issues", + "files": [ + "LICENSE-MIT.txt", + "punycode.js", + "punycode.es6.js" + ], + "scripts": { + "test": "mocha tests", + "build": "node scripts/prepublish.js" + }, + "devDependencies": { + "codecov": "^3.8.3", + "nyc": "^15.1.0", + "mocha": "^10.2.0" + }, + "jspm": { + "map": { + "./punycode.js": { + "node": "@node/punycode" + } + } + } +} diff --git a/node_modules/punycode/punycode.es6.js b/node_modules/punycode/punycode.es6.js new file mode 100644 index 00000000..dadece25 --- /dev/null +++ b/node_modules/punycode/punycode.es6.js @@ -0,0 +1,444 @@ +'use strict'; + +/** Highest positive signed 32-bit float value */ +const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +const base = 36; +const tMin = 1; +const tMax = 26; +const skew = 38; +const damp = 700; +const initialBias = 72; +const initialN = 128; // 0x80 +const delimiter = '-'; // '\x2D' + +/** Regular expressions */ +const regexPunycode = /^xn--/; +const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. +const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +const baseMinusTMin = base - tMin; +const floor = Math.floor; +const stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, callback) { + const result = []; + let length = array.length; + while (length--) { + result[length] = callback(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {String} A new string of characters returned by the callback + * function. + */ +function mapDomain(domain, callback) { + const parts = domain.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + domain = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + domain = domain.replace(regexSeparators, '\x2E'); + const labels = domain.split('.'); + const encoded = map(labels, callback).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +const ucs2encode = codePoints => String.fromCodePoint(...codePoints); + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +const basicToDigit = function(codePoint) { + if (codePoint >= 0x30 && codePoint < 0x3A) { + return 26 + (codePoint - 0x30); + } + if (codePoint >= 0x41 && codePoint < 0x5B) { + return codePoint - 0x41; + } + if (codePoint >= 0x61 && codePoint < 0x7B) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +const digitToBasic = function(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +const adapt = function(delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +const decode = function(input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + const oldi = i; + for (let w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + const digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base) { + error('invalid-input'); + } + if (digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + + } + + return String.fromCodePoint(...output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +const encode = function(input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + const inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + const basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue === n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for (let k = base; /* no condition */; k += base) { + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +const toUnicode = function(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +const toASCII = function(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.3.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +export { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode }; +export default punycode; diff --git a/node_modules/punycode/punycode.js b/node_modules/punycode/punycode.js new file mode 100644 index 00000000..a1ef2519 --- /dev/null +++ b/node_modules/punycode/punycode.js @@ -0,0 +1,443 @@ +'use strict'; + +/** Highest positive signed 32-bit float value */ +const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +const base = 36; +const tMin = 1; +const tMax = 26; +const skew = 38; +const damp = 700; +const initialBias = 72; +const initialN = 128; // 0x80 +const delimiter = '-'; // '\x2D' + +/** Regular expressions */ +const regexPunycode = /^xn--/; +const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. +const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +const baseMinusTMin = base - tMin; +const floor = Math.floor; +const stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, callback) { + const result = []; + let length = array.length; + while (length--) { + result[length] = callback(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {String} A new string of characters returned by the callback + * function. + */ +function mapDomain(domain, callback) { + const parts = domain.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + domain = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + domain = domain.replace(regexSeparators, '\x2E'); + const labels = domain.split('.'); + const encoded = map(labels, callback).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +const ucs2encode = codePoints => String.fromCodePoint(...codePoints); + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +const basicToDigit = function(codePoint) { + if (codePoint >= 0x30 && codePoint < 0x3A) { + return 26 + (codePoint - 0x30); + } + if (codePoint >= 0x41 && codePoint < 0x5B) { + return codePoint - 0x41; + } + if (codePoint >= 0x61 && codePoint < 0x7B) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +const digitToBasic = function(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +const adapt = function(delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +const decode = function(input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + const oldi = i; + for (let w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + const digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base) { + error('invalid-input'); + } + if (digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + + } + + return String.fromCodePoint(...output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +const encode = function(input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + const inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + const basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue === n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for (let k = base; /* no condition */; k += base) { + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +const toUnicode = function(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +const toASCII = function(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.3.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +module.exports = punycode; diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md new file mode 100644 index 00000000..0412ad8a --- /dev/null +++ b/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,274 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [9.0.1](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1) (2023-09-12) + +### build + +- Fix CI to work with Node.js 20.x + +## [9.0.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05) + +### ⚠ BREAKING CHANGES + +- Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022. + +- Remove the minified UMD build from the package. + + Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays. + + For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished. + +- Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015. + + This also removes the fallback on msCrypto instead of the crypto API. + + Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack. + +### Features + +- optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#597](https://github.com/uuidjs/uuid/issues/597)) ([3a033f6](https://github.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc)) +- remove UMD build ([#645](https://github.com/uuidjs/uuid/issues/645)) ([e948a0f](https://github.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#620](https://github.com/uuidjs/uuid/issues/620) +- use native crypto.randomUUID when available ([#600](https://github.com/uuidjs/uuid/issues/600)) ([c9e076c](https://github.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4)) + +### Bug Fixes + +- add Jest/jsdom compatibility ([#642](https://github.com/uuidjs/uuid/issues/642)) ([16f9c46](https://github.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd)) +- change default export to named function ([#545](https://github.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://github.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a)) +- handle error when parameter is not set in v3 and v5 ([#622](https://github.com/uuidjs/uuid/issues/622)) ([fcd7388](https://github.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091)) +- run npm audit fix ([#644](https://github.com/uuidjs/uuid/issues/644)) ([04686f5](https://github.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353)) +- upgrading from uuid3 broken link ([#568](https://github.com/uuidjs/uuid/issues/568)) ([1c849da](https://github.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6)) + +### build + +- drop Node.js 8.x from babel transpile target ([#603](https://github.com/uuidjs/uuid/issues/603)) ([aa11485](https://github.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5)) +- drop support for legacy browsers (IE11, Safari 10) ([#604](https://github.com/uuidjs/uuid/issues/604)) ([0f433e5](https://github.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148)) + +- drop node 10.x to upgrade dev dependencies ([#653](https://github.com/uuidjs/uuid/issues/653)) ([28a5712](https://github.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#643](https://github.com/uuidjs/uuid/issues/643) + +### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) + +### Bug Fixes + +- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536) + +### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) + +### Bug Fixes + +- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375) + +## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27) + +### Features + +- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180) + +## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23) + +### Features + +- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) +- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437) +- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659)) + +### Bug Fixes + +- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8)) + +## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20) + +### Features + +- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d)) +- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2)) + +### Bug Fixes + +- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444) + +## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29) + +### ⚠ BREAKING CHANGES + +- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. + + ```diff + -import uuid from 'uuid'; + -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' + +import { v4 as uuidv4 } from 'uuid'; + +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' + ``` + +- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. + + Instead use the named exports that this module exports. + + For ECMAScript Modules (ESM): + + ```diff + -import uuidv4 from 'uuid/v4'; + +import { v4 as uuidv4 } from 'uuid'; + uuidv4(); + ``` + + For CommonJS: + + ```diff + -const uuidv4 = require('uuid/v4'); + +const { v4: uuidv4 } = require('uuid'); + uuidv4(); + ``` + +### Features + +- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342) +- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) + +### Bug Fixes + +- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) + +### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) + +### Bug Fixes + +- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408) + +### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) + +### Bug Fixes + +- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) +- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) +- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) + +### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) + +### Bug Fixes + +- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) +- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378) + +## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24) + +### ⚠ BREAKING CHANGES + +- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. +- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. +- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. +- Remove support for generating v3 and v5 UUIDs in Node.js<4.x +- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. + +### Features + +- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345) +- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) +- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) +- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) +- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173) +- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) +- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### Bug Fixes + +- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) +- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370) +- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23)) + +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + +### Features + +- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + +### Bug Fixes + +- no longer run ci tests on node v4 +- upgrade dependencies + +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + +### Bug Fixes + +- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) + +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + +### Bug Fixes + +- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) + +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) + +### Bug Fixes + +- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) + +### Features + +- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) + +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + +### Bug Fixes + +- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + +### Bug Fixes + +- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + +### Features + +- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) + +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) + +### Bug Fixes + +- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) +- Fix typo (#178) +- Simple typo fix (#165) + +### Features + +- v5 support in CLI (#197) +- V5 support (#188) + +# 3.0.1 (2016-11-28) + +- split uuid versions into separate files + +# 3.0.0 (2016-11-17) + +- remove .parse and .unparse + +# 2.0.0 + +- Removed uuid.BufferClass + +# 1.4.0 + +- Improved module context detection +- Removed public RNG functions + +# 1.3.2 + +- Improve tests and handling of v1() options (Issue #24) +- Expose RNG option to allow for perf testing with different generators + +# 1.3.0 + +- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +- Support for node.js crypto API +- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/uuid/CONTRIBUTING.md b/node_modules/uuid/CONTRIBUTING.md new file mode 100644 index 00000000..4a4503d0 --- /dev/null +++ b/node_modules/uuid/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! + +## Testing + +```shell +npm test +``` + +## Releasing + +Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): + +```shell +npm run release -- --dry-run # verify output manually +npm run release # follow the instructions from the output of this command +``` diff --git a/node_modules/uuid/LICENSE.md b/node_modules/uuid/LICENSE.md new file mode 100644 index 00000000..39341683 --- /dev/null +++ b/node_modules/uuid/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2010-2020 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md new file mode 100644 index 00000000..4f51e098 --- /dev/null +++ b/node_modules/uuid/README.md @@ -0,0 +1,466 @@ + + + +# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser) + +For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs + +- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs +- **Cross-platform** - Support for ... + - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) + - NodeJS 12+ ([LTS releases](https://github.com/nodejs/Release)) + - Chrome, Safari, Firefox, Edge browsers + - Webpack and rollup.js module bundlers + - [React Native / Expo](#react-native--expo) +- **Secure** - Cryptographically-strong random values +- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers +- **CLI** - Includes the [`uuid` command line](#command-line) utility + +> **Note** Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details. + +> **Note** Only interested in creating a version 4 UUID? You might be able to use [`crypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library. + +## Quickstart + +To create a random UUID... + +**1. Install** + +```shell +npm install uuid +``` + +**2. Create a UUID** (ES6 module syntax) + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' +``` + +... or using CommonJS syntax: + +```javascript +const { v4: uuidv4 } = require('uuid'); +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +For timestamp UUIDs, namespace UUIDs, and other options read on ... + +## API Summary + +| | | | +| --- | --- | --- | +| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | +| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | +| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | +| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | +| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | +| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | +| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | +| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | +| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | + +## API + +### uuid.NIL + +The nil UUID string (all zeros). + +Example: + +```javascript +import { NIL as NIL_UUID } from 'uuid'; + +NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' +``` + +### uuid.parse(str) + +Convert UUID string to array of bytes + +| | | +| --------- | ---------------------------------------- | +| `str` | A valid UUID `String` | +| _returns_ | `Uint8Array[16]` | +| _throws_ | `TypeError` if `str` is not a valid UUID | + +Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. + +Example: + +```javascript +import { parse as uuidParse } from 'uuid'; + +// Parse a UUID +const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); + +// Convert to hex strings to show byte order (for documentation purposes) +[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ + // [ + // '6e', 'c0', 'bd', '7f', + // '11', 'c0', '43', 'da', + // '97', '5e', '2a', '8a', + // 'd9', 'eb', 'ae', '0b' + // ] +``` + +### uuid.stringify(arr[, offset]) + +Convert array of bytes to UUID string + +| | | +| -------------- | ---------------------------------------------------------------------------- | +| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | +| [`offset` = 0] | `Number` Starting index in the Array | +| _returns_ | `String` | +| _throws_ | `TypeError` if a valid UUID string cannot be generated | + +Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. + +Example: + +```javascript +import { stringify as uuidStringify } from 'uuid'; + +const uuidBytes = [ + 0x6e, 0xc0, 0xbd, 0x7f, 0x11, 0xc0, 0x43, 0xda, 0x97, 0x5e, 0x2a, 0x8a, 0xd9, 0xeb, 0xae, 0x0b, +]; + +uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' +``` + +### uuid.v1([options[, buffer[, offset]]]) + +Create an RFC version 1 (timestamp) UUID + +| | | +| --- | --- | +| [`options`] | `Object` with one or more of the following properties: | +| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | +| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | +| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | +| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) | +| [`options.random`] | `Array` of 16 random bytes (0-255) | +| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | +| _throws_ | `Error` if more than 10M UUIDs/sec are requested | + +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. + +Note: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields. + +Example: + +```javascript +import { v1 as uuidv1 } from 'uuid'; + +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' +``` + +Example using `options`: + +```javascript +import { v1 as uuidv1 } from 'uuid'; + +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678, +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' +``` + +### uuid.v3(name, namespace[, buffer[, offset]]) + +Create an RFC version 3 (namespace w/ MD5) UUID + +API is identical to `v5()`, but uses "v3" instead. + +⚠️ Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." + +### uuid.v4([options[, buffer[, offset]]]) + +Create an RFC version 4 (random) UUID + +| | | +| --- | --- | +| [`options`] | `Object` with one or more of the following properties: | +| [`options.random`] | `Array` of 16 random bytes (0-255) | +| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | + +Example: + +```javascript +import { v4 as uuidv4 } from 'uuid'; + +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +Example using predefined `random` values: + +```javascript +import { v4 as uuidv4 } from 'uuid'; + +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36, + ], +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' +``` + +### uuid.v5(name, namespace[, buffer[, offset]]) + +Create an RFC version 5 (namespace w/ SHA-1) UUID + +| | | +| --- | --- | +| `name` | `String \| Array` | +| `namespace` | `String \| Array[16]` Namespace UUID | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | + +Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. + +Example with custom namespace: + +```javascript +import { v5 as uuidv5 } from 'uuid'; + +// Define a custom namespace. Readers, create your own using something like +// https://www.uuidgenerator.net/ +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; + +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' +``` + +Example with RFC `URL` namespace: + +```javascript +import { v5 as uuidv5 } from 'uuid'; + +uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' +``` + +### uuid.validate(str) + +Test a string to see if it is a valid UUID + +| | | +| --------- | --------------------------------------------------- | +| `str` | `String` to validate | +| _returns_ | `true` if string is a valid UUID, `false` otherwise | + +Example: + +```javascript +import { validate as uuidValidate } from 'uuid'; + +uuidValidate('not a UUID'); // ⇨ false +uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true +``` + +Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. + +```javascript +import { version as uuidVersion } from 'uuid'; +import { validate as uuidValidate } from 'uuid'; + +function uuidValidateV4(uuid) { + return uuidValidate(uuid) && uuidVersion(uuid) === 4; +} + +const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; +const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; + +uuidValidateV4(v4Uuid); // ⇨ true +uuidValidateV4(v1Uuid); // ⇨ false +``` + +### uuid.version(str) + +Detect RFC version of a UUID + +| | | +| --------- | ---------------------------------------- | +| `str` | A valid UUID `String` | +| _returns_ | `Number` The RFC version of the UUID | +| _throws_ | `TypeError` if `str` is not a valid UUID | + +Example: + +```javascript +import { version as uuidVersion } from 'uuid'; + +uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 +uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 +``` + +## Command Line + +UUIDs can be generated from the command line using `uuid`. + +```shell +$ npx uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 +``` + +The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: + +```shell +$ npx uuid --help + +Usage: + uuid + uuid v1 + uuid v3 + uuid v4 + uuid v5 + uuid --help + +Note: may be "URL" or "DNS" to use the corresponding UUIDs +defined by RFC4122 +``` + +## ECMAScript Modules + +This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments). + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +To run the examples you must first create a dist build of this library in the module root: + +```shell +npm run build +``` + +## CDN Builds + +### ECMAScript Modules + +To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/): + +```html + +``` + +### UMD + +As of `uuid@9` [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds are no longer shipped with this library. + +If you need a UMD build of this library, use a bundler like Webpack or Rollup. Alternatively, refer to the documentation of [`uuid@8.3.2`](https://github.com/uuidjs/uuid/blob/v8.3.2/README.md#umd) which was the last version that shipped UMD builds. + +## Known issues + +### Duplicate UUIDs (Googlebot) + +This module may generate duplicate UUIDs when run in clients with _deterministic_ random number generators, such as [Googlebot crawlers](https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers). This can cause problems for apps that expect client-generated UUIDs to always be unique. Developers should be prepared for this and have a strategy for dealing with possible collisions, such as: + +- Check for duplicate UUIDs, fail gracefully +- Disable write operations for Googlebot clients + +### "getRandomValues() not supported" + +This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: + +### React Native / Expo + +1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) +1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: + +```javascript +import 'react-native-get-random-values'; +import { v4 as uuidv4 } from 'uuid'; +``` + +Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`. + +### Web Workers / Service Workers (Edge <= 18) + +[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). + +### IE 11 (Internet Explorer) + +Support for IE11 and other legacy browsers has been dropped as of `uuid@9`. If you need to support legacy browsers, you can always transpile the uuid module source yourself (e.g. using [Babel](https://babeljs.io/)). + +## Upgrading From `uuid@7` + +### Only Named Exports Supported When Using with Node.js ESM + +`uuid@7` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports. + +Instead of doing: + +```javascript +import uuid from 'uuid'; +uuid.v4(); +``` + +you will now have to use the named exports: + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); +``` + +### Deep Requires No Longer Supported + +Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7`](#deep-requires-now-deprecated) are no longer supported. + +## Upgrading From `uuid@3` + +"_Wait... what happened to `uuid@4` thru `uuid@6`?!?_" + +In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped. + +### Deep Requires Now Deprecated + +`uuid@3` encouraged the use of deep requires to minimize the bundle size of browser builds: + +```javascript +const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED! +uuidv4(); +``` + +As of `uuid@7` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax: + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); +``` + +... or for CommonJS: + +```javascript +const { v4: uuidv4 } = require('uuid'); +uuidv4(); +``` + +### Default Export Removed + +`uuid@3` was exporting the Version 4 UUID method as a default export: + +```javascript +const uuid = require('uuid'); // <== REMOVED! +``` + +This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`. + +--- + +Markdown generated from [README_js.md](README_js.md) by
diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json new file mode 100644 index 00000000..6cc33618 --- /dev/null +++ b/node_modules/uuid/package.json @@ -0,0 +1,135 @@ +{ + "name": "uuid", + "version": "9.0.1", + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "bin": { + "uuid": "./dist/bin/uuid" + }, + "sideEffects": false, + "main": "./dist/index.js", + "exports": { + ".": { + "node": { + "module": "./dist/esm-node/index.js", + "require": "./dist/index.js", + "import": "./wrapper.mjs" + }, + "browser": { + "import": "./dist/esm-browser/index.js", + "require": "./dist/commonjs-browser/index.js" + }, + "default": "./dist/esm-browser/index.js" + }, + "./package.json": "./package.json" + }, + "module": "./dist/esm-node/index.js", + "browser": { + "./dist/md5.js": "./dist/md5-browser.js", + "./dist/native.js": "./dist/native-browser.js", + "./dist/rng.js": "./dist/rng-browser.js", + "./dist/sha1.js": "./dist/sha1-browser.js", + "./dist/esm-node/index.js": "./dist/esm-browser/index.js" + }, + "files": [ + "CHANGELOG.md", + "CONTRIBUTING.md", + "LICENSE.md", + "README.md", + "dist", + "wrapper.mjs" + ], + "devDependencies": { + "@babel/cli": "7.18.10", + "@babel/core": "7.18.10", + "@babel/eslint-parser": "7.18.9", + "@babel/preset-env": "7.18.10", + "@commitlint/cli": "17.0.3", + "@commitlint/config-conventional": "17.0.3", + "bundlewatch": "0.3.3", + "eslint": "8.21.0", + "eslint-config-prettier": "8.5.0", + "eslint-config-standard": "17.0.0", + "eslint-plugin-import": "2.26.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-prettier": "4.2.1", + "eslint-plugin-promise": "6.0.0", + "husky": "8.0.1", + "jest": "28.1.3", + "lint-staged": "13.0.3", + "npm-run-all": "4.1.5", + "optional-dev-dependency": "2.0.1", + "prettier": "2.7.1", + "random-seed": "0.3.0", + "runmd": "1.3.9", + "standard-version": "9.5.0" + }, + "optionalDevDependencies": { + "@wdio/browserstack-service": "7.16.10", + "@wdio/cli": "7.16.10", + "@wdio/jasmine-framework": "7.16.6", + "@wdio/local-runner": "7.16.10", + "@wdio/spec-reporter": "7.16.9", + "@wdio/static-server-service": "7.16.6" + }, + "scripts": { + "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build", + "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build", + "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test", + "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test", + "examples:node:jest:test": "cd examples/node-jest && npm install && npm test", + "prepare": "cd $( git rev-parse --show-toplevel ) && husky install", + "lint": "npm run eslint:check && npm run prettier:check", + "eslint:check": "eslint src/ test/ examples/ *.js", + "eslint:fix": "eslint --fix src/ test/ examples/ *.js", + "pretest": "[ -n $CI ] || npm run build", + "test": "BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/", + "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**", + "test:browser": "wdio run ./wdio.conf.js", + "pretest:node": "npm run build", + "test:node": "npm-run-all --parallel examples:node:**", + "test:pack": "./scripts/testpack.sh", + "pretest:benchmark": "npm run build", + "test:benchmark": "cd examples/benchmark && npm install && npm test", + "prettier:check": "prettier --check '**/*.{js,jsx,json,md}'", + "prettier:fix": "prettier --write '**/*.{js,jsx,json,md}'", + "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", + "md": "runmd --watch --output=README.md README_js.md", + "docs": "( node --version | grep -q 'v18' ) && ( npm run build && npx runmd --output=README.md README_js.md )", + "docs:diff": "npm run docs && git diff --quiet README.md", + "build": "./scripts/build.sh", + "prepack": "npm run build", + "release": "standard-version --no-verify" + }, + "repository": { + "type": "git", + "url": "https://github.com/uuidjs/uuid.git" + }, + "lint-staged": { + "*.{js,jsx,json,md}": [ + "prettier --write" + ], + "*.{js,jsx}": [ + "eslint --fix" + ] + }, + "standard-version": { + "scripts": { + "postchangelog": "prettier --write CHANGELOG.md" + } + } +} diff --git a/node_modules/uuid/wrapper.mjs b/node_modules/uuid/wrapper.mjs new file mode 100644 index 00000000..c31e9cef --- /dev/null +++ b/node_modules/uuid/wrapper.mjs @@ -0,0 +1,10 @@ +import uuid from './dist/index.js'; +export const v1 = uuid.v1; +export const v3 = uuid.v3; +export const v4 = uuid.v4; +export const v5 = uuid.v5; +export const NIL = uuid.NIL; +export const version = uuid.version; +export const validate = uuid.validate; +export const stringify = uuid.stringify; +export const parse = uuid.parse; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..5ce6b91d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,172 @@ +{ + "name": "json-schema-test-suite", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "json-schema-test-suite", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@hyperjump/browser": "^1.3.1", + "@hyperjump/json-pointer": "^1.1.1", + "@hyperjump/json-schema": "^1.17.2", + "@hyperjump/pact": "^1.4.0", + "@hyperjump/uri": "^1.3.2", + "json-stringify-deterministic": "^1.0.12" + }, + "devDependencies": { + "jsonc-parser": "^3.3.1" + } + }, + "node_modules/@hyperjump/browser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.1.tgz", + "integrity": "sha512-Le5XZUjnVqVjkgLYv6yyWgALat/0HpB1XaCPuCZ+GCFki9NvXloSZITIJ0H+wRW7mb9At1SxvohKBbNQbrr/cw==", + "license": "MIT", + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.5", + "just-curry-it": "^5.3.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-pointer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.1.tgz", + "integrity": "sha512-M0T3s7TC2JepoWPMZQn1W6eYhFh06OXwpMqL+8c5wMVpvnCKNsPgpu9u7WyCI03xVQti8JAeAy4RzUa6SYlJLA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-schema": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.2.tgz", + "integrity": "sha512-pCysQu2kPZFcqyJmiU5JauzPHQIQa9i9F7+S5ui8OiwcdsBZUOjdY1rfSnqgaM5sNeR3akNVXKB/WgxNEnJrWw==", + "license": "MIT", + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/json-schema-formats": "^1.0.0", + "@hyperjump/pact": "^1.2.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.4", + "json-stringify-deterministic": "^1.0.12", + "just-curry-it": "^5.3.0", + "uuid": "^9.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "peerDependencies": { + "@hyperjump/browser": "^1.1.0" + } + }, + "node_modules/@hyperjump/json-schema-formats": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-formats/-/json-schema-formats-1.0.1.tgz", + "integrity": "sha512-qvcIxysnMfcPxyPSFFzzo28o2BN1CNT5b0tQXNUP0kaFpvptQNDg8SCLvlnMg2sYxuiuqna8+azGBaBthiskAw==", + "license": "MIT", + "dependencies": { + "@hyperjump/uri": "^1.3.2", + "idn-hostname": "^15.1.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/hyperjump-io" + } + }, + "node_modules/@hyperjump/pact": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.4.0.tgz", + "integrity": "sha512-01Q7VY6BcAkp9W31Fv+ciiZycxZHGlR2N6ba9BifgyclHYHdbaZgITo0U6QMhYRlem4k8pf8J31/tApxvqAz8A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/uri": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.2.tgz", + "integrity": "sha512-OFo5oxuSEz1ktF/LDdBTptlnPyZ66jywLO4fJRuAhnr7NGnsiL2CPoj1JRVaDqVy0nXvWNsC8O8Muw9DR++eEg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/idn-hostname": { + "version": "15.1.8", + "resolved": "https://registry.npmjs.org/idn-hostname/-/idn-hostname-15.1.8.tgz", + "integrity": "sha512-MmLwddtSVyMtzYxx+xs2IFEbfyg/facubL/mEaAoJX/XIfjt1ly5QhPByihf4yrxZYbkQfRZVEnBgISv/e2ZWw==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + } + }, + "node_modules/json-stringify-deterministic": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", + "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/just-curry-it": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", + "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==", + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + } + } +} diff --git a/package.json b/package.json index 67058746..14a9dc12 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,8 @@ "@hyperjump/pact": "^1.4.0", "@hyperjump/uri": "^1.3.2", "json-stringify-deterministic": "^1.0.12" + }, + "devDependencies": { + "jsonc-parser": "^3.3.1" } } diff --git a/scripts/add-test-ids.js b/scripts/add-test-ids.js index e0fd996d..420fa5a8 100644 --- a/scripts/add-test-ids.js +++ b/scripts/add-test-ids.js @@ -1,9 +1,9 @@ import * as fs from "node:fs"; -import * as crypto from "node:crypto"; -import jsonStringify from "json-stringify-deterministic"; + import { parse, modify, applyEdits } from "jsonc-parser"; import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; +import generateTestId from "./utils/generateTestIds.js"; const DIALECT_MAP = { @@ -15,16 +15,7 @@ const DIALECT_MAP = { }; -function generateTestId(normalizedSchema, testData, testValid) { - return crypto - .createHash("md5") - .update( - jsonStringify(normalizedSchema) + - jsonStringify(testData) + - testValid - ) - .digest("hex"); -} + async function addIdsToFile(filePath, dialectUri) { console.log("Reading:", filePath); @@ -54,7 +45,7 @@ async function addIdsToFile(filePath, dialectUri) { ...modify(text, path, id, { formattingOptions: { insertSpaces: true, - tabSize: 2 + tabSize: 4 } }) ); diff --git a/scripts/check-test-ids.js b/scripts/check-test-ids.js index 3001536d..1d1d9baf 100644 --- a/scripts/check-test-ids.js +++ b/scripts/check-test-ids.js @@ -1,24 +1,13 @@ import * as fs from "node:fs"; import * as path from "node:path"; -import * as crypto from "node:crypto"; -import jsonStringify from "json-stringify-deterministic"; import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; +import generateTestId from "./utils/generateTestIds.js"; +import jsonFiles from "./utils/jsonfiles.js"; // Helpers -function* jsonFiles(dir) { - for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { - const full = path.join(dir, entry.name); - if (entry.isDirectory()) { - yield* jsonFiles(full); - } else if (entry.isFile() && entry.name.endsWith(".json")) { - yield full; - } - } -} - function dialectFromDir(dir) { const draft = path.basename(dir); @@ -38,16 +27,6 @@ function dialectFromDir(dir) { } } -function generateTestId(normalizedSchema, testData, testValid) { - return crypto - .createHash("md5") - .update( - jsonStringify(normalizedSchema) + - jsonStringify(testData) + - testValid - ) - .digest("hex"); -} @@ -62,9 +41,7 @@ async function checkVersion(dir) { // Load remotes ONCE for this dialect const remotesPath = "./remotes"; - if (fs.existsSync(remotesPath)) { - loadRemotes(dialectUri, remotesPath); - } + loadRemotes(dialectUri, remotesPath); for (const file of jsonFiles(dir)) { const testCases = JSON.parse(fs.readFileSync(file, "utf8")); diff --git a/scripts/load-remotes.js b/scripts/load-remotes.js index eb775cbf..eec8ba77 100644 --- a/scripts/load-remotes.js +++ b/scripts/load-remotes.js @@ -1,4 +1,3 @@ -// scripts/load-remotes.js import * as fs from "node:fs"; import { toAbsoluteIri } from "@hyperjump/uri"; import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; @@ -17,29 +16,20 @@ export const loadRemotes = (dialectId, filePath, url = "") => { const remotePath = `${filePath}/${entry.name}`; const remoteUrl = `http://localhost:1234${url}/${entry.name}`; - // Skip if already registered + // If we've already registered this URL once, skip it if (loadedRemotes.has(remoteUrl)) { return; } const remote = JSON.parse(fs.readFileSync(remotePath, "utf8")); - // FIXEDhere - if (typeof remote.$id === "string" && remote.$id.startsWith("file:")) { - remote.$id = remote.$id.replace(/^file:/, "x-file:"); - } - // Only register if $schema matches dialect OR there's no $schema if (!remote.$schema || toAbsoluteIri(remote.$schema) === dialectId) { registerSchema(remote, remoteUrl, dialectId); - loadedRemotes.add(remoteUrl); + loadedRemotes.add(remoteUrl); // Remember we've registered it } } else if (entry.isDirectory()) { - loadRemotes( - dialectId, - `${filePath}/${entry.name}`, - `${url}/${entry.name}` - ); + loadRemotes(dialectId, `${filePath}/${entry.name}`, `${url}/${entry.name}`); } }); -}; +}; \ No newline at end of file diff --git a/scripts/normalize.js b/scripts/normalize.js index bad333fc..94ffeb91 100644 --- a/scripts/normalize.js +++ b/scripts/normalize.js @@ -10,14 +10,11 @@ import "@hyperjump/json-schema/draft-06"; import "@hyperjump/json-schema/draft-04"; -// =========================================== -// CHANGE #2 (ADDED): sanitize file:// $id -// =========================================== const sanitizeTopLevelId = (schema) => { if (typeof schema !== "object" || schema === null) return schema; const copy = { ...schema }; if (typeof copy.$id === "string" && copy.$id.startsWith("file:")) { - delete copy.$id; + copy.$id = copy.$id.replace(/^file:/, "x-file:"); } return copy; }; @@ -27,14 +24,11 @@ const sanitizeTopLevelId = (schema) => { export const normalize = async (rawSchema, dialectUri) => { const schemaUri = "https://test-suite.json-schema.org/main"; - // =========================================== - // CHANGE #2 (APPLIED HERE) - // =========================================== + const safeSchema = sanitizeTopLevelId(rawSchema); - // =========================================== - + try { - // BEFORE: registerSchema(rawSchema, schemaUri, dialectUri) + registerSchema(safeSchema, schemaUri, dialectUri); const schema = await getSchema(schemaUri); @@ -132,11 +126,8 @@ const keywordHandlers = { "https://json-schema.org/keyword/description": simpleValue, "https://json-schema.org/keyword/dynamicRef": simpleValue, // base dynamicRef - // =========================================== - // CHANGE #1 (ADDED): draft-2020-12/dynamicRef - // =========================================== "https://json-schema.org/keyword/draft-2020-12/dynamicRef": simpleValue, - // =========================================== + "https://json-schema.org/keyword/else": simpleApplicator, "https://json-schema.org/keyword/enum": simpleValue, @@ -209,4 +200,4 @@ const keywordHandlers = { }, "https://json-schema.org/keyword/draft-04/maximum": simpleValue, "https://json-schema.org/keyword/draft-04/minimum": simpleValue -}; +}; \ No newline at end of file diff --git a/scripts/utils/generateTestIds.js b/scripts/utils/generateTestIds.js new file mode 100644 index 00000000..45a3dbb7 --- /dev/null +++ b/scripts/utils/generateTestIds.js @@ -0,0 +1,13 @@ +import * as crypto from "node:crypto"; +import jsonStringify from "json-stringify-deterministic"; + +export default function generateTestId(normalizedSchema, testData, testValid) { + return crypto + .createHash("md5") + .update( + jsonStringify(normalizedSchema) + + jsonStringify(testData) + + testValid + ) + .digest("hex"); +} \ No newline at end of file diff --git a/scripts/utils/jsonfiles.js b/scripts/utils/jsonfiles.js new file mode 100644 index 00000000..b4c41a08 --- /dev/null +++ b/scripts/utils/jsonfiles.js @@ -0,0 +1,11 @@ + +export default function* jsonFiles(dir) { + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + const full = path.join(dir, entry.name); + if (entry.isDirectory()) { + yield* jsonFiles(full); + } else if (entry.isFile() && entry.name.endsWith(".json")) { + yield full; + } + } +} diff --git a/test-schema.json b/test-schema.json index fee5a644..5ff6d9ae 100644 --- a/test-schema.json +++ b/test-schema.json @@ -1,128 +1,128 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/tests/test-schema", - "description": "A schema for files contained within this suite", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json-schema.org/tests/test-schema", + "description": "A schema for files contained within this suite", - "type": "array", - "minItems": 1, - "items": { - "description": "An individual test case, containing multiple tests of a single schema's behavior", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual test case, containing multiple tests of a single schema's behavior", - "type": "object", - "required": ["description", "schema", "tests"], - "properties": { - "description": { - "description": "The test case description", - "type": "string" - }, - "comment": { - "description": "Any additional comments about the test case", - "type": "string" - }, - "schema": { - "description": "A valid JSON Schema (one written for the corresponding version directory that the file sits within)." - }, - "tests": { - "description": "A set of related tests all using the same schema", - "type": "array", - "items": { "$ref": "#/$defs/test" }, - "minItems": 1 - }, - "specification": { - "description": "A reference to a specification document which defines the behavior tested by this test case. Typically this should be a JSON Schema specification document, though in cases where the JSON Schema specification points to another RFC it should contain *both* the portion of the JSON Schema specification which indicates what RFC (and section) to follow as *well* as information on where in that specification the behavior is specified.", - - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "properties": { - "core": { - "description": "A section in official JSON Schema core drafts", - "url": "https://json-schema.org/specification-links", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" - }, - "validation": { - "description": "A section in official JSON Schema validation drafts", - "url": "https://json-schema.org/specification-links", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" + "type": "object", + "required": ["description", "schema", "tests"], + "properties": { + "description": { + "description": "The test case description", + "type": "string" }, - "ecma262": { - "description": "A section in official ECMA 262 specification for defining regular expressions", - "url": "https://262.ecma-international.org/", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" + "comment": { + "description": "Any additional comments about the test case", + "type": "string" }, - "perl5": { - "description": "A section name in Perl documentation for defining regular expressions", - "url": "https://perldoc.perl.org/perlre", - "type": "string" + "schema": { + "description": "A valid JSON Schema (one written for the corresponding version directory that the file sits within)." }, - "quote": { - "description": "Quote describing the test case", - "type": "string" - } - }, - "patternProperties": { - "^rfc\\d+$": { - "description": "A section in official RFC for the given rfc number", - "url": "https://www.rfc-editor.org/", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" + "tests": { + "description": "A set of related tests all using the same schema", + "type": "array", + "items": { "$ref": "#/$defs/test" }, + "minItems": 1 }, - "^iso\\d+$": { - "description": "A section in official ISO for the given iso number", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" + "specification": { + "description": "A reference to a specification document which defines the behavior tested by this test case. Typically this should be a JSON Schema specification document, though in cases where the JSON Schema specification points to another RFC it should contain *both* the portion of the JSON Schema specification which indicates what RFC (and section) to follow as *well* as information on where in that specification the behavior is specified.", + + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "properties": { + "core": { + "description": "A section in official JSON Schema core drafts", + "url": "https://json-schema.org/specification-links", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "validation": { + "description": "A section in official JSON Schema validation drafts", + "url": "https://json-schema.org/specification-links", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "ecma262": { + "description": "A section in official ECMA 262 specification for defining regular expressions", + "url": "https://262.ecma-international.org/", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "perl5": { + "description": "A section name in Perl documentation for defining regular expressions", + "url": "https://perldoc.perl.org/perlre", + "type": "string" + }, + "quote": { + "description": "Quote describing the test case", + "type": "string" + } + }, + "patternProperties": { + "^rfc\\d+$": { + "description": "A section in official RFC for the given rfc number", + "url": "https://www.rfc-editor.org/", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "^iso\\d+$": { + "description": "A section in official ISO for the given iso number", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + } + }, + "additionalProperties": { "type": "string" }, + "minProperties": 1, + "propertyNames": { + "oneOf": [ + { + "pattern": "^((iso)|(rfc))[0-9]+$" + }, + { + "enum": ["core", "validation", "ecma262", "perl5", "quote"] + } + ] + } + } } - }, - "additionalProperties": { "type": "string" }, - "minProperties": 1, - "propertyNames": { - "oneOf": [ - { - "pattern": "^((iso)|(rfc))[0-9]+$" - }, - { - "enum": ["core", "validation", "ecma262", "perl5", "quote"] - } - ] - } - } - } + }, + "additionalProperties": false }, - "additionalProperties": false - }, - "$defs": { - "test": { - "description": "A single test", + "$defs": { + "test": { + "description": "A single test", - "type": "object", - "required": ["description", "data", "valid"], - "properties": { - "description": { - "description": "The test description, briefly explaining which behavior it exercises", - "type": "string" - }, - "comment": { - "description": "Any additional comments about the test", - "type": "string" - }, - "data": { - "description": "The instance which should be validated against the schema in \"schema\"." - }, - "valid": { - "description": "Whether the validation process of this instance should consider the instance valid or not", - "type": "boolean" - }, - "id": { - "description": "Stable identifier for this test", - "type": "string" + "type": "object", + "required": ["description", "data", "valid"], + "properties": { + "description": { + "description": "The test description, briefly explaining which behavior it exercises", + "type": "string" + }, + "comment": { + "description": "Any additional comments about the test", + "type": "string" + }, + "data": { + "description": "The instance which should be validated against the schema in \"schema\"." + }, + "valid": { + "description": "Whether the validation process of this instance should consider the instance valid or not", + "type": "boolean" + }, + "id": { + "description": "Stable identifier for this test", + "type": "string" + } + }, + "additionalProperties": false } - }, - "additionalProperties": false } - } -} +} \ No newline at end of file diff --git a/tests/draft2020-12/enum.json b/tests/draft2020-12/enum.json index 9b87484b..15d26c2e 100644 --- a/tests/draft2020-12/enum.json +++ b/tests/draft2020-12/enum.json @@ -1,501 +1,403 @@ [ - { - "description": "simple enum validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 1, - 2, - 3 - ] - }, - "tests": [ - { - "description": "one of the enum is valid", - "data": 1, - "valid": true, - "id": "bc16cb75d14903a732326a24d1416757" - }, - { - "description": "something else is invalid", - "data": 4, - "valid": false, - "id": "2ea4a168ef00d32d444b3d49dc5a617d" - } - ] - }, - { - "description": "heterogeneous enum validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 6, - "foo", - [], - true, - { - "foo": 12 - } - ] - }, - "tests": [ - { - "description": "one of the enum is valid", - "data": [], - "valid": true, - "id": "e31a02b023906271a7f40576a03df0de" - }, - { - "description": "something else is invalid", - "data": null, - "valid": false, - "id": "b47e0170004d316b00a5151b0d2b566c" - }, - { - "description": "objects are deep compared", - "data": { - "foo": false - }, - "valid": false, - "id": "7285822674e57f31de9c7280fa9d8900" - }, - { - "description": "valid object matches", - "data": { - "foo": 12 - }, - "valid": true, - "id": "27ffbacf5774ff2354458a6954ed1591" - }, - { - "description": "extra properties in object is invalid", - "data": { - "foo": 12, - "boo": 42 + { + "description": "simple enum validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [1, 2, 3] }, - "valid": false, - "id": "e220c92cdef194c74c49f9b7eb86b211" - } - ] - }, - { - "description": "heterogeneous enum-with-null validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 6, - null - ] + "tests": [ + { + "description": "one of the enum is valid", + "data": 1, + "valid": true, + "id": "bc16cb75d14903a732326a24d1416757" + }, + { + "description": "something else is invalid", + "data": 4, + "valid": false, + "id": "2ea4a168ef00d32d444b3d49dc5a617d" + } + ] }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true, - "id": "326f454f3db2a5fb76d797b43c812285" - }, - { - "description": "number is valid", - "data": 6, - "valid": true, - "id": "9884c0daef3095b4ff88c309bc87a620" - }, - { - "description": "something else is invalid", - "data": "test", - "valid": false, - "id": "4032c1754a28b94e914f8dfea1e12a26" - } - ] - }, - { - "description": "enums in properties", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "foo": { - "enum": [ - "foo" - ] + { + "description": "heterogeneous enum validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [6, "foo", [], true, {"foo": 12}] }, - "bar": { - "enum": [ - "bar" - ] - } - }, - "required": [ - "bar" - ] + "tests": [ + { + "description": "one of the enum is valid", + "data": [], + "valid": true, + "id": "e31a02b023906271a7f40576a03df0de" + }, + { + "description": "something else is invalid", + "data": null, + "valid": false, + "id": "b47e0170004d316b00a5151b0d2b566c" + }, + { + "description": "objects are deep compared", + "data": {"foo": false}, + "valid": false, + "id": "7285822674e57f31de9c7280fa9d8900" + }, + { + "description": "valid object matches", + "data": {"foo": 12}, + "valid": true, + "id": "27ffbacf5774ff2354458a6954ed1591" + }, + { + "description": "extra properties in object is invalid", + "data": {"foo": 12, "boo": 42}, + "valid": false, + "id": "e220c92cdef194c74c49f9b7eb86b211" + } + ] }, - "tests": [ - { - "description": "both properties are valid", - "data": { - "foo": "foo", - "bar": "bar" - }, - "valid": true, - "id": "dba127f9663272184ec3ea3072676b4d" - }, - { - "description": "wrong foo value", - "data": { - "foo": "foot", - "bar": "bar" + { + "description": "heterogeneous enum-with-null validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [6, null] }, - "valid": false, - "id": "0f0cca9923128d29922561fe7d92a436" - }, - { - "description": "wrong bar value", - "data": { - "foo": "foo", - "bar": "bart" - }, - "valid": false, - "id": "d32cef9094b8a87100a57cee099310d4" - }, - { - "description": "missing optional property is valid", - "data": { - "bar": "bar" - }, - "valid": true, - "id": "23a7c86ef0b1e3cac9ebb6175de888d0" - }, - { - "description": "missing required property is invalid", - "data": { - "foo": "foo" + "tests": [ + { + "description": "null is valid", + "data": null, + "valid": true, + "id": "326f454f3db2a5fb76d797b43c812285" + }, + { + "description": "number is valid", + "data": 6, + "valid": true, + "id": "9884c0daef3095b4ff88c309bc87a620" + }, + { + "description": "something else is invalid", + "data": "test", + "valid": false, + "id": "4032c1754a28b94e914f8dfea1e12a26" + } + ] + }, + { + "description": "enums in properties", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type":"object", + "properties": { + "foo": {"enum":["foo"]}, + "bar": {"enum":["bar"]} + }, + "required": ["bar"] }, - "valid": false, - "id": "61ac5943d52ba688c77e26a1a7b5d174" - }, - { - "description": "missing all properties is invalid", - "data": {}, - "valid": false, - "id": "8b7be28a144634955b915ad780f4f2a5" - } - ] - }, - { - "description": "enum with escaped characters", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - "foo\nbar", - "foo\rbar" - ] + "tests": [ + { + "description": "both properties are valid", + "data": {"foo":"foo", "bar":"bar"}, + "valid": true, + "id": "dba127f9663272184ec3ea3072676b4d" + }, + { + "description": "wrong foo value", + "data": {"foo":"foot", "bar":"bar"}, + "valid": false, + "id": "0f0cca9923128d29922561fe7d92a436" + }, + { + "description": "wrong bar value", + "data": {"foo":"foo", "bar":"bart"}, + "valid": false, + "id": "d32cef9094b8a87100a57cee099310d4" + }, + { + "description": "missing optional property is valid", + "data": {"bar":"bar"}, + "valid": true, + "id": "23a7c86ef0b1e3cac9ebb6175de888d0" + }, + { + "description": "missing required property is invalid", + "data": {"foo":"foo"}, + "valid": false, + "id": "61ac5943d52ba688c77e26a1a7b5d174" + }, + { + "description": "missing all properties is invalid", + "data": {}, + "valid": false, + "id": "8b7be28a144634955b915ad780f4f2a5" + } + ] }, - "tests": [ - { - "description": "member 1 is valid", - "data": "foo\nbar", - "valid": true, - "id": "056ae2b9aad469dd32a63b1c97716c6e" - }, - { - "description": "member 2 is valid", - "data": "foo\rbar", - "valid": true, - "id": "ade764a27bb0fed294cefb1b6b275cd5" - }, - { - "description": "another string is invalid", - "data": "abc", - "valid": false, - "id": "1faca62e488e50dc47de0b3a26751477" - } - ] - }, - { - "description": "enum with false does not match 0", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - false - ] + { + "description": "enum with escaped characters", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": ["foo\nbar", "foo\rbar"] + }, + "tests": [ + { + "description": "member 1 is valid", + "data": "foo\nbar", + "valid": true, + "id": "056ae2b9aad469dd32a63b1c97716c6e" + }, + { + "description": "member 2 is valid", + "data": "foo\rbar", + "valid": true, + "id": "ade764a27bb0fed294cefb1b6b275cd5" + }, + { + "description": "another string is invalid", + "data": "abc", + "valid": false, + "id": "1faca62e488e50dc47de0b3a26751477" + } + ] }, - "tests": [ - { - "description": "false is valid", - "data": false, - "valid": true, - "id": "4e5b4da53732e4fdeaa5ed74127363bc" - }, - { - "description": "integer zero is invalid", - "data": 0, - "valid": false, - "id": "24f12f5bf7ae6be32a9634be17835176" - }, - { - "description": "float zero is invalid", - "data": 0, - "valid": false, - "id": "24f12f5bf7ae6be32a9634be17835176" - } - ] - }, - { - "description": "enum with [false] does not match [0]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - [ - false + { + "description": "enum with false does not match 0", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [false] + }, + "tests": [ + { + "description": "false is valid", + "data": false, + "valid": true, + "id": "4e5b4da53732e4fdeaa5ed74127363bc" + }, + { + "description": "integer zero is invalid", + "data": 0, + "valid": false, + "id": "24f12f5bf7ae6be32a9634be17835176" + }, + { + "description": "float zero is invalid", + "data": 0.0, + "valid": false, + "id": "24f12f5bf7ae6be32a9634be17835176" + } ] - ] }, - "tests": [ - { - "description": "[false] is valid", - "data": [ - false - ], - "valid": true, - "id": "9fe1fb5471d006782fe7ead4aa9909fa" - }, - { - "description": "[0] is invalid", - "data": [ - 0 - ], - "valid": false, - "id": "8fc4591c8c9ddf9bd41a234d5fa24521" - }, - { - "description": "[0.0] is invalid", - "data": [ - 0 - ], - "valid": false, - "id": "8fc4591c8c9ddf9bd41a234d5fa24521" - } - ] - }, - { - "description": "enum with true does not match 1", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - true - ] + { + "description": "enum with [false] does not match [0]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[false]] + }, + "tests": [ + { + "description": "[false] is valid", + "data": [false], + "valid": true, + "id": "9fe1fb5471d006782fe7ead4aa9909fa" + }, + { + "description": "[0] is invalid", + "data": [0], + "valid": false, + "id": "8fc4591c8c9ddf9bd41a234d5fa24521" + }, + { + "description": "[0.0] is invalid", + "data": [0.0], + "valid": false, + "id": "8fc4591c8c9ddf9bd41a234d5fa24521" + } + ] }, - "tests": [ - { - "description": "true is valid", - "data": true, - "valid": true, - "id": "71738e4d71680e268bbee31fc43a4932" - }, - { - "description": "integer one is invalid", - "data": 1, - "valid": false, - "id": "e8901b103bcc1340391efd3e02420500" - }, - { - "description": "float one is invalid", - "data": 1, - "valid": false, - "id": "e8901b103bcc1340391efd3e02420500" - } - ] - }, - { - "description": "enum with [true] does not match [1]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - [ - true + { + "description": "enum with true does not match 1", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [true] + }, + "tests": [ + { + "description": "true is valid", + "data": true, + "valid": true, + "id": "71738e4d71680e268bbee31fc43a4932" + }, + { + "description": "integer one is invalid", + "data": 1, + "valid": false, + "id": "e8901b103bcc1340391efd3e02420500" + }, + { + "description": "float one is invalid", + "data": 1.0, + "valid": false, + "id": "e8901b103bcc1340391efd3e02420500" + } ] - ] }, - "tests": [ - { - "description": "[true] is valid", - "data": [ - true - ], - "valid": true, - "id": "44049e91dee93b7dafd9cdbc0156a604" - }, - { - "description": "[1] is invalid", - "data": [ - 1 - ], - "valid": false, - "id": "f8b1b069fd03b04f07f5b70786cb916c" - }, - { - "description": "[1.0] is invalid", - "data": [ - 1 - ], - "valid": false, - "id": "f8b1b069fd03b04f07f5b70786cb916c" - } - ] - }, - { - "description": "enum with 0 does not match false", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 0 - ] + { + "description": "enum with [true] does not match [1]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[true]] + }, + "tests": [ + { + "description": "[true] is valid", + "data": [true], + "valid": true, + "id": "44049e91dee93b7dafd9cdbc0156a604" + }, + { + "description": "[1] is invalid", + "data": [1], + "valid": false, + "id": "f8b1b069fd03b04f07f5b70786cb916c" + }, + { + "description": "[1.0] is invalid", + "data": [1.0], + "valid": false, + "id": "f8b1b069fd03b04f07f5b70786cb916c" + } + ] }, - "tests": [ - { - "description": "false is invalid", - "data": false, - "valid": false, - "id": "5cedc4948cc5d6744fa620039487ac15" - }, - { - "description": "integer zero is valid", - "data": 0, - "valid": true, - "id": "133e04205807df77ac09e730c237aba4" - }, - { - "description": "float zero is valid", - "data": 0, - "valid": true, - "id": "133e04205807df77ac09e730c237aba4" - } - ] - }, - { - "description": "enum with [0] does not match [false]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - [ - 0 + { + "description": "enum with 0 does not match false", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [0] + }, + "tests": [ + { + "description": "false is invalid", + "data": false, + "valid": false, + "id": "5cedc4948cc5d6744fa620039487ac15" + }, + { + "description": "integer zero is valid", + "data": 0, + "valid": true, + "id": "133e04205807df77ac09e730c237aba4" + }, + { + "description": "float zero is valid", + "data": 0.0, + "valid": true, + "id": "133e04205807df77ac09e730c237aba4" + } ] - ] }, - "tests": [ - { - "description": "[false] is invalid", - "data": [ - false - ], - "valid": false, - "id": "e6da8d988a7c265913e24eaed91af3de" - }, - { - "description": "[0] is valid", - "data": [ - 0 - ], - "valid": true, - "id": "10ba58a9539f8558892d28d2f5e3493d" - }, - { - "description": "[0.0] is valid", - "data": [ - 0 - ], - "valid": true, - "id": "10ba58a9539f8558892d28d2f5e3493d" - } - ] - }, - { - "description": "enum with 1 does not match true", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 1 - ] + { + "description": "enum with [0] does not match [false]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[0]] + }, + "tests": [ + { + "description": "[false] is invalid", + "data": [false], + "valid": false, + "id": "e6da8d988a7c265913e24eaed91af3de" + }, + { + "description": "[0] is valid", + "data": [0], + "valid": true, + "id": "10ba58a9539f8558892d28d2f5e3493d" + }, + { + "description": "[0.0] is valid", + "data": [0.0], + "valid": true, + "id": "10ba58a9539f8558892d28d2f5e3493d" + } + ] }, - "tests": [ - { - "description": "true is invalid", - "data": true, - "valid": false, - "id": "a8356b24823e955bc3895c25b9e442eb" - }, - { - "description": "integer one is valid", - "data": 1, - "valid": true, - "id": "603d6607a05072c21bcbff4578494e22" - }, - { - "description": "float one is valid", - "data": 1, - "valid": true, - "id": "603d6607a05072c21bcbff4578494e22" - } - ] - }, - { - "description": "enum with [1] does not match [true]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - [ - 1 + { + "description": "enum with 1 does not match true", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [1] + }, + "tests": [ + { + "description": "true is invalid", + "data": true, + "valid": false, + "id": "a8356b24823e955bc3895c25b9e442eb" + }, + { + "description": "integer one is valid", + "data": 1, + "valid": true, + "id": "603d6607a05072c21bcbff4578494e22" + }, + { + "description": "float one is valid", + "data": 1.0, + "valid": true, + "id": "603d6607a05072c21bcbff4578494e22" + } ] - ] }, - "tests": [ - { - "description": "[true] is invalid", - "data": [ - true - ], - "valid": false, - "id": "732eec1f5b7fdf6d24c40d77072628e3" - }, - { - "description": "[1] is valid", - "data": [ - 1 - ], - "valid": true, - "id": "8064c0569b7c7a17631d0dc802090303" - }, - { - "description": "[1.0] is valid", - "data": [ - 1 - ], - "valid": true, - "id": "8064c0569b7c7a17631d0dc802090303" - } - ] - }, - { - "description": "nul characters in strings", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - "hello\u0000there" - ] + { + "description": "enum with [1] does not match [true]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[1]] + }, + "tests": [ + { + "description": "[true] is invalid", + "data": [true], + "valid": false, + "id": "732eec1f5b7fdf6d24c40d77072628e3" + }, + { + "description": "[1] is valid", + "data": [1], + "valid": true, + "id": "8064c0569b7c7a17631d0dc802090303" + }, + { + "description": "[1.0] is valid", + "data": [1.0], + "valid": true, + "id": "8064c0569b7c7a17631d0dc802090303" + } + ] }, - "tests": [ - { - "description": "match string with nul", - "data": "hello\u0000there", - "valid": true, - "id": "d94ca2719908ab9c789d7c71e4cc93e4" - }, - { - "description": "do not match string lacking nul", - "data": "hellothere", - "valid": false, - "id": "a2c7a2aa3202a473dc03b5a8fcc070e9" - } - ] - } + { + "description": "nul characters in strings", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ "hello\u0000there" ] + }, + "tests": [ + { + "description": "match string with nul", + "data": "hello\u0000there", + "valid": true, + "id": "d94ca2719908ab9c789d7c71e4cc93e4" + }, + { + "description": "do not match string lacking nul", + "data": "hellothere", + "valid": false, + "id": "a2c7a2aa3202a473dc03b5a8fcc070e9" + } + ] + } ] From 7b86302dab526e058a97d4384486caed05916992 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Sun, 11 Jan 2026 14:23:19 +0530 Subject: [PATCH 06/25] Remove accidentally committed node_modules --- .gitignore | 1 + node_modules/.bin/uuid | 16 - node_modules/.bin/uuid.cmd | 17 - node_modules/.bin/uuid.ps1 | 28 - node_modules/.package-lock.json | 156 -- .../@hyperjump/browser/.gitattributes | 1 - node_modules/@hyperjump/browser/LICENCE | 21 - node_modules/@hyperjump/browser/README.md | 249 --- node_modules/@hyperjump/browser/package.json | 57 - node_modules/@hyperjump/json-pointer/LICENSE | 21 - .../@hyperjump/json-pointer/README.md | 102 - .../@hyperjump/json-pointer/package.json | 32 - .../@hyperjump/json-schema-formats/LICENSE | 21 - .../@hyperjump/json-schema-formats/README.md | 42 - .../json-schema-formats/package.json | 60 - .../json-schema-formats/src/date-math.js | 120 -- .../draft-bhutton-relative-json-pointer-00.js | 18 - .../json-schema-formats/src/ecma262.js | 13 - .../json-schema-formats/src/index.d.ts | 170 -- .../json-schema-formats/src/index.js | 33 - .../json-schema-formats/src/rfc1123.js | 13 - .../json-schema-formats/src/rfc2673.js | 12 - .../json-schema-formats/src/rfc3339.js | 78 - .../json-schema-formats/src/rfc3986.js | 17 - .../json-schema-formats/src/rfc3987.js | 17 - .../json-schema-formats/src/rfc4122.js | 20 - .../json-schema-formats/src/rfc4291.js | 18 - .../json-schema-formats/src/rfc5321.js | 46 - .../json-schema-formats/src/rfc6531.js | 55 - .../json-schema-formats/src/rfc6570.js | 38 - .../json-schema-formats/src/rfc6901.js | 14 - .../json-schema-formats/src/uts46.js | 20 - node_modules/@hyperjump/json-schema/LICENSE | 21 - node_modules/@hyperjump/json-schema/README.md | 966 ---------- .../annotations/annotated-instance.d.ts | 4 - .../annotations/annotated-instance.js | 20 - .../json-schema/annotations/index.d.ts | 21 - .../json-schema/annotations/index.js | 45 - .../json-schema/annotations/test-utils.d.ts | 1 - .../json-schema/annotations/test-utils.js | 38 - .../annotations/validation-error.js | 7 - .../@hyperjump/json-schema/bundle/index.d.ts | 14 - .../@hyperjump/json-schema/bundle/index.js | 83 - .../json-schema/draft-04/additionalItems.js | 38 - .../json-schema/draft-04/dependencies.js | 36 - .../json-schema/draft-04/exclusiveMaximum.js | 5 - .../json-schema/draft-04/exclusiveMinimum.js | 5 - .../@hyperjump/json-schema/draft-04/format.js | 31 - .../@hyperjump/json-schema/draft-04/id.js | 1 - .../json-schema/draft-04/index.d.ts | 43 - .../@hyperjump/json-schema/draft-04/index.js | 71 - .../@hyperjump/json-schema/draft-04/items.js | 57 - .../json-schema/draft-04/maximum.js | 25 - .../json-schema/draft-04/minimum.js | 25 - .../@hyperjump/json-schema/draft-04/ref.js | 1 - .../@hyperjump/json-schema/draft-04/schema.js | 149 -- .../json-schema/draft-06/contains.js | 15 - .../@hyperjump/json-schema/draft-06/format.js | 34 - .../json-schema/draft-06/index.d.ts | 49 - .../@hyperjump/json-schema/draft-06/index.js | 70 - .../@hyperjump/json-schema/draft-06/schema.js | 154 -- .../@hyperjump/json-schema/draft-07/format.js | 42 - .../json-schema/draft-07/index.d.ts | 55 - .../@hyperjump/json-schema/draft-07/index.js | 78 - .../@hyperjump/json-schema/draft-07/schema.js | 172 -- .../draft-2019-09/format-assertion.js | 44 - .../json-schema/draft-2019-09/format.js | 44 - .../json-schema/draft-2019-09/index.d.ts | 66 - .../json-schema/draft-2019-09/index.js | 118 -- .../draft-2019-09/meta/applicator.js | 55 - .../json-schema/draft-2019-09/meta/content.js | 17 - .../json-schema/draft-2019-09/meta/core.js | 57 - .../json-schema/draft-2019-09/meta/format.js | 14 - .../draft-2019-09/meta/meta-data.js | 37 - .../draft-2019-09/meta/validation.js | 98 - .../draft-2019-09/recursiveAnchor.js | 1 - .../json-schema/draft-2019-09/schema.js | 42 - .../draft-2020-12/dynamicAnchor.js | 1 - .../json-schema/draft-2020-12/dynamicRef.js | 38 - .../draft-2020-12/format-assertion.js | 43 - .../json-schema/draft-2020-12/format.js | 44 - .../json-schema/draft-2020-12/index.d.ts | 67 - .../json-schema/draft-2020-12/index.js | 126 -- .../draft-2020-12/meta/applicator.js | 46 - .../json-schema/draft-2020-12/meta/content.js | 14 - .../json-schema/draft-2020-12/meta/core.js | 54 - .../draft-2020-12/meta/format-annotation.js | 11 - .../draft-2020-12/meta/format-assertion.js | 11 - .../draft-2020-12/meta/meta-data.js | 34 - .../draft-2020-12/meta/unevaluated.js | 12 - .../draft-2020-12/meta/validation.js | 95 - .../json-schema/draft-2020-12/schema.js | 44 - .../json-schema/formats/handlers/date-time.js | 7 - .../json-schema/formats/handlers/date.js | 7 - .../formats/handlers/draft-04/hostname.js | 7 - .../json-schema/formats/handlers/duration.js | 7 - .../json-schema/formats/handlers/email.js | 7 - .../json-schema/formats/handlers/hostname.js | 7 - .../json-schema/formats/handlers/idn-email.js | 7 - .../formats/handlers/idn-hostname.js | 7 - .../json-schema/formats/handlers/ipv4.js | 7 - .../json-schema/formats/handlers/ipv6.js | 7 - .../formats/handlers/iri-reference.js | 7 - .../json-schema/formats/handlers/iri.js | 7 - .../formats/handlers/json-pointer.js | 7 - .../json-schema/formats/handlers/regex.js | 7 - .../formats/handlers/relative-json-pointer.js | 7 - .../json-schema/formats/handlers/time.js | 7 - .../formats/handlers/uri-reference.js | 7 - .../formats/handlers/uri-template.js | 7 - .../json-schema/formats/handlers/uri.js | 7 - .../json-schema/formats/handlers/uuid.js | 7 - .../@hyperjump/json-schema/formats/index.js | 11 - .../@hyperjump/json-schema/formats/lite.js | 38 - .../json-schema/openapi-3-0/dialect.js | 174 -- .../json-schema/openapi-3-0/discriminator.js | 10 - .../json-schema/openapi-3-0/example.js | 10 - .../json-schema/openapi-3-0/externalDocs.js | 10 - .../json-schema/openapi-3-0/index.d.ts | 298 --- .../json-schema/openapi-3-0/index.js | 77 - .../json-schema/openapi-3-0/nullable.js | 10 - .../json-schema/openapi-3-0/schema.js | 1368 -------------- .../json-schema/openapi-3-0/type.js | 22 - .../@hyperjump/json-schema/openapi-3-0/xml.js | 10 - .../json-schema/openapi-3-1/dialect/base.js | 22 - .../json-schema/openapi-3-1/index.d.ts | 364 ---- .../json-schema/openapi-3-1/index.js | 49 - .../json-schema/openapi-3-1/meta/base.js | 77 - .../json-schema/openapi-3-1/schema-base.js | 33 - .../openapi-3-1/schema-draft-04.js | 33 - .../openapi-3-1/schema-draft-06.js | 33 - .../openapi-3-1/schema-draft-07.js | 33 - .../openapi-3-1/schema-draft-2019-09.js | 33 - .../openapi-3-1/schema-draft-2020-12.js | 33 - .../json-schema/openapi-3-1/schema.js | 1407 -------------- .../json-schema/openapi-3-2/dialect/base.js | 22 - .../json-schema/openapi-3-2/index.d.ts | 415 ---- .../json-schema/openapi-3-2/index.js | 47 - .../json-schema/openapi-3-2/meta/base.js | 102 - .../json-schema/openapi-3-2/schema-base.js | 32 - .../openapi-3-2/schema-draft-04.js | 33 - .../openapi-3-2/schema-draft-06.js | 33 - .../openapi-3-2/schema-draft-07.js | 33 - .../openapi-3-2/schema-draft-2019-09.js | 33 - .../openapi-3-2/schema-draft-2020-12.js | 33 - .../json-schema/openapi-3-2/schema.js | 1665 ----------------- .../@hyperjump/json-schema/package.json | 83 - .../v1/extension-tests/conditional.json | 289 --- .../v1/extension-tests/itemPattern.json | 462 ----- .../@hyperjump/json-schema/v1/index.d.ts | 68 - .../@hyperjump/json-schema/v1/index.js | 116 -- .../json-schema/v1/meta/applicator.js | 73 - .../@hyperjump/json-schema/v1/meta/content.js | 10 - .../@hyperjump/json-schema/v1/meta/core.js | 50 - .../@hyperjump/json-schema/v1/meta/format.js | 8 - .../json-schema/v1/meta/meta-data.js | 14 - .../json-schema/v1/meta/unevaluated.js | 9 - .../json-schema/v1/meta/validation.js | 65 - .../@hyperjump/json-schema/v1/schema.js | 24 - node_modules/@hyperjump/pact/LICENSE | 21 - node_modules/@hyperjump/pact/README.md | 76 - node_modules/@hyperjump/pact/package.json | 45 - node_modules/@hyperjump/pact/src/async.js | 24 - node_modules/@hyperjump/pact/src/curry.d.ts | 13 - node_modules/@hyperjump/pact/src/curry.js | 15 - node_modules/@hyperjump/pact/src/index.d.ts | 443 ----- node_modules/@hyperjump/pact/src/index.js | 487 ----- .../@hyperjump/pact/src/type-utils.d.ts | 5 - node_modules/@hyperjump/uri/LICENSE | 21 - node_modules/@hyperjump/uri/README.md | 129 -- node_modules/@hyperjump/uri/package.json | 39 - node_modules/content-type/HISTORY.md | 29 - node_modules/content-type/LICENSE | 22 - node_modules/content-type/README.md | 94 - node_modules/content-type/index.js | 225 --- node_modules/content-type/package.json | 42 - node_modules/idn-hostname/#/tests/0/0.json | 5 - node_modules/idn-hostname/#/tests/0/1.json | 5 - node_modules/idn-hostname/#/tests/0/10.json | 5 - node_modules/idn-hostname/#/tests/0/11.json | 5 - node_modules/idn-hostname/#/tests/0/12.json | 5 - node_modules/idn-hostname/#/tests/0/13.json | 5 - node_modules/idn-hostname/#/tests/0/14.json | 5 - node_modules/idn-hostname/#/tests/0/15.json | 5 - node_modules/idn-hostname/#/tests/0/16.json | 5 - node_modules/idn-hostname/#/tests/0/17.json | 5 - node_modules/idn-hostname/#/tests/0/18.json | 5 - node_modules/idn-hostname/#/tests/0/19.json | 5 - node_modules/idn-hostname/#/tests/0/2.json | 5 - node_modules/idn-hostname/#/tests/0/20.json | 6 - node_modules/idn-hostname/#/tests/0/21.json | 6 - node_modules/idn-hostname/#/tests/0/22.json | 6 - node_modules/idn-hostname/#/tests/0/23.json | 6 - node_modules/idn-hostname/#/tests/0/24.json | 6 - node_modules/idn-hostname/#/tests/0/25.json | 6 - node_modules/idn-hostname/#/tests/0/26.json | 6 - node_modules/idn-hostname/#/tests/0/27.json | 6 - node_modules/idn-hostname/#/tests/0/28.json | 6 - node_modules/idn-hostname/#/tests/0/29.json | 6 - node_modules/idn-hostname/#/tests/0/3.json | 5 - node_modules/idn-hostname/#/tests/0/30.json | 6 - node_modules/idn-hostname/#/tests/0/31.json | 6 - node_modules/idn-hostname/#/tests/0/32.json | 6 - node_modules/idn-hostname/#/tests/0/33.json | 6 - node_modules/idn-hostname/#/tests/0/34.json | 6 - node_modules/idn-hostname/#/tests/0/35.json | 6 - node_modules/idn-hostname/#/tests/0/36.json | 6 - node_modules/idn-hostname/#/tests/0/37.json | 6 - node_modules/idn-hostname/#/tests/0/38.json | 6 - node_modules/idn-hostname/#/tests/0/39.json | 6 - node_modules/idn-hostname/#/tests/0/4.json | 5 - node_modules/idn-hostname/#/tests/0/40.json | 6 - node_modules/idn-hostname/#/tests/0/41.json | 6 - node_modules/idn-hostname/#/tests/0/42.json | 6 - node_modules/idn-hostname/#/tests/0/43.json | 6 - node_modules/idn-hostname/#/tests/0/44.json | 6 - node_modules/idn-hostname/#/tests/0/45.json | 6 - node_modules/idn-hostname/#/tests/0/46.json | 6 - node_modules/idn-hostname/#/tests/0/47.json | 6 - node_modules/idn-hostname/#/tests/0/48.json | 6 - node_modules/idn-hostname/#/tests/0/49.json | 6 - node_modules/idn-hostname/#/tests/0/5.json | 5 - node_modules/idn-hostname/#/tests/0/50.json | 6 - node_modules/idn-hostname/#/tests/0/51.json | 6 - node_modules/idn-hostname/#/tests/0/52.json | 6 - node_modules/idn-hostname/#/tests/0/53.json | 6 - node_modules/idn-hostname/#/tests/0/54.json | 6 - node_modules/idn-hostname/#/tests/0/55.json | 6 - node_modules/idn-hostname/#/tests/0/56.json | 6 - node_modules/idn-hostname/#/tests/0/57.json | 6 - node_modules/idn-hostname/#/tests/0/58.json | 6 - node_modules/idn-hostname/#/tests/0/59.json | 6 - node_modules/idn-hostname/#/tests/0/6.json | 5 - node_modules/idn-hostname/#/tests/0/60.json | 6 - node_modules/idn-hostname/#/tests/0/61.json | 6 - node_modules/idn-hostname/#/tests/0/62.json | 6 - node_modules/idn-hostname/#/tests/0/63.json | 5 - node_modules/idn-hostname/#/tests/0/64.json | 5 - node_modules/idn-hostname/#/tests/0/65.json | 5 - node_modules/idn-hostname/#/tests/0/66.json | 5 - node_modules/idn-hostname/#/tests/0/67.json | 5 - node_modules/idn-hostname/#/tests/0/68.json | 5 - node_modules/idn-hostname/#/tests/0/69.json | 5 - node_modules/idn-hostname/#/tests/0/7.json | 5 - node_modules/idn-hostname/#/tests/0/70.json | 5 - node_modules/idn-hostname/#/tests/0/71.json | 5 - node_modules/idn-hostname/#/tests/0/72.json | 5 - node_modules/idn-hostname/#/tests/0/73.json | 5 - node_modules/idn-hostname/#/tests/0/74.json | 5 - node_modules/idn-hostname/#/tests/0/75.json | 5 - node_modules/idn-hostname/#/tests/0/76.json | 5 - node_modules/idn-hostname/#/tests/0/77.json | 5 - node_modules/idn-hostname/#/tests/0/78.json | 5 - node_modules/idn-hostname/#/tests/0/79.json | 5 - node_modules/idn-hostname/#/tests/0/8.json | 5 - node_modules/idn-hostname/#/tests/0/80.json | 5 - node_modules/idn-hostname/#/tests/0/81.json | 5 - node_modules/idn-hostname/#/tests/0/82.json | 5 - node_modules/idn-hostname/#/tests/0/83.json | 5 - node_modules/idn-hostname/#/tests/0/84.json | 5 - node_modules/idn-hostname/#/tests/0/85.json | 5 - node_modules/idn-hostname/#/tests/0/86.json | 5 - node_modules/idn-hostname/#/tests/0/87.json | 5 - node_modules/idn-hostname/#/tests/0/88.json | 5 - node_modules/idn-hostname/#/tests/0/89.json | 5 - node_modules/idn-hostname/#/tests/0/9.json | 5 - node_modules/idn-hostname/#/tests/0/90.json | 5 - node_modules/idn-hostname/#/tests/0/91.json | 5 - node_modules/idn-hostname/#/tests/0/92.json | 5 - node_modules/idn-hostname/#/tests/0/93.json | 5 - node_modules/idn-hostname/#/tests/0/94.json | 5 - node_modules/idn-hostname/#/tests/0/95.json | 6 - .../idn-hostname/#/tests/0/schema.json | 4 - node_modules/idn-hostname/LICENSE | 21 - .../idn-hostname/idnaMappingTableCompact.json | 1 - node_modules/idn-hostname/index.d.ts | 32 - node_modules/idn-hostname/index.js | 172 -- node_modules/idn-hostname/package.json | 33 - node_modules/idn-hostname/readme.md | 302 --- .../json-stringify-deterministic/LICENSE.md | 21 - .../json-stringify-deterministic/README.md | 143 -- .../json-stringify-deterministic/package.json | 101 - node_modules/jsonc-parser/CHANGELOG.md | 76 - node_modules/jsonc-parser/LICENSE.md | 21 - node_modules/jsonc-parser/README.md | 364 ---- node_modules/jsonc-parser/SECURITY.md | 41 - node_modules/jsonc-parser/package.json | 37 - node_modules/just-curry-it/CHANGELOG.md | 25 - node_modules/just-curry-it/LICENSE | 21 - node_modules/just-curry-it/README.md | 43 - node_modules/just-curry-it/index.cjs | 40 - node_modules/just-curry-it/index.d.ts | 18 - node_modules/just-curry-it/index.mjs | 42 - node_modules/just-curry-it/index.tests.ts | 72 - node_modules/just-curry-it/package.json | 32 - node_modules/just-curry-it/rollup.config.js | 3 - node_modules/punycode/LICENSE-MIT.txt | 20 - node_modules/punycode/README.md | 148 -- node_modules/punycode/package.json | 58 - node_modules/punycode/punycode.es6.js | 444 ----- node_modules/punycode/punycode.js | 443 ----- node_modules/uuid/CHANGELOG.md | 274 --- node_modules/uuid/CONTRIBUTING.md | 18 - node_modules/uuid/LICENSE.md | 9 - node_modules/uuid/README.md | 466 ----- node_modules/uuid/package.json | 135 -- node_modules/uuid/wrapper.mjs | 10 - 307 files changed, 1 insertion(+), 19092 deletions(-) delete mode 100644 node_modules/.bin/uuid delete mode 100644 node_modules/.bin/uuid.cmd delete mode 100644 node_modules/.bin/uuid.ps1 delete mode 100644 node_modules/.package-lock.json delete mode 100644 node_modules/@hyperjump/browser/.gitattributes delete mode 100644 node_modules/@hyperjump/browser/LICENCE delete mode 100644 node_modules/@hyperjump/browser/README.md delete mode 100644 node_modules/@hyperjump/browser/package.json delete mode 100644 node_modules/@hyperjump/json-pointer/LICENSE delete mode 100644 node_modules/@hyperjump/json-pointer/README.md delete mode 100644 node_modules/@hyperjump/json-pointer/package.json delete mode 100644 node_modules/@hyperjump/json-schema-formats/LICENSE delete mode 100644 node_modules/@hyperjump/json-schema-formats/README.md delete mode 100644 node_modules/@hyperjump/json-schema-formats/package.json delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/date-math.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/ecma262.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/index.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc1123.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc2673.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3339.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3986.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3987.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc4122.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc4291.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc5321.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6531.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6570.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6901.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/uts46.js delete mode 100644 node_modules/@hyperjump/json-schema/LICENSE delete mode 100644 node_modules/@hyperjump/json-schema/README.md delete mode 100644 node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/annotations/annotated-instance.js delete mode 100644 node_modules/@hyperjump/json-schema/annotations/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/annotations/index.js delete mode 100644 node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/annotations/test-utils.js delete mode 100644 node_modules/@hyperjump/json-schema/annotations/validation-error.js delete mode 100644 node_modules/@hyperjump/json-schema/bundle/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/bundle/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/additionalItems.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/dependencies.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/id.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/items.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/maximum.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/minimum.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/ref.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/contains.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-07/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-07/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-07/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-07/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/date-time.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/date.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/duration.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/email.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/hostname.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/iri.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/regex.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/time.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uuid.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/index.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/lite.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/example.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/index.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/type.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/xml.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/index.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/index.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/package.json delete mode 100644 node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json delete mode 100644 node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json delete mode 100644 node_modules/@hyperjump/json-schema/v1/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/v1/index.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/applicator.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/content.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/core.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/format.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/meta-data.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/validation.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/schema.js delete mode 100644 node_modules/@hyperjump/pact/LICENSE delete mode 100644 node_modules/@hyperjump/pact/README.md delete mode 100644 node_modules/@hyperjump/pact/package.json delete mode 100644 node_modules/@hyperjump/pact/src/async.js delete mode 100644 node_modules/@hyperjump/pact/src/curry.d.ts delete mode 100644 node_modules/@hyperjump/pact/src/curry.js delete mode 100644 node_modules/@hyperjump/pact/src/index.d.ts delete mode 100644 node_modules/@hyperjump/pact/src/index.js delete mode 100644 node_modules/@hyperjump/pact/src/type-utils.d.ts delete mode 100644 node_modules/@hyperjump/uri/LICENSE delete mode 100644 node_modules/@hyperjump/uri/README.md delete mode 100644 node_modules/@hyperjump/uri/package.json delete mode 100644 node_modules/content-type/HISTORY.md delete mode 100644 node_modules/content-type/LICENSE delete mode 100644 node_modules/content-type/README.md delete mode 100644 node_modules/content-type/index.js delete mode 100644 node_modules/content-type/package.json delete mode 100644 node_modules/idn-hostname/#/tests/0/0.json delete mode 100644 node_modules/idn-hostname/#/tests/0/1.json delete mode 100644 node_modules/idn-hostname/#/tests/0/10.json delete mode 100644 node_modules/idn-hostname/#/tests/0/11.json delete mode 100644 node_modules/idn-hostname/#/tests/0/12.json delete mode 100644 node_modules/idn-hostname/#/tests/0/13.json delete mode 100644 node_modules/idn-hostname/#/tests/0/14.json delete mode 100644 node_modules/idn-hostname/#/tests/0/15.json delete mode 100644 node_modules/idn-hostname/#/tests/0/16.json delete mode 100644 node_modules/idn-hostname/#/tests/0/17.json delete mode 100644 node_modules/idn-hostname/#/tests/0/18.json delete mode 100644 node_modules/idn-hostname/#/tests/0/19.json delete mode 100644 node_modules/idn-hostname/#/tests/0/2.json delete mode 100644 node_modules/idn-hostname/#/tests/0/20.json delete mode 100644 node_modules/idn-hostname/#/tests/0/21.json delete mode 100644 node_modules/idn-hostname/#/tests/0/22.json delete mode 100644 node_modules/idn-hostname/#/tests/0/23.json delete mode 100644 node_modules/idn-hostname/#/tests/0/24.json delete mode 100644 node_modules/idn-hostname/#/tests/0/25.json delete mode 100644 node_modules/idn-hostname/#/tests/0/26.json delete mode 100644 node_modules/idn-hostname/#/tests/0/27.json delete mode 100644 node_modules/idn-hostname/#/tests/0/28.json delete mode 100644 node_modules/idn-hostname/#/tests/0/29.json delete mode 100644 node_modules/idn-hostname/#/tests/0/3.json delete mode 100644 node_modules/idn-hostname/#/tests/0/30.json delete mode 100644 node_modules/idn-hostname/#/tests/0/31.json delete mode 100644 node_modules/idn-hostname/#/tests/0/32.json delete mode 100644 node_modules/idn-hostname/#/tests/0/33.json delete mode 100644 node_modules/idn-hostname/#/tests/0/34.json delete mode 100644 node_modules/idn-hostname/#/tests/0/35.json delete mode 100644 node_modules/idn-hostname/#/tests/0/36.json delete mode 100644 node_modules/idn-hostname/#/tests/0/37.json delete mode 100644 node_modules/idn-hostname/#/tests/0/38.json delete mode 100644 node_modules/idn-hostname/#/tests/0/39.json delete mode 100644 node_modules/idn-hostname/#/tests/0/4.json delete mode 100644 node_modules/idn-hostname/#/tests/0/40.json delete mode 100644 node_modules/idn-hostname/#/tests/0/41.json delete mode 100644 node_modules/idn-hostname/#/tests/0/42.json delete mode 100644 node_modules/idn-hostname/#/tests/0/43.json delete mode 100644 node_modules/idn-hostname/#/tests/0/44.json delete mode 100644 node_modules/idn-hostname/#/tests/0/45.json delete mode 100644 node_modules/idn-hostname/#/tests/0/46.json delete mode 100644 node_modules/idn-hostname/#/tests/0/47.json delete mode 100644 node_modules/idn-hostname/#/tests/0/48.json delete mode 100644 node_modules/idn-hostname/#/tests/0/49.json delete mode 100644 node_modules/idn-hostname/#/tests/0/5.json delete mode 100644 node_modules/idn-hostname/#/tests/0/50.json delete mode 100644 node_modules/idn-hostname/#/tests/0/51.json delete mode 100644 node_modules/idn-hostname/#/tests/0/52.json delete mode 100644 node_modules/idn-hostname/#/tests/0/53.json delete mode 100644 node_modules/idn-hostname/#/tests/0/54.json delete mode 100644 node_modules/idn-hostname/#/tests/0/55.json delete mode 100644 node_modules/idn-hostname/#/tests/0/56.json delete mode 100644 node_modules/idn-hostname/#/tests/0/57.json delete mode 100644 node_modules/idn-hostname/#/tests/0/58.json delete mode 100644 node_modules/idn-hostname/#/tests/0/59.json delete mode 100644 node_modules/idn-hostname/#/tests/0/6.json delete mode 100644 node_modules/idn-hostname/#/tests/0/60.json delete mode 100644 node_modules/idn-hostname/#/tests/0/61.json delete mode 100644 node_modules/idn-hostname/#/tests/0/62.json delete mode 100644 node_modules/idn-hostname/#/tests/0/63.json delete mode 100644 node_modules/idn-hostname/#/tests/0/64.json delete mode 100644 node_modules/idn-hostname/#/tests/0/65.json delete mode 100644 node_modules/idn-hostname/#/tests/0/66.json delete mode 100644 node_modules/idn-hostname/#/tests/0/67.json delete mode 100644 node_modules/idn-hostname/#/tests/0/68.json delete mode 100644 node_modules/idn-hostname/#/tests/0/69.json delete mode 100644 node_modules/idn-hostname/#/tests/0/7.json delete mode 100644 node_modules/idn-hostname/#/tests/0/70.json delete mode 100644 node_modules/idn-hostname/#/tests/0/71.json delete mode 100644 node_modules/idn-hostname/#/tests/0/72.json delete mode 100644 node_modules/idn-hostname/#/tests/0/73.json delete mode 100644 node_modules/idn-hostname/#/tests/0/74.json delete mode 100644 node_modules/idn-hostname/#/tests/0/75.json delete mode 100644 node_modules/idn-hostname/#/tests/0/76.json delete mode 100644 node_modules/idn-hostname/#/tests/0/77.json delete mode 100644 node_modules/idn-hostname/#/tests/0/78.json delete mode 100644 node_modules/idn-hostname/#/tests/0/79.json delete mode 100644 node_modules/idn-hostname/#/tests/0/8.json delete mode 100644 node_modules/idn-hostname/#/tests/0/80.json delete mode 100644 node_modules/idn-hostname/#/tests/0/81.json delete mode 100644 node_modules/idn-hostname/#/tests/0/82.json delete mode 100644 node_modules/idn-hostname/#/tests/0/83.json delete mode 100644 node_modules/idn-hostname/#/tests/0/84.json delete mode 100644 node_modules/idn-hostname/#/tests/0/85.json delete mode 100644 node_modules/idn-hostname/#/tests/0/86.json delete mode 100644 node_modules/idn-hostname/#/tests/0/87.json delete mode 100644 node_modules/idn-hostname/#/tests/0/88.json delete mode 100644 node_modules/idn-hostname/#/tests/0/89.json delete mode 100644 node_modules/idn-hostname/#/tests/0/9.json delete mode 100644 node_modules/idn-hostname/#/tests/0/90.json delete mode 100644 node_modules/idn-hostname/#/tests/0/91.json delete mode 100644 node_modules/idn-hostname/#/tests/0/92.json delete mode 100644 node_modules/idn-hostname/#/tests/0/93.json delete mode 100644 node_modules/idn-hostname/#/tests/0/94.json delete mode 100644 node_modules/idn-hostname/#/tests/0/95.json delete mode 100644 node_modules/idn-hostname/#/tests/0/schema.json delete mode 100644 node_modules/idn-hostname/LICENSE delete mode 100644 node_modules/idn-hostname/idnaMappingTableCompact.json delete mode 100644 node_modules/idn-hostname/index.d.ts delete mode 100644 node_modules/idn-hostname/index.js delete mode 100644 node_modules/idn-hostname/package.json delete mode 100644 node_modules/idn-hostname/readme.md delete mode 100644 node_modules/json-stringify-deterministic/LICENSE.md delete mode 100644 node_modules/json-stringify-deterministic/README.md delete mode 100644 node_modules/json-stringify-deterministic/package.json delete mode 100644 node_modules/jsonc-parser/CHANGELOG.md delete mode 100644 node_modules/jsonc-parser/LICENSE.md delete mode 100644 node_modules/jsonc-parser/README.md delete mode 100644 node_modules/jsonc-parser/SECURITY.md delete mode 100644 node_modules/jsonc-parser/package.json delete mode 100644 node_modules/just-curry-it/CHANGELOG.md delete mode 100644 node_modules/just-curry-it/LICENSE delete mode 100644 node_modules/just-curry-it/README.md delete mode 100644 node_modules/just-curry-it/index.cjs delete mode 100644 node_modules/just-curry-it/index.d.ts delete mode 100644 node_modules/just-curry-it/index.mjs delete mode 100644 node_modules/just-curry-it/index.tests.ts delete mode 100644 node_modules/just-curry-it/package.json delete mode 100644 node_modules/just-curry-it/rollup.config.js delete mode 100644 node_modules/punycode/LICENSE-MIT.txt delete mode 100644 node_modules/punycode/README.md delete mode 100644 node_modules/punycode/package.json delete mode 100644 node_modules/punycode/punycode.es6.js delete mode 100644 node_modules/punycode/punycode.js delete mode 100644 node_modules/uuid/CHANGELOG.md delete mode 100644 node_modules/uuid/CONTRIBUTING.md delete mode 100644 node_modules/uuid/LICENSE.md delete mode 100644 node_modules/uuid/README.md delete mode 100644 node_modules/uuid/package.json delete mode 100644 node_modules/uuid/wrapper.mjs diff --git a/.gitignore b/.gitignore index 68bc17f9..6953a1ef 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,4 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +node_modules/ diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid deleted file mode 100644 index 0c2d4696..00000000 --- a/node_modules/.bin/uuid +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@" -else - exec node "$basedir/../uuid/dist/bin/uuid" "$@" -fi diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd deleted file mode 100644 index 0f2376ea..00000000 --- a/node_modules/.bin/uuid.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %* diff --git a/node_modules/.bin/uuid.ps1 b/node_modules/.bin/uuid.ps1 deleted file mode 100644 index 78046284..00000000 --- a/node_modules/.bin/uuid.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } else { - & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } else { - & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index a7b6eda0..00000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "name": "json-schema-test-suite", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@hyperjump/browser": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.1.tgz", - "integrity": "sha512-Le5XZUjnVqVjkgLYv6yyWgALat/0HpB1XaCPuCZ+GCFki9NvXloSZITIJ0H+wRW7mb9At1SxvohKBbNQbrr/cw==", - "license": "MIT", - "dependencies": { - "@hyperjump/json-pointer": "^1.1.0", - "@hyperjump/uri": "^1.2.0", - "content-type": "^1.0.5", - "just-curry-it": "^5.3.0" - }, - "engines": { - "node": ">=18.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - } - }, - "node_modules/@hyperjump/json-pointer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.1.tgz", - "integrity": "sha512-M0T3s7TC2JepoWPMZQn1W6eYhFh06OXwpMqL+8c5wMVpvnCKNsPgpu9u7WyCI03xVQti8JAeAy4RzUa6SYlJLA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - } - }, - "node_modules/@hyperjump/json-schema": { - "version": "1.17.2", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.2.tgz", - "integrity": "sha512-pCysQu2kPZFcqyJmiU5JauzPHQIQa9i9F7+S5ui8OiwcdsBZUOjdY1rfSnqgaM5sNeR3akNVXKB/WgxNEnJrWw==", - "license": "MIT", - "dependencies": { - "@hyperjump/json-pointer": "^1.1.0", - "@hyperjump/json-schema-formats": "^1.0.0", - "@hyperjump/pact": "^1.2.0", - "@hyperjump/uri": "^1.2.0", - "content-type": "^1.0.4", - "json-stringify-deterministic": "^1.0.12", - "just-curry-it": "^5.3.0", - "uuid": "^9.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "peerDependencies": { - "@hyperjump/browser": "^1.1.0" - } - }, - "node_modules/@hyperjump/json-schema-formats": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-formats/-/json-schema-formats-1.0.1.tgz", - "integrity": "sha512-qvcIxysnMfcPxyPSFFzzo28o2BN1CNT5b0tQXNUP0kaFpvptQNDg8SCLvlnMg2sYxuiuqna8+azGBaBthiskAw==", - "license": "MIT", - "dependencies": { - "@hyperjump/uri": "^1.3.2", - "idn-hostname": "^15.1.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/hyperjump-io" - } - }, - "node_modules/@hyperjump/pact": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.4.0.tgz", - "integrity": "sha512-01Q7VY6BcAkp9W31Fv+ciiZycxZHGlR2N6ba9BifgyclHYHdbaZgITo0U6QMhYRlem4k8pf8J31/tApxvqAz8A==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - } - }, - "node_modules/@hyperjump/uri": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.2.tgz", - "integrity": "sha512-OFo5oxuSEz1ktF/LDdBTptlnPyZ66jywLO4fJRuAhnr7NGnsiL2CPoj1JRVaDqVy0nXvWNsC8O8Muw9DR++eEg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/idn-hostname": { - "version": "15.1.8", - "resolved": "https://registry.npmjs.org/idn-hostname/-/idn-hostname-15.1.8.tgz", - "integrity": "sha512-MmLwddtSVyMtzYxx+xs2IFEbfyg/facubL/mEaAoJX/XIfjt1ly5QhPByihf4yrxZYbkQfRZVEnBgISv/e2ZWw==", - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - } - }, - "node_modules/json-stringify-deterministic": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", - "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/jsonc-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", - "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/just-curry-it": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", - "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==", - "license": "MIT" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - } - } -} diff --git a/node_modules/@hyperjump/browser/.gitattributes b/node_modules/@hyperjump/browser/.gitattributes deleted file mode 100644 index fcadb2cf..00000000 --- a/node_modules/@hyperjump/browser/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text eol=lf diff --git a/node_modules/@hyperjump/browser/LICENCE b/node_modules/@hyperjump/browser/LICENCE deleted file mode 100644 index 6e9846cf..00000000 --- a/node_modules/@hyperjump/browser/LICENCE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/browser/README.md b/node_modules/@hyperjump/browser/README.md deleted file mode 100644 index 10c09bdf..00000000 --- a/node_modules/@hyperjump/browser/README.md +++ /dev/null @@ -1,249 +0,0 @@ -# Hyperjump - Browser - -The Hyperjump Browser is a generic client for traversing JSON Reference ([JRef]) -and other [JRef]-compatible media types in a way that abstracts the references -without loosing information. - -## Install - -This module is designed for node.js (ES Modules, TypeScript) and browsers. It -should work in Bun and Deno as well, but the test runner doesn't work in these -environments, so this module may be less stable in those environments. - -### Node.js - -```bash -npm install @hyperjump/browser -``` - -## JRef Browser - -This example uses the API at -[https://swapi.hyperjump.io](https://explore.hyperjump.io#https://swapi.hyperjump.io/api/films/1). -It's a variation of the [Star Wars API (SWAPI)](https://swapi.dev) implemented -using the [JRef] media type. - -```javascript -import { get, step, value, iter } from "@hyperjump/browser"; - -const aNewHope = await get("https://swapi.hyperjump.io/api/films/1"); -const characters = await get("#/characters", aNewHope); // Or -const characters = await step("characters", aNewHope); - -for await (const character of iter(characters)) { - const name = await step("name", character); - value(name); // => Luke Skywalker, etc. -} -``` - -You can also work with files on the file system. When working with files, media -types are determined by file extensions. The [JRef] media type uses the `.jref` -extension. - -```javascript -import { get, value } from "@hyperjump/browser"; - -const lukeSkywalker = await get("./api/people/1.jref"); // Paths resolve relative to the current working directory -const name = await step("name", lukeSkywalker); -value(name); // => Luke Skywalker -``` - -### API - -* get(uri: string, browser?: Browser): Promise\ - - Retrieve a document located at the given URI. Support for [JRef] is built - in. See the [Media Types](#media-type) section for information on how - to support other media types. Support for `http(s):` and `file:` URI schemes - are built in. See the [Uri Schemes](#uri-schemes) section for information on - how to support other URI schemes. -* value(browser: Browser) => JRef - - Get the JRef compatible value the document represents. -* typeOf(browser: Browser) => JRefType - - Works the same as the `typeof` keyword. It will return one of the JSON types - (null, boolean, number, string, array, object) or "reference". If the value - is not one of these types, it will throw an error. -* has(key: string, browser: Browser) => boolean - - Returns whether or not a property is present in the object that the browser - represents. -* length(browser: Browser) => number - - Get the length of the array that the browser represents. -* step(key: string | number, browser: Browser) => Promise\ - - Move the browser cursor by the given "key" value. This is analogous to - indexing into an object or array (`foo[key]`). This function supports - curried application. -* iter(browser: Browser) => AsyncGenerator\ - - Iterate over the items in the array that the document represents. -* entries(browser: Browser) => AsyncGenerator\<[string, Browser]> - - Similar to `Object.entries`, but yields Browsers for values. -* values(browser: Browser) => AsyncGenerator\ - - Similar to `Object.values`, but yields Browsers for values. -* keys(browser: Browser) => Generator\ - - Similar to `Object.keys`. - -## Media Types - -Support for the [JRef] media type is included by default, but you can add -support for any media type you like as long as it can be represented in a -[JRef]-compatible way. - -```javascript -import { addMediaTypePlugin, removeMediaTypePlugin, setMediaTypeQuality } from "@hyperjump/browser"; -import YAML from "yaml"; - -// Add support for YAML version of JRef (YRef) -addMediaTypePlugin("application/reference+yaml", { - parse: async (response) => { - return { - baseUri: response.url, - root: (response) => YAML.parse(await response.text(), (key, value) => { - return value !== null && typeof value.$ref === "string" - ? new Reference(value.$ref) - : value; - }, - anchorLocation: (fragment) => decodeUri(fragment ?? ""); - }; - }, - fileMatcher: (path) => path.endsWith(".jref") -}); - -// Prefer "YRef" over JRef by reducing the quality for JRef. -setMediaTypeQuality("application/reference+json", 0.9); - -// Only support YRef by removing JRef support. -removeMediaTypePlugin("application/reference+json"); -``` - -### API - -* addMediaTypePlugin(contentType: string, plugin: MediaTypePlugin): void - - Add support for additional media types. - - * type MediaTypePlugin - * parse: (response: Response) => Document - * [quality](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values): - number (defaults to `1`) -* removeMediaTypePlugin(contentType: string): void - - Removed support or a media type. -* setMediaTypeQuality(contentType: string, quality: number): void; - - Set the - [quality](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values) - that will be used in the - [Accept](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept) - header of requests to indicate to servers what media types are preferred - over others. -* acceptableMediaTypes(): string; - - Build an `Accept` request header from the registered media type plugins. - This function is used internally. You would only need it if you're writing a - custom `http(s):` URI scheme plugin. - -## URI Schemes - -By default, `http(s):` and `file:` URIs are supported. You can add support for -additional URI schemes using plugins. - -```javascript -import { addUriSchemePlugin, removeUriSchemePlugin, retrieve } from "@hyperjump/browser"; - -// Add support for the `urn:` scheme -addUriSchemePlugin("urn", { - parse: (urn, baseUri) => { - let { nid, nss, query, fragment } = parseUrn(urn); - nid = nid.toLowerCase(); - - if (!mappings[nid]?.[nss]) { - throw Error(`Not Found -- ${urn}`); - } - - let uri = mappings[nid][nss]; - uri += query ? "?" + query : ""; - uri += fragment ? "#" + fragment : ""; - - return retrieve(uri, baseUri); - } -}); - -// Only support `urn:` by removing default plugins -removeUriSchemePlugin("http"); -removeUriSchemePlugin("https"); -removeUriSchemePlugin("file"); -``` - -### API -* addUriSchemePlugin(scheme: string, plugin: UriSchemePlugin): void - - Add support for additional URI schemes. - - * type UriSchemePlugin - * retrieve: (uri: string, baseUri?: string) => Promise\ -* removeUriSchemePlugin(scheme: string): void - - Remove support for a URI scheme. -* retrieve(uri: string, baseUri?: string) => Promise\ - - This is used internally, but you may need it if mapping names to locators - such as in the example above. - -## JRef - -`parse` and `stringify` [JRef] values using the same API as the `JSON` built-in -functions including `reviver` and `replacer` functions. - -```javascript -import { parse, stringify, jrefTypeOf } from "@hyperjump/browser/jref"; - -const blogPostJref = `{ - "title": "Working with JRef", - "author": { "$ref": "/author/jdesrosiers" }, - "content": "lorem ipsum dolor sit amet", -}`; -const blogPost = parse(blogPostJref); -jrefTypeOf(blogPost.author) // => "reference" -blogPost.author.href; // => "/author/jdesrosiers" - -stringify(blogPost, null, " ") === blogPostJref // => true -``` - -### API -export type Replacer = (key: string, value: unknown) => unknown; - -* parse: (jref: string, reviver?: (key: string, value: unknown) => unknown) => JRef; - - Same as `JSON.parse`, but converts `{ "$ref": "..." }` to `Reference` - objects. -* stringify: (value: JRef, replacer?: (string | number)[] | null | Replacer, space?: string | number) => string; - - Same as `JSON.stringify`, but converts `Reference` objects to `{ "$ref": - "... " }` -* jrefTypeOf: (value: unknown) => "object" | "array" | "string" | "number" | "boolean" | "null" | "reference" | "undefined"; - -## Contributing - -### Tests - -Run the tests - -```bash -npm test -``` - -Run the tests with a continuous test runner - -```bash -npm test -- --watch -``` - -[JRef]: https://github.com/hyperjump-io/browser/blob/main/lib/jref/SPECIFICATION.md diff --git a/node_modules/@hyperjump/browser/package.json b/node_modules/@hyperjump/browser/package.json deleted file mode 100644 index 7749969e..00000000 --- a/node_modules/@hyperjump/browser/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "@hyperjump/browser", - "version": "1.3.1", - "description": "Browse JSON-compatible data with hypermedia references", - "type": "module", - "main": "./lib/index.js", - "exports": { - ".": "./lib/index.js", - "./jref": "./lib/jref/index.js" - }, - "browser": { - "./lib/index.js": "./lib/index.browser.js", - "./lib/browser/context-uri.js": "./lib/browser/context-uri.browser.js" - }, - "scripts": { - "clean": "xargs -a .gitignore rm -rf", - "lint": "eslint lib", - "type-check": "tsc --noEmit", - "test": "vitest --watch=false" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperjump-io/browser.git" - }, - "keywords": [ - "json", - "reference", - "jref", - "hypermedia", - "$ref" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "typescript": "*", - "typescript-eslint": "*", - "undici": "*", - "vitest": "*" - }, - "engines": { - "node": ">=18.0.0" - }, - "dependencies": { - "@hyperjump/json-pointer": "^1.1.0", - "@hyperjump/uri": "^1.2.0", - "content-type": "^1.0.5", - "just-curry-it": "^5.3.0" - } -} diff --git a/node_modules/@hyperjump/json-pointer/LICENSE b/node_modules/@hyperjump/json-pointer/LICENSE deleted file mode 100644 index 183e8491..00000000 --- a/node_modules/@hyperjump/json-pointer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/json-pointer/README.md b/node_modules/@hyperjump/json-pointer/README.md deleted file mode 100644 index 9ebf05db..00000000 --- a/node_modules/@hyperjump/json-pointer/README.md +++ /dev/null @@ -1,102 +0,0 @@ -# JSON Pointer - -This is an implementation of RFC-6901 JSON Pointer. JSON Pointer is designed for -referring to data values within a JSON document. It's designed to be URL -friendly so it can be used as a URL fragment that points to a specific part of -the JSON document. - -## Installation - -Includes support for node.js (ES Modules, TypeScript) and browsers. - -```bash -npm install @hyperjump/json-pointer -``` - -## Usage - -```javascript -import * as JsonPointer from "@hyperjump/json-pointer"; - -const value = { - "foo": { - "bar": 42 - } -}; - -// Construct pointers -const fooPointer = JsonPointer.append("foo", JsonPointer.nil); // "/foo" -const fooBarPointer = JsonPointer.append(fooPointer, "bar"); // "/foo/bar" - -// Get a value from a pointer -const getFooBar = JsonPointer.get(fooBarPointer); -getFooBar(value); // 42 - -// Set a value from a pointer -// New value is returned without modifying the original -const setFooBar = JsonPointer.set(fooBarPointer); -setFooBar(value, 33); // { "foo": { "bar": 33 } } - -// Assign a value from a pointer -// The original value is changed and no value is returned -const assignFooBar = JsonPointer.assign(fooBarPointer); -assignFooBar(value, 33); // { "foo": { "bar": 33 } } - -// Unset a value from a pointer -// New value is returned without modifying the original -const unsetFooBar = JsonPointer.unset(fooBarPointer); -setFooBar(value); // { "foo": {} } - -// Delete a value from a pointer -// The original value is changed and no value is returned -const deleteFooBar = JsonPointer.remove(fooBarPointer); -deleteFooBar(value); // { "foo": {} } -``` - -## API - -* **nil**: "" - - The empty pointer. -* **pointerSegments**: (pointer: string) => Generator\ - - An iterator for the segments of a JSON Pointer that handles escaping. -* **append**: (segment: string, pointer: string) => string - - Append a segment to a JSON Pointer. -* **get**: (pointer: string, subject: any) => any - - Use a JSON Pointer to get a value. This function can be curried. -* **set**: (pointer: string, subject: any, value: any) => any - - Immutably set a value using a JSON Pointer. Returns a new version of - `subject` with the value set. The original `subject` is not changed, but the - value isn't entirely cloned. Values that aren't changed will point to - the same value as the original. This function can be curried. -* **assign**: (pointer: string, subject: any, value: any) => void - - Mutate a value using a JSON Pointer. This function can be curried. -* **unset**: (pointer: string, subject: any) => any - - Immutably delete a value using a JSON Pointer. Returns a new version of - `subject` without the value. The original `subject` is not changed, but the - value isn't entirely cloned. Values that aren't changed will point to the - same value as the original. This function can be curried. -* **remove**: (pointer: string, subject: any) => void - - Delete a value using a JSON Pointer. This function can be curried. - -## Contributing - -### Tests - -Run the tests - -```bash -npm test -``` - -Run the tests with a continuous test runner -```bash -npm test -- --watch -``` diff --git a/node_modules/@hyperjump/json-pointer/package.json b/node_modules/@hyperjump/json-pointer/package.json deleted file mode 100644 index fd33dee0..00000000 --- a/node_modules/@hyperjump/json-pointer/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@hyperjump/json-pointer", - "version": "1.1.1", - "description": "An RFC-6901 JSON Pointer implementation", - "type": "module", - "main": "./lib/index.js", - "exports": "./lib/index.js", - "scripts": { - "lint": "eslint lib", - "test": "vitest --watch=false", - "type-check": "tsc --noEmit" - }, - "repository": "github:hyperjump-io/json-pointer", - "keywords": [ - "JSON Pointer", - "RFC-6901" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "typescript-eslint": "*", - "vitest": "*" - } -} diff --git a/node_modules/@hyperjump/json-schema-formats/LICENSE b/node_modules/@hyperjump/json-schema-formats/LICENSE deleted file mode 100644 index 82597103..00000000 --- a/node_modules/@hyperjump/json-schema-formats/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/json-schema-formats/README.md b/node_modules/@hyperjump/json-schema-formats/README.md deleted file mode 100644 index a6d49704..00000000 --- a/node_modules/@hyperjump/json-schema-formats/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Hyperjump - JSON Schema Formats - -A collection of validation functions for the JSON Schema `format` keyword. - -## Install - -This module is designed for Node.js (ES Modules, TypeScript) and browsers. It -should work in Bun and Deno as well, but the test runner doesn't work in these -environments, so this module may be less stable in those environments. - -### Node.js - -```bash -npm install @hyperjump/json-schema-formats -``` - -### TypeScript - -This package uses the package.json "exports" field. [TypeScript understands -"exports"](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing), -but you need to change a couple settings in your `tsconfig.json` for it to work. - -```jsonc - "module": "Node16", // or "NodeNext" - "moduleResolution": "Node16", // or "NodeNext" -``` - -## API - - - -## Contributing - -Contributions are welcome! Please create an issue to propose and discuss any -changes you'd like to make before implementing it. If it's an obvious bug with -an obvious solution or something simple like a fixing a typo, creating an issue -isn't required. You can just send a PR without creating an issue. Before -submitting any code, please remember to first run the following tests. - -- `npm test` (Tests can also be run continuously using `npm test -- --watch`) -- `npm run lint` -- `npm run type-check` diff --git a/node_modules/@hyperjump/json-schema-formats/package.json b/node_modules/@hyperjump/json-schema-formats/package.json deleted file mode 100644 index 1e13b05b..00000000 --- a/node_modules/@hyperjump/json-schema-formats/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@hyperjump/json-schema-formats", - "version": "1.0.1", - "description": "A collection of validation functions for the JSON Schema `format` keyword.", - "keywords": [ - "JSON Schema", - "format", - "rfc3339", - "date", - "date-time", - "duration", - "email", - "hostname", - "idn-hostname", - "idn-email", - "ipv4", - "ipv6", - "iri", - "iri-reference", - "json-pointer", - "regex", - "relative-json-pointer", - "time", - "uri", - "uri-reference", - "uri-template", - "uuid" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "repository": "github:hyperjump-io/json-schema-formats", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/hyperjump-io" - }, - "type": "module", - "exports": { - ".": "./src/index.js" - }, - "scripts": { - "lint": "eslint src", - "test": "vitest run", - "type-check": "tsc --noEmit", - "docs": "typedoc --excludeExternals" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "json-schema-test-suite": "github:json-schema-org/json-schema-test-suite", - "typedoc": "*", - "typescript-eslint": "*", - "vitest": "*" - }, - "dependencies": { - "@hyperjump/uri": "^1.3.2", - "idn-hostname": "^15.1.2" - } -} diff --git a/node_modules/@hyperjump/json-schema-formats/src/date-math.js b/node_modules/@hyperjump/json-schema-formats/src/date-math.js deleted file mode 100644 index 60d28c72..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/date-math.js +++ /dev/null @@ -1,120 +0,0 @@ -/** @type (month: string, year: number) => number */ -export const daysInMonth = (month, year) => { - switch (month) { - case "01": - case "Jan": - case "03": - case "Mar": - case "05": - case "May": - case "07": - case "Jul": - case "08": - case "Aug": - case "10": - case "Oct": - case "12": - case "Dec": - return 31; - case "04": - case "Apr": - case "06": - case "Jun": - case "09": - case "Sep": - case "11": - case "Nov": - return 30; - case "02": - case "Feb": - return isLeapYear(year) ? 29 : 28; - default: - return 0; - } -}; - -/** @type (year: number) => boolean */ -export const isLeapYear = (year) => { - return (year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)); -}; - -/** @type (date: Date) => boolean */ -export const hasLeapSecond = (date) => { - const utcDate = `${date.getUTCFullYear()}-${date.getUTCMonth() + 1}-${date.getUTCDate()}`; - return leapSecondDates.has(utcDate) - && date.getUTCHours() === 23 - && date.getUTCMinutes() === 59; -}; - -const leapSecondDates = new Set([ - "1960-12-31", - "1961-07-31", - "1961-12-31", - "1963-10-31", - "1963-12-31", - "1964-03-31", - "1964-08-31", - "1964-12-31", - "1965-02-28", - "1965-06-30", - "1965-08-31", - "1965-12-31", - "1968-01-31", - "1971-12-31", - "1972-06-30", - "1972-12-31", - "1973-12-31", - "1974-12-31", - "1975-12-31", - "1976-12-31", - "1977-12-31", - "1978-12-31", - "1979-12-31", - "1981-06-30", - "1982-06-30", - "1983-06-30", - "1985-06-30", - "1987-12-31", - "1989-12-31", - "1990-12-31", - "1992-06-30", - "1993-06-30", - "1994-06-30", - "1995-12-31", - "1997-06-30", - "1998-12-31", - "2005-12-31", - "2008-12-31", - "2012-06-30", - "2015-06-30", - "2016-12-31" -]); - -/** @type (dayName: string) => number */ -export const dayOfWeekId = (dayName) => { - switch (dayName) { - case "Sun": - case "Sunday": - return 0; - case "Mon": - case "Monday": - return 1; - case "Tue": - case "Tuesday": - return 2; - case "Wed": - case "Wednesday": - return 3; - case "Thu": - case "Thursday": - return 4; - case "Fri": - case "Friday": - return 5; - case "Sat": - case "Saturday": - return 6; - default: - return -1; - } -}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js b/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js deleted file mode 100644 index 2b829b4f..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const unescaped = `[\\u{00}-\\u{2E}\\u{30}-\\u{7D}\\u{7F}-\\u{10FFFF}]`; // %x2F ('/') and %x7E ('~') are excluded from 'unescaped' -const escaped = `~[01]`; // representing '~' and '/', respectively -const referenceToken = `(?:${unescaped}|${escaped})*`; -const jsonPointer = `(?:/${referenceToken})*`; - -const nonNegativeInteger = `(?:0|[1-9][0-9]*)`; -const indexManipulation = `(?:[+-]${nonNegativeInteger})`; -const relativeJsonPointer = `${nonNegativeInteger}(?:${indexManipulation}?${jsonPointer}|#)`; - -/** - * @type API.isRelativeJsonPointer - * @function - */ -export const isRelativeJsonPointer = RegExp.prototype.test.bind(new RegExp(`^${relativeJsonPointer}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/ecma262.js b/node_modules/@hyperjump/json-schema-formats/src/ecma262.js deleted file mode 100644 index 47a91ebe..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/ecma262.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -/** @type API.isRegex */ -export const isRegex = (regex) => { - try { - new RegExp(regex, "u"); - return true; - } catch (_error) { - return false; - } -}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/index.d.ts b/node_modules/@hyperjump/json-schema-formats/src/index.d.ts deleted file mode 100644 index 31df2b91..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/index.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * The 'date' format. Validates that a string represents a date according to - * [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). - * - * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) - */ -export const isDate: (date: string) => boolean; - -/** - * The 'time' format. Validates that a string represents a time according to - * [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). - * - * **NOTE**: Leap seconds are only allowed on specific dates. Since there is no date - * in this context, leap seconds are never allowed. - * - * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) - */ -export const isTime: (time: string) => boolean; - -/** - * The 'date-time' format. Validates that a string represents a date-time - * according to [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). - * - * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) - */ -export const isDateTime: (dateTime: string) => boolean; - -/** - * The 'duration' format. Validates that a string represents a duration - * according to [RFC 3339, Appendix A](https://www.rfc-editor.org/rfc/rfc3339.html#appendix-A). - * - * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) - */ -export const isDuration: (duration: string) => boolean; - -/** - * The 'email' format. Validates that a string represents an email as defined by - * the "Mailbox" ABNF rule in [RFC 5321, section 4.1.2](https://www.rfc-editor.org/rfc/rfc5321.html#section-4.1.2). - * - * @see [JSON Schema Core, section 7.3.2](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.2) - */ -export const isEmail: (email: string) => boolean; - -/** - * The 'idn-email' format. Validates that a string represents an email as - * defined by the "Mailbox" ABNF rule in [RFC 6531, section 3.3](https://www.rfc-editor.org/rfc/rfc6531.html#section-3.3). - * - * @see [JSON Schema Core, section 7.3.2](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.2) - */ -export const isIdnEmail: (email: string) => boolean; - -/** - * The 'hostname' format in draft-04 - draft-06. Validates that a string - * represents a hostname as defined by [RFC 1123, section 2.1](https://www.rfc-editor.org/rfc/rfc1123.html#section-2.1). - * - * **NOTE**: The 'hostname' format changed in draft-07. Use {@link isAsciiIdn} for - * draft-07 and later. - * - * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) - */ -export const isHostname: (hostname: string) => boolean; - -/** - * The 'hostname' format since draft-07. Validates that a string represents an - * IDNA2008 internationalized domain name consiting of only A-labels and NR-LDH - * labels as defined by [RFC 5890, section 2.3.2.1](https://www.rfc-editor.org/rfc/rfc5890.html#section-2.3.2.3). - * - * **NOTE**: The 'hostname' format changed in draft-07. Use {@link isHostname} - * for draft-06 and earlier. - * - * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) - */ -export const isAsciiIdn: (hostname: string) => boolean; - -/** - * The 'idn-hostname' format. Validates that a string represents an IDNA2008 - * internationalized domain name as defined by [RFC 5890, section 2.3.2.1](https://www.rfc-editor.org/rfc/rfc5890.html#section-2.3.2.1). - * - * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) - */ -export const isIdn: (hostname: string) => boolean; - -/** - * The 'ipv4' format. Validates that a string represents an IPv4 address - * according to the "dotted-quad" ABNF syntax as defined in - * [RFC 2673, section 3.2](https://www.rfc-editor.org/rfc/rfc2673.html#section-3.2). - * - * @see [JSON Schema Core, section 7.3.4](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.4) - */ -export const isIPv4: (ip: string) => boolean; - -/** - * The 'ipv6' format. Validates that a string represents an IPv6 address as - * defined in [RFC 4291, section 2.2](https://www.rfc-editor.org/rfc/rfc4291.html#section-2.2). - * - * @see [JSON Schema Core, section 7.3.4](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.4) - */ -export const isIPv6: (ip: string) => boolean; - -/** - * The 'uri' format. Validates that a string represents a URI as defined by [RFC - * 3986](https://www.rfc-editor.org/rfc/rfc3986.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isUri: (uri: string) => boolean; - -/** - * The 'uri-reference' format. Validates that a string represents a URI - * Reference as defined by [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isUriReference: (uri: string) => boolean; - -/** - * The 'iri' format. Validates that a string represents an IRI as defined by - * [RFC 3987](https://www.rfc-editor.org/rfc/rfc3987.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isIri: (iri: string) => boolean; - -/** - * The 'iri-reference' format. Validates that a string represents an IRI - * Reference as defined by [RFC 3987](https://www.rfc-editor.org/rfc/rfc3987.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isIriReference: (iri: string) => boolean; - -/** - * The 'uuid' format. Validates that a string represents a UUID address as - * defined by [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isUuid: (uuid: string) => boolean; - -/** - * The 'uri-template' format. Validates that a string represents a URI Template - * as defined by [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html). - * - * @see [JSON Schema Core, section 7.3.6](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.6) - */ -export const isUriTemplate: (uriTemplate: string) => boolean; - -/** - * The 'json-pointer' format. Validates that a string represents a JSON Pointer - * as defined by [RFC 6901](https://www.rfc-editor.org/rfc/rfc6901.html). - * - * @see [JSON Schema Core, section 7.3.7](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.7) - */ -export const isJsonPointer: (pointer: string) => boolean; - -/** - * The 'relative-json-pointer' format. Validates that a string represents an IRI - * Reference as defined by [draft-bhutton-relative-json-pointer-00](https://datatracker.ietf.org/doc/html/draft-bhutton-relative-json-pointer-00). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isRelativeJsonPointer: (pointer: string) => boolean; - -/** - * The 'regex' format. Validates that a string represents a regular expression - * as defined by [ECMA-262](https://262.ecma-international.org/5.1/). - * - * @see [JSON Schema Core, section 7.3.8](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.8) - */ -export const isRegex: (regex: string) => boolean; diff --git a/node_modules/@hyperjump/json-schema-formats/src/index.js b/node_modules/@hyperjump/json-schema-formats/src/index.js deleted file mode 100644 index 7c81b5be..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @module - */ - -// JSON Schema Validation - Dates, Times, and Duration -export { isDate, isTime, isDateTime, isDuration } from "./rfc3339.js"; - -// JSON Schema Validation - Email Addresses -export { isEmail } from "./rfc5321.js"; -export { isIdnEmail } from "./rfc6531.js"; - -// JSON Schema Validation - Hostnames -export { isHostname } from "./rfc1123.js"; -export { isAsciiIdn, isIdn } from "./uts46.js"; - -// JSON Schema Validation - IP Addresses -export { isIPv4 } from "./rfc2673.js"; -export { isIPv6 } from "./rfc4291.js"; - -// JSON Schema Validation - Resource Identifiers -export { isUri, isUriReference } from "./rfc3986.js"; -export { isIri, isIriReference } from "./rfc3987.js"; -export { isUuid } from "./rfc4122.js"; - -// JSON Schema Validation - URI Template -export { isUriTemplate } from "./rfc6570.js"; - -// JSON Schema Validation - JSON Pointers -export { isJsonPointer } from "./rfc6901.js"; -export { isRelativeJsonPointer } from "./draft-bhutton-relative-json-pointer-00.js"; - -// JSON Schema Validation - Regular Expressions -export { isRegex } from "./ecma262.js"; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js b/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js deleted file mode 100644 index 6f605adf..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const label = `(?!-)[A-Za-z0-9-]{1,63}(? { - return domainPattern.test(hostname) && hostname.length < 256; -}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js b/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js deleted file mode 100644 index 02179fce..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; -const ipV4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; - -/** - * @type API.isIPv4 - * @function - */ -export const isIPv4 = RegExp.prototype.test.bind(new RegExp(`^${ipV4Address}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js deleted file mode 100644 index 33175991..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js +++ /dev/null @@ -1,78 +0,0 @@ -import { daysInMonth, hasLeapSecond } from "./date-math.js"; - -/** - * @import * as API from "./index.d.ts" - */ - -const dateFullyear = `\\d{4}`; -const dateMonth = `(?:0[1-9]|1[0-2])`; // 01-12 -const dateMday = `(?:0[1-9]|[12][0-9]|3[01])`; // 01-28, 01-29, 01-30, 01-31 based on month/year -const fullDate = `(?${dateFullyear})-(?${dateMonth})-(?${dateMday})`; - -const datePattern = new RegExp(`^${fullDate}$`); - -/** @type API.isDate */ -export const isDate = (date) => { - const parsedDate = datePattern.exec(date)?.groups; - if (!parsedDate) { - return false; - } - - const day = Number.parseInt(parsedDate.day, 10); - const year = Number.parseInt(parsedDate.year, 10); - - return day <= daysInMonth(parsedDate.month, year); -}; - -const timeHour = `(?:[01]\\d|2[0-3])`; // 00-23 -const timeMinute = `[0-5]\\d`; // 00-59 -const timeSecond = `[0-5]\\d`; // 00-59 -const timeSecondAllowLeapSeconds = `(?[0-5]\\d|60)`; // 00-58, 00-59, 00-60 based on leap second rules -const timeSecfrac = `\\.\\d+`; -const timeNumoffset = `[+-]${timeHour}:${timeMinute}`; -const timeOffset = `(?:[zZ]|${timeNumoffset})`; -const partialTime = `${timeHour}:${timeMinute}:${timeSecond}(?:${timeSecfrac})?`; -const fullTime = `${partialTime}${timeOffset}`; - -/** - * @type API.isTime - * @function - */ -export const isTime = RegExp.prototype.test.bind(new RegExp(`^${fullTime}$`)); - -const timePattern = new RegExp(`^${timeHour}:${timeMinute}:${timeSecondAllowLeapSeconds}(?:${timeSecfrac})?${timeOffset}$`); - -/** @type (time: string) => { seconds: string } | undefined */ -const parseTime = (time) => { - return /** @type {{ seconds: string } | undefined} */ (timePattern.exec(time)?.groups); -}; - -/** @type API.isDateTime */ -export const isDateTime = (dateTime) => { - const date = dateTime.substring(0, 10); - const t = dateTime[10]; - const time = dateTime.substring(11); - const seconds = parseTime(time)?.seconds; - - return isDate(date) - && /^t$/i.test(t) - && !!seconds - && (seconds !== "60" || hasLeapSecond(new Date(`${date}T${time.replace("60", "59")}`))); -}; - -const durSecond = `\\d+S`; -const durMinute = `\\d+M(?:${durSecond})?`; -const durHour = `\\d+H(?:${durMinute})?`; -const durTime = `T(?:${durHour}|${durMinute}|${durSecond})`; -const durDay = `\\d+D`; -const durWeek = `\\d+W`; -const durMonth = `\\d+M(?:${durDay})?`; -const durYear = `\\d+Y(?:${durMonth})?`; -const durDate = `(?:${durDay}|${durMonth}|${durYear})(?:${durTime})?`; -const duration = `P(?:${durDate}|${durTime}|${durWeek})`; - -/** - * @type API.isDuration - * @function - */ -export const isDuration = RegExp.prototype.test.bind(new RegExp(`^${duration}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js deleted file mode 100644 index 400e0b28..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as Hyperjump from "@hyperjump/uri"; - -/** - * @import * as API from "./index.d.ts" - */ - -/** - * @type API.isUri - * @function - */ -export const isUri = Hyperjump.isUri; - -/** - * @type API.isUriReference - * @function - */ -export const isUriReference = Hyperjump.isUriReference; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js deleted file mode 100644 index c804e103..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as Hyperjump from "@hyperjump/uri"; - -/** - * @import * as API from "./index.d.ts" - */ - -/** - * @type API.isIri - * @function - */ -export const isIri = Hyperjump.isIri; - -/** - * @type API.isIriReference - * @function - */ -export const isIriReference = Hyperjump.isIriReference; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js b/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js deleted file mode 100644 index 5737edda..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const hexDigit = `[0-9a-fA-F]`; -const hexOctet = `(?:${hexDigit}{2})`; -const timeLow = `${hexOctet}{4}`; -const timeMid = `${hexOctet}{2}`; -const timeHighAndVersion = `${hexOctet}{2}`; -const clockSeqAndReserved = hexOctet; -const clockSeqLow = hexOctet; -const node = `${hexOctet}{6}`; - -const uuid = `${timeLow}\\-${timeMid}\\-${timeHighAndVersion}\\-${clockSeqAndReserved}${clockSeqLow}\\-${node}`; - -/** - * @type API.isUuid - * @function - */ -export const isUuid = RegExp.prototype.test.bind(new RegExp(`^${uuid}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js b/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js deleted file mode 100644 index 6fbd83ef..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const hexdig = `[a-fA-F0-9]`; - -const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; -const ipV4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; - -const h16 = `${hexdig}{1,4}`; -const ls32 = `(?:${h16}:${h16}|${ipV4Address})`; -const ipV6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; - -/** - * @type API.isIPv6 - * @function - */ -export const isIPv6 = RegExp.prototype.test.bind(new RegExp(`^${ipV6Address}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js b/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js deleted file mode 100644 index c7049993..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const alpha = `[a-zA-Z]`; -const hexdig = `[\\da-fA-F]`; - -// Printable US-ASCII characters not including specials. -const atext = `[\\w!#$%&'*+\\-/=?^\`{|}~]`; -const atom = `${atext}+`; -const dotString = `${atom}(?:\\.${atom})*`; - -// Any ASCII graphic or space without blackslash-quoting except double-quote and the backslash itself. -const qtextSMTP = `[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]`; -// backslash followed by any ASCII graphic or space -const quotedPairSMTP = `\\\\[\\x20-\\x7E]`; -const qcontentSMTP = `(?:${qtextSMTP}|${quotedPairSMTP})`; -const quotedString = `"${qcontentSMTP}*"`; - -const localPart = `(?:${dotString}|${quotedString})`; // MAY be case-sensitive - -const letDig = `(?:${alpha}|\\d)`; -const ldhStr = `(?:${letDig}|-)*${letDig}`; -const subDomain = `${letDig}${ldhStr}?`; -const domain = `${subDomain}(?:\\.${subDomain})*`; - -const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; -const ipv4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; - -const h16 = `${hexdig}{1,4}`; -const ls32 = `(?:${h16}:${h16}|${ipv4Address})`; -const ipv6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; -const ipv6AddressLiteral = `IPv6:${ipv6Address}`; - -const dcontent = `[\\x21-\\x5A\\x5E-\\x7E]`; // Printable US-ASCII excluding "[", "\", "]" -const generalAddressLiteral = `${ldhStr}:${dcontent}+`; - -const addressLiteral = `\\[(?:${ipv4Address}|${ipv6AddressLiteral}|${generalAddressLiteral})]`; - -const mailbox = `${localPart}@(?:${domain}|${addressLiteral})`; - -/** - * @type API.isEmail - * @function - */ -export const isEmail = RegExp.prototype.test.bind(new RegExp(`^${mailbox}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js deleted file mode 100644 index 281bd7f2..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js +++ /dev/null @@ -1,55 +0,0 @@ -import { isIdn } from "./uts46.js"; - -/** - * @import * as API from "./index.d.ts" - */ - -const ucschar = `[\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}]`; - -const alpha = `[a-zA-Z]`; -const hexdig = `[\\da-fA-F]`; - -// Printable US-ASCII characters not including specials. -const atext = `(?:[\\w!#$%&'*+\\-/=?^\`{|}~]|${ucschar})`; -const atom = `${atext}+`; -const dotString = `${atom}(?:\\.${atom})*`; - -// Any ASCII graphic or space without blackslash-quoting except double-quote and the backslash itself. -const qtextSMTP = `(?:[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]|${ucschar})`; -// backslash followed by any ASCII graphic or space -const quotedPairSMTP = `\\\\[\\x20-\\x7E]`; -const qcontentSMTP = `(?:${qtextSMTP}|${quotedPairSMTP})`; -const quotedString = `"${qcontentSMTP}*"`; - -const localPart = `(?:${dotString}|${quotedString})`; // MAY be case-sensitive - -const letDig = `(?:${alpha}|\\d)`; -const ldhStr = `(?:${letDig}|-)*${letDig}`; -const letDigUcs = `(?:${alpha}|\\d|${ucschar})`; -const ldhStrUcs = `(?:${letDigUcs}|-)*${letDigUcs}`; -const subDomain = `${letDigUcs}${ldhStrUcs}?`; -const domain = `${subDomain}(?:\\.${subDomain})*`; - -const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; -const ipv4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; - -const h16 = `${hexdig}{1,4}`; -const ls32 = `(?:${h16}:${h16}|${ipv4Address})`; -const ipv6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; -const ipv6AddressLiteral = `IPv6:${ipv6Address}`; - -const dcontent = `[\\x21-\\x5A\\x5E-\\x7E]`; // Printable US-ASCII excluding "[", "\", "]" -const generalAddressLiteral = `${ldhStr}:${dcontent}+`; - -const addressLiteral = `\\[(?:${ipv4Address}|${ipv6AddressLiteral}|${generalAddressLiteral})\\]`; - -const mailbox = `(?${localPart})@(?:(?${addressLiteral})|(?${domain}))`; - -const mailboxPattern = new RegExp(`^${mailbox}$`, "u"); - -/** @type API.isIdnEmail */ -export const isIdnEmail = (email) => { - const parsedEmail = mailboxPattern.exec(email)?.groups; - - return !!parsedEmail && (!parsedEmail.domain || isIdn(parsedEmail.domain)); -}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js deleted file mode 100644 index e144a93e..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const alpha = `[a-zA-Z]`; -const hexdig = `[\\da-fA-F]`; -const pctEncoded = `%${hexdig}${hexdig}`; - -const ucschar = `[\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}]`; - -const iprivate = `[\\u{E000}-\\u{F8FF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}]`; - -const opLevel2 = `[+#]`; -const opLevel3 = `[./;?&]`; -const opReserve = `[=,!@|]`; -const operator = `(?:${opLevel2}|${opLevel3}${opReserve})`; - -const varchar = `(?:${alpha}|\\d|_|${pctEncoded})`; -const varname = `${varchar}(?:\\.?${varchar})*`; -const maxLength = `(?:[1-9]|\\d{0,3})`; // positive integer < 10000 -const prefix = `:${maxLength}`; -const explode = `\\*`; -const modifierLevel4 = `(?:${prefix}|${explode})`; -const varspec = `${varname}${modifierLevel4}?`; -const variableList = `${varspec}(?:,${varspec})*`; - -const expression = `\\{${operator}?${variableList}\\}`; - -// any Unicode character except: CTL, SP, DQUOTE, "%" (aside from pct-encoded), "<", ">", "\", "^", "`", "{", "|", "}" -const literals = `(?:[\\x21\\x23-\\x24\\x26-\\x3B\\x3D\\x3F-\\x5B\\x5D\\x5F\\x61-\\x7A\\x7E]|${ucschar}|${iprivate}|${pctEncoded})`; - -const uriTemplate = `(?:${literals}|${expression})*`; - -/** - * @type API.isUriTemplate - * @function - */ -export const isUriTemplate = RegExp.prototype.test.bind(new RegExp(`^${uriTemplate}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js deleted file mode 100644 index 727df339..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const unescaped = `[\\u{00}-\\u{2E}\\u{30}-\\u{7D}\\u{7F}-\\u{10FFFF}]`; // %x2F ('/') and %x7E ('~') are excluded from 'unescaped' -const escaped = `~[01]`; // representing '~' and '/', respectively -const referenceToken = `(?:${unescaped}|${escaped})*`; -const jsonPointer = `(?:/${referenceToken})*`; - -/** - * @type API.isJsonPointer - * @function - */ -export const isJsonPointer = RegExp.prototype.test.bind(new RegExp(`^${jsonPointer}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/uts46.js b/node_modules/@hyperjump/json-schema-formats/src/uts46.js deleted file mode 100644 index fee52257..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/uts46.js +++ /dev/null @@ -1,20 +0,0 @@ -import { isIdnHostname } from "idn-hostname"; -import { isHostname } from "./rfc1123.js"; - -/** - * @import * as API from "./index.d.ts" - */ - -/** @type API.isAsciiIdn */ -export const isAsciiIdn = (hostname) => { - return isHostname(hostname) && isIdn(hostname); -}; - -/** @type API.isIdn */ -export const isIdn = (hostname) => { - try { - return isIdnHostname(hostname); - } catch (_error) { - return false; - } -}; diff --git a/node_modules/@hyperjump/json-schema/LICENSE b/node_modules/@hyperjump/json-schema/LICENSE deleted file mode 100644 index b0718c34..00000000 --- a/node_modules/@hyperjump/json-schema/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/json-schema/README.md b/node_modules/@hyperjump/json-schema/README.md deleted file mode 100644 index 2a84a170..00000000 --- a/node_modules/@hyperjump/json-schema/README.md +++ /dev/null @@ -1,966 +0,0 @@ -# Hyperjump - JSON Schema - -A collection of modules for working with JSON Schemas. - -* Validate JSON-compatible values against a JSON Schemas - * Dialects: draft-2020-12, draft-2019-09, draft-07, draft-06, draft-04 - * Complete validation support for all formats defined for the `format` keyword - * Schemas can reference other schemas using a different dialect - * Work directly with schemas on the filesystem or HTTP -* OpenAPI - * Versions: 3.0, 3.1, 3.2 - * Validate an OpenAPI document - * Validate values against a schema from an OpenAPI document -* Create custom keywords, formats, vocabularies, and dialects -* Bundle multiple schemas into one document - * Uses the process defined in the 2020-12 specification but works with any - dialect. -* API for building non-validation JSON Schema tooling -* API for working with annotations - -## Install - -Includes support for node.js/bun.js (ES Modules, TypeScript) and browsers (works -with CSP -[`unsafe-eval`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_eval_expressions)). - -### Node.js - -```bash -npm install @hyperjump/json-schema -``` - -### TypeScript - -This package uses the package.json "exports" field. [TypeScript understands -"exports"](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing), -but you need to change a couple settings in your `tsconfig.json` for it to work. - -```jsonc - "module": "Node16", // or "NodeNext" - "moduleResolution": "Node16", // or "NodeNext" -``` - -### Versioning - -The API for this library is divided into two categories: Stable and -Experimental. The Stable API follows semantic versioning, but the Experimental -API may have backward-incompatible changes between minor versions. - -All experimental features are segregated into exports that include the word -"experimental" so you never accidentally depend on something that could change -or be removed in future releases. - -## Validation - -### Usage - -This library supports many versions of JSON Schema. Use the pattern -`@hyperjump/json-schema/*` to import the version you need. - -```javascript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -``` - -You can import support for additional versions as needed. - -```javascript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -import "@hyperjump/json-schema/draft-07"; -``` - -**Note**: The default export (`@hyperjump/json-schema`) is reserved for v1 of -JSON Schema that will hopefully be released in near future. - -**Validate schema from JavaScript** - -```javascript -registerSchema({ - $schema: "https://json-schema.org/draft/2020-12/schema", - type: "string" -}, "http://example.com/schemas/string"); - -const output = await validate("http://example.com/schemas/string", "foo"); -if (output.valid) { - console.log("Instance is valid :-)"); -} else { - console.log("Instance is invalid :-("); -} -``` - -**Compile schema** - -If you need to validate multiple instances against the same schema, you can -compile the schema into a reusable validation function. - -```javascript -const isString = await validate("http://example.com/schemas/string"); -const output1 = isString("foo"); -const output2 = isString(42); -``` - -**File-based and web-based schemas** - -Schemas that are available on the web can be loaded automatically without -needing to load them manually. - -```javascript -const output = await validate("http://example.com/schemas/string", "foo"); -``` - -When running on the server, you can also load schemas directly from the -filesystem. When fetching from the file system, there are limitations for -security reasons. You can only reference a schema identified by a file URI -scheme (**file**:///path/to/my/schemas) from another schema identified by a file -URI scheme. Also, a schema is not allowed to self-identify (`$id`) with a -`file:` URI scheme. - -```javascript -const output = await validate(`file://${__dirname}/string.schema.json`, "foo"); -``` - -If the schema URI is relative, the base URI in the browser is the browser -location and the base URI on the server is the current working directory. This -is the preferred way to work with file-based schemas on the server. - -```javascript -const output = await validate(`./string.schema.json`, "foo"); -``` - -You can add/modify/remove support for any URI scheme using the [plugin -system](https://github.com/hyperjump-io/browser/#uri-schemes) provided by -`@hyperjump/browser`. - -**Format** - -Format validation support needs to be explicitly loaded by importing -`@hyperjump/json-schema/formats`. Once loaded, it depends on the dialect whether -validation is enabled by default or not. You should explicitly enable/disable it -with the `setShouldValidateFormat` function. - -The `hostname`, `idn-hostname`, and `idn-email` validators are fairly large. If -you don't need support for those formats and bundle size is a concern, you can -use `@hyperjump/json-schema/formats-lite` instead to leave out support for those -formats. - -```javascript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -import { setShouldValidateFormat } from "@hyperjump/json-schema/formats"; - -const schemaUri = "https://example.com/number"; -registerSchema({ - "type": "string", - "format": "date" -}, schemaUri); - -setShouldValidateFormat(true); -const output = await validate(schemaUri, "Feb 29, 2031"); // { valid: false } -``` - -**OpenAPI** - -The OpenAPI 3.0 and 3.1 and 3.2 meta-schemas are pre-loaded and the OpenAPI JSON -Schema dialects for each of those versions is supported. A document with a -Content-Type of `application/openapi+json` (web) or a file extension of -`openapi.json` (filesystem) is understood as an OpenAPI document. - -Use the pattern `@hyperjump/json-schema/*` to import the version you need. The -available versions are `openapi-3-0` for 3.0, `openapi-3-1` for 3.1, and -`openapi-3-2` for 3.2. - -```javascript -import { validate } from "@hyperjump/json-schema/openapi-3-2"; - - -// Validate an OpenAPI 3.2 document -const output = await validate("https://spec.openapis.org/oas/3.2/schema-base", openapi); - -// Validate an instance against a schema in an OpenAPI 3.2 document -const output = await validate("./example.openapi.json#/components/schemas/foo", 42); -``` - -YAML support isn't built in, but you can add it by writing a -[MediaTypePlugin](https://github.com/hyperjump-io/browser/#media-types). You can -use the one at `lib/openapi.js` as an example and replace the JSON parts with -YAML. - -**Media types** - -This library uses media types to determine how to parse a retrieved document. It -will never assume the retrieved document is a schema. By default it's configured -to accept documents with a `application/schema+json` Content-Type header (web) -or a `.schema.json` file extension (filesystem). - -You can add/modify/remove support for any media-type using the [plugin -system](https://github.com/hyperjump-io/browser/#media-types) provided by -`@hyperjump/browser`. The following example shows how to add support for JSON -Schemas written in YAML. - -```javascript -import YAML from "yaml"; -import contentTypeParser from "content-type"; -import { addMediaTypePlugin } from "@hyperjump/browser"; -import { buildSchemaDocument } from "@hyperjump/json-schema/experimental"; - - -addMediaTypePlugin("application/schema+yaml", { - parse: async (response) => { - const contentType = contentTypeParser.parse(response.headers.get("content-type") ?? ""); - const contextDialectId = contentType.parameters.schema ?? contentType.parameters.profile; - - const foo = YAML.parse(await response.text()); - return buildSchemaDocument(foo, response.url, contextDialectId); - }, - fileMatcher: (path) => path.endsWith(".schema.yml") -}); -``` - -### API - -These are available from any of the exports that refer to a version of JSON -Schema, such as `@hyperjump/json-schema/draft-2020-12`. - -* **registerSchema**: (schema: object, retrievalUri?: string, defaultDialectId?: string) => void - - Add a schema the local schema registry. When this schema is needed, it will - be loaded from the register rather than the filesystem or network. If a - schema with the same identifier is already registered, an exception will be - throw. -* **unregisterSchema**: (uri: string) => void - - Remove a schema from the local schema registry. -* **getAllRegisteredSchemaUris**: () => string[] - - This function returns the URIs of all registered schemas -* **hasSchema**: (uri: string) => boolean - - Check if a schema with the given URI is already registered. -* _(deprecated)_ **addSchema**: (schema: object, retrievalUri?: string, defaultDialectId?: string) => void - - Load a schema manually rather than fetching it from the filesystem or over - the network. Any schema already registered with the same identifier will be - replaced with no warning. -* **validate**: (schemaURI: string, instance: any, outputFormat: ValidationOptions | OutputFormat = FLAG) => Promise\ - - Validate an instance against a schema. This function is curried to allow - compiling the schema once and applying it to multiple instances. -* **validate**: (schemaURI: string) => Promise\<(instance: any, outputFormat: ValidationOptions | OutputFormat = FLAG) => OutputUnit> - - Compiling a schema to a validation function. -* **FLAG**: "FLAG" - - An identifier for the `FLAG` output format as defined by the 2019-09 and - 2020-12 specifications. -* **InvalidSchemaError**: Error & { output: OutputUnit } - - This error is thrown if the schema being compiled is found to be invalid. - The `output` field contains an `OutputUnit` with information about the - error. You can use the `setMetaSchemaOutputFormat` configuration to set the - output format that is returned in `output`. -* **setMetaSchemaOutputFormat**: (outputFormat: OutputFormat) => void - - Set the output format used for validating schemas. -* **getMetaSchemaOutputFormat**: () => OutputFormat - - Get the output format used for validating schemas. -* **setShouldMetaValidate**: (isEnabled: boolean) => void - - Enable or disable validating schemas. -* **getShouldMetaValidate**: (isEnabled: boolean) => void - - Determine if validating schemas is enabled. - -**Type Definitions** - -The following types are used in the above definitions - -* **OutputFormat**: **FLAG** - - Only the `FLAG` output format is part of the Stable API. Additional [output - formats](#output-formats) are included as part of the Experimental API. -* **OutputUnit**: { valid: boolean } - - Output is an experimental feature of the JSON Schema specification. There - may be additional fields present in the OutputUnit, but only the `valid` - property should be considered part of the Stable API. -* **ValidationOptions**: - - * outputFormat?: OutputFormat - * plugins?: EvaluationPlugin[] - -## Bundling - -### Usage - -You can bundle schemas with external references into a single deliverable using -the official JSON Schema bundling process introduced in the 2020-12 -specification. Given a schema with external references, any external schemas -will be embedded in the schema resulting in a Compound Schema Document with all -the schemas necessary to evaluate the given schema in a single JSON document. - -The bundling process allows schemas to be embedded without needing to modify any -references which means you get the same output details whether you validate the -bundle or the original unbundled schemas. - -```javascript -import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; -import { bundle } from "@hyperjump/json-schema/bundle"; - - -registerSchema({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "type": "object", - "properties": { - "foo": { "$ref": "/string" } - } -}, "https://example.com/main"); - -registerSchema({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "type": "string" -}, "https://example.com/string"); - -const bundledSchema = await bundle("https://example.com/main"); // { -// "$schema": "https://json-schema.org/draft/2020-12/schema", -// -// "type": "object", -// "properties": { -// "foo": { "$ref": "/string" } -// }, -// -// "$defs": { -// "string": { -// "$id": "https://example.com/string", -// "type": "string" -// } -// } -// } -``` - -### API - -These are available from the `@hyperjump/json-schema/bundle` export. - -* **bundle**: (uri: string, options: Options) => Promise\ - - Create a bundled schema starting with the given schema. External schemas - will be fetched from the filesystem, the network, or the local schema - registry as needed. - - Options: - * alwaysIncludeDialect: boolean (default: false) -- Include dialect even - when it isn't strictly needed - * definitionNamingStrategy: "uri" | "uuid" (default: "uri") -- By default - the name used in definitions for embedded schemas will match the - identifier of the embedded schema. Alternatively, you can use a UUID - instead of the schema's URI. - * externalSchemas: string[] (default: []) -- A list of schemas URIs that - are available externally and should not be included in the bundle. - -## Experimental - -### Output Formats - -**Change the validation output format** - -The `FLAG` output format isn't very informative. You can change the output -format used for validation to get more information about failures. The official -output format is still evolving, so these may change or be replaced in the -future. This implementation currently supports the BASIC and DETAILED output -formats. - -```javascript -import { BASIC } from "@hyperjump/json-schema/experimental"; - - -const output = await validate("https://example.com/schema1", 42, BASIC); -``` - -**Change the schema validation output format** - -The output format used for validating schemas can be changed as well. - -```javascript -import { validate, setMetaSchemaOutputFormat } from "@hyperjump/json-schema/draft-2020-12"; -import { BASIC } from "@hyperjump/json-schema/experimental"; - - -setMetaSchemaOutputFormat(BASIC); -try { - const output = await validate("https://example.com/invalid-schema"); -} catch (error) { - console.log(error.output); -} -``` - -### Custom Keywords, Vocabularies, and Dialects - -In order to create and use a custom keyword, you need to define your keyword's -behavior, create a vocabulary that includes that keyword, and then create a -dialect that includes your vocabulary. - -Schemas are represented using the -[`@hyperjump/browser`](https://github.com/hyperjump-io/browser) package. You'll -use that API to traverse schemas. `@hyperjump/browser` uses async generators to -iterate over arrays and objects. If you like using higher order functions like -`map`/`filter`/`reduce`, see -[`@hyperjump/pact`](https://github.com/hyperjump-io/pact) for utilities for -working with generators and async generators. - -```javascript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -import { addKeyword, defineVocabulary, Validation } from "@hyperjump/json-schema/experimental"; -import * as Browser from "@hyperjump/browser"; - - -// Define a keyword that's an array of schemas that are applied sequentially -// using implication: A -> B -> C -> D -addKeyword({ - id: "https://example.com/keyword/implication", - - compile: async (schema, ast) => { - const subSchemas = []; - for await (const subSchema of Browser.iter(schema)) { - subSchemas.push(Validation.compile(subSchema, ast)); - } - return subSchemas; - - // Alternative using @hyperjump/pact - // return pipe( - // Browser.iter(schema), - // asyncMap((subSchema) => Validation.compile(subSchema, ast)), - // asyncCollectArray - // ); - }, - - interpret: (implies, instance, context) => { - return implies.reduce((valid, schema) => { - return !valid || Validation.interpret(schema, instance, context); - }, true); - } -}); - -// Create a vocabulary with this keyword and call it "implies" -defineVocabulary("https://example.com/vocab/logic", { - "implies": "https://example.com/keyword/implication" -}); - -// Create a vocabulary schema for this vocabulary -registerSchema({ - "$id": "https://example.com/meta/logic", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$dynamicAnchor": "meta", - "properties": { - "implies": { - "type": "array", - "items": { "$dynamicRef": "meta" }, - "minItems": 2 - } - } -}); - -// Create a dialect schema adding this vocabulary to the standard JSON Schema -// vocabularies -registerSchema({ - "$id": "https://example.com/dialect/logic", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true - "https://example.com/vocab/logic": true - }, - - "$dynamicAnchor": "meta", - - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "/meta/logic" } - ] -}); - -// Use your dialect to validate a JSON instance -registerSchema({ - "$schema": "https://example.com/dialect/logic", - - "type": "number", - "implies": [ - { "minimum": 10 }, - { "multipleOf": 2 } - ] -}, "https://example.com/schema1"); -const output = await validate("https://example.com/schema1", 42); -``` - -### Custom Formats - -Custom formats work similarly to keywords. You define a format handler and then -associate that format handler with the format keyword that applies to the -dialects you're targeting. - -```JavaScript -import { registerSchema, validate, setShouldValidateFormat } from "@hyperjump/json-schema/draft-2020-12"; -import { addFormat, setFormatHandler } from "@hyperjump/json-schema/experimental"; - -const isoDateFormatUri = "https://example.com/format/iso-8601-date"; - -// Add the iso-date format handler -addFormat({ - id: isoDateFormatUri, - handler: (date) => new Date(date).toISOString() === date -}); - -// Add the "iso-date" format to the 2020-12 version of `format` -setFormatHandler("https://json-schema.org/keyword/draft-2020-12/format", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-2020-12/format-assertion", "iso-date", isoDateFormatUri); - -// Optional: Add the "iso-date" format to other dialects -setFormatHandler("https://json-schema.org/keyword/draft-2019-09/format", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-2019-09/format-assertion", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-07/format", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-06/format", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-04/format", "iso-date", isoDateFormatUri); - -const schemaUri = "https://example.com/main"; -registerSchema({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "type": "string", - "format": "iso-date" -}, schemaUri); - -setShouldValidateFormat(true); -const output = await validate(schemaUri, "Feb 28, 2031"); // { valid: false } -``` - -### Custom Meta Schema - -You can use a custom meta-schema to restrict users to a subset of JSON Schema -functionality. This example requires that no unknown keywords are used in the -schema. - -```javascript -registerSchema({ - "$id": "https://example.com/meta-schema1", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - - "$dynamicAnchor": "meta", - - "$ref": "https://json-schema.org/draft/2020-12/schema", - "unevaluatedProperties": false -}); - -registerSchema({ - $schema: "https://example.com/meta-schema1", - type: "number", - foo: 42 -}, "https://example.com/schema1"); - -const output = await validate("https://example.com/schema1", 42); // Expect InvalidSchemaError -``` - -### EvaluationPlugins - -EvaluationPlugins allow you to hook into the validation process for various -purposes. There are hooks for before an after schema evaluation and before and -after keyword evaluation. (See the API section for the full interface) The -following is a simple example to record all the schema locations that were -evaluated. This could be used as part of a solution for determining test -coverage for a schema. - -```JavaScript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -import { BASIC } from "@hyperjump/json-schema/experimental.js"; - -class EvaluatedKeywordsPlugin { - constructor() { - this.schemaLocations = new Set(); - } - - beforeKeyword([, schemaUri]) { - this.schemaLocations.add(schemaUri); - } -} - -registerSchema({ - $schema: "https://json-schema.org/draft/2020-12/schema", - type: "object", - properties: { - foo: { type: "number" }, - bar: { type: "boolean" } - }, - required: ["foo"] -}, "https://schemas.hyperjump.io/main"); - -const evaluatedKeywordPlugin = new EvaluatedKeywordsPlugin(); - -await validate("https://schemas.hyperjump.io/main", { foo: 42 }, { - outputFormat: BASIC, - plugins: [evaluatedKeywordPlugin] -}); - -console.log(evaluatedKeywordPlugin.schemaLocations); -// Set(4) { -// 'https://schemas.hyperjump.io/main#/type', -// 'https://schemas.hyperjump.io/main#/properties', -// 'https://schemas.hyperjump.io/main#/properties/foo/type', -// 'https://schemas.hyperjump.io/main#/required' -// } - -// NOTE: #/properties/bar is not in the list because the instance doesn't include that property. -``` - -### API - -These are available from the `@hyperjump/json-schema/experimental` export. - -* **addKeyword**: (keywordHandler: Keyword) => void - - Define a keyword for use in a vocabulary. - - * **Keyword**: object - * id: string - - A URI that uniquely identifies the keyword. It should use a domain you - own to avoid conflict with keywords defined by others. - * compile: (schema: Browser, ast: AST, parentSchema: Browser) => Promise\ - - This function takes the keyword value, does whatever preprocessing it - can on it without an instance, and returns the result. The returned - value will be passed to the `interpret` function. The `ast` parameter - is needed for compiling sub-schemas. The `parentSchema` parameter is - primarily useful for looking up the value of an adjacent keyword that - might effect this one. - * interpret: (compiledKeywordValue: any, instance: JsonNode, context: ValidationContext) => boolean - - This function takes the value returned by the `compile` function and - the instance value that is being validated and returns whether the - value is valid or not. The other parameters are only needed for - validating sub-schemas. - * simpleApplicator?: boolean - - Some applicator keywords just apply schemas and don't do any - validation of its own. In these cases, it isn't helpful to include - them in BASIC output. This flag is used to trim those nodes from the - output. - * annotation?: (compiledKeywordValue: any) => any | undefined - - If the keyword is an annotation, it will need to implement this - function to return the annotation. - * plugin?: EvaluationPlugin - - If the keyword needs to track state during the evaluation process, you - can include an EvaluationPlugin that will get added only when this - keyword is present in the schema. - - * **ValidationContext**: object - * ast: AST - * plugins: EvaluationPlugins[] -* **addFormat**: (formatHandler: Format) => void - - Add a format handler. - - * **Format**: object - * id: string - - A URI that uniquely identifies the format. It should use a domain you - own to avoid conflict with keywords defined by others. - * handler: (value: any) => boolean - - A function that takes the value and returns a boolean determining if - it passes validation for the format. -* **setFormatHandler**: (keywordUri: string, formatName: string, formatUri: string) => void - - Add support for a format to the specified keyword. -* **removeFormatHandler**: (keywordUri, formatName) => void - - Remove support for a format from the specified keyword. -* **defineVocabulary**: (id: string, keywords: { [keyword: string]: string }) => void - - Define a vocabulary that maps keyword name to keyword URIs defined using - `addKeyword`. -* **getKeywordId**: (keywordName: string, dialectId: string) => string - - Get the identifier for a keyword by its name. -* **getKeyword**: (keywordId: string) => Keyword - - Get a keyword object by its URI. This is useful for building non-validation - tooling. -* **getKeywordByName**: (keywordName: string, dialectId: string) => Keyword - - Get a keyword object by its name. This is useful for building non-validation - tooling. -* **getKeywordName**: (dialectId: string, keywordId: string) => string - - Determine a keyword's name given its URI a dialect URI. This is useful when - defining a keyword that depends on the value of another keyword (such as how - `contains` depends on `minContains` and `maxContains`). -* **loadDialect**: (dialectId: string, dialect: { [vocabularyId: string] }, allowUnknownKeywords: boolean = false) => void - - Define a dialect. In most cases, dialects are loaded automatically from the - `$vocabulary` keyword in the meta-schema. The only time you would need to - load a dialect manually is if you're creating a distinct version of JSON - Schema rather than creating a dialect of an existing version of JSON Schema. -* **unloadDialect**: (dialectId: string) => void - - Remove a dialect. You shouldn't need to use this function. It's called for - you when you call `unregisterSchema`. -* **Validation**: Keyword - - A Keyword object that represents a "validate" operation. You would use this - for compiling and evaluating sub-schemas when defining a custom keyword. - -* **getSchema**: (uri: string, browser?: Browser) => Promise\ - - Get a schema by it's URI taking the local schema registry into account. -* **buildSchemaDocument**: (schema: SchemaObject | boolean, retrievalUri?: string, contextDialectId?: string) => SchemaDocument - - Build a SchemaDocument from a JSON-compatible value. You might use this if - you're creating a custom media type plugin, such as supporting JSON Schemas - in YAML. -* **canonicalUri**: (schema: Browser) => string - - Returns a URI for the schema. -* **toSchema**: (schema: Browser, options: ToSchemaOptions) => object - - Get a raw schema from a Schema Document. - - * **ToSchemaOptions**: object - - * contextDialectId: string (default: "") -- If the dialect of the schema - matches this value, the `$schema` keyword will be omitted. - * includeDialect: "auto" | "always" | "never" (default: "auto") -- If - "auto", `$schema` will only be included if it differs from - `contextDialectId`. - * contextUri: string (default: "") -- `$id`s will be relative to this - URI. - * includeEmbedded: boolean (default: true) -- If false, embedded schemas - will be unbundled from the schema. -* **compile**: (schema: Browser) => Promise\ - - Return a compiled schema. This is useful if you're creating tooling for - something other than validation. -* **interpret**: (schema: CompiledSchema, instance: JsonNode, outputFormat: OutputFormat = BASIC) => OutputUnit - - A curried function for validating an instance against a compiled schema. - This can be useful for creating custom output formats. - -* **OutputFormat**: **FLAG** | **BASIC** - - In addition to the `FLAG` output format in the Stable API, the Experimental - API includes support for the `BASIC` format as specified in the 2019-09 - specification (with some minor customizations). This implementation doesn't - include annotations or human readable error messages. The output can be - processed to create human readable error messages as needed. - -* **EvaluationPlugin**: object - * beforeSchema?(url: string, instance: JsonNode, context: Context): void - * beforeKeyword?(keywordNode: CompiledSchemaNode, instance: JsonNode, context: Context, schemaContext: Context, keyword: Keyword): void - * afterKeyword?(keywordNode: CompiledSchemaNode, instance: JsonNode, context: Context, valid: boolean, schemaContext: Context, keyword: Keyword): void - * afterSchema?(url: string, instance: JsonNode, context: Context, valid: boolean): void - -## Instance API (experimental) - -These functions are available from the -`@hyperjump/json-schema/instance/experimental` export. - -This library uses JsonNode objects to represent instances. You'll work with -these objects if you create a custom keyword. - -This API uses generators to iterate over arrays and objects. If you like using -higher order functions like `map`/`filter`/`reduce`, see -[`@hyperjump/pact`](https://github.com/hyperjump-io/pact) for utilities for -working with generators and async generators. - -* **fromJs**: (value: any, uri?: string) => JsonNode - - Construct a JsonNode from a JavaScript value. -* **cons**: (baseUri: string, pointer: string, value: any, type: string, children: JsonNode[], parent?: JsonNode) => JsonNode - - Construct a JsonNode. This is used internally. You probably want `fromJs` - instead. -* **get**: (url: string, instance: JsonNode) => JsonNode - - Apply a same-resource reference to a JsonNode. -* **uri**: (instance: JsonNode) => string - - Returns a URI for the value the JsonNode represents. -* **value**: (instance: JsonNode) => any - - Returns the value the JsonNode represents. -* **has**: (key: string, instance: JsonNode) => boolean - - Returns whether or not "key" is a property name in a JsonNode that - represents an object. -* **typeOf**: (instance: JsonNode) => string - - The JSON type of the JsonNode. In addition to the standard JSON types, - there's also the `property` type that indicates a property name/value pair - in an object. -* **step**: (key: string, instance: JsonNode) => JsonType - - Similar to indexing into a object or array using the `[]` operator. -* **iter**: (instance: JsonNode) => Generator\ - - Iterate over the items in the array that the JsonNode represents. -* **entries**: (instance: JsonNode) => Generator\<[JsonNode, JsonNode]> - - Similar to `Object.entries`, but yields JsonNodes for keys and values. -* **values**: (instance: JsonNode) => Generator\ - - Similar to `Object.values`, but yields JsonNodes for values. -* **keys**: (instance: JsonNode) => Generator\ - - Similar to `Object.keys`, but yields JsonNodes for keys. -* **length**: (instance: JsonNode) => number - - Similar to `Array.prototype.length`. - -## Annotations (experimental) -JSON Schema is for annotating JSON instances as well as validating them. This -module provides utilities for working with JSON documents annotated with JSON -Schema. - -### Usage -An annotated JSON document is represented as a -(JsonNode)[#instance-api-experimental] AST. You can use this AST to traverse -the data structure and get annotations for the values it represents. - -```javascript -import { registerSchema } from "@hyperjump/json-schema/draft/2020-12"; -import { annotate } from "@hyperjump/json-schema/annotations/experimental"; -import * as AnnotatedInstance from "@hyperjump/json-schema/annotated-instance/experimental"; - - -const schemaId = "https://example.com/foo"; -const dialectId = "https://json-schema.org/draft/2020-12/schema"; - -registerSchema({ - "$schema": dialectId, - - "title": "Person", - "unknown": "foo", - - "type": "object", - "properties": { - "name": { - "$ref": "#/$defs/name", - "deprecated": true - }, - "givenName": { - "$ref": "#/$defs/name", - "title": "Given Name" - }, - "familyName": { - "$ref": "#/$defs/name", - "title": "Family Name" - } - }, - - "$defs": { - "name": { - "type": "string", - "title": "Name" - } - } -}, schemaId); - -const instance = await annotate(schemaId, { - name: "Jason Desrosiers", - givenName: "Jason", - familyName: "Desrosiers" -}); - -// Get the title of the instance -const titles = AnnotatedInstance.annotation(instance, "title", dialectId); // => ["Person"] - -// Unknown keywords are collected as annotations -const unknowns = AnnotatedInstance.annotation(instance, "unknown", dialectId); // => ["foo"] - -// The type keyword doesn't produce annotations -const types = AnnotatedInstance.annotation(instance, "type", dialectId); // => [] - -// Get the title of each of the properties in the object -for (const [propertyNameNode, propertyInstance] of AnnotatedInstance.entries(instance)) { - const propertyName = AnnotatedInstance.value(propertyName); - console.log(propertyName, AnnotatedInstance.annotation(propertyInstance, "title", dialectId)); -} - -// List all locations in the instance that are deprecated -for (const deprecated of AnnotatedInstance.annotatedWith(instance, "deprecated", dialectId)) { - if (AnnotatedInstance.annotation(deprecated, "deprecated", dialectId)[0]) { - logger.warn(`The value at '${deprecated.pointer}' has been deprecated.`); // => (Example) "WARN: The value at '/name' has been deprecated." - } -} -``` - -### API -These are available from the `@hyperjump/json-schema/annotations/experimental` -export. - -* **annotate**: (schemaUri: string, instance: any, outputFormat: OutputFormat = BASIC) => Promise\ - - Annotate an instance using the given schema. The function is curried to - allow compiling the schema once and applying it to multiple instances. This - may throw an [InvalidSchemaError](#api) if there is a problem with the - schema or a ValidationError if the instance doesn't validate against the - schema. -* **interpret**: (compiledSchema: CompiledSchema, instance: JsonNode, outputFormat: OutputFormat = BASIC) => JsonNode - - Annotate a JsonNode object rather than a plain JavaScript value. This might - be useful when building tools on top of the annotation functionality, but - you probably don't need it. -* **ValidationError**: Error & { output: OutputUnit } - The `output` field contains an `OutputUnit` with information about the - error. - -## AnnotatedInstance API (experimental) -These are available from the -`@hyperjump/json-schema/annotated-instance/experimental` export. The -following functions are available in addition to the functions available in the -[Instance API](#instance-api-experimental). - -* **annotation**: (instance: JsonNode, keyword: string, dialect?: string): any[]; - - Get the annotations for a keyword for the value represented by the JsonNode. -* **annotatedWith**: (instance: JsonNode, keyword: string, dialect?: string): Generator; - - Get all JsonNodes that are annotated with the given keyword. -* **setAnnotation**: (instance: JsonNode, keywordId: string, value: any) => JsonNode - - Add an annotation to an instance. This is used internally, you probably - don't need it. - -## Contributing - -### Tests - -Run the tests - -```bash -npm test -``` - -Run the tests with a continuous test runner - -```bash -npm test -- --watch -``` diff --git a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts deleted file mode 100644 index 206df4f9..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const annotation: (instance: JsonNode, keyword: string, dialectUri?: string) => A[]; -export const annotatedWith: (instance: A, keyword: string, dialectUri?: string) => Generator; - -export * from "../lib/instance.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js deleted file mode 100644 index 47b4c092..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as Instance from "../lib/instance.js"; -import { getKeywordId } from "../lib/keywords.js"; - - -const defaultDialectId = "https://json-schema.org/v1"; - -export const annotation = (node, keyword, dialect = defaultDialectId) => { - const keywordUri = getKeywordId(keyword, dialect); - return node.annotations[keywordUri] ?? []; -}; - -export const annotatedWith = function* (instance, keyword, dialectId = defaultDialectId) { - for (const node of Instance.allNodes(instance)) { - if (annotation(node, keyword, dialectId).length > 0) { - yield node; - } - } -}; - -export * from "../lib/instance.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/index.d.ts b/node_modules/@hyperjump/json-schema/annotations/index.d.ts deleted file mode 100644 index 75de9ce8..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OutputFormat, Output, ValidationOptions } from "../lib/index.js"; -import type { CompiledSchema } from "../lib/experimental.js"; -import type { JsonNode } from "../lib/instance.js"; -import type { Json } from "@hyperjump/json-pointer"; - - -export const annotate: ( - (schemaUrl: string, value: Json, options?: OutputFormat | ValidationOptions) => Promise -) & ( - (schemaUrl: string) => Promise -); - -export type Annotator = (value: Json, options?: OutputFormat | ValidationOptions) => JsonNode; - -export const interpret: (compiledSchema: CompiledSchema, value: JsonNode, options?: OutputFormat | ValidationOptions) => JsonNode; - -export class ValidationError extends Error { - public output: Output & { valid: false }; - - public constructor(output: Output); -} diff --git a/node_modules/@hyperjump/json-schema/annotations/index.js b/node_modules/@hyperjump/json-schema/annotations/index.js deleted file mode 100644 index 82c3d7fd..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/index.js +++ /dev/null @@ -1,45 +0,0 @@ -import { ValidationError } from "./validation-error.js"; -import { - getSchema, - compile, - interpret as validate, - BASIC, - AnnotationsPlugin -} from "../lib/experimental.js"; -import * as Instance from "../lib/instance.js"; - - -export const annotate = async (schemaUri, json = undefined, options = undefined) => { - const schema = await getSchema(schemaUri); - const compiled = await compile(schema); - const interpretAst = (json, options) => interpret(compiled, Instance.fromJs(json), options); - - return json === undefined ? interpretAst : interpretAst(json, options); -}; - -export const interpret = (compiledSchema, instance, options = BASIC) => { - const annotationsPlugin = new AnnotationsPlugin(); - const plugins = options.plugins ?? []; - - const output = validate(compiledSchema, instance, { - outputFormat: typeof options === "string" ? options : options.outputFormat ?? BASIC, - plugins: [annotationsPlugin, ...plugins] - }); - - if (!output.valid) { - throw new ValidationError(output); - } - - for (const annotation of annotationsPlugin.annotations) { - const node = Instance.get(annotation.instanceLocation, instance); - const keyword = annotation.keyword; - if (!node.annotations[keyword]) { - node.annotations[keyword] = []; - } - node.annotations[keyword].unshift(annotation.annotation); - } - - return instance; -}; - -export { ValidationError } from "./validation-error.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts b/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts deleted file mode 100644 index da8693cf..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts +++ /dev/null @@ -1 +0,0 @@ -export const isCompatible: (compatibility: string | undefined, versionUnderTest: number) => boolean; diff --git a/node_modules/@hyperjump/json-schema/annotations/test-utils.js b/node_modules/@hyperjump/json-schema/annotations/test-utils.js deleted file mode 100644 index 5841ca7f..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/test-utils.js +++ /dev/null @@ -1,38 +0,0 @@ -export const isCompatible = (compatibility, versionUnderTest) => { - if (compatibility === undefined) { - return true; - } - - const constraints = compatibility.split(","); - for (const constraint of constraints) { - const matches = /(?<=|>=|=)?(?\d+)/.exec(constraint); - if (!matches) { - throw Error(`Invalid compatibility string: ${compatibility}`); - } - - const operator = matches[1] ?? ">="; - const version = parseInt(matches[2], 10); - - switch (operator) { - case ">=": - if (versionUnderTest < version) { - return false; - } - break; - case "<=": - if (versionUnderTest > version) { - return false; - } - break; - case "=": - if (versionUnderTest !== version) { - return false; - } - break; - default: - throw Error(`Unsupported contraint operator: ${operator}`); - } - } - - return true; -}; diff --git a/node_modules/@hyperjump/json-schema/annotations/validation-error.js b/node_modules/@hyperjump/json-schema/annotations/validation-error.js deleted file mode 100644 index b0804723..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/validation-error.js +++ /dev/null @@ -1,7 +0,0 @@ -export class ValidationError extends Error { - constructor(output) { - super("Validation Error"); - this.name = this.constructor.name; - this.output = output; - } -} diff --git a/node_modules/@hyperjump/json-schema/bundle/index.d.ts b/node_modules/@hyperjump/json-schema/bundle/index.d.ts deleted file mode 100644 index 94c6c912..00000000 --- a/node_modules/@hyperjump/json-schema/bundle/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { SchemaObject } from "../lib/index.js"; - - -export const bundle: (uri: string, options?: BundleOptions) => Promise; -export const URI: "uri"; -export const UUID: "uuid"; - -export type BundleOptions = { - alwaysIncludeDialect?: boolean; - definitionNamingStrategy?: DefinitionNamingStrategy; - externalSchemas?: string[]; -}; - -export type DefinitionNamingStrategy = "uri" | "uuid"; diff --git a/node_modules/@hyperjump/json-schema/bundle/index.js b/node_modules/@hyperjump/json-schema/bundle/index.js deleted file mode 100644 index 99c6fe94..00000000 --- a/node_modules/@hyperjump/json-schema/bundle/index.js +++ /dev/null @@ -1,83 +0,0 @@ -import { v4 as uuid } from "uuid"; -import { jrefTypeOf } from "@hyperjump/browser/jref"; -import * as JsonPointer from "@hyperjump/json-pointer"; -import { resolveIri, toAbsoluteIri } from "@hyperjump/uri"; -import { getSchema, toSchema, getKeywordName } from "../lib/experimental.js"; - - -export const URI = "uri", UUID = "uuid"; - -const defaultOptions = { - alwaysIncludeDialect: false, - definitionNamingStrategy: URI, - externalSchemas: [] -}; - -export const bundle = async (url, options = {}) => { - const fullOptions = { ...defaultOptions, ...options }; - - const mainSchema = await getSchema(url); - fullOptions.contextUri = mainSchema.document.baseUri; - fullOptions.contextDialectId = mainSchema.document.dialectId; - - const bundled = toSchema(mainSchema); - fullOptions.bundlingLocation = "/" + getKeywordName(fullOptions.contextDialectId, "https://json-schema.org/keyword/definitions"); - if (JsonPointer.get(fullOptions.bundlingLocation, bundled) === undefined) { - JsonPointer.assign(fullOptions.bundlingLocation, bundled, {}); - } - - return await doBundling(mainSchema.uri, bundled, fullOptions); -}; - -const doBundling = async (schemaUri, bundled, fullOptions, contextSchema, visited = new Set()) => { - visited.add(schemaUri); - - const schema = await getSchema(schemaUri, contextSchema); - for (const reference of allReferences(schema.document.root)) { - const uri = toAbsoluteIri(resolveIri(reference.href, schema.document.baseUri)); - if (visited.has(uri) || fullOptions.externalSchemas.includes(uri) || (uri in schema.document.embedded && !(uri in schema._cache))) { - continue; - } - - const externalSchema = await getSchema(uri, contextSchema); - const embeddedSchema = toSchema(externalSchema, { - contextUri: externalSchema.document.baseUri.startsWith("file:") ? fullOptions.contextUri : undefined, - includeDialect: fullOptions.alwaysIncludeDialect ? "always" : "auto", - contextDialectId: fullOptions.contextDialectId - }); - let id; - if (fullOptions.definitionNamingStrategy === URI) { - const idToken = getKeywordName(externalSchema.document.dialectId, "https://json-schema.org/keyword/id") - || getKeywordName(externalSchema.document.dialectId, "https://json-schema.org/keyword/draft-04/id"); - id = embeddedSchema[idToken]; - } else if (fullOptions.definitionNamingStrategy === UUID) { - id = uuid(); - } else { - throw Error(`Unknown definition naming stragety: ${fullOptions.definitionNamingStrategy}`); - } - const pointer = JsonPointer.append(id, fullOptions.bundlingLocation); - JsonPointer.assign(pointer, bundled, embeddedSchema); - - bundled = await doBundling(uri, bundled, fullOptions, schema, visited); - } - - return bundled; -}; - -const allReferences = function* (node) { - switch (jrefTypeOf(node)) { - case "object": - for (const property in node) { - yield* allReferences(node[property]); - } - break; - case "array": - for (const item of node) { - yield* allReferences(item); - } - break; - case "reference": - yield node; - break; - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js b/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js deleted file mode 100644 index da09d332..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js +++ /dev/null @@ -1,38 +0,0 @@ -import { drop } from "@hyperjump/pact"; -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getKeywordName, Validation } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/additionalItems"; - -const compile = async (schema, ast, parentSchema) => { - const itemsKeywordName = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/items"); - const items = await Browser.step(itemsKeywordName, parentSchema); - const numberOfItems = Browser.typeOf(items) === "array" ? Browser.length(items) : Number.MAX_SAFE_INTEGER; - - return [numberOfItems, await Validation.compile(schema, ast)]; -}; - -const interpret = ([numberOfItems, additionalItems], instance, context) => { - if (Instance.typeOf(instance) !== "array") { - return true; - } - - let isValid = true; - let index = numberOfItems; - for (const item of drop(numberOfItems, Instance.iter(instance))) { - if (!Validation.interpret(additionalItems, item, context)) { - isValid = false; - } - - context.evaluatedItems?.add(index); - index++; - } - - return isValid; -}; - -const simpleApplicator = true; - -export default { id, compile, interpret, simpleApplicator }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/dependencies.js b/node_modules/@hyperjump/json-schema/draft-04/dependencies.js deleted file mode 100644 index 60e96ce5..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/dependencies.js +++ /dev/null @@ -1,36 +0,0 @@ -import { pipe, asyncMap, asyncCollectArray } from "@hyperjump/pact"; -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { Validation } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/dependencies"; - -const compile = (schema, ast) => pipe( - Browser.entries(schema), - asyncMap(async ([key, dependency]) => [ - key, - Browser.typeOf(dependency) === "array" ? Browser.value(dependency) : await Validation.compile(dependency, ast) - ]), - asyncCollectArray -); - -const interpret = (dependencies, instance, context) => { - if (Instance.typeOf(instance) !== "object") { - return true; - } - - return dependencies.every(([propertyName, dependency]) => { - if (!Instance.has(propertyName, instance)) { - return true; - } - - if (Array.isArray(dependency)) { - return dependency.every((key) => Instance.has(key, instance)); - } else { - return Validation.interpret(dependency, instance, context); - } - }); -}; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js deleted file mode 100644 index 5acd1aa0..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js +++ /dev/null @@ -1,5 +0,0 @@ -const id = "https://json-schema.org/keyword/draft-04/exclusiveMaximum"; -const compile = (schema) => schema.value; -const interpret = () => true; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js deleted file mode 100644 index 26e00941..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js +++ /dev/null @@ -1,5 +0,0 @@ -const id = "https://json-schema.org/keyword/draft-04/exclusiveMinimum"; -const compile = (schema) => schema.value; -const interpret = () => true; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/format.js b/node_modules/@hyperjump/json-schema/draft-04/format.js deleted file mode 100644 index e4854f83..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/format.js +++ /dev/null @@ -1,31 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-04/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (getShouldValidateFormat() === false) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "email": "https://json-schema.org/format/email", - "hostname": "https://json-schema.org/format/draft-04/hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/id.js b/node_modules/@hyperjump/json-schema/draft-04/id.js deleted file mode 100644 index b5f6df1b..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/id.js +++ /dev/null @@ -1 +0,0 @@ -export default { id: "https://json-schema.org/keyword/draft-04/id" }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/index.d.ts b/node_modules/@hyperjump/json-schema/draft-04/index.d.ts deleted file mode 100644 index ed6460b2..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft04 = { - $ref: string; -} | { - $schema?: "http://json-schema.org/draft-04/schema#"; - id?: string; - title?: string; - description?: string; - default?: Json; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: boolean; - minimum?: number; - exclusiveMinimum?: boolean; - maxLength?: number; - minLength?: number; - pattern?: string; - additionalItems?: boolean | JsonSchemaDraft04; - items?: JsonSchemaDraft04 | JsonSchemaDraft04[]; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxProperties?: number; - minProperties?: number; - required?: string[]; - additionalProperties?: boolean | JsonSchemaDraft04; - definitions?: Record; - properties?: Record; - patternProperties?: Record; - dependencies?: Record; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri"; - allOf?: JsonSchemaDraft04[]; - anyOf?: JsonSchemaDraft04[]; - oneOf?: JsonSchemaDraft04[]; - not?: JsonSchemaDraft04; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-04/index.js b/node_modules/@hyperjump/json-schema/draft-04/index.js deleted file mode 100644 index 5ab69ea8..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/index.js +++ /dev/null @@ -1,71 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import metaSchema from "./schema.js"; -import additionalItems from "./additionalItems.js"; -import dependencies from "./dependencies.js"; -import exclusiveMaximum from "./exclusiveMaximum.js"; -import exclusiveMinimum from "./exclusiveMinimum.js"; -import id from "./id.js"; -import items from "./items.js"; -import format from "./format.js"; -import maximum from "./maximum.js"; -import minimum from "./minimum.js"; -import ref from "./ref.js"; - - -addKeyword(additionalItems); -addKeyword(dependencies); -addKeyword(exclusiveMaximum); -addKeyword(exclusiveMinimum); -addKeyword(maximum); -addKeyword(minimum); -addKeyword(id); -addKeyword(items); -addKeyword(format); -addKeyword(ref); - -const jsonSchemaVersion = "http://json-schema.org/draft-04/schema"; - -defineVocabulary(jsonSchemaVersion, { - "id": "https://json-schema.org/keyword/draft-04/id", - "$ref": "https://json-schema.org/keyword/draft-04/ref", - "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "default": "https://json-schema.org/keyword/default", - "definitions": "https://json-schema.org/keyword/definitions", - "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", - "description": "https://json-schema.org/keyword/description", - "enum": "https://json-schema.org/keyword/enum", - "exclusiveMaximum": "https://json-schema.org/keyword/draft-04/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/draft-04/exclusiveMinimum", - "format": "https://json-schema.org/keyword/draft-04/format", - "items": "https://json-schema.org/keyword/draft-04/items", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/draft-04/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/draft-04/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "pattern": "https://json-schema.org/keyword/pattern", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "properties": "https://json-schema.org/keyword/properties", - "required": "https://json-schema.org/keyword/required", - "title": "https://json-schema.org/keyword/title", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -loadDialect(jsonSchemaVersion, { - [jsonSchemaVersion]: true -}, true); - -registerSchema(metaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-04/items.js b/node_modules/@hyperjump/json-schema/draft-04/items.js deleted file mode 100644 index 9d1ece4b..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/items.js +++ /dev/null @@ -1,57 +0,0 @@ -import { pipe, asyncMap, asyncCollectArray, zip } from "@hyperjump/pact"; -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { Validation } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/items"; - -const compile = (schema, ast) => { - if (Browser.typeOf(schema) === "array") { - return pipe( - Browser.iter(schema), - asyncMap((itemSchema) => Validation.compile(itemSchema, ast)), - asyncCollectArray - ); - } else { - return Validation.compile(schema, ast); - } -}; - -const interpret = (items, instance, context) => { - if (Instance.typeOf(instance) !== "array") { - return true; - } - - let isValid = true; - let index = 0; - - if (typeof items === "string") { - for (const item of Instance.iter(instance)) { - if (!Validation.interpret(items, item, context)) { - isValid = false; - } - - context.evaluatedItems?.add(index++); - } - } else { - for (const [tupleItem, tupleInstance] of zip(items, Instance.iter(instance))) { - if (!tupleInstance) { - break; - } - - if (!Validation.interpret(tupleItem, tupleInstance, context)) { - isValid = false; - } - - context.evaluatedItems?.add(index); - index++; - } - } - - return isValid; -}; - -const simpleApplicator = true; - -export default { id, compile, interpret, simpleApplicator }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/maximum.js b/node_modules/@hyperjump/json-schema/draft-04/maximum.js deleted file mode 100644 index a2a889ce..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/maximum.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getKeywordName } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/maximum"; - -const compile = async (schema, _ast, parentSchema) => { - const exclusiveMaximumKeyword = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/exclusiveMaximum"); - const exclusiveMaximum = await Browser.step(exclusiveMaximumKeyword, parentSchema); - const isExclusive = Browser.value(exclusiveMaximum); - - return [Browser.value(schema), isExclusive]; -}; - -const interpret = ([maximum, isExclusive], instance) => { - if (Instance.typeOf(instance) !== "number") { - return true; - } - - const value = Instance.value(instance); - return isExclusive ? value < maximum : value <= maximum; -}; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/minimum.js b/node_modules/@hyperjump/json-schema/draft-04/minimum.js deleted file mode 100644 index c0146aba..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/minimum.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getKeywordName } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/minimum"; - -const compile = async (schema, _ast, parentSchema) => { - const exclusiveMinimumKeyword = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/exclusiveMinimum"); - const exclusiveMinimum = await Browser.step(exclusiveMinimumKeyword, parentSchema); - const isExclusive = Browser.value(exclusiveMinimum); - - return [Browser.value(schema), isExclusive]; -}; - -const interpret = ([minimum, isExclusive], instance) => { - if (Instance.typeOf(instance) !== "number") { - return true; - } - - const value = Instance.value(instance); - return isExclusive ? value > minimum : value >= minimum; -}; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/ref.js b/node_modules/@hyperjump/json-schema/draft-04/ref.js deleted file mode 100644 index 5e714c50..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/ref.js +++ /dev/null @@ -1 +0,0 @@ -export default { id: "https://json-schema.org/keyword/draft-04/ref" }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/schema.js b/node_modules/@hyperjump/json-schema/draft-04/schema.js deleted file mode 100644 index 130d72f4..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/schema.js +++ /dev/null @@ -1,149 +0,0 @@ -export default { - "id": "http://json-schema.org/draft-04/schema#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "positiveInteger": { - "type": "integer", - "minimum": 0 - }, - "positiveIntegerDefault0": { - "allOf": [{ "$ref": "#/definitions/positiveInteger" }, { "default": 0 }] - }, - "simpleTypes": { - "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "minItems": 1, - "uniqueItems": true - } - }, - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "$schema": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "multipleOf": { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { "$ref": "#/definitions/positiveInteger" }, - "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": {} - }, - "maxItems": { "$ref": "#/definitions/positiveInteger" }, - "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { "$ref": "#/definitions/positiveInteger" }, - "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "dependencies": { - "exclusiveMaximum": ["maximum"], - "exclusiveMinimum": ["minimum"] - }, - "default": {} -}; diff --git a/node_modules/@hyperjump/json-schema/draft-06/contains.js b/node_modules/@hyperjump/json-schema/draft-06/contains.js deleted file mode 100644 index 628fe03e..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/contains.js +++ /dev/null @@ -1,15 +0,0 @@ -import { some } from "@hyperjump/pact"; -import * as Instance from "../lib/instance.js"; -import { Validation } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-06/contains"; - -const compile = (schema, ast) => Validation.compile(schema, ast); - -const interpret = (contains, instance, context) => { - return Instance.typeOf(instance) !== "array" - || some((item) => Validation.interpret(contains, item, context), Instance.iter(instance)); -}; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-06/format.js b/node_modules/@hyperjump/json-schema/draft-06/format.js deleted file mode 100644 index 5c8cdf23..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/format.js +++ /dev/null @@ -1,34 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-06/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (getShouldValidateFormat() === false) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "email": "https://json-schema.org/format/email", - "hostname": "https://json-schema.org/format/draft-04/hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-06/index.d.ts b/node_modules/@hyperjump/json-schema/draft-06/index.d.ts deleted file mode 100644 index becf03fa..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft06Ref = { - $ref: string; -}; -export type JsonSchemaDraft06Object = { - $schema?: "http://json-schema.org/draft-06/schema#"; - $id?: string; - title?: string; - description?: string; - default?: Json; - examples?: Json[]; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - additionalItems?: JsonSchemaDraft06; - items?: JsonSchemaDraft06 | JsonSchemaDraft06[]; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - contains?: JsonSchemaDraft06; - maxProperties?: number; - minProperties?: number; - required?: string[]; - additionalProperties?: JsonSchemaDraft06; - definitions?: Record; - properties?: Record; - patternProperties?: Record; - dependencies?: Record; - propertyNames?: JsonSchemaDraft06; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "uri-template" | "json-pointer"; - allOf?: JsonSchemaDraft06[]; - anyOf?: JsonSchemaDraft06[]; - oneOf?: JsonSchemaDraft06[]; - not?: JsonSchemaDraft06; -}; -export type JsonSchemaDraft06 = boolean | JsonSchemaDraft06Ref | JsonSchemaDraft06Object; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-06/index.js b/node_modules/@hyperjump/json-schema/draft-06/index.js deleted file mode 100644 index ac8b1a7c..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/index.js +++ /dev/null @@ -1,70 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; - -import metaSchema from "./schema.js"; -import additionalItems from "../draft-04/additionalItems.js"; -import contains from "./contains.js"; -import dependencies from "../draft-04/dependencies.js"; -import id from "../draft-04/id.js"; -import items from "../draft-04/items.js"; -import format from "./format.js"; -import ref from "../draft-04/ref.js"; - - -addKeyword(additionalItems); -addKeyword(dependencies); -addKeyword(contains); -addKeyword(id); -addKeyword(items); -addKeyword(format); -addKeyword(ref); - -const jsonSchemaVersion = "http://json-schema.org/draft-06/schema"; - -defineVocabulary(jsonSchemaVersion, { - "$id": "https://json-schema.org/keyword/draft-04/id", - "$ref": "https://json-schema.org/keyword/draft-04/ref", - "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "const": "https://json-schema.org/keyword/const", - "contains": "https://json-schema.org/keyword/draft-06/contains", - "default": "https://json-schema.org/keyword/default", - "definitions": "https://json-schema.org/keyword/definitions", - "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", - "description": "https://json-schema.org/keyword/description", - "enum": "https://json-schema.org/keyword/enum", - "examples": "https://json-schema.org/keyword/examples", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "format": "https://json-schema.org/keyword/draft-06/format", - "items": "https://json-schema.org/keyword/draft-04/items", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "pattern": "https://json-schema.org/keyword/pattern", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "properties": "https://json-schema.org/keyword/properties", - "propertyNames": "https://json-schema.org/keyword/propertyNames", - "required": "https://json-schema.org/keyword/required", - "title": "https://json-schema.org/keyword/title", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -loadDialect(jsonSchemaVersion, { - [jsonSchemaVersion]: true -}, true); - -registerSchema(metaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-06/schema.js b/node_modules/@hyperjump/json-schema/draft-06/schema.js deleted file mode 100644 index 3ebf9910..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/schema.js +++ /dev/null @@ -1,154 +0,0 @@ -export default { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "http://json-schema.org/draft-06/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { "$ref": "#/definitions/nonNegativeInteger" }, - { "default": 0 } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - }, - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "examples": { - "type": "array", - "items": {} - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, - "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { "$ref": "#" }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": {} - }, - "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, - "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { "$ref": "#" }, - "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, - "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { "$ref": "#" }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "propertyNames": { "$ref": "#" }, - "const": {}, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "default": {} -}; diff --git a/node_modules/@hyperjump/json-schema/draft-07/format.js b/node_modules/@hyperjump/json-schema/draft-07/format.js deleted file mode 100644 index 0da3477f..00000000 --- a/node_modules/@hyperjump/json-schema/draft-07/format.js +++ /dev/null @@ -1,42 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-07/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (getShouldValidateFormat() === false) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-07/index.d.ts b/node_modules/@hyperjump/json-schema/draft-07/index.d.ts deleted file mode 100644 index 33a0cdcb..00000000 --- a/node_modules/@hyperjump/json-schema/draft-07/index.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft07 = boolean | { - $ref: string; -} | { - $schema?: "http://json-schema.org/draft-07/schema#"; - $id?: string; - $comment?: string; - title?: string; - description?: string; - default?: Json; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - additionalItems?: JsonSchemaDraft07; - items?: JsonSchemaDraft07 | JsonSchemaDraft07[]; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - contains?: JsonSchemaDraft07; - maxProperties?: number; - minProperties?: number; - required?: string[]; - additionalProperties?: JsonSchemaDraft07; - definitions?: Record; - properties?: Record; - patternProperties?: Record; - dependencies?: Record; - propertyNames?: JsonSchemaDraft07; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - format?: "date-time" | "date" | "time" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - if?: JsonSchemaDraft07; - then?: JsonSchemaDraft07; - else?: JsonSchemaDraft07; - allOf?: JsonSchemaDraft07[]; - anyOf?: JsonSchemaDraft07[]; - oneOf?: JsonSchemaDraft07[]; - not?: JsonSchemaDraft07; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-07/index.js b/node_modules/@hyperjump/json-schema/draft-07/index.js deleted file mode 100644 index 0bdbfaa5..00000000 --- a/node_modules/@hyperjump/json-schema/draft-07/index.js +++ /dev/null @@ -1,78 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; - -import metaSchema from "./schema.js"; -import additionalItems from "../draft-04/additionalItems.js"; -import contains from "../draft-06/contains.js"; -import dependencies from "../draft-04/dependencies.js"; -import items from "../draft-04/items.js"; -import id from "../draft-04/id.js"; -import format from "./format.js"; -import ref from "../draft-04/ref.js"; - - -addKeyword(additionalItems); -addKeyword(contains); -addKeyword(dependencies); -addKeyword(id); -addKeyword(items); -addKeyword(format); -addKeyword(ref); - -const jsonSchemaVersion = "http://json-schema.org/draft-07/schema"; - -defineVocabulary(jsonSchemaVersion, { - "$id": "https://json-schema.org/keyword/draft-04/id", - "$ref": "https://json-schema.org/keyword/draft-04/ref", - "$comment": "https://json-schema.org/keyword/comment", - "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "const": "https://json-schema.org/keyword/const", - "contains": "https://json-schema.org/keyword/draft-06/contains", - "contentEncoding": "https://json-schema.org/keyword/contentEncoding", - "contentMediaType": "https://json-schema.org/keyword/contentMediaType", - "default": "https://json-schema.org/keyword/default", - "definitions": "https://json-schema.org/keyword/definitions", - "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", - "description": "https://json-schema.org/keyword/description", - "enum": "https://json-schema.org/keyword/enum", - "examples": "https://json-schema.org/keyword/examples", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "format": "https://json-schema.org/keyword/draft-07/format", - "if": "https://json-schema.org/keyword/if", - "then": "https://json-schema.org/keyword/then", - "else": "https://json-schema.org/keyword/else", - "items": "https://json-schema.org/keyword/draft-04/items", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "pattern": "https://json-schema.org/keyword/pattern", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "properties": "https://json-schema.org/keyword/properties", - "propertyNames": "https://json-schema.org/keyword/propertyNames", - "readOnly": "https://json-schema.org/keyword/readOnly", - "required": "https://json-schema.org/keyword/required", - "title": "https://json-schema.org/keyword/title", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems", - "writeOnly": "https://json-schema.org/keyword/writeOnly" -}); - -loadDialect(jsonSchemaVersion, { - [jsonSchemaVersion]: true -}, true); - -registerSchema(metaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-07/schema.js b/node_modules/@hyperjump/json-schema/draft-07/schema.js deleted file mode 100644 index 83aa3de6..00000000 --- a/node_modules/@hyperjump/json-schema/draft-07/schema.js +++ /dev/null @@ -1,172 +0,0 @@ -export default { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://json-schema.org/draft-07/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { "$ref": "#/definitions/nonNegativeInteger" }, - { "default": 0 } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - }, - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, - "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { "$ref": "#" }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": true - }, - "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, - "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { "$ref": "#" }, - "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, - "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { "$ref": "#" }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "propertyNames": { "$ref": "#" }, - "const": true, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "if": { "$ref": "#" }, - "then": { "$ref": "#" }, - "else": { "$ref": "#" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "default": true -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js deleted file mode 100644 index 4f884d29..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js +++ /dev/null @@ -1,44 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-2019-09/format-assertion"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (getShouldValidateFormat() === false) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "duration": "https://json-schema.org/format/duration", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uuid": "https://json-schema.org/format/uuid", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/format.js b/node_modules/@hyperjump/json-schema/draft-2019-09/format.js deleted file mode 100644 index 2129b595..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/format.js +++ /dev/null @@ -1,44 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-2019-09/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (!getShouldValidateFormat()) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "duration": "https://json-schema.org/format/duration", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uuid": "https://json-schema.org/format/uuid", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts b/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts deleted file mode 100644 index 6b332238..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft201909Object = { - $schema?: "https://json-schema.org/draft/2019-09/schema"; - $id?: string; - $anchor?: string; - $ref?: string; - $recursiveRef?: "#"; - $recursiveAnchor?: boolean; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: JsonSchemaDraft201909; - unevaluatedItems?: JsonSchemaDraft201909; - items?: JsonSchemaDraft201909 | JsonSchemaDraft201909[]; - contains?: JsonSchemaDraft201909; - additionalProperties?: JsonSchemaDraft201909; - unevaluatedProperties?: JsonSchemaDraft201909; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: JsonSchemaDraft201909; - if?: JsonSchemaDraft201909; - then?: JsonSchemaDraft201909; - else?: JsonSchemaDraft201909; - allOf?: JsonSchemaDraft201909[]; - anyOf?: JsonSchemaDraft201909[]; - oneOf?: JsonSchemaDraft201909[]; - not?: JsonSchemaDraft201909; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: JsonSchemaDraft201909; -}; -export type JsonSchemaDraft201909 = boolean | JsonSchemaDraft201909Object; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/index.js b/node_modules/@hyperjump/json-schema/draft-2019-09/index.js deleted file mode 100644 index 8abfa4e6..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/index.js +++ /dev/null @@ -1,118 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; - -import metaSchema from "./schema.js"; -import coreMetaSchema from "./meta/core.js"; -import applicatorMetaSchema from "./meta/applicator.js"; -import validationMetaSchema from "./meta/validation.js"; -import metaDataMetaSchema from "./meta/meta-data.js"; -import formatMetaSchema from "./meta/format.js"; -import contentMetaSchema from "./meta/content.js"; - -import additionalItems from "../draft-04/additionalItems.js"; -import items from "../draft-04/items.js"; -import formatAssertion from "./format-assertion.js"; -import format from "./format.js"; -import recursiveAnchor from "./recursiveAnchor.js"; -import recursiveRef from "../draft-2020-12/dynamicRef.js"; - - -addKeyword(additionalItems); -addKeyword(items); -addKeyword(formatAssertion); -addKeyword(format); -addKeyword(recursiveAnchor); -addKeyword(recursiveRef); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/core", { - "$anchor": "https://json-schema.org/keyword/anchor", - "$comment": "https://json-schema.org/keyword/comment", - "$defs": "https://json-schema.org/keyword/definitions", - "$recursiveAnchor": "https://json-schema.org/keyword/draft-2019-09/recursiveAnchor", - "$recursiveRef": "https://json-schema.org/keyword/draft-2020-12/dynamicRef", - "$id": "https://json-schema.org/keyword/id", - "$ref": "https://json-schema.org/keyword/ref", - "$vocabulary": "https://json-schema.org/keyword/vocabulary" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/applicator", { - "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "contains": "https://json-schema.org/keyword/contains", - "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", - "if": "https://json-schema.org/keyword/if", - "then": "https://json-schema.org/keyword/then", - "else": "https://json-schema.org/keyword/else", - "items": "https://json-schema.org/keyword/draft-04/items", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "properties": "https://json-schema.org/keyword/properties", - "propertyNames": "https://json-schema.org/keyword/propertyNames", - "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", - "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/validation", { - "const": "https://json-schema.org/keyword/const", - "enum": "https://json-schema.org/keyword/enum", - "dependentRequired": "https://json-schema.org/keyword/dependentRequired", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "maxContains": "https://json-schema.org/keyword/maxContains", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minContains": "https://json-schema.org/keyword/minContains", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "pattern": "https://json-schema.org/keyword/pattern", - "required": "https://json-schema.org/keyword/required", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/meta-data", { - "default": "https://json-schema.org/keyword/default", - "deprecated": "https://json-schema.org/keyword/deprecated", - "description": "https://json-schema.org/keyword/description", - "examples": "https://json-schema.org/keyword/examples", - "readOnly": "https://json-schema.org/keyword/readOnly", - "title": "https://json-schema.org/keyword/title", - "writeOnly": "https://json-schema.org/keyword/writeOnly" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/format", { - "format": "https://json-schema.org/keyword/draft-2019-09/format-assertion" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/content", { - "contentEncoding": "https://json-schema.org/keyword/contentEncoding", - "contentMediaType": "https://json-schema.org/keyword/contentMediaType", - "contentSchema": "https://json-schema.org/keyword/contentSchema" -}); - -loadDialect("https://json-schema.org/draft/2019-09/schema", { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true, - "https://json-schema.org/draft/2019-09/vocab/validation": true, - "https://json-schema.org/draft/2019-09/vocab/meta-data": true, - "https://json-schema.org/draft/2019-09/vocab/format": true, - "https://json-schema.org/draft/2019-09/vocab/content": true -}, true); - -registerSchema(metaSchema); -registerSchema(coreMetaSchema); -registerSchema(applicatorMetaSchema); -registerSchema(validationMetaSchema); -registerSchema(metaDataMetaSchema); -registerSchema(formatMetaSchema); -registerSchema(contentMetaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js deleted file mode 100644 index 3ff97a46..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js +++ /dev/null @@ -1,55 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/applicator", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/applicator": true - }, - "$recursiveAnchor": true, - - "title": "Applicator vocabulary meta-schema", - "properties": { - "additionalItems": { "$recursiveRef": "#" }, - "unevaluatedItems": { "$recursiveRef": "#" }, - "items": { - "anyOf": [ - { "$recursiveRef": "#" }, - { "$ref": "#/$defs/schemaArray" } - ] - }, - "contains": { "$recursiveRef": "#" }, - "additionalProperties": { "$recursiveRef": "#" }, - "unevaluatedProperties": { "$recursiveRef": "#" }, - "properties": { - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - }, - "propertyNames": { "$recursiveRef": "#" }, - "if": { "$recursiveRef": "#" }, - "then": { "$recursiveRef": "#" }, - "else": { "$recursiveRef": "#" }, - "allOf": { "$ref": "#/$defs/schemaArray" }, - "anyOf": { "$ref": "#/$defs/schemaArray" }, - "oneOf": { "$ref": "#/$defs/schemaArray" }, - "not": { "$recursiveRef": "#" } - }, - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$recursiveRef": "#" } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js deleted file mode 100644 index c62760f3..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js +++ /dev/null @@ -1,17 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/content", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/content": true - }, - "$recursiveAnchor": true, - - "title": "Content vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "contentSchema": { "$recursiveRef": "#" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js deleted file mode 100644 index ea5fefa1..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js +++ /dev/null @@ -1,57 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/core", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true - }, - "$recursiveAnchor": true, - - "title": "Core vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$anchor": { - "type": "string", - "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$recursiveRef": { - "type": "string", - "format": "uri-reference" - }, - "$recursiveAnchor": { - "type": "boolean", - "default": false - }, - "$vocabulary": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { - "type": "string" - }, - "$defs": { - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "default": {} - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js deleted file mode 100644 index 888ddf1b..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/format", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/format": true - }, - "$recursiveAnchor": true, - - "title": "Format vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "format": { "type": "string" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js deleted file mode 100644 index 63f0c4c2..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js +++ /dev/null @@ -1,37 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/meta-data", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/meta-data": true - }, - "$recursiveAnchor": true, - - "title": "Meta-data vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "deprecated": { - "type": "boolean", - "default": false - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js deleted file mode 100644 index 5dec0619..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js +++ /dev/null @@ -1,98 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/validation", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/validation": true - }, - "$recursiveAnchor": true, - - "title": "Validation vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/$defs/stringArray" }, - "dependentRequired": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "type": { - "anyOf": [ - { "$ref": "#/$defs/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/$defs/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js b/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js deleted file mode 100644 index c2e74085..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js +++ /dev/null @@ -1 +0,0 @@ -export default { id: "https://json-schema.org/keyword/draft-2019-09/recursiveAnchor" }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js b/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js deleted file mode 100644 index 76add3e1..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js +++ /dev/null @@ -1,42 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true, - "https://json-schema.org/draft/2019-09/vocab/validation": true, - "https://json-schema.org/draft/2019-09/vocab/meta-data": true, - "https://json-schema.org/draft/2019-09/vocab/format": false, - "https://json-schema.org/draft/2019-09/vocab/content": true - }, - "$recursiveAnchor": true, - - "title": "Core and Validation specifications meta-schema", - "allOf": [ - { "$ref": "meta/core" }, - { "$ref": "meta/applicator" }, - { "$ref": "meta/validation" }, - { "$ref": "meta/meta-data" }, - { "$ref": "meta/format" }, - { "$ref": "meta/content" } - ], - "type": ["object", "boolean"], - "properties": { - "definitions": { - "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "default": {} - }, - "dependencies": { - "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$recursiveRef": "#" }, - { "$ref": "meta/validation#/$defs/stringArray" } - ] - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js deleted file mode 100644 index 0e49b934..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js +++ /dev/null @@ -1 +0,0 @@ -export default { id: "https://json-schema.org/keyword/draft-2020-12/dynamicAnchor" }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js deleted file mode 100644 index a5f2581b..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js +++ /dev/null @@ -1,38 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import { Validation, canonicalUri } from "../lib/experimental.js"; -import { toAbsoluteUri, uriFragment } from "../lib/common.js"; - - -const id = "https://json-schema.org/keyword/draft-2020-12/dynamicRef"; - -const compile = async (dynamicRef, ast) => { - const fragment = uriFragment(Browser.value(dynamicRef)); - const referencedSchema = await Browser.get(Browser.value(dynamicRef), dynamicRef); - await Validation.compile(referencedSchema, ast); - return [referencedSchema.document.baseUri, fragment, canonicalUri(referencedSchema)]; -}; - -const interpret = ([id, fragment, ref], instance, context) => { - if (fragment in context.ast.metaData[id].dynamicAnchors) { - context.dynamicAnchors = { ...context.ast.metaData[id].dynamicAnchors, ...context.dynamicAnchors }; - return Validation.interpret(context.dynamicAnchors[fragment], instance, context); - } else { - return Validation.interpret(ref, instance, context); - } -}; - -const simpleApplicator = true; - -const plugin = { - beforeSchema(url, _instance, context) { - context.dynamicAnchors = { - ...context.ast.metaData[toAbsoluteUri(url)].dynamicAnchors, - ...context.dynamicAnchors - }; - }, - beforeKeyword(_url, _instance, context, schemaContext) { - context.dynamicAnchors = schemaContext.dynamicAnchors; - } -}; - -export default { id, compile, interpret, simpleApplicator, plugin }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js deleted file mode 100644 index 2eecf321..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js +++ /dev/null @@ -1,43 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-2020-12/format-assertion"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - const handler = getFormatHandler(formats[format]); - if (!handler) { - throw Error(`The '${format}' format is not supported.`); - } - - return handler(Instance.value(instance)); -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "duration": "https://json-schema.org/format/duration", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uuid": "https://json-schema.org/format/uuid", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/format.js b/node_modules/@hyperjump/json-schema/draft-2020-12/format.js deleted file mode 100644 index d1550e2a..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/format.js +++ /dev/null @@ -1,44 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-2020-12/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (!getShouldValidateFormat()) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "duration": "https://json-schema.org/format/duration", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uuid": "https://json-schema.org/format/uuid", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts b/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts deleted file mode 100644 index 75f26f9d..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft202012Object = { - $schema?: "https://json-schema.org/draft/2020-12/schema"; - $id?: string; - $anchor?: string; - $ref?: string; - $dynamicRef?: string; - $dynamicAnchor?: string; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: JsonSchemaDraft202012; - unevaluatedItems?: JsonSchemaDraft202012; - prefixItems?: JsonSchemaDraft202012[]; - items?: JsonSchemaDraft202012; - contains?: JsonSchemaDraft202012; - additionalProperties?: JsonSchemaDraft202012; - unevaluatedProperties?: JsonSchemaDraft202012; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: JsonSchemaDraft202012; - if?: JsonSchemaDraft202012; - then?: JsonSchemaDraft202012; - else?: JsonSchemaDraft202012; - allOf?: JsonSchemaDraft202012[]; - anyOf?: JsonSchemaDraft202012[]; - oneOf?: JsonSchemaDraft202012[]; - not?: JsonSchemaDraft202012; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: JsonSchemaDraft202012; -}; -export type JsonSchemaDraft202012 = boolean | JsonSchemaDraft202012Object; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/index.js b/node_modules/@hyperjump/json-schema/draft-2020-12/index.js deleted file mode 100644 index 971a7391..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/index.js +++ /dev/null @@ -1,126 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; - -import metaSchema from "./schema.js"; -import coreMetaSchema from "./meta/core.js"; -import applicatorMetaSchema from "./meta/applicator.js"; -import validationMetaSchema from "./meta/validation.js"; -import metaDataMetaSchema from "./meta/meta-data.js"; -import formatAnnotationMetaSchema from "./meta/format-annotation.js"; -import formatAssertionMetaSchema from "./meta/format-assertion.js"; -import contentMetaSchema from "./meta/content.js"; -import unevaluatedMetaSchema from "./meta/unevaluated.js"; - -import dynamicAnchor from "./dynamicAnchor.js"; -import dynamicRef from "./dynamicRef.js"; -import format from "./format.js"; -import formatAssertion from "./format-assertion.js"; - - -addKeyword(dynamicRef); -addKeyword(dynamicAnchor); -addKeyword(format); -addKeyword(formatAssertion); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/core", { - "$anchor": "https://json-schema.org/keyword/anchor", - "$comment": "https://json-schema.org/keyword/comment", - "$defs": "https://json-schema.org/keyword/definitions", - "$dynamicAnchor": "https://json-schema.org/keyword/draft-2020-12/dynamicAnchor", - "$dynamicRef": "https://json-schema.org/keyword/draft-2020-12/dynamicRef", - "$id": "https://json-schema.org/keyword/id", - "$ref": "https://json-schema.org/keyword/ref", - "$vocabulary": "https://json-schema.org/keyword/vocabulary" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/applicator", { - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "contains": "https://json-schema.org/keyword/contains", - "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", - "if": "https://json-schema.org/keyword/if", - "then": "https://json-schema.org/keyword/then", - "else": "https://json-schema.org/keyword/else", - "items": "https://json-schema.org/keyword/items", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "prefixItems": "https://json-schema.org/keyword/prefixItems", - "properties": "https://json-schema.org/keyword/properties", - "propertyNames": "https://json-schema.org/keyword/propertyNames" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/validation", { - "const": "https://json-schema.org/keyword/const", - "dependentRequired": "https://json-schema.org/keyword/dependentRequired", - "enum": "https://json-schema.org/keyword/enum", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "maxContains": "https://json-schema.org/keyword/maxContains", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minContains": "https://json-schema.org/keyword/minContains", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "pattern": "https://json-schema.org/keyword/pattern", - "required": "https://json-schema.org/keyword/required", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/meta-data", { - "default": "https://json-schema.org/keyword/default", - "deprecated": "https://json-schema.org/keyword/deprecated", - "description": "https://json-schema.org/keyword/description", - "examples": "https://json-schema.org/keyword/examples", - "readOnly": "https://json-schema.org/keyword/readOnly", - "title": "https://json-schema.org/keyword/title", - "writeOnly": "https://json-schema.org/keyword/writeOnly" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/format-annotation", { - "format": "https://json-schema.org/keyword/draft-2020-12/format" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/format-assertion", { - "format": "https://json-schema.org/keyword/draft-2020-12/format-assertion" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/content", { - "contentEncoding": "https://json-schema.org/keyword/contentEncoding", - "contentMediaType": "https://json-schema.org/keyword/contentMediaType", - "contentSchema": "https://json-schema.org/keyword/contentSchema" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/unevaluated", { - "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", - "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" -}); - -loadDialect("https://json-schema.org/draft/2020-12/schema", { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true -}, true); - -registerSchema(metaSchema); -registerSchema(coreMetaSchema); -registerSchema(applicatorMetaSchema); -registerSchema(validationMetaSchema); -registerSchema(metaDataMetaSchema); -registerSchema(formatAnnotationMetaSchema); -registerSchema(formatAssertionMetaSchema); -registerSchema(contentMetaSchema); -registerSchema(unevaluatedMetaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js deleted file mode 100644 index cce8a3a2..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js +++ /dev/null @@ -1,46 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/applicator", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "prefixItems": { "$ref": "#/$defs/schemaArray" }, - "items": { "$dynamicRef": "#meta" }, - "contains": { "$dynamicRef": "#meta" }, - "additionalProperties": { "$dynamicRef": "#meta" }, - "properties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "propertyNames": { "$dynamicRef": "#meta" }, - "if": { "$dynamicRef": "#meta" }, - "then": { "$dynamicRef": "#meta" }, - "else": { "$dynamicRef": "#meta" }, - "allOf": { "$ref": "#/$defs/schemaArray" }, - "anyOf": { "$ref": "#/$defs/schemaArray" }, - "oneOf": { "$ref": "#/$defs/schemaArray" }, - "not": { "$dynamicRef": "#meta" } - }, - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$dynamicRef": "#meta" } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js deleted file mode 100644 index f6bd4171..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/content", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Content vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "contentSchema": { "$dynamicRef": "#meta" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js deleted file mode 100644 index f2473e40..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js +++ /dev/null @@ -1,54 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/core", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Core vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$anchor": { - "type": "string", - "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$dynamicRef": { - "type": "string", - "format": "uri-reference" - }, - "$dynamicAnchor": { - "type": "string", - "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" - }, - "$vocabulary": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { - "type": "string" - }, - "$defs": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "default": {} - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js deleted file mode 100644 index 4d7675d6..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js +++ /dev/null @@ -1,11 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Format vocabulary meta-schema for annotation results", - "type": ["object", "boolean"], - "properties": { - "format": { "type": "string" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js deleted file mode 100644 index 09248f38..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js +++ /dev/null @@ -1,11 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/format-assertion", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Format vocabulary meta-schema for assertion results", - "type": ["object", "boolean"], - "properties": { - "format": { "type": "string" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js deleted file mode 100644 index 7da3361f..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js +++ /dev/null @@ -1,34 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/meta-data", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Meta-data vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "deprecated": { - "type": "boolean", - "default": false - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js deleted file mode 100644 index 1a9ab172..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js +++ /dev/null @@ -1,12 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Unevaluated applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "unevaluatedItems": { "$dynamicRef": "#meta" }, - "unevaluatedProperties": { "$dynamicRef": "#meta" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js deleted file mode 100644 index 944ea40a..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js +++ /dev/null @@ -1,95 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/validation", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Validation vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/$defs/stringArray" }, - "dependentRequired": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "type": { - "anyOf": [ - { "$ref": "#/$defs/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/$defs/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js b/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js deleted file mode 100644 index d01a036d..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js +++ /dev/null @@ -1,44 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - "$dynamicAnchor": "meta", - - "title": "Core and Validation specifications meta-schema", - "allOf": [ - { "$ref": "meta/core" }, - { "$ref": "meta/applicator" }, - { "$ref": "meta/unevaluated" }, - { "$ref": "meta/validation" }, - { "$ref": "meta/meta-data" }, - { "$ref": "meta/format-annotation" }, - { "$ref": "meta/content" } - ], - "type": ["object", "boolean"], - "properties": { - "definitions": { - "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "default": {} - }, - "dependencies": { - "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$dynamicRef": "#meta" }, - { "$ref": "meta/validation#/$defs/stringArray" } - ] - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js b/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js deleted file mode 100644 index 50901147..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isDateTime } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/date-time", - handler: (dateTime) => typeof dateTime !== "string" || isDateTime(dateTime) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/date.js b/node_modules/@hyperjump/json-schema/formats/handlers/date.js deleted file mode 100644 index 3c7de2ba..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/date.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isDate } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/date", - handler: (date) => typeof date !== "string" || isDate(date) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js deleted file mode 100644 index 02344e4f..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isAsciiIdn } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/draft-04/hostname", - handler: (hostname) => typeof hostname !== "string" || isAsciiIdn(hostname) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/duration.js b/node_modules/@hyperjump/json-schema/formats/handlers/duration.js deleted file mode 100644 index 33d21220..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/duration.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isDuration } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/duration", - handler: (duration) => typeof duration !== "string" || isDuration(duration) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/email.js b/node_modules/@hyperjump/json-schema/formats/handlers/email.js deleted file mode 100644 index c335b627..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/email.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isEmail } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/email", - handler: (email) => typeof email !== "string" || isEmail(email) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js deleted file mode 100644 index 43b79a34..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isAsciiIdn } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/hostname", - handler: (hostname) => typeof hostname !== "string" || isAsciiIdn(hostname) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js b/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js deleted file mode 100644 index c12e42a4..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIdnEmail } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/idn-email", - handler: (email) => typeof email !== "string" || isIdnEmail(email) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js deleted file mode 100644 index b790e251..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIdn } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/idn-hostname", - handler: (hostname) => typeof hostname !== "string" || isIdn(hostname) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js b/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js deleted file mode 100644 index bdc5c35a..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIPv4 } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/ipv4", - handler: (ip) => typeof ip !== "string" || isIPv4(ip) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js b/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js deleted file mode 100644 index 69d785d2..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIPv6 } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/ipv6", - handler: (ip) => typeof ip !== "string" || isIPv6(ip) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js b/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js deleted file mode 100644 index 0b4c6836..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIriReference } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/iri-reference", - handler: (uri) => typeof uri !== "string" || isIriReference(uri) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/iri.js b/node_modules/@hyperjump/json-schema/formats/handlers/iri.js deleted file mode 100644 index e6a34efb..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/iri.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIri } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/iri", - handler: (uri) => typeof uri !== "string" || isIri(uri) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js b/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js deleted file mode 100644 index 1ab64048..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isJsonPointer } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/json-pointer", - handler: (pointer) => typeof pointer !== "string" || isJsonPointer(pointer) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/regex.js b/node_modules/@hyperjump/json-schema/formats/handlers/regex.js deleted file mode 100644 index c6ebca60..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/regex.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isRegex } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/regex", - handler: (regex) => typeof regex !== "string" || isRegex(regex) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js b/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js deleted file mode 100644 index e8fe386a..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isRelativeJsonPointer } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/relative-json-pointer", - handler: (pointer) => typeof pointer !== "string" || isRelativeJsonPointer(pointer) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/time.js b/node_modules/@hyperjump/json-schema/formats/handlers/time.js deleted file mode 100644 index c98d5b2f..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/time.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isTime } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/time", - handler: (time) => typeof time !== "string" || isTime(time) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js deleted file mode 100644 index 4cb2f1ba..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isUriReference } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/uri-reference", - handler: (uri) => typeof uri !== "string" || isUriReference(uri) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js deleted file mode 100644 index 94febf40..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isUriTemplate } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/uri-template", - handler: (uriTemplate) => typeof uriTemplate !== "string" || isUriTemplate(uriTemplate) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri.js deleted file mode 100644 index af883d85..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/uri.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isUri } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/uri", - handler: (uri) => typeof uri !== "string" || isUri(uri) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js b/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js deleted file mode 100644 index c25de033..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isUuid } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/uuid", - handler: (uuid) => typeof uuid !== "string" || isUuid(uuid) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/index.js b/node_modules/@hyperjump/json-schema/formats/index.js deleted file mode 100644 index c613edf0..00000000 --- a/node_modules/@hyperjump/json-schema/formats/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import { addFormat } from "../lib/keywords.js"; -import "./lite.js"; - -import idnEmail from "./handlers/idn-email.js"; -import hostname from "./handlers/hostname.js"; -import idnHostname from "./handlers/idn-hostname.js"; - - -addFormat(idnEmail); -addFormat(hostname); -addFormat(idnHostname); diff --git a/node_modules/@hyperjump/json-schema/formats/lite.js b/node_modules/@hyperjump/json-schema/formats/lite.js deleted file mode 100644 index f1d6aa64..00000000 --- a/node_modules/@hyperjump/json-schema/formats/lite.js +++ /dev/null @@ -1,38 +0,0 @@ -import { addFormat } from "../lib/keywords.js"; - -import draft04Hostname from "./handlers/draft-04/hostname.js"; -import dateTime from "./handlers/date-time.js"; -import date from "./handlers/date.js"; -import time from "./handlers/time.js"; -import duration from "./handlers/duration.js"; -import email from "./handlers/email.js"; -import ipv4 from "./handlers/ipv4.js"; -import ipv6 from "./handlers/ipv6.js"; -import uri from "./handlers/uri.js"; -import uriReference from "./handlers/uri-reference.js"; -import iri from "./handlers/iri.js"; -import iriReference from "./handlers/iri-reference.js"; -import uuid from "./handlers/uuid.js"; -import uriTemplate from "./handlers/uri-template.js"; -import jsonPointer from "./handlers/json-pointer.js"; -import relativeJsonPointer from "./handlers/relative-json-pointer.js"; -import regex from "./handlers/regex.js"; - - -addFormat(draft04Hostname); -addFormat(dateTime); -addFormat(date); -addFormat(time); -addFormat(duration); -addFormat(email); -addFormat(ipv4); -addFormat(ipv6); -addFormat(uri); -addFormat(uriReference); -addFormat(iri); -addFormat(iriReference); -addFormat(uuid); -addFormat(uriTemplate); -addFormat(jsonPointer); -addFormat(relativeJsonPointer); -addFormat(regex); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js b/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js deleted file mode 100644 index 82a59522..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js +++ /dev/null @@ -1,174 +0,0 @@ -export default { - "id": "https://spec.openapis.org/oas/3.0/dialect", - "$schema": "http://json-schema.org/draft-04/schema#", - - "type": "object", - "properties": { - "title": { "type": "string" }, - "multipleOf": { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - "maximum": { "type": "number" }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { "type": "number" }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { "$ref": "#/definitions/positiveInteger" }, - "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/definitions/positiveInteger" }, - "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { "$ref": "#/definitions/positiveInteger" }, - "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "required": { - "type": "array", - "items": { "type": "string" }, - "minItems": 1, - "uniqueItems": true - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": false - }, - "type": { "enum": ["array", "boolean", "integer", "number", "object", "string"] }, - "not": { "$ref": "#" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "items": { "$ref": "#" }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" } - }, - "additionalProperties": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, - "description": { "type": "string" }, - "format": { "type": "string" }, - "default": {}, - "nullable": { - "type": "boolean", - "default": false - }, - "discriminator": { "$ref": "#/definitions/Discriminator" }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "example": {}, - "externalDocs": { "$ref": "#/definitions/ExternalDocumentation" }, - "deprecated": { - "type": "boolean", - "default": false - }, - "xml": { "$ref": "#/definitions/XML" }, - "$ref": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false, - - "anyOf": [ - { - "not": { "required": ["$ref"] } - }, - { "maxProperties": 1 } - ], - - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "positiveInteger": { - "type": "integer", - "minimum": 0 - }, - "positiveIntegerDefault0": { - "allOf": [{ "$ref": "#/definitions/positiveInteger" }, { "default": 0 }] - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ExternalDocumentation": { - "type": "object", - "required": ["url"], - "properties": { - "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "XML": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { "type": "string" }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js b/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js deleted file mode 100644 index f45aa21d..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/discriminator"; - -const compile = (schema) => Browser.value(schema); -const interpret = () => true; -const annotation = (discriminator) => discriminator; - -export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/example.js b/node_modules/@hyperjump/json-schema/openapi-3-0/example.js deleted file mode 100644 index 98bc5869..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/example.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/example"; - -const compile = (schema) => Browser.value(schema); -const interpret = () => true; -const annotation = (example) => example; - -export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js b/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js deleted file mode 100644 index bfee8163..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/externalDocs"; - -const compile = (schema) => Browser.value(schema); -const interpret = () => true; -const annotation = (externalDocs) => externalDocs; - -export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts deleted file mode 100644 index 825de2a2..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts +++ /dev/null @@ -1,298 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type OasSchema30 = { - $ref: string; -} | { - title?: string; - description?: string; - default?: Json; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: boolean; - minimum?: number; - exclusiveMinimum?: boolean; - maxLength?: number; - minLength?: number; - pattern?: string; - items?: OasSchema30; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxProperties?: number; - minProperties?: number; - required?: string[]; - additionalProperties?: boolean | OasSchema30; - properties?: Record; - enum?: Json[]; - type?: JsonSchemaType; - nullable?: boolean; - format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri" | "int32" | "int64" | "float" | "double" | "byte" | "binary" | "date" | "password"; - allOf?: OasSchema30[]; - anyOf?: OasSchema30[]; - oneOf?: OasSchema30[]; - not?: OasSchema30; - example?: Json; - discriminator?: Discriminator; - externalDocs?: ExternalDocs; - xml?: Xml; -}; - -type Discriminator = { - propertyName: string; - mappings?: Record; -}; - -type ExternalDocs = { - url: string; - description?: string; -}; - -type Xml = { - name?: string; - namespace?: string; - prefix?: string; - attribute?: boolean; - wrapped?: boolean; -}; - -export type OpenApi30 = { - openapi: string; - info: Info; - externalDocs?: ExternalDocs; - servers?: Server[]; - security?: SecurityRequirement[]; - tags?: Tag[]; - paths: Paths; - components?: Components; -}; - -type Reference = { - $ref: "string"; -}; - -type Info = { - title: string; - description?: string; - termsOfService?: string; - contact?: Contact; - license?: License; - version: string; -}; - -type Contact = { - name?: string; - url?: string; - email?: string; -}; - -type License = { - name: string; - url?: string; -}; - -type Server = { - url: string; - description?: string; - variables?: Record; -}; - -type ServerVariable = { - enum?: string[]; - default: string; - description?: string; -}; - -type Components = { - schemas?: Record; - responses?: Record; - parameters?: Record; - examples?: Record; - requestBodies?: Record; - headers?: Record; - securitySchemes: Record; - links: Record; - callbacks: Record; -}; - -type Response = { - description: string; - headers?: Record; - content?: Record; - links?: Record; -}; - -type MediaType = { - schema?: OasSchema30; - example?: unknown; - examples?: Record; - encoding?: Record; -}; - -type Example = { - summary?: string; - description?: string; - value?: unknown; - externalValue?: string; -}; - -type Header = { - description?: string; - required?: boolean; - deprecated?: boolean; - allowEmptyValue?: boolean; - style?: "simple"; - explode?: boolean; - allowReserved?: boolean; - schema?: OasSchema30; - content?: Record; - example?: unknown; - examples: Record; -}; - -type Paths = Record; - -type PathItem = { - $ref?: string; - summary?: string; - description?: string; - servers: Server[]; - parameters: (Parameter | Reference)[]; - get?: Operation; - put?: Operation; - post?: Operation; - delete?: Operation; - options?: Operation; - head?: Operation; - patch?: Operation; - trace?: Operation; -}; - -type Operation = { - tags?: string[]; - summary?: string; - description?: string; - externalDocs?: ExternalDocs; - operationId?: string; - parameters?: (Parameter | Reference)[]; - requestBody?: RequestBody | Reference; - responses: Responses; - callbacks?: Record; - deprecated?: boolean; - security?: SecurityRequirement[]; - servers?: Server[]; -}; - -type Responses = Record; - -type SecurityRequirement = Record; - -type Tag = { - name: string; - description?: string; - externalDocs?: ExternalDocs; -}; - -type Parameter = { - name: string; - in: string; - description?: string; - required?: boolean; - deprecated?: boolean; - allowEmptyValue?: boolean; - style?: string; - explode?: boolean; - allowReserved?: boolean; - schema?: OasSchema30; - content?: Record; - example?: unknown; - examples?: Record; -}; - -type RequestBody = { - description?: string; - content: Record; - required?: boolean; -}; - -type SecurityScheme = APIKeySecurityScheme | HTTPSecurityScheme | OAuth2SecurityScheme | OpenIdConnectSecurityScheme; - -type APIKeySecurityScheme = { - type: "apiKey"; - name: string; - in: "header" | "query" | "cookie"; - description?: string; -}; - -type HTTPSecurityScheme = { - scheme: string; - bearerFormat?: string; - description?: string; - type: "http"; -}; - -type OAuth2SecurityScheme = { - type: "oauth2"; - flows: OAuthFlows; - description?: string; -}; - -type OpenIdConnectSecurityScheme = { - type: "openIdConnect"; - openIdConnectUrl: string; - description?: string; -}; - -type OAuthFlows = { - implicit?: ImplicitOAuthFlow; - password?: PasswordOAuthFlow; - clientCredentials?: ClientCredentialsFlow; - authorizationCode?: AuthorizationCodeOAuthFlow; -}; - -type ImplicitOAuthFlow = { - authorizationUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type PasswordOAuthFlow = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type ClientCredentialsFlow = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type AuthorizationCodeOAuthFlow = { - authorizationUrl: string; - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type Link = { - operationId?: string; - operationRef?: string; - parameters?: Record; - requestBody?: unknown; - description?: string; - server?: Server; -}; - -type Callback = Record; - -type Encoding = { - contentType?: string; - headers?: Record; - style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; - explode?: boolean; - allowReserved?: boolean; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/index.js b/node_modules/@hyperjump/json-schema/openapi-3-0/index.js deleted file mode 100644 index d75b9009..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/index.js +++ /dev/null @@ -1,77 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import "../lib/openapi.js"; - -import dialectSchema from "./dialect.js"; -import schema from "./schema.js"; - -import discriminator from "./discriminator.js"; -import example from "./example.js"; -import externalDocs from "./externalDocs.js"; -import nullable from "./nullable.js"; -import type from "./type.js"; -import xml from "./xml.js"; - - -export * from "../draft-04/index.js"; - -addKeyword(discriminator); -addKeyword(example); -addKeyword(externalDocs); -addKeyword(nullable); -addKeyword(type); -addKeyword(xml); - -const jsonSchemaVersion = "https://spec.openapis.org/oas/3.0/dialect"; - -defineVocabulary(jsonSchemaVersion, { - "$ref": "https://json-schema.org/keyword/draft-04/ref", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "default": "https://json-schema.org/keyword/default", - "deprecated": "https://json-schema.org/keyword/deprecated", - "description": "https://json-schema.org/keyword/description", - "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", - "enum": "https://json-schema.org/keyword/enum", - "example": "https://spec.openapis.org/oas/3.0/keyword/example", - "exclusiveMaximum": "https://json-schema.org/keyword/draft-04/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/draft-04/exclusiveMinimum", - "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", - "format": "https://json-schema.org/keyword/draft-04/format", - "items": "https://json-schema.org/keyword/draft-04/items", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/draft-04/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/draft-04/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "not": "https://json-schema.org/keyword/not", - "nullable": "https://spec.openapis.org/oas/3.0/keyword/nullable", - "oneOf": "https://json-schema.org/keyword/oneOf", - "pattern": "https://json-schema.org/keyword/pattern", - "properties": "https://json-schema.org/keyword/properties", - "readOnly": "https://json-schema.org/keyword/readOnly", - "required": "https://json-schema.org/keyword/required", - "title": "https://json-schema.org/keyword/title", - "type": "https://spec.openapis.org/oas/3.0/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems", - "writeOnly": "https://json-schema.org/keyword/writeOnly", - "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" -}); - -loadDialect(jsonSchemaVersion, { - [jsonSchemaVersion]: true -}); - -loadDialect("https://spec.openapis.org/oas/3.0/schema", { - [jsonSchemaVersion]: true -}); - -registerSchema(dialectSchema); - -registerSchema(schema, "https://spec.openapis.org/oas/3.0/schema"); -registerSchema(schema, "https://spec.openapis.org/oas/3.0/schema/latest"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js b/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js deleted file mode 100644 index 0d5450c4..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/nullable"; - -const compile = (schema) => Browser.value(schema); - -const interpret = () => true; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js deleted file mode 100644 index c715879e..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js +++ /dev/null @@ -1,1368 +0,0 @@ -export default { - "id": "https://spec.openapis.org/oas/3.0/schema/2021-09-28", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Validation schema for OpenAPI Specification 3.0.X.", - "type": "object", - "required": [ - "openapi", - "info", - "paths" - ], - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.0\\.\\d(-.+)?$" - }, - "info": { - "$ref": "#/definitions/Info" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/Tag" - }, - "uniqueItems": true - }, - "paths": { - "$ref": "#/definitions/Paths" - }, - "components": { - "$ref": "#/definitions/Components" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } - }, - "Info": { - "type": "object", - "required": [ - "title", - "version" - ], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/definitions/Contact" - }, - "license": { - "$ref": "#/definitions/License" - }, - "version": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Contact": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "License": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Server": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ServerVariable" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ServerVariable": { - "type": "object", - "required": [ - "default" - ], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Components": { - "type": "object", - "properties": { - "schemas": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { "$ref": "#/definitions/Schema" } - } - }, - "responses": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Response" - } - ] - } - } - }, - "parameters": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Parameter" - } - ] - } - } - }, - "examples": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Example" - } - ] - } - } - }, - "requestBodies": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/RequestBody" - } - ] - } - } - }, - "headers": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Header" - } - ] - } - } - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } - }, - "links": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Link" - } - ] - } - } - }, - "callbacks": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Callback" - } - ] - } - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Schema": { "$ref": "/oas/3.0/dialect" }, - "Response": { - "type": "object", - "required": [ - "description" - ], - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Header" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Link" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "MediaType": { - "type": "object", - "properties": { - "schema": { "$ref": "#/definitions/Schema" }, - "example": { - }, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Encoding" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - } - ] - }, - "Example": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": { - }, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Header": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "type": "boolean", - "default": false - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "allowEmptyValue": { - "type": "boolean", - "default": false - }, - "style": { - "type": "string", - "enum": [ - "simple" - ], - "default": "simple" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - }, - "schema": { "$ref": "#/definitions/Schema" }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "example": { - }, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - }, - { - "$ref": "#/definitions/SchemaXORContent" - } - ] - }, - "Paths": { - "type": "object", - "patternProperties": { - "^\\/": { - "$ref": "#/definitions/PathItem" - }, - "^x-": { - } - }, - "additionalProperties": false - }, - "PathItem": { - "type": "object", - "properties": { - "$ref": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - }, - "parameters": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Parameter" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "uniqueItems": true - } - }, - "patternProperties": { - "^(get|put|post|delete|options|head|patch|trace)$": { - "$ref": "#/definitions/Operation" - }, - "^x-": { - } - }, - "additionalProperties": false - }, - "Operation": { - "type": "object", - "required": [ - "responses" - ], - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Parameter" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "uniqueItems": true - }, - "requestBody": { - "oneOf": [ - { - "$ref": "#/definitions/RequestBody" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "responses": { - "$ref": "#/definitions/Responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Callback" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Responses": { - "type": "object", - "properties": { - "default": { - "oneOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "patternProperties": { - "^[1-5](?:\\d{2}|XX)$": { - "oneOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "^x-": { - } - }, - "minProperties": 1, - "additionalProperties": false - }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Tag": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ExampleXORExamples": { - "description": "Example and examples are mutually exclusive", - "not": { - "required": [ - "example", - "examples" - ] - } - }, - "SchemaXORContent": { - "description": "Schema and content are mutually exclusive, at least one is required", - "not": { - "required": [ - "schema", - "content" - ] - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ], - "description": "Some properties are not allowed if content is present", - "allOf": [ - { - "not": { - "required": [ - "style" - ] - } - }, - { - "not": { - "required": [ - "explode" - ] - } - }, - { - "not": { - "required": [ - "allowReserved" - ] - } - }, - { - "not": { - "required": [ - "example" - ] - } - }, - { - "not": { - "required": [ - "examples" - ] - } - } - ] - } - ] - }, - "Parameter": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean", - "default": false - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "allowEmptyValue": { - "type": "boolean", - "default": false - }, - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - }, - "schema": { "$ref": "#/definitions/Schema" }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "example": { - }, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "required": [ - "name", - "in" - ], - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - }, - { - "$ref": "#/definitions/SchemaXORContent" - }, - { - "$ref": "#/definitions/ParameterLocation" - } - ] - }, - "ParameterLocation": { - "description": "Parameter location", - "oneOf": [ - { - "description": "Parameter in path", - "required": [ - "required" - ], - "properties": { - "in": { - "enum": [ - "path" - ] - }, - "style": { - "enum": [ - "matrix", - "label", - "simple" - ], - "default": "simple" - }, - "required": { - "enum": [ - true - ] - } - } - }, - { - "description": "Parameter in query", - "properties": { - "in": { - "enum": [ - "query" - ] - }, - "style": { - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ], - "default": "form" - } - } - }, - { - "description": "Parameter in header", - "properties": { - "in": { - "enum": [ - "header" - ] - }, - "style": { - "enum": [ - "simple" - ], - "default": "simple" - } - } - }, - { - "description": "Parameter in cookie", - "properties": { - "in": { - "enum": [ - "cookie" - ] - }, - "style": { - "enum": [ - "form" - ], - "default": "form" - } - } - } - ] - }, - "RequestBody": { - "type": "object", - "required": [ - "content" - ], - "properties": { - "description": { - "type": "string" - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - } - }, - "required": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/APIKeySecurityScheme" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - }, - { - "$ref": "#/definitions/OAuth2SecurityScheme" - }, - { - "$ref": "#/definitions/OpenIdConnectSecurityScheme" - } - ] - }, - "APIKeySecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "bearerFormat": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "oneOf": [ - { - "description": "Bearer", - "properties": { - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - } - }, - { - "description": "Non Bearer", - "not": { - "required": [ - "bearerFormat" - ] - }, - "properties": { - "scheme": { - "not": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - } - } - } - ] - }, - "OAuth2SecurityScheme": { - "type": "object", - "required": [ - "type", - "flows" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flows": { - "$ref": "#/definitions/OAuthFlows" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "OpenIdConnectSecurityScheme": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] - }, - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "OAuthFlows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/definitions/ImplicitOAuthFlow" - }, - "password": { - "$ref": "#/definitions/PasswordOAuthFlow" - }, - "clientCredentials": { - "$ref": "#/definitions/ClientCredentialsFlow" - }, - "authorizationCode": { - "$ref": "#/definitions/AuthorizationCodeOAuthFlow" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ImplicitOAuthFlow": { - "type": "object", - "required": [ - "authorizationUrl", - "scopes" - ], - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "PasswordOAuthFlow": { - "type": "object", - "required": [ - "tokenUrl", - "scopes" - ], - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ClientCredentialsFlow": { - "type": "object", - "required": [ - "tokenUrl", - "scopes" - ], - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "AuthorizationCodeOAuthFlow": { - "type": "object", - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Link": { - "type": "object", - "properties": { - "operationId": { - "type": "string" - }, - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "parameters": { - "type": "object", - "additionalProperties": { - } - }, - "requestBody": { - }, - "description": { - "type": "string" - }, - "server": { - "$ref": "#/definitions/Server" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "not": { - "description": "Operation Id and Operation Ref are mutually exclusive", - "required": [ - "operationId", - "operationRef" - ] - } - }, - "Callback": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/PathItem" - }, - "patternProperties": { - "^x-": { - } - } - }, - "Encoding": { - "type": "object", - "properties": { - "contentType": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Header" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "style": { - "type": "string", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - } - }, - "additionalProperties": false - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/type.js b/node_modules/@hyperjump/json-schema/openapi-3-0/type.js deleted file mode 100644 index 1cf47195..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/type.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getKeywordName } from "../lib/experimental.js"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/type"; - -const compile = async (schema, _ast, parentSchema) => { - const nullableKeyword = getKeywordName(schema.document.dialectId, "https://spec.openapis.org/oas/3.0/keyword/nullable"); - const nullable = await Browser.step(nullableKeyword, parentSchema); - return Browser.value(nullable) === true ? ["null", Browser.value(schema)] : Browser.value(schema); -}; - -const interpret = (type, instance) => typeof type === "string" - ? isTypeOf(instance)(type) - : type.some(isTypeOf(instance)); - -const isTypeOf = (instance) => (type) => type === "integer" - ? Instance.typeOf(instance) === "number" && Number.isInteger(Instance.value(instance)) - : Instance.typeOf(instance) === type; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js b/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js deleted file mode 100644 index e6476570..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/xml"; - -const compile = (schema) => Browser.value(schema); -const interpret = () => true; -const annotation = (xml) => xml; - -export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js deleted file mode 100644 index 6a2f4b5b..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js +++ /dev/null @@ -1,22 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - "$dynamicAnchor": "meta", - - "title": "OpenAPI 3.1 Schema Object Dialect", - "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.1 Descriptions", - - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "https://spec.openapis.org/oas/3.1/meta/base" } - ] -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts deleted file mode 100644 index a437246f..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts +++ /dev/null @@ -1,364 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type OasSchema31 = boolean | { - $schema?: "https://spec.openapis.org/oas/3.1/dialect/base"; - $id?: string; - $anchor?: string; - $ref?: string; - $dynamicRef?: string; - $dynamicAnchor?: string; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: OasSchema31; - unevaluatedItems?: OasSchema31; - prefixItems?: OasSchema31[]; - items?: OasSchema31; - contains?: OasSchema31; - additionalProperties?: OasSchema31; - unevaluatedProperties?: OasSchema31; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: OasSchema31; - if?: OasSchema31; - then?: OasSchema31; - else?: OasSchema31; - allOf?: OasSchema31[]; - anyOf?: OasSchema31[]; - oneOf?: OasSchema31[]; - not?: OasSchema31; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: OasSchema31; - example?: Json; - discriminator?: Discriminator; - externalDocs?: ExternalDocs; - xml?: Xml; -}; - -type Discriminator = { - propertyName: string; - mappings?: Record; -}; - -type ExternalDocs = { - url: string; - description?: string; -}; - -type Xml = { - name?: string; - namespace?: string; - prefix?: string; - attribute?: boolean; - wrapped?: boolean; -}; - -export type OpenApi = { - openapi: string; - info: Info; - jsonSchemaDialect?: string; - servers?: Server[]; - security?: SecurityRequirement[]; - tags?: Tag[]; - externalDocs?: ExternalDocumentation; - paths?: Record; - webhooks?: Record; - components?: Components; -}; - -type Info = { - title: string; - summary?: string; - description?: string; - termsOfService?: string; - contact?: Contact; - license?: License; - version: string; -}; - -type Contact = { - name?: string; - url?: string; - email?: string; -}; - -type License = { - name: string; - url?: string; - identifier?: string; -}; - -type Server = { - url: string; - description?: string; - variables?: Record; -}; - -type ServerVariable = { - enum?: string[]; - default: string; - description?: string; -}; - -type Components = { - schemas?: Record; - responses?: Record; - parameters?: Record; - examples?: Record; - requestBodies?: Record; - headers?: Record; - securitySchemes?: Record; - links?: Record; - callbacks?: Record; - pathItems?: Record; -}; - -type PathItem = { - summary?: string; - description?: string; - servers?: Server[]; - parameters?: (Parameter | Reference)[]; - get?: Operation; - put?: Operation; - post?: Operation; - delete?: Operation; - options?: Operation; - head?: Operation; - patch?: Operation; - trace?: Operation; -}; - -type Operation = { - tags?: string[]; - summary?: string; - description?: string; - externalDocs?: ExternalDocumentation; - operationId?: string; - parameters?: (Parameter | Reference)[]; - requestBody?: RequestBody | Reference; - responses?: Record; - callbacks?: Record; - deprecated?: boolean; - security?: SecurityRequirement[]; - servers?: Server[]; -}; - -type ExternalDocumentation = { - description?: string; - url: string; -}; - -export type Parameter = { - name: string; - description?: string; - required?: boolean; - deprecated?: boolean; - allowEmptyValue?: boolean; -} & ( - ( - { - in: "path"; - required: true; - } & ( - ({ style?: "matrix" | "label" | "simple" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "query"; - } & ( - ({ style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "header"; - } & ( - ({ style?: "simple" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "cookie"; - } & ( - ({ style?: "form" } & SchemaParameter) - | ContentParameter - ) - ) -); - -type ContentParameter = { - schema?: never; - content: Record; -}; - -type SchemaParameter = { - explode?: boolean; - allowReserved?: boolean; - schema: OasSchema32; - content?: never; -} & Examples; - -type RequestBody = { - description?: string; - content: Content; - required?: boolean; -}; - -type Content = Record; - -type MediaType = { - schema?: OasSchema31; - encoding?: Record; -} & Examples; - -type Encoding = { - contentType?: string; - headers?: Record; - style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; - explode?: boolean; - allowReserved?: boolean; -}; - -type Response = { - description: string; - headers?: Record; - content?: Content; - links?: Record; -}; - -type Callbacks = Record; - -type Example = { - summary?: string; - description?: string; - value?: Json; - externalValue?: string; -}; - -type Link = { - operationRef?: string; - operationId?: string; - parameters?: Record; - requestBody?: Json; - description?: string; - server?: Server; -}; - -type Header = { - description?: string; - required?: boolean; - deprecated?: boolean; - schema?: OasSchema31; - style?: "simple"; - explode?: boolean; - content?: Content; -}; - -type Tag = { - name: string; - description?: string; - externalDocs?: ExternalDocumentation; -}; - -type Reference = { - $ref: string; - summary?: string; - description?: string; -}; - -type SecurityScheme = { - type: "apiKey"; - description?: string; - name: string; - in: "query" | "header" | "cookie"; -} | { - type: "http"; - description?: string; - scheme: string; - bearerFormat?: string; -} | { - type: "mutualTLS"; - description?: string; -} | { - type: "oauth2"; - description?: string; - flows: OauthFlows; -} | { - type: "openIdConnect"; - description?: string; - openIdConnectUrl: string; -}; - -type OauthFlows = { - implicit?: Implicit; - password?: Password; - clientCredentials?: ClientCredentials; - authorizationCode?: AuthorizationCode; -}; - -type Implicit = { - authorizationUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type Password = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type ClientCredentials = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type AuthorizationCode = { - authorizationUrl: string; - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type SecurityRequirement = Record; - -type Examples = { - example?: Json; - examples?: Record; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/index.js b/node_modules/@hyperjump/json-schema/openapi-3-1/index.js deleted file mode 100644 index a2840f53..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/index.js +++ /dev/null @@ -1,49 +0,0 @@ -import { addKeyword, defineVocabulary } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import "../lib/openapi.js"; - -import dialectSchema from "./dialect/base.js"; -import vocabularySchema from "./meta/base.js"; -import schema from "./schema.js"; -import schemaBase from "./schema-base.js"; -import schemaDraft2020 from "./schema-draft-2020-12.js"; -import schemaDraft2019 from "./schema-draft-2019-09.js"; -import schemaDraft07 from "./schema-draft-07.js"; -import schemaDraft06 from "./schema-draft-06.js"; -import schemaDraft04 from "./schema-draft-04.js"; - -import discriminator from "../openapi-3-0/discriminator.js"; -import example from "../openapi-3-0/example.js"; -import externalDocs from "../openapi-3-0/externalDocs.js"; -import xml from "../openapi-3-0/xml.js"; - - -export * from "../draft-2020-12/index.js"; - -addKeyword(discriminator); -addKeyword(example); -addKeyword(externalDocs); -addKeyword(xml); - -defineVocabulary("https://spec.openapis.org/oas/3.1/vocab/base", { - "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", - "example": "https://spec.openapis.org/oas/3.0/keyword/example", - "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", - "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" -}); - -registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.1/meta/base"); -registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.1/dialect/base"); - -// Current Schemas -registerSchema(schema, "https://spec.openapis.org/oas/3.1/schema"); -registerSchema(schema, "https://spec.openapis.org/oas/3.1/schema/latest"); -registerSchema(schemaBase, "https://spec.openapis.org/oas/3.1/schema-base"); -registerSchema(schemaBase, "https://spec.openapis.org/oas/3.1/schema-base/latest"); - -// Alternative dialect schemas -registerSchema(schemaDraft2020, "https://spec.openapis.org/oas/3.1/schema-draft-2020-12"); -registerSchema(schemaDraft2019, "https://spec.openapis.org/oas/3.1/schema-draft-2019-09"); -registerSchema(schemaDraft07, "https://spec.openapis.org/oas/3.1/schema-draft-07"); -registerSchema(schemaDraft06, "https://spec.openapis.org/oas/3.1/schema-draft-06"); -registerSchema(schemaDraft04, "https://spec.openapis.org/oas/3.1/schema-draft-04"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js deleted file mode 100644 index 303423f1..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js +++ /dev/null @@ -1,77 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "OAS Base Vocabulary", - "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", - - "type": ["object", "boolean"], - "properties": { - "example": true, - "discriminator": { "$ref": "#/$defs/discriminator" }, - "externalDocs": { "$ref": "#/$defs/external-docs" }, - "xml": { "$ref": "#/$defs/xml" } - }, - "$defs": { - "extensible": { - "patternProperties": { - "^x-": true - } - }, - "discriminator": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "required": ["propertyName"], - "unevaluatedProperties": false - }, - "external-docs": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - } - }, - "required": ["url"], - "unevaluatedProperties": false - }, - "xml": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean" - }, - "wrapped": { - "type": "boolean" - } - }, - "unevaluatedProperties": false - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js deleted file mode 100644 index a84f8ab7..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://spec.openapis.org/oas/3.1/dialect/base" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js deleted file mode 100644 index c91acddc..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "OpenAPI v3.1.x documents using draft-04 JSON Schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-04/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js deleted file mode 100644 index 87186cf0..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "OpenAPI v3.1.x documents using draft-06 JSON Schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-06/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js deleted file mode 100644 index f4d2f8b5..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "OpenAPI v3.1.x documents using draft-07 JSON Schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-07/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js deleted file mode 100644 index 11f27166..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "openapi v3.1.x documents using 2019-09 json schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonschemadialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://json-schema.org/draft/2019-09/schema" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js deleted file mode 100644 index 1b0367f8..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "openapi v3.1.x documents using 2020-12 json schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonschemadialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://json-schema.org/draft/2020-12/schema" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js deleted file mode 100644 index 6aed8baa..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js +++ /dev/null @@ -1,1407 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents without Schema Object validation", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri-reference", - "default": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.1#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.1#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.1#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-object", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.1#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.1#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.1#path-item-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.1#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.1#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.1#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "const": "form" - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.1#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.1#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.1#media-type-object", - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.1#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "unevaluatedProperties": false - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.1#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "if": { - "$comment": "either default, or at least one response code property must exist", - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": false - } - }, - "then": { - "required": [ - "default" - ] - } - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.1#response-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.1#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.1#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "not": { - "required": [ - "value", - "externalValue" - ] - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.1#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.1#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - } - }, - "$ref": "#/$defs/examples" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.1#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.1#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.1#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.1#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js deleted file mode 100644 index 3c606117..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js +++ /dev/null @@ -1,22 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - "$dynamicAnchor": "meta", - - "title": "OpenAPI 3.2 Schema Object Dialect", - "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.2.x Descriptions", - - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "https://spec.openapis.org/oas/3.2/meta" } - ] -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts deleted file mode 100644 index 80b94a5c..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts +++ /dev/null @@ -1,415 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type OasSchema32 = boolean | { - $schema?: "https://spec.openapis.org/oas/3.2/dialect/base"; - $id?: string; - $anchor?: string; - $ref?: string; - $dynamicRef?: string; - $dynamicAnchor?: string; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: OasSchema32; - unevaluatedItems?: OasSchema32; - prefixItems?: OasSchema32[]; - items?: OasSchema32; - contains?: OasSchema32; - additionalProperties?: OasSchema32; - unevaluatedProperties?: OasSchema32; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: OasSchema32; - if?: OasSchema32; - then?: OasSchema32; - else?: OasSchema32; - allOf?: OasSchema32[]; - anyOf?: OasSchema32[]; - oneOf?: OasSchema32[]; - not?: OasSchema32; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: OasSchema32; - example?: Json; - discriminator?: Discriminator; - externalDocs?: ExternalDocs; - xml?: Xml; -}; - -type Discriminator = { - propertyName: string; - mappings?: Record; - defaultMapping?: string; -}; - -type ExternalDocs = { - url: string; - description?: string; -}; - -type Xml = { - nodeType?: "element" | "attribute" | "text" | "cdata" | "none"; - name?: string; - namespace?: string; - prefix?: string; - attribute?: boolean; - wrapped?: boolean; -}; - -export type OpenApi = { - openapi: string; - $self?: string; - info: Info; - jsonSchemaDialect?: string; - servers?: Server[]; - paths?: Record; - webhooks?: Record; - components?: Components; - security?: SecurityRequirement[]; - tags?: Tag[]; - externalDocs?: ExternalDocs; -}; - -type Info = { - title: string; - summary?: string; - description?: string; - termsOfService?: string; - contact?: Contact; - license?: License; - version: string; -}; - -type Contact = { - name?: string; - url?: string; - email?: string; -}; - -type License = { - name: string; - identifier?: string; - url?: string; -}; - -type Server = { - url: string; - description?: string; - name?: string; - variables?: Record; -}; - -type ServerVariable = { - enum?: string[]; - default: string; - description?: string; -}; - -type Components = { - schemas?: Record; - responses?: Record; - parameters?: Record; - examples?: Record; - requestBodies?: Record; - headers?: Record; - securitySchemes?: Record; - links?: Record; - callbacks?: Record; - pathItems?: Record; - mediaTypes?: Record; -}; - -type PathItem = { - $ref?: string; - summary?: string; - description?: string; - get?: Operation; - put?: Operation; - post?: Operation; - delete?: Operation; - options?: Operation; - head?: Operation; - patch?: Operation; - trace?: Operation; - query?: Operation; - additionOperations?: Record; - servers?: Server[]; - parameters?: (Parameter | Reference)[]; -}; - -type Operation = { - tags?: string[]; - summary?: string; - description?: string; - externalDocs?: ExternalDocs; - operationId?: string; - parameters?: (Parameter | Reference)[]; - requestBody?: RequestBody | Reference; - responses?: Responses; - callbacks?: Record; - deprecated?: boolean; - security?: SecurityRequirement[]; - servers?: Server[]; -}; - -export type Parameter = { - name: string; - description?: string; - required?: boolean; - deprecated?: boolean; - allowEmptyValue?: boolean; -} & Examples & ( - ( - { - in: "path"; - required: true; - } & ( - ({ style?: "matrix" | "label" | "simple" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "query"; - } & ( - ({ style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "header"; - } & ( - ({ style?: "simple" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "cookie"; - } & ( - ({ style?: "cookie" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { in: "querystring" } & ContentParameter - ) -); - -type ContentParameter = { - schema?: never; - content: Record; -}; - -type SchemaParameter = { - explode?: boolean; - allowReserved?: boolean; - schema: OasSchema32; - content?: never; -}; - -type RequestBody = { - description?: string; - content: Record; - required?: boolean; -}; - -type MediaType = { - schema?: OasSchema32; - itemSchema?: OasSchema32; -} & Examples & ({ - encoding?: Record; - prefixEncoding?: never; - itemEncoding?: never; -} | { - encoding?: never; - prefixEncoding?: Encoding[]; - itemEncoding?: Encoding; -}); - -type Encoding = { - contentType?: string; - headers?: Record; - style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; - explode?: boolean; - allowReserved?: boolean; -} & ({ - encoding?: Record; - prefixEncoding?: never; - itemEncoding?: never; -} | { - encoding?: never; - prefixEncoding?: Encoding[]; - itemEncoding?: Encoding; -}); - -type Responses = { - default?: Response | Reference; -} & Record; - -type Response = { - summary?: string; - description?: string; - headers?: Record; - content?: Record; - links?: Record; -}; - -type Callbacks = Record; - -type Examples = { - example?: Json; - examples?: Record; -}; - -type Example = { - summary?: string; - description?: string; -} & ({ - value?: Json; - dataValue?: never; - serializedValue?: never; - externalValue?: never; -} | { - value?: never; - dataValue?: Json; - serializedValue?: string; - externalValue?: string; -}); - -type Link = { - operationRef?: string; - operationId?: string; - parameters?: Record; - requestBody?: Json; - description?: string; - server?: Server; -}; - -type Header = { - description?: string; - required?: boolean; - deprecated?: boolean; -} & Examples & ({ - style?: "simple"; - explode?: boolean; - schema: OasSchema32; -} | { - content: Record; -}); - -type Tag = { - name: string; - summary?: string; - description?: string; - externalDocs?: ExternalDocs; - parent?: string; - kind?: string; -}; - -type Reference = { - $ref: string; - summary?: string; - description?: string; -}; - -type SecurityScheme = { - type: "apiKey"; - description?: string; - name: string; - in: "query" | "header" | "cookie"; - deprecated?: boolean; -} | { - type: "http"; - description?: string; - scheme: string; - bearerFormat?: string; - deprecated?: boolean; -} | { - type: "mutualTLS"; - description?: string; - deprecated?: boolean; -} | { - type: "oauth2"; - description?: string; - flows: OauthFlows; - oauth2MetadataUrl?: string; - deprecated?: boolean; -} | { - type: "openIdConnect"; - description?: string; - openIdConnectUrl: string; - deprecated?: boolean; -}; - -type OauthFlows = { - implicit?: Implicit; - password?: Password; - clientCredentials?: ClientCredentials; - authorizationCode?: AuthorizationCode; - deviceAuthorization?: DeviceAuthorization; -}; - -type Implicit = { - authorizationUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type Password = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type ClientCredentials = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type AuthorizationCode = { - authorizationUrl: string; - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type DeviceAuthorization = { - deviceAuthorizationUrl: string; - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type SecurityRequirement = Record; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/index.js b/node_modules/@hyperjump/json-schema/openapi-3-2/index.js deleted file mode 100644 index 9e03b679..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/index.js +++ /dev/null @@ -1,47 +0,0 @@ -import { addKeyword, defineVocabulary } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import "../lib/openapi.js"; - -import dialectSchema from "./dialect/base.js"; -import vocabularySchema from "./meta/base.js"; -import schema from "./schema.js"; -import schemaBase from "./schema-base.js"; -import schemaDraft2020 from "./schema-draft-2020-12.js"; -import schemaDraft2019 from "./schema-draft-2019-09.js"; -import schemaDraft07 from "./schema-draft-07.js"; -import schemaDraft06 from "./schema-draft-06.js"; -import schemaDraft04 from "./schema-draft-04.js"; - -import discriminator from "../openapi-3-0/discriminator.js"; -import example from "../openapi-3-0/example.js"; -import externalDocs from "../openapi-3-0/externalDocs.js"; -import xml from "../openapi-3-0/xml.js"; - - -export * from "../draft-2020-12/index.js"; - -addKeyword(discriminator); -addKeyword(example); -addKeyword(externalDocs); -addKeyword(xml); - -defineVocabulary("https://spec.openapis.org/oas/3.2/vocab/base", { - "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", - "example": "https://spec.openapis.org/oas/3.0/keyword/example", - "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", - "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" -}); - -registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.2/meta"); -registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.2/dialect"); - -// Current Schemas -registerSchema(schema, "https://spec.openapis.org/oas/3.2/schema"); -registerSchema(schemaBase, "https://spec.openapis.org/oas/3.2/schema-base"); - -// Alternative dialect schemas -registerSchema(schemaDraft2020, "https://spec.openapis.org/oas/3.2/schema-draft-2020-12"); -registerSchema(schemaDraft2019, "https://spec.openapis.org/oas/3.2/schema-draft-2019-09"); -registerSchema(schemaDraft07, "https://spec.openapis.org/oas/3.2/schema-draft-07"); -registerSchema(schemaDraft06, "https://spec.openapis.org/oas/3.2/schema-draft-06"); -registerSchema(schemaDraft04, "https://spec.openapis.org/oas/3.2/schema-draft-04"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js deleted file mode 100644 index 472ceeb4..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js +++ /dev/null @@ -1,102 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "OAS Base Vocabulary", - "description": "A JSON Schema Vocabulary used in the OpenAPI JSON Schema Dialect", - - "type": ["object", "boolean"], - "properties": { - "discriminator": { "$ref": "#/$defs/discriminator" }, - "example": { "deprecated": true }, - "externalDocs": { "$ref": "#/$defs/external-docs" }, - "xml": { "$ref": "#/$defs/xml" } - }, - - "$defs": { - "extensible": { - "patternProperties": { - "^x-": true - } - }, - - "discriminator": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "defaultMapping": { - "type": "string" - } - }, - "required": ["propertyName"], - "unevaluatedProperties": false - }, - "external-docs": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - } - }, - "required": ["url"], - "unevaluatedProperties": false - }, - "xml": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "nodeType": { - "type": "string", - "enum": [ - "element", - "attribute", - "text", - "cdata", - "none" - ] - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "iri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "deprecated": true - }, - "wrapped": { - "type": "boolean", - "deprecated": true - } - }, - "dependentSchemas": { - "nodeType": { - "properties": { - "attribute": false, - "wrapped": false - } - } - }, - "unevaluatedProperties": false - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js deleted file mode 100644 index 8e10c6bb..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js +++ /dev/null @@ -1,32 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the OpenAPI JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://spec.openapis.org/oas/3.2/dialect" }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js deleted file mode 100644 index c7bf4347..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the draft-04 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-04/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js deleted file mode 100644 index 5057827d..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the draft-06 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-06/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js deleted file mode 100644 index e163db4b..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the draft-07 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-07/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js deleted file mode 100644 index 8cf69a7d..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the 2019-09 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonschemadialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://json-schema.org/draft/2019-09/schema" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js deleted file mode 100644 index 013dac42..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the 2020-12 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonschemadialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://json-schema.org/draft/2020-12/schema" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js deleted file mode 100644 index 18fd4aa4..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js +++ /dev/null @@ -1,1665 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.2.x Documents without Schema Object validation", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.2\\.\\d+(-.+)?$" - }, - "$self": { - "type": "string", - "format": "uri-reference", - "$comment": "MUST NOT contain a fragment", - "pattern": "^[^#]*$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri-reference", - "default": "https://spec.openapis.org/oas/3.1/dialect" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.2#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.2#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.2#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.2#server-object", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.2#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.2#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "mediaTypes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type-or-reference" - } - } - }, - "patternProperties": { - "^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems|mediaTypes)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.2#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.2#path-item-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "$ref": "#/$defs/parameters" - }, - "additionalOperations": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/operation" - }, - "propertyNames": { - "$comment": "RFC9110 restricts methods to \"1*tchar\" in ABNF", - "pattern": "^[a-zA-Z0-9!#$%&'*+.^_`|~-]+$", - "not": { - "enum": [ - "GET", - "PUT", - "POST", - "DELETE", - "OPTIONS", - "HEAD", - "PATCH", - "TRACE", - "QUERY" - ] - } - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - }, - "query": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.2#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/parameters" - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.2#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - }, - "not": { - "allOf": [ - { - "contains": { - "type": "object", - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - } - }, - { - "contains": { - "type": "object", - "properties": { - "in": { - "const": "querystring" - } - }, - "required": [ - "in" - ] - } - } - ] - }, - "contains": { - "type": "object", - "properties": { - "in": { - "const": "querystring" - } - }, - "required": [ - "in" - ] - }, - "minContains": 0, - "maxContains": 1 - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.2#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "querystring", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/specification-extensions" - }, - { - "if": { - "properties": { - "in": { - "const": "query" - } - } - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - } - }, - { - "if": { - "properties": { - "in": { - "const": "querystring" - } - } - }, - "then": { - "required": [ - "content" - ] - } - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - } - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - } - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - } - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - } - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "cookie" - ] - } - } - } - } - } - } - }, - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.2#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.2#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type-or-reference" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.2#media-type-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "itemSchema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - }, - "prefixEncoding": { - "type": "array", - "items": { - "$ref": "#/$defs/encoding" - } - }, - "itemEncoding": { - "$ref": "#/$defs/encoding" - } - }, - "dependentSchemas": { - "encoding": { - "properties": { - "prefixEncoding": false, - "itemEncoding": false - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/specification-extensions" - } - ], - "unevaluatedProperties": false - }, - "media-type-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/media-type" - } - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.2#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - }, - "prefixEncoding": { - "type": "array", - "items": { - "$ref": "#/$defs/encoding" - } - }, - "itemEncoding": { - "$ref": "#/$defs/encoding" - } - }, - "dependentSchemas": { - "encoding": { - "properties": { - "prefixEncoding": false, - "itemEncoding": false - } - }, - "style": { - "properties": { - "allowReserved": { - "default": false - } - } - }, - "explode": { - "properties": { - "style": { - "default": "form" - }, - "allowReserved": { - "default": false - } - } - }, - "allowReserved": { - "properties": { - "style": { - "default": "form" - } - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "unevaluatedProperties": false - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.2#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "if": { - "$comment": "either default, or at least one response code property must exist", - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": false - } - }, - "then": { - "required": [ - "default" - ] - } - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.2#response-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.2#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.2#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "dataValue": true, - "serializedValue": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "allOf": [ - { - "not": { - "required": [ - "value", - "externalValue" - ] - } - }, - { - "not": { - "required": [ - "value", - "dataValue" - ] - } - }, - { - "not": { - "required": [ - "value", - "serializedValue" - ] - } - }, - { - "not": { - "required": [ - "serializedValue", - "externalValue" - ] - } - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.2#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "server": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.2#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/specification-extensions" - } - ], - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.2#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "parent": { - "type": "string" - }, - "kind": { - "type": "string" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.2#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.2#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.2#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - }, - "deprecated": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - } - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - } - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - } - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - }, - "oauth2MetadataUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - } - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - }, - "deviceAuthorization": { - "$ref": "#/$defs/oauth-flows/$defs/device-authorization" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "device-authorization": { - "type": "object", - "properties": { - "deviceAuthorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "deviceAuthorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.2#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.2#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - }, - "not": { - "required": [ - "example", - "examples" - ] - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/package.json b/node_modules/@hyperjump/json-schema/package.json deleted file mode 100644 index 5ebfd609..00000000 --- a/node_modules/@hyperjump/json-schema/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "@hyperjump/json-schema", - "version": "1.17.2", - "description": "A JSON Schema validator with support for custom keywords, vocabularies, and dialects", - "type": "module", - "main": "./v1/index.js", - "exports": { - ".": "./v1/index.js", - "./draft-04": "./draft-04/index.js", - "./draft-06": "./draft-06/index.js", - "./draft-07": "./draft-07/index.js", - "./draft-2019-09": "./draft-2019-09/index.js", - "./draft-2020-12": "./draft-2020-12/index.js", - "./openapi-3-0": "./openapi-3-0/index.js", - "./openapi-3-1": "./openapi-3-1/index.js", - "./openapi-3-2": "./openapi-3-2/index.js", - "./experimental": "./lib/experimental.js", - "./instance/experimental": "./lib/instance.js", - "./annotations/experimental": "./annotations/index.js", - "./annotated-instance/experimental": "./annotations/annotated-instance.js", - "./bundle": "./bundle/index.js", - "./formats": "./formats/index.js", - "./formats-lite": "./formats/lite.js" - }, - "scripts": { - "clean": "xargs -a .gitignore rm -rf", - "lint": "eslint lib v1 draft-* openapi-* bundle annotations", - "test": "vitest --watch=false", - "check-types": "tsc --noEmit" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperjump-io/json-schema.git" - }, - "keywords": [ - "JSON Schema", - "json-schema", - "jsonschema", - "JSON", - "Schema", - "2020-12", - "2019-09", - "draft-07", - "draft-06", - "draft-04", - "vocabulary", - "vocabularies" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/content-type": "*", - "@types/node": "*", - "@types/uuid": "*", - "@vitest/coverage-v8": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "json-schema-test-suite": "github:json-schema-org/JSON-Schema-Test-Suite", - "typescript": "*", - "typescript-eslint": "*", - "undici": "*", - "vitest": "*", - "yaml": "*" - }, - "dependencies": { - "@hyperjump/json-pointer": "^1.1.0", - "@hyperjump/json-schema-formats": "^1.0.0", - "@hyperjump/pact": "^1.2.0", - "@hyperjump/uri": "^1.2.0", - "content-type": "^1.0.4", - "json-stringify-deterministic": "^1.0.12", - "just-curry-it": "^5.3.0", - "uuid": "^9.0.0" - }, - "peerDependencies": { - "@hyperjump/browser": "^1.1.0" - } -} diff --git a/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json b/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json deleted file mode 100644 index 4ffcd9dd..00000000 --- a/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json +++ /dev/null @@ -1,289 +0,0 @@ -[ - { - "description": "if - then", - "schema": { - "conditional": [ - { "type": "string" }, - { "maxLength": 5 } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails", - "data": 42, - "valid": true - } - ] - }, - { - "description": "if - then - else", - "schema": { - "conditional": [ - { "type": "string" }, - { "maxLength": 5 }, - { "type": "number" } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails, else passes", - "data": 42, - "valid": true - }, - { - "description": "if fails, else fails", - "data": true, - "valid": false - } - ] - }, - { - "description": "if - then - elseif - then", - "schema": { - "conditional": [ - { "type": "string" }, - { "maxLength": 5 }, - { "type": "number" }, - { "maximum": 50 } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails, elseif passes, then passes", - "data": 42, - "valid": true - }, - { - "description": "if fails, elseif passes, then fails", - "data": 100, - "valid": false - }, - { - "description": "if fails, elseif fails", - "data": true, - "valid": true - } - ] - }, - { - "description": "if - then - elseif - then - else", - "schema": { - "conditional": [ - { "type": "string" }, - { "maxLength": 5 }, - { "type": "number" }, - { "maximum": 50 }, - { "const": true } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails, elseif passes, then passes", - "data": 42, - "valid": true - }, - { - "description": "if fails, elseif passes, then fails", - "data": 100, - "valid": false - }, - { - "description": "if fails, elseif fails, else passes", - "data": true, - "valid": true - }, - { - "description": "if fails, elseif fails, else fails", - "data": false, - "valid": false - } - ] - }, - { - "description": "nested if - then - elseif - then - else", - "schema": { - "conditional": [ - [ - { "type": "string" }, - { "maxLength": 5 } - ], - [ - { "type": "number" }, - { "maximum": 50 } - ], - { "const": true } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails, elseif passes, then passes", - "data": 42, - "valid": true - }, - { - "description": "if fails, elseif passes, then fails", - "data": 100, - "valid": false - }, - { - "description": "if fails, elseif fails, else passes", - "data": true, - "valid": true - }, - { - "description": "if fails, elseif fails, else fails", - "data": false, - "valid": false - } - ] - }, - { - "description": "if - then - else with unevaluatedProperties", - "schema": { - "allOf": [ - { - "properties": { - "foo": {} - }, - "conditional": [ - { "required": ["foo"] }, - { - "properties": { - "bar": {} - } - }, - { - "properties": { - "baz": {} - } - } - ] - } - ], - "unevaluatedProperties": false - }, - "tests": [ - { - "description": "if foo, then bar is allowed", - "data": { "foo": 42, "bar": true }, - "valid": true - }, - { - "description": "if foo, then baz is not allowed", - "data": { "foo": 42, "baz": true }, - "valid": false - }, - { - "description": "if not foo, then baz is allowed", - "data": { "baz": true }, - "valid": true - }, - { - "description": "if not foo, then bar is not allowed", - "data": { "bar": true }, - "valid": false - } - ] - }, - { - "description": "if - then - else with unevaluatedItems", - "schema": { - "allOf": [ - { - "conditional": [ - { "prefixItems": [{ "const": "foo" }] }, - { - "prefixItems": [{}, { "const": "bar" }] - }, - { - "prefixItems": [{}, { "const": "baz" }] - } - ] - } - ], - "unevaluatedItems": false - }, - "tests": [ - { - "description": "foo, bar", - "data": ["foo", "bar"], - "valid": true - }, - { - "description": "foo, baz", - "data": ["foo", "baz"], - "valid": false - }, - { - "description": "foo, bar, additional", - "data": ["foo", "bar", ""], - "valid": false - }, - { - "description": "not-foo, baz", - "data": ["not-foo", "baz"], - "valid": true - }, - { - "description": "not-foo, bar", - "data": ["not-foo", "bar"], - "valid": false - }, - { - "description": "not-foo, baz, additional", - "data": ["not-foo", "baz", ""], - "valid": false - } - ] - } -] diff --git a/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json b/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json deleted file mode 100644 index b1387804..00000000 --- a/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json +++ /dev/null @@ -1,462 +0,0 @@ -[ - { - "description": "itemPattern ``", - "schema": { - "itemPattern": [] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": true - }, - { - "description": "a", - "data": ["a"], - "valid": false - } - ] - }, - { - "description": "itemPattern `a`", - "schema": { - "itemPattern": [ - { "const": "a" } - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": true - }, - { - "description": "b", - "data": ["b"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": false - } - ] - }, - { - "description": "itemPattern `ab`", - "schema": { - "itemPattern": [ - { "const": "a" }, - { "const": "b" } - ] - }, - "tests": [ - { - "description": "a", - "data": ["a"], - "valid": false - }, - { - "description": "aa", - "data": ["a", "a"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - } - ] - }, - { - "description": "itemPattern `a+b`", - "schema": { - "itemPattern": [ - { "const": "a" }, "+", - { "const": "b" } - ] - }, - "tests": [ - { - "description": "b", - "data": ["b"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "aab", - "data": ["a", "a", "b"], - "valid": true - }, - { - "description": "aaab", - "data": ["a", "a", "a", "b"], - "valid": true - } - ] - }, - { - "description": "itemPattern `a*b`", - "schema": { - "itemPattern": [ - { "const": "a" }, "*", - { "const": "b" } - ] - }, - "tests": [ - { - "description": "b", - "data": ["b"], - "valid": true - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "aab", - "data": ["a", "a", "b"], - "valid": true - }, - { - "description": "aaab", - "data": ["a", "a", "a", "b"], - "valid": true - } - ] - }, - { - "description": "itemPattern `(ab)+`", - "schema": { - "itemPattern": [ - [ - { "const": "a" }, - { "const": "b" } - ], "+" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "aba", - "data": ["a", "b", "a"], - "valid": false - }, - { - "description": "abab", - "data": ["a", "b", "a", "b"], - "valid": true - }, - { - "description": "ababa", - "data": ["a", "b", "a", "b", "a"], - "valid": false - } - ] - }, - { - "description": "itemPattern `a(b+c)*`", - "schema": { - "itemPattern": [ - { "const": "a" }, - [ - { "const": "b" }, "+", - { "const": "c" } - ], "*" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": true - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": false - }, - { - "description": "abc", - "data": ["a", "b", "c"], - "valid": true - }, - { - "description": "abbc", - "data": ["a", "b", "b", "c"], - "valid": true - }, - { - "description": "abbbc", - "data": ["a", "b", "b", "b", "c"], - "valid": true - }, - { - "description": "abcbc", - "data": ["a", "b", "c", "b", "c"], - "valid": true - }, - { - "description": "abcb", - "data": ["a", "b", "c", "b"], - "valid": false - }, - { - "description": "abbcbc", - "data": ["a", "b", "b", "c", "b", "c"], - "valid": true - }, - { - "description": "abcbbc", - "data": ["a", "b", "c", "b", "b", "c"], - "valid": true - }, - { - "description": "abbcbbc", - "data": ["a", "b", "b", "c", "b", "b", "c"], - "valid": true - }, - { - "description": "abbcbbcb", - "data": ["a", "b", "b", "c", "b", "b", "c", "b"], - "valid": false - } - ] - }, - { - "description": "itemPattern `(abc)*abd`", - "schema": { - "itemPattern": [ - [ - { "const": "a" }, - { "const": "b" }, - { "const": "c" } - ], "*", - { "const": "a" }, - { "const": "b" }, - { "const": "d" } - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "abc", - "data": ["a", "b", "c"], - "valid": false - }, - { - "description": "abd", - "data": ["a", "b", "d"], - "valid": true - }, - { - "description": "abcabd", - "data": ["a", "b", "c", "a", "b", "d"], - "valid": true - }, - { - "description": "abcabcabd", - "data": ["a", "b", "c", "a", "b", "c", "a", "b", "d"], - "valid": true - }, - { - "description": "abcabcabda", - "data": ["a", "b", "c", "a", "b", "c", "a", "b", "d", "a"], - "valid": false - } - ] - }, - { - "description": "itemPattern `(ab|bd)+`", - "schema": { - "itemPattern": [ - [ - { "const": "a" }, - { "const": "b" }, - "|", - { "const": "c" }, - { "const": "d" } - ], "+" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "cd", - "data": ["c", "d"], - "valid": true - }, - { - "description": "abab", - "data": ["a", "b", "a", "b"], - "valid": true - }, - { - "description": "abcd", - "data": ["a", "b", "c", "d"], - "valid": true - }, - { - "description": "abc", - "data": ["a", "b", "c"], - "valid": false - } - ] - }, - { - "description": "itemPattern `ab?|c`", - "schema": { - "itemPattern": [ - { "const": "a" }, - { "const": "b" }, "?", - "|", - { "const": "c" } - ] - }, - "tests": [ - { - "description": "a", - "data": ["a"], - "valid": true - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "c", - "data": ["c"], - "valid": true - }, - { - "description": "ac", - "data": ["a", "c"], - "valid": false - } - ] - }, - { - "description": "itemPattern `a*(ab)+`", - "schema": { - "itemPattern": [ - { "const": "a" }, "*", - [ - { "const": "a" }, - { "const": "b" } - ], "+" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "aab", - "data": ["a", "a", "b"], - "valid": true - }, - { - "description": "aabab", - "data": ["a", "a", "b", "a", "b"], - "valid": true - }, - { - "description": "aaab", - "data": ["a", "a", "a", "b"], - "valid": true - } - ] - }, - { - "description": "itemPattern `(a+)+`", - "schema": { - "itemPattern": [ - [ - { "const": "a" }, "+" - ], "+" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": true - }, - { - "description": "aa", - "data": ["a", "a"], - "valid": true - }, - { - "description": "aaaaaaaaaaaaaaaa", - "data": ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"], - "valid": true - }, - { - "description": "aaaaaaaaaaaaaaaaX", - "data": ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "X"], - "valid": false - } - ] - } -] diff --git a/node_modules/@hyperjump/json-schema/v1/index.d.ts b/node_modules/@hyperjump/json-schema/v1/index.d.ts deleted file mode 100644 index 878ea277..00000000 --- a/node_modules/@hyperjump/json-schema/v1/index.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaType = JsonSchemaType; - -export type JsonSchemaV1 = boolean | { - $schema?: "https://json-schema.org/v1"; - $id?: string; - $anchor?: string; - $ref?: string; - $dynamicRef?: string; - $dynamicAnchor?: string; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: JsonSchema; - unevaluatedItems?: JsonSchema; - prefixItems?: JsonSchema[]; - items?: JsonSchema; - contains?: JsonSchema; - additionalProperties?: JsonSchema; - unevaluatedProperties?: JsonSchema; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: JsonSchema; - if?: JsonSchema; - then?: JsonSchema; - else?: JsonSchema; - allOf?: JsonSchema[]; - anyOf?: JsonSchema[]; - oneOf?: JsonSchema[]; - not?: JsonSchema; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: JsonSchema; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/v1/index.js b/node_modules/@hyperjump/json-schema/v1/index.js deleted file mode 100644 index 3743f600..00000000 --- a/node_modules/@hyperjump/json-schema/v1/index.js +++ /dev/null @@ -1,116 +0,0 @@ -import { defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import "../formats/lite.js"; - -import metaSchema from "./schema.js"; -import coreMetaSchema from "./meta/core.js"; -import applicatorMetaSchema from "./meta/applicator.js"; -import validationMetaSchema from "./meta/validation.js"; -import metaDataMetaSchema from "./meta/meta-data.js"; -import formatMetaSchema from "./meta/format.js"; -import contentMetaSchema from "./meta/content.js"; -import unevaluatedMetaSchema from "./meta/unevaluated.js"; - - -defineVocabulary("https://json-schema.org/v1/vocab/core", { - "$anchor": "https://json-schema.org/keyword/anchor", - "$comment": "https://json-schema.org/keyword/comment", - "$defs": "https://json-schema.org/keyword/definitions", - "$dynamicAnchor": "https://json-schema.org/keyword/dynamicAnchor", - "$dynamicRef": "https://json-schema.org/keyword/dynamicRef", - "$id": "https://json-schema.org/keyword/id", - "$ref": "https://json-schema.org/keyword/ref", - "$vocabulary": "https://json-schema.org/keyword/vocabulary" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/applicator", { - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "contains": "https://json-schema.org/keyword/contains", - "minContains": "https://json-schema.org/keyword/minContains", - "maxContains": "https://json-schema.org/keyword/maxContains", - "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", - "if": "https://json-schema.org/keyword/if", - "then": "https://json-schema.org/keyword/then", - "else": "https://json-schema.org/keyword/else", - "conditional": "https://json-schema.org/keyword/conditional", - "items": "https://json-schema.org/keyword/items", - "itemPattern": "https://json-schema.org/keyword/itemPattern", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "prefixItems": "https://json-schema.org/keyword/prefixItems", - "properties": "https://json-schema.org/keyword/properties", - "propertyDependencies": "https://json-schema.org/keyword/propertyDependencies", - "propertyNames": "https://json-schema.org/keyword/propertyNames" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/validation", { - "const": "https://json-schema.org/keyword/const", - "dependentRequired": "https://json-schema.org/keyword/dependentRequired", - "enum": "https://json-schema.org/keyword/enum", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "requireAllExcept": "https://json-schema.org/keyword/requireAllExcept", - "pattern": "https://json-schema.org/keyword/pattern", - "required": "https://json-schema.org/keyword/required", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/meta-data", { - "default": "https://json-schema.org/keyword/default", - "deprecated": "https://json-schema.org/keyword/deprecated", - "description": "https://json-schema.org/keyword/description", - "examples": "https://json-schema.org/keyword/examples", - "readOnly": "https://json-schema.org/keyword/readOnly", - "title": "https://json-schema.org/keyword/title", - "writeOnly": "https://json-schema.org/keyword/writeOnly" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/format", { - "format": "https://json-schema.org/keyword/format" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/content", { - "contentEncoding": "https://json-schema.org/keyword/contentEncoding", - "contentMediaType": "https://json-schema.org/keyword/contentMediaType", - "contentSchema": "https://json-schema.org/keyword/contentSchema" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/unevaluated", { - "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", - "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" -}); - -const dialectId = "https://json-schema.org/v1"; -loadDialect(dialectId, { - "https://json-schema.org/v1/vocab/core": true, - "https://json-schema.org/v1/vocab/applicator": true, - "https://json-schema.org/v1/vocab/validation": true, - "https://json-schema.org/v1/vocab/meta-data": true, - "https://json-schema.org/v1/vocab/format": true, - "https://json-schema.org/v1/vocab/content": true, - "https://json-schema.org/v1/vocab/unevaluated": true -}); - -registerSchema(metaSchema, dialectId); -registerSchema(coreMetaSchema, "https://json-schema.org/v1/meta/core"); -registerSchema(applicatorMetaSchema, "https://json-schema.org/v1/meta/applicator"); -registerSchema(validationMetaSchema, "https://json-schema.org/v1/meta/validation"); -registerSchema(metaDataMetaSchema, "https://json-schema.org/v1/meta/meta-data"); -registerSchema(formatMetaSchema, "https://json-schema.org/v1/meta/format"); -registerSchema(contentMetaSchema, "https://json-schema.org/v1/meta/content"); -registerSchema(unevaluatedMetaSchema, "https://json-schema.org/v1/meta/unevaluated"); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/applicator.js b/node_modules/@hyperjump/json-schema/v1/meta/applicator.js deleted file mode 100644 index 47aabb2e..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/applicator.js +++ /dev/null @@ -1,73 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Applicator vocabulary meta-schema", - - "properties": { - "prefixItems": { "$ref": "#/$defs/schemaArray" }, - "items": { "$dynamicRef": "meta" }, - "contains": { "$dynamicRef": "meta" }, - "itemPattern": { "$ref": "#/$defs/itemPattern" }, - "additionalProperties": { "$dynamicRef": "meta" }, - "properties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" } - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" }, - "propertyNames": { "format": "regex" } - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" } - }, - "propertyDependencies": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" } - } - }, - "propertyNames": { "$dynamicRef": "meta" }, - "if": { "$dynamicRef": "meta" }, - "then": { "$dynamicRef": "meta" }, - "else": { "$dynamicRef": "meta" }, - "conditional": { - "type": "array", - "items": { - "if": { "type": "array" }, - "then": { - "items": { "$dynamicRef": "meta" } - }, - "else": { "$dynamicRef": "meta" } - } - }, - "allOf": { "$ref": "#/$defs/schemaArray" }, - "anyOf": { "$ref": "#/$defs/schemaArray" }, - "oneOf": { "$ref": "#/$defs/schemaArray" }, - "not": { "$dynamicRef": "meta" } - }, - - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$dynamicRef": "meta" } - }, - "itemPattern": { - "type": "array", - "itemPattern": [ - [ - { - "if": { "type": "array" }, - "then": { "$ref": "#/$defs/itemPattern" }, - "else": { "$dynamicRef": "meta" } - }, - { "enum": ["?", "*", "+"] }, "?", - "|", - { "const": "|" } - ], "*" - ] - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/content.js b/node_modules/@hyperjump/json-schema/v1/meta/content.js deleted file mode 100644 index 13d81dde..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/content.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Content vocabulary meta-schema", - - "properties": { - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "contentSchema": { "$dynamicRef": "meta" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/core.js b/node_modules/@hyperjump/json-schema/v1/meta/core.js deleted file mode 100644 index 10380051..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/core.js +++ /dev/null @@ -1,50 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Core vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$anchor": { "$ref": "#/$defs/anchor" }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$dynamicRef": { - "type": "string", - "pattern": "^#?[A-Za-z_][-A-Za-z0-9._]*$" - }, - "$dynamicAnchor": { "$ref": "#/$defs/anchor" }, - "$vocabulary": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { "type": "string" }, - "$defs": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" } - } - }, - - "$defs": { - "anchor": { - "type": "string", - "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/format.js b/node_modules/@hyperjump/json-schema/v1/meta/format.js deleted file mode 100644 index 1b4afb96..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/format.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Format vocabulary meta-schema", - - "properties": { - "format": { "type": "string" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js b/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js deleted file mode 100644 index 9cdd1e0a..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Meta-data vocabulary meta-schema", - - "properties": { - "title": { "type": "string" }, - "description": { "type": "string" }, - "default": true, - "deprecated": { "type": "boolean" }, - "readOnly": { "type": "boolean" }, - "writeOnly": { "type": "boolean" }, - "examples": { "type": "array" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js b/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js deleted file mode 100644 index d65d3723..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js +++ /dev/null @@ -1,9 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Unevaluated applicator vocabulary meta-schema", - - "properties": { - "unevaluatedItems": { "$dynamicRef": "meta" }, - "unevaluatedProperties": { "$dynamicRef": "meta" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/validation.js b/node_modules/@hyperjump/json-schema/v1/meta/validation.js deleted file mode 100644 index c04e7ce6..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/validation.js +++ /dev/null @@ -1,65 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Validation vocabulary meta-schema", - - "properties": { - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { "type": "number" }, - "exclusiveMaximum": { "type": "number" }, - "minimum": { "type": "number" }, - "exclusiveMinimum": { "type": "number" }, - "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "minLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "minItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "uniqueItems": { "type": "boolean" }, - "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "minContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "minProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "required": { "$ref": "#/$defs/stringArray" }, - "optional": { "$ref": "#/$defs/stringArray" }, - "dependentRequired": { - "type": "object", - "additionalProperties": { "$ref": "#/$defs/stringArray" } - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "type": { - "anyOf": [ - { "$ref": "#/$defs/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/$defs/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - } - }, - - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "simpleTypes": { - "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/schema.js b/node_modules/@hyperjump/json-schema/v1/schema.js deleted file mode 100644 index 189e2e5a..00000000 --- a/node_modules/@hyperjump/json-schema/v1/schema.js +++ /dev/null @@ -1,24 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "$vocabulary": { - "https://json-schema.org/v1/vocab/core": true, - "https://json-schema.org/v1/vocab/applicator": true, - "https://json-schema.org/v1/vocab/unevaluated": true, - "https://json-schema.org/v1/vocab/validation": true, - "https://json-schema.org/v1/vocab/meta-data": true, - "https://json-schema.org/v1/vocab/format": true, - "https://json-schema.org/v1/vocab/content": true - }, - "title": "Core and Validation specifications meta-schema", - - "$dynamicAnchor": "meta", - - "allOf": [ - { "$ref": "/v1/meta/core" }, - { "$ref": "/v1/meta/applicator" }, - { "$ref": "/v1/meta/validation" }, - { "$ref": "/v1/meta/meta-data" }, - { "$ref": "/v1/meta/format" }, - { "$ref": "/v1/meta/content" } - ] -}; diff --git a/node_modules/@hyperjump/pact/LICENSE b/node_modules/@hyperjump/pact/LICENSE deleted file mode 100644 index 6e9846cf..00000000 --- a/node_modules/@hyperjump/pact/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/pact/README.md b/node_modules/@hyperjump/pact/README.md deleted file mode 100644 index 32c4cf04..00000000 --- a/node_modules/@hyperjump/pact/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# Hyperjump Pact - -Hyperjump Pact is a utility library that provides higher order functions for -working with iterators and async iterators. - -## Installation -Designed for node.js (ES Modules, TypeScript) and browsers. - -```bash -npm install @hyperjump/pact --save -``` - -## Usage - -```javascript -import { pipe, range, map, filter, reduce } from "@hyperjump/pact"; - - -const result = pipe( - range(1, 10), - filter((n) => n % 2 === 0), - map((n) => n * 2), - reduce((sum, n) => sum + n, 0) -); -console.log(result); -``` - -```javascript -import { pipe, asyncMap, asyncFilter, asyncReduce } from "@hyperjump/pact"; -// You can alternatively import the async functions without the prefix -// import { pipe, map, filter, reduce } from "@hyperjump/pact/async"; - - -const asyncSequence = async function* () { - yield 1; - yield 2; - yield 3; - yield 4; - yield 5; -}; - -for await (const value of asyncSequence()) { - console.log(value); -} - -const result = await pipe( - asyncSequence(), - asyncFilter((n) => n % 2 === 0), - asyncMap((n) => n * 2), - asyncReduce((sum, n) => sum + n, 0) -); -console.log(result); -``` - -## API - -https://pact.hyperjump.io - -## Contributing - -### Tests - -Run the tests - -```bash -npm test -``` - -Run the tests with a continuous test runner - -```bash -npm test -- --watch -``` - -[hyperjump]: https://github.com/hyperjump-io/browser -[jref]: https://github.com/hyperjump-io/browser/blob/master/src/json-reference/README.md diff --git a/node_modules/@hyperjump/pact/package.json b/node_modules/@hyperjump/pact/package.json deleted file mode 100644 index b478643c..00000000 --- a/node_modules/@hyperjump/pact/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@hyperjump/pact", - "version": "1.4.0", - "description": "Higher order functions for iterators and async iterators", - "type": "module", - "main": "./src/index.js", - "exports": { - ".": "./src/index.js", - "./async": "./src/async.js" - }, - "scripts": { - "lint": "eslint src", - "test": "vitest --watch=false", - "type-check": "tsc --noEmit", - "docs": "typedoc --excludeExternals" - }, - "repository": "github:hyperjump-io/pact", - "keywords": [ - "Hyperjump", - "Promise", - "higher order functions", - "iterator", - "async iterator", - "generator", - "async generator", - "async" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "^22.13.5", - "@typescript-eslint/eslint-plugin": "*", - "@typescript-eslint/parser": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "typedoc": "^0.27.9", - "typescript-eslint": "*", - "vitest": "*" - } -} diff --git a/node_modules/@hyperjump/pact/src/async.js b/node_modules/@hyperjump/pact/src/async.js deleted file mode 100644 index e01e4b43..00000000 --- a/node_modules/@hyperjump/pact/src/async.js +++ /dev/null @@ -1,24 +0,0 @@ -export { - asyncMap as map, - asyncTap as tap, - asyncFilter as filter, - asyncScan as scan, - asyncFlatten as flatten, - asyncDrop as drop, - asyncTake as take, - asyncHead as head, - range, - asyncEmpty as empty, - asyncZip as zip, - asyncConcat as concat, - asyncReduce as reduce, - asyncEvery as every, - asyncSome as some, - asyncCount as count, - asyncCollectArray as collectArray, - asyncCollectSet as collectSet, - asyncCollectMap as collectMap, - asyncCollectObject as collectObject, - asyncJoin as join, - pipe -} from "./index.js"; diff --git a/node_modules/@hyperjump/pact/src/curry.d.ts b/node_modules/@hyperjump/pact/src/curry.d.ts deleted file mode 100644 index 17ea2fd4..00000000 --- a/node_modules/@hyperjump/pact/src/curry.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const curry: ( - (curriedFn: (a: A) => (iterable: I) => R) => ( - (a: A, iterable: I) => R - ) & ( - (a: A) => (iterable: I) => R - ) -) & ( - (curriedFn: (a: A, b: B) => (iterable: I) => R) => ( - (a: A, b: B, iterable: I) => R - ) & ( - (a: A, b: B) => (iterable: I) => R - ) -); diff --git a/node_modules/@hyperjump/pact/src/curry.js b/node_modules/@hyperjump/pact/src/curry.js deleted file mode 100644 index 862c56f7..00000000 --- a/node_modules/@hyperjump/pact/src/curry.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @import * as API from "./curry.d.ts" - */ - - -// eslint-disable-next-line @stylistic/no-extra-parens -export const curry = /** @type API.curry */ ((fn) => (...args) => { - /** @typedef {Parameters>[0]} I */ - - const firstApplication = fn.length === 1 - ? /** @type Extract any> */ (fn)(args[0]) - : fn(args[0], args[1]); - const iterable = /** @type I */ (args[fn.length]); // eslint-disable-line @typescript-eslint/no-unsafe-assignment - return iterable === undefined ? firstApplication : firstApplication(iterable); -}); diff --git a/node_modules/@hyperjump/pact/src/index.d.ts b/node_modules/@hyperjump/pact/src/index.d.ts deleted file mode 100644 index 2b31bdc6..00000000 --- a/node_modules/@hyperjump/pact/src/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -import type { LastReturnType } from "./type-utils.d.ts"; - - -/** - * Apply a function to every value in the iterator - */ -export const map: ( - (fn: Mapper, iterator: Iterable) => Generator -) & ( - (fn: Mapper) => (iterator: Iterable) => Generator -); -export type Mapper = (item: A) => B; - -/** - * Same as `map`, but works with AsyncIterables and async mapping functions. - */ -export const asyncMap: ( - (fn: AsyncMapper, iterator: Iterable | AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncMapper) => (iterator: Iterable | AsyncIterable) => AsyncGenerator -); -export type AsyncMapper = (item: A) => Promise | B; - -/** - * Apply a function to every value in the iterator, but yield the original - * value, not the result of the function. - */ -export const tap: ( - (fn: Tapper, iterator: Iterable) => Generator -) & ( - (fn: Tapper) => (iterator: Iterable) => Generator -); -export type Tapper = (item: A) => void; - -/** - * Same as `tap`, but works with AsyncIterables. - */ -export const asyncTap: ( - (fn: AsyncTapper, iterator: AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncTapper) => (iterator: AsyncIterable) => AsyncGenerator -); -export type AsyncTapper = (item: A) => Promise | void; - -/** - * Yields only the values in the iterator that pass the predicate function. - */ -export const filter: ( - (fn: Predicate, iterator: Iterable) => Generator -) & ( - (fn: Predicate) => (iterator: Iterable) => Generator -); -export type Predicate = (item: A) => boolean; - -/** - * Same as `filter`, but works with AsyncIterables and async predicate - * functions. - */ -export const asyncFilter: ( - (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => AsyncGenerator -); -export type AsyncPredicate = (item: A) => Promise | boolean; - -/** - * Same as `reduce` except it emits the accumulated value after each update - */ -export const scan: ( - (fn: Reducer, acc: B, iter: Iterable) => Generator -) & ( - (fn: Reducer, acc: B) => (iter: Iterable) => Generator -); - -/** - * Same as `scan`, but works with AsyncIterables and async predicate - * functions. - */ -export const asyncScan: ( - (fn: AsyncReducer, acc: B, iter: Iterable | AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncReducer, acc: B) => (iter: Iterable | AsyncIterable) => AsyncGenerator -); - -/** - * Yields values from the iterator with all sub-iterator elements concatenated - * into it recursively up to the specified depth. - */ -export const flatten: (iterator: NestedIterable, depth?: number) => Generator>; -export type NestedIterable = Iterable>; - -/** - * Same as `flatten`, but works with AsyncGenerators. - */ -export const asyncFlatten: (iterator: NestedIterable | NestedAsyncIterable, depth?: number) => AsyncGenerator | NestedAsyncIterable>; -export type NestedAsyncIterable = AsyncIterable | NestedIterable>; - -/** - * Yields all the values in the iterator except for the first `n` values. - */ -export const drop: ( - (count: number, iterator: Iterable) => Generator -) & ( - (count: number) => (iterator: Iterable) => Generator -); - -/** - * Same as `drop`, but works with AsyncIterables. - */ -export const asyncDrop: ( - (count: number, iterator: AsyncIterable) => AsyncGenerator -) & ( - (count: number) => (iterator: AsyncIterable) => AsyncGenerator -); - -/** - * Same as `drop` but instead of dropping a specific number of values, it drops - * values until the `fn(value)` is `false` and then yields the remaining values. - */ -export const dropWhile: ( - (fn: Predicate, iterator: Iterable) => Generator -) & ( - (fn: Predicate) => (iterator: Iterable) => Generator -); - -/** - * Same as `dropWhile`, but works with AsyncIterables. - */ -export const asyncDropWhile: ( - (fn: AsyncPredicate, iterator: AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncPredicate) => (iterator: AsyncIterable) => AsyncGenerator -); - -/** - * Yields the first `n` values in the iterator. - */ -export const take: ( - (count: number, iterator: Iterable) => Generator -) & ( - (count: number) => (iterator: Iterable) => Generator -); - -/** - * Same as `take`, but works with AsyncIterables. - */ -export const asyncTake: ( - (count: number, iterator: AsyncIterable) => AsyncGenerator -) & ( - (count: number) => (iterator: AsyncIterable) => AsyncGenerator -); - -/** - * Same as `take` but instead of yielding a specific number of values, it yields - * values as long as the `fn(value)` returns `true` and drops the rest. - */ -export const takeWhile: ( - (fn: Predicate, iterator: Iterable) => Generator -) & ( - (fn: Predicate) => (iterator: Iterable) => Generator -); - -/** - * Same as `takeWhile`, but works with AsyncGenerators. - */ -export const asyncTakeWhile: ( - (fn: AsyncPredicate, iterator: AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncPredicate) => (iterator: AsyncIterable) => AsyncGenerator -); - -/** - * Returns the first value in the iterator. - */ -export const head: (iterator: Iterable) => A | undefined; - -/** - * Same as `head`, but works with AsyncGenerators. - */ -export const asyncHead: (iterator: AsyncIterable) => Promise; - -/** - * Yields numbers starting from `from` until `to`. If `to` is not passed, the - * iterator will be infinite. - */ -export const range: (from: number, to?: number) => Generator; - -/** - * Yields nothing. - */ -export const empty: () => Generator; - -/** - * Yields nothing asynchronously. - */ -export const asyncEmpty: () => AsyncGenerator; - -/** - * Yields tuples containing a value from each iterator. The iterator will have - * the same length as `iter1`. If `iter1` is longer than `iter2`, the second - * value of the tuple will be undefined. If `iter2` is longer than `iter1`, the - * remaining values in `iter2` will be ignored. - */ -export const zip: (iter1: Iterable, iter2: Iterable) => Generator<[A, B]>; - -/** - * Same as `zip` but works with AsyncIterables. - */ -export const asyncZip: (iter1: AsyncIterable, iter2: AsyncIterable) => AsyncGenerator<[A, B]>; - -/** - * Yields values from each iterator in order. - */ -export const concat: (...iters: Iterable[]) => Generator; - -/** - * Same as `concat` but works with AsyncIterables. - */ -export const asyncConcat: (...iters: (Iterable | AsyncIterable)[]) => AsyncGenerator; - -/** - * Reduce an iterator to a single value. - */ -export const reduce: ( - (fn: Reducer, acc: B, iter: Iterable) => B -) & ( - (fn: Reducer, acc: B) => (iter: Iterable) => B -); -export type Reducer = (acc: B, item: A) => B; - -/** - * Same as `reduce`, but works with AsyncGenerators and async reducer functions. - */ -export const asyncReduce: ( - (fn: AsyncReducer, acc: B, iter: Iterable | AsyncIterable) => Promise -) & ( - (fn: AsyncReducer, acc: B) => (iter: Iterable | AsyncIterable) => Promise -); -export type AsyncReducer = (acc: B, item: A) => Promise | B; - -/** - * Returns a boolean indicating whether or not all values in the iterator passes - * the predicate function. - */ -export const every: ( - (fn: Predicate, iterator: Iterable) => boolean -) & ( - (fn: Predicate) => (iterator: Iterable) => boolean -); - -/** - * Same as `every`, but works with AsyncIterables and async predicate functions. - */ -export const asyncEvery: ( - (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise -) & ( - (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise -); - -/** - * Returns a boolean indicating whether or not there exists a value in the - * iterator that passes the predicate function. - */ -export const some: ( - (fn: Predicate, iterator: Iterable) => boolean -) & ( - (fn: Predicate) => (iterator: Iterable) => boolean -); - -/** - * Same as `some`, but works with AsyncIterables and async predicate functions. - */ -export const asyncSome: ( - (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise -) & ( - (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise -); - -/** - * Returns the first value that passes the predicate function. - */ -export const find: ( - (fn: Predicate, iterator: Iterable) => A -) & ( - (fn: Predicate) => (iterator: Iterable) => A -); - -/** - * Same as `find`, but works with AsyncIterables and async predicate functions. - */ -export const asyncFind: ( - (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise -) & ( - (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise -); - -/** - * Returns the number of items in the iterator. - */ -export const count: (iterator: Iterable) => number; - -/** - * Same as `count`, but works with AsyncIterables. - */ -export const asyncCount: (iterator: AsyncIterable) => Promise; - -/** - * Collect all the items in the iterator into an array. - */ -export const collectArray: (iterator: Iterable) => A[]; - -/** - * Same as `collectArray`, but works with AsyncIterables. - */ -export const asyncCollectArray: (iterator: AsyncIterable) => Promise; - -/** - * Collect all the items in the iterator into a Set. - */ -export const collectSet: (iterator: Iterable) => Set; - -/** - * Same as `collectSet`, but works with AsyncIterables. - */ -export const asyncCollectSet: (iterator: AsyncIterable) => Promise>; - -/** - * Collect all the key/value tuples in the iterator into a Map. - */ -export const collectMap: (iterator: Iterable<[A, B]>) => Map; - -/** - * Same as `collectMap`, but works with AsyncGenerators. - */ -export const asyncCollectMap: (iterator: AsyncIterable<[A, B]>) => Promise>; - -/** - * Collect all the key/value tuples in the iterator into an Object. - */ -export const collectObject: (iterator: Iterable<[string, A]>) => Record; - -/** - * Same as `collectObject`, but works with AsyncGenerators. - */ -export const asyncCollectObject: (iterator: AsyncIterable<[string, A]>) => Promise>; - -/** - * Collect all the items in the iterator into a string separated by the - * separator token. - */ -export const join: ( - (separator: string, iterator: Iterable) => string -) & ( - (separator: string) => (iterator: Iterable) => string -); - -/** - * Same as `join`, but works with AsyncIterables. - */ -export const asyncJoin: ( - (separator: string, iterator: AsyncIterable) => Promise -) & ( - (separator: string) => (iterator: AsyncIterable) => Promise -); - -/** - * Starting with an iterator, apply any number of functions to transform the - * values and return the result. - */ -export const pipe: ( - (initialValue: A, ...fns: [ - (a: A) => B - ]) => B -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C - ]) => C -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D - ]) => D -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (c: D) => E - ]) => E -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F - ]) => F -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F, - (f: F) => G - ]) => G -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F, - (f: F) => G, - (g: G) => H - ]) => H -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F, - (f: F) => G, - (g: G) => H, - (h: H) => I - ]) => I -) & ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - any)[]>(initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F, - (f: F) => G, - (g: G) => H, - (h: H) => I, - ...J - ]) => LastReturnType -); diff --git a/node_modules/@hyperjump/pact/src/index.js b/node_modules/@hyperjump/pact/src/index.js deleted file mode 100644 index e7ee8d8c..00000000 --- a/node_modules/@hyperjump/pact/src/index.js +++ /dev/null @@ -1,487 +0,0 @@ -/** - * @module pact - */ - -import { curry } from "./curry.js"; - -/** - * @import { AsyncIterableItem, IterableItem } from "./type-utils.d.ts" - * @import * as API from "./index.d.ts" - */ - - -/** @type API.map */ -export const map = curry((fn) => function* (iter) { - for (const n of iter) { - yield fn(n); - } -}); - -/** @type API.asyncMap */ -export const asyncMap = curry((fn) => async function* (iter) { - for await (const n of iter) { - yield fn(n); - } -}); - -/** @type API.tap */ -export const tap = curry((fn) => function* (iter) { - for (const n of iter) { - fn(n); - yield n; - } -}); - -/** @type API.asyncTap */ -export const asyncTap = curry((fn) => async function* (iter) { - for await (const n of iter) { - await fn(n); - yield n; - } -}); - -/** @type API.filter */ -export const filter = curry((fn) => function* (iter) { - for (const n of iter) { - if (fn(n)) { - yield n; - } - } -}); - -/** @type API.asyncFilter */ -export const asyncFilter = curry((fn) => async function* (iter) { - for await (const n of iter) { - if (await fn(n)) { - yield n; - } - } -}); - - -export const scan = /** @type API.scan */ (curry( - // eslint-disable-next-line @stylistic/no-extra-parens - /** @type API.scan */ ((fn, acc) => function* (iter) { - for (const item of iter) { - acc = fn(acc, /** @type any */ (item)); - yield acc; - } - }) -)); - - -export const asyncScan = /** @type API.asyncScan */ (curry( - // eslint-disable-next-line @stylistic/no-extra-parens - /** @type API.asyncScan */ ((fn, acc) => async function* (iter) { - for await (const item of iter) { - acc = await fn(acc, /** @type any */ (item)); - yield acc; - } - }) -)); - -/** @type API.flatten */ -export const flatten = function* (iter, depth = 1) { - for (const n of iter) { - if (depth > 0 && n && typeof n === "object" && Symbol.iterator in n) { - yield* flatten(n, depth - 1); - } else { - yield n; - } - } -}; - -/** @type API.asyncFlatten */ -export const asyncFlatten = async function* (iter, depth = 1) { - for await (const n of iter) { - if (depth > 0 && n && typeof n === "object" && (Symbol.asyncIterator in n || Symbol.iterator in n)) { - yield* asyncFlatten(n, depth - 1); - } else { - yield n; - } - } -}; - -/** @type API.drop */ -export const drop = curry((count) => function* (iter) { - let index = 0; - for (const item of iter) { - if (index++ >= count) { - yield item; - } - } -}); - -/** @type API.asyncDrop */ -export const asyncDrop = curry((count) => async function* (iter) { - let index = 0; - for await (const item of iter) { - if (index++ >= count) { - yield item; - } - } -}); - -/** @type API.dropWhile */ -export const dropWhile = curry((fn) => function* (iter) { - let dropping = true; - for (const n of iter) { - if (dropping) { - if (fn(n)) { - continue; - } else { - dropping = false; - } - } - - yield n; - } -}); - -/** @type API.asyncDropWhile */ -export const asyncDropWhile = curry((fn) => async function* (iter) { - let dropping = true; - for await (const n of iter) { - if (dropping) { - if (await fn(n)) { - continue; - } else { - dropping = false; - } - } - - yield n; - } -}); - -/** @type API.take */ -export const take = curry((count) => function* (iter) { - const iterator = getIterator(iter); - - let current; - while (count-- > 0 && !(current = iterator.next())?.done) { - yield current.value; - } -}); - -/** @type API.asyncTake */ -export const asyncTake = curry((count) => async function* (iter) { - const iterator = getAsyncIterator(iter); - - let current; - while (count-- > 0 && !(current = await iterator.next())?.done) { - yield current.value; - } -}); - -/** @type API.takeWhile */ -export const takeWhile = curry((fn) => function* (iter) { - for (const n of iter) { - if (fn(n)) { - yield n; - } else { - break; - } - } -}); - -/** @type API.asyncTakeWhile */ -export const asyncTakeWhile = curry((fn) => async function* (iter) { - for await (const n of iter) { - if (await fn(n)) { - yield n; - } else { - break; - } - } -}); - -/** @type API.head */ -export const head = (iter) => { - const iterator = getIterator(iter); - const result = iterator.next(); - - return result.done ? undefined : result.value; -}; - -/** @type API.asyncHead */ -export const asyncHead = async (iter) => { - const iterator = getAsyncIterator(iter); - const result = await iterator.next(); - - return result.done ? undefined : result.value; -}; - -/** @type API.range */ -export const range = function* (from, to) { - for (let n = from; to === undefined || n < to; n++) { - yield n; - } -}; - -/** @type API.empty */ -export const empty = function* () {}; - -/** @type API.asyncEmpty */ -export const asyncEmpty = async function* () {}; - -/** @type API.zip */ -export const zip = function* (a, b) { - const bIter = getIterator(b); - for (const item1 of a) { - yield [item1, bIter.next().value]; - } -}; - -/** @type API.asyncZip */ -export const asyncZip = async function* (a, b) { - const bIter = getAsyncIterator(b); - for await (const item1 of a) { - yield [item1, (await bIter.next()).value]; - } -}; - -/** @type API.concat */ -export const concat = function* (...iters) { - for (const iter of iters) { - yield* iter; - } -}; - -/** @type API.asyncConcat */ -export const asyncConcat = async function* (...iters) { - for (const iter of iters) { - yield* iter; - } -}; - -export const reduce = /** @type API.reduce */ (curry( - // eslint-disable-next-line @stylistic/no-extra-parens - /** @type API.reduce */ ((fn, acc) => (iter) => { - for (const item of iter) { - acc = fn(acc, /** @type any */ (item)); - } - - return acc; - }) -)); - - -export const asyncReduce = /** @type API.asyncReduce */ (curry( - // eslint-disable-next-line @stylistic/no-extra-parens - /** @type API.asyncReduce */ ((fn, acc) => async (iter) => { - for await (const item of iter) { - acc = await fn(acc, /** @type any */ (item)); - } - - return acc; - }) -)); - -/** @type API.every */ -export const every = curry((fn) => (iter) => { - for (const item of iter) { - if (!fn(item)) { - return false; - } - } - - return true; -}); - -/** @type API.asyncEvery */ -export const asyncEvery = curry((fn) => async (iter) => { - for await (const item of iter) { - if (!await fn(item)) { - return false; - } - } - - return true; -}); - -/** @type API.some */ -export const some = curry((fn) => (iter) => { - for (const item of iter) { - if (fn(item)) { - return true; - } - } - - return false; -}); - -/** @type API.asyncSome */ -export const asyncSome = curry((fn) => async (iter) => { - for await (const item of iter) { - if (await fn(item)) { - return true; - } - } - - return false; -}); - -/** @type API.find */ -export const find = curry((fn) => (iter) => { - for (const item of iter) { - if (fn(item)) { - return item; - } - } -}); - -/** @type API.asyncFind */ -export const asyncFind = curry((fn) => async (iter) => { - for await (const item of iter) { - if (await fn(item)) { - return item; - } - } -}); - -/** @type API.count */ -export const count = (iter) => reduce((count) => count + 1, 0, iter); - -/** @type API.asyncCount */ -export const asyncCount = (iter) => asyncReduce((count) => count + 1, 0, iter); - -/** @type API.collectArray */ -export const collectArray = (iter) => [...iter]; - -/** @type API.asyncCollectArray */ -export const asyncCollectArray = async (iter) => { - const result = []; - for await (const item of iter) { - result.push(item); - } - - return result; -}; - -/** @type API.collectSet */ -export const collectSet = (iter) => { - /** @type Set> */ - const result = new Set(); - for (const item of iter) { - result.add(item); - } - - return result; -}; - -/** @type API.asyncCollectSet */ -export const asyncCollectSet = async (iter) => { - /** @type Set> */ - const result = new Set(); - for await (const item of iter) { - result.add(item); - } - - return result; -}; - -/** @type API.collectMap */ -export const collectMap = (iter) => { - /** @typedef {IterableItem[0]} K */ - /** @typedef {IterableItem[1]} V */ - - /** @type Map */ - const result = new Map(); - for (const [key, value] of iter) { - result.set(key, value); - } - - return result; -}; - -/** @type API.asyncCollectMap */ -export const asyncCollectMap = async (iter) => { - /** @typedef {AsyncIterableItem[0]} K */ - /** @typedef {AsyncIterableItem[1]} V */ - - /** @type Map */ - const result = new Map(); - for await (const [key, value] of iter) { - result.set(key, value); - } - - return result; -}; - -/** @type API.collectObject */ -export const collectObject = (iter) => { - /** @typedef {IterableItem[1]} V */ - - /** @type Record */ - const result = Object.create(null); // eslint-disable-line @typescript-eslint/no-unsafe-assignment - for (const [key, value] of iter) { - result[key] = value; - } - - return result; -}; - -/** @type API.asyncCollectObject */ -export const asyncCollectObject = async (iter) => { - /** @typedef {AsyncIterableItem[1]} V */ - - /** @type Record */ - const result = Object.create(null); // eslint-disable-line @typescript-eslint/no-unsafe-assignment - for await (const [key, value] of iter) { - result[key] = value; - } - - return result; -}; - -/** @type API.join */ -export const join = curry((separator) => (iter) => { - let result = head(iter) ?? ""; - - for (const n of iter) { - result += separator + n; - } - - return result; -}); - -/** @type API.asyncJoin */ -export const asyncJoin = curry((separator) => async (iter) => { - let result = await asyncHead(iter) ?? ""; - - for await (const n of iter) { - result += separator + n; - } - - return result; -}); - -/** @type (iter: Iterable) => Iterator */ -const getIterator = (iter) => { - if (typeof iter?.[Symbol.iterator] === "function") { - return iter[Symbol.iterator](); - } else { - throw TypeError("`iter` is not iterable"); - } -}; - -/** @type (iter: Iterable | AsyncIterable) => AsyncIterator */ -const getAsyncIterator = (iter) => { - if (Symbol.asyncIterator in iter && typeof iter[Symbol.asyncIterator] === "function") { - return iter[Symbol.asyncIterator](); - } else if (Symbol.iterator in iter && typeof iter[Symbol.iterator] === "function") { - return asyncMap((a) => a, iter); - } else { - throw TypeError("`iter` is not iterable"); - } -}; - -/** @type API.pipe */ -// eslint-disable-next-line @stylistic/no-extra-parens -export const pipe = /** @type (acc: any, ...fns: ((a: any) => any)[]) => any */ ( - (acc, ...fns) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return reduce((acc, fn) => fn(acc), acc, fns); - } -); diff --git a/node_modules/@hyperjump/pact/src/type-utils.d.ts b/node_modules/@hyperjump/pact/src/type-utils.d.ts deleted file mode 100644 index b808ebc1..00000000 --- a/node_modules/@hyperjump/pact/src/type-utils.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type IterableItem = T extends Iterable ? U : never; -export type AsyncIterableItem = T extends AsyncIterable ? U : never; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -type LastReturnType any)[]> = T extends [...any, (...args: any) => infer R] ? R : never; diff --git a/node_modules/@hyperjump/uri/LICENSE b/node_modules/@hyperjump/uri/LICENSE deleted file mode 100644 index 6e9846cf..00000000 --- a/node_modules/@hyperjump/uri/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/uri/README.md b/node_modules/@hyperjump/uri/README.md deleted file mode 100644 index 79bfc451..00000000 --- a/node_modules/@hyperjump/uri/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# URI -A small and fast library for validating, parsing, and resolving URIs -([RFC 3986](https://www.rfc-editor.org/rfc/rfc3986)) and IRIs -([RFC 3987](https://www.rfc-editor.org/rfc/rfc3987)). - -## Install -Designed for node.js (ES Modules, TypeScript) and browsers. - -``` -npm install @hyperjump/uri -``` - -## Usage -```javascript -import { resolveUri, parseUri, isUri, isIri } from "@hyperjump/uri" - -const resolved = resolveUri("foo/bar", "http://example.com/aaa/bbb"); // https://example.com/aaa/foo/bar - -const components = parseUri("https://jason@example.com:80/foo?bar#baz"); // { -// scheme: "https", -// authority: "jason@example.com:80", -// userinfo: "jason", -// host: "example.com", -// port: "80", -// path: "/foo", -// query: "bar", -// fragment: "baz" -// } - -const a = isUri("http://examplé.org/rosé#"); // false -const a = isIri("http://examplé.org/rosé#"); // true -``` - -## API -### Resolve Relative References -These functions resolve relative-references against a base URI/IRI. The base -URI/IRI must be absolute, meaning it must have a scheme (`https`) and no -fragment (`#foo`). The resolution process will [normalize](#normalize) the -result. - -* **resolveUri**: (uriReference: string, baseUri: string) => string -* **resolveIri**: (iriReference: string, baseIri: string) => string - -### Normalize -These functions apply the following normalization rules. -1. Decode any unnecessarily percent-encoded characters. -2. Convert any lowercase characters in the hex numbers of percent-encoded - characters to uppercase. -3. Resolve and remove any dot-segments (`/.`, `/..`) in paths. -4. Convert the scheme to lowercase. -5. Convert the authority to lowercase. - -* **normalizeUri**: (uri: string) => string -* **normalizeIri**: (iri: string) => string - -### To Relative -These functions convert a non-relative URI/IRI into a relative URI/IRI given a -base. - -* **toRelativeUri**: (uri: string, relativeTo: string) => string -* **toRelativeIri**: (iri: string, relativeTo: string) => string - -### URI -A [URI](https://www.rfc-editor.org/rfc/rfc3986#section-3) is not relative and -may include a fragment. - -* **isUri**: (value: string) => boolean -* **parseUri**: (value: string) => IdentifierComponents -* **toAbsoluteUri**: (value: string) => string - - Takes a URI and strips its fragment component if it exists. - -### URI-Reference -A [URI-reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.1) may be -relative. - -* **isUriReference**: (value: string) => boolean -* **parseUriReference**: (value: string) => IdentifierComponents - -### absolute-URI -An [absolute-URI](https://www.rfc-editor.org/rfc/rfc3986#section-4.3) is not -relative an does not include a fragment. - -* **isAbsoluteUri**: (value: string) => boolean -* **parseAbsoluteUri**: (value: string) => IdentifierComponents - -### IRI -An IRI is not relative and may include a fragment. - -* **isIri**: (value: string) => boolean -* **parseIri**: (value: string) => IdentifierComponents -* **toAbsoluteIri**: (value: string) => string - - Takes an IRI and strips its fragment component if it exists. - -### IRI-reference -An IRI-reference may be relative. - -* **isIriReference**: (value: string) => boolean -* **parseIriReference**: (value: string) => IdentifierComponents - -### absolute-IRI -An absolute-IRI is not relative an does not include a fragment. - -* **isAbsoluteIri**: (value: string) => boolean -* **parseAbsoluteIri**: (value: string) => IdentifierComponents - -### Types -* **IdentifierComponents** - * **scheme**: string - * **authority**: string - * **userinfo**: string - * **host**: string - * **port**: string - * **path**: string - * **query**: string - * **fragment**: string - -## Contributing -### Tests -Run the tests -``` -npm test -``` - -Run the tests with a continuous test runner -``` -npm test -- --watch -``` diff --git a/node_modules/@hyperjump/uri/package.json b/node_modules/@hyperjump/uri/package.json deleted file mode 100644 index f2753292..00000000 --- a/node_modules/@hyperjump/uri/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "@hyperjump/uri", - "version": "1.3.2", - "description": "A small and fast library for validating parsing and resolving URIs and IRIs", - "type": "module", - "main": "./lib/index.js", - "exports": "./lib/index.js", - "scripts": { - "lint": "eslint lib", - "test": "vitest --watch=false", - "type-check": "tsc --noEmit" - }, - "repository": "github:hyperjump-io/uri", - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "keywords": [ - "URI", - "IRI", - "resolve", - "relative", - "parse", - "RFC3986", - "RFC-3986", - "RFC3987", - "RFC-3987" - ], - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "^22.13.0", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "typescript-eslint": "*", - "vitest": "*" - } -} diff --git a/node_modules/content-type/HISTORY.md b/node_modules/content-type/HISTORY.md deleted file mode 100644 index 45836713..00000000 --- a/node_modules/content-type/HISTORY.md +++ /dev/null @@ -1,29 +0,0 @@ -1.0.5 / 2023-01-29 -================== - - * perf: skip value escaping when unnecessary - -1.0.4 / 2017-09-11 -================== - - * perf: skip parameter parsing when no parameters - -1.0.3 / 2017-09-10 -================== - - * perf: remove argument reassignment - -1.0.2 / 2016-05-09 -================== - - * perf: enable strict mode - -1.0.1 / 2015-02-13 -================== - - * Improve missing `Content-Type` header error message - -1.0.0 / 2015-02-01 -================== - - * Initial implementation, derived from `media-typer@0.3.0` diff --git a/node_modules/content-type/LICENSE b/node_modules/content-type/LICENSE deleted file mode 100644 index 34b1a2de..00000000 --- a/node_modules/content-type/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/content-type/README.md b/node_modules/content-type/README.md deleted file mode 100644 index c1a922a9..00000000 --- a/node_modules/content-type/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# content-type - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -Create and parse HTTP Content-Type header according to RFC 7231 - -## Installation - -```sh -$ npm install content-type -``` - -## API - -```js -var contentType = require('content-type') -``` - -### contentType.parse(string) - -```js -var obj = contentType.parse('image/svg+xml; charset=utf-8') -``` - -Parse a `Content-Type` header. This will return an object with the following -properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): - - - `type`: The media type (the type and subtype, always lower case). - Example: `'image/svg+xml'` - - - `parameters`: An object of the parameters in the media type (name of parameter - always lower case). Example: `{charset: 'utf-8'}` - -Throws a `TypeError` if the string is missing or invalid. - -### contentType.parse(req) - -```js -var obj = contentType.parse(req) -``` - -Parse the `Content-Type` header from the given `req`. Short-cut for -`contentType.parse(req.headers['content-type'])`. - -Throws a `TypeError` if the `Content-Type` header is missing or invalid. - -### contentType.parse(res) - -```js -var obj = contentType.parse(res) -``` - -Parse the `Content-Type` header set on the given `res`. Short-cut for -`contentType.parse(res.getHeader('content-type'))`. - -Throws a `TypeError` if the `Content-Type` header is missing or invalid. - -### contentType.format(obj) - -```js -var str = contentType.format({ - type: 'image/svg+xml', - parameters: { charset: 'utf-8' } -}) -``` - -Format an object into a `Content-Type` header. This will return a string of the -content type for the given object with the following properties (examples are -shown that produce the string `'image/svg+xml; charset=utf-8'`): - - - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'` - - - `parameters`: An object of the parameters in the media type (name of the - parameter will be lower-cased). Example: `{charset: 'utf-8'}` - -Throws a `TypeError` if the object contains an invalid type or parameter names. - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/content-type/master?label=ci -[ci-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/content-type/master -[coveralls-url]: https://coveralls.io/r/jshttp/content-type?branch=master -[node-image]: https://badgen.net/npm/node/content-type -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/content-type -[npm-url]: https://npmjs.org/package/content-type -[npm-version-image]: https://badgen.net/npm/v/content-type diff --git a/node_modules/content-type/index.js b/node_modules/content-type/index.js deleted file mode 100644 index 41840e7b..00000000 --- a/node_modules/content-type/index.js +++ /dev/null @@ -1,225 +0,0 @@ -/*! - * content-type - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 - * - * parameter = token "=" ( token / quoted-string ) - * token = 1*tchar - * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" - * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" - * / DIGIT / ALPHA - * ; any VCHAR, except delimiters - * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE - * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text - * obs-text = %x80-FF - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - */ -var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g // eslint-disable-line no-control-regex -var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ // eslint-disable-line no-control-regex -var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ - -/** - * RegExp to match quoted-pair in RFC 7230 sec 3.2.6 - * - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - * obs-text = %x80-FF - */ -var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g // eslint-disable-line no-control-regex - -/** - * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6 - */ -var QUOTE_REGEXP = /([\\"])/g - -/** - * RegExp to match type in RFC 7231 sec 3.1.1.1 - * - * media-type = type "/" subtype - * type = token - * subtype = token - */ -var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ - -/** - * Module exports. - * @public - */ - -exports.format = format -exports.parse = parse - -/** - * Format object to media type. - * - * @param {object} obj - * @return {string} - * @public - */ - -function format (obj) { - if (!obj || typeof obj !== 'object') { - throw new TypeError('argument obj is required') - } - - var parameters = obj.parameters - var type = obj.type - - if (!type || !TYPE_REGEXP.test(type)) { - throw new TypeError('invalid type') - } - - var string = type - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - if (!TOKEN_REGEXP.test(param)) { - throw new TypeError('invalid parameter name') - } - - string += '; ' + param + '=' + qstring(parameters[param]) - } - } - - return string -} - -/** - * Parse media type to object. - * - * @param {string|object} string - * @return {Object} - * @public - */ - -function parse (string) { - if (!string) { - throw new TypeError('argument string is required') - } - - // support req/res-like objects as argument - var header = typeof string === 'object' - ? getcontenttype(string) - : string - - if (typeof header !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - var index = header.indexOf(';') - var type = index !== -1 - ? header.slice(0, index).trim() - : header.trim() - - if (!TYPE_REGEXP.test(type)) { - throw new TypeError('invalid media type') - } - - var obj = new ContentType(type.toLowerCase()) - - // parse parameters - if (index !== -1) { - var key - var match - var value - - PARAM_REGEXP.lastIndex = index - - while ((match = PARAM_REGEXP.exec(header))) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (value.charCodeAt(0) === 0x22 /* " */) { - // remove quotes - value = value.slice(1, -1) - - // remove escapes - if (value.indexOf('\\') !== -1) { - value = value.replace(QESC_REGEXP, '$1') - } - } - - obj.parameters[key] = value - } - - if (index !== header.length) { - throw new TypeError('invalid parameter format') - } - } - - return obj -} - -/** - * Get content-type from req/res objects. - * - * @param {object} - * @return {Object} - * @private - */ - -function getcontenttype (obj) { - var header - - if (typeof obj.getHeader === 'function') { - // res-like - header = obj.getHeader('content-type') - } else if (typeof obj.headers === 'object') { - // req-like - header = obj.headers && obj.headers['content-type'] - } - - if (typeof header !== 'string') { - throw new TypeError('content-type header is missing from object') - } - - return header -} - -/** - * Quote a string if necessary. - * - * @param {string} val - * @return {string} - * @private - */ - -function qstring (val) { - var str = String(val) - - // no need to quote tokens - if (TOKEN_REGEXP.test(str)) { - return str - } - - if (str.length > 0 && !TEXT_REGEXP.test(str)) { - throw new TypeError('invalid parameter value') - } - - return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' -} - -/** - * Class to represent a content type. - * @private - */ -function ContentType (type) { - this.parameters = Object.create(null) - this.type = type -} diff --git a/node_modules/content-type/package.json b/node_modules/content-type/package.json deleted file mode 100644 index 9db19f63..00000000 --- a/node_modules/content-type/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "content-type", - "description": "Create and parse HTTP Content-Type header", - "version": "1.0.5", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "keywords": [ - "content-type", - "http", - "req", - "res", - "rfc7231" - ], - "repository": "jshttp/content-type", - "devDependencies": { - "deep-equal": "1.0.1", - "eslint": "8.32.0", - "eslint-config-standard": "15.0.1", - "eslint-plugin-import": "2.27.5", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "6.1.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "10.2.0", - "nyc": "15.1.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/idn-hostname/#/tests/0/0.json b/node_modules/idn-hostname/#/tests/0/0.json deleted file mode 100644 index 29be3a6e..00000000 --- a/node_modules/idn-hostname/#/tests/0/0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid internationalized hostname", - "data": "例子.测试", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/1.json b/node_modules/idn-hostname/#/tests/0/1.json deleted file mode 100644 index 52473165..00000000 --- a/node_modules/idn-hostname/#/tests/0/1.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid hostname with mixed scripts", - "data": "xn--fsqu00a.xn--0zwm56d", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/10.json b/node_modules/idn-hostname/#/tests/0/10.json deleted file mode 100644 index 12c8a6a7..00000000 --- a/node_modules/idn-hostname/#/tests/0/10.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with segment longer than 63 chars", - "data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.example.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/11.json b/node_modules/idn-hostname/#/tests/0/11.json deleted file mode 100644 index 0ca8d8bc..00000000 --- a/node_modules/idn-hostname/#/tests/0/11.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with more than 255 characters", - "data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/12.json b/node_modules/idn-hostname/#/tests/0/12.json deleted file mode 100644 index 17a459c2..00000000 --- a/node_modules/idn-hostname/#/tests/0/12.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with trailing dot", - "data": "example.com.", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/13.json b/node_modules/idn-hostname/#/tests/0/13.json deleted file mode 100644 index 48d0662d..00000000 --- a/node_modules/idn-hostname/#/tests/0/13.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with leading dot", - "data": ".example.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/14.json b/node_modules/idn-hostname/#/tests/0/14.json deleted file mode 100644 index 157d272b..00000000 --- a/node_modules/idn-hostname/#/tests/0/14.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with consecutive dots", - "data": "example..com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/15.json b/node_modules/idn-hostname/#/tests/0/15.json deleted file mode 100644 index 8cf58357..00000000 --- a/node_modules/idn-hostname/#/tests/0/15.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid hostname with single segment (no TLD)", - "data": "localhost", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/16.json b/node_modules/idn-hostname/#/tests/0/16.json deleted file mode 100644 index 080d12fd..00000000 --- a/node_modules/idn-hostname/#/tests/0/16.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "a valid host name (example.test in Hangul)", - "data": "실례.테스트", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/17.json b/node_modules/idn-hostname/#/tests/0/17.json deleted file mode 100644 index eaa73f4f..00000000 --- a/node_modules/idn-hostname/#/tests/0/17.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "illegal first char U+302E Hangul single dot tone mark", - "data": "〮실례.테스트", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/18.json b/node_modules/idn-hostname/#/tests/0/18.json deleted file mode 100644 index aead92cc..00000000 --- a/node_modules/idn-hostname/#/tests/0/18.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "contains illegal char U+302E Hangul single dot tone mark", - "data": "실〮례.테스트", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/19.json b/node_modules/idn-hostname/#/tests/0/19.json deleted file mode 100644 index a736381a..00000000 --- a/node_modules/idn-hostname/#/tests/0/19.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "a host name with a component too long", - "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/2.json b/node_modules/idn-hostname/#/tests/0/2.json deleted file mode 100644 index 5478ea8a..00000000 --- a/node_modules/idn-hostname/#/tests/0/2.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid hostname with alphanumeric characters and hyphens", - "data": "sub-example.example.com", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/20.json b/node_modules/idn-hostname/#/tests/0/20.json deleted file mode 100644 index 4b51d1c9..00000000 --- a/node_modules/idn-hostname/#/tests/0/20.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "invalid label, correct Punycode", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc3492#section-7.1", - "data": "-> $1.00 <--", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/21.json b/node_modules/idn-hostname/#/tests/0/21.json deleted file mode 100644 index c1067bff..00000000 --- a/node_modules/idn-hostname/#/tests/0/21.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "valid Chinese Punycode", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4", - "data": "xn--ihqwcrb4cv8a8dqg056pqjye", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/22.json b/node_modules/idn-hostname/#/tests/0/22.json deleted file mode 100644 index 488f177d..00000000 --- a/node_modules/idn-hostname/#/tests/0/22.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "invalid Punycode", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", - "data": "xn--X", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/23.json b/node_modules/idn-hostname/#/tests/0/23.json deleted file mode 100644 index 88390d45..00000000 --- a/node_modules/idn-hostname/#/tests/0/23.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "U-label contains \"--\" after the 3rd and 4th position", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", - "data": "XN--a--aaaa", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/24.json b/node_modules/idn-hostname/#/tests/0/24.json deleted file mode 100644 index cf2ceddd..00000000 --- a/node_modules/idn-hostname/#/tests/0/24.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "U-label starts with a dash", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", - "data": "-hello", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/25.json b/node_modules/idn-hostname/#/tests/0/25.json deleted file mode 100644 index 499915b1..00000000 --- a/node_modules/idn-hostname/#/tests/0/25.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "U-label ends with a dash", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", - "data": "hello-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/26.json b/node_modules/idn-hostname/#/tests/0/26.json deleted file mode 100644 index 5c633fd5..00000000 --- a/node_modules/idn-hostname/#/tests/0/26.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "U-label starts and ends with a dash", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", - "data": "-hello-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/27.json b/node_modules/idn-hostname/#/tests/0/27.json deleted file mode 100644 index eb6b9a83..00000000 --- a/node_modules/idn-hostname/#/tests/0/27.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Begins with a Spacing Combining Mark", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", - "data": "ःhello", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/28.json b/node_modules/idn-hostname/#/tests/0/28.json deleted file mode 100644 index 31a795fe..00000000 --- a/node_modules/idn-hostname/#/tests/0/28.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Begins with a Nonspacing Mark", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", - "data": "̀hello", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/29.json b/node_modules/idn-hostname/#/tests/0/29.json deleted file mode 100644 index f83cf23d..00000000 --- a/node_modules/idn-hostname/#/tests/0/29.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Begins with an Enclosing Mark", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", - "data": "҈hello", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/3.json b/node_modules/idn-hostname/#/tests/0/3.json deleted file mode 100644 index c2bb63df..00000000 --- a/node_modules/idn-hostname/#/tests/0/3.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid hostname with multiple internationalized segments", - "data": "测试.例子.测试", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/30.json b/node_modules/idn-hostname/#/tests/0/30.json deleted file mode 100644 index c031e01c..00000000 --- a/node_modules/idn-hostname/#/tests/0/30.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Exceptions that are PVALID, left-to-right chars", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", - "data": "ßς་〇", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/31.json b/node_modules/idn-hostname/#/tests/0/31.json deleted file mode 100644 index 82a336f8..00000000 --- a/node_modules/idn-hostname/#/tests/0/31.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Exceptions that are PVALID, right-to-left chars", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", - "data": "۽۾", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/32.json b/node_modules/idn-hostname/#/tests/0/32.json deleted file mode 100644 index 307224a3..00000000 --- a/node_modules/idn-hostname/#/tests/0/32.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Exceptions that are DISALLOWED, right-to-left chars", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", - "data": "ـߺ", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/33.json b/node_modules/idn-hostname/#/tests/0/33.json deleted file mode 100644 index 75572ff1..00000000 --- a/node_modules/idn-hostname/#/tests/0/33.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Exceptions that are DISALLOWED, left-to-right chars", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start", - "data": "〱〲〳〴〵〮〯〻", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/34.json b/node_modules/idn-hostname/#/tests/0/34.json deleted file mode 100644 index 50b230dd..00000000 --- a/node_modules/idn-hostname/#/tests/0/34.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with no preceding 'l'", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "a·l", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/35.json b/node_modules/idn-hostname/#/tests/0/35.json deleted file mode 100644 index b1c5b6d8..00000000 --- a/node_modules/idn-hostname/#/tests/0/35.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with nothing preceding", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "·l", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/36.json b/node_modules/idn-hostname/#/tests/0/36.json deleted file mode 100644 index 969b50e8..00000000 --- a/node_modules/idn-hostname/#/tests/0/36.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with no following 'l'", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "l·a", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/37.json b/node_modules/idn-hostname/#/tests/0/37.json deleted file mode 100644 index 8902a6e1..00000000 --- a/node_modules/idn-hostname/#/tests/0/37.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with nothing following", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "l·", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/38.json b/node_modules/idn-hostname/#/tests/0/38.json deleted file mode 100644 index e7a7f73a..00000000 --- a/node_modules/idn-hostname/#/tests/0/38.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with surrounding 'l's", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "l·l", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/39.json b/node_modules/idn-hostname/#/tests/0/39.json deleted file mode 100644 index feead6d4..00000000 --- a/node_modules/idn-hostname/#/tests/0/39.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Greek KERAIA not followed by Greek", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", - "data": "α͵S", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/4.json b/node_modules/idn-hostname/#/tests/0/4.json deleted file mode 100644 index f65e220a..00000000 --- a/node_modules/idn-hostname/#/tests/0/4.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "ZERO WIDTH NON-JOINER (U+200C) not preceded by a Virama", - "data": "exam‌ple.测试", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/40.json b/node_modules/idn-hostname/#/tests/0/40.json deleted file mode 100644 index c2ff2e6e..00000000 --- a/node_modules/idn-hostname/#/tests/0/40.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Greek KERAIA not followed by anything", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", - "data": "α͵", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/41.json b/node_modules/idn-hostname/#/tests/0/41.json deleted file mode 100644 index 09e8d145..00000000 --- a/node_modules/idn-hostname/#/tests/0/41.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Greek KERAIA followed by Greek", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", - "data": "α͵β", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/42.json b/node_modules/idn-hostname/#/tests/0/42.json deleted file mode 100644 index f0953aac..00000000 --- a/node_modules/idn-hostname/#/tests/0/42.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERESH not preceded by Hebrew", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", - "data": "A׳ב", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/43.json b/node_modules/idn-hostname/#/tests/0/43.json deleted file mode 100644 index 9c56dea4..00000000 --- a/node_modules/idn-hostname/#/tests/0/43.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERESH not preceded by anything", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", - "data": "׳ב", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/44.json b/node_modules/idn-hostname/#/tests/0/44.json deleted file mode 100644 index 104be9f6..00000000 --- a/node_modules/idn-hostname/#/tests/0/44.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERESH preceded by Hebrew", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", - "data": "א׳ב", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/45.json b/node_modules/idn-hostname/#/tests/0/45.json deleted file mode 100644 index f24c59ee..00000000 --- a/node_modules/idn-hostname/#/tests/0/45.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERSHAYIM not preceded by Hebrew", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", - "data": "A״ב", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/46.json b/node_modules/idn-hostname/#/tests/0/46.json deleted file mode 100644 index 94e004a0..00000000 --- a/node_modules/idn-hostname/#/tests/0/46.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERSHAYIM not preceded by anything", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", - "data": "״ב", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/47.json b/node_modules/idn-hostname/#/tests/0/47.json deleted file mode 100644 index faf362d6..00000000 --- a/node_modules/idn-hostname/#/tests/0/47.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERSHAYIM preceded by Hebrew", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", - "data": "א״ב", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/48.json b/node_modules/idn-hostname/#/tests/0/48.json deleted file mode 100644 index 184db77b..00000000 --- a/node_modules/idn-hostname/#/tests/0/48.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "def・abc", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/49.json b/node_modules/idn-hostname/#/tests/0/49.json deleted file mode 100644 index 443d6870..00000000 --- a/node_modules/idn-hostname/#/tests/0/49.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with no other characters", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "・", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/5.json b/node_modules/idn-hostname/#/tests/0/5.json deleted file mode 100644 index 1b2f583f..00000000 --- a/node_modules/idn-hostname/#/tests/0/5.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with space", - "data": "ex ample.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/50.json b/node_modules/idn-hostname/#/tests/0/50.json deleted file mode 100644 index 08dd95c9..00000000 --- a/node_modules/idn-hostname/#/tests/0/50.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with Hiragana", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "・ぁ", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/51.json b/node_modules/idn-hostname/#/tests/0/51.json deleted file mode 100644 index 34da1179..00000000 --- a/node_modules/idn-hostname/#/tests/0/51.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with Katakana", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "・ァ", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/52.json b/node_modules/idn-hostname/#/tests/0/52.json deleted file mode 100644 index fa79802b..00000000 --- a/node_modules/idn-hostname/#/tests/0/52.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with Han", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "・丈", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/53.json b/node_modules/idn-hostname/#/tests/0/53.json deleted file mode 100644 index ba5614e5..00000000 --- a/node_modules/idn-hostname/#/tests/0/53.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", - "data": "٠۰", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/54.json b/node_modules/idn-hostname/#/tests/0/54.json deleted file mode 100644 index 81386902..00000000 --- a/node_modules/idn-hostname/#/tests/0/54.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", - "data": "ب٠ب", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/55.json b/node_modules/idn-hostname/#/tests/0/55.json deleted file mode 100644 index 81c3dd69..00000000 --- a/node_modules/idn-hostname/#/tests/0/55.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Extended Arabic-Indic digits mixed with ASCII digits", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", - "data": "۰0", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/56.json b/node_modules/idn-hostname/#/tests/0/56.json deleted file mode 100644 index 22bc8471..00000000 --- a/node_modules/idn-hostname/#/tests/0/56.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH JOINER not preceded by Virama", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", - "data": "क‍ष", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/57.json b/node_modules/idn-hostname/#/tests/0/57.json deleted file mode 100644 index 22728cc5..00000000 --- a/node_modules/idn-hostname/#/tests/0/57.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH JOINER not preceded by anything", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", - "data": "‍ष", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/58.json b/node_modules/idn-hostname/#/tests/0/58.json deleted file mode 100644 index 49187f3e..00000000 --- a/node_modules/idn-hostname/#/tests/0/58.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH JOINER preceded by Virama", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", - "data": "क्‍ष", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/59.json b/node_modules/idn-hostname/#/tests/0/59.json deleted file mode 100644 index 01d03a3e..00000000 --- a/node_modules/idn-hostname/#/tests/0/59.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH NON-JOINER preceded by Virama", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", - "data": "क्‌ष", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/6.json b/node_modules/idn-hostname/#/tests/0/6.json deleted file mode 100644 index 21d8c4be..00000000 --- a/node_modules/idn-hostname/#/tests/0/6.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname starting with hyphen", - "data": "-example.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/60.json b/node_modules/idn-hostname/#/tests/0/60.json deleted file mode 100644 index 8a924362..00000000 --- a/node_modules/idn-hostname/#/tests/0/60.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches context joining rule", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", - "data": "بي‌بي", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/61.json b/node_modules/idn-hostname/#/tests/0/61.json deleted file mode 100644 index 7ee18591..00000000 --- a/node_modules/idn-hostname/#/tests/0/61.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Labels with \"--\" in the third and fourth positions are ACE labels and must start with \"xn\" (RFC 5891 §4.2.1).", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.1", - "data": "ab--cd", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/62.json b/node_modules/idn-hostname/#/tests/0/62.json deleted file mode 100644 index 96f8516a..00000000 --- a/node_modules/idn-hostname/#/tests/0/62.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Labels with \"--\" in the third and fourth positions are ACE labels and must start with \"xn\" (RFC 5891 §4.2.1).", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.1", - "data": "xn--cd.ef--gh", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/63.json b/node_modules/idn-hostname/#/tests/0/63.json deleted file mode 100644 index 01ca77ad..00000000 --- a/node_modules/idn-hostname/#/tests/0/63.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 1 — L-branch pass: label starts with L and contains L", - "data": "gk", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/64.json b/node_modules/idn-hostname/#/tests/0/64.json deleted file mode 100644 index 2f1262ca..00000000 --- a/node_modules/idn-hostname/#/tests/0/64.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 1 — R-branch pass: label starts with R and contains R", - "data": "אב", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/65.json b/node_modules/idn-hostname/#/tests/0/65.json deleted file mode 100644 index 93583c70..00000000 --- a/node_modules/idn-hostname/#/tests/0/65.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 1 — R-branch fail: contains R but doesn't start with R", - "data": "gא", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/66.json b/node_modules/idn-hostname/#/tests/0/66.json deleted file mode 100644 index aa44b499..00000000 --- a/node_modules/idn-hostname/#/tests/0/66.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "BiDi rules not affecting label that does not contain RTL chars", - "data": "1host", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/67.json b/node_modules/idn-hostname/#/tests/0/67.json deleted file mode 100644 index c7f30f14..00000000 --- a/node_modules/idn-hostname/#/tests/0/67.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 2 — pass: starts R and uses allowed classes (R, EN)", - "data": "א1", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/68.json b/node_modules/idn-hostname/#/tests/0/68.json deleted file mode 100644 index 9b832ab3..00000000 --- a/node_modules/idn-hostname/#/tests/0/68.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 2 — pass: starts AL and uses allowed classes (AL, AN)", - "data": "ا١", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/69.json b/node_modules/idn-hostname/#/tests/0/69.json deleted file mode 100644 index b562344d..00000000 --- a/node_modules/idn-hostname/#/tests/0/69.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 2 — fail: starts R but contains L (disallowed)", - "data": "אg", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/7.json b/node_modules/idn-hostname/#/tests/0/7.json deleted file mode 100644 index 2597c58d..00000000 --- a/node_modules/idn-hostname/#/tests/0/7.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname ending with hyphen", - "data": "example-.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/70.json b/node_modules/idn-hostname/#/tests/0/70.json deleted file mode 100644 index 1edde449..00000000 --- a/node_modules/idn-hostname/#/tests/0/70.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 2 — fail: starts AL but contains L (disallowed)", - "data": "اG", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/71.json b/node_modules/idn-hostname/#/tests/0/71.json deleted file mode 100644 index 1ccd8aac..00000000 --- a/node_modules/idn-hostname/#/tests/0/71.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 3 — pass: starts R and last strong is EN", - "data": "א1", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/72.json b/node_modules/idn-hostname/#/tests/0/72.json deleted file mode 100644 index 73146711..00000000 --- a/node_modules/idn-hostname/#/tests/0/72.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 3 — pass: starts AL and last strong is AN", - "data": "ا١", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/73.json b/node_modules/idn-hostname/#/tests/0/73.json deleted file mode 100644 index bb52198a..00000000 --- a/node_modules/idn-hostname/#/tests/0/73.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 3 — fail: starts R but last strong is ES (not allowed)", - "data": "א-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/74.json b/node_modules/idn-hostname/#/tests/0/74.json deleted file mode 100644 index a0e22808..00000000 --- a/node_modules/idn-hostname/#/tests/0/74.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 3 — fail: starts AL but last strong is ES (not allowed)", - "data": "ا-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/75.json b/node_modules/idn-hostname/#/tests/0/75.json deleted file mode 100644 index 5e02851a..00000000 --- a/node_modules/idn-hostname/#/tests/0/75.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 4 violation: mixed AN with EN", - "data": "ثال١234ثال", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/76.json b/node_modules/idn-hostname/#/tests/0/76.json deleted file mode 100644 index 91f812a9..00000000 --- a/node_modules/idn-hostname/#/tests/0/76.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "AN only in label not affected by BiDi rules (no R or AL char present)", - "data": "١٢", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/77.json b/node_modules/idn-hostname/#/tests/0/77.json deleted file mode 100644 index 97337bec..00000000 --- a/node_modules/idn-hostname/#/tests/0/77.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "mixed EN and AN not affected by BiDi rules (no R or AL char present)", - "data": "1١", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/78.json b/node_modules/idn-hostname/#/tests/0/78.json deleted file mode 100644 index 3c478f2b..00000000 --- a/node_modules/idn-hostname/#/tests/0/78.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "mixed AN and EN not affected by BiDi rules (no R or AL char present)", - "data": "١2", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/79.json b/node_modules/idn-hostname/#/tests/0/79.json deleted file mode 100644 index 09ad123f..00000000 --- a/node_modules/idn-hostname/#/tests/0/79.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 5 — pass: starts L and contains EN (allowed)", - "data": "g1", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/8.json b/node_modules/idn-hostname/#/tests/0/8.json deleted file mode 100644 index ad99f4c1..00000000 --- a/node_modules/idn-hostname/#/tests/0/8.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid tld starting with hyphen", - "data": "example.-com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/80.json b/node_modules/idn-hostname/#/tests/0/80.json deleted file mode 100644 index d010e22e..00000000 --- a/node_modules/idn-hostname/#/tests/0/80.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 5 — pass: starts L and contains ES (allowed)", - "data": "a-b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/81.json b/node_modules/idn-hostname/#/tests/0/81.json deleted file mode 100644 index 6f5574cd..00000000 --- a/node_modules/idn-hostname/#/tests/0/81.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 5 — fail: starts L but contains R (disallowed)", - "data": "gא", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/82.json b/node_modules/idn-hostname/#/tests/0/82.json deleted file mode 100644 index 94c29690..00000000 --- a/node_modules/idn-hostname/#/tests/0/82.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "mixed L with AN not affected by BiDi rules (no R or AL char present)", - "data": "g١", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/83.json b/node_modules/idn-hostname/#/tests/0/83.json deleted file mode 100644 index ec5ac2c4..00000000 --- a/node_modules/idn-hostname/#/tests/0/83.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 6 — pass: starts L and ends with L", - "data": "gk", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/84.json b/node_modules/idn-hostname/#/tests/0/84.json deleted file mode 100644 index bd4a1c9e..00000000 --- a/node_modules/idn-hostname/#/tests/0/84.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 6 — pass: starts L and ends with EN", - "data": "g1", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/85.json b/node_modules/idn-hostname/#/tests/0/85.json deleted file mode 100644 index 6aa832a5..00000000 --- a/node_modules/idn-hostname/#/tests/0/85.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 6 — fail: starts L and ends with ET (not L or EN)", - "data": "g#", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/86.json b/node_modules/idn-hostname/#/tests/0/86.json deleted file mode 100644 index c0388bb3..00000000 --- a/node_modules/idn-hostname/#/tests/0/86.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 6 — fail: starts L and ends with ET (not L or EN)", - "data": "g%", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/87.json b/node_modules/idn-hostname/#/tests/0/87.json deleted file mode 100644 index 1dce58d4..00000000 --- a/node_modules/idn-hostname/#/tests/0/87.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "single dot", - "data": ".", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/88.json b/node_modules/idn-hostname/#/tests/0/88.json deleted file mode 100644 index 6d1f4659..00000000 --- a/node_modules/idn-hostname/#/tests/0/88.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "single ideographic full stop", - "data": "。", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/89.json b/node_modules/idn-hostname/#/tests/0/89.json deleted file mode 100644 index 11f8e66a..00000000 --- a/node_modules/idn-hostname/#/tests/0/89.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "single fullwidth full stop", - "data": ".", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/9.json b/node_modules/idn-hostname/#/tests/0/9.json deleted file mode 100644 index 979d1c53..00000000 --- a/node_modules/idn-hostname/#/tests/0/9.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid tld ending with hyphen", - "data": "example.com-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/90.json b/node_modules/idn-hostname/#/tests/0/90.json deleted file mode 100644 index c501b98b..00000000 --- a/node_modules/idn-hostname/#/tests/0/90.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "single halfwidth ideographic full stop", - "data": "。", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/91.json b/node_modules/idn-hostname/#/tests/0/91.json deleted file mode 100644 index 324c76d1..00000000 --- a/node_modules/idn-hostname/#/tests/0/91.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "dot as label separator", - "data": "a.b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/92.json b/node_modules/idn-hostname/#/tests/0/92.json deleted file mode 100644 index 1068e4cc..00000000 --- a/node_modules/idn-hostname/#/tests/0/92.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "ideographic full stop as label separator", - "data": "a。b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/93.json b/node_modules/idn-hostname/#/tests/0/93.json deleted file mode 100644 index 9c3421f6..00000000 --- a/node_modules/idn-hostname/#/tests/0/93.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "fullwidth full stop as label separator", - "data": "a.b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/94.json b/node_modules/idn-hostname/#/tests/0/94.json deleted file mode 100644 index 175759f8..00000000 --- a/node_modules/idn-hostname/#/tests/0/94.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "halfwidth ideographic full stop as label separator", - "data": "a。b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/95.json b/node_modules/idn-hostname/#/tests/0/95.json deleted file mode 100644 index 349f57f4..00000000 --- a/node_modules/idn-hostname/#/tests/0/95.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with surrounding 'l's as A-Label", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "xn--ll-0ea", - "valid": true -} diff --git a/node_modules/idn-hostname/#/tests/0/schema.json b/node_modules/idn-hostname/#/tests/0/schema.json deleted file mode 100644 index c21edcbc..00000000 --- a/node_modules/idn-hostname/#/tests/0/schema.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "An internationalized hostname as defined by RFC5890, RFC5891, RFC5892, RFC5893, RFC3492 and UTS#46", - "$ref": "#/#/#/#/idn-hostname" -} diff --git a/node_modules/idn-hostname/LICENSE b/node_modules/idn-hostname/LICENSE deleted file mode 100644 index 5446d3a8..00000000 --- a/node_modules/idn-hostname/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 SorinGFS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/idn-hostname/idnaMappingTableCompact.json b/node_modules/idn-hostname/idnaMappingTableCompact.json deleted file mode 100644 index a90116ea..00000000 --- a/node_modules/idn-hostname/idnaMappingTableCompact.json +++ /dev/null @@ -1 +0,0 @@ -{"props":["valid","mapped","deviation","ignored","disallowed"],"viramas":[2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5909,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,68159,69702,69744,69759,69817,69939,69940,70080,70197,70378,70477,70722,70850,71103,71231,71350,71467,71737,71997,71998,72160,72244,72263,72345,72767,73028,73029,73111,73537,73538],"ranges":[[45,45,0],[48,57,0],[65,90,1],[97,122,0],[170,170,1],[173,173,3],[178,179,1],[181,181,1],[183,183,0],[185,186,1],[188,190,1],[192,214,1],[216,222,1],[223,223,2],[224,246,0],[248,255,0],[256,256,1],[257,257,0],[258,258,1],[259,259,0],[260,260,1],[261,261,0],[262,262,1],[263,263,0],[264,264,1],[265,265,0],[266,266,1],[267,267,0],[268,268,1],[269,269,0],[270,270,1],[271,271,0],[272,272,1],[273,273,0],[274,274,1],[275,275,0],[276,276,1],[277,277,0],[278,278,1],[279,279,0],[280,280,1],[281,281,0],[282,282,1],[283,283,0],[284,284,1],[285,285,0],[286,286,1],[287,287,0],[288,288,1],[289,289,0],[290,290,1],[291,291,0],[292,292,1],[293,293,0],[294,294,1],[295,295,0],[296,296,1],[297,297,0],[298,298,1],[299,299,0],[300,300,1],[301,301,0],[302,302,1],[303,303,0],[304,304,1],[305,305,0],[306,306,1],[308,308,1],[309,309,0],[310,310,1],[311,312,0],[313,313,1],[314,314,0],[315,315,1],[316,316,0],[317,317,1],[318,318,0],[319,319,1],[321,321,1],[322,322,0],[323,323,1],[324,324,0],[325,325,1],[326,326,0],[327,327,1],[328,328,0],[329,330,1],[331,331,0],[332,332,1],[333,333,0],[334,334,1],[335,335,0],[336,336,1],[337,337,0],[338,338,1],[339,339,0],[340,340,1],[341,341,0],[342,342,1],[343,343,0],[344,344,1],[345,345,0],[346,346,1],[347,347,0],[348,348,1],[349,349,0],[350,350,1],[351,351,0],[352,352,1],[353,353,0],[354,354,1],[355,355,0],[356,356,1],[357,357,0],[358,358,1],[359,359,0],[360,360,1],[361,361,0],[362,362,1],[363,363,0],[364,364,1],[365,365,0],[366,366,1],[367,367,0],[368,368,1],[369,369,0],[370,370,1],[371,371,0],[372,372,1],[373,373,0],[374,374,1],[375,375,0],[376,377,1],[378,378,0],[379,379,1],[380,380,0],[381,381,1],[382,382,0],[383,383,1],[384,384,0],[385,386,1],[387,387,0],[388,388,1],[389,389,0],[390,391,1],[392,392,0],[393,395,1],[396,397,0],[398,401,1],[402,402,0],[403,404,1],[405,405,0],[406,408,1],[409,411,0],[412,413,1],[414,414,0],[415,416,1],[417,417,0],[418,418,1],[419,419,0],[420,420,1],[421,421,0],[422,423,1],[424,424,0],[425,425,1],[426,427,0],[428,428,1],[429,429,0],[430,431,1],[432,432,0],[433,435,1],[436,436,0],[437,437,1],[438,438,0],[439,440,1],[441,443,0],[444,444,1],[445,451,0],[452,452,1],[455,455,1],[458,458,1],[461,461,1],[462,462,0],[463,463,1],[464,464,0],[465,465,1],[466,466,0],[467,467,1],[468,468,0],[469,469,1],[470,470,0],[471,471,1],[472,472,0],[473,473,1],[474,474,0],[475,475,1],[476,477,0],[478,478,1],[479,479,0],[480,480,1],[481,481,0],[482,482,1],[483,483,0],[484,484,1],[485,485,0],[486,486,1],[487,487,0],[488,488,1],[489,489,0],[490,490,1],[491,491,0],[492,492,1],[493,493,0],[494,494,1],[495,496,0],[497,497,1],[500,500,1],[501,501,0],[502,504,1],[505,505,0],[506,506,1],[507,507,0],[508,508,1],[509,509,0],[510,510,1],[511,511,0],[512,512,1],[513,513,0],[514,514,1],[515,515,0],[516,516,1],[517,517,0],[518,518,1],[519,519,0],[520,520,1],[521,521,0],[522,522,1],[523,523,0],[524,524,1],[525,525,0],[526,526,1],[527,527,0],[528,528,1],[529,529,0],[530,530,1],[531,531,0],[532,532,1],[533,533,0],[534,534,1],[535,535,0],[536,536,1],[537,537,0],[538,538,1],[539,539,0],[540,540,1],[541,541,0],[542,542,1],[543,543,0],[544,544,1],[545,545,0],[546,546,1],[547,547,0],[548,548,1],[549,549,0],[550,550,1],[551,551,0],[552,552,1],[553,553,0],[554,554,1],[555,555,0],[556,556,1],[557,557,0],[558,558,1],[559,559,0],[560,560,1],[561,561,0],[562,562,1],[563,569,0],[570,571,1],[572,572,0],[573,574,1],[575,576,0],[577,577,1],[578,578,0],[579,582,1],[583,583,0],[584,584,1],[585,585,0],[586,586,1],[587,587,0],[588,588,1],[589,589,0],[590,590,1],[591,687,0],[688,696,1],[697,705,0],[710,721,0],[736,740,1],[748,748,0],[750,750,0],[768,831,0],[832,833,1],[834,834,0],[835,837,1],[838,846,0],[847,847,3],[848,879,0],[880,880,1],[881,881,0],[882,882,1],[883,883,0],[884,884,1],[885,885,0],[886,886,1],[887,887,0],[891,893,0],[895,895,1],[902,906,1],[908,908,1],[910,911,1],[912,912,0],[913,929,1],[931,939,1],[940,961,0],[962,962,2],[963,974,0],[975,982,1],[983,983,0],[984,984,1],[985,985,0],[986,986,1],[987,987,0],[988,988,1],[989,989,0],[990,990,1],[991,991,0],[992,992,1],[993,993,0],[994,994,1],[995,995,0],[996,996,1],[997,997,0],[998,998,1],[999,999,0],[1000,1000,1],[1001,1001,0],[1002,1002,1],[1003,1003,0],[1004,1004,1],[1005,1005,0],[1006,1006,1],[1007,1007,0],[1008,1010,1],[1011,1011,0],[1012,1013,1],[1015,1015,1],[1016,1016,0],[1017,1018,1],[1019,1020,0],[1021,1071,1],[1072,1119,0],[1120,1120,1],[1121,1121,0],[1122,1122,1],[1123,1123,0],[1124,1124,1],[1125,1125,0],[1126,1126,1],[1127,1127,0],[1128,1128,1],[1129,1129,0],[1130,1130,1],[1131,1131,0],[1132,1132,1],[1133,1133,0],[1134,1134,1],[1135,1135,0],[1136,1136,1],[1137,1137,0],[1138,1138,1],[1139,1139,0],[1140,1140,1],[1141,1141,0],[1142,1142,1],[1143,1143,0],[1144,1144,1],[1145,1145,0],[1146,1146,1],[1147,1147,0],[1148,1148,1],[1149,1149,0],[1150,1150,1],[1151,1151,0],[1152,1152,1],[1153,1153,0],[1155,1159,0],[1162,1162,1],[1163,1163,0],[1164,1164,1],[1165,1165,0],[1166,1166,1],[1167,1167,0],[1168,1168,1],[1169,1169,0],[1170,1170,1],[1171,1171,0],[1172,1172,1],[1173,1173,0],[1174,1174,1],[1175,1175,0],[1176,1176,1],[1177,1177,0],[1178,1178,1],[1179,1179,0],[1180,1180,1],[1181,1181,0],[1182,1182,1],[1183,1183,0],[1184,1184,1],[1185,1185,0],[1186,1186,1],[1187,1187,0],[1188,1188,1],[1189,1189,0],[1190,1190,1],[1191,1191,0],[1192,1192,1],[1193,1193,0],[1194,1194,1],[1195,1195,0],[1196,1196,1],[1197,1197,0],[1198,1198,1],[1199,1199,0],[1200,1200,1],[1201,1201,0],[1202,1202,1],[1203,1203,0],[1204,1204,1],[1205,1205,0],[1206,1206,1],[1207,1207,0],[1208,1208,1],[1209,1209,0],[1210,1210,1],[1211,1211,0],[1212,1212,1],[1213,1213,0],[1214,1214,1],[1215,1215,0],[1217,1217,1],[1218,1218,0],[1219,1219,1],[1220,1220,0],[1221,1221,1],[1222,1222,0],[1223,1223,1],[1224,1224,0],[1225,1225,1],[1226,1226,0],[1227,1227,1],[1228,1228,0],[1229,1229,1],[1230,1231,0],[1232,1232,1],[1233,1233,0],[1234,1234,1],[1235,1235,0],[1236,1236,1],[1237,1237,0],[1238,1238,1],[1239,1239,0],[1240,1240,1],[1241,1241,0],[1242,1242,1],[1243,1243,0],[1244,1244,1],[1245,1245,0],[1246,1246,1],[1247,1247,0],[1248,1248,1],[1249,1249,0],[1250,1250,1],[1251,1251,0],[1252,1252,1],[1253,1253,0],[1254,1254,1],[1255,1255,0],[1256,1256,1],[1257,1257,0],[1258,1258,1],[1259,1259,0],[1260,1260,1],[1261,1261,0],[1262,1262,1],[1263,1263,0],[1264,1264,1],[1265,1265,0],[1266,1266,1],[1267,1267,0],[1268,1268,1],[1269,1269,0],[1270,1270,1],[1271,1271,0],[1272,1272,1],[1273,1273,0],[1274,1274,1],[1275,1275,0],[1276,1276,1],[1277,1277,0],[1278,1278,1],[1279,1279,0],[1280,1280,1],[1281,1281,0],[1282,1282,1],[1283,1283,0],[1284,1284,1],[1285,1285,0],[1286,1286,1],[1287,1287,0],[1288,1288,1],[1289,1289,0],[1290,1290,1],[1291,1291,0],[1292,1292,1],[1293,1293,0],[1294,1294,1],[1295,1295,0],[1296,1296,1],[1297,1297,0],[1298,1298,1],[1299,1299,0],[1300,1300,1],[1301,1301,0],[1302,1302,1],[1303,1303,0],[1304,1304,1],[1305,1305,0],[1306,1306,1],[1307,1307,0],[1308,1308,1],[1309,1309,0],[1310,1310,1],[1311,1311,0],[1312,1312,1],[1313,1313,0],[1314,1314,1],[1315,1315,0],[1316,1316,1],[1317,1317,0],[1318,1318,1],[1319,1319,0],[1320,1320,1],[1321,1321,0],[1322,1322,1],[1323,1323,0],[1324,1324,1],[1325,1325,0],[1326,1326,1],[1327,1327,0],[1329,1366,1],[1369,1369,0],[1376,1414,0],[1415,1415,1],[1416,1416,0],[1425,1469,0],[1471,1471,0],[1473,1474,0],[1476,1477,0],[1479,1479,0],[1488,1514,0],[1519,1524,0],[1552,1562,0],[1568,1599,0],[1601,1641,0],[1646,1652,0],[1653,1656,1],[1657,1747,0],[1749,1756,0],[1759,1768,0],[1770,1791,0],[1808,1866,0],[1869,1969,0],[1984,2037,0],[2045,2045,0],[2048,2093,0],[2112,2139,0],[2144,2154,0],[2160,2183,0],[2185,2190,0],[2200,2273,0],[2275,2391,0],[2392,2399,1],[2400,2403,0],[2406,2415,0],[2417,2435,0],[2437,2444,0],[2447,2448,0],[2451,2472,0],[2474,2480,0],[2482,2482,0],[2486,2489,0],[2492,2500,0],[2503,2504,0],[2507,2510,0],[2519,2519,0],[2524,2525,1],[2527,2527,1],[2528,2531,0],[2534,2545,0],[2556,2556,0],[2558,2558,0],[2561,2563,0],[2565,2570,0],[2575,2576,0],[2579,2600,0],[2602,2608,0],[2610,2610,0],[2611,2611,1],[2613,2613,0],[2614,2614,1],[2616,2617,0],[2620,2620,0],[2622,2626,0],[2631,2632,0],[2635,2637,0],[2641,2641,0],[2649,2651,1],[2652,2652,0],[2654,2654,1],[2662,2677,0],[2689,2691,0],[2693,2701,0],[2703,2705,0],[2707,2728,0],[2730,2736,0],[2738,2739,0],[2741,2745,0],[2748,2757,0],[2759,2761,0],[2763,2765,0],[2768,2768,0],[2784,2787,0],[2790,2799,0],[2809,2815,0],[2817,2819,0],[2821,2828,0],[2831,2832,0],[2835,2856,0],[2858,2864,0],[2866,2867,0],[2869,2873,0],[2876,2884,0],[2887,2888,0],[2891,2893,0],[2901,2903,0],[2908,2909,1],[2911,2915,0],[2918,2927,0],[2929,2929,0],[2946,2947,0],[2949,2954,0],[2958,2960,0],[2962,2965,0],[2969,2970,0],[2972,2972,0],[2974,2975,0],[2979,2980,0],[2984,2986,0],[2990,3001,0],[3006,3010,0],[3014,3016,0],[3018,3021,0],[3024,3024,0],[3031,3031,0],[3046,3055,0],[3072,3084,0],[3086,3088,0],[3090,3112,0],[3114,3129,0],[3132,3140,0],[3142,3144,0],[3146,3149,0],[3157,3158,0],[3160,3162,0],[3165,3165,0],[3168,3171,0],[3174,3183,0],[3200,3203,0],[3205,3212,0],[3214,3216,0],[3218,3240,0],[3242,3251,0],[3253,3257,0],[3260,3268,0],[3270,3272,0],[3274,3277,0],[3285,3286,0],[3293,3294,0],[3296,3299,0],[3302,3311,0],[3313,3315,0],[3328,3340,0],[3342,3344,0],[3346,3396,0],[3398,3400,0],[3402,3406,0],[3412,3415,0],[3423,3427,0],[3430,3439,0],[3450,3455,0],[3457,3459,0],[3461,3478,0],[3482,3505,0],[3507,3515,0],[3517,3517,0],[3520,3526,0],[3530,3530,0],[3535,3540,0],[3542,3542,0],[3544,3551,0],[3558,3567,0],[3570,3571,0],[3585,3634,0],[3635,3635,1],[3636,3642,0],[3648,3662,0],[3664,3673,0],[3713,3714,0],[3716,3716,0],[3718,3722,0],[3724,3747,0],[3749,3749,0],[3751,3762,0],[3763,3763,1],[3764,3773,0],[3776,3780,0],[3782,3782,0],[3784,3790,0],[3792,3801,0],[3804,3805,1],[3806,3807,0],[3840,3840,0],[3851,3851,0],[3852,3852,1],[3864,3865,0],[3872,3881,0],[3893,3893,0],[3895,3895,0],[3897,3897,0],[3902,3906,0],[3907,3907,1],[3908,3911,0],[3913,3916,0],[3917,3917,1],[3918,3921,0],[3922,3922,1],[3923,3926,0],[3927,3927,1],[3928,3931,0],[3932,3932,1],[3933,3944,0],[3945,3945,1],[3946,3948,0],[3953,3954,0],[3955,3955,1],[3956,3956,0],[3957,3961,1],[3962,3968,0],[3969,3969,1],[3970,3972,0],[3974,3986,0],[3987,3987,1],[3988,3991,0],[3993,3996,0],[3997,3997,1],[3998,4001,0],[4002,4002,1],[4003,4006,0],[4007,4007,1],[4008,4011,0],[4012,4012,1],[4013,4024,0],[4025,4025,1],[4026,4028,0],[4038,4038,0],[4096,4169,0],[4176,4253,0],[4295,4295,1],[4301,4301,1],[4304,4346,0],[4348,4348,1],[4349,4351,0],[4608,4680,0],[4682,4685,0],[4688,4694,0],[4696,4696,0],[4698,4701,0],[4704,4744,0],[4746,4749,0],[4752,4784,0],[4786,4789,0],[4792,4798,0],[4800,4800,0],[4802,4805,0],[4808,4822,0],[4824,4880,0],[4882,4885,0],[4888,4954,0],[4957,4959,0],[4992,5007,0],[5024,5109,0],[5112,5117,1],[5121,5740,0],[5743,5759,0],[5761,5786,0],[5792,5866,0],[5873,5880,0],[5888,5909,0],[5919,5940,0],[5952,5971,0],[5984,5996,0],[5998,6000,0],[6002,6003,0],[6016,6067,0],[6070,6099,0],[6103,6103,0],[6108,6109,0],[6112,6121,0],[6155,6155,3],[6159,6159,3],[6160,6169,0],[6176,6264,0],[6272,6314,0],[6320,6389,0],[6400,6430,0],[6432,6443,0],[6448,6459,0],[6470,6509,0],[6512,6516,0],[6528,6571,0],[6576,6601,0],[6608,6617,0],[6656,6683,0],[6688,6750,0],[6752,6780,0],[6783,6793,0],[6800,6809,0],[6823,6823,0],[6832,6845,0],[6847,6862,0],[6912,6988,0],[6992,7001,0],[7019,7027,0],[7040,7155,0],[7168,7223,0],[7232,7241,0],[7245,7293,0],[7296,7300,1],[7302,7304,1],[7312,7354,1],[7357,7359,1],[7376,7378,0],[7380,7418,0],[7424,7467,0],[7468,7470,1],[7471,7471,0],[7472,7482,1],[7483,7483,0],[7484,7501,1],[7502,7502,0],[7503,7530,1],[7531,7543,0],[7544,7544,1],[7545,7578,0],[7579,7615,1],[7616,7679,0],[7680,7680,1],[7681,7681,0],[7682,7682,1],[7683,7683,0],[7684,7684,1],[7685,7685,0],[7686,7686,1],[7687,7687,0],[7688,7688,1],[7689,7689,0],[7690,7690,1],[7691,7691,0],[7692,7692,1],[7693,7693,0],[7694,7694,1],[7695,7695,0],[7696,7696,1],[7697,7697,0],[7698,7698,1],[7699,7699,0],[7700,7700,1],[7701,7701,0],[7702,7702,1],[7703,7703,0],[7704,7704,1],[7705,7705,0],[7706,7706,1],[7707,7707,0],[7708,7708,1],[7709,7709,0],[7710,7710,1],[7711,7711,0],[7712,7712,1],[7713,7713,0],[7714,7714,1],[7715,7715,0],[7716,7716,1],[7717,7717,0],[7718,7718,1],[7719,7719,0],[7720,7720,1],[7721,7721,0],[7722,7722,1],[7723,7723,0],[7724,7724,1],[7725,7725,0],[7726,7726,1],[7727,7727,0],[7728,7728,1],[7729,7729,0],[7730,7730,1],[7731,7731,0],[7732,7732,1],[7733,7733,0],[7734,7734,1],[7735,7735,0],[7736,7736,1],[7737,7737,0],[7738,7738,1],[7739,7739,0],[7740,7740,1],[7741,7741,0],[7742,7742,1],[7743,7743,0],[7744,7744,1],[7745,7745,0],[7746,7746,1],[7747,7747,0],[7748,7748,1],[7749,7749,0],[7750,7750,1],[7751,7751,0],[7752,7752,1],[7753,7753,0],[7754,7754,1],[7755,7755,0],[7756,7756,1],[7757,7757,0],[7758,7758,1],[7759,7759,0],[7760,7760,1],[7761,7761,0],[7762,7762,1],[7763,7763,0],[7764,7764,1],[7765,7765,0],[7766,7766,1],[7767,7767,0],[7768,7768,1],[7769,7769,0],[7770,7770,1],[7771,7771,0],[7772,7772,1],[7773,7773,0],[7774,7774,1],[7775,7775,0],[7776,7776,1],[7777,7777,0],[7778,7778,1],[7779,7779,0],[7780,7780,1],[7781,7781,0],[7782,7782,1],[7783,7783,0],[7784,7784,1],[7785,7785,0],[7786,7786,1],[7787,7787,0],[7788,7788,1],[7789,7789,0],[7790,7790,1],[7791,7791,0],[7792,7792,1],[7793,7793,0],[7794,7794,1],[7795,7795,0],[7796,7796,1],[7797,7797,0],[7798,7798,1],[7799,7799,0],[7800,7800,1],[7801,7801,0],[7802,7802,1],[7803,7803,0],[7804,7804,1],[7805,7805,0],[7806,7806,1],[7807,7807,0],[7808,7808,1],[7809,7809,0],[7810,7810,1],[7811,7811,0],[7812,7812,1],[7813,7813,0],[7814,7814,1],[7815,7815,0],[7816,7816,1],[7817,7817,0],[7818,7818,1],[7819,7819,0],[7820,7820,1],[7821,7821,0],[7822,7822,1],[7823,7823,0],[7824,7824,1],[7825,7825,0],[7826,7826,1],[7827,7827,0],[7828,7828,1],[7829,7833,0],[7834,7835,1],[7836,7837,0],[7838,7838,1],[7839,7839,0],[7840,7840,1],[7841,7841,0],[7842,7842,1],[7843,7843,0],[7844,7844,1],[7845,7845,0],[7846,7846,1],[7847,7847,0],[7848,7848,1],[7849,7849,0],[7850,7850,1],[7851,7851,0],[7852,7852,1],[7853,7853,0],[7854,7854,1],[7855,7855,0],[7856,7856,1],[7857,7857,0],[7858,7858,1],[7859,7859,0],[7860,7860,1],[7861,7861,0],[7862,7862,1],[7863,7863,0],[7864,7864,1],[7865,7865,0],[7866,7866,1],[7867,7867,0],[7868,7868,1],[7869,7869,0],[7870,7870,1],[7871,7871,0],[7872,7872,1],[7873,7873,0],[7874,7874,1],[7875,7875,0],[7876,7876,1],[7877,7877,0],[7878,7878,1],[7879,7879,0],[7880,7880,1],[7881,7881,0],[7882,7882,1],[7883,7883,0],[7884,7884,1],[7885,7885,0],[7886,7886,1],[7887,7887,0],[7888,7888,1],[7889,7889,0],[7890,7890,1],[7891,7891,0],[7892,7892,1],[7893,7893,0],[7894,7894,1],[7895,7895,0],[7896,7896,1],[7897,7897,0],[7898,7898,1],[7899,7899,0],[7900,7900,1],[7901,7901,0],[7902,7902,1],[7903,7903,0],[7904,7904,1],[7905,7905,0],[7906,7906,1],[7907,7907,0],[7908,7908,1],[7909,7909,0],[7910,7910,1],[7911,7911,0],[7912,7912,1],[7913,7913,0],[7914,7914,1],[7915,7915,0],[7916,7916,1],[7917,7917,0],[7918,7918,1],[7919,7919,0],[7920,7920,1],[7921,7921,0],[7922,7922,1],[7923,7923,0],[7924,7924,1],[7925,7925,0],[7926,7926,1],[7927,7927,0],[7928,7928,1],[7929,7929,0],[7930,7930,1],[7931,7931,0],[7932,7932,1],[7933,7933,0],[7934,7934,1],[7935,7943,0],[7944,7951,1],[7952,7957,0],[7960,7965,1],[7968,7975,0],[7976,7983,1],[7984,7991,0],[7992,7999,1],[8000,8005,0],[8008,8013,1],[8016,8023,0],[8025,8025,1],[8027,8027,1],[8029,8029,1],[8031,8031,1],[8032,8039,0],[8040,8047,1],[8048,8048,0],[8049,8049,1],[8050,8050,0],[8051,8051,1],[8052,8052,0],[8053,8053,1],[8054,8054,0],[8055,8055,1],[8056,8056,0],[8057,8057,1],[8058,8058,0],[8059,8059,1],[8060,8060,0],[8061,8061,1],[8064,8111,1],[8112,8113,0],[8114,8116,1],[8118,8118,0],[8119,8124,1],[8126,8126,1],[8130,8132,1],[8134,8134,0],[8135,8140,1],[8144,8146,0],[8147,8147,1],[8150,8151,0],[8152,8155,1],[8160,8162,0],[8163,8163,1],[8164,8167,0],[8168,8172,1],[8178,8180,1],[8182,8182,0],[8183,8188,1],[8203,8203,3],[8204,8204,2],[8205,8205,0],[8209,8209,1],[8243,8244,1],[8246,8247,1],[8279,8279,1],[8288,8288,3],[8292,8292,3],[8304,8305,1],[8308,8313,1],[8315,8315,1],[8319,8329,1],[8331,8331,1],[8336,8348,1],[8360,8360,1],[8450,8451,1],[8455,8455,1],[8457,8459,1],[8463,8464,1],[8466,8466,1],[8469,8470,1],[8473,8475,1],[8480,8482,1],[8484,8484,1],[8486,8486,1],[8488,8488,1],[8490,8493,1],[8495,8495,1],[8497,8497,1],[8499,8505,1],[8507,8509,1],[8511,8512,1],[8517,8517,1],[8519,8521,1],[8526,8526,0],[8528,8575,1],[8580,8580,0],[8585,8585,1],[8748,8749,1],[8751,8752,1],[9001,9002,1],[9312,9331,1],[9398,9450,1],[10764,10764,1],[10972,10972,1],[11264,11311,1],[11312,11359,0],[11360,11360,1],[11361,11361,0],[11362,11364,1],[11365,11366,0],[11367,11367,1],[11368,11368,0],[11369,11369,1],[11370,11370,0],[11371,11371,1],[11372,11372,0],[11373,11376,1],[11377,11377,0],[11378,11378,1],[11379,11380,0],[11381,11381,1],[11382,11387,0],[11388,11392,1],[11393,11393,0],[11394,11394,1],[11395,11395,0],[11396,11396,1],[11397,11397,0],[11398,11398,1],[11399,11399,0],[11400,11400,1],[11401,11401,0],[11402,11402,1],[11403,11403,0],[11404,11404,1],[11405,11405,0],[11406,11406,1],[11407,11407,0],[11408,11408,1],[11409,11409,0],[11410,11410,1],[11411,11411,0],[11412,11412,1],[11413,11413,0],[11414,11414,1],[11415,11415,0],[11416,11416,1],[11417,11417,0],[11418,11418,1],[11419,11419,0],[11420,11420,1],[11421,11421,0],[11422,11422,1],[11423,11423,0],[11424,11424,1],[11425,11425,0],[11426,11426,1],[11427,11427,0],[11428,11428,1],[11429,11429,0],[11430,11430,1],[11431,11431,0],[11432,11432,1],[11433,11433,0],[11434,11434,1],[11435,11435,0],[11436,11436,1],[11437,11437,0],[11438,11438,1],[11439,11439,0],[11440,11440,1],[11441,11441,0],[11442,11442,1],[11443,11443,0],[11444,11444,1],[11445,11445,0],[11446,11446,1],[11447,11447,0],[11448,11448,1],[11449,11449,0],[11450,11450,1],[11451,11451,0],[11452,11452,1],[11453,11453,0],[11454,11454,1],[11455,11455,0],[11456,11456,1],[11457,11457,0],[11458,11458,1],[11459,11459,0],[11460,11460,1],[11461,11461,0],[11462,11462,1],[11463,11463,0],[11464,11464,1],[11465,11465,0],[11466,11466,1],[11467,11467,0],[11468,11468,1],[11469,11469,0],[11470,11470,1],[11471,11471,0],[11472,11472,1],[11473,11473,0],[11474,11474,1],[11475,11475,0],[11476,11476,1],[11477,11477,0],[11478,11478,1],[11479,11479,0],[11480,11480,1],[11481,11481,0],[11482,11482,1],[11483,11483,0],[11484,11484,1],[11485,11485,0],[11486,11486,1],[11487,11487,0],[11488,11488,1],[11489,11489,0],[11490,11490,1],[11491,11492,0],[11499,11499,1],[11500,11500,0],[11501,11501,1],[11502,11505,0],[11506,11506,1],[11507,11507,0],[11520,11557,0],[11559,11559,0],[11565,11565,0],[11568,11623,0],[11631,11631,1],[11647,11670,0],[11680,11686,0],[11688,11694,0],[11696,11702,0],[11704,11710,0],[11712,11718,0],[11720,11726,0],[11728,11734,0],[11736,11742,0],[11744,11775,0],[11823,11823,0],[11935,11935,1],[12019,12019,1],[12032,12245,1],[12290,12290,1],[12293,12295,0],[12330,12333,0],[12342,12342,1],[12344,12346,1],[12348,12348,0],[12353,12438,0],[12441,12442,0],[12445,12446,0],[12447,12447,1],[12449,12542,0],[12543,12543,1],[12549,12591,0],[12593,12643,1],[12645,12686,1],[12690,12703,1],[12704,12735,0],[12784,12799,0],[12868,12871,1],[12880,12926,1],[12928,13249,1],[13251,13254,1],[13256,13271,1],[13273,13311,1],[13312,19903,0],[19968,42124,0],[42192,42237,0],[42240,42508,0],[42512,42539,0],[42560,42560,1],[42561,42561,0],[42562,42562,1],[42563,42563,0],[42564,42564,1],[42565,42565,0],[42566,42566,1],[42567,42567,0],[42568,42568,1],[42569,42569,0],[42570,42570,1],[42571,42571,0],[42572,42572,1],[42573,42573,0],[42574,42574,1],[42575,42575,0],[42576,42576,1],[42577,42577,0],[42578,42578,1],[42579,42579,0],[42580,42580,1],[42581,42581,0],[42582,42582,1],[42583,42583,0],[42584,42584,1],[42585,42585,0],[42586,42586,1],[42587,42587,0],[42588,42588,1],[42589,42589,0],[42590,42590,1],[42591,42591,0],[42592,42592,1],[42593,42593,0],[42594,42594,1],[42595,42595,0],[42596,42596,1],[42597,42597,0],[42598,42598,1],[42599,42599,0],[42600,42600,1],[42601,42601,0],[42602,42602,1],[42603,42603,0],[42604,42604,1],[42605,42607,0],[42612,42621,0],[42623,42623,0],[42624,42624,1],[42625,42625,0],[42626,42626,1],[42627,42627,0],[42628,42628,1],[42629,42629,0],[42630,42630,1],[42631,42631,0],[42632,42632,1],[42633,42633,0],[42634,42634,1],[42635,42635,0],[42636,42636,1],[42637,42637,0],[42638,42638,1],[42639,42639,0],[42640,42640,1],[42641,42641,0],[42642,42642,1],[42643,42643,0],[42644,42644,1],[42645,42645,0],[42646,42646,1],[42647,42647,0],[42648,42648,1],[42649,42649,0],[42650,42650,1],[42651,42651,0],[42652,42653,1],[42654,42725,0],[42736,42737,0],[42775,42783,0],[42786,42786,1],[42787,42787,0],[42788,42788,1],[42789,42789,0],[42790,42790,1],[42791,42791,0],[42792,42792,1],[42793,42793,0],[42794,42794,1],[42795,42795,0],[42796,42796,1],[42797,42797,0],[42798,42798,1],[42799,42801,0],[42802,42802,1],[42803,42803,0],[42804,42804,1],[42805,42805,0],[42806,42806,1],[42807,42807,0],[42808,42808,1],[42809,42809,0],[42810,42810,1],[42811,42811,0],[42812,42812,1],[42813,42813,0],[42814,42814,1],[42815,42815,0],[42816,42816,1],[42817,42817,0],[42818,42818,1],[42819,42819,0],[42820,42820,1],[42821,42821,0],[42822,42822,1],[42823,42823,0],[42824,42824,1],[42825,42825,0],[42826,42826,1],[42827,42827,0],[42828,42828,1],[42829,42829,0],[42830,42830,1],[42831,42831,0],[42832,42832,1],[42833,42833,0],[42834,42834,1],[42835,42835,0],[42836,42836,1],[42837,42837,0],[42838,42838,1],[42839,42839,0],[42840,42840,1],[42841,42841,0],[42842,42842,1],[42843,42843,0],[42844,42844,1],[42845,42845,0],[42846,42846,1],[42847,42847,0],[42848,42848,1],[42849,42849,0],[42850,42850,1],[42851,42851,0],[42852,42852,1],[42853,42853,0],[42854,42854,1],[42855,42855,0],[42856,42856,1],[42857,42857,0],[42858,42858,1],[42859,42859,0],[42860,42860,1],[42861,42861,0],[42862,42862,1],[42863,42863,0],[42864,42864,1],[42865,42872,0],[42873,42873,1],[42874,42874,0],[42875,42875,1],[42876,42876,0],[42877,42878,1],[42879,42879,0],[42880,42880,1],[42881,42881,0],[42882,42882,1],[42883,42883,0],[42884,42884,1],[42885,42885,0],[42886,42886,1],[42887,42888,0],[42891,42891,1],[42892,42892,0],[42893,42893,1],[42894,42895,0],[42896,42896,1],[42897,42897,0],[42898,42898,1],[42899,42901,0],[42902,42902,1],[42903,42903,0],[42904,42904,1],[42905,42905,0],[42906,42906,1],[42907,42907,0],[42908,42908,1],[42909,42909,0],[42910,42910,1],[42911,42911,0],[42912,42912,1],[42913,42913,0],[42914,42914,1],[42915,42915,0],[42916,42916,1],[42917,42917,0],[42918,42918,1],[42919,42919,0],[42920,42920,1],[42921,42921,0],[42922,42926,1],[42927,42927,0],[42928,42932,1],[42933,42933,0],[42934,42934,1],[42935,42935,0],[42936,42936,1],[42937,42937,0],[42938,42938,1],[42939,42939,0],[42940,42940,1],[42941,42941,0],[42942,42942,1],[42943,42943,0],[42944,42944,1],[42945,42945,0],[42946,42946,1],[42947,42947,0],[42948,42951,1],[42952,42952,0],[42953,42953,1],[42954,42954,0],[42960,42960,1],[42961,42961,0],[42963,42963,0],[42965,42965,0],[42966,42966,1],[42967,42967,0],[42968,42968,1],[42969,42969,0],[42994,42997,1],[42998,42999,0],[43000,43001,1],[43002,43047,0],[43052,43052,0],[43072,43123,0],[43136,43205,0],[43216,43225,0],[43232,43255,0],[43259,43259,0],[43261,43309,0],[43312,43347,0],[43392,43456,0],[43471,43481,0],[43488,43518,0],[43520,43574,0],[43584,43597,0],[43600,43609,0],[43616,43638,0],[43642,43714,0],[43739,43741,0],[43744,43759,0],[43762,43766,0],[43777,43782,0],[43785,43790,0],[43793,43798,0],[43808,43814,0],[43816,43822,0],[43824,43866,0],[43868,43871,1],[43872,43880,0],[43881,43881,1],[43888,43967,1],[43968,44010,0],[44012,44013,0],[44016,44025,0],[44032,55203,0],[63744,63751,1],[63753,64013,1],[64014,64015,0],[64016,64016,1],[64017,64017,0],[64018,64018,1],[64019,64020,0],[64021,64030,1],[64031,64031,0],[64032,64032,1],[64033,64033,0],[64034,64034,1],[64035,64036,0],[64037,64038,1],[64039,64041,0],[64042,64093,1],[64095,64109,1],[64112,64217,1],[64256,64261,1],[64275,64279,1],[64285,64285,1],[64286,64286,0],[64287,64296,1],[64298,64310,1],[64312,64316,1],[64318,64318,1],[64320,64321,1],[64323,64324,1],[64326,64336,1],[64338,64338,1],[64342,64342,1],[64346,64346,1],[64350,64350,1],[64354,64354,1],[64358,64358,1],[64362,64362,1],[64366,64366,1],[64370,64370,1],[64374,64374,1],[64378,64378,1],[64382,64382,1],[64386,64386,1],[64388,64388,1],[64390,64390,1],[64392,64392,1],[64394,64394,1],[64396,64396,1],[64398,64398,1],[64402,64402,1],[64406,64406,1],[64410,64410,1],[64414,64414,1],[64416,64416,1],[64420,64420,1],[64422,64422,1],[64426,64426,1],[64430,64430,1],[64432,64432,1],[64467,64467,1],[64471,64471,1],[64473,64473,1],[64475,64475,1],[64477,64478,1],[64480,64480,1],[64482,64482,1],[64484,64484,1],[64488,64488,1],[64490,64490,1],[64492,64492,1],[64494,64494,1],[64496,64496,1],[64498,64498,1],[64500,64500,1],[64502,64502,1],[64505,64505,1],[64508,64508,1],[64512,64605,1],[64612,64828,1],[64848,64849,1],[64851,64856,1],[64858,64863,1],[64865,64866,1],[64868,64868,1],[64870,64871,1],[64873,64874,1],[64876,64876,1],[64878,64879,1],[64881,64881,1],[64883,64886,1],[64888,64892,1],[64894,64899,1],[64901,64901,1],[64903,64903,1],[64905,64911,1],[64914,64919,1],[64921,64924,1],[64926,64967,1],[65008,65017,1],[65020,65020,1],[65024,65024,3],[65041,65041,1],[65047,65048,1],[65056,65071,0],[65073,65074,1],[65081,65092,1],[65105,65105,1],[65112,65112,1],[65117,65118,1],[65123,65123,1],[65137,65137,1],[65139,65139,0],[65143,65143,1],[65145,65145,1],[65147,65147,1],[65149,65149,1],[65151,65153,1],[65155,65155,1],[65157,65157,1],[65159,65159,1],[65161,65161,1],[65165,65165,1],[65167,65167,1],[65171,65171,1],[65173,65173,1],[65177,65177,1],[65181,65181,1],[65185,65185,1],[65189,65189,1],[65193,65193,1],[65195,65195,1],[65197,65197,1],[65199,65199,1],[65201,65201,1],[65205,65205,1],[65209,65209,1],[65213,65213,1],[65217,65217,1],[65221,65221,1],[65225,65225,1],[65229,65229,1],[65233,65233,1],[65237,65237,1],[65241,65241,1],[65245,65245,1],[65249,65249,1],[65253,65253,1],[65257,65257,1],[65261,65261,1],[65263,65263,1],[65265,65265,1],[65269,65269,1],[65271,65271,1],[65273,65273,1],[65275,65275,1],[65279,65279,3],[65293,65294,1],[65296,65305,1],[65313,65338,1],[65345,65370,1],[65375,65439,1],[65441,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65504,65506,1],[65508,65510,1],[65512,65518,1],[65536,65547,0],[65549,65574,0],[65576,65594,0],[65596,65597,0],[65599,65613,0],[65616,65629,0],[65664,65786,0],[66045,66045,0],[66176,66204,0],[66208,66256,0],[66272,66272,0],[66304,66335,0],[66349,66368,0],[66370,66377,0],[66384,66426,0],[66432,66461,0],[66464,66499,0],[66504,66511,0],[66560,66599,1],[66600,66717,0],[66720,66729,0],[66736,66771,1],[66776,66811,0],[66816,66855,0],[66864,66915,0],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,0],[66979,66993,0],[66995,67001,0],[67003,67004,0],[67072,67382,0],[67392,67413,0],[67424,67431,0],[67456,67456,0],[67457,67461,1],[67463,67504,1],[67506,67514,1],[67584,67589,0],[67592,67592,0],[67594,67637,0],[67639,67640,0],[67644,67644,0],[67647,67669,0],[67680,67702,0],[67712,67742,0],[67808,67826,0],[67828,67829,0],[67840,67861,0],[67872,67897,0],[67968,68023,0],[68030,68031,0],[68096,68099,0],[68101,68102,0],[68108,68115,0],[68117,68119,0],[68121,68149,0],[68152,68154,0],[68159,68159,0],[68192,68220,0],[68224,68252,0],[68288,68295,0],[68297,68326,0],[68352,68405,0],[68416,68437,0],[68448,68466,0],[68480,68497,0],[68608,68680,0],[68736,68786,1],[68800,68850,0],[68864,68903,0],[68912,68921,0],[69248,69289,0],[69291,69292,0],[69296,69297,0],[69373,69404,0],[69415,69415,0],[69424,69456,0],[69488,69509,0],[69552,69572,0],[69600,69622,0],[69632,69702,0],[69734,69749,0],[69759,69818,0],[69826,69826,0],[69840,69864,0],[69872,69881,0],[69888,69940,0],[69942,69951,0],[69956,69959,0],[69968,70003,0],[70006,70006,0],[70016,70084,0],[70089,70092,0],[70094,70106,0],[70108,70108,0],[70144,70161,0],[70163,70199,0],[70206,70209,0],[70272,70278,0],[70280,70280,0],[70282,70285,0],[70287,70301,0],[70303,70312,0],[70320,70378,0],[70384,70393,0],[70400,70403,0],[70405,70412,0],[70415,70416,0],[70419,70440,0],[70442,70448,0],[70450,70451,0],[70453,70457,0],[70459,70468,0],[70471,70472,0],[70475,70477,0],[70480,70480,0],[70487,70487,0],[70493,70499,0],[70502,70508,0],[70512,70516,0],[70656,70730,0],[70736,70745,0],[70750,70753,0],[70784,70853,0],[70855,70855,0],[70864,70873,0],[71040,71093,0],[71096,71104,0],[71128,71133,0],[71168,71232,0],[71236,71236,0],[71248,71257,0],[71296,71352,0],[71360,71369,0],[71424,71450,0],[71453,71467,0],[71472,71481,0],[71488,71494,0],[71680,71738,0],[71840,71871,1],[71872,71913,0],[71935,71942,0],[71945,71945,0],[71948,71955,0],[71957,71958,0],[71960,71989,0],[71991,71992,0],[71995,72003,0],[72016,72025,0],[72096,72103,0],[72106,72151,0],[72154,72161,0],[72163,72164,0],[72192,72254,0],[72263,72263,0],[72272,72345,0],[72349,72349,0],[72368,72440,0],[72704,72712,0],[72714,72758,0],[72760,72768,0],[72784,72793,0],[72818,72847,0],[72850,72871,0],[72873,72886,0],[72960,72966,0],[72968,72969,0],[72971,73014,0],[73018,73018,0],[73020,73021,0],[73023,73031,0],[73040,73049,0],[73056,73061,0],[73063,73064,0],[73066,73102,0],[73104,73105,0],[73107,73112,0],[73120,73129,0],[73440,73462,0],[73472,73488,0],[73490,73530,0],[73534,73538,0],[73552,73561,0],[73648,73648,0],[73728,74649,0],[74880,75075,0],[77712,77808,0],[77824,78895,0],[78912,78933,0],[82944,83526,0],[92160,92728,0],[92736,92766,0],[92768,92777,0],[92784,92862,0],[92864,92873,0],[92880,92909,0],[92912,92916,0],[92928,92982,0],[92992,92995,0],[93008,93017,0],[93027,93047,0],[93053,93071,0],[93760,93791,1],[93792,93823,0],[93952,94026,0],[94031,94087,0],[94095,94111,0],[94176,94177,0],[94179,94180,0],[94192,94193,0],[94208,100343,0],[100352,101589,0],[101632,101640,0],[110576,110579,0],[110581,110587,0],[110589,110590,0],[110592,110882,0],[110898,110898,0],[110928,110930,0],[110933,110933,0],[110948,110951,0],[110960,111355,0],[113664,113770,0],[113776,113788,0],[113792,113800,0],[113808,113817,0],[113821,113822,0],[113824,113824,3],[118528,118573,0],[118576,118598,0],[119134,119140,1],[119227,119232,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,119970,1],[119973,119974,1],[119977,119980,1],[119982,119993,1],[119995,119995,1],[119997,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120134,1],[120138,120144,1],[120146,120485,1],[120488,120531,1],[120533,120589,1],[120591,120647,1],[120649,120705,1],[120707,120763,1],[120765,120778,1],[120782,120831,1],[121344,121398,0],[121403,121452,0],[121461,121461,0],[121476,121476,0],[121499,121503,0],[121505,121519,0],[122624,122654,0],[122661,122666,0],[122880,122886,0],[122888,122904,0],[122907,122913,0],[122915,122916,0],[122918,122922,0],[122928,122989,1],[123023,123023,0],[123136,123180,0],[123184,123197,0],[123200,123209,0],[123214,123214,0],[123536,123566,0],[123584,123641,0],[124112,124153,0],[124896,124902,0],[124904,124907,0],[124909,124910,0],[124912,124926,0],[124928,125124,0],[125136,125142,0],[125184,125217,1],[125218,125259,0],[125264,125273,0],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126500,1],[126503,126503,1],[126505,126514,1],[126516,126519,1],[126521,126521,1],[126523,126523,1],[126530,126530,1],[126535,126535,1],[126537,126537,1],[126539,126539,1],[126541,126543,1],[126545,126546,1],[126548,126548,1],[126551,126551,1],[126553,126553,1],[126555,126555,1],[126557,126557,1],[126559,126559,1],[126561,126562,1],[126564,126564,1],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126590,1],[126592,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[127274,127278,1],[127280,127311,1],[127338,127340,1],[127376,127376,1],[127488,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[130032,130041,1],[131072,173791,0],[173824,177977,0],[177984,178205,0],[178208,183969,0],[183984,191456,0],[191472,192093,0],[194560,194609,1],[194612,194629,1],[194631,194663,1],[194665,194666,1],[194668,194675,1],[194677,194705,1],[194707,194708,1],[194710,194846,1],[194848,194860,1],[194862,194886,1],[194888,194909,1],[194912,195006,1],[195008,195070,1],[195072,195101,1],[196608,201546,0],[201552,205743,0],[917760,917760,3]],"mappings":{"65":[97],"66":[98],"67":[99],"68":[100],"69":[101],"70":[102],"71":[103],"72":[104],"73":[105],"74":[106],"75":[107],"76":[108],"77":[109],"78":[110],"79":[111],"80":[112],"81":[113],"82":[114],"83":[115],"84":[116],"85":[117],"86":[118],"87":[119],"88":[120],"89":[121],"90":[122],"160":[32],"168":[32,776],"170":[97],"175":[32,772],"178":[50],"179":[51],"180":[32,769],"181":[956],"184":[32,807],"185":[49],"186":[111],"188":[49,8260,52],"189":[49,8260,50],"190":[51,8260,52],"192":[224],"193":[225],"194":[226],"195":[227],"196":[228],"197":[229],"198":[230],"199":[231],"200":[232],"201":[233],"202":[234],"203":[235],"204":[236],"205":[237],"206":[238],"207":[239],"208":[240],"209":[241],"210":[242],"211":[243],"212":[244],"213":[245],"214":[246],"216":[248],"217":[249],"218":[250],"219":[251],"220":[252],"221":[253],"222":[254],"223":[115,115],"256":[257],"258":[259],"260":[261],"262":[263],"264":[265],"266":[267],"268":[269],"270":[271],"272":[273],"274":[275],"276":[277],"278":[279],"280":[281],"282":[283],"284":[285],"286":[287],"288":[289],"290":[291],"292":[293],"294":[295],"296":[297],"298":[299],"300":[301],"302":[303],"304":[105,775],"306":[105,106],"308":[309],"310":[311],"313":[314],"315":[316],"317":[318],"319":[108,183],"321":[322],"323":[324],"325":[326],"327":[328],"329":[700,110],"330":[331],"332":[333],"334":[335],"336":[337],"338":[339],"340":[341],"342":[343],"344":[345],"346":[347],"348":[349],"350":[351],"352":[353],"354":[355],"356":[357],"358":[359],"360":[361],"362":[363],"364":[365],"366":[367],"368":[369],"370":[371],"372":[373],"374":[375],"376":[255],"377":[378],"379":[380],"381":[382],"383":[115],"385":[595],"386":[387],"388":[389],"390":[596],"391":[392],"393":[598],"394":[599],"395":[396],"398":[477],"399":[601],"400":[603],"401":[402],"403":[608],"404":[611],"406":[617],"407":[616],"408":[409],"412":[623],"413":[626],"415":[629],"416":[417],"418":[419],"420":[421],"422":[640],"423":[424],"425":[643],"428":[429],"430":[648],"431":[432],"433":[650],"434":[651],"435":[436],"437":[438],"439":[658],"440":[441],"444":[445],"452":[100,382],"455":[108,106],"458":[110,106],"461":[462],"463":[464],"465":[466],"467":[468],"469":[470],"471":[472],"473":[474],"475":[476],"478":[479],"480":[481],"482":[483],"484":[485],"486":[487],"488":[489],"490":[491],"492":[493],"494":[495],"497":[100,122],"500":[501],"502":[405],"503":[447],"504":[505],"506":[507],"508":[509],"510":[511],"512":[513],"514":[515],"516":[517],"518":[519],"520":[521],"522":[523],"524":[525],"526":[527],"528":[529],"530":[531],"532":[533],"534":[535],"536":[537],"538":[539],"540":[541],"542":[543],"544":[414],"546":[547],"548":[549],"550":[551],"552":[553],"554":[555],"556":[557],"558":[559],"560":[561],"562":[563],"570":[11365],"571":[572],"573":[410],"574":[11366],"577":[578],"579":[384],"580":[649],"581":[652],"582":[583],"584":[585],"586":[587],"588":[589],"590":[591],"688":[104],"689":[614],"690":[106],"691":[114],"692":[633],"693":[635],"694":[641],"695":[119],"696":[121],"728":[32,774],"729":[32,775],"730":[32,778],"731":[32,808],"732":[32,771],"733":[32,779],"736":[611],"737":[108],"738":[115],"739":[120],"740":[661],"832":[768],"833":[769],"835":[787],"836":[776,769],"837":[953],"880":[881],"882":[883],"884":[697],"886":[887],"890":[32,953],"894":[59],"895":[1011],"900":[32,769],"901":[32,776,769],"902":[940],"903":[183],"904":[941],"905":[942],"906":[943],"908":[972],"910":[973],"911":[974],"913":[945],"914":[946],"915":[947],"916":[948],"917":[949],"918":[950],"919":[951],"920":[952],"921":[953],"922":[954],"923":[955],"924":[956],"925":[957],"926":[958],"927":[959],"928":[960],"929":[961],"931":[963],"932":[964],"933":[965],"934":[966],"935":[967],"936":[968],"937":[969],"938":[970],"939":[971],"962":[963],"975":[983],"976":[946],"977":[952],"978":[965],"979":[973],"980":[971],"981":[966],"982":[960],"984":[985],"986":[987],"988":[989],"990":[991],"992":[993],"994":[995],"996":[997],"998":[999],"1000":[1001],"1002":[1003],"1004":[1005],"1006":[1007],"1008":[954],"1009":[961],"1010":[963],"1012":[952],"1013":[949],"1015":[1016],"1017":[963],"1018":[1019],"1021":[891],"1022":[892],"1023":[893],"1024":[1104],"1025":[1105],"1026":[1106],"1027":[1107],"1028":[1108],"1029":[1109],"1030":[1110],"1031":[1111],"1032":[1112],"1033":[1113],"1034":[1114],"1035":[1115],"1036":[1116],"1037":[1117],"1038":[1118],"1039":[1119],"1040":[1072],"1041":[1073],"1042":[1074],"1043":[1075],"1044":[1076],"1045":[1077],"1046":[1078],"1047":[1079],"1048":[1080],"1049":[1081],"1050":[1082],"1051":[1083],"1052":[1084],"1053":[1085],"1054":[1086],"1055":[1087],"1056":[1088],"1057":[1089],"1058":[1090],"1059":[1091],"1060":[1092],"1061":[1093],"1062":[1094],"1063":[1095],"1064":[1096],"1065":[1097],"1066":[1098],"1067":[1099],"1068":[1100],"1069":[1101],"1070":[1102],"1071":[1103],"1120":[1121],"1122":[1123],"1124":[1125],"1126":[1127],"1128":[1129],"1130":[1131],"1132":[1133],"1134":[1135],"1136":[1137],"1138":[1139],"1140":[1141],"1142":[1143],"1144":[1145],"1146":[1147],"1148":[1149],"1150":[1151],"1152":[1153],"1162":[1163],"1164":[1165],"1166":[1167],"1168":[1169],"1170":[1171],"1172":[1173],"1174":[1175],"1176":[1177],"1178":[1179],"1180":[1181],"1182":[1183],"1184":[1185],"1186":[1187],"1188":[1189],"1190":[1191],"1192":[1193],"1194":[1195],"1196":[1197],"1198":[1199],"1200":[1201],"1202":[1203],"1204":[1205],"1206":[1207],"1208":[1209],"1210":[1211],"1212":[1213],"1214":[1215],"1217":[1218],"1219":[1220],"1221":[1222],"1223":[1224],"1225":[1226],"1227":[1228],"1229":[1230],"1232":[1233],"1234":[1235],"1236":[1237],"1238":[1239],"1240":[1241],"1242":[1243],"1244":[1245],"1246":[1247],"1248":[1249],"1250":[1251],"1252":[1253],"1254":[1255],"1256":[1257],"1258":[1259],"1260":[1261],"1262":[1263],"1264":[1265],"1266":[1267],"1268":[1269],"1270":[1271],"1272":[1273],"1274":[1275],"1276":[1277],"1278":[1279],"1280":[1281],"1282":[1283],"1284":[1285],"1286":[1287],"1288":[1289],"1290":[1291],"1292":[1293],"1294":[1295],"1296":[1297],"1298":[1299],"1300":[1301],"1302":[1303],"1304":[1305],"1306":[1307],"1308":[1309],"1310":[1311],"1312":[1313],"1314":[1315],"1316":[1317],"1318":[1319],"1320":[1321],"1322":[1323],"1324":[1325],"1326":[1327],"1329":[1377],"1330":[1378],"1331":[1379],"1332":[1380],"1333":[1381],"1334":[1382],"1335":[1383],"1336":[1384],"1337":[1385],"1338":[1386],"1339":[1387],"1340":[1388],"1341":[1389],"1342":[1390],"1343":[1391],"1344":[1392],"1345":[1393],"1346":[1394],"1347":[1395],"1348":[1396],"1349":[1397],"1350":[1398],"1351":[1399],"1352":[1400],"1353":[1401],"1354":[1402],"1355":[1403],"1356":[1404],"1357":[1405],"1358":[1406],"1359":[1407],"1360":[1408],"1361":[1409],"1362":[1410],"1363":[1411],"1364":[1412],"1365":[1413],"1366":[1414],"1415":[1381,1410],"1653":[1575,1652],"1654":[1608,1652],"1655":[1735,1652],"1656":[1610,1652],"2392":[2325,2364],"2393":[2326,2364],"2394":[2327,2364],"2395":[2332,2364],"2396":[2337,2364],"2397":[2338,2364],"2398":[2347,2364],"2399":[2351,2364],"2524":[2465,2492],"2525":[2466,2492],"2527":[2479,2492],"2611":[2610,2620],"2614":[2616,2620],"2649":[2582,2620],"2650":[2583,2620],"2651":[2588,2620],"2654":[2603,2620],"2908":[2849,2876],"2909":[2850,2876],"3635":[3661,3634],"3763":[3789,3762],"3804":[3755,3737],"3805":[3755,3745],"3852":[3851],"3907":[3906,4023],"3917":[3916,4023],"3922":[3921,4023],"3927":[3926,4023],"3932":[3931,4023],"3945":[3904,4021],"3955":[3953,3954],"3957":[3953,3956],"3958":[4018,3968],"3959":[4018,3953,3968],"3960":[4019,3968],"3961":[4019,3953,3968],"3969":[3953,3968],"3987":[3986,4023],"3997":[3996,4023],"4002":[4001,4023],"4007":[4006,4023],"4012":[4011,4023],"4025":[3984,4021],"4295":[11559],"4301":[11565],"4348":[4316],"5112":[5104],"5113":[5105],"5114":[5106],"5115":[5107],"5116":[5108],"5117":[5109],"7296":[1074],"7297":[1076],"7298":[1086],"7299":[1089],"7300":[1090],"7302":[1098],"7303":[1123],"7304":[42571],"7312":[4304],"7313":[4305],"7314":[4306],"7315":[4307],"7316":[4308],"7317":[4309],"7318":[4310],"7319":[4311],"7320":[4312],"7321":[4313],"7322":[4314],"7323":[4315],"7324":[4316],"7325":[4317],"7326":[4318],"7327":[4319],"7328":[4320],"7329":[4321],"7330":[4322],"7331":[4323],"7332":[4324],"7333":[4325],"7334":[4326],"7335":[4327],"7336":[4328],"7337":[4329],"7338":[4330],"7339":[4331],"7340":[4332],"7341":[4333],"7342":[4334],"7343":[4335],"7344":[4336],"7345":[4337],"7346":[4338],"7347":[4339],"7348":[4340],"7349":[4341],"7350":[4342],"7351":[4343],"7352":[4344],"7353":[4345],"7354":[4346],"7357":[4349],"7358":[4350],"7359":[4351],"7468":[97],"7469":[230],"7470":[98],"7472":[100],"7473":[101],"7474":[477],"7475":[103],"7476":[104],"7477":[105],"7478":[106],"7479":[107],"7480":[108],"7481":[109],"7482":[110],"7484":[111],"7485":[547],"7486":[112],"7487":[114],"7488":[116],"7489":[117],"7490":[119],"7491":[97],"7492":[592],"7493":[593],"7494":[7426],"7495":[98],"7496":[100],"7497":[101],"7498":[601],"7499":[603],"7500":[604],"7501":[103],"7503":[107],"7504":[109],"7505":[331],"7506":[111],"7507":[596],"7508":[7446],"7509":[7447],"7510":[112],"7511":[116],"7512":[117],"7513":[7453],"7514":[623],"7515":[118],"7516":[7461],"7517":[946],"7518":[947],"7519":[948],"7520":[966],"7521":[967],"7522":[105],"7523":[114],"7524":[117],"7525":[118],"7526":[946],"7527":[947],"7528":[961],"7529":[966],"7530":[967],"7544":[1085],"7579":[594],"7580":[99],"7581":[597],"7582":[240],"7583":[604],"7584":[102],"7585":[607],"7586":[609],"7587":[613],"7588":[616],"7589":[617],"7590":[618],"7591":[7547],"7592":[669],"7593":[621],"7594":[7557],"7595":[671],"7596":[625],"7597":[624],"7598":[626],"7599":[627],"7600":[628],"7601":[629],"7602":[632],"7603":[642],"7604":[643],"7605":[427],"7606":[649],"7607":[650],"7608":[7452],"7609":[651],"7610":[652],"7611":[122],"7612":[656],"7613":[657],"7614":[658],"7615":[952],"7680":[7681],"7682":[7683],"7684":[7685],"7686":[7687],"7688":[7689],"7690":[7691],"7692":[7693],"7694":[7695],"7696":[7697],"7698":[7699],"7700":[7701],"7702":[7703],"7704":[7705],"7706":[7707],"7708":[7709],"7710":[7711],"7712":[7713],"7714":[7715],"7716":[7717],"7718":[7719],"7720":[7721],"7722":[7723],"7724":[7725],"7726":[7727],"7728":[7729],"7730":[7731],"7732":[7733],"7734":[7735],"7736":[7737],"7738":[7739],"7740":[7741],"7742":[7743],"7744":[7745],"7746":[7747],"7748":[7749],"7750":[7751],"7752":[7753],"7754":[7755],"7756":[7757],"7758":[7759],"7760":[7761],"7762":[7763],"7764":[7765],"7766":[7767],"7768":[7769],"7770":[7771],"7772":[7773],"7774":[7775],"7776":[7777],"7778":[7779],"7780":[7781],"7782":[7783],"7784":[7785],"7786":[7787],"7788":[7789],"7790":[7791],"7792":[7793],"7794":[7795],"7796":[7797],"7798":[7799],"7800":[7801],"7802":[7803],"7804":[7805],"7806":[7807],"7808":[7809],"7810":[7811],"7812":[7813],"7814":[7815],"7816":[7817],"7818":[7819],"7820":[7821],"7822":[7823],"7824":[7825],"7826":[7827],"7828":[7829],"7834":[97,702],"7835":[7777],"7838":[223],"7840":[7841],"7842":[7843],"7844":[7845],"7846":[7847],"7848":[7849],"7850":[7851],"7852":[7853],"7854":[7855],"7856":[7857],"7858":[7859],"7860":[7861],"7862":[7863],"7864":[7865],"7866":[7867],"7868":[7869],"7870":[7871],"7872":[7873],"7874":[7875],"7876":[7877],"7878":[7879],"7880":[7881],"7882":[7883],"7884":[7885],"7886":[7887],"7888":[7889],"7890":[7891],"7892":[7893],"7894":[7895],"7896":[7897],"7898":[7899],"7900":[7901],"7902":[7903],"7904":[7905],"7906":[7907],"7908":[7909],"7910":[7911],"7912":[7913],"7914":[7915],"7916":[7917],"7918":[7919],"7920":[7921],"7922":[7923],"7924":[7925],"7926":[7927],"7928":[7929],"7930":[7931],"7932":[7933],"7934":[7935],"7944":[7936],"7945":[7937],"7946":[7938],"7947":[7939],"7948":[7940],"7949":[7941],"7950":[7942],"7951":[7943],"7960":[7952],"7961":[7953],"7962":[7954],"7963":[7955],"7964":[7956],"7965":[7957],"7976":[7968],"7977":[7969],"7978":[7970],"7979":[7971],"7980":[7972],"7981":[7973],"7982":[7974],"7983":[7975],"7992":[7984],"7993":[7985],"7994":[7986],"7995":[7987],"7996":[7988],"7997":[7989],"7998":[7990],"7999":[7991],"8008":[8000],"8009":[8001],"8010":[8002],"8011":[8003],"8012":[8004],"8013":[8005],"8025":[8017],"8027":[8019],"8029":[8021],"8031":[8023],"8040":[8032],"8041":[8033],"8042":[8034],"8043":[8035],"8044":[8036],"8045":[8037],"8046":[8038],"8047":[8039],"8049":[940],"8051":[941],"8053":[942],"8055":[943],"8057":[972],"8059":[973],"8061":[974],"8064":[7936,953],"8065":[7937,953],"8066":[7938,953],"8067":[7939,953],"8068":[7940,953],"8069":[7941,953],"8070":[7942,953],"8071":[7943,953],"8072":[7936,953],"8073":[7937,953],"8074":[7938,953],"8075":[7939,953],"8076":[7940,953],"8077":[7941,953],"8078":[7942,953],"8079":[7943,953],"8080":[7968,953],"8081":[7969,953],"8082":[7970,953],"8083":[7971,953],"8084":[7972,953],"8085":[7973,953],"8086":[7974,953],"8087":[7975,953],"8088":[7968,953],"8089":[7969,953],"8090":[7970,953],"8091":[7971,953],"8092":[7972,953],"8093":[7973,953],"8094":[7974,953],"8095":[7975,953],"8096":[8032,953],"8097":[8033,953],"8098":[8034,953],"8099":[8035,953],"8100":[8036,953],"8101":[8037,953],"8102":[8038,953],"8103":[8039,953],"8104":[8032,953],"8105":[8033,953],"8106":[8034,953],"8107":[8035,953],"8108":[8036,953],"8109":[8037,953],"8110":[8038,953],"8111":[8039,953],"8114":[8048,953],"8115":[945,953],"8116":[940,953],"8119":[8118,953],"8120":[8112],"8121":[8113],"8122":[8048],"8123":[940],"8124":[945,953],"8125":[32,787],"8126":[953],"8127":[32,787],"8128":[32,834],"8129":[32,776,834],"8130":[8052,953],"8131":[951,953],"8132":[942,953],"8135":[8134,953],"8136":[8050],"8137":[941],"8138":[8052],"8139":[942],"8140":[951,953],"8141":[32,787,768],"8142":[32,787,769],"8143":[32,787,834],"8147":[912],"8152":[8144],"8153":[8145],"8154":[8054],"8155":[943],"8157":[32,788,768],"8158":[32,788,769],"8159":[32,788,834],"8163":[944],"8168":[8160],"8169":[8161],"8170":[8058],"8171":[973],"8172":[8165],"8173":[32,776,768],"8174":[32,776,769],"8175":[96],"8178":[8060,953],"8179":[969,953],"8180":[974,953],"8183":[8182,953],"8184":[8056],"8185":[972],"8186":[8060],"8187":[974],"8188":[969,953],"8189":[32,769],"8190":[32,788],"8192":[32],"8204":[],"8209":[8208],"8215":[32,819],"8239":[32],"8243":[8242,8242],"8244":[8242,8242,8242],"8246":[8245,8245],"8247":[8245,8245,8245],"8252":[33,33],"8254":[32,773],"8263":[63,63],"8264":[63,33],"8265":[33,63],"8279":[8242,8242,8242,8242],"8287":[32],"8304":[48],"8305":[105],"8308":[52],"8309":[53],"8310":[54],"8311":[55],"8312":[56],"8313":[57],"8314":[43],"8315":[8722],"8316":[61],"8317":[40],"8318":[41],"8319":[110],"8320":[48],"8321":[49],"8322":[50],"8323":[51],"8324":[52],"8325":[53],"8326":[54],"8327":[55],"8328":[56],"8329":[57],"8330":[43],"8331":[8722],"8332":[61],"8333":[40],"8334":[41],"8336":[97],"8337":[101],"8338":[111],"8339":[120],"8340":[601],"8341":[104],"8342":[107],"8343":[108],"8344":[109],"8345":[110],"8346":[112],"8347":[115],"8348":[116],"8360":[114,115],"8448":[97,47,99],"8449":[97,47,115],"8450":[99],"8451":[176,99],"8453":[99,47,111],"8454":[99,47,117],"8455":[603],"8457":[176,102],"8458":[103],"8459":[104],"8463":[295],"8464":[105],"8466":[108],"8469":[110],"8470":[110,111],"8473":[112],"8474":[113],"8475":[114],"8480":[115,109],"8481":[116,101,108],"8482":[116,109],"8484":[122],"8486":[969],"8488":[122],"8490":[107],"8491":[229],"8492":[98],"8493":[99],"8495":[101],"8497":[102],"8499":[109],"8500":[111],"8501":[1488],"8502":[1489],"8503":[1490],"8504":[1491],"8505":[105],"8507":[102,97,120],"8508":[960],"8509":[947],"8511":[960],"8512":[8721],"8517":[100],"8519":[101],"8520":[105],"8521":[106],"8528":[49,8260,55],"8529":[49,8260,57],"8530":[49,8260,49,48],"8531":[49,8260,51],"8532":[50,8260,51],"8533":[49,8260,53],"8534":[50,8260,53],"8535":[51,8260,53],"8536":[52,8260,53],"8537":[49,8260,54],"8538":[53,8260,54],"8539":[49,8260,56],"8540":[51,8260,56],"8541":[53,8260,56],"8542":[55,8260,56],"8543":[49,8260],"8544":[105],"8545":[105,105],"8546":[105,105,105],"8547":[105,118],"8548":[118],"8549":[118,105],"8550":[118,105,105],"8551":[118,105,105,105],"8552":[105,120],"8553":[120],"8554":[120,105],"8555":[120,105,105],"8556":[108],"8557":[99],"8558":[100],"8559":[109],"8560":[105],"8561":[105,105],"8562":[105,105,105],"8563":[105,118],"8564":[118],"8565":[118,105],"8566":[118,105,105],"8567":[118,105,105,105],"8568":[105,120],"8569":[120],"8570":[120,105],"8571":[120,105,105],"8572":[108],"8573":[99],"8574":[100],"8575":[109],"8585":[48,8260,51],"8748":[8747,8747],"8749":[8747,8747,8747],"8751":[8750,8750],"8752":[8750,8750,8750],"9001":[12296],"9002":[12297],"9312":[49],"9313":[50],"9314":[51],"9315":[52],"9316":[53],"9317":[54],"9318":[55],"9319":[56],"9320":[57],"9321":[49,48],"9322":[49,49],"9323":[49,50],"9324":[49,51],"9325":[49,52],"9326":[49,53],"9327":[49,54],"9328":[49,55],"9329":[49,56],"9330":[49,57],"9331":[50,48],"9332":[40,49,41],"9333":[40,50,41],"9334":[40,51,41],"9335":[40,52,41],"9336":[40,53,41],"9337":[40,54,41],"9338":[40,55,41],"9339":[40,56,41],"9340":[40,57,41],"9341":[40,49,48,41],"9342":[40,49,49,41],"9343":[40,49,50,41],"9344":[40,49,51,41],"9345":[40,49,52,41],"9346":[40,49,53,41],"9347":[40,49,54,41],"9348":[40,49,55,41],"9349":[40,49,56,41],"9350":[40,49,57,41],"9351":[40,50,48,41],"9372":[40,97,41],"9373":[40,98,41],"9374":[40,99,41],"9375":[40,100,41],"9376":[40,101,41],"9377":[40,102,41],"9378":[40,103,41],"9379":[40,104,41],"9380":[40,105,41],"9381":[40,106,41],"9382":[40,107,41],"9383":[40,108,41],"9384":[40,109,41],"9385":[40,110,41],"9386":[40,111,41],"9387":[40,112,41],"9388":[40,113,41],"9389":[40,114,41],"9390":[40,115,41],"9391":[40,116,41],"9392":[40,117,41],"9393":[40,118,41],"9394":[40,119,41],"9395":[40,120,41],"9396":[40,121,41],"9397":[40,122,41],"9398":[97],"9399":[98],"9400":[99],"9401":[100],"9402":[101],"9403":[102],"9404":[103],"9405":[104],"9406":[105],"9407":[106],"9408":[107],"9409":[108],"9410":[109],"9411":[110],"9412":[111],"9413":[112],"9414":[113],"9415":[114],"9416":[115],"9417":[116],"9418":[117],"9419":[118],"9420":[119],"9421":[120],"9422":[121],"9423":[122],"9424":[97],"9425":[98],"9426":[99],"9427":[100],"9428":[101],"9429":[102],"9430":[103],"9431":[104],"9432":[105],"9433":[106],"9434":[107],"9435":[108],"9436":[109],"9437":[110],"9438":[111],"9439":[112],"9440":[113],"9441":[114],"9442":[115],"9443":[116],"9444":[117],"9445":[118],"9446":[119],"9447":[120],"9448":[121],"9449":[122],"9450":[48],"10764":[8747,8747,8747,8747],"10868":[58,58,61],"10869":[61,61],"10870":[61,61,61],"10972":[10973,824],"11264":[11312],"11265":[11313],"11266":[11314],"11267":[11315],"11268":[11316],"11269":[11317],"11270":[11318],"11271":[11319],"11272":[11320],"11273":[11321],"11274":[11322],"11275":[11323],"11276":[11324],"11277":[11325],"11278":[11326],"11279":[11327],"11280":[11328],"11281":[11329],"11282":[11330],"11283":[11331],"11284":[11332],"11285":[11333],"11286":[11334],"11287":[11335],"11288":[11336],"11289":[11337],"11290":[11338],"11291":[11339],"11292":[11340],"11293":[11341],"11294":[11342],"11295":[11343],"11296":[11344],"11297":[11345],"11298":[11346],"11299":[11347],"11300":[11348],"11301":[11349],"11302":[11350],"11303":[11351],"11304":[11352],"11305":[11353],"11306":[11354],"11307":[11355],"11308":[11356],"11309":[11357],"11310":[11358],"11311":[11359],"11360":[11361],"11362":[619],"11363":[7549],"11364":[637],"11367":[11368],"11369":[11370],"11371":[11372],"11373":[593],"11374":[625],"11375":[592],"11376":[594],"11378":[11379],"11381":[11382],"11388":[106],"11389":[118],"11390":[575],"11391":[576],"11392":[11393],"11394":[11395],"11396":[11397],"11398":[11399],"11400":[11401],"11402":[11403],"11404":[11405],"11406":[11407],"11408":[11409],"11410":[11411],"11412":[11413],"11414":[11415],"11416":[11417],"11418":[11419],"11420":[11421],"11422":[11423],"11424":[11425],"11426":[11427],"11428":[11429],"11430":[11431],"11432":[11433],"11434":[11435],"11436":[11437],"11438":[11439],"11440":[11441],"11442":[11443],"11444":[11445],"11446":[11447],"11448":[11449],"11450":[11451],"11452":[11453],"11454":[11455],"11456":[11457],"11458":[11459],"11460":[11461],"11462":[11463],"11464":[11465],"11466":[11467],"11468":[11469],"11470":[11471],"11472":[11473],"11474":[11475],"11476":[11477],"11478":[11479],"11480":[11481],"11482":[11483],"11484":[11485],"11486":[11487],"11488":[11489],"11490":[11491],"11499":[11500],"11501":[11502],"11506":[11507],"11631":[11617],"11935":[27597],"12019":[40863],"12032":[19968],"12033":[20008],"12034":[20022],"12035":[20031],"12036":[20057],"12037":[20101],"12038":[20108],"12039":[20128],"12040":[20154],"12041":[20799],"12042":[20837],"12043":[20843],"12044":[20866],"12045":[20886],"12046":[20907],"12047":[20960],"12048":[20981],"12049":[20992],"12050":[21147],"12051":[21241],"12052":[21269],"12053":[21274],"12054":[21304],"12055":[21313],"12056":[21340],"12057":[21353],"12058":[21378],"12059":[21430],"12060":[21448],"12061":[21475],"12062":[22231],"12063":[22303],"12064":[22763],"12065":[22786],"12066":[22794],"12067":[22805],"12068":[22823],"12069":[22899],"12070":[23376],"12071":[23424],"12072":[23544],"12073":[23567],"12074":[23586],"12075":[23608],"12076":[23662],"12077":[23665],"12078":[24027],"12079":[24037],"12080":[24049],"12081":[24062],"12082":[24178],"12083":[24186],"12084":[24191],"12085":[24308],"12086":[24318],"12087":[24331],"12088":[24339],"12089":[24400],"12090":[24417],"12091":[24435],"12092":[24515],"12093":[25096],"12094":[25142],"12095":[25163],"12096":[25903],"12097":[25908],"12098":[25991],"12099":[26007],"12100":[26020],"12101":[26041],"12102":[26080],"12103":[26085],"12104":[26352],"12105":[26376],"12106":[26408],"12107":[27424],"12108":[27490],"12109":[27513],"12110":[27571],"12111":[27595],"12112":[27604],"12113":[27611],"12114":[27663],"12115":[27668],"12116":[27700],"12117":[28779],"12118":[29226],"12119":[29238],"12120":[29243],"12121":[29247],"12122":[29255],"12123":[29273],"12124":[29275],"12125":[29356],"12126":[29572],"12127":[29577],"12128":[29916],"12129":[29926],"12130":[29976],"12131":[29983],"12132":[29992],"12133":[30000],"12134":[30091],"12135":[30098],"12136":[30326],"12137":[30333],"12138":[30382],"12139":[30399],"12140":[30446],"12141":[30683],"12142":[30690],"12143":[30707],"12144":[31034],"12145":[31160],"12146":[31166],"12147":[31348],"12148":[31435],"12149":[31481],"12150":[31859],"12151":[31992],"12152":[32566],"12153":[32593],"12154":[32650],"12155":[32701],"12156":[32769],"12157":[32780],"12158":[32786],"12159":[32819],"12160":[32895],"12161":[32905],"12162":[33251],"12163":[33258],"12164":[33267],"12165":[33276],"12166":[33292],"12167":[33307],"12168":[33311],"12169":[33390],"12170":[33394],"12171":[33400],"12172":[34381],"12173":[34411],"12174":[34880],"12175":[34892],"12176":[34915],"12177":[35198],"12178":[35211],"12179":[35282],"12180":[35328],"12181":[35895],"12182":[35910],"12183":[35925],"12184":[35960],"12185":[35997],"12186":[36196],"12187":[36208],"12188":[36275],"12189":[36523],"12190":[36554],"12191":[36763],"12192":[36784],"12193":[36789],"12194":[37009],"12195":[37193],"12196":[37318],"12197":[37324],"12198":[37329],"12199":[38263],"12200":[38272],"12201":[38428],"12202":[38582],"12203":[38585],"12204":[38632],"12205":[38737],"12206":[38750],"12207":[38754],"12208":[38761],"12209":[38859],"12210":[38893],"12211":[38899],"12212":[38913],"12213":[39080],"12214":[39131],"12215":[39135],"12216":[39318],"12217":[39321],"12218":[39340],"12219":[39592],"12220":[39640],"12221":[39647],"12222":[39717],"12223":[39727],"12224":[39730],"12225":[39740],"12226":[39770],"12227":[40165],"12228":[40565],"12229":[40575],"12230":[40613],"12231":[40635],"12232":[40643],"12233":[40653],"12234":[40657],"12235":[40697],"12236":[40701],"12237":[40718],"12238":[40723],"12239":[40736],"12240":[40763],"12241":[40778],"12242":[40786],"12243":[40845],"12244":[40860],"12245":[40864],"12288":[32],"12290":[46],"12342":[12306],"12344":[21313],"12345":[21316],"12346":[21317],"12443":[32,12441],"12444":[32,12442],"12447":[12424,12426],"12543":[12467,12488],"12593":[4352],"12594":[4353],"12595":[4522],"12596":[4354],"12597":[4524],"12598":[4525],"12599":[4355],"12600":[4356],"12601":[4357],"12602":[4528],"12603":[4529],"12604":[4530],"12605":[4531],"12606":[4532],"12607":[4533],"12608":[4378],"12609":[4358],"12610":[4359],"12611":[4360],"12612":[4385],"12613":[4361],"12614":[4362],"12615":[4363],"12616":[4364],"12617":[4365],"12618":[4366],"12619":[4367],"12620":[4368],"12621":[4369],"12622":[4370],"12623":[4449],"12624":[4450],"12625":[4451],"12626":[4452],"12627":[4453],"12628":[4454],"12629":[4455],"12630":[4456],"12631":[4457],"12632":[4458],"12633":[4459],"12634":[4460],"12635":[4461],"12636":[4462],"12637":[4463],"12638":[4464],"12639":[4465],"12640":[4466],"12641":[4467],"12642":[4468],"12643":[4469],"12645":[4372],"12646":[4373],"12647":[4551],"12648":[4552],"12649":[4556],"12650":[4558],"12651":[4563],"12652":[4567],"12653":[4569],"12654":[4380],"12655":[4573],"12656":[4575],"12657":[4381],"12658":[4382],"12659":[4384],"12660":[4386],"12661":[4387],"12662":[4391],"12663":[4393],"12664":[4395],"12665":[4396],"12666":[4397],"12667":[4398],"12668":[4399],"12669":[4402],"12670":[4406],"12671":[4416],"12672":[4423],"12673":[4428],"12674":[4593],"12675":[4594],"12676":[4439],"12677":[4440],"12678":[4441],"12679":[4484],"12680":[4485],"12681":[4488],"12682":[4497],"12683":[4498],"12684":[4500],"12685":[4510],"12686":[4513],"12690":[19968],"12691":[20108],"12692":[19977],"12693":[22235],"12694":[19978],"12695":[20013],"12696":[19979],"12697":[30002],"12698":[20057],"12699":[19993],"12700":[19969],"12701":[22825],"12702":[22320],"12703":[20154],"12800":[40,4352,41],"12801":[40,4354,41],"12802":[40,4355,41],"12803":[40,4357,41],"12804":[40,4358,41],"12805":[40,4359,41],"12806":[40,4361,41],"12807":[40,4363,41],"12808":[40,4364,41],"12809":[40,4366,41],"12810":[40,4367,41],"12811":[40,4368,41],"12812":[40,4369,41],"12813":[40,4370,41],"12814":[40,44032,41],"12815":[40,45208,41],"12816":[40,45796,41],"12817":[40,46972,41],"12818":[40,47560,41],"12819":[40,48148,41],"12820":[40,49324,41],"12821":[40,50500,41],"12822":[40,51088,41],"12823":[40,52264,41],"12824":[40,52852,41],"12825":[40,53440,41],"12826":[40,54028,41],"12827":[40,54616,41],"12828":[40,51452,41],"12829":[40,50724,51204,41],"12830":[40,50724,54980,41],"12832":[40,19968,41],"12833":[40,20108,41],"12834":[40,19977,41],"12835":[40,22235,41],"12836":[40,20116,41],"12837":[40,20845,41],"12838":[40,19971,41],"12839":[40,20843,41],"12840":[40,20061,41],"12841":[40,21313,41],"12842":[40,26376,41],"12843":[40,28779,41],"12844":[40,27700,41],"12845":[40,26408,41],"12846":[40,37329,41],"12847":[40,22303,41],"12848":[40,26085,41],"12849":[40,26666,41],"12850":[40,26377,41],"12851":[40,31038,41],"12852":[40,21517,41],"12853":[40,29305,41],"12854":[40,36001,41],"12855":[40,31069,41],"12856":[40,21172,41],"12857":[40,20195,41],"12858":[40,21628,41],"12859":[40,23398,41],"12860":[40,30435,41],"12861":[40,20225,41],"12862":[40,36039,41],"12863":[40,21332,41],"12864":[40,31085,41],"12865":[40,20241,41],"12866":[40,33258,41],"12867":[40,33267,41],"12868":[21839],"12869":[24188],"12870":[25991],"12871":[31631],"12880":[112,116,101],"12881":[50,49],"12882":[50,50],"12883":[50,51],"12884":[50,52],"12885":[50,53],"12886":[50,54],"12887":[50,55],"12888":[50,56],"12889":[50,57],"12890":[51,48],"12891":[51,49],"12892":[51,50],"12893":[51,51],"12894":[51,52],"12895":[51,53],"12896":[4352],"12897":[4354],"12898":[4355],"12899":[4357],"12900":[4358],"12901":[4359],"12902":[4361],"12903":[4363],"12904":[4364],"12905":[4366],"12906":[4367],"12907":[4368],"12908":[4369],"12909":[4370],"12910":[44032],"12911":[45208],"12912":[45796],"12913":[46972],"12914":[47560],"12915":[48148],"12916":[49324],"12917":[50500],"12918":[51088],"12919":[52264],"12920":[52852],"12921":[53440],"12922":[54028],"12923":[54616],"12924":[52280,44256],"12925":[51452,51032],"12926":[50864],"12928":[19968],"12929":[20108],"12930":[19977],"12931":[22235],"12932":[20116],"12933":[20845],"12934":[19971],"12935":[20843],"12936":[20061],"12937":[21313],"12938":[26376],"12939":[28779],"12940":[27700],"12941":[26408],"12942":[37329],"12943":[22303],"12944":[26085],"12945":[26666],"12946":[26377],"12947":[31038],"12948":[21517],"12949":[29305],"12950":[36001],"12951":[31069],"12952":[21172],"12953":[31192],"12954":[30007],"12955":[22899],"12956":[36969],"12957":[20778],"12958":[21360],"12959":[27880],"12960":[38917],"12961":[20241],"12962":[20889],"12963":[27491],"12964":[19978],"12965":[20013],"12966":[19979],"12967":[24038],"12968":[21491],"12969":[21307],"12970":[23447],"12971":[23398],"12972":[30435],"12973":[20225],"12974":[36039],"12975":[21332],"12976":[22812],"12977":[51,54],"12978":[51,55],"12979":[51,56],"12980":[51,57],"12981":[52,48],"12982":[52,49],"12983":[52,50],"12984":[52,51],"12985":[52,52],"12986":[52,53],"12987":[52,54],"12988":[52,55],"12989":[52,56],"12990":[52,57],"12991":[53,48],"12992":[49,26376],"12993":[50,26376],"12994":[51,26376],"12995":[52,26376],"12996":[53,26376],"12997":[54,26376],"12998":[55,26376],"12999":[56,26376],"13000":[57,26376],"13001":[49,48,26376],"13002":[49,49,26376],"13003":[49,50,26376],"13004":[104,103],"13005":[101,114,103],"13006":[101,118],"13007":[108,116,100],"13008":[12450],"13009":[12452],"13010":[12454],"13011":[12456],"13012":[12458],"13013":[12459],"13014":[12461],"13015":[12463],"13016":[12465],"13017":[12467],"13018":[12469],"13019":[12471],"13020":[12473],"13021":[12475],"13022":[12477],"13023":[12479],"13024":[12481],"13025":[12484],"13026":[12486],"13027":[12488],"13028":[12490],"13029":[12491],"13030":[12492],"13031":[12493],"13032":[12494],"13033":[12495],"13034":[12498],"13035":[12501],"13036":[12504],"13037":[12507],"13038":[12510],"13039":[12511],"13040":[12512],"13041":[12513],"13042":[12514],"13043":[12516],"13044":[12518],"13045":[12520],"13046":[12521],"13047":[12522],"13048":[12523],"13049":[12524],"13050":[12525],"13051":[12527],"13052":[12528],"13053":[12529],"13054":[12530],"13055":[20196,21644],"13056":[12450,12497,12540,12488],"13057":[12450,12523,12501,12449],"13058":[12450,12531,12506,12450],"13059":[12450,12540,12523],"13060":[12452,12491,12531,12464],"13061":[12452,12531,12481],"13062":[12454,12457,12531],"13063":[12456,12473,12463,12540,12489],"13064":[12456,12540,12459,12540],"13065":[12458,12531,12473],"13066":[12458,12540,12512],"13067":[12459,12452,12522],"13068":[12459,12521,12483,12488],"13069":[12459,12525,12522,12540],"13070":[12460,12525,12531],"13071":[12460,12531,12510],"13072":[12462,12460],"13073":[12462,12491,12540],"13074":[12461,12517,12522,12540],"13075":[12462,12523,12480,12540],"13076":[12461,12525],"13077":[12461,12525,12464,12521,12512],"13078":[12461,12525,12513,12540,12488,12523],"13079":[12461,12525,12527,12483,12488],"13080":[12464,12521,12512],"13081":[12464,12521,12512,12488,12531],"13082":[12463,12523,12476,12452,12525],"13083":[12463,12525,12540,12493],"13084":[12465,12540,12473],"13085":[12467,12523,12490],"13086":[12467,12540,12509],"13087":[12469,12452,12463,12523],"13088":[12469,12531,12481,12540,12512],"13089":[12471,12522,12531,12464],"13090":[12475,12531,12481],"13091":[12475,12531,12488],"13092":[12480,12540,12473],"13093":[12487,12471],"13094":[12489,12523],"13095":[12488,12531],"13096":[12490,12494],"13097":[12494,12483,12488],"13098":[12495,12452,12484],"13099":[12497,12540,12475,12531,12488],"13100":[12497,12540,12484],"13101":[12496,12540,12524,12523],"13102":[12500,12450,12473,12488,12523],"13103":[12500,12463,12523],"13104":[12500,12467],"13105":[12499,12523],"13106":[12501,12449,12521,12483,12489],"13107":[12501,12451,12540,12488],"13108":[12502,12483,12471,12455,12523],"13109":[12501,12521,12531],"13110":[12504,12463,12479,12540,12523],"13111":[12506,12477],"13112":[12506,12491,12498],"13113":[12504,12523,12484],"13114":[12506,12531,12473],"13115":[12506,12540,12472],"13116":[12505,12540,12479],"13117":[12509,12452,12531,12488],"13118":[12508,12523,12488],"13119":[12507,12531],"13120":[12509,12531,12489],"13121":[12507,12540,12523],"13122":[12507,12540,12531],"13123":[12510,12452,12463,12525],"13124":[12510,12452,12523],"13125":[12510,12483,12495],"13126":[12510,12523,12463],"13127":[12510,12531,12471,12519,12531],"13128":[12511,12463,12525,12531],"13129":[12511,12522],"13130":[12511,12522,12496,12540,12523],"13131":[12513,12460],"13132":[12513,12460,12488,12531],"13133":[12513,12540,12488,12523],"13134":[12516,12540,12489],"13135":[12516,12540,12523],"13136":[12518,12450,12531],"13137":[12522,12483,12488,12523],"13138":[12522,12521],"13139":[12523,12500,12540],"13140":[12523,12540,12502,12523],"13141":[12524,12512],"13142":[12524,12531,12488,12466,12531],"13143":[12527,12483,12488],"13144":[48,28857],"13145":[49,28857],"13146":[50,28857],"13147":[51,28857],"13148":[52,28857],"13149":[53,28857],"13150":[54,28857],"13151":[55,28857],"13152":[56,28857],"13153":[57,28857],"13154":[49,48,28857],"13155":[49,49,28857],"13156":[49,50,28857],"13157":[49,51,28857],"13158":[49,52,28857],"13159":[49,53,28857],"13160":[49,54,28857],"13161":[49,55,28857],"13162":[49,56,28857],"13163":[49,57,28857],"13164":[50,48,28857],"13165":[50,49,28857],"13166":[50,50,28857],"13167":[50,51,28857],"13168":[50,52,28857],"13169":[104,112,97],"13170":[100,97],"13171":[97,117],"13172":[98,97,114],"13173":[111,118],"13174":[112,99],"13175":[100,109],"13176":[100,109,50],"13177":[100,109,51],"13178":[105,117],"13179":[24179,25104],"13180":[26157,21644],"13181":[22823,27491],"13182":[26126,27835],"13183":[26666,24335,20250,31038],"13184":[112,97],"13185":[110,97],"13186":[956,97],"13187":[109,97],"13188":[107,97],"13189":[107,98],"13190":[109,98],"13191":[103,98],"13192":[99,97,108],"13193":[107,99,97,108],"13194":[112,102],"13195":[110,102],"13196":[956,102],"13197":[956,103],"13198":[109,103],"13199":[107,103],"13200":[104,122],"13201":[107,104,122],"13202":[109,104,122],"13203":[103,104,122],"13204":[116,104,122],"13205":[956,108],"13206":[109,108],"13207":[100,108],"13208":[107,108],"13209":[102,109],"13210":[110,109],"13211":[956,109],"13212":[109,109],"13213":[99,109],"13214":[107,109],"13215":[109,109,50],"13216":[99,109,50],"13217":[109,50],"13218":[107,109,50],"13219":[109,109,51],"13220":[99,109,51],"13221":[109,51],"13222":[107,109,51],"13223":[109,8725,115],"13224":[109,8725,115,50],"13225":[112,97],"13226":[107,112,97],"13227":[109,112,97],"13228":[103,112,97],"13229":[114,97,100],"13230":[114,97,100,8725,115],"13231":[114,97,100,8725,115,50],"13232":[112,115],"13233":[110,115],"13234":[956,115],"13235":[109,115],"13236":[112,118],"13237":[110,118],"13238":[956,118],"13239":[109,118],"13240":[107,118],"13241":[109,118],"13242":[112,119],"13243":[110,119],"13244":[956,119],"13245":[109,119],"13246":[107,119],"13247":[109,119],"13248":[107,969],"13249":[109,969],"13251":[98,113],"13252":[99,99],"13253":[99,100],"13254":[99,8725,107,103],"13256":[100,98],"13257":[103,121],"13258":[104,97],"13259":[104,112],"13260":[105,110],"13261":[107,107],"13262":[107,109],"13263":[107,116],"13264":[108,109],"13265":[108,110],"13266":[108,111,103],"13267":[108,120],"13268":[109,98],"13269":[109,105,108],"13270":[109,111,108],"13271":[112,104],"13273":[112,112,109],"13274":[112,114],"13275":[115,114],"13276":[115,118],"13277":[119,98],"13278":[118,8725,109],"13279":[97,8725,109],"13280":[49,26085],"13281":[50,26085],"13282":[51,26085],"13283":[52,26085],"13284":[53,26085],"13285":[54,26085],"13286":[55,26085],"13287":[56,26085],"13288":[57,26085],"13289":[49,48,26085],"13290":[49,49,26085],"13291":[49,50,26085],"13292":[49,51,26085],"13293":[49,52,26085],"13294":[49,53,26085],"13295":[49,54,26085],"13296":[49,55,26085],"13297":[49,56,26085],"13298":[49,57,26085],"13299":[50,48,26085],"13300":[50,49,26085],"13301":[50,50,26085],"13302":[50,51,26085],"13303":[50,52,26085],"13304":[50,53,26085],"13305":[50,54,26085],"13306":[50,55,26085],"13307":[50,56,26085],"13308":[50,57,26085],"13309":[51,48,26085],"13310":[51,49,26085],"13311":[103,97,108],"42560":[42561],"42562":[42563],"42564":[42565],"42566":[42567],"42568":[42569],"42570":[42571],"42572":[42573],"42574":[42575],"42576":[42577],"42578":[42579],"42580":[42581],"42582":[42583],"42584":[42585],"42586":[42587],"42588":[42589],"42590":[42591],"42592":[42593],"42594":[42595],"42596":[42597],"42598":[42599],"42600":[42601],"42602":[42603],"42604":[42605],"42624":[42625],"42626":[42627],"42628":[42629],"42630":[42631],"42632":[42633],"42634":[42635],"42636":[42637],"42638":[42639],"42640":[42641],"42642":[42643],"42644":[42645],"42646":[42647],"42648":[42649],"42650":[42651],"42652":[1098],"42653":[1100],"42786":[42787],"42788":[42789],"42790":[42791],"42792":[42793],"42794":[42795],"42796":[42797],"42798":[42799],"42802":[42803],"42804":[42805],"42806":[42807],"42808":[42809],"42810":[42811],"42812":[42813],"42814":[42815],"42816":[42817],"42818":[42819],"42820":[42821],"42822":[42823],"42824":[42825],"42826":[42827],"42828":[42829],"42830":[42831],"42832":[42833],"42834":[42835],"42836":[42837],"42838":[42839],"42840":[42841],"42842":[42843],"42844":[42845],"42846":[42847],"42848":[42849],"42850":[42851],"42852":[42853],"42854":[42855],"42856":[42857],"42858":[42859],"42860":[42861],"42862":[42863],"42864":[42863],"42873":[42874],"42875":[42876],"42877":[7545],"42878":[42879],"42880":[42881],"42882":[42883],"42884":[42885],"42886":[42887],"42891":[42892],"42893":[613],"42896":[42897],"42898":[42899],"42902":[42903],"42904":[42905],"42906":[42907],"42908":[42909],"42910":[42911],"42912":[42913],"42914":[42915],"42916":[42917],"42918":[42919],"42920":[42921],"42922":[614],"42923":[604],"42924":[609],"42925":[620],"42926":[618],"42928":[670],"42929":[647],"42930":[669],"42931":[43859],"42932":[42933],"42934":[42935],"42936":[42937],"42938":[42939],"42940":[42941],"42942":[42943],"42944":[42945],"42946":[42947],"42948":[42900],"42949":[642],"42950":[7566],"42951":[42952],"42953":[42954],"42960":[42961],"42966":[42967],"42968":[42969],"42994":[99],"42995":[102],"42996":[113],"42997":[42998],"43000":[295],"43001":[339],"43868":[42791],"43869":[43831],"43870":[619],"43871":[43858],"43881":[653],"43888":[5024],"43889":[5025],"43890":[5026],"43891":[5027],"43892":[5028],"43893":[5029],"43894":[5030],"43895":[5031],"43896":[5032],"43897":[5033],"43898":[5034],"43899":[5035],"43900":[5036],"43901":[5037],"43902":[5038],"43903":[5039],"43904":[5040],"43905":[5041],"43906":[5042],"43907":[5043],"43908":[5044],"43909":[5045],"43910":[5046],"43911":[5047],"43912":[5048],"43913":[5049],"43914":[5050],"43915":[5051],"43916":[5052],"43917":[5053],"43918":[5054],"43919":[5055],"43920":[5056],"43921":[5057],"43922":[5058],"43923":[5059],"43924":[5060],"43925":[5061],"43926":[5062],"43927":[5063],"43928":[5064],"43929":[5065],"43930":[5066],"43931":[5067],"43932":[5068],"43933":[5069],"43934":[5070],"43935":[5071],"43936":[5072],"43937":[5073],"43938":[5074],"43939":[5075],"43940":[5076],"43941":[5077],"43942":[5078],"43943":[5079],"43944":[5080],"43945":[5081],"43946":[5082],"43947":[5083],"43948":[5084],"43949":[5085],"43950":[5086],"43951":[5087],"43952":[5088],"43953":[5089],"43954":[5090],"43955":[5091],"43956":[5092],"43957":[5093],"43958":[5094],"43959":[5095],"43960":[5096],"43961":[5097],"43962":[5098],"43963":[5099],"43964":[5100],"43965":[5101],"43966":[5102],"43967":[5103],"63744":[35912],"63745":[26356],"63746":[36554],"63747":[36040],"63748":[28369],"63749":[20018],"63750":[21477],"63751":[40860],"63753":[22865],"63754":[37329],"63755":[21895],"63756":[22856],"63757":[25078],"63758":[30313],"63759":[32645],"63760":[34367],"63761":[34746],"63762":[35064],"63763":[37007],"63764":[27138],"63765":[27931],"63766":[28889],"63767":[29662],"63768":[33853],"63769":[37226],"63770":[39409],"63771":[20098],"63772":[21365],"63773":[27396],"63774":[29211],"63775":[34349],"63776":[40478],"63777":[23888],"63778":[28651],"63779":[34253],"63780":[35172],"63781":[25289],"63782":[33240],"63783":[34847],"63784":[24266],"63785":[26391],"63786":[28010],"63787":[29436],"63788":[37070],"63789":[20358],"63790":[20919],"63791":[21214],"63792":[25796],"63793":[27347],"63794":[29200],"63795":[30439],"63796":[32769],"63797":[34310],"63798":[34396],"63799":[36335],"63800":[38706],"63801":[39791],"63802":[40442],"63803":[30860],"63804":[31103],"63805":[32160],"63806":[33737],"63807":[37636],"63808":[40575],"63809":[35542],"63810":[22751],"63811":[24324],"63812":[31840],"63813":[32894],"63814":[29282],"63815":[30922],"63816":[36034],"63817":[38647],"63818":[22744],"63819":[23650],"63820":[27155],"63821":[28122],"63822":[28431],"63823":[32047],"63824":[32311],"63825":[38475],"63826":[21202],"63827":[32907],"63828":[20956],"63829":[20940],"63830":[31260],"63831":[32190],"63832":[33777],"63833":[38517],"63834":[35712],"63835":[25295],"63836":[27138],"63837":[35582],"63838":[20025],"63839":[23527],"63840":[24594],"63841":[29575],"63842":[30064],"63843":[21271],"63844":[30971],"63845":[20415],"63846":[24489],"63847":[19981],"63848":[27852],"63849":[25976],"63850":[32034],"63851":[21443],"63852":[22622],"63853":[30465],"63854":[33865],"63855":[35498],"63856":[27578],"63857":[36784],"63858":[27784],"63859":[25342],"63860":[33509],"63861":[25504],"63862":[30053],"63863":[20142],"63864":[20841],"63865":[20937],"63866":[26753],"63867":[31975],"63868":[33391],"63869":[35538],"63870":[37327],"63871":[21237],"63872":[21570],"63873":[22899],"63874":[24300],"63875":[26053],"63876":[28670],"63877":[31018],"63878":[38317],"63879":[39530],"63880":[40599],"63881":[40654],"63882":[21147],"63883":[26310],"63884":[27511],"63885":[36706],"63886":[24180],"63887":[24976],"63888":[25088],"63889":[25754],"63890":[28451],"63891":[29001],"63892":[29833],"63893":[31178],"63894":[32244],"63895":[32879],"63896":[36646],"63897":[34030],"63898":[36899],"63899":[37706],"63900":[21015],"63901":[21155],"63902":[21693],"63903":[28872],"63904":[35010],"63905":[35498],"63906":[24265],"63907":[24565],"63908":[25467],"63909":[27566],"63910":[31806],"63911":[29557],"63912":[20196],"63913":[22265],"63914":[23527],"63915":[23994],"63916":[24604],"63917":[29618],"63918":[29801],"63919":[32666],"63920":[32838],"63921":[37428],"63922":[38646],"63923":[38728],"63924":[38936],"63925":[20363],"63926":[31150],"63927":[37300],"63928":[38584],"63929":[24801],"63930":[20102],"63931":[20698],"63932":[23534],"63933":[23615],"63934":[26009],"63935":[27138],"63936":[29134],"63937":[30274],"63938":[34044],"63939":[36988],"63940":[40845],"63941":[26248],"63942":[38446],"63943":[21129],"63944":[26491],"63945":[26611],"63946":[27969],"63947":[28316],"63948":[29705],"63949":[30041],"63950":[30827],"63951":[32016],"63952":[39006],"63953":[20845],"63954":[25134],"63955":[38520],"63956":[20523],"63957":[23833],"63958":[28138],"63959":[36650],"63960":[24459],"63961":[24900],"63962":[26647],"63963":[29575],"63964":[38534],"63965":[21033],"63966":[21519],"63967":[23653],"63968":[26131],"63969":[26446],"63970":[26792],"63971":[27877],"63972":[29702],"63973":[30178],"63974":[32633],"63975":[35023],"63976":[35041],"63977":[37324],"63978":[38626],"63979":[21311],"63980":[28346],"63981":[21533],"63982":[29136],"63983":[29848],"63984":[34298],"63985":[38563],"63986":[40023],"63987":[40607],"63988":[26519],"63989":[28107],"63990":[33256],"63991":[31435],"63992":[31520],"63993":[31890],"63994":[29376],"63995":[28825],"63996":[35672],"63997":[20160],"63998":[33590],"63999":[21050],"64000":[20999],"64001":[24230],"64002":[25299],"64003":[31958],"64004":[23429],"64005":[27934],"64006":[26292],"64007":[36667],"64008":[34892],"64009":[38477],"64010":[35211],"64011":[24275],"64012":[20800],"64013":[21952],"64016":[22618],"64018":[26228],"64021":[20958],"64022":[29482],"64023":[30410],"64024":[31036],"64025":[31070],"64026":[31077],"64027":[31119],"64028":[38742],"64029":[31934],"64030":[32701],"64032":[34322],"64034":[35576],"64037":[36920],"64038":[37117],"64042":[39151],"64043":[39164],"64044":[39208],"64045":[40372],"64046":[37086],"64047":[38583],"64048":[20398],"64049":[20711],"64050":[20813],"64051":[21193],"64052":[21220],"64053":[21329],"64054":[21917],"64055":[22022],"64056":[22120],"64057":[22592],"64058":[22696],"64059":[23652],"64060":[23662],"64061":[24724],"64062":[24936],"64063":[24974],"64064":[25074],"64065":[25935],"64066":[26082],"64067":[26257],"64068":[26757],"64069":[28023],"64070":[28186],"64071":[28450],"64072":[29038],"64073":[29227],"64074":[29730],"64075":[30865],"64076":[31038],"64077":[31049],"64078":[31048],"64079":[31056],"64080":[31062],"64081":[31069],"64082":[31117],"64083":[31118],"64084":[31296],"64085":[31361],"64086":[31680],"64087":[32244],"64088":[32265],"64089":[32321],"64090":[32626],"64091":[32773],"64092":[33261],"64093":[33401],"64095":[33879],"64096":[35088],"64097":[35222],"64098":[35585],"64099":[35641],"64100":[36051],"64101":[36104],"64102":[36790],"64103":[36920],"64104":[38627],"64105":[38911],"64106":[38971],"64107":[24693],"64108":[148206],"64109":[33304],"64112":[20006],"64113":[20917],"64114":[20840],"64115":[20352],"64116":[20805],"64117":[20864],"64118":[21191],"64119":[21242],"64120":[21917],"64121":[21845],"64122":[21913],"64123":[21986],"64124":[22618],"64125":[22707],"64126":[22852],"64127":[22868],"64128":[23138],"64129":[23336],"64130":[24274],"64131":[24281],"64132":[24425],"64133":[24493],"64134":[24792],"64135":[24910],"64136":[24840],"64137":[24974],"64138":[24928],"64139":[25074],"64140":[25140],"64141":[25540],"64142":[25628],"64143":[25682],"64144":[25942],"64145":[26228],"64146":[26391],"64147":[26395],"64148":[26454],"64149":[27513],"64150":[27578],"64151":[27969],"64152":[28379],"64153":[28363],"64154":[28450],"64155":[28702],"64156":[29038],"64157":[30631],"64158":[29237],"64159":[29359],"64160":[29482],"64161":[29809],"64162":[29958],"64163":[30011],"64164":[30237],"64165":[30239],"64166":[30410],"64167":[30427],"64168":[30452],"64169":[30538],"64170":[30528],"64171":[30924],"64172":[31409],"64173":[31680],"64174":[31867],"64175":[32091],"64176":[32244],"64177":[32574],"64178":[32773],"64179":[33618],"64180":[33775],"64181":[34681],"64182":[35137],"64183":[35206],"64184":[35222],"64185":[35519],"64186":[35576],"64187":[35531],"64188":[35585],"64189":[35582],"64190":[35565],"64191":[35641],"64192":[35722],"64193":[36104],"64194":[36664],"64195":[36978],"64196":[37273],"64197":[37494],"64198":[38524],"64199":[38627],"64200":[38742],"64201":[38875],"64202":[38911],"64203":[38923],"64204":[38971],"64205":[39698],"64206":[40860],"64207":[141386],"64208":[141380],"64209":[144341],"64210":[15261],"64211":[16408],"64212":[16441],"64213":[152137],"64214":[154832],"64215":[163539],"64216":[40771],"64217":[40846],"64256":[102,102],"64257":[102,105],"64258":[102,108],"64259":[102,102,105],"64260":[102,102,108],"64261":[115,116],"64275":[1396,1398],"64276":[1396,1381],"64277":[1396,1387],"64278":[1406,1398],"64279":[1396,1389],"64285":[1497,1460],"64287":[1522,1463],"64288":[1506],"64289":[1488],"64290":[1491],"64291":[1492],"64292":[1499],"64293":[1500],"64294":[1501],"64295":[1512],"64296":[1514],"64297":[43],"64298":[1513,1473],"64299":[1513,1474],"64300":[1513,1468,1473],"64301":[1513,1468,1474],"64302":[1488,1463],"64303":[1488,1464],"64304":[1488,1468],"64305":[1489,1468],"64306":[1490,1468],"64307":[1491,1468],"64308":[1492,1468],"64309":[1493,1468],"64310":[1494,1468],"64312":[1496,1468],"64313":[1497,1468],"64314":[1498,1468],"64315":[1499,1468],"64316":[1500,1468],"64318":[1502,1468],"64320":[1504,1468],"64321":[1505,1468],"64323":[1507,1468],"64324":[1508,1468],"64326":[1510,1468],"64327":[1511,1468],"64328":[1512,1468],"64329":[1513,1468],"64330":[1514,1468],"64331":[1493,1465],"64332":[1489,1471],"64333":[1499,1471],"64334":[1508,1471],"64335":[1488,1500],"64336":[1649],"64338":[1659],"64342":[1662],"64346":[1664],"64350":[1658],"64354":[1663],"64358":[1657],"64362":[1700],"64366":[1702],"64370":[1668],"64374":[1667],"64378":[1670],"64382":[1671],"64386":[1677],"64388":[1676],"64390":[1678],"64392":[1672],"64394":[1688],"64396":[1681],"64398":[1705],"64402":[1711],"64406":[1715],"64410":[1713],"64414":[1722],"64416":[1723],"64420":[1728],"64422":[1729],"64426":[1726],"64430":[1746],"64432":[1747],"64467":[1709],"64471":[1735],"64473":[1734],"64475":[1736],"64477":[1735,1652],"64478":[1739],"64480":[1733],"64482":[1737],"64484":[1744],"64488":[1609],"64490":[1574,1575],"64492":[1574,1749],"64494":[1574,1608],"64496":[1574,1735],"64498":[1574,1734],"64500":[1574,1736],"64502":[1574,1744],"64505":[1574,1609],"64508":[1740],"64512":[1574,1580],"64513":[1574,1581],"64514":[1574,1605],"64515":[1574,1609],"64516":[1574,1610],"64517":[1576,1580],"64518":[1576,1581],"64519":[1576,1582],"64520":[1576,1605],"64521":[1576,1609],"64522":[1576,1610],"64523":[1578,1580],"64524":[1578,1581],"64525":[1578,1582],"64526":[1578,1605],"64527":[1578,1609],"64528":[1578,1610],"64529":[1579,1580],"64530":[1579,1605],"64531":[1579,1609],"64532":[1579,1610],"64533":[1580,1581],"64534":[1580,1605],"64535":[1581,1580],"64536":[1581,1605],"64537":[1582,1580],"64538":[1582,1581],"64539":[1582,1605],"64540":[1587,1580],"64541":[1587,1581],"64542":[1587,1582],"64543":[1587,1605],"64544":[1589,1581],"64545":[1589,1605],"64546":[1590,1580],"64547":[1590,1581],"64548":[1590,1582],"64549":[1590,1605],"64550":[1591,1581],"64551":[1591,1605],"64552":[1592,1605],"64553":[1593,1580],"64554":[1593,1605],"64555":[1594,1580],"64556":[1594,1605],"64557":[1601,1580],"64558":[1601,1581],"64559":[1601,1582],"64560":[1601,1605],"64561":[1601,1609],"64562":[1601,1610],"64563":[1602,1581],"64564":[1602,1605],"64565":[1602,1609],"64566":[1602,1610],"64567":[1603,1575],"64568":[1603,1580],"64569":[1603,1581],"64570":[1603,1582],"64571":[1603,1604],"64572":[1603,1605],"64573":[1603,1609],"64574":[1603,1610],"64575":[1604,1580],"64576":[1604,1581],"64577":[1604,1582],"64578":[1604,1605],"64579":[1604,1609],"64580":[1604,1610],"64581":[1605,1580],"64582":[1605,1581],"64583":[1605,1582],"64584":[1605,1605],"64585":[1605,1609],"64586":[1605,1610],"64587":[1606,1580],"64588":[1606,1581],"64589":[1606,1582],"64590":[1606,1605],"64591":[1606,1609],"64592":[1606,1610],"64593":[1607,1580],"64594":[1607,1605],"64595":[1607,1609],"64596":[1607,1610],"64597":[1610,1580],"64598":[1610,1581],"64599":[1610,1582],"64600":[1610,1605],"64601":[1610,1609],"64602":[1610,1610],"64603":[1584,1648],"64604":[1585,1648],"64605":[1609,1648],"64606":[32,1612,1617],"64607":[32,1613,1617],"64608":[32,1614,1617],"64609":[32,1615,1617],"64610":[32,1616,1617],"64611":[32,1617,1648],"64612":[1574,1585],"64613":[1574,1586],"64614":[1574,1605],"64615":[1574,1606],"64616":[1574,1609],"64617":[1574,1610],"64618":[1576,1585],"64619":[1576,1586],"64620":[1576,1605],"64621":[1576,1606],"64622":[1576,1609],"64623":[1576,1610],"64624":[1578,1585],"64625":[1578,1586],"64626":[1578,1605],"64627":[1578,1606],"64628":[1578,1609],"64629":[1578,1610],"64630":[1579,1585],"64631":[1579,1586],"64632":[1579,1605],"64633":[1579,1606],"64634":[1579,1609],"64635":[1579,1610],"64636":[1601,1609],"64637":[1601,1610],"64638":[1602,1609],"64639":[1602,1610],"64640":[1603,1575],"64641":[1603,1604],"64642":[1603,1605],"64643":[1603,1609],"64644":[1603,1610],"64645":[1604,1605],"64646":[1604,1609],"64647":[1604,1610],"64648":[1605,1575],"64649":[1605,1605],"64650":[1606,1585],"64651":[1606,1586],"64652":[1606,1605],"64653":[1606,1606],"64654":[1606,1609],"64655":[1606,1610],"64656":[1609,1648],"64657":[1610,1585],"64658":[1610,1586],"64659":[1610,1605],"64660":[1610,1606],"64661":[1610,1609],"64662":[1610,1610],"64663":[1574,1580],"64664":[1574,1581],"64665":[1574,1582],"64666":[1574,1605],"64667":[1574,1607],"64668":[1576,1580],"64669":[1576,1581],"64670":[1576,1582],"64671":[1576,1605],"64672":[1576,1607],"64673":[1578,1580],"64674":[1578,1581],"64675":[1578,1582],"64676":[1578,1605],"64677":[1578,1607],"64678":[1579,1605],"64679":[1580,1581],"64680":[1580,1605],"64681":[1581,1580],"64682":[1581,1605],"64683":[1582,1580],"64684":[1582,1605],"64685":[1587,1580],"64686":[1587,1581],"64687":[1587,1582],"64688":[1587,1605],"64689":[1589,1581],"64690":[1589,1582],"64691":[1589,1605],"64692":[1590,1580],"64693":[1590,1581],"64694":[1590,1582],"64695":[1590,1605],"64696":[1591,1581],"64697":[1592,1605],"64698":[1593,1580],"64699":[1593,1605],"64700":[1594,1580],"64701":[1594,1605],"64702":[1601,1580],"64703":[1601,1581],"64704":[1601,1582],"64705":[1601,1605],"64706":[1602,1581],"64707":[1602,1605],"64708":[1603,1580],"64709":[1603,1581],"64710":[1603,1582],"64711":[1603,1604],"64712":[1603,1605],"64713":[1604,1580],"64714":[1604,1581],"64715":[1604,1582],"64716":[1604,1605],"64717":[1604,1607],"64718":[1605,1580],"64719":[1605,1581],"64720":[1605,1582],"64721":[1605,1605],"64722":[1606,1580],"64723":[1606,1581],"64724":[1606,1582],"64725":[1606,1605],"64726":[1606,1607],"64727":[1607,1580],"64728":[1607,1605],"64729":[1607,1648],"64730":[1610,1580],"64731":[1610,1581],"64732":[1610,1582],"64733":[1610,1605],"64734":[1610,1607],"64735":[1574,1605],"64736":[1574,1607],"64737":[1576,1605],"64738":[1576,1607],"64739":[1578,1605],"64740":[1578,1607],"64741":[1579,1605],"64742":[1579,1607],"64743":[1587,1605],"64744":[1587,1607],"64745":[1588,1605],"64746":[1588,1607],"64747":[1603,1604],"64748":[1603,1605],"64749":[1604,1605],"64750":[1606,1605],"64751":[1606,1607],"64752":[1610,1605],"64753":[1610,1607],"64754":[1600,1614,1617],"64755":[1600,1615,1617],"64756":[1600,1616,1617],"64757":[1591,1609],"64758":[1591,1610],"64759":[1593,1609],"64760":[1593,1610],"64761":[1594,1609],"64762":[1594,1610],"64763":[1587,1609],"64764":[1587,1610],"64765":[1588,1609],"64766":[1588,1610],"64767":[1581,1609],"64768":[1581,1610],"64769":[1580,1609],"64770":[1580,1610],"64771":[1582,1609],"64772":[1582,1610],"64773":[1589,1609],"64774":[1589,1610],"64775":[1590,1609],"64776":[1590,1610],"64777":[1588,1580],"64778":[1588,1581],"64779":[1588,1582],"64780":[1588,1605],"64781":[1588,1585],"64782":[1587,1585],"64783":[1589,1585],"64784":[1590,1585],"64785":[1591,1609],"64786":[1591,1610],"64787":[1593,1609],"64788":[1593,1610],"64789":[1594,1609],"64790":[1594,1610],"64791":[1587,1609],"64792":[1587,1610],"64793":[1588,1609],"64794":[1588,1610],"64795":[1581,1609],"64796":[1581,1610],"64797":[1580,1609],"64798":[1580,1610],"64799":[1582,1609],"64800":[1582,1610],"64801":[1589,1609],"64802":[1589,1610],"64803":[1590,1609],"64804":[1590,1610],"64805":[1588,1580],"64806":[1588,1581],"64807":[1588,1582],"64808":[1588,1605],"64809":[1588,1585],"64810":[1587,1585],"64811":[1589,1585],"64812":[1590,1585],"64813":[1588,1580],"64814":[1588,1581],"64815":[1588,1582],"64816":[1588,1605],"64817":[1587,1607],"64818":[1588,1607],"64819":[1591,1605],"64820":[1587,1580],"64821":[1587,1581],"64822":[1587,1582],"64823":[1588,1580],"64824":[1588,1581],"64825":[1588,1582],"64826":[1591,1605],"64827":[1592,1605],"64828":[1575,1611],"64848":[1578,1580,1605],"64849":[1578,1581,1580],"64851":[1578,1581,1605],"64852":[1578,1582,1605],"64853":[1578,1605,1580],"64854":[1578,1605,1581],"64855":[1578,1605,1582],"64856":[1580,1605,1581],"64858":[1581,1605,1610],"64859":[1581,1605,1609],"64860":[1587,1581,1580],"64861":[1587,1580,1581],"64862":[1587,1580,1609],"64863":[1587,1605,1581],"64865":[1587,1605,1580],"64866":[1587,1605,1605],"64868":[1589,1581,1581],"64870":[1589,1605,1605],"64871":[1588,1581,1605],"64873":[1588,1580,1610],"64874":[1588,1605,1582],"64876":[1588,1605,1605],"64878":[1590,1581,1609],"64879":[1590,1582,1605],"64881":[1591,1605,1581],"64883":[1591,1605,1605],"64884":[1591,1605,1610],"64885":[1593,1580,1605],"64886":[1593,1605,1605],"64888":[1593,1605,1609],"64889":[1594,1605,1605],"64890":[1594,1605,1610],"64891":[1594,1605,1609],"64892":[1601,1582,1605],"64894":[1602,1605,1581],"64895":[1602,1605,1605],"64896":[1604,1581,1605],"64897":[1604,1581,1610],"64898":[1604,1581,1609],"64899":[1604,1580,1580],"64901":[1604,1582,1605],"64903":[1604,1605,1581],"64905":[1605,1581,1580],"64906":[1605,1581,1605],"64907":[1605,1581,1610],"64908":[1605,1580,1581],"64909":[1605,1580,1605],"64910":[1605,1582,1580],"64911":[1605,1582,1605],"64914":[1605,1580,1582],"64915":[1607,1605,1580],"64916":[1607,1605,1605],"64917":[1606,1581,1605],"64918":[1606,1581,1609],"64919":[1606,1580,1605],"64921":[1606,1580,1609],"64922":[1606,1605,1610],"64923":[1606,1605,1609],"64924":[1610,1605,1605],"64926":[1576,1582,1610],"64927":[1578,1580,1610],"64928":[1578,1580,1609],"64929":[1578,1582,1610],"64930":[1578,1582,1609],"64931":[1578,1605,1610],"64932":[1578,1605,1609],"64933":[1580,1605,1610],"64934":[1580,1581,1609],"64935":[1580,1605,1609],"64936":[1587,1582,1609],"64937":[1589,1581,1610],"64938":[1588,1581,1610],"64939":[1590,1581,1610],"64940":[1604,1580,1610],"64941":[1604,1605,1610],"64942":[1610,1581,1610],"64943":[1610,1580,1610],"64944":[1610,1605,1610],"64945":[1605,1605,1610],"64946":[1602,1605,1610],"64947":[1606,1581,1610],"64948":[1602,1605,1581],"64949":[1604,1581,1605],"64950":[1593,1605,1610],"64951":[1603,1605,1610],"64952":[1606,1580,1581],"64953":[1605,1582,1610],"64954":[1604,1580,1605],"64955":[1603,1605,1605],"64956":[1604,1580,1605],"64957":[1606,1580,1581],"64958":[1580,1581,1610],"64959":[1581,1580,1610],"64960":[1605,1580,1610],"64961":[1601,1605,1610],"64962":[1576,1581,1610],"64963":[1603,1605,1605],"64964":[1593,1580,1605],"64965":[1589,1605,1605],"64966":[1587,1582,1610],"64967":[1606,1580,1610],"65008":[1589,1604,1746],"65009":[1602,1604,1746],"65010":[1575,1604,1604,1607],"65011":[1575,1603,1576,1585],"65012":[1605,1581,1605,1583],"65013":[1589,1604,1593,1605],"65014":[1585,1587,1608,1604],"65015":[1593,1604,1610,1607],"65016":[1608,1587,1604,1605],"65017":[1589,1604,1609],"65018":[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],"65019":[1580,1604,32,1580,1604,1575,1604,1607],"65020":[1585,1740,1575,1604],"65040":[44],"65041":[12289],"65043":[58],"65044":[59],"65045":[33],"65046":[63],"65047":[12310],"65048":[12311],"65073":[8212],"65074":[8211],"65075":[95],"65077":[40],"65078":[41],"65079":[123],"65080":[125],"65081":[12308],"65082":[12309],"65083":[12304],"65084":[12305],"65085":[12298],"65086":[12299],"65087":[12296],"65088":[12297],"65089":[12300],"65090":[12301],"65091":[12302],"65092":[12303],"65095":[91],"65096":[93],"65097":[32,773],"65101":[95],"65104":[44],"65105":[12289],"65108":[59],"65109":[58],"65110":[63],"65111":[33],"65112":[8212],"65113":[40],"65114":[41],"65115":[123],"65116":[125],"65117":[12308],"65118":[12309],"65119":[35],"65120":[38],"65121":[42],"65122":[43],"65123":[45],"65124":[60],"65125":[62],"65126":[61],"65128":[92],"65129":[36],"65130":[37],"65131":[64],"65136":[32,1611],"65137":[1600,1611],"65138":[32,1612],"65140":[32,1613],"65142":[32,1614],"65143":[1600,1614],"65144":[32,1615],"65145":[1600,1615],"65146":[32,1616],"65147":[1600,1616],"65148":[32,1617],"65149":[1600,1617],"65150":[32,1618],"65151":[1600,1618],"65152":[1569],"65153":[1570],"65155":[1571],"65157":[1572],"65159":[1573],"65161":[1574],"65165":[1575],"65167":[1576],"65171":[1577],"65173":[1578],"65177":[1579],"65181":[1580],"65185":[1581],"65189":[1582],"65193":[1583],"65195":[1584],"65197":[1585],"65199":[1586],"65201":[1587],"65205":[1588],"65209":[1589],"65213":[1590],"65217":[1591],"65221":[1592],"65225":[1593],"65229":[1594],"65233":[1601],"65237":[1602],"65241":[1603],"65245":[1604],"65249":[1605],"65253":[1606],"65257":[1607],"65261":[1608],"65263":[1609],"65265":[1610],"65269":[1604,1570],"65271":[1604,1571],"65273":[1604,1573],"65275":[1604,1575],"65281":[33],"65282":[34],"65283":[35],"65284":[36],"65285":[37],"65286":[38],"65287":[39],"65288":[40],"65289":[41],"65290":[42],"65291":[43],"65292":[44],"65293":[45],"65294":[46],"65295":[47],"65296":[48],"65297":[49],"65298":[50],"65299":[51],"65300":[52],"65301":[53],"65302":[54],"65303":[55],"65304":[56],"65305":[57],"65306":[58],"65307":[59],"65308":[60],"65309":[61],"65310":[62],"65311":[63],"65312":[64],"65313":[97],"65314":[98],"65315":[99],"65316":[100],"65317":[101],"65318":[102],"65319":[103],"65320":[104],"65321":[105],"65322":[106],"65323":[107],"65324":[108],"65325":[109],"65326":[110],"65327":[111],"65328":[112],"65329":[113],"65330":[114],"65331":[115],"65332":[116],"65333":[117],"65334":[118],"65335":[119],"65336":[120],"65337":[121],"65338":[122],"65339":[91],"65340":[92],"65341":[93],"65342":[94],"65343":[95],"65344":[96],"65345":[97],"65346":[98],"65347":[99],"65348":[100],"65349":[101],"65350":[102],"65351":[103],"65352":[104],"65353":[105],"65354":[106],"65355":[107],"65356":[108],"65357":[109],"65358":[110],"65359":[111],"65360":[112],"65361":[113],"65362":[114],"65363":[115],"65364":[116],"65365":[117],"65366":[118],"65367":[119],"65368":[120],"65369":[121],"65370":[122],"65371":[123],"65372":[124],"65373":[125],"65374":[126],"65375":[10629],"65376":[10630],"65377":[46],"65378":[12300],"65379":[12301],"65380":[12289],"65381":[12539],"65382":[12530],"65383":[12449],"65384":[12451],"65385":[12453],"65386":[12455],"65387":[12457],"65388":[12515],"65389":[12517],"65390":[12519],"65391":[12483],"65392":[12540],"65393":[12450],"65394":[12452],"65395":[12454],"65396":[12456],"65397":[12458],"65398":[12459],"65399":[12461],"65400":[12463],"65401":[12465],"65402":[12467],"65403":[12469],"65404":[12471],"65405":[12473],"65406":[12475],"65407":[12477],"65408":[12479],"65409":[12481],"65410":[12484],"65411":[12486],"65412":[12488],"65413":[12490],"65414":[12491],"65415":[12492],"65416":[12493],"65417":[12494],"65418":[12495],"65419":[12498],"65420":[12501],"65421":[12504],"65422":[12507],"65423":[12510],"65424":[12511],"65425":[12512],"65426":[12513],"65427":[12514],"65428":[12516],"65429":[12518],"65430":[12520],"65431":[12521],"65432":[12522],"65433":[12523],"65434":[12524],"65435":[12525],"65436":[12527],"65437":[12531],"65438":[12441],"65439":[12442],"65441":[4352],"65442":[4353],"65443":[4522],"65444":[4354],"65445":[4524],"65446":[4525],"65447":[4355],"65448":[4356],"65449":[4357],"65450":[4528],"65451":[4529],"65452":[4530],"65453":[4531],"65454":[4532],"65455":[4533],"65456":[4378],"65457":[4358],"65458":[4359],"65459":[4360],"65460":[4385],"65461":[4361],"65462":[4362],"65463":[4363],"65464":[4364],"65465":[4365],"65466":[4366],"65467":[4367],"65468":[4368],"65469":[4369],"65470":[4370],"65474":[4449],"65475":[4450],"65476":[4451],"65477":[4452],"65478":[4453],"65479":[4454],"65482":[4455],"65483":[4456],"65484":[4457],"65485":[4458],"65486":[4459],"65487":[4460],"65490":[4461],"65491":[4462],"65492":[4463],"65493":[4464],"65494":[4465],"65495":[4466],"65498":[4467],"65499":[4468],"65500":[4469],"65504":[162],"65505":[163],"65506":[172],"65507":[32,772],"65508":[166],"65509":[165],"65510":[8361],"65512":[9474],"65513":[8592],"65514":[8593],"65515":[8594],"65516":[8595],"65517":[9632],"65518":[9675],"66560":[66600],"66561":[66601],"66562":[66602],"66563":[66603],"66564":[66604],"66565":[66605],"66566":[66606],"66567":[66607],"66568":[66608],"66569":[66609],"66570":[66610],"66571":[66611],"66572":[66612],"66573":[66613],"66574":[66614],"66575":[66615],"66576":[66616],"66577":[66617],"66578":[66618],"66579":[66619],"66580":[66620],"66581":[66621],"66582":[66622],"66583":[66623],"66584":[66624],"66585":[66625],"66586":[66626],"66587":[66627],"66588":[66628],"66589":[66629],"66590":[66630],"66591":[66631],"66592":[66632],"66593":[66633],"66594":[66634],"66595":[66635],"66596":[66636],"66597":[66637],"66598":[66638],"66599":[66639],"66736":[66776],"66737":[66777],"66738":[66778],"66739":[66779],"66740":[66780],"66741":[66781],"66742":[66782],"66743":[66783],"66744":[66784],"66745":[66785],"66746":[66786],"66747":[66787],"66748":[66788],"66749":[66789],"66750":[66790],"66751":[66791],"66752":[66792],"66753":[66793],"66754":[66794],"66755":[66795],"66756":[66796],"66757":[66797],"66758":[66798],"66759":[66799],"66760":[66800],"66761":[66801],"66762":[66802],"66763":[66803],"66764":[66804],"66765":[66805],"66766":[66806],"66767":[66807],"66768":[66808],"66769":[66809],"66770":[66810],"66771":[66811],"66928":[66967],"66929":[66968],"66930":[66969],"66931":[66970],"66932":[66971],"66933":[66972],"66934":[66973],"66935":[66974],"66936":[66975],"66937":[66976],"66938":[66977],"66940":[66979],"66941":[66980],"66942":[66981],"66943":[66982],"66944":[66983],"66945":[66984],"66946":[66985],"66947":[66986],"66948":[66987],"66949":[66988],"66950":[66989],"66951":[66990],"66952":[66991],"66953":[66992],"66954":[66993],"66956":[66995],"66957":[66996],"66958":[66997],"66959":[66998],"66960":[66999],"66961":[67000],"66962":[67001],"66964":[67003],"66965":[67004],"67457":[720],"67458":[721],"67459":[230],"67460":[665],"67461":[595],"67463":[675],"67464":[43878],"67465":[677],"67466":[676],"67467":[598],"67468":[599],"67469":[7569],"67470":[600],"67471":[606],"67472":[681],"67473":[612],"67474":[610],"67475":[608],"67476":[667],"67477":[295],"67478":[668],"67479":[615],"67480":[644],"67481":[682],"67482":[683],"67483":[620],"67484":[122628],"67485":[42894],"67486":[622],"67487":[122629],"67488":[654],"67489":[122630],"67490":[248],"67491":[630],"67492":[631],"67493":[113],"67494":[634],"67495":[122632],"67496":[637],"67497":[638],"67498":[640],"67499":[680],"67500":[678],"67501":[43879],"67502":[679],"67503":[648],"67504":[11377],"67506":[655],"67507":[673],"67508":[674],"67509":[664],"67510":[448],"67511":[449],"67512":[450],"67513":[122634],"67514":[122654],"68736":[68800],"68737":[68801],"68738":[68802],"68739":[68803],"68740":[68804],"68741":[68805],"68742":[68806],"68743":[68807],"68744":[68808],"68745":[68809],"68746":[68810],"68747":[68811],"68748":[68812],"68749":[68813],"68750":[68814],"68751":[68815],"68752":[68816],"68753":[68817],"68754":[68818],"68755":[68819],"68756":[68820],"68757":[68821],"68758":[68822],"68759":[68823],"68760":[68824],"68761":[68825],"68762":[68826],"68763":[68827],"68764":[68828],"68765":[68829],"68766":[68830],"68767":[68831],"68768":[68832],"68769":[68833],"68770":[68834],"68771":[68835],"68772":[68836],"68773":[68837],"68774":[68838],"68775":[68839],"68776":[68840],"68777":[68841],"68778":[68842],"68779":[68843],"68780":[68844],"68781":[68845],"68782":[68846],"68783":[68847],"68784":[68848],"68785":[68849],"68786":[68850],"71840":[71872],"71841":[71873],"71842":[71874],"71843":[71875],"71844":[71876],"71845":[71877],"71846":[71878],"71847":[71879],"71848":[71880],"71849":[71881],"71850":[71882],"71851":[71883],"71852":[71884],"71853":[71885],"71854":[71886],"71855":[71887],"71856":[71888],"71857":[71889],"71858":[71890],"71859":[71891],"71860":[71892],"71861":[71893],"71862":[71894],"71863":[71895],"71864":[71896],"71865":[71897],"71866":[71898],"71867":[71899],"71868":[71900],"71869":[71901],"71870":[71902],"71871":[71903],"93760":[93792],"93761":[93793],"93762":[93794],"93763":[93795],"93764":[93796],"93765":[93797],"93766":[93798],"93767":[93799],"93768":[93800],"93769":[93801],"93770":[93802],"93771":[93803],"93772":[93804],"93773":[93805],"93774":[93806],"93775":[93807],"93776":[93808],"93777":[93809],"93778":[93810],"93779":[93811],"93780":[93812],"93781":[93813],"93782":[93814],"93783":[93815],"93784":[93816],"93785":[93817],"93786":[93818],"93787":[93819],"93788":[93820],"93789":[93821],"93790":[93822],"93791":[93823],"119134":[119127,119141],"119135":[119128,119141],"119136":[119128,119141,119150],"119137":[119128,119141,119151],"119138":[119128,119141,119152],"119139":[119128,119141,119153],"119140":[119128,119141,119154],"119227":[119225,119141],"119228":[119226,119141],"119229":[119225,119141,119150],"119230":[119226,119141,119150],"119231":[119225,119141,119151],"119232":[119226,119141,119151],"119808":[97],"119809":[98],"119810":[99],"119811":[100],"119812":[101],"119813":[102],"119814":[103],"119815":[104],"119816":[105],"119817":[106],"119818":[107],"119819":[108],"119820":[109],"119821":[110],"119822":[111],"119823":[112],"119824":[113],"119825":[114],"119826":[115],"119827":[116],"119828":[117],"119829":[118],"119830":[119],"119831":[120],"119832":[121],"119833":[122],"119834":[97],"119835":[98],"119836":[99],"119837":[100],"119838":[101],"119839":[102],"119840":[103],"119841":[104],"119842":[105],"119843":[106],"119844":[107],"119845":[108],"119846":[109],"119847":[110],"119848":[111],"119849":[112],"119850":[113],"119851":[114],"119852":[115],"119853":[116],"119854":[117],"119855":[118],"119856":[119],"119857":[120],"119858":[121],"119859":[122],"119860":[97],"119861":[98],"119862":[99],"119863":[100],"119864":[101],"119865":[102],"119866":[103],"119867":[104],"119868":[105],"119869":[106],"119870":[107],"119871":[108],"119872":[109],"119873":[110],"119874":[111],"119875":[112],"119876":[113],"119877":[114],"119878":[115],"119879":[116],"119880":[117],"119881":[118],"119882":[119],"119883":[120],"119884":[121],"119885":[122],"119886":[97],"119887":[98],"119888":[99],"119889":[100],"119890":[101],"119891":[102],"119892":[103],"119894":[105],"119895":[106],"119896":[107],"119897":[108],"119898":[109],"119899":[110],"119900":[111],"119901":[112],"119902":[113],"119903":[114],"119904":[115],"119905":[116],"119906":[117],"119907":[118],"119908":[119],"119909":[120],"119910":[121],"119911":[122],"119912":[97],"119913":[98],"119914":[99],"119915":[100],"119916":[101],"119917":[102],"119918":[103],"119919":[104],"119920":[105],"119921":[106],"119922":[107],"119923":[108],"119924":[109],"119925":[110],"119926":[111],"119927":[112],"119928":[113],"119929":[114],"119930":[115],"119931":[116],"119932":[117],"119933":[118],"119934":[119],"119935":[120],"119936":[121],"119937":[122],"119938":[97],"119939":[98],"119940":[99],"119941":[100],"119942":[101],"119943":[102],"119944":[103],"119945":[104],"119946":[105],"119947":[106],"119948":[107],"119949":[108],"119950":[109],"119951":[110],"119952":[111],"119953":[112],"119954":[113],"119955":[114],"119956":[115],"119957":[116],"119958":[117],"119959":[118],"119960":[119],"119961":[120],"119962":[121],"119963":[122],"119964":[97],"119966":[99],"119967":[100],"119970":[103],"119973":[106],"119974":[107],"119977":[110],"119978":[111],"119979":[112],"119980":[113],"119982":[115],"119983":[116],"119984":[117],"119985":[118],"119986":[119],"119987":[120],"119988":[121],"119989":[122],"119990":[97],"119991":[98],"119992":[99],"119993":[100],"119995":[102],"119997":[104],"119998":[105],"119999":[106],"120000":[107],"120001":[108],"120002":[109],"120003":[110],"120005":[112],"120006":[113],"120007":[114],"120008":[115],"120009":[116],"120010":[117],"120011":[118],"120012":[119],"120013":[120],"120014":[121],"120015":[122],"120016":[97],"120017":[98],"120018":[99],"120019":[100],"120020":[101],"120021":[102],"120022":[103],"120023":[104],"120024":[105],"120025":[106],"120026":[107],"120027":[108],"120028":[109],"120029":[110],"120030":[111],"120031":[112],"120032":[113],"120033":[114],"120034":[115],"120035":[116],"120036":[117],"120037":[118],"120038":[119],"120039":[120],"120040":[121],"120041":[122],"120042":[97],"120043":[98],"120044":[99],"120045":[100],"120046":[101],"120047":[102],"120048":[103],"120049":[104],"120050":[105],"120051":[106],"120052":[107],"120053":[108],"120054":[109],"120055":[110],"120056":[111],"120057":[112],"120058":[113],"120059":[114],"120060":[115],"120061":[116],"120062":[117],"120063":[118],"120064":[119],"120065":[120],"120066":[121],"120067":[122],"120068":[97],"120069":[98],"120071":[100],"120072":[101],"120073":[102],"120074":[103],"120077":[106],"120078":[107],"120079":[108],"120080":[109],"120081":[110],"120082":[111],"120083":[112],"120084":[113],"120086":[115],"120087":[116],"120088":[117],"120089":[118],"120090":[119],"120091":[120],"120092":[121],"120094":[97],"120095":[98],"120096":[99],"120097":[100],"120098":[101],"120099":[102],"120100":[103],"120101":[104],"120102":[105],"120103":[106],"120104":[107],"120105":[108],"120106":[109],"120107":[110],"120108":[111],"120109":[112],"120110":[113],"120111":[114],"120112":[115],"120113":[116],"120114":[117],"120115":[118],"120116":[119],"120117":[120],"120118":[121],"120119":[122],"120120":[97],"120121":[98],"120123":[100],"120124":[101],"120125":[102],"120126":[103],"120128":[105],"120129":[106],"120130":[107],"120131":[108],"120132":[109],"120134":[111],"120138":[115],"120139":[116],"120140":[117],"120141":[118],"120142":[119],"120143":[120],"120144":[121],"120146":[97],"120147":[98],"120148":[99],"120149":[100],"120150":[101],"120151":[102],"120152":[103],"120153":[104],"120154":[105],"120155":[106],"120156":[107],"120157":[108],"120158":[109],"120159":[110],"120160":[111],"120161":[112],"120162":[113],"120163":[114],"120164":[115],"120165":[116],"120166":[117],"120167":[118],"120168":[119],"120169":[120],"120170":[121],"120171":[122],"120172":[97],"120173":[98],"120174":[99],"120175":[100],"120176":[101],"120177":[102],"120178":[103],"120179":[104],"120180":[105],"120181":[106],"120182":[107],"120183":[108],"120184":[109],"120185":[110],"120186":[111],"120187":[112],"120188":[113],"120189":[114],"120190":[115],"120191":[116],"120192":[117],"120193":[118],"120194":[119],"120195":[120],"120196":[121],"120197":[122],"120198":[97],"120199":[98],"120200":[99],"120201":[100],"120202":[101],"120203":[102],"120204":[103],"120205":[104],"120206":[105],"120207":[106],"120208":[107],"120209":[108],"120210":[109],"120211":[110],"120212":[111],"120213":[112],"120214":[113],"120215":[114],"120216":[115],"120217":[116],"120218":[117],"120219":[118],"120220":[119],"120221":[120],"120222":[121],"120223":[122],"120224":[97],"120225":[98],"120226":[99],"120227":[100],"120228":[101],"120229":[102],"120230":[103],"120231":[104],"120232":[105],"120233":[106],"120234":[107],"120235":[108],"120236":[109],"120237":[110],"120238":[111],"120239":[112],"120240":[113],"120241":[114],"120242":[115],"120243":[116],"120244":[117],"120245":[118],"120246":[119],"120247":[120],"120248":[121],"120249":[122],"120250":[97],"120251":[98],"120252":[99],"120253":[100],"120254":[101],"120255":[102],"120256":[103],"120257":[104],"120258":[105],"120259":[106],"120260":[107],"120261":[108],"120262":[109],"120263":[110],"120264":[111],"120265":[112],"120266":[113],"120267":[114],"120268":[115],"120269":[116],"120270":[117],"120271":[118],"120272":[119],"120273":[120],"120274":[121],"120275":[122],"120276":[97],"120277":[98],"120278":[99],"120279":[100],"120280":[101],"120281":[102],"120282":[103],"120283":[104],"120284":[105],"120285":[106],"120286":[107],"120287":[108],"120288":[109],"120289":[110],"120290":[111],"120291":[112],"120292":[113],"120293":[114],"120294":[115],"120295":[116],"120296":[117],"120297":[118],"120298":[119],"120299":[120],"120300":[121],"120301":[122],"120302":[97],"120303":[98],"120304":[99],"120305":[100],"120306":[101],"120307":[102],"120308":[103],"120309":[104],"120310":[105],"120311":[106],"120312":[107],"120313":[108],"120314":[109],"120315":[110],"120316":[111],"120317":[112],"120318":[113],"120319":[114],"120320":[115],"120321":[116],"120322":[117],"120323":[118],"120324":[119],"120325":[120],"120326":[121],"120327":[122],"120328":[97],"120329":[98],"120330":[99],"120331":[100],"120332":[101],"120333":[102],"120334":[103],"120335":[104],"120336":[105],"120337":[106],"120338":[107],"120339":[108],"120340":[109],"120341":[110],"120342":[111],"120343":[112],"120344":[113],"120345":[114],"120346":[115],"120347":[116],"120348":[117],"120349":[118],"120350":[119],"120351":[120],"120352":[121],"120353":[122],"120354":[97],"120355":[98],"120356":[99],"120357":[100],"120358":[101],"120359":[102],"120360":[103],"120361":[104],"120362":[105],"120363":[106],"120364":[107],"120365":[108],"120366":[109],"120367":[110],"120368":[111],"120369":[112],"120370":[113],"120371":[114],"120372":[115],"120373":[116],"120374":[117],"120375":[118],"120376":[119],"120377":[120],"120378":[121],"120379":[122],"120380":[97],"120381":[98],"120382":[99],"120383":[100],"120384":[101],"120385":[102],"120386":[103],"120387":[104],"120388":[105],"120389":[106],"120390":[107],"120391":[108],"120392":[109],"120393":[110],"120394":[111],"120395":[112],"120396":[113],"120397":[114],"120398":[115],"120399":[116],"120400":[117],"120401":[118],"120402":[119],"120403":[120],"120404":[121],"120405":[122],"120406":[97],"120407":[98],"120408":[99],"120409":[100],"120410":[101],"120411":[102],"120412":[103],"120413":[104],"120414":[105],"120415":[106],"120416":[107],"120417":[108],"120418":[109],"120419":[110],"120420":[111],"120421":[112],"120422":[113],"120423":[114],"120424":[115],"120425":[116],"120426":[117],"120427":[118],"120428":[119],"120429":[120],"120430":[121],"120431":[122],"120432":[97],"120433":[98],"120434":[99],"120435":[100],"120436":[101],"120437":[102],"120438":[103],"120439":[104],"120440":[105],"120441":[106],"120442":[107],"120443":[108],"120444":[109],"120445":[110],"120446":[111],"120447":[112],"120448":[113],"120449":[114],"120450":[115],"120451":[116],"120452":[117],"120453":[118],"120454":[119],"120455":[120],"120456":[121],"120457":[122],"120458":[97],"120459":[98],"120460":[99],"120461":[100],"120462":[101],"120463":[102],"120464":[103],"120465":[104],"120466":[105],"120467":[106],"120468":[107],"120469":[108],"120470":[109],"120471":[110],"120472":[111],"120473":[112],"120474":[113],"120475":[114],"120476":[115],"120477":[116],"120478":[117],"120479":[118],"120480":[119],"120481":[120],"120482":[121],"120483":[122],"120484":[305],"120485":[567],"120488":[945],"120489":[946],"120490":[947],"120491":[948],"120492":[949],"120493":[950],"120494":[951],"120495":[952],"120496":[953],"120497":[954],"120498":[955],"120499":[956],"120500":[957],"120501":[958],"120502":[959],"120503":[960],"120504":[961],"120505":[952],"120506":[963],"120507":[964],"120508":[965],"120509":[966],"120510":[967],"120511":[968],"120512":[969],"120513":[8711],"120514":[945],"120515":[946],"120516":[947],"120517":[948],"120518":[949],"120519":[950],"120520":[951],"120521":[952],"120522":[953],"120523":[954],"120524":[955],"120525":[956],"120526":[957],"120527":[958],"120528":[959],"120529":[960],"120530":[961],"120531":[963],"120533":[964],"120534":[965],"120535":[966],"120536":[967],"120537":[968],"120538":[969],"120539":[8706],"120540":[949],"120541":[952],"120542":[954],"120543":[966],"120544":[961],"120545":[960],"120546":[945],"120547":[946],"120548":[947],"120549":[948],"120550":[949],"120551":[950],"120552":[951],"120553":[952],"120554":[953],"120555":[954],"120556":[955],"120557":[956],"120558":[957],"120559":[958],"120560":[959],"120561":[960],"120562":[961],"120563":[952],"120564":[963],"120565":[964],"120566":[965],"120567":[966],"120568":[967],"120569":[968],"120570":[969],"120571":[8711],"120572":[945],"120573":[946],"120574":[947],"120575":[948],"120576":[949],"120577":[950],"120578":[951],"120579":[952],"120580":[953],"120581":[954],"120582":[955],"120583":[956],"120584":[957],"120585":[958],"120586":[959],"120587":[960],"120588":[961],"120589":[963],"120591":[964],"120592":[965],"120593":[966],"120594":[967],"120595":[968],"120596":[969],"120597":[8706],"120598":[949],"120599":[952],"120600":[954],"120601":[966],"120602":[961],"120603":[960],"120604":[945],"120605":[946],"120606":[947],"120607":[948],"120608":[949],"120609":[950],"120610":[951],"120611":[952],"120612":[953],"120613":[954],"120614":[955],"120615":[956],"120616":[957],"120617":[958],"120618":[959],"120619":[960],"120620":[961],"120621":[952],"120622":[963],"120623":[964],"120624":[965],"120625":[966],"120626":[967],"120627":[968],"120628":[969],"120629":[8711],"120630":[945],"120631":[946],"120632":[947],"120633":[948],"120634":[949],"120635":[950],"120636":[951],"120637":[952],"120638":[953],"120639":[954],"120640":[955],"120641":[956],"120642":[957],"120643":[958],"120644":[959],"120645":[960],"120646":[961],"120647":[963],"120649":[964],"120650":[965],"120651":[966],"120652":[967],"120653":[968],"120654":[969],"120655":[8706],"120656":[949],"120657":[952],"120658":[954],"120659":[966],"120660":[961],"120661":[960],"120662":[945],"120663":[946],"120664":[947],"120665":[948],"120666":[949],"120667":[950],"120668":[951],"120669":[952],"120670":[953],"120671":[954],"120672":[955],"120673":[956],"120674":[957],"120675":[958],"120676":[959],"120677":[960],"120678":[961],"120679":[952],"120680":[963],"120681":[964],"120682":[965],"120683":[966],"120684":[967],"120685":[968],"120686":[969],"120687":[8711],"120688":[945],"120689":[946],"120690":[947],"120691":[948],"120692":[949],"120693":[950],"120694":[951],"120695":[952],"120696":[953],"120697":[954],"120698":[955],"120699":[956],"120700":[957],"120701":[958],"120702":[959],"120703":[960],"120704":[961],"120705":[963],"120707":[964],"120708":[965],"120709":[966],"120710":[967],"120711":[968],"120712":[969],"120713":[8706],"120714":[949],"120715":[952],"120716":[954],"120717":[966],"120718":[961],"120719":[960],"120720":[945],"120721":[946],"120722":[947],"120723":[948],"120724":[949],"120725":[950],"120726":[951],"120727":[952],"120728":[953],"120729":[954],"120730":[955],"120731":[956],"120732":[957],"120733":[958],"120734":[959],"120735":[960],"120736":[961],"120737":[952],"120738":[963],"120739":[964],"120740":[965],"120741":[966],"120742":[967],"120743":[968],"120744":[969],"120745":[8711],"120746":[945],"120747":[946],"120748":[947],"120749":[948],"120750":[949],"120751":[950],"120752":[951],"120753":[952],"120754":[953],"120755":[954],"120756":[955],"120757":[956],"120758":[957],"120759":[958],"120760":[959],"120761":[960],"120762":[961],"120763":[963],"120765":[964],"120766":[965],"120767":[966],"120768":[967],"120769":[968],"120770":[969],"120771":[8706],"120772":[949],"120773":[952],"120774":[954],"120775":[966],"120776":[961],"120777":[960],"120778":[989],"120782":[48],"120783":[49],"120784":[50],"120785":[51],"120786":[52],"120787":[53],"120788":[54],"120789":[55],"120790":[56],"120791":[57],"120792":[48],"120793":[49],"120794":[50],"120795":[51],"120796":[52],"120797":[53],"120798":[54],"120799":[55],"120800":[56],"120801":[57],"120802":[48],"120803":[49],"120804":[50],"120805":[51],"120806":[52],"120807":[53],"120808":[54],"120809":[55],"120810":[56],"120811":[57],"120812":[48],"120813":[49],"120814":[50],"120815":[51],"120816":[52],"120817":[53],"120818":[54],"120819":[55],"120820":[56],"120821":[57],"120822":[48],"120823":[49],"120824":[50],"120825":[51],"120826":[52],"120827":[53],"120828":[54],"120829":[55],"120830":[56],"120831":[57],"122928":[1072],"122929":[1073],"122930":[1074],"122931":[1075],"122932":[1076],"122933":[1077],"122934":[1078],"122935":[1079],"122936":[1080],"122937":[1082],"122938":[1083],"122939":[1084],"122940":[1086],"122941":[1087],"122942":[1088],"122943":[1089],"122944":[1090],"122945":[1091],"122946":[1092],"122947":[1093],"122948":[1094],"122949":[1095],"122950":[1096],"122951":[1099],"122952":[1101],"122953":[1102],"122954":[42633],"122955":[1241],"122956":[1110],"122957":[1112],"122958":[1257],"122959":[1199],"122960":[1231],"122961":[1072],"122962":[1073],"122963":[1074],"122964":[1075],"122965":[1076],"122966":[1077],"122967":[1078],"122968":[1079],"122969":[1080],"122970":[1082],"122971":[1083],"122972":[1086],"122973":[1087],"122974":[1089],"122975":[1091],"122976":[1092],"122977":[1093],"122978":[1094],"122979":[1095],"122980":[1096],"122981":[1098],"122982":[1099],"122983":[1169],"122984":[1110],"122985":[1109],"122986":[1119],"122987":[1195],"122988":[42577],"122989":[1201],"125184":[125218],"125185":[125219],"125186":[125220],"125187":[125221],"125188":[125222],"125189":[125223],"125190":[125224],"125191":[125225],"125192":[125226],"125193":[125227],"125194":[125228],"125195":[125229],"125196":[125230],"125197":[125231],"125198":[125232],"125199":[125233],"125200":[125234],"125201":[125235],"125202":[125236],"125203":[125237],"125204":[125238],"125205":[125239],"125206":[125240],"125207":[125241],"125208":[125242],"125209":[125243],"125210":[125244],"125211":[125245],"125212":[125246],"125213":[125247],"125214":[125248],"125215":[125249],"125216":[125250],"125217":[125251],"126464":[1575],"126465":[1576],"126466":[1580],"126467":[1583],"126469":[1608],"126470":[1586],"126471":[1581],"126472":[1591],"126473":[1610],"126474":[1603],"126475":[1604],"126476":[1605],"126477":[1606],"126478":[1587],"126479":[1593],"126480":[1601],"126481":[1589],"126482":[1602],"126483":[1585],"126484":[1588],"126485":[1578],"126486":[1579],"126487":[1582],"126488":[1584],"126489":[1590],"126490":[1592],"126491":[1594],"126492":[1646],"126493":[1722],"126494":[1697],"126495":[1647],"126497":[1576],"126498":[1580],"126500":[1607],"126503":[1581],"126505":[1610],"126506":[1603],"126507":[1604],"126508":[1605],"126509":[1606],"126510":[1587],"126511":[1593],"126512":[1601],"126513":[1589],"126514":[1602],"126516":[1588],"126517":[1578],"126518":[1579],"126519":[1582],"126521":[1590],"126523":[1594],"126530":[1580],"126535":[1581],"126537":[1610],"126539":[1604],"126541":[1606],"126542":[1587],"126543":[1593],"126545":[1589],"126546":[1602],"126548":[1588],"126551":[1582],"126553":[1590],"126555":[1594],"126557":[1722],"126559":[1647],"126561":[1576],"126562":[1580],"126564":[1607],"126567":[1581],"126568":[1591],"126569":[1610],"126570":[1603],"126572":[1605],"126573":[1606],"126574":[1587],"126575":[1593],"126576":[1601],"126577":[1589],"126578":[1602],"126580":[1588],"126581":[1578],"126582":[1579],"126583":[1582],"126585":[1590],"126586":[1592],"126587":[1594],"126588":[1646],"126590":[1697],"126592":[1575],"126593":[1576],"126594":[1580],"126595":[1583],"126596":[1607],"126597":[1608],"126598":[1586],"126599":[1581],"126600":[1591],"126601":[1610],"126603":[1604],"126604":[1605],"126605":[1606],"126606":[1587],"126607":[1593],"126608":[1601],"126609":[1589],"126610":[1602],"126611":[1585],"126612":[1588],"126613":[1578],"126614":[1579],"126615":[1582],"126616":[1584],"126617":[1590],"126618":[1592],"126619":[1594],"126625":[1576],"126626":[1580],"126627":[1583],"126629":[1608],"126630":[1586],"126631":[1581],"126632":[1591],"126633":[1610],"126635":[1604],"126636":[1605],"126637":[1606],"126638":[1587],"126639":[1593],"126640":[1601],"126641":[1589],"126642":[1602],"126643":[1585],"126644":[1588],"126645":[1578],"126646":[1579],"126647":[1582],"126648":[1584],"126649":[1590],"126650":[1592],"126651":[1594],"127233":[48,44],"127234":[49,44],"127235":[50,44],"127236":[51,44],"127237":[52,44],"127238":[53,44],"127239":[54,44],"127240":[55,44],"127241":[56,44],"127242":[57,44],"127248":[40,97,41],"127249":[40,98,41],"127250":[40,99,41],"127251":[40,100,41],"127252":[40,101,41],"127253":[40,102,41],"127254":[40,103,41],"127255":[40,104,41],"127256":[40,105,41],"127257":[40,106,41],"127258":[40,107,41],"127259":[40,108,41],"127260":[40,109,41],"127261":[40,110,41],"127262":[40,111,41],"127263":[40,112,41],"127264":[40,113,41],"127265":[40,114,41],"127266":[40,115,41],"127267":[40,116,41],"127268":[40,117,41],"127269":[40,118,41],"127270":[40,119,41],"127271":[40,120,41],"127272":[40,121,41],"127273":[40,122,41],"127274":[12308,115,12309],"127275":[99],"127276":[114],"127277":[99,100],"127278":[119,122],"127280":[97],"127281":[98],"127282":[99],"127283":[100],"127284":[101],"127285":[102],"127286":[103],"127287":[104],"127288":[105],"127289":[106],"127290":[107],"127291":[108],"127292":[109],"127293":[110],"127294":[111],"127295":[112],"127296":[113],"127297":[114],"127298":[115],"127299":[116],"127300":[117],"127301":[118],"127302":[119],"127303":[120],"127304":[121],"127305":[122],"127306":[104,118],"127307":[109,118],"127308":[115,100],"127309":[115,115],"127310":[112,112,118],"127311":[119,99],"127338":[109,99],"127339":[109,100],"127340":[109,114],"127376":[100,106],"127488":[12411,12363],"127489":[12467,12467],"127490":[12469],"127504":[25163],"127505":[23383],"127506":[21452],"127507":[12487],"127508":[20108],"127509":[22810],"127510":[35299],"127511":[22825],"127512":[20132],"127513":[26144],"127514":[28961],"127515":[26009],"127516":[21069],"127517":[24460],"127518":[20877],"127519":[26032],"127520":[21021],"127521":[32066],"127522":[29983],"127523":[36009],"127524":[22768],"127525":[21561],"127526":[28436],"127527":[25237],"127528":[25429],"127529":[19968],"127530":[19977],"127531":[36938],"127532":[24038],"127533":[20013],"127534":[21491],"127535":[25351],"127536":[36208],"127537":[25171],"127538":[31105],"127539":[31354],"127540":[21512],"127541":[28288],"127542":[26377],"127543":[26376],"127544":[30003],"127545":[21106],"127546":[21942],"127547":[37197],"127552":[12308,26412,12309],"127553":[12308,19977,12309],"127554":[12308,20108,12309],"127555":[12308,23433,12309],"127556":[12308,28857,12309],"127557":[12308,25171,12309],"127558":[12308,30423,12309],"127559":[12308,21213,12309],"127560":[12308,25943,12309],"127568":[24471],"127569":[21487],"130032":[48],"130033":[49],"130034":[50],"130035":[51],"130036":[52],"130037":[53],"130038":[54],"130039":[55],"130040":[56],"130041":[57],"194560":[20029],"194561":[20024],"194562":[20033],"194563":[131362],"194564":[20320],"194565":[20398],"194566":[20411],"194567":[20482],"194568":[20602],"194569":[20633],"194570":[20711],"194571":[20687],"194572":[13470],"194573":[132666],"194574":[20813],"194575":[20820],"194576":[20836],"194577":[20855],"194578":[132380],"194579":[13497],"194580":[20839],"194581":[20877],"194582":[132427],"194583":[20887],"194584":[20900],"194585":[20172],"194586":[20908],"194587":[20917],"194588":[168415],"194589":[20981],"194590":[20995],"194591":[13535],"194592":[21051],"194593":[21062],"194594":[21106],"194595":[21111],"194596":[13589],"194597":[21191],"194598":[21193],"194599":[21220],"194600":[21242],"194601":[21253],"194602":[21254],"194603":[21271],"194604":[21321],"194605":[21329],"194606":[21338],"194607":[21363],"194608":[21373],"194609":[21375],"194612":[133676],"194613":[28784],"194614":[21450],"194615":[21471],"194616":[133987],"194617":[21483],"194618":[21489],"194619":[21510],"194620":[21662],"194621":[21560],"194622":[21576],"194623":[21608],"194624":[21666],"194625":[21750],"194626":[21776],"194627":[21843],"194628":[21859],"194629":[21892],"194631":[21913],"194632":[21931],"194633":[21939],"194634":[21954],"194635":[22294],"194636":[22022],"194637":[22295],"194638":[22097],"194639":[22132],"194640":[20999],"194641":[22766],"194642":[22478],"194643":[22516],"194644":[22541],"194645":[22411],"194646":[22578],"194647":[22577],"194648":[22700],"194649":[136420],"194650":[22770],"194651":[22775],"194652":[22790],"194653":[22810],"194654":[22818],"194655":[22882],"194656":[136872],"194657":[136938],"194658":[23020],"194659":[23067],"194660":[23079],"194661":[23000],"194662":[23142],"194663":[14062],"194665":[23304],"194666":[23358],"194668":[137672],"194669":[23491],"194670":[23512],"194671":[23527],"194672":[23539],"194673":[138008],"194674":[23551],"194675":[23558],"194677":[23586],"194678":[14209],"194679":[23648],"194680":[23662],"194681":[23744],"194682":[23693],"194683":[138724],"194684":[23875],"194685":[138726],"194686":[23918],"194687":[23915],"194688":[23932],"194689":[24033],"194690":[24034],"194691":[14383],"194692":[24061],"194693":[24104],"194694":[24125],"194695":[24169],"194696":[14434],"194697":[139651],"194698":[14460],"194699":[24240],"194700":[24243],"194701":[24246],"194702":[24266],"194703":[172946],"194704":[24318],"194705":[140081],"194707":[33281],"194708":[24354],"194710":[14535],"194711":[144056],"194712":[156122],"194713":[24418],"194714":[24427],"194715":[14563],"194716":[24474],"194717":[24525],"194718":[24535],"194719":[24569],"194720":[24705],"194721":[14650],"194722":[14620],"194723":[24724],"194724":[141012],"194725":[24775],"194726":[24904],"194727":[24908],"194728":[24910],"194729":[24908],"194730":[24954],"194731":[24974],"194732":[25010],"194733":[24996],"194734":[25007],"194735":[25054],"194736":[25074],"194737":[25078],"194738":[25104],"194739":[25115],"194740":[25181],"194741":[25265],"194742":[25300],"194743":[25424],"194744":[142092],"194745":[25405],"194746":[25340],"194747":[25448],"194748":[25475],"194749":[25572],"194750":[142321],"194751":[25634],"194752":[25541],"194753":[25513],"194754":[14894],"194755":[25705],"194756":[25726],"194757":[25757],"194758":[25719],"194759":[14956],"194760":[25935],"194761":[25964],"194762":[143370],"194763":[26083],"194764":[26360],"194765":[26185],"194766":[15129],"194767":[26257],"194768":[15112],"194769":[15076],"194770":[20882],"194771":[20885],"194772":[26368],"194773":[26268],"194774":[32941],"194775":[17369],"194776":[26391],"194777":[26395],"194778":[26401],"194779":[26462],"194780":[26451],"194781":[144323],"194782":[15177],"194783":[26618],"194784":[26501],"194785":[26706],"194786":[26757],"194787":[144493],"194788":[26766],"194789":[26655],"194790":[26900],"194791":[15261],"194792":[26946],"194793":[27043],"194794":[27114],"194795":[27304],"194796":[145059],"194797":[27355],"194798":[15384],"194799":[27425],"194800":[145575],"194801":[27476],"194802":[15438],"194803":[27506],"194804":[27551],"194805":[27578],"194806":[27579],"194807":[146061],"194808":[138507],"194809":[146170],"194810":[27726],"194811":[146620],"194812":[27839],"194813":[27853],"194814":[27751],"194815":[27926],"194816":[27966],"194817":[28023],"194818":[27969],"194819":[28009],"194820":[28024],"194821":[28037],"194822":[146718],"194823":[27956],"194824":[28207],"194825":[28270],"194826":[15667],"194827":[28363],"194828":[28359],"194829":[147153],"194830":[28153],"194831":[28526],"194832":[147294],"194833":[147342],"194834":[28614],"194835":[28729],"194836":[28702],"194837":[28699],"194838":[15766],"194839":[28746],"194840":[28797],"194841":[28791],"194842":[28845],"194843":[132389],"194844":[28997],"194845":[148067],"194846":[29084],"194848":[29224],"194849":[29237],"194850":[29264],"194851":[149000],"194852":[29312],"194853":[29333],"194854":[149301],"194855":[149524],"194856":[29562],"194857":[29579],"194858":[16044],"194859":[29605],"194860":[16056],"194862":[29767],"194863":[29788],"194864":[29809],"194865":[29829],"194866":[29898],"194867":[16155],"194868":[29988],"194869":[150582],"194870":[30014],"194871":[150674],"194872":[30064],"194873":[139679],"194874":[30224],"194875":[151457],"194876":[151480],"194877":[151620],"194878":[16380],"194879":[16392],"194880":[30452],"194881":[151795],"194882":[151794],"194883":[151833],"194884":[151859],"194885":[30494],"194886":[30495],"194888":[30538],"194889":[16441],"194890":[30603],"194891":[16454],"194892":[16534],"194893":[152605],"194894":[30798],"194895":[30860],"194896":[30924],"194897":[16611],"194898":[153126],"194899":[31062],"194900":[153242],"194901":[153285],"194902":[31119],"194903":[31211],"194904":[16687],"194905":[31296],"194906":[31306],"194907":[31311],"194908":[153980],"194909":[154279],"194912":[16898],"194913":[154539],"194914":[31686],"194915":[31689],"194916":[16935],"194917":[154752],"194918":[31954],"194919":[17056],"194920":[31976],"194921":[31971],"194922":[32000],"194923":[155526],"194924":[32099],"194925":[17153],"194926":[32199],"194927":[32258],"194928":[32325],"194929":[17204],"194930":[156200],"194931":[156231],"194932":[17241],"194933":[156377],"194934":[32634],"194935":[156478],"194936":[32661],"194937":[32762],"194938":[32773],"194939":[156890],"194940":[156963],"194941":[32864],"194942":[157096],"194943":[32880],"194944":[144223],"194945":[17365],"194946":[32946],"194947":[33027],"194948":[17419],"194949":[33086],"194950":[23221],"194951":[157607],"194952":[157621],"194953":[144275],"194954":[144284],"194955":[33281],"194956":[33284],"194957":[36766],"194958":[17515],"194959":[33425],"194960":[33419],"194961":[33437],"194962":[21171],"194963":[33457],"194964":[33459],"194965":[33469],"194966":[33510],"194967":[158524],"194968":[33509],"194969":[33565],"194970":[33635],"194971":[33709],"194972":[33571],"194973":[33725],"194974":[33767],"194975":[33879],"194976":[33619],"194977":[33738],"194978":[33740],"194979":[33756],"194980":[158774],"194981":[159083],"194982":[158933],"194983":[17707],"194984":[34033],"194985":[34035],"194986":[34070],"194987":[160714],"194988":[34148],"194989":[159532],"194990":[17757],"194991":[17761],"194992":[159665],"194993":[159954],"194994":[17771],"194995":[34384],"194996":[34396],"194997":[34407],"194998":[34409],"194999":[34473],"195000":[34440],"195001":[34574],"195002":[34530],"195003":[34681],"195004":[34600],"195005":[34667],"195006":[34694],"195008":[34785],"195009":[34817],"195010":[17913],"195011":[34912],"195012":[34915],"195013":[161383],"195014":[35031],"195015":[35038],"195016":[17973],"195017":[35066],"195018":[13499],"195019":[161966],"195020":[162150],"195021":[18110],"195022":[18119],"195023":[35488],"195024":[35565],"195025":[35722],"195026":[35925],"195027":[162984],"195028":[36011],"195029":[36033],"195030":[36123],"195031":[36215],"195032":[163631],"195033":[133124],"195034":[36299],"195035":[36284],"195036":[36336],"195037":[133342],"195038":[36564],"195039":[36664],"195040":[165330],"195041":[165357],"195042":[37012],"195043":[37105],"195044":[37137],"195045":[165678],"195046":[37147],"195047":[37432],"195048":[37591],"195049":[37592],"195050":[37500],"195051":[37881],"195052":[37909],"195053":[166906],"195054":[38283],"195055":[18837],"195056":[38327],"195057":[167287],"195058":[18918],"195059":[38595],"195060":[23986],"195061":[38691],"195062":[168261],"195063":[168474],"195064":[19054],"195065":[19062],"195066":[38880],"195067":[168970],"195068":[19122],"195069":[169110],"195070":[38923],"195072":[38953],"195073":[169398],"195074":[39138],"195075":[19251],"195076":[39209],"195077":[39335],"195078":[39362],"195079":[39422],"195080":[19406],"195081":[170800],"195082":[39698],"195083":[40000],"195084":[40189],"195085":[19662],"195086":[19693],"195087":[40295],"195088":[172238],"195089":[19704],"195090":[172293],"195091":[172558],"195092":[172689],"195093":[40635],"195094":[19798],"195095":[40697],"195096":[40702],"195097":[40709],"195098":[40719],"195099":[40726],"195100":[40763],"195101":[173568]},"bidi_ranges":[[0,8,"BN"],[9,9,"S"],[10,10,"B"],[11,11,"S"],[12,12,"WS"],[13,13,"B"],[14,27,"BN"],[28,30,"B"],[31,31,"S"],[32,32,"WS"],[33,34,"ON"],[35,37,"ET"],[38,42,"ON"],[43,43,"ES"],[44,44,"CS"],[45,45,"ES"],[46,47,"CS"],[48,57,"EN"],[58,58,"CS"],[59,64,"ON"],[65,90,"L"],[91,96,"ON"],[97,122,"L"],[123,126,"ON"],[127,132,"BN"],[133,133,"B"],[134,159,"BN"],[160,160,"CS"],[161,161,"ON"],[162,165,"ET"],[166,169,"ON"],[170,170,"L"],[171,172,"ON"],[173,173,"BN"],[174,175,"ON"],[176,177,"ET"],[178,179,"EN"],[180,180,"ON"],[181,181,"L"],[182,184,"ON"],[185,185,"EN"],[186,186,"L"],[187,191,"ON"],[192,214,"L"],[215,215,"ON"],[216,246,"L"],[247,247,"ON"],[248,696,"L"],[697,698,"ON"],[699,705,"L"],[706,719,"ON"],[720,721,"L"],[722,735,"ON"],[736,740,"L"],[741,749,"ON"],[750,750,"L"],[751,767,"ON"],[768,879,"NSM"],[880,883,"L"],[884,885,"ON"],[886,887,"L"],[890,893,"L"],[894,894,"ON"],[895,895,"L"],[900,901,"ON"],[902,902,"L"],[903,903,"ON"],[904,906,"L"],[908,908,"L"],[910,929,"L"],[931,1013,"L"],[1014,1014,"ON"],[1015,1154,"L"],[1155,1161,"NSM"],[1162,1327,"L"],[1329,1366,"L"],[1369,1417,"L"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1488,1514,"R"],[1519,1524,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1805,"AL"],[1807,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1869,1957,"AL"],[1958,1968,"NSM"],[1969,1969,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2042,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2096,2110,"R"],[2112,2136,"R"],[2137,2139,"NSM"],[2142,2142,"R"],[2144,2154,"AL"],[2160,2190,"AL"],[2192,2193,"AN"],[2200,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2307,2361,"L"],[2362,2362,"NSM"],[2363,2363,"L"],[2364,2364,"NSM"],[2365,2368,"L"],[2369,2376,"NSM"],[2377,2380,"L"],[2381,2381,"NSM"],[2382,2384,"L"],[2385,2391,"NSM"],[2392,2401,"L"],[2402,2403,"NSM"],[2404,2432,"L"],[2433,2433,"NSM"],[2434,2435,"L"],[2437,2444,"L"],[2447,2448,"L"],[2451,2472,"L"],[2474,2480,"L"],[2482,2482,"L"],[2486,2489,"L"],[2492,2492,"NSM"],[2493,2496,"L"],[2497,2500,"NSM"],[2503,2504,"L"],[2507,2508,"L"],[2509,2509,"NSM"],[2510,2510,"L"],[2519,2519,"L"],[2524,2525,"L"],[2527,2529,"L"],[2530,2531,"NSM"],[2534,2545,"L"],[2546,2547,"ET"],[2548,2554,"L"],[2555,2555,"ET"],[2556,2557,"L"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2563,2563,"L"],[2565,2570,"L"],[2575,2576,"L"],[2579,2600,"L"],[2602,2608,"L"],[2610,2611,"L"],[2613,2614,"L"],[2616,2617,"L"],[2620,2620,"NSM"],[2622,2624,"L"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2649,2652,"L"],[2654,2654,"L"],[2662,2671,"L"],[2672,2673,"NSM"],[2674,2676,"L"],[2677,2677,"NSM"],[2678,2678,"L"],[2689,2690,"NSM"],[2691,2691,"L"],[2693,2701,"L"],[2703,2705,"L"],[2707,2728,"L"],[2730,2736,"L"],[2738,2739,"L"],[2741,2745,"L"],[2748,2748,"NSM"],[2749,2752,"L"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2761,2761,"L"],[2763,2764,"L"],[2765,2765,"NSM"],[2768,2768,"L"],[2784,2785,"L"],[2786,2787,"NSM"],[2790,2800,"L"],[2801,2801,"ET"],[2809,2809,"L"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2818,2819,"L"],[2821,2828,"L"],[2831,2832,"L"],[2835,2856,"L"],[2858,2864,"L"],[2866,2867,"L"],[2869,2873,"L"],[2876,2876,"NSM"],[2877,2878,"L"],[2879,2879,"NSM"],[2880,2880,"L"],[2881,2884,"NSM"],[2887,2888,"L"],[2891,2892,"L"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2903,2903,"L"],[2908,2909,"L"],[2911,2913,"L"],[2914,2915,"NSM"],[2918,2935,"L"],[2946,2946,"NSM"],[2947,2947,"L"],[2949,2954,"L"],[2958,2960,"L"],[2962,2965,"L"],[2969,2970,"L"],[2972,2972,"L"],[2974,2975,"L"],[2979,2980,"L"],[2984,2986,"L"],[2990,3001,"L"],[3006,3007,"L"],[3008,3008,"NSM"],[3009,3010,"L"],[3014,3016,"L"],[3018,3020,"L"],[3021,3021,"NSM"],[3024,3024,"L"],[3031,3031,"L"],[3046,3058,"L"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3073,3075,"L"],[3076,3076,"NSM"],[3077,3084,"L"],[3086,3088,"L"],[3090,3112,"L"],[3114,3129,"L"],[3132,3132,"NSM"],[3133,3133,"L"],[3134,3136,"NSM"],[3137,3140,"L"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3160,3162,"L"],[3165,3165,"L"],[3168,3169,"L"],[3170,3171,"NSM"],[3174,3183,"L"],[3191,3191,"L"],[3192,3198,"ON"],[3199,3200,"L"],[3201,3201,"NSM"],[3202,3212,"L"],[3214,3216,"L"],[3218,3240,"L"],[3242,3251,"L"],[3253,3257,"L"],[3260,3260,"NSM"],[3261,3268,"L"],[3270,3272,"L"],[3274,3275,"L"],[3276,3277,"NSM"],[3285,3286,"L"],[3293,3294,"L"],[3296,3297,"L"],[3298,3299,"NSM"],[3302,3311,"L"],[3313,3315,"L"],[3328,3329,"NSM"],[3330,3340,"L"],[3342,3344,"L"],[3346,3386,"L"],[3387,3388,"NSM"],[3389,3392,"L"],[3393,3396,"NSM"],[3398,3400,"L"],[3402,3404,"L"],[3405,3405,"NSM"],[3406,3407,"L"],[3412,3425,"L"],[3426,3427,"NSM"],[3430,3455,"L"],[3457,3457,"NSM"],[3458,3459,"L"],[3461,3478,"L"],[3482,3505,"L"],[3507,3515,"L"],[3517,3517,"L"],[3520,3526,"L"],[3530,3530,"NSM"],[3535,3537,"L"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3544,3551,"L"],[3558,3567,"L"],[3570,3572,"L"],[3585,3632,"L"],[3633,3633,"NSM"],[3634,3635,"L"],[3636,3642,"NSM"],[3647,3647,"ET"],[3648,3654,"L"],[3655,3662,"NSM"],[3663,3675,"L"],[3713,3714,"L"],[3716,3716,"L"],[3718,3722,"L"],[3724,3747,"L"],[3749,3749,"L"],[3751,3760,"L"],[3761,3761,"NSM"],[3762,3763,"L"],[3764,3772,"NSM"],[3773,3773,"L"],[3776,3780,"L"],[3782,3782,"L"],[3784,3790,"NSM"],[3792,3801,"L"],[3804,3807,"L"],[3840,3863,"L"],[3864,3865,"NSM"],[3866,3892,"L"],[3893,3893,"NSM"],[3894,3894,"L"],[3895,3895,"NSM"],[3896,3896,"L"],[3897,3897,"NSM"],[3898,3901,"ON"],[3902,3911,"L"],[3913,3948,"L"],[3953,3966,"NSM"],[3967,3967,"L"],[3968,3972,"NSM"],[3973,3973,"L"],[3974,3975,"NSM"],[3976,3980,"L"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4030,4037,"L"],[4038,4038,"NSM"],[4039,4044,"L"],[4046,4058,"L"],[4096,4140,"L"],[4141,4144,"NSM"],[4145,4145,"L"],[4146,4151,"NSM"],[4152,4152,"L"],[4153,4154,"NSM"],[4155,4156,"L"],[4157,4158,"NSM"],[4159,4183,"L"],[4184,4185,"NSM"],[4186,4189,"L"],[4190,4192,"NSM"],[4193,4208,"L"],[4209,4212,"NSM"],[4213,4225,"L"],[4226,4226,"NSM"],[4227,4228,"L"],[4229,4230,"NSM"],[4231,4236,"L"],[4237,4237,"NSM"],[4238,4252,"L"],[4253,4253,"NSM"],[4254,4293,"L"],[4295,4295,"L"],[4301,4301,"L"],[4304,4680,"L"],[4682,4685,"L"],[4688,4694,"L"],[4696,4696,"L"],[4698,4701,"L"],[4704,4744,"L"],[4746,4749,"L"],[4752,4784,"L"],[4786,4789,"L"],[4792,4798,"L"],[4800,4800,"L"],[4802,4805,"L"],[4808,4822,"L"],[4824,4880,"L"],[4882,4885,"L"],[4888,4954,"L"],[4957,4959,"NSM"],[4960,4988,"L"],[4992,5007,"L"],[5008,5017,"ON"],[5024,5109,"L"],[5112,5117,"L"],[5120,5120,"ON"],[5121,5759,"L"],[5760,5760,"WS"],[5761,5786,"L"],[5787,5788,"ON"],[5792,5880,"L"],[5888,5905,"L"],[5906,5908,"NSM"],[5909,5909,"L"],[5919,5937,"L"],[5938,5939,"NSM"],[5940,5942,"L"],[5952,5969,"L"],[5970,5971,"NSM"],[5984,5996,"L"],[5998,6000,"L"],[6002,6003,"NSM"],[6016,6067,"L"],[6068,6069,"NSM"],[6070,6070,"L"],[6071,6077,"NSM"],[6078,6085,"L"],[6086,6086,"NSM"],[6087,6088,"L"],[6089,6099,"NSM"],[6100,6106,"L"],[6107,6107,"ET"],[6108,6108,"L"],[6109,6109,"NSM"],[6112,6121,"L"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6160,6169,"L"],[6176,6264,"L"],[6272,6276,"L"],[6277,6278,"NSM"],[6279,6312,"L"],[6313,6313,"NSM"],[6314,6314,"L"],[6320,6389,"L"],[6400,6430,"L"],[6432,6434,"NSM"],[6435,6438,"L"],[6439,6440,"NSM"],[6441,6443,"L"],[6448,6449,"L"],[6450,6450,"NSM"],[6451,6456,"L"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6470,6509,"L"],[6512,6516,"L"],[6528,6571,"L"],[6576,6601,"L"],[6608,6618,"L"],[6622,6655,"ON"],[6656,6678,"L"],[6679,6680,"NSM"],[6681,6682,"L"],[6683,6683,"NSM"],[6686,6741,"L"],[6742,6742,"NSM"],[6743,6743,"L"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6753,6753,"L"],[6754,6754,"NSM"],[6755,6756,"L"],[6757,6764,"NSM"],[6765,6770,"L"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6784,6793,"L"],[6800,6809,"L"],[6816,6829,"L"],[6832,6862,"NSM"],[6912,6915,"NSM"],[6916,6963,"L"],[6964,6964,"NSM"],[6965,6965,"L"],[6966,6970,"NSM"],[6971,6971,"L"],[6972,6972,"NSM"],[6973,6977,"L"],[6978,6978,"NSM"],[6979,6988,"L"],[6992,7018,"L"],[7019,7027,"NSM"],[7028,7038,"L"],[7040,7041,"NSM"],[7042,7073,"L"],[7074,7077,"NSM"],[7078,7079,"L"],[7080,7081,"NSM"],[7082,7082,"L"],[7083,7085,"NSM"],[7086,7141,"L"],[7142,7142,"NSM"],[7143,7143,"L"],[7144,7145,"NSM"],[7146,7148,"L"],[7149,7149,"NSM"],[7150,7150,"L"],[7151,7153,"NSM"],[7154,7155,"L"],[7164,7211,"L"],[7212,7219,"NSM"],[7220,7221,"L"],[7222,7223,"NSM"],[7227,7241,"L"],[7245,7304,"L"],[7312,7354,"L"],[7357,7367,"L"],[7376,7378,"NSM"],[7379,7379,"L"],[7380,7392,"NSM"],[7393,7393,"L"],[7394,7400,"NSM"],[7401,7404,"L"],[7405,7405,"NSM"],[7406,7411,"L"],[7412,7412,"NSM"],[7413,7415,"L"],[7416,7417,"NSM"],[7418,7418,"L"],[7424,7615,"L"],[7616,7679,"NSM"],[7680,7957,"L"],[7960,7965,"L"],[7968,8005,"L"],[8008,8013,"L"],[8016,8023,"L"],[8025,8025,"L"],[8027,8027,"L"],[8029,8029,"L"],[8031,8061,"L"],[8064,8116,"L"],[8118,8124,"L"],[8125,8125,"ON"],[8126,8126,"L"],[8127,8129,"ON"],[8130,8132,"L"],[8134,8140,"L"],[8141,8143,"ON"],[8144,8147,"L"],[8150,8155,"L"],[8157,8159,"ON"],[8160,8172,"L"],[8173,8175,"ON"],[8178,8180,"L"],[8182,8188,"L"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8206,8206,"L"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8234,"LRE"],[8235,8235,"RLE"],[8236,8236,"PDF"],[8237,8237,"LRO"],[8238,8238,"RLO"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8293,"BN"],[8294,8294,"LRI"],[8295,8295,"RLI"],[8296,8296,"FSI"],[8297,8297,"PDI"],[8298,8303,"BN"],[8304,8304,"EN"],[8305,8305,"L"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8319,8319,"L"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8336,8348,"L"],[8352,8384,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8450,8450,"L"],[8451,8454,"ON"],[8455,8455,"L"],[8456,8457,"ON"],[8458,8467,"L"],[8468,8468,"ON"],[8469,8469,"L"],[8470,8472,"ON"],[8473,8477,"L"],[8478,8483,"ON"],[8484,8484,"L"],[8485,8485,"ON"],[8486,8486,"L"],[8487,8487,"ON"],[8488,8488,"L"],[8489,8489,"ON"],[8490,8493,"L"],[8494,8494,"ET"],[8495,8505,"L"],[8506,8507,"ON"],[8508,8511,"L"],[8512,8516,"ON"],[8517,8521,"L"],[8522,8525,"ON"],[8526,8527,"L"],[8528,8543,"ON"],[8544,8584,"L"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9014,9082,"L"],[9083,9108,"ON"],[9109,9109,"L"],[9110,9254,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9372,9449,"L"],[9450,9899,"ON"],[9900,9900,"L"],[9901,10239,"ON"],[10240,10495,"L"],[10496,11123,"ON"],[11126,11157,"ON"],[11159,11263,"ON"],[11264,11492,"L"],[11493,11498,"ON"],[11499,11502,"L"],[11503,11505,"NSM"],[11506,11507,"L"],[11513,11519,"ON"],[11520,11557,"L"],[11559,11559,"L"],[11565,11565,"L"],[11568,11623,"L"],[11631,11632,"L"],[11647,11647,"NSM"],[11648,11670,"L"],[11680,11686,"L"],[11688,11694,"L"],[11696,11702,"L"],[11704,11710,"L"],[11712,11718,"L"],[11720,11726,"L"],[11728,11734,"L"],[11736,11742,"L"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12293,12295,"L"],[12296,12320,"ON"],[12321,12329,"L"],[12330,12333,"NSM"],[12334,12335,"L"],[12336,12336,"ON"],[12337,12341,"L"],[12342,12343,"ON"],[12344,12348,"L"],[12349,12351,"ON"],[12353,12438,"L"],[12441,12442,"NSM"],[12443,12444,"ON"],[12445,12447,"L"],[12448,12448,"ON"],[12449,12538,"L"],[12539,12539,"ON"],[12540,12543,"L"],[12549,12591,"L"],[12593,12686,"L"],[12688,12735,"L"],[12736,12771,"ON"],[12783,12783,"ON"],[12784,12828,"L"],[12829,12830,"ON"],[12832,12879,"L"],[12880,12895,"ON"],[12896,12923,"L"],[12924,12926,"ON"],[12927,12976,"L"],[12977,12991,"ON"],[12992,13003,"L"],[13004,13007,"ON"],[13008,13174,"L"],[13175,13178,"ON"],[13179,13277,"L"],[13278,13279,"ON"],[13280,13310,"L"],[13311,13311,"ON"],[13312,19903,"L"],[19904,19967,"ON"],[19968,42124,"L"],[42128,42182,"ON"],[42192,42508,"L"],[42509,42511,"ON"],[42512,42539,"L"],[42560,42606,"L"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42624,42653,"L"],[42654,42655,"NSM"],[42656,42735,"L"],[42736,42737,"NSM"],[42738,42743,"L"],[42752,42785,"ON"],[42786,42887,"L"],[42888,42888,"ON"],[42889,42954,"L"],[42960,42961,"L"],[42963,42963,"L"],[42965,42969,"L"],[42994,43009,"L"],[43010,43010,"NSM"],[43011,43013,"L"],[43014,43014,"NSM"],[43015,43018,"L"],[43019,43019,"NSM"],[43020,43044,"L"],[43045,43046,"NSM"],[43047,43047,"L"],[43048,43051,"ON"],[43052,43052,"NSM"],[43056,43063,"L"],[43064,43065,"ET"],[43072,43123,"L"],[43124,43127,"ON"],[43136,43203,"L"],[43204,43205,"NSM"],[43214,43225,"L"],[43232,43249,"NSM"],[43250,43262,"L"],[43263,43263,"NSM"],[43264,43301,"L"],[43302,43309,"NSM"],[43310,43334,"L"],[43335,43345,"NSM"],[43346,43347,"L"],[43359,43388,"L"],[43392,43394,"NSM"],[43395,43442,"L"],[43443,43443,"NSM"],[43444,43445,"L"],[43446,43449,"NSM"],[43450,43451,"L"],[43452,43453,"NSM"],[43454,43469,"L"],[43471,43481,"L"],[43486,43492,"L"],[43493,43493,"NSM"],[43494,43518,"L"],[43520,43560,"L"],[43561,43566,"NSM"],[43567,43568,"L"],[43569,43570,"NSM"],[43571,43572,"L"],[43573,43574,"NSM"],[43584,43586,"L"],[43587,43587,"NSM"],[43588,43595,"L"],[43596,43596,"NSM"],[43597,43597,"L"],[43600,43609,"L"],[43612,43643,"L"],[43644,43644,"NSM"],[43645,43695,"L"],[43696,43696,"NSM"],[43697,43697,"L"],[43698,43700,"NSM"],[43701,43702,"L"],[43703,43704,"NSM"],[43705,43709,"L"],[43710,43711,"NSM"],[43712,43712,"L"],[43713,43713,"NSM"],[43714,43714,"L"],[43739,43755,"L"],[43756,43757,"NSM"],[43758,43765,"L"],[43766,43766,"NSM"],[43777,43782,"L"],[43785,43790,"L"],[43793,43798,"L"],[43808,43814,"L"],[43816,43822,"L"],[43824,43881,"L"],[43882,43883,"ON"],[43888,44004,"L"],[44005,44005,"NSM"],[44006,44007,"L"],[44008,44008,"NSM"],[44009,44012,"L"],[44013,44013,"NSM"],[44016,44025,"L"],[44032,55203,"L"],[55216,55238,"L"],[55243,55291,"L"],[57344,64109,"L"],[64112,64217,"L"],[64256,64262,"L"],[64275,64279,"L"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64310,"R"],[64312,64316,"R"],[64318,64318,"R"],[64320,64321,"R"],[64323,64324,"R"],[64326,64335,"R"],[64336,64450,"AL"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64914,64967,"AL"],[64975,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65140,"AL"],[65142,65276,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65313,65338,"L"],[65339,65344,"ON"],[65345,65370,"L"],[65371,65381,"ON"],[65382,65470,"L"],[65474,65479,"L"],[65482,65487,"L"],[65490,65495,"L"],[65498,65500,"L"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65536,65547,"L"],[65549,65574,"L"],[65576,65594,"L"],[65596,65597,"L"],[65599,65613,"L"],[65616,65629,"L"],[65664,65786,"L"],[65792,65792,"L"],[65793,65793,"ON"],[65794,65794,"L"],[65799,65843,"L"],[65847,65855,"L"],[65856,65932,"ON"],[65933,65934,"L"],[65936,65948,"ON"],[65952,65952,"ON"],[66000,66044,"L"],[66045,66045,"NSM"],[66176,66204,"L"],[66208,66256,"L"],[66272,66272,"NSM"],[66273,66299,"EN"],[66304,66339,"L"],[66349,66378,"L"],[66384,66421,"L"],[66422,66426,"NSM"],[66432,66461,"L"],[66463,66499,"L"],[66504,66517,"L"],[66560,66717,"L"],[66720,66729,"L"],[66736,66771,"L"],[66776,66811,"L"],[66816,66855,"L"],[66864,66915,"L"],[66927,66938,"L"],[66940,66954,"L"],[66956,66962,"L"],[66964,66965,"L"],[66967,66977,"L"],[66979,66993,"L"],[66995,67001,"L"],[67003,67004,"L"],[67072,67382,"L"],[67392,67413,"L"],[67424,67431,"L"],[67456,67461,"L"],[67463,67504,"L"],[67506,67514,"L"],[67584,67589,"R"],[67592,67592,"R"],[67594,67637,"R"],[67639,67640,"R"],[67644,67644,"R"],[67647,67669,"R"],[67671,67742,"R"],[67751,67759,"R"],[67808,67826,"R"],[67828,67829,"R"],[67835,67867,"R"],[67871,67871,"ON"],[67872,67897,"R"],[67903,67903,"R"],[67968,68023,"R"],[68028,68047,"R"],[68050,68096,"R"],[68097,68099,"NSM"],[68101,68102,"NSM"],[68108,68111,"NSM"],[68112,68115,"R"],[68117,68119,"R"],[68121,68149,"R"],[68152,68154,"NSM"],[68159,68159,"NSM"],[68160,68168,"R"],[68176,68184,"R"],[68192,68255,"R"],[68288,68324,"R"],[68325,68326,"NSM"],[68331,68342,"R"],[68352,68405,"R"],[68409,68415,"ON"],[68416,68437,"R"],[68440,68466,"R"],[68472,68497,"R"],[68505,68508,"R"],[68521,68527,"R"],[68608,68680,"R"],[68736,68786,"R"],[68800,68850,"R"],[68858,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68912,68921,"AN"],[69216,69246,"AN"],[69248,69289,"R"],[69291,69292,"NSM"],[69293,69293,"R"],[69296,69297,"R"],[69373,69375,"NSM"],[69376,69415,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69465,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69513,"R"],[69552,69579,"R"],[69600,69622,"R"],[69632,69632,"L"],[69633,69633,"NSM"],[69634,69687,"L"],[69688,69702,"NSM"],[69703,69709,"L"],[69714,69733,"ON"],[69734,69743,"L"],[69744,69744,"NSM"],[69745,69746,"L"],[69747,69748,"NSM"],[69749,69749,"L"],[69759,69761,"NSM"],[69762,69810,"L"],[69811,69814,"NSM"],[69815,69816,"L"],[69817,69818,"NSM"],[69819,69825,"L"],[69826,69826,"NSM"],[69837,69837,"L"],[69840,69864,"L"],[69872,69881,"L"],[69888,69890,"NSM"],[69891,69926,"L"],[69927,69931,"NSM"],[69932,69932,"L"],[69933,69940,"NSM"],[69942,69959,"L"],[69968,70002,"L"],[70003,70003,"NSM"],[70004,70006,"L"],[70016,70017,"NSM"],[70018,70069,"L"],[70070,70078,"NSM"],[70079,70088,"L"],[70089,70092,"NSM"],[70093,70094,"L"],[70095,70095,"NSM"],[70096,70111,"L"],[70113,70132,"L"],[70144,70161,"L"],[70163,70190,"L"],[70191,70193,"NSM"],[70194,70195,"L"],[70196,70196,"NSM"],[70197,70197,"L"],[70198,70199,"NSM"],[70200,70205,"L"],[70206,70206,"NSM"],[70207,70208,"L"],[70209,70209,"NSM"],[70272,70278,"L"],[70280,70280,"L"],[70282,70285,"L"],[70287,70301,"L"],[70303,70313,"L"],[70320,70366,"L"],[70367,70367,"NSM"],[70368,70370,"L"],[70371,70378,"NSM"],[70384,70393,"L"],[70400,70401,"NSM"],[70402,70403,"L"],[70405,70412,"L"],[70415,70416,"L"],[70419,70440,"L"],[70442,70448,"L"],[70450,70451,"L"],[70453,70457,"L"],[70459,70460,"NSM"],[70461,70463,"L"],[70464,70464,"NSM"],[70465,70468,"L"],[70471,70472,"L"],[70475,70477,"L"],[70480,70480,"L"],[70487,70487,"L"],[70493,70499,"L"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70656,70711,"L"],[70712,70719,"NSM"],[70720,70721,"L"],[70722,70724,"NSM"],[70725,70725,"L"],[70726,70726,"NSM"],[70727,70747,"L"],[70749,70749,"L"],[70750,70750,"NSM"],[70751,70753,"L"],[70784,70834,"L"],[70835,70840,"NSM"],[70841,70841,"L"],[70842,70842,"NSM"],[70843,70846,"L"],[70847,70848,"NSM"],[70849,70849,"L"],[70850,70851,"NSM"],[70852,70855,"L"],[70864,70873,"L"],[71040,71089,"L"],[71090,71093,"NSM"],[71096,71099,"L"],[71100,71101,"NSM"],[71102,71102,"L"],[71103,71104,"NSM"],[71105,71131,"L"],[71132,71133,"NSM"],[71168,71218,"L"],[71219,71226,"NSM"],[71227,71228,"L"],[71229,71229,"NSM"],[71230,71230,"L"],[71231,71232,"NSM"],[71233,71236,"L"],[71248,71257,"L"],[71264,71276,"ON"],[71296,71338,"L"],[71339,71339,"NSM"],[71340,71340,"L"],[71341,71341,"NSM"],[71342,71343,"L"],[71344,71349,"NSM"],[71350,71350,"L"],[71351,71351,"NSM"],[71352,71353,"L"],[71360,71369,"L"],[71424,71450,"L"],[71453,71455,"NSM"],[71456,71457,"L"],[71458,71461,"NSM"],[71462,71462,"L"],[71463,71467,"NSM"],[71472,71494,"L"],[71680,71726,"L"],[71727,71735,"NSM"],[71736,71736,"L"],[71737,71738,"NSM"],[71739,71739,"L"],[71840,71922,"L"],[71935,71942,"L"],[71945,71945,"L"],[71948,71955,"L"],[71957,71958,"L"],[71960,71989,"L"],[71991,71992,"L"],[71995,71996,"NSM"],[71997,71997,"L"],[71998,71998,"NSM"],[71999,72002,"L"],[72003,72003,"NSM"],[72004,72006,"L"],[72016,72025,"L"],[72096,72103,"L"],[72106,72147,"L"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72156,72159,"L"],[72160,72160,"NSM"],[72161,72164,"L"],[72192,72192,"L"],[72193,72198,"NSM"],[72199,72200,"L"],[72201,72202,"NSM"],[72203,72242,"L"],[72243,72248,"NSM"],[72249,72250,"L"],[72251,72254,"NSM"],[72255,72262,"L"],[72263,72263,"NSM"],[72272,72272,"L"],[72273,72278,"NSM"],[72279,72280,"L"],[72281,72283,"NSM"],[72284,72329,"L"],[72330,72342,"NSM"],[72343,72343,"L"],[72344,72345,"NSM"],[72346,72354,"L"],[72368,72440,"L"],[72448,72457,"L"],[72704,72712,"L"],[72714,72751,"L"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72766,72773,"L"],[72784,72812,"L"],[72816,72847,"L"],[72850,72871,"NSM"],[72873,72873,"L"],[72874,72880,"NSM"],[72881,72881,"L"],[72882,72883,"NSM"],[72884,72884,"L"],[72885,72886,"NSM"],[72960,72966,"L"],[72968,72969,"L"],[72971,73008,"L"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73030,73030,"L"],[73031,73031,"NSM"],[73040,73049,"L"],[73056,73061,"L"],[73063,73064,"L"],[73066,73102,"L"],[73104,73105,"NSM"],[73107,73108,"L"],[73109,73109,"NSM"],[73110,73110,"L"],[73111,73111,"NSM"],[73112,73112,"L"],[73120,73129,"L"],[73440,73458,"L"],[73459,73460,"NSM"],[73461,73464,"L"],[73472,73473,"NSM"],[73474,73488,"L"],[73490,73525,"L"],[73526,73530,"NSM"],[73534,73535,"L"],[73536,73536,"NSM"],[73537,73537,"L"],[73538,73538,"NSM"],[73539,73561,"L"],[73648,73648,"L"],[73664,73684,"L"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[73727,74649,"L"],[74752,74862,"L"],[74864,74868,"L"],[74880,75075,"L"],[77712,77810,"L"],[77824,78911,"L"],[78912,78912,"NSM"],[78913,78918,"L"],[78919,78933,"NSM"],[82944,83526,"L"],[92160,92728,"L"],[92736,92766,"L"],[92768,92777,"L"],[92782,92862,"L"],[92864,92873,"L"],[92880,92909,"L"],[92912,92916,"NSM"],[92917,92917,"L"],[92928,92975,"L"],[92976,92982,"NSM"],[92983,92997,"L"],[93008,93017,"L"],[93019,93025,"L"],[93027,93047,"L"],[93053,93071,"L"],[93760,93850,"L"],[93952,94026,"L"],[94031,94031,"NSM"],[94032,94087,"L"],[94095,94098,"NSM"],[94099,94111,"L"],[94176,94177,"L"],[94178,94178,"ON"],[94179,94179,"L"],[94180,94180,"NSM"],[94192,94193,"L"],[94208,100343,"L"],[100352,101589,"L"],[101632,101640,"L"],[110576,110579,"L"],[110581,110587,"L"],[110589,110590,"L"],[110592,110882,"L"],[110898,110898,"L"],[110928,110930,"L"],[110933,110933,"L"],[110948,110951,"L"],[110960,111355,"L"],[113664,113770,"L"],[113776,113788,"L"],[113792,113800,"L"],[113808,113817,"L"],[113820,113820,"L"],[113821,113822,"NSM"],[113823,113823,"L"],[113824,113827,"BN"],[118528,118573,"NSM"],[118576,118598,"NSM"],[118608,118723,"L"],[118784,119029,"L"],[119040,119078,"L"],[119081,119142,"L"],[119143,119145,"NSM"],[119146,119154,"L"],[119155,119162,"BN"],[119163,119170,"NSM"],[119171,119172,"L"],[119173,119179,"NSM"],[119180,119209,"L"],[119210,119213,"NSM"],[119214,119272,"L"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119488,119507,"L"],[119520,119539,"L"],[119552,119638,"ON"],[119648,119672,"L"],[119808,119892,"L"],[119894,119964,"L"],[119966,119967,"L"],[119970,119970,"L"],[119973,119974,"L"],[119977,119980,"L"],[119982,119993,"L"],[119995,119995,"L"],[119997,120003,"L"],[120005,120069,"L"],[120071,120074,"L"],[120077,120084,"L"],[120086,120092,"L"],[120094,120121,"L"],[120123,120126,"L"],[120128,120132,"L"],[120134,120134,"L"],[120138,120144,"L"],[120146,120485,"L"],[120488,120538,"L"],[120539,120539,"ON"],[120540,120596,"L"],[120597,120597,"ON"],[120598,120654,"L"],[120655,120655,"ON"],[120656,120712,"L"],[120713,120713,"ON"],[120714,120770,"L"],[120771,120771,"ON"],[120772,120779,"L"],[120782,120831,"EN"],[120832,121343,"L"],[121344,121398,"NSM"],[121399,121402,"L"],[121403,121452,"NSM"],[121453,121460,"L"],[121461,121461,"NSM"],[121462,121475,"L"],[121476,121476,"NSM"],[121477,121483,"L"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122624,122654,"L"],[122661,122666,"L"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[122928,122989,"L"],[123023,123023,"NSM"],[123136,123180,"L"],[123184,123190,"NSM"],[123191,123197,"L"],[123200,123209,"L"],[123214,123215,"L"],[123536,123565,"L"],[123566,123566,"NSM"],[123584,123627,"L"],[123628,123631,"NSM"],[123632,123641,"L"],[123647,123647,"ET"],[124112,124139,"L"],[124140,124143,"NSM"],[124144,124153,"L"],[124896,124902,"L"],[124904,124907,"L"],[124909,124910,"L"],[124912,124926,"L"],[124928,125124,"R"],[125127,125135,"R"],[125136,125142,"NSM"],[125184,125251,"R"],[125252,125258,"NSM"],[125259,125259,"R"],[125264,125273,"R"],[125278,125279,"R"],[126065,126132,"AL"],[126209,126269,"AL"],[126464,126467,"AL"],[126469,126495,"AL"],[126497,126498,"AL"],[126500,126500,"AL"],[126503,126503,"AL"],[126505,126514,"AL"],[126516,126519,"AL"],[126521,126521,"AL"],[126523,126523,"AL"],[126530,126530,"AL"],[126535,126535,"AL"],[126537,126537,"AL"],[126539,126539,"AL"],[126541,126543,"AL"],[126545,126546,"AL"],[126548,126548,"AL"],[126551,126551,"AL"],[126553,126553,"AL"],[126555,126555,"AL"],[126557,126557,"AL"],[126559,126559,"AL"],[126561,126562,"AL"],[126564,126564,"AL"],[126567,126570,"AL"],[126572,126578,"AL"],[126580,126583,"AL"],[126585,126588,"AL"],[126590,126590,"AL"],[126592,126601,"AL"],[126603,126619,"AL"],[126625,126627,"AL"],[126629,126633,"AL"],[126635,126651,"AL"],[126704,126705,"ON"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127248,127278,"L"],[127279,127279,"ON"],[127280,127337,"L"],[127338,127343,"ON"],[127344,127404,"L"],[127405,127405,"ON"],[127462,127490,"L"],[127504,127547,"L"],[127552,127560,"L"],[127568,127569,"L"],[127584,127589,"ON"],[127744,128727,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128886,"ON"],[128891,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129201,"ON"],[129280,129619,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129672,"ON"],[129680,129725,"ON"],[129727,129733,"ON"],[129742,129755,"ON"],[129760,129768,"ON"],[129776,129784,"ON"],[129792,129938,"ON"],[129940,129994,"ON"],[130032,130041,"EN"],[131070,131071,"BN"],[131072,173791,"L"],[173824,177977,"L"],[177984,178205,"L"],[178208,183969,"L"],[183984,191456,"L"],[191472,192093,"L"],[194560,195101,"L"],[196606,196607,"BN"],[196608,201546,"L"],[201552,205743,"L"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918000,921599,"BN"],[983038,983039,"BN"],[983040,1048573,"L"],[1048574,1048575,"BN"],[1048576,1114109,"L"],[1114110,1114111,"BN"]],"joining_type_ranges":[[173,173,"T"],[768,879,"T"],[1155,1161,"T"],[1425,1469,"T"],[1471,1471,"T"],[1473,1474,"T"],[1476,1477,"T"],[1479,1479,"T"],[1552,1562,"T"],[1564,1564,"T"],[1568,1568,"D"],[1570,1573,"R"],[1574,1574,"D"],[1575,1575,"R"],[1576,1576,"D"],[1577,1577,"R"],[1578,1582,"D"],[1583,1586,"R"],[1587,1599,"D"],[1600,1600,"C"],[1601,1607,"D"],[1608,1608,"R"],[1609,1610,"D"],[1611,1631,"T"],[1646,1647,"D"],[1648,1648,"T"],[1649,1651,"R"],[1653,1655,"R"],[1656,1671,"D"],[1672,1689,"R"],[1690,1727,"D"],[1728,1728,"R"],[1729,1730,"D"],[1731,1739,"R"],[1740,1740,"D"],[1741,1741,"R"],[1742,1742,"D"],[1743,1743,"R"],[1744,1745,"D"],[1746,1747,"R"],[1749,1749,"R"],[1750,1756,"T"],[1759,1764,"T"],[1767,1768,"T"],[1770,1773,"T"],[1774,1775,"R"],[1786,1788,"D"],[1791,1791,"D"],[1807,1807,"T"],[1808,1808,"R"],[1809,1809,"T"],[1810,1812,"D"],[1813,1817,"R"],[1818,1821,"D"],[1822,1822,"R"],[1823,1831,"D"],[1832,1832,"R"],[1833,1833,"D"],[1834,1834,"R"],[1835,1835,"D"],[1836,1836,"R"],[1837,1838,"D"],[1839,1839,"R"],[1840,1866,"T"],[1869,1869,"R"],[1870,1880,"D"],[1881,1883,"R"],[1884,1898,"D"],[1899,1900,"R"],[1901,1904,"D"],[1905,1905,"R"],[1906,1906,"D"],[1907,1908,"R"],[1909,1911,"D"],[1912,1913,"R"],[1914,1919,"D"],[1958,1968,"T"],[1994,2026,"D"],[2027,2035,"T"],[2042,2042,"C"],[2045,2045,"T"],[2070,2073,"T"],[2075,2083,"T"],[2085,2087,"T"],[2089,2093,"T"],[2112,2112,"R"],[2113,2117,"D"],[2118,2119,"R"],[2120,2120,"D"],[2121,2121,"R"],[2122,2131,"D"],[2132,2132,"R"],[2133,2133,"D"],[2134,2136,"R"],[2137,2139,"T"],[2144,2144,"D"],[2146,2149,"D"],[2151,2151,"R"],[2152,2152,"D"],[2153,2154,"R"],[2160,2178,"R"],[2179,2181,"C"],[2182,2182,"D"],[2185,2189,"D"],[2190,2190,"R"],[2200,2207,"T"],[2208,2217,"D"],[2218,2220,"R"],[2222,2222,"R"],[2223,2224,"D"],[2225,2226,"R"],[2227,2232,"D"],[2233,2233,"R"],[2234,2248,"D"],[2250,2273,"T"],[2275,2306,"T"],[2362,2362,"T"],[2364,2364,"T"],[2369,2376,"T"],[2381,2381,"T"],[2385,2391,"T"],[2402,2403,"T"],[2433,2433,"T"],[2492,2492,"T"],[2497,2500,"T"],[2509,2509,"T"],[2530,2531,"T"],[2558,2558,"T"],[2561,2562,"T"],[2620,2620,"T"],[2625,2626,"T"],[2631,2632,"T"],[2635,2637,"T"],[2641,2641,"T"],[2672,2673,"T"],[2677,2677,"T"],[2689,2690,"T"],[2748,2748,"T"],[2753,2757,"T"],[2759,2760,"T"],[2765,2765,"T"],[2786,2787,"T"],[2810,2815,"T"],[2817,2817,"T"],[2876,2876,"T"],[2879,2879,"T"],[2881,2884,"T"],[2893,2893,"T"],[2901,2902,"T"],[2914,2915,"T"],[2946,2946,"T"],[3008,3008,"T"],[3021,3021,"T"],[3072,3072,"T"],[3076,3076,"T"],[3132,3132,"T"],[3134,3136,"T"],[3142,3144,"T"],[3146,3149,"T"],[3157,3158,"T"],[3170,3171,"T"],[3201,3201,"T"],[3260,3260,"T"],[3263,3263,"T"],[3270,3270,"T"],[3276,3277,"T"],[3298,3299,"T"],[3328,3329,"T"],[3387,3388,"T"],[3393,3396,"T"],[3405,3405,"T"],[3426,3427,"T"],[3457,3457,"T"],[3530,3530,"T"],[3538,3540,"T"],[3542,3542,"T"],[3633,3633,"T"],[3636,3642,"T"],[3655,3662,"T"],[3761,3761,"T"],[3764,3772,"T"],[3784,3790,"T"],[3864,3865,"T"],[3893,3893,"T"],[3895,3895,"T"],[3897,3897,"T"],[3953,3966,"T"],[3968,3972,"T"],[3974,3975,"T"],[3981,3991,"T"],[3993,4028,"T"],[4038,4038,"T"],[4141,4144,"T"],[4146,4151,"T"],[4153,4154,"T"],[4157,4158,"T"],[4184,4185,"T"],[4190,4192,"T"],[4209,4212,"T"],[4226,4226,"T"],[4229,4230,"T"],[4237,4237,"T"],[4253,4253,"T"],[4957,4959,"T"],[5906,5908,"T"],[5938,5939,"T"],[5970,5971,"T"],[6002,6003,"T"],[6068,6069,"T"],[6071,6077,"T"],[6086,6086,"T"],[6089,6099,"T"],[6109,6109,"T"],[6151,6151,"D"],[6154,6154,"C"],[6155,6157,"T"],[6159,6159,"T"],[6176,6264,"D"],[6277,6278,"T"],[6279,6312,"D"],[6313,6313,"T"],[6314,6314,"D"],[6432,6434,"T"],[6439,6440,"T"],[6450,6450,"T"],[6457,6459,"T"],[6679,6680,"T"],[6683,6683,"T"],[6742,6742,"T"],[6744,6750,"T"],[6752,6752,"T"],[6754,6754,"T"],[6757,6764,"T"],[6771,6780,"T"],[6783,6783,"T"],[6832,6862,"T"],[6912,6915,"T"],[6964,6964,"T"],[6966,6970,"T"],[6972,6972,"T"],[6978,6978,"T"],[7019,7027,"T"],[7040,7041,"T"],[7074,7077,"T"],[7080,7081,"T"],[7083,7085,"T"],[7142,7142,"T"],[7144,7145,"T"],[7149,7149,"T"],[7151,7153,"T"],[7212,7219,"T"],[7222,7223,"T"],[7376,7378,"T"],[7380,7392,"T"],[7394,7400,"T"],[7405,7405,"T"],[7412,7412,"T"],[7416,7417,"T"],[7616,7679,"T"],[8203,8203,"T"],[8205,8205,"C"],[8206,8207,"T"],[8234,8238,"T"],[8288,8292,"T"],[8298,8303,"T"],[8400,8432,"T"],[11503,11505,"T"],[11647,11647,"T"],[11744,11775,"T"],[12330,12333,"T"],[12441,12442,"T"],[42607,42610,"T"],[42612,42621,"T"],[42654,42655,"T"],[42736,42737,"T"],[43010,43010,"T"],[43014,43014,"T"],[43019,43019,"T"],[43045,43046,"T"],[43052,43052,"T"],[43072,43121,"D"],[43122,43122,"L"],[43204,43205,"T"],[43232,43249,"T"],[43263,43263,"T"],[43302,43309,"T"],[43335,43345,"T"],[43392,43394,"T"],[43443,43443,"T"],[43446,43449,"T"],[43452,43453,"T"],[43493,43493,"T"],[43561,43566,"T"],[43569,43570,"T"],[43573,43574,"T"],[43587,43587,"T"],[43596,43596,"T"],[43644,43644,"T"],[43696,43696,"T"],[43698,43700,"T"],[43703,43704,"T"],[43710,43711,"T"],[43713,43713,"T"],[43756,43757,"T"],[43766,43766,"T"],[44005,44005,"T"],[44008,44008,"T"],[44013,44013,"T"],[64286,64286,"T"],[65024,65039,"T"],[65056,65071,"T"],[65279,65279,"T"],[65529,65531,"T"],[66045,66045,"T"],[66272,66272,"T"],[66422,66426,"T"],[68097,68099,"T"],[68101,68102,"T"],[68108,68111,"T"],[68152,68154,"T"],[68159,68159,"T"],[68288,68292,"D"],[68293,68293,"R"],[68295,68295,"R"],[68297,68298,"R"],[68301,68301,"L"],[68302,68306,"R"],[68307,68310,"D"],[68311,68311,"L"],[68312,68316,"D"],[68317,68317,"R"],[68318,68320,"D"],[68321,68321,"R"],[68324,68324,"R"],[68325,68326,"T"],[68331,68334,"D"],[68335,68335,"R"],[68480,68480,"D"],[68481,68481,"R"],[68482,68482,"D"],[68483,68485,"R"],[68486,68488,"D"],[68489,68489,"R"],[68490,68491,"D"],[68492,68492,"R"],[68493,68493,"D"],[68494,68495,"R"],[68496,68496,"D"],[68497,68497,"R"],[68521,68524,"R"],[68525,68526,"D"],[68864,68864,"L"],[68865,68897,"D"],[68898,68898,"R"],[68899,68899,"D"],[68900,68903,"T"],[69291,69292,"T"],[69373,69375,"T"],[69424,69426,"D"],[69427,69427,"R"],[69428,69444,"D"],[69446,69456,"T"],[69457,69459,"D"],[69460,69460,"R"],[69488,69491,"D"],[69492,69493,"R"],[69494,69505,"D"],[69506,69509,"T"],[69552,69552,"D"],[69554,69555,"D"],[69556,69558,"R"],[69560,69560,"D"],[69561,69562,"R"],[69563,69564,"D"],[69565,69565,"R"],[69566,69567,"D"],[69569,69569,"D"],[69570,69571,"R"],[69572,69572,"D"],[69577,69577,"R"],[69578,69578,"D"],[69579,69579,"L"],[69633,69633,"T"],[69688,69702,"T"],[69744,69744,"T"],[69747,69748,"T"],[69759,69761,"T"],[69811,69814,"T"],[69817,69818,"T"],[69826,69826,"T"],[69888,69890,"T"],[69927,69931,"T"],[69933,69940,"T"],[70003,70003,"T"],[70016,70017,"T"],[70070,70078,"T"],[70089,70092,"T"],[70095,70095,"T"],[70191,70193,"T"],[70196,70196,"T"],[70198,70199,"T"],[70206,70206,"T"],[70209,70209,"T"],[70367,70367,"T"],[70371,70378,"T"],[70400,70401,"T"],[70459,70460,"T"],[70464,70464,"T"],[70502,70508,"T"],[70512,70516,"T"],[70712,70719,"T"],[70722,70724,"T"],[70726,70726,"T"],[70750,70750,"T"],[70835,70840,"T"],[70842,70842,"T"],[70847,70848,"T"],[70850,70851,"T"],[71090,71093,"T"],[71100,71101,"T"],[71103,71104,"T"],[71132,71133,"T"],[71219,71226,"T"],[71229,71229,"T"],[71231,71232,"T"],[71339,71339,"T"],[71341,71341,"T"],[71344,71349,"T"],[71351,71351,"T"],[71453,71455,"T"],[71458,71461,"T"],[71463,71467,"T"],[71727,71735,"T"],[71737,71738,"T"],[71995,71996,"T"],[71998,71998,"T"],[72003,72003,"T"],[72148,72151,"T"],[72154,72155,"T"],[72160,72160,"T"],[72193,72202,"T"],[72243,72248,"T"],[72251,72254,"T"],[72263,72263,"T"],[72273,72278,"T"],[72281,72283,"T"],[72330,72342,"T"],[72344,72345,"T"],[72752,72758,"T"],[72760,72765,"T"],[72767,72767,"T"],[72850,72871,"T"],[72874,72880,"T"],[72882,72883,"T"],[72885,72886,"T"],[73009,73014,"T"],[73018,73018,"T"],[73020,73021,"T"],[73023,73029,"T"],[73031,73031,"T"],[73104,73105,"T"],[73109,73109,"T"],[73111,73111,"T"],[73459,73460,"T"],[73472,73473,"T"],[73526,73530,"T"],[73536,73536,"T"],[73538,73538,"T"],[78896,78912,"T"],[78919,78933,"T"],[92912,92916,"T"],[92976,92982,"T"],[94031,94031,"T"],[94095,94098,"T"],[94180,94180,"T"],[113821,113822,"T"],[113824,113827,"T"],[118528,118573,"T"],[118576,118598,"T"],[119143,119145,"T"],[119155,119170,"T"],[119173,119179,"T"],[119210,119213,"T"],[119362,119364,"T"],[121344,121398,"T"],[121403,121452,"T"],[121461,121461,"T"],[121476,121476,"T"],[121499,121503,"T"],[121505,121519,"T"],[122880,122886,"T"],[122888,122904,"T"],[122907,122913,"T"],[122915,122916,"T"],[122918,122922,"T"],[123023,123023,"T"],[123184,123190,"T"],[123566,123566,"T"],[123628,123631,"T"],[124140,124143,"T"],[125136,125142,"T"],[125184,125251,"D"],[125252,125259,"T"],[917505,917505,"T"],[917536,917631,"T"],[917760,917999,"T"]]} \ No newline at end of file diff --git a/node_modules/idn-hostname/index.d.ts b/node_modules/idn-hostname/index.d.ts deleted file mode 100644 index 40a73f57..00000000 --- a/node_modules/idn-hostname/index.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import punycode = require('punycode/'); - -/** - * Validate a hostname. Returns true or throws a detailed error. - * - * @throws {SyntaxError} - */ -declare function isIdnHostname(hostname: string): true; - -/** - * Returns the ACE hostname or throws a detailed error (it also validates the input) - * - * @throws {SyntaxError} - */ -declare function idnHostname(hostname: string): string; - -/** - * Returns the uts46 mapped label (not hostname) or throws an error if the label - * has dissallowed or unassigned chars. - * - * @throws {SyntaxError} - */ -declare function uts46map(label: string): string; - -declare const IdnHostname: { - isIdnHostname: typeof isIdnHostname; - idnHostname: typeof idnHostname; - uts46map: typeof uts46map; - punycode: typeof punycode; -}; - -export = IdnHostname; diff --git a/node_modules/idn-hostname/index.js b/node_modules/idn-hostname/index.js deleted file mode 100644 index fbedd84e..00000000 --- a/node_modules/idn-hostname/index.js +++ /dev/null @@ -1,172 +0,0 @@ -'use strict'; -// IDNA2008 validator using idnaMappingTableCompact.json -const punycode = require('punycode/'); -const { props, viramas, ranges, mappings, bidi_ranges, joining_type_ranges } = require('./idnaMappingTableCompact.json'); -// --- Error classes (short messages; RFC refs included in message) --- -const throwIdnaContextJError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaContextJError" }); }; -const throwIdnaContextOError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaContextOError" }); }; -const throwIdnaUnicodeError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaUnicodeError" }); }; -const throwIdnaLengthError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaLengthError" }); }; -const throwIdnaSyntaxError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaSyntaxError" }); }; -const throwPunycodeError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "PunycodeError" }); }; -const throwIdnaBidiError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaBidiError" }); }; -// --- constants --- -const ZWNJ = 0x200c; -const ZWJ = 0x200d; -const MIDDLE_DOT = 0x00b7; -const GREEK_KERAIA = 0x0375; -const KATAKANA_MIDDLE_DOT = 0x30fb; -const HEBREW_GERESH = 0x05f3; -const HEBREW_GERSHAYIM = 0x05f4; -// Viramas (used for special ZWJ/ZWNJ acceptance) -const VIRAMAS = new Set(viramas); -// binary range lookup -function getRange(range, key) { - if (!Array.isArray(range) || range.length === 0) return null; - let lb = 0; - let ub = range.length - 1; - while (lb <= ub) { - const mid = (lb + ub) >> 1; - const r = range[mid]; - if (key < r[0]) ub = mid - 1; - else if (key > r[1]) lb = mid + 1; - else return r[2]; - } - return null; -} -// mapping label (disallowed chars were removed from ranges, so undefined means disallowed or unassigned) -function uts46map(label) { - const mappedCps = []; - for (let i = 0; i < label.length; ) { - const cp = label.codePointAt(i); - const prop = props[getRange(ranges, cp)]; - const maps = mappings[String(cp)]; - // mapping cases - if (prop === 'mapped' && Array.isArray(maps) && maps.length) { - for (const mcp of maps) mappedCps.push(mcp); - } else if (prop === 'valid' || prop === 'deviation') { - mappedCps.push(cp); - } else if (prop === 'ignored') { - // drop - } else { - throwIdnaUnicodeError(`${cpHex(cp)} is disallowed in hostname (RFC 5892, UTS #46).`); - } - i += cp > 0xffff ? 2 : 1; - } - // mapped → label - return String.fromCodePoint(...mappedCps); -} -// --- helpers --- -function cpHex(cp) { - return `char '${String.fromCodePoint(cp)}' ` + JSON.stringify('(U+' + cp.toString(16).toUpperCase().padStart(4, '0') + ')'); -} -// main validator -function isIdnHostname(hostname) { - // basic hostname checks - if (typeof hostname !== 'string') throwIdnaSyntaxError('Label must be a string (RFC 5890 §2.3.2.3).'); - // split hostname in labels by the separators defined in uts#46 §2.3 - const rawLabels = hostname.split(/[\x2E\uFF0E\u3002\uFF61]/); - if (rawLabels.some((label) => label.length === 0)) throwIdnaLengthError('Label cannot be empty (consecutive or leading/trailing dot) (RFC 5890 §2.3.2.3).'); - // checks per label (IDNA is defined for labels, not for parts of them and not for complete domain names. RFC 5890 §2.3.2.1) - let aceHostnameLength = 0; - for (const rawLabel of rawLabels) { - // ACE label (xn--) validation: decode and re-encode must match - let label = rawLabel; - if (/^xn--/i.test(rawLabel)) { - if (/[^\p{ASCII}]/u.test(rawLabel)) throwIdnaSyntaxError(`A-label '${rawLabel}' cannot contain non-ASCII character(s) (RFC 5890 §2.3.2.1).`); - const aceBody = rawLabel.slice(4); - try { - label = punycode.decode(aceBody); - } catch (e) { - throwPunycodeError(`Invalid ASCII Compatible Encoding (ACE) of label '${rawLabel}' (RFC 5891 §4.4 → RFC 3492).`); - } - if (!/[^\p{ASCII}]/u.test(label)) throwIdnaSyntaxError(`decoded A-label '${rawLabel}' result U-label '${label}' cannot be empty or all-ASCII character(s) (RFC 5890 §2.3.2.1).`); - if (punycode.encode(label) !== aceBody) throwPunycodeError(`Re-encode mismatch for ASCII Compatible Encoding (ACE) label '${rawLabel}' (RFC 5891 §4.4 → RFC 3492).`); - } - // mapping phase (here because decoded A-label may contain disallowed chars) - label = uts46map(label).normalize('NFC'); - // final ACE label lenght accounting - let aceLabel; - try { - aceLabel = /[^\p{ASCII}]/u.test(label) ? punycode.toASCII(label) : label; - } catch (e) { - throwPunycodeError(`ASCII conversion failed for '${label}' (RFC 3492).`); - } - if (aceLabel.length > 63) throwIdnaLengthError('Final ASCII Compatible Encoding (ACE) label cannot exceed 63 bytes (RFC 5890 §2.3.2.1).'); - aceHostnameLength += aceLabel.length + 1; - // hyphen rules (the other one is covered by bidi) - if (/^-|-$/.test(label)) throwIdnaSyntaxError('Label cannot begin or end with hyphen-minus (RFC 5891 §4.2.3.1).'); - if (label.indexOf('--') === 2) throwIdnaSyntaxError('Label cannot contain consecutive hyphen-minus in the 3rd and 4th positions (RFC 5891 §4.2.3.1).'); - // leading combining marks check (some are not covered by bidi) - if (/^\p{M}$/u.test(String.fromCodePoint(label.codePointAt(0)))) throwIdnaSyntaxError(`Label cannot begin with combining/enclosing mark ${cpHex(label.codePointAt(0))} (RFC 5891 §4.2.3.2).`); - // spread cps for context and bidi checks - const cps = Array.from(label).map((char) => char.codePointAt(0)); - let joinTypes = ''; - let digits = ''; - let bidiClasses = []; - // per-codepoint contextual checks - for (let j = 0; j < cps.length; j++) { - const cp = cps[j]; - // check ContextJ ZWNJ (uses joining types and virama rule) - if (cps.includes(ZWNJ)) { - joinTypes += VIRAMAS.has(cp) ? 'V' : cp === ZWNJ ? 'Z' : getRange(joining_type_ranges, cp) || 'U'; - if (j === cps.length - 1 && /(?![LD][T]*)(?= 0x0660 && cp <= 0x0669) || (cp >= 0x06f0 && cp <= 0x06f9)) digits += (cp < 0x06f0 ? 'a' : 'e' ); - if (j === cps.length - 1 && /^(?=.*a)(?=.*e).*$/.test(digits)) throwIdnaContextOError('Arabic-Indic digits cannot be mixed with Extended Arabic-Indic digits (RFC 5892 Appendix A.8/A.9).'); - // validate bidi - bidiClasses.push(getRange(bidi_ranges, cp)); - if (j === cps.length - 1 && (bidiClasses.includes('R') || bidiClasses.includes('AL'))) { - // order of chars in label (RFC 5890 §2.3.3) - if (bidiClasses[0] === 'R' || bidiClasses[0] === 'AL') { - for (let cls of bidiClasses) if (!['R', 'AL', 'AN', 'EN', 'ET', 'ES', 'CS', 'ON', 'BN', 'NSM'].includes(cls)) throwIdnaBidiError(`'${label}' breaks rule #2: Only R, AL, AN, EN, ET, ES, CS, ON, BN, NSM allowed in label (RFC 5893 §2.2)`); - if (!/(R|AL|EN|AN)(NSM)*$/.test(bidiClasses.join(''))) throwIdnaBidiError(`'${label}' breaks rule #3: label must end with R, AL, EN, or AN, followed by zero or more NSM (RFC 5893 §2.3)`); - if (bidiClasses.includes('EN') && bidiClasses.includes('AN')) throwIdnaBidiError(`'${label}' breaks rule #4: EN and AN cannot be mixed in the same label (RFC 5893 §2.4)`); - } else if (bidiClasses[0] === 'L') { - for (let cls of bidiClasses) if (!['L', 'EN', 'ET', 'ES', 'CS', 'ON', 'BN', 'NSM'].includes(cls)) throwIdnaBidiError(`'${label}' breaks rule #5: Only L, EN, ET, ES, CS, ON, BN, NSM allowed in label (RFC 5893 §2.5)`); - if (!/(L|EN)(NSM)*$/.test(bidiClasses.join(''))) throwIdnaBidiError(`'${label}' breaks rule #6: label must end with L or EN, followed by zero or more NSM (RFC 5893 §2.6)`); - } else { - throwIdnaBidiError(`'${label}' breaks rule #1: label must start with L or R or AL (RFC 5893 §2.1)`); - } - } - } - } - if (aceHostnameLength - 1 > 253) throwIdnaLengthError('Final ASCII Compatible Encoding (ACE) hostname cannot exceed 253 bytes (RFC 5890 → RFC 1034 §3.1).'); - return true; -} -// return ACE hostname if valid -const idnHostname = (string) => - isIdnHostname(string) && - punycode.toASCII( - string - .split('.') - .map((label) => uts46map(label).normalize('NFC')) - .join('.') - ); -// export -module.exports = { isIdnHostname, idnHostname, uts46map, punycode }; diff --git a/node_modules/idn-hostname/package.json b/node_modules/idn-hostname/package.json deleted file mode 100644 index 6d55ee34..00000000 --- a/node_modules/idn-hostname/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "idn-hostname", - "version": "15.1.8", - "description": "An internationalized hostname validator as defined by RFC5890, RFC5891, RFC5892, RFC5893, RFC3492 and UTS#46", - "keywords": [ - "idn-hostname", - "idna", - "validation", - "unicode", - "mapping" - ], - "homepage": "https://github.com/SorinGFS/idn-hostname#readme", - "bugs": { - "url": "https://github.com/SorinGFS/idn-hostname/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/SorinGFS/idn-hostname.git" - }, - "license": "MIT", - "author": "SorinGFS", - "type": "commonjs", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "dependencies": { - "punycode": "^2.3.1" - }, - "devDependencies": { - "@types/punycode": "^2.1.4" - } -} diff --git a/node_modules/idn-hostname/readme.md b/node_modules/idn-hostname/readme.md deleted file mode 100644 index 7634e087..00000000 --- a/node_modules/idn-hostname/readme.md +++ /dev/null @@ -1,302 +0,0 @@ ---- - -title: IDN Hostname - -description: A validator for Internationalized Domain Names (`IDNA`) in conformance with the current standards. - ---- - -## Overview - -This is a validator for Internationalized Domain Names (`IDNA`) in conformance with the current standards (`RFC 5890 - 5891 - 5892 - 5893 - 3492`) and the current adoption level of Unicode (`UTS#46`) in javascript (`15.1.0`). - -**Browser/Engine Support:** Modern browsers (Chrome, Firefox, Safari, Edge) and Node.js (v18+). - -This document explains, in plain terms, what this validator does, which RFC/UTS rules it enforces, what it intentionally **does not** check, and gives some relevant examples so you can see how hostnames are classified. - -The data source for the validator is a `json` constructed as follows: - -- Baseline = Unicode `IdnaMappingTable` with allowed chars (based on props: valid/mapped/deviation/ignored/disallowed). -- Viramas = Unicode `DerivedCombiningClass` with `viramas`(Canonical_Combining_Class=Virama). -- Overlay 1 = Unicode `IdnaMappingTable` for mappings applied on top of the baseline. -- Overlay 2 = Unicode `DerivedJoinTypes` for join types (D,L,R,T,U) applied on top of the baseline. -- Overlay 3 = Unicode `DerivedBidiClass` for bidi classes (L,R,AL,NSM,EN,ES,ET,AN,CS,BN,B,S,WS,ON) applied on top of the baseline. - -## Usage - -**Install:** -```js title="js" -npm i idn-hostname -``` - -**Import the idn-hostname validator:** -```js title="js" -const { isIdnHostname } = require('idn-hostname'); -// the validator is returning true or detailed error -try { - if ( isIdnHostname('abc')) console.log(true); -} catch (error) { - console.log(error.message); -} -``` - -**Import the idn-hostname ACE converter:** -```js title="js" -const { idnHostname } = require('idn-hostname'); -// the idnHostname is returning the ACE hostname or detailed error (it also validates the input) -try { - const idna = idnHostname('abc'); -} catch (error) { - console.log(error.message); -} -``` - -**Import the punycode converter (convenient exposure of punycode functions):** -```js title="js" -const { idnHostname, punycode } = require('idn-hostname'); -// get the unicode version of an ACE hostname or detailed error -try { - const uLabel = punycode.toUnicode(idnHostname('abc')); - // or simply use the punycode API for some needs -} catch (error) { - console.log(error.message); -} -``` - -**Import the UTS46 mapping function:** -```js title="js" -const { uts46map } = require('idn-hostname'); -// the uts46map is returning the uts46 mapped label (not hostname) or an error if label has dissallowed or unassigned chars -try { - const label = uts46map('abc').normalize('NFC'); -} catch (error) { - console.log(error.message); -} -``` - -## Versioning - -Each release will have its `major` and `minor` version identical with the related `unicode` version, and the `minor` version variable. No `major` or `minor` (structural) changes are expected other than a `unicode` version based updated `json` data source. - -## What does (point-by-point) - -1. **Baseline data**: uses the Unicode `IdnaMappingTable` (RFC 5892 / Unicode UCD) decoded into per-code-point classes (PVALID, DISALLOWED, CONTEXTJ, CONTEXTO, UNASSIGNED). - - - Reference: RFC 5892 (IDNA Mapping Table derived from Unicode). - -2. **UTS#46 overlay**: applies UTS#46 statuses/mappings on top of the baseline. Where `UTS#46` marks a code point as `valid`, `mapped`, `deviation`, `ignored` or `disallowed`, those override the baseline for that codepoint. Mappings from `UTS#46` are stored in the `mappings` layer. - - - Reference: `UTS#46` (Unicode IDNA Compatibility Processing). - -3. **Join Types overlay**: uses the Unicode `DerivedJoinTypes` to apply char join types on top of the baseline. Mappings from Join Types are stored in the `joining_type_ranges` layer. - - - Reference: `RFC 5892` (The Unicode Code Points and IDNA). - -4. **BIDI overlay**: uses the Unicode `DerivedBidiClass` to apply BIDI derived classes on top of the baseline. Mappings from BIDI are stored in the `bidi_ranges` layer. - - - Reference: `RFC 5893` (Right-to-Left Scripts for IDNA). - -5. **Compact four-layer data source**: the script uses a compact JSON (`idnaMappingTableCompact.json`) merged from three data sources with: - - - `props` — list of property names (`valid`,`mapped`,`deviation`,`ignored`,`disallowed`), - - `viramas` — list of `virama` codepoints (Canonical_Combining_Class=Virama), - - `ranges` — merged contiguous ranges with a property index, - - `mappings` — map from code point → sequence of code points (for `mapped`/`deviation`), - - `joining_type_ranges` — merged contiguous ranges with a property index. - - `bidi_ranges` — merged contiguous ranges with a property index. - -6. **Mapping phase (at validation time)**: - - - For each input label the validator: - 1. Splits the hostname into labels (by `.` or alternate label separators). Empty labels are rejected. - 2. For each label, maps codepoints according to `mappings` (`valid` and `deviation` are passed as they are, `mapped` are replaced with the corresponding codepoints, `ignored` are ignored, any other chars are triggering `IdnaUnicodeError`). - 3. Normalizes the resulting mapped label with NFC. - 4. Checks length limits (label ≤ 63, full name ≤ 253 octets after ASCII punycode conversion). - 5. Validates label-level rules (leading combining/enclosing marks forbidden, hyphen rules, ACE/punycode re-encode correctness). - 6. Spreads each label into code points for contextual and bidi checks. - 7. Performs contextual checks (CONTEXTJ, CONTEXTO) using the `joining_type_ranges` from compact table (e.g. virama handling for ZWJ/ZWNJ, Catalan middle dot rule, Hebrew geresh/gershayim rule, Katakana middle dot contextual rule, Arabic digit mixing rule). - 8. Checks Bidi rules using the `bidi_ranges` from compact table. - - See the sections below for exact checks and RFC references. - -7. **Punycode / ACE checking**: - - - If a label starts with the ACE prefix `xn--`, the validator will decode the ACE part (using punycode), verify decoding succeeds, and re-encode to verify idempotency (the encoded value must match the original ACE, case-insensitive). - - If punycode decode or re-encode fails, the label is rejected. - - Reference: RFC 5890 §2.3.2.1, RFC 3492 (Punycode). - -8. **Leading/trailing/compressed-hyphens**: - - - Labels cannot start or end with `-` (LDH rule). - - ACE/punycode special rule: labels containing `--` at positions 3–4 (that’s the ACE indicator) and not starting with `xn` are invalid (RFC 5891 §4.2) - -9. **Combining/enclosing marks**: - - - A label may not start with General Category `M` — i.e. combining or enclosing mark at the start of a label is rejected. (RFC 5891 §4.2.3.2) - -10. **Contextual checks (exhaustive requirements from RFC 5892 A.1-A.9 appendices)**: - - - ZWNJ / ZWJ: allowed in context only (CONTEXTJ) (Appendix A.1/A.2, RFC 5892 and PR-37). Implemented checks: - - ZWJ/ZWNJ allowed without other contextual condition if preceded by a virama (a diacritic mark used in many Indic scripts to suppress the inherent vowel that normally follows a consonant). - - ZWNJ (if not preceded by virama) allowed only if joining context matches the RFC rules. - - Middle dot (U+00B7): allowed only between two `l` / `L` (Catalan rule). (RFC 5891 §4.2.3.3; RFC 5892 Appendix A.3) - - Greek keraia (U+0375): must be followed by a Greek letter. (RFC 5892 Appendix A.4) - - Hebrew geresh/gershayim (U+05F3 / U+05F4): must follow a Hebrew letter. (RFC 5892 Appendix A.5/A.6) - - Katakana middle dot (U+30FB): allowed if the label contains at least one character in Hiragana/Katakana/Han. (RFC 5892 Appendix A.7) - - Arabic/Extended Arabic digits: the mix of Arabic-Indic digits (U+0660–U+0669) with Extended Arabic-Indic digits (U+06F0–U+06F9) within the same label is not allowed. (RFC 5892 Appendix A.8/A.9) - -11. **Bidi enforcement**: - - - In the Unicode Bidirectional Algorithm (BiDi), characters are assigned to bidirectional classes that determine their behavior in mixed-direction text. These classes are used by the algorithm to resolve the order of characters. If given input is breaking one of the six Bidi rules the label is rejected. (RFC 5893) - -12. **Total and per-label length**: - - - Total ASCII length (after ASCII conversion of non-ASCII labels) must be ≤ 253 octets. (RFC 5890, RFC 3492) - -13. **Failure handling**: - - - The validator throws short errors (single-line, named exceptions) at the first fatal violation encountered (the smallest error ends the function). Each thrown error includes the RFC/UTS rule reference in its message. - -## What does _not_ do - -- This validator does not support `context` or `locale` specific [Special Casing](https://www.unicode.org/Public/16.0.0/ucd/SpecialCasing.txt) mappings. For such needs some sort of `mapping` must be done before using this validator. -- This validator does not support `UTS#46 useTransitional` backward compatibility flag. -- This validator does not support `UTS#46 STD3 ASCII rules`, when required they can be enforced on separate layer. -- This validator does not attempt to resolve or query DNS — it only validates label syntax/mapping/contextual/bidi rules. - -## Examples - -### PASS examples - -```yaml title="yaml" - - hostname: "a" # single char label - - hostname: "a⁠b" # contains WORD JOINER (U+2060), ignored in IDNA table - - hostname: "example" # multi char label - - hostname: "host123" # label with digits - - hostname: "test-domain" # label with hyphen-minus - - hostname: "my-site123" # label with hyphen-minus and digits - - hostname: "sub.domain" # multi-label - - hostname: "mañana" # contains U+00F1 - - hostname: "xn--maana-pta" # ACE for mañana - - hostname: "bücher" # contains U+00FC - - hostname: "xn--bcher-kva" # ACE for bücher - - hostname: "café" # contains U+00E9 - - hostname: "xn--caf-dma" # ACE for café - - hostname: "straße" # German sharp s; allowed via exceptions - - hostname: "façade" # French ç - - hostname: "élève" # French é and è - - hostname: "Γειά" # Greek - - hostname: "åland" # Swedish å - - hostname: "naïve" # Swedish ï - - hostname: "smörgåsbord" # Swedish ö - - hostname: "пример" # Cyrillic - - hostname: "пример.рф" # multi-label Cyrillic - - hostname: "xn--d1acpjx3f.xn--p1ai" # ACE for Cyrillic - - hostname: "مثال" # Arabic - - hostname: "דוגמה" # Hebrew - - hostname: "예시" # Korean Hangul - - hostname: "ひらがな" # Japanese Hiragana - - hostname: "カタカナ" # Japanese Katakana - - hostname: "例.例" # multi-label Japanese Katakana - - hostname: "例子" # Chinese Han - - hostname: "สาธิต" # Thai - - hostname: "ຕົວຢ່າງ" # Lao - - hostname: "उदाहरण" # Devanagari - - hostname: "क्‍ष" # Devanagari with Virama + ZWJ - - hostname: "क्‌ष" # Devanagari with Virama + ZWNJ - - hostname: "l·l" # Catalan middle dot between 'l' (U+00B7) - - hostname: "L·l" # Catalan middle dot between mixed case 'l' chars - - hostname: "L·L" # Catalan middle dot between 'L' (U+004C) - - hostname: "( "a".repeat(63) ) " # 63 'a's (label length OK) -``` - -### FAIL examples - -```yaml title="yaml" - - hostname: "" # empty hostname - - hostname: "-abc" # leading hyphen forbidden (LDH) - - hostname: "abc-" # trailing hyphen forbidden (LDH) - - hostname: "a b" # contains space - - hostname: "a b" # contains control/tab - - hostname: "a@b" # '@' - - hostname: ".abc" # leading dot → empty label - - hostname: "abc." # trailing dot → empty label (unless FQDN handling expects trailing dot) - - hostname: "a..b" # empty label between dots - - hostname: "a.b..c" # empty label between dots - - hostname: "a#b" # illegal char '#' - - hostname: "a$b" # illegal char '$' - - hostname: "abc/def" # contains slash - - hostname: "a\b" # contains backslash - - hostname: "a%b" # contains percent sign - - hostname: "a^b" # contains caret - - hostname: "a*b" # contains asterisk - - hostname: "a(b)c" # contains parentheses - - hostname: "a=b" # contains equal sign - - hostname: "a+b" # contains plus sign - - hostname: "a,b" # contains comma - - hostname: "a@b" # contains '@' - - hostname: "a;b" # contains semicolon - - hostname: "\n" # contains newline - - hostname: "·" # middle-dot without neighbors - - hostname: "a·" # middle-dot at end - - hostname: "·a" # middle-dot at start - - hostname: "a·l" # middle dot not between two 'l' (Catalan rule) - - hostname: "l·a" # middle dot not between two 'l' - - hostname: "α͵" # Greek keraia not followed by Greek - - hostname: "α͵S" # Greek keraia followed by non-Greek - - hostname: "٠۰" # Arabic-Indic & Extended Arabic-Indic digits mixed - - hostname: ( "a".repeat(64) ) # label length > 63 - - hostname: "￿" # noncharacter (U+FFFF) disallowed in IDNA table - - hostname: "a‌" # contains ZWNJ (U+200C) at end (contextual rules fail) - - hostname: "a‍" # contains ZWJ (U+200D) at end (contextual rules fail) - - hostname: "̀hello" # begins with combining mark (U+0300) - - hostname: "҈hello" # begins with enclosing mark (U+0488) - - hostname: "실〮례" # contains HANGUL SINGLE DOT TONE MARK (U+302E) - - hostname: "control\x01char" # contains control character - - hostname: "abc\u202Edef" # bidi formatting codepoint, disallowed in IDNA table - - hostname: "́" # contains combining mark (U+0301) - - hostname: "؜" # contains Arabic control (control U+061C) - - hostname: "۝" # Arabic end of ayah (control U+06DD) - - hostname: "〯" # Hangul double-dot (U+302F), disallowed in IDNA table - - hostname: "a￰b" # contains noncharacter (U+FFF0) in the middle - - hostname: "emoji😀" # emoji (U+1F600), disallowed in IDNA table - - hostname: "label\uD800" # contains high surrogate on its own - - hostname: "\uDC00label" # contains low surrogate on its own - - hostname: "a‎" # contains left-to-right mark (control formatting) - - hostname: "a‏" # contains right-to-left mark (control formatting) - - hostname: "xn--" # ACE prefix without payload - - hostname: "xn---" # triple hyphen-minus (extra '-') in ACE - - hostname: "xn---abc" # triple hyphen-minus followed by chars - - hostname: "xn--aa--bb" # ACE payload having hyphen-minus in the third and fourth position - - hostname: "xn--xn--double" # ACE payload that is also ACE - - hostname: "xn--X" # invalid punycode (decode fails) - - hostname: "xn--abcナ" # ACE containing non-ASCII char - - hostname: "xn--abc\x00" # ACE containing control/NUL - - hostname: "xn--abc\uFFFF" # ACE containing noncharacter -``` - -:::note - -Far from being exhaustive, the examples are illustrative and chosen to demonstrate rule coverage. Also: -- some of the characters are invisible, -- some unicode codepoints that cannot be represented in `yaml` (those having `\uXXXX`) should be considered as `json`. - -::: - -**References (specs)** - -- `RFC 5890` — Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework. -- `RFC 5891` — IDNA2008: Protocol and Implementation (label rules, contextual rules, ACE considerations). -- `RFC 5892` — IDNA Mapping Table (derived from Unicode). -- `RFC 5893` — Right-to-left Scripts: Bidirectional text handling for domain names. -- `RFC 3492` — Punycode (ACE / punycode algorithm). -- `UTS #46` — Unicode IDNA Compatibility Processing (mappings / deviations / transitional handling). - -:::info - -Links are intentionally not embedded here — use the RFC/UTS numbers to fetch authoritative copies on ietf.org and unicode.org. - -::: - -## Disclaimer - -Some hostnames above are language or script-specific examples — they are provided to exercise the mapping/context rules, not to endorse any particular registration practice. Also, there should be no expectation that results validated by this validator will be automatically accepted by registrants, they may apply their own additional rules on top of those defined by IDNA. diff --git a/node_modules/json-stringify-deterministic/LICENSE.md b/node_modules/json-stringify-deterministic/LICENSE.md deleted file mode 100644 index 6fdd0d27..00000000 --- a/node_modules/json-stringify-deterministic/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright © 2016 Kiko Beats (https://github.com/Kikobeats) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/json-stringify-deterministic/README.md b/node_modules/json-stringify-deterministic/README.md deleted file mode 100644 index aca277dc..00000000 --- a/node_modules/json-stringify-deterministic/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# json-stringify-deterministic - -![Last version](https://img.shields.io/github/tag/Kikobeats/json-stringify-deterministic.svg?style=flat-square) -[![Coverage Status](https://img.shields.io/coveralls/Kikobeats/json-stringify-deterministic.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/json-stringify-deterministic) -[![NPM Status](https://img.shields.io/npm/dm/json-stringify-deterministic.svg?style=flat-square)](https://www.npmjs.org/package/json-stringify-deterministic) - -> Deterministic version of `JSON.stringify()`, so you can get a consistent hash from stringified results. - -Similar to [json-stable-stringify](https://github.com/substack/json-stable-stringify) *but*: - -- No Dependencies. Minimal as possible. -- Better cycles detection. -- Support serialization for object without `.toJSON` (such as `RegExp`). -- Provides built-in TypeScript declarations. - -## Install - -```bash -npm install json-stringify-deterministic --save -``` - -## Usage - -```js -const stringify = require('json-stringify-deterministic') -const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 } - -console.log(stringify(obj)) -// => {"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} -``` - -## API - -### stringify(<obj>, [opts]) - -#### obj - -*Required*
-Type: `object` - -The input `object` to be serialized. - -#### opts - -##### opts.stringify - -Type: `function` -Default: `JSON.stringify` - -Determinate how to stringify primitives values. - -##### opts.cycles - -Type: `boolean` -Default: `false` - -Determinate how to resolve cycles. - -Under `true`, when a cycle is detected, `[Circular]` will be inserted in the node. - -##### opts.compare - -Type: `function` - -Custom comparison function for object keys. - -Your function `opts.compare` is called with these parameters: - -``` js -opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) -``` - -For example, to sort on the object key names in reverse order you could write: - -``` js -const stringify = require('json-stringify-deterministic') - -const obj = { c: 8, b: [{z: 6,y: 5,x: 4}, 7], a: 3 } -const objSerializer = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1 -}) - -console.log(objSerializer) -// => {"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} -``` - -Or if you wanted to sort on the object values in reverse order, you could write: - -```js -const stringify = require('json-stringify-deterministic') - -const obj = { d: 6, c: 5, b: [{ z: 3, y: 2, x: 1 }, 9], a: 10 } -const objtSerializer = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1 -}) - -console.log(objtSerializer) -// => {"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} -``` - -##### opts.space - -Type: `string`
-Default: `''` - -If you specify `opts.space`, it will indent the output for pretty-printing. - -Valid values are strings (e.g. `{space: \t}`). For example: - -```js -const stringify = require('json-stringify-deterministic') - -const obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } } -const objSerializer = stringify(obj, { space: ' ' }) -console.log(objSerializer) -// => { -// "a": { -// "and": [ -// 1, -// 2, -// 3 -// ], -// "foo": "bar" -// }, -// "b": 1 -// } -``` - -##### opts.replacer - -Type: `function`
- -The replacer parameter is a function `opts.replacer(key, value)` that behaves -the same as the replacer -[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter). - -## Related - -- [sort-keys-recursive](https://github.com/Kikobeats/sort-keys-recursive): Sort the keys of an array/object recursively. - -## License - -MIT © [Kiko Beats](https://github.com/Kikobeats). diff --git a/node_modules/json-stringify-deterministic/package.json b/node_modules/json-stringify-deterministic/package.json deleted file mode 100644 index 76ab7a65..00000000 --- a/node_modules/json-stringify-deterministic/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "name": "json-stringify-deterministic", - "description": "deterministic version of JSON.stringify() so you can get a consistent hash from stringified results.", - "homepage": "https://github.com/Kikobeats/json-stringify-deterministic", - "version": "1.0.12", - "types": "./lib/index.d.ts", - "main": "lib", - "author": { - "email": "josefrancisco.verdu@gmail.com", - "name": "Kiko Beats", - "url": "https://github.com/Kikobeats" - }, - "contributors": [ - { - "name": "Junxiao Shi", - "email": "sunnylandh@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/kikobeats/json-stringify-deterministic.git" - }, - "bugs": { - "url": "https://github.com/Kikobeats/json-stringify-deterministic/issues" - }, - "keywords": [ - "deterministic", - "hash", - "json", - "sort", - "stable", - "stringify" - ], - "devDependencies": { - "@commitlint/cli": "latest", - "@commitlint/config-conventional": "latest", - "@ksmithut/prettier-standard": "latest", - "c8": "latest", - "ci-publish": "latest", - "conventional-github-releaser": "latest", - "finepack": "latest", - "git-authors-cli": "latest", - "mocha": "latest", - "nano-staged": "latest", - "npm-check-updates": "latest", - "should": "latest", - "simple-git-hooks": "latest", - "standard": "latest", - "standard-markdown": "latest", - "standard-version": "latest" - }, - "engines": { - "node": ">= 4" - }, - "files": [ - "index.js", - "lib" - ], - "scripts": { - "clean": "rm -rf node_modules", - "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "lint": "standard && standard-markdown", - "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)", - "prerelease": "npm run update:check && npm run contributors", - "pretest": "npm run lint", - "release": "standard-version -a", - "release:github": "conventional-github-releaser -p angular", - "release:tags": "git push --follow-tags origin HEAD:master", - "test": "c8 mocha --require should", - "update": "ncu -u", - "update:check": "ncu -- --error-level 2" - }, - "license": "MIT", - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "nano-staged": { - "*.js": [ - "prettier-standard" - ], - "*.md": [ - "standard-markdown" - ], - "package.json": [ - "finepack" - ] - }, - "simple-git-hooks": { - "commit-msg": "npx commitlint --edit", - "pre-commit": "npx nano-staged" - }, - "standard": { - "globals": [ - "describe", - "it" - ] - } -} diff --git a/node_modules/jsonc-parser/CHANGELOG.md b/node_modules/jsonc-parser/CHANGELOG.md deleted file mode 100644 index 3414a3f1..00000000 --- a/node_modules/jsonc-parser/CHANGELOG.md +++ /dev/null @@ -1,76 +0,0 @@ -3.3.0 2022-06-24 -================= -- `JSONVisitor.onObjectBegin` and `JSONVisitor.onArrayBegin` can now return `false` to instruct the visitor that no children should be visited. - - -3.2.0 2022-08-30 -================= -- update the version of the bundled Javascript files to `es2020`. -- include all `const enum` values in the bundled JavaScript files (`ScanError`, `SyntaxKind`, `ParseErrorCode`). - -3.1.0 2022-07-07 -================== - * added new API `FormattingOptions.keepLines` : It leaves the initial line positions in the formatting. - -3.0.0 2020-11-13 -================== - * fixed API spec for `parseTree`. Can return `undefine` for empty input. - * added new API `FormattingOptions.insertFinalNewline`. - - -2.3.0 2020-07-03 -================== - * new API `ModificationOptions.isArrayInsertion`: If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then `modify` will insert a new item at that location instead of overwriting its contents. - * `ModificationOptions.formattingOptions` is now optional. If not set, newly inserted content will not be formatted. - - -2.2.0 2019-10-25 -================== - * added `ParseOptions.allowEmptyContent`. Default is `false`. - * new API `getNodeType`: Returns the type of a value returned by parse. - * `parse`: Fix issue with empty property name - -2.1.0 2019-03-29 -================== - * `JSONScanner` and `JSONVisitor` return lineNumber / character. - -2.0.0 2018-04-12 -================== - * renamed `Node.columnOffset` to `Node.colonOffset` - * new API `getNodePath`: Gets the JSON path of the given JSON DOM node - * new API `findNodeAtOffset`: Finds the most inner node at the given offset. If `includeRightBound` is set, also finds nodes that end at the given offset. - -1.0.3 2018-03-07 -================== - * provide ems modules - -1.0.2 2018-03-05 -================== - * added the `visit.onComment` API, reported when comments are allowed. - * added the `ParseErrorCode.InvalidCommentToken` enum value, reported when comments are disallowed. - -1.0.1 -================== - * added the `format` API: computes edits to format a JSON document. - * added the `modify` API: computes edits to insert, remove or replace a property or value in a JSON document. - * added the `allyEdits` API: applies edits to a document - -1.0.0 -================== - * remove nls dependency (remove `getParseErrorMessage`) - -0.4.2 / 2017-05-05 -================== - * added `ParseError.offset` & `ParseError.length` - -0.4.1 / 2017-04-02 -================== - * added `ParseOptions.allowTrailingComma` - -0.4.0 / 2017-02-23 -================== - * fix for `getLocation`. Now `getLocation` inside an object will always return a property from inside that property. Can be empty string if the object has no properties or if the offset is before a actual property `{ "a": { | }} will return location ['a', ' ']` - -0.3.0 / 2017-01-17 -================== - * Updating to typescript 2.0 \ No newline at end of file diff --git a/node_modules/jsonc-parser/LICENSE.md b/node_modules/jsonc-parser/LICENSE.md deleted file mode 100644 index f54f08dc..00000000 --- a/node_modules/jsonc-parser/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jsonc-parser/README.md b/node_modules/jsonc-parser/README.md deleted file mode 100644 index d569b706..00000000 --- a/node_modules/jsonc-parser/README.md +++ /dev/null @@ -1,364 +0,0 @@ -# jsonc-parser -Scanner and parser for JSON with comments. - -[![npm Package](https://img.shields.io/npm/v/jsonc-parser.svg?style=flat-square)](https://www.npmjs.org/package/jsonc-parser) -[![NPM Downloads](https://img.shields.io/npm/dm/jsonc-parser.svg)](https://npmjs.org/package/jsonc-parser) -[![Build Status](https://github.com/microsoft/node-jsonc-parser/workflows/Tests/badge.svg)](https://github.com/microsoft/node-jsonc-parser/workflows/Tests) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) - -Why? ----- -JSONC is JSON with JavaScript style comments. This node module provides a scanner and fault tolerant parser that can process JSONC but is also useful for standard JSON. - - the *scanner* tokenizes the input string into tokens and token offsets - - the *visit* function implements a 'SAX' style parser with callbacks for the encountered properties and values. - - the *parseTree* function computes a hierarchical DOM with offsets representing the encountered properties and values. - - the *parse* function evaluates the JavaScript object represented by JSON string in a fault tolerant fashion. - - the *getLocation* API returns a location object that describes the property or value located at a given offset in a JSON document. - - the *findNodeAtLocation* API finds the node at a given location path in a JSON DOM. - - the *format* API computes edits to format a JSON document. - - the *modify* API computes edits to insert, remove or replace a property or value in a JSON document. - - the *applyEdits* API applies edits to a document. - -Installation ------------- - -``` -npm install --save jsonc-parser -``` - -API ---- - -### Scanner: -```typescript - -/** - * Creates a JSON scanner on the given text. - * If ignoreTrivia is set, whitespaces or comments are ignored. - */ -export function createScanner(text: string, ignoreTrivia: boolean = false): JSONScanner; - -/** - * The scanner object, representing a JSON scanner at a position in the input string. - */ -export interface JSONScanner { - /** - * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. - */ - setPosition(pos: number): any; - /** - * Read the next token. Returns the token code. - */ - scan(): SyntaxKind; - /** - * Returns the zero-based current scan position, which is after the last read token. - */ - getPosition(): number; - /** - * Returns the last read token. - */ - getToken(): SyntaxKind; - /** - * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. - */ - getTokenValue(): string; - /** - * The zero-based start offset of the last read token. - */ - getTokenOffset(): number; - /** - * The length of the last read token. - */ - getTokenLength(): number; - /** - * The zero-based start line number of the last read token. - */ - getTokenStartLine(): number; - /** - * The zero-based start character (column) of the last read token. - */ - getTokenStartCharacter(): number; - /** - * An error code of the last scan. - */ - getTokenError(): ScanError; -} -``` - -### Parser: -```typescript - -export interface ParseOptions { - disallowComments?: boolean; - allowTrailingComma?: boolean; - allowEmptyContent?: boolean; -} -/** - * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. - * Therefore always check the errors list to find out if the input was valid. - */ -export declare function parse(text: string, errors?: {error: ParseErrorCode;}[], options?: ParseOptions): any; - -/** - * Parses the given text and invokes the visitor functions for each object, array and literal reached. - */ -export declare function visit(text: string, visitor: JSONVisitor, options?: ParseOptions): any; - -/** - * Visitor called by {@linkcode visit} when parsing JSON. - * - * The visitor functions have the following common parameters: - * - `offset`: Global offset within the JSON document, starting at 0 - * - `startLine`: Line number, starting at 0 - * - `startCharacter`: Start character (column) within the current line, starting at 0 - * - * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the - * current `JSONPath` within the document. - */ -export interface JSONVisitor { - /** - * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. - * When `false` is returned, the array items will not be visited. - */ - onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void | boolean; - - /** - * Invoked when a property is encountered. The offset and length represent the location of the property name. - * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the - * property name yet. - */ - onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; - /** - * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. - */ - onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; - /** - * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. - * When `false` is returned, the array items will not be visited.* - */ - onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void | boolean; - /** - * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. - */ - onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; - /** - * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. - */ - onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; - /** - * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. - */ - onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; - /** - * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. - */ - onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; - /** - * Invoked on an error. - */ - onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; -} - -/** - * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. - */ -export declare function parseTree(text: string, errors?: ParseError[], options?: ParseOptions): Node | undefined; - -export declare type NodeType = "object" | "array" | "property" | "string" | "number" | "boolean" | "null"; -export interface Node { - type: NodeType; - value?: any; - offset: number; - length: number; - colonOffset?: number; - parent?: Node; - children?: Node[]; -} - -``` - -### Utilities: -```typescript -/** - * Takes JSON with JavaScript-style comments and remove - * them. Optionally replaces every none-newline character - * of comments with a replaceCharacter - */ -export declare function stripComments(text: string, replaceCh?: string): string; - -/** - * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. - */ -export declare function getLocation(text: string, position: number): Location; - -/** - * A {@linkcode JSONPath} segment. Either a string representing an object property name - * or a number (starting at 0) for array indices. - */ -export declare type Segment = string | number; -export declare type JSONPath = Segment[]; -export interface Location { - /** - * The previous property key or literal value (string, number, boolean or null) or undefined. - */ - previousNode?: Node; - /** - * The path describing the location in the JSON document. The path consists of a sequence strings - * representing an object property or numbers for array indices. - */ - path: JSONPath; - /** - * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). - * '*' will match a single segment, of any property name or index. - * '**' will match a sequence of segments or no segment, of any property name or index. - */ - matches: (patterns: JSONPath) => boolean; - /** - * If set, the location's offset is at a property key. - */ - isAtPropertyKey: boolean; -} - -/** - * Finds the node at the given path in a JSON DOM. - */ -export function findNodeAtLocation(root: Node, path: JSONPath): Node | undefined; - -/** - * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. - */ -export function findNodeAtOffset(root: Node, offset: number, includeRightBound?: boolean) : Node | undefined; - -/** - * Gets the JSON path of the given JSON DOM node - */ -export function getNodePath(node: Node): JSONPath; - -/** - * Evaluates the JavaScript object of the given JSON DOM node - */ -export function getNodeValue(node: Node): any; - -/** - * Computes the edit operations needed to format a JSON document. - * - * @param documentText The input text - * @param range The range to format or `undefined` to format the full content - * @param options The formatting options - * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. - * To apply the edit operations to the input, use {@linkcode applyEdits}. - */ -export function format(documentText: string, range: Range, options: FormattingOptions): EditResult; - -/** - * Computes the edit operations needed to modify a value in the JSON document. - * - * @param documentText The input text - * @param path The path of the value to change. The path represents either to the document root, a property or an array item. - * If the path points to an non-existing property or item, it will be created. - * @param value The new value for the specified property or item. If the value is undefined, - * the property or item will be removed. - * @param options Options - * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. - * To apply the edit operations to the input, use {@linkcode applyEdits}. - */ -export function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; - -/** - * Applies edits to an input string. - * @param text The input text - * @param edits Edit operations following the format described in {@linkcode EditResult}. - * @returns The text with the applied edits. - * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. - */ -export function applyEdits(text: string, edits: EditResult): string; - -/** - * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. - * It consist of one or more edits describing insertions, replacements or removals of text segments. - * * The offsets of the edits refer to the original state of the document. - * * No two edits change or remove the same range of text in the original document. - * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. - * * The order in the array defines which edit is applied first. - * To apply an edit result use {@linkcode applyEdits}. - * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. - */ -export type EditResult = Edit[]; - -/** - * Represents a text modification - */ -export interface Edit { - /** - * The start offset of the modification. - */ - offset: number; - /** - * The length of the modification. Must not be negative. Empty length represents an *insert*. - */ - length: number; - /** - * The new content. Empty content represents a *remove*. - */ - content: string; -} - -/** - * A text range in the document -*/ -export interface Range { - /** - * The start offset of the range. - */ - offset: number; - /** - * The length of the range. Must not be negative. - */ - length: number; -} - -/** - * Options used by {@linkcode format} when computing the formatting edit operations - */ -export interface FormattingOptions { - /** - * If indentation is based on spaces (`insertSpaces` = true), then what is the number of spaces that make an indent? - */ - tabSize: number; - /** - * Is indentation based on spaces? - */ - insertSpaces: boolean; - /** - * The default 'end of line' character - */ - eol: string; -} - -/** - * Options used by {@linkcode modify} when computing the modification edit operations - */ -export interface ModificationOptions { - /** - * Formatting options. If undefined, the newly inserted code will be inserted unformatted. - */ - formattingOptions?: FormattingOptions; - /** - * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then - * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. - */ - isArrayInsertion?: boolean; - /** - * Optional function to define the insertion index given an existing list of properties. - */ - getInsertionIndex?: (properties: string[]) => number; -} -``` - - -License -------- - -(MIT License) - -Copyright 2018, Microsoft diff --git a/node_modules/jsonc-parser/SECURITY.md b/node_modules/jsonc-parser/SECURITY.md deleted file mode 100644 index f7b89984..00000000 --- a/node_modules/jsonc-parser/SECURITY.md +++ /dev/null @@ -1,41 +0,0 @@ - - -## Security - -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. - -## Reporting Security Issues - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. - -## Preferred Languages - -We prefer all communications to be in English. - -## Policy - -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). - - \ No newline at end of file diff --git a/node_modules/jsonc-parser/package.json b/node_modules/jsonc-parser/package.json deleted file mode 100644 index 6536a20b..00000000 --- a/node_modules/jsonc-parser/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "jsonc-parser", - "version": "3.3.1", - "description": "Scanner and parser for JSON with comments.", - "main": "./lib/umd/main.js", - "typings": "./lib/umd/main.d.ts", - "module": "./lib/esm/main.js", - "author": "Microsoft Corporation", - "repository": { - "type": "git", - "url": "https://github.com/microsoft/node-jsonc-parser" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/microsoft/node-jsonc-parser/issues" - }, - "devDependencies": { - "@types/mocha": "^10.0.7", - "@types/node": "^18.x", - "@typescript-eslint/eslint-plugin": "^7.13.1", - "@typescript-eslint/parser": "^7.13.1", - "eslint": "^8.57.0", - "mocha": "^10.4.0", - "rimraf": "^5.0.7", - "typescript": "^5.4.2" - }, - "scripts": { - "prepack": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs", - "compile": "tsc -p ./src && npm run lint", - "compile-esm": "tsc -p ./src/tsconfig.esm.json", - "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", - "clean": "rimraf lib", - "watch": "tsc -w -p ./src", - "test": "npm run compile && mocha ./lib/umd/test", - "lint": "eslint src/**/*.ts" - } -} diff --git a/node_modules/just-curry-it/CHANGELOG.md b/node_modules/just-curry-it/CHANGELOG.md deleted file mode 100644 index f05ab7b7..00000000 --- a/node_modules/just-curry-it/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -# just-curry-it - -## 5.3.0 - -### Minor Changes - -- Rename node module .js -> .cjs - -## 5.2.1 - -### Patch Changes - -- fix: reorder exports to set default last #488 - -## 5.2.0 - -### Minor Changes - -- package.json updates to fix #467 and #483 - -## 5.1.0 - -### Minor Changes - -- Enhanced Type Defintions diff --git a/node_modules/just-curry-it/LICENSE b/node_modules/just-curry-it/LICENSE deleted file mode 100644 index 5d2c6e57..00000000 --- a/node_modules/just-curry-it/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 angus croll - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/just-curry-it/README.md b/node_modules/just-curry-it/README.md deleted file mode 100644 index 83f07a29..00000000 --- a/node_modules/just-curry-it/README.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -## just-curry-it - -Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing. -Guilt-free utilities for every occasion. - -[`🍦 Try it`](https://anguscroll.com/just/just-curry-it) - -```shell -npm install just-curry-it -``` -```shell -yarn add just-curry-it -``` - -Return a curried function - -```js -import curry from 'just-curry-it'; - -function add(a, b, c) { - return a + b + c; -} -curry(add)(1)(2)(3); // 6 -curry(add)(1)(2)(2); // 5 -curry(add)(2)(4, 3); // 9 - -function add(...args) { - return args.reduce((sum, n) => sum + n, 0) -} -var curryAdd4 = curry(add, 4) -curryAdd4(1)(2, 3)(4); // 10 - -function converter(ratio, input) { - return (input*ratio).toFixed(1); -} -const curriedConverter = curry(converter) -const milesToKm = curriedConverter(1.62); -milesToKm(35); // 56.7 -milesToKm(10); // 16.2 -``` diff --git a/node_modules/just-curry-it/index.cjs b/node_modules/just-curry-it/index.cjs deleted file mode 100644 index 8917dec9..00000000 --- a/node_modules/just-curry-it/index.cjs +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = curry; - -/* - function add(a, b, c) { - return a + b + c; - } - curry(add)(1)(2)(3); // 6 - curry(add)(1)(2)(2); // 5 - curry(add)(2)(4, 3); // 9 - - function add(...args) { - return args.reduce((sum, n) => sum + n, 0) - } - var curryAdd4 = curry(add, 4) - curryAdd4(1)(2, 3)(4); // 10 - - function converter(ratio, input) { - return (input*ratio).toFixed(1); - } - const curriedConverter = curry(converter) - const milesToKm = curriedConverter(1.62); - milesToKm(35); // 56.7 - milesToKm(10); // 16.2 -*/ - -function curry(fn, arity) { - return function curried() { - if (arity == null) { - arity = fn.length; - } - var args = [].slice.call(arguments); - if (args.length >= arity) { - return fn.apply(this, args); - } else { - return function() { - return curried.apply(this, args.concat([].slice.call(arguments))); - }; - } - }; -} diff --git a/node_modules/just-curry-it/index.d.ts b/node_modules/just-curry-it/index.d.ts deleted file mode 100644 index ab9e7b3a..00000000 --- a/node_modules/just-curry-it/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default curry; - -type MakeTuple = C['length'] extends LEN ? C : MakeTuple -type CurryOverload any, N extends unknown[], P extends unknown[]> = - N extends [infer L, ...infer R] - ? ((...args: [...P, L]) => CurryInternal) & CurryOverload - : () => CurryInternal -type CurryInternal any, N extends unknown[]> = - 0 extends N['length'] ? ReturnType : CurryOverload -type Curry any, LEN extends number | undefined = undefined, I extends any = any> = - 0 extends (LEN extends undefined ? Parameters['length'] : LEN) - ? () => ReturnType - : CurryInternal : MakeTuple> - -declare function curry any, L extends number>( - fn: F, - arity?: L | undefined, -) : Curry[number]>; diff --git a/node_modules/just-curry-it/index.mjs b/node_modules/just-curry-it/index.mjs deleted file mode 100644 index c4c185b2..00000000 --- a/node_modules/just-curry-it/index.mjs +++ /dev/null @@ -1,42 +0,0 @@ -var functionCurry = curry; - -/* - function add(a, b, c) { - return a + b + c; - } - curry(add)(1)(2)(3); // 6 - curry(add)(1)(2)(2); // 5 - curry(add)(2)(4, 3); // 9 - - function add(...args) { - return args.reduce((sum, n) => sum + n, 0) - } - var curryAdd4 = curry(add, 4) - curryAdd4(1)(2, 3)(4); // 10 - - function converter(ratio, input) { - return (input*ratio).toFixed(1); - } - const curriedConverter = curry(converter) - const milesToKm = curriedConverter(1.62); - milesToKm(35); // 56.7 - milesToKm(10); // 16.2 -*/ - -function curry(fn, arity) { - return function curried() { - if (arity == null) { - arity = fn.length; - } - var args = [].slice.call(arguments); - if (args.length >= arity) { - return fn.apply(this, args); - } else { - return function() { - return curried.apply(this, args.concat([].slice.call(arguments))); - }; - } - }; -} - -export {functionCurry as default}; diff --git a/node_modules/just-curry-it/index.tests.ts b/node_modules/just-curry-it/index.tests.ts deleted file mode 100644 index 5bb51f16..00000000 --- a/node_modules/just-curry-it/index.tests.ts +++ /dev/null @@ -1,72 +0,0 @@ -import curry from './index' - -function add(a: number, b: number, c: number) { - return a + b + c; -} - -// OK -curry(add); -curry(add)(1); -curry(add)(1)(2); -curry(add)(1)(2)(3); - -curry(add, 1); -curry(add, 1)(1); - -function many(a: string, b: number, c: boolean, d: bigint, e: number[], f: string | undefined, g: Record): boolean { - return true -} -const return1 = curry(many)('')(123)(false)(BigInt(2))([1])(undefined)({}) -const return2 = curry(many)('', 123)(false, BigInt(2))([1], '123')({}) -const return3 = curry(many)('', 123, false)(BigInt(2), [1], undefined)({}) -const return4 = curry(many)('', 123, false, BigInt(2))([1], undefined, {}) -const return5 = curry(many)('', 123, false, BigInt(2), [1])(undefined, {}) -const return6 = curry(many)('', 123, false, BigInt(2), [1], undefined)({}) -const return7 = curry(many)('', 123, false)(BigInt(2), [1])(undefined)({}) -const returns: boolean[] = [return1, return2, return3, return4, return5, return6, return7] - -function dynamic(...args: string[]): number { - return args.length -} -const dy1 = curry(dynamic, 1)('') -const dy2 = curry(dynamic, 2)('')('') -const dy3 = curry(dynamic, 3)('')('')('') -const dys: number[] = [dy1, dy2, dy3] - -// not OK -// @ts-expect-error -curry(add, 1)(1)(2); -// @ts-expect-error -curry(add, 1)(1)(2)(3); -// @ts-expect-error -curry(add, 4)(''); - -// @ts-expect-error -curry(many)(123) -// @ts-expect-error -curry(many)('', 123)(123) -// @ts-expect-error -curry(many)('', 123, true)('') -// @ts-expect-error -curry(many)('', 123, true, BigInt(2))('') -// @ts-expect-error -curry(many)('', 123, true, BigInt(2), [1])(123) -// @ts-expect-error -curry(many)('', 123, true, BigInt(2), [1,1], '')('') -// @ts-expect-error -curry(dynamic)(123) - -// @ts-expect-error -curry(); -// @ts-expect-error -curry(add, {}); -// @ts-expect-error -curry(add, 'abc')(1); -// @ts-expect-error -curry(1); -// @ts-expect-error -curry('hello'); -// @ts-expect-error -curry({}); -// @ts-expect-error -curry().a(); diff --git a/node_modules/just-curry-it/package.json b/node_modules/just-curry-it/package.json deleted file mode 100644 index b735efff..00000000 --- a/node_modules/just-curry-it/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "just-curry-it", - "version": "5.3.0", - "description": "return a curried function", - "type": "module", - "exports": { - ".": { - "types": "./index.d.ts", - "require": "./index.cjs", - "import": "./index.mjs" - }, - "./package.json": "./package.json" - }, - "main": "index.cjs", - "types": "index.d.ts", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "build": "rollup -c" - }, - "repository": "https://github.com/angus-c/just", - "keywords": [ - "function", - "curry", - "no-dependencies", - "just" - ], - "author": "Angus Croll", - "license": "MIT", - "bugs": { - "url": "https://github.com/angus-c/just/issues" - } -} \ No newline at end of file diff --git a/node_modules/just-curry-it/rollup.config.js b/node_modules/just-curry-it/rollup.config.js deleted file mode 100644 index fb9d24a3..00000000 --- a/node_modules/just-curry-it/rollup.config.js +++ /dev/null @@ -1,3 +0,0 @@ -const createRollupConfig = require('../../config/createRollupConfig'); - -module.exports = createRollupConfig(__dirname); diff --git a/node_modules/punycode/LICENSE-MIT.txt b/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/punycode/README.md b/node_modules/punycode/README.md deleted file mode 100644 index f611016b..00000000 --- a/node_modules/punycode/README.md +++ /dev/null @@ -1,148 +0,0 @@ -# Punycode.js [![punycode on npm](https://img.shields.io/npm/v/punycode)](https://www.npmjs.com/package/punycode) [![](https://data.jsdelivr.com/v1/package/npm/punycode/badge)](https://www.jsdelivr.com/package/npm/punycode) - -Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891). - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated). - -This project provides a CommonJS module that uses ES2015+ features and JavaScript module, which work in modern Node.js versions and browsers. For the old Punycode.js version that offers the same functionality in a UMD build with support for older pre-ES2015 runtimes, including Rhino, Ringo, and Narwhal, see [v1.4.1](https://github.com/mathiasbynens/punycode.js/releases/tag/v1.4.1). - -## Installation - -Via [npm](https://www.npmjs.com/): - -```bash -npm install punycode --save -``` - -In [Node.js](https://nodejs.org/): - -> ⚠️ Note that userland modules don't hide core modules. -> For example, `require('punycode')` still imports the deprecated core module even if you executed `npm install punycode`. -> Use `require('punycode/')` to import userland modules rather than core modules. - -```js -const punycode = require('punycode/'); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## For maintainers - -### How to publish a new release - -1. On the `main` branch, bump the version number in `package.json`: - - ```sh - npm version patch -m 'Release v%s' - ``` - - Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). - - Note that this produces a Git commit + tag. - -1. Push the release commit and tag: - - ```sh - git push && git push --tags - ``` - - Our CI then automatically publishes the new release to npm, under both the [`punycode`](https://www.npmjs.com/package/punycode) and [`punycode.js`](https://www.npmjs.com/package/punycode.js) names. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/punycode/package.json b/node_modules/punycode/package.json deleted file mode 100644 index b8b76fc7..00000000 --- a/node_modules/punycode/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "punycode", - "version": "2.3.1", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "https://mths.be/punycode", - "main": "punycode.js", - "jsnext:main": "punycode.es6.js", - "module": "punycode.es6.js", - "engines": { - "node": ">=6" - }, - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/punycode.js.git" - }, - "bugs": "https://github.com/mathiasbynens/punycode.js/issues", - "files": [ - "LICENSE-MIT.txt", - "punycode.js", - "punycode.es6.js" - ], - "scripts": { - "test": "mocha tests", - "build": "node scripts/prepublish.js" - }, - "devDependencies": { - "codecov": "^3.8.3", - "nyc": "^15.1.0", - "mocha": "^10.2.0" - }, - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - } -} diff --git a/node_modules/punycode/punycode.es6.js b/node_modules/punycode/punycode.es6.js deleted file mode 100644 index dadece25..00000000 --- a/node_modules/punycode/punycode.es6.js +++ /dev/null @@ -1,444 +0,0 @@ -'use strict'; - -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function(codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function(delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function(input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for (let w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - const digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - - } - - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function(input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for (let k = base; /* no condition */; k += base) { - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -export { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode }; -export default punycode; diff --git a/node_modules/punycode/punycode.js b/node_modules/punycode/punycode.js deleted file mode 100644 index a1ef2519..00000000 --- a/node_modules/punycode/punycode.js +++ /dev/null @@ -1,443 +0,0 @@ -'use strict'; - -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function(codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function(delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function(input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for (let w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - const digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - - } - - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function(input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for (let k = base; /* no condition */; k += base) { - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -module.exports = punycode; diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md deleted file mode 100644 index 0412ad8a..00000000 --- a/node_modules/uuid/CHANGELOG.md +++ /dev/null @@ -1,274 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [9.0.1](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1) (2023-09-12) - -### build - -- Fix CI to work with Node.js 20.x - -## [9.0.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05) - -### ⚠ BREAKING CHANGES - -- Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022. - -- Remove the minified UMD build from the package. - - Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays. - - For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished. - -- Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015. - - This also removes the fallback on msCrypto instead of the crypto API. - - Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack. - -### Features - -- optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#597](https://github.com/uuidjs/uuid/issues/597)) ([3a033f6](https://github.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc)) -- remove UMD build ([#645](https://github.com/uuidjs/uuid/issues/645)) ([e948a0f](https://github.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#620](https://github.com/uuidjs/uuid/issues/620) -- use native crypto.randomUUID when available ([#600](https://github.com/uuidjs/uuid/issues/600)) ([c9e076c](https://github.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4)) - -### Bug Fixes - -- add Jest/jsdom compatibility ([#642](https://github.com/uuidjs/uuid/issues/642)) ([16f9c46](https://github.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd)) -- change default export to named function ([#545](https://github.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://github.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a)) -- handle error when parameter is not set in v3 and v5 ([#622](https://github.com/uuidjs/uuid/issues/622)) ([fcd7388](https://github.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091)) -- run npm audit fix ([#644](https://github.com/uuidjs/uuid/issues/644)) ([04686f5](https://github.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353)) -- upgrading from uuid3 broken link ([#568](https://github.com/uuidjs/uuid/issues/568)) ([1c849da](https://github.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6)) - -### build - -- drop Node.js 8.x from babel transpile target ([#603](https://github.com/uuidjs/uuid/issues/603)) ([aa11485](https://github.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5)) -- drop support for legacy browsers (IE11, Safari 10) ([#604](https://github.com/uuidjs/uuid/issues/604)) ([0f433e5](https://github.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148)) - -- drop node 10.x to upgrade dev dependencies ([#653](https://github.com/uuidjs/uuid/issues/653)) ([28a5712](https://github.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#643](https://github.com/uuidjs/uuid/issues/643) - -### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) - -### Bug Fixes - -- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536) - -### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) - -### Bug Fixes - -- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375) - -## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27) - -### Features - -- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180) - -## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23) - -### Features - -- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) -- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437) -- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659)) - -### Bug Fixes - -- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8)) - -## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20) - -### Features - -- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d)) -- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2)) - -### Bug Fixes - -- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444) - -## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29) - -### ⚠ BREAKING CHANGES - -- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. - - ```diff - -import uuid from 'uuid'; - -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' - +import { v4 as uuidv4 } from 'uuid'; - +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' - ``` - -- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. - - Instead use the named exports that this module exports. - - For ECMAScript Modules (ESM): - - ```diff - -import uuidv4 from 'uuid/v4'; - +import { v4 as uuidv4 } from 'uuid'; - uuidv4(); - ``` - - For CommonJS: - - ```diff - -const uuidv4 = require('uuid/v4'); - +const { v4: uuidv4 } = require('uuid'); - uuidv4(); - ``` - -### Features - -- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342) -- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) - -### Bug Fixes - -- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) - -### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) - -### Bug Fixes - -- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408) - -### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) - -### Bug Fixes - -- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) -- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) -- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) - -### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) - -### Bug Fixes - -- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) -- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378) - -## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24) - -### ⚠ BREAKING CHANGES - -- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. -- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. -- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. -- Remove support for generating v3 and v5 UUIDs in Node.js<4.x -- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. - -### Features - -- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345) -- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) -- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) -- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) -- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173) -- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) -- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338) - -### Bug Fixes - -- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) -- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370) -- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23)) - -## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) - -### Features - -- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) - -## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) - -### Bug Fixes - -- no longer run ci tests on node v4 -- upgrade dependencies - -## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) - -### Bug Fixes - -- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) - -## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) - -### Bug Fixes - -- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) - -# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) - -### Bug Fixes - -- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) -- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) -- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) -- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) - -### Features - -- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) - -## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) - -### Bug Fixes - -- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - -# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) - -### Bug Fixes - -- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) -- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - -### Features - -- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) - -# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) - -### Bug Fixes - -- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) -- Fix typo (#178) -- Simple typo fix (#165) - -### Features - -- v5 support in CLI (#197) -- V5 support (#188) - -# 3.0.1 (2016-11-28) - -- split uuid versions into separate files - -# 3.0.0 (2016-11-17) - -- remove .parse and .unparse - -# 2.0.0 - -- Removed uuid.BufferClass - -# 1.4.0 - -- Improved module context detection -- Removed public RNG functions - -# 1.3.2 - -- Improve tests and handling of v1() options (Issue #24) -- Expose RNG option to allow for perf testing with different generators - -# 1.3.0 - -- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -- Support for node.js crypto API -- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/uuid/CONTRIBUTING.md b/node_modules/uuid/CONTRIBUTING.md deleted file mode 100644 index 4a4503d0..00000000 --- a/node_modules/uuid/CONTRIBUTING.md +++ /dev/null @@ -1,18 +0,0 @@ -# Contributing - -Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! - -## Testing - -```shell -npm test -``` - -## Releasing - -Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): - -```shell -npm run release -- --dry-run # verify output manually -npm run release # follow the instructions from the output of this command -``` diff --git a/node_modules/uuid/LICENSE.md b/node_modules/uuid/LICENSE.md deleted file mode 100644 index 39341683..00000000 --- a/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2020 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md deleted file mode 100644 index 4f51e098..00000000 --- a/node_modules/uuid/README.md +++ /dev/null @@ -1,466 +0,0 @@ - - - -# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser) - -For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs - -- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs -- **Cross-platform** - Support for ... - - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) - - NodeJS 12+ ([LTS releases](https://github.com/nodejs/Release)) - - Chrome, Safari, Firefox, Edge browsers - - Webpack and rollup.js module bundlers - - [React Native / Expo](#react-native--expo) -- **Secure** - Cryptographically-strong random values -- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers -- **CLI** - Includes the [`uuid` command line](#command-line) utility - -> **Note** Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details. - -> **Note** Only interested in creating a version 4 UUID? You might be able to use [`crypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library. - -## Quickstart - -To create a random UUID... - -**1. Install** - -```shell -npm install uuid -``` - -**2. Create a UUID** (ES6 module syntax) - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' -``` - -... or using CommonJS syntax: - -```javascript -const { v4: uuidv4 } = require('uuid'); -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -For timestamp UUIDs, namespace UUIDs, and other options read on ... - -## API Summary - -| | | | -| --- | --- | --- | -| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | -| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | -| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | -| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | -| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | -| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | -| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | -| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | -| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | - -## API - -### uuid.NIL - -The nil UUID string (all zeros). - -Example: - -```javascript -import { NIL as NIL_UUID } from 'uuid'; - -NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' -``` - -### uuid.parse(str) - -Convert UUID string to array of bytes - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Uint8Array[16]` | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { parse as uuidParse } from 'uuid'; - -// Parse a UUID -const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); - -// Convert to hex strings to show byte order (for documentation purposes) -[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ - // [ - // '6e', 'c0', 'bd', '7f', - // '11', 'c0', '43', 'da', - // '97', '5e', '2a', '8a', - // 'd9', 'eb', 'ae', '0b' - // ] -``` - -### uuid.stringify(arr[, offset]) - -Convert array of bytes to UUID string - -| | | -| -------------- | ---------------------------------------------------------------------------- | -| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | -| [`offset` = 0] | `Number` Starting index in the Array | -| _returns_ | `String` | -| _throws_ | `TypeError` if a valid UUID string cannot be generated | - -Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { stringify as uuidStringify } from 'uuid'; - -const uuidBytes = [ - 0x6e, 0xc0, 0xbd, 0x7f, 0x11, 0xc0, 0x43, 0xda, 0x97, 0x5e, 0x2a, 0x8a, 0xd9, 0xeb, 0xae, 0x0b, -]; - -uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' -``` - -### uuid.v1([options[, buffer[, offset]]]) - -Create an RFC version 1 (timestamp) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | -| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | -| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | -| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | -| _throws_ | `Error` if more than 10M UUIDs/sec are requested | - -Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. - -Note: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields. - -Example: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' -``` - -Example using `options`: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -const v1options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678, -}; -uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' -``` - -### uuid.v3(name, namespace[, buffer[, offset]]) - -Create an RFC version 3 (namespace w/ MD5) UUID - -API is identical to `v5()`, but uses "v3" instead. - -⚠️ Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." - -### uuid.v4([options[, buffer[, offset]]]) - -Create an RFC version 4 (random) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Example: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -Example using predefined `random` values: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -const v4options = { - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36, - ], -}; -uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' -``` - -### uuid.v5(name, namespace[, buffer[, offset]]) - -Create an RFC version 5 (namespace w/ SHA-1) UUID - -| | | -| --- | --- | -| `name` | `String \| Array` | -| `namespace` | `String \| Array[16]` Namespace UUID | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. - -Example with custom namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -// Define a custom namespace. Readers, create your own using something like -// https://www.uuidgenerator.net/ -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; - -uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' -``` - -Example with RFC `URL` namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' -``` - -### uuid.validate(str) - -Test a string to see if it is a valid UUID - -| | | -| --------- | --------------------------------------------------- | -| `str` | `String` to validate | -| _returns_ | `true` if string is a valid UUID, `false` otherwise | - -Example: - -```javascript -import { validate as uuidValidate } from 'uuid'; - -uuidValidate('not a UUID'); // ⇨ false -uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true -``` - -Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. - -```javascript -import { version as uuidVersion } from 'uuid'; -import { validate as uuidValidate } from 'uuid'; - -function uuidValidateV4(uuid) { - return uuidValidate(uuid) && uuidVersion(uuid) === 4; -} - -const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; -const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; - -uuidValidateV4(v4Uuid); // ⇨ true -uuidValidateV4(v1Uuid); // ⇨ false -``` - -### uuid.version(str) - -Detect RFC version of a UUID - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Number` The RFC version of the UUID | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Example: - -```javascript -import { version as uuidVersion } from 'uuid'; - -uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 -uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 -``` - -## Command Line - -UUIDs can be generated from the command line using `uuid`. - -```shell -$ npx uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 -``` - -The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: - -```shell -$ npx uuid --help - -Usage: - uuid - uuid v1 - uuid v3 - uuid v4 - uuid v5 - uuid --help - -Note: may be "URL" or "DNS" to use the corresponding UUIDs -defined by RFC4122 -``` - -## ECMAScript Modules - -This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments). - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -To run the examples you must first create a dist build of this library in the module root: - -```shell -npm run build -``` - -## CDN Builds - -### ECMAScript Modules - -To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/): - -```html - -``` - -### UMD - -As of `uuid@9` [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds are no longer shipped with this library. - -If you need a UMD build of this library, use a bundler like Webpack or Rollup. Alternatively, refer to the documentation of [`uuid@8.3.2`](https://github.com/uuidjs/uuid/blob/v8.3.2/README.md#umd) which was the last version that shipped UMD builds. - -## Known issues - -### Duplicate UUIDs (Googlebot) - -This module may generate duplicate UUIDs when run in clients with _deterministic_ random number generators, such as [Googlebot crawlers](https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers). This can cause problems for apps that expect client-generated UUIDs to always be unique. Developers should be prepared for this and have a strategy for dealing with possible collisions, such as: - -- Check for duplicate UUIDs, fail gracefully -- Disable write operations for Googlebot clients - -### "getRandomValues() not supported" - -This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: - -### React Native / Expo - -1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) -1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: - -```javascript -import 'react-native-get-random-values'; -import { v4 as uuidv4 } from 'uuid'; -``` - -Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`. - -### Web Workers / Service Workers (Edge <= 18) - -[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). - -### IE 11 (Internet Explorer) - -Support for IE11 and other legacy browsers has been dropped as of `uuid@9`. If you need to support legacy browsers, you can always transpile the uuid module source yourself (e.g. using [Babel](https://babeljs.io/)). - -## Upgrading From `uuid@7` - -### Only Named Exports Supported When Using with Node.js ESM - -`uuid@7` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports. - -Instead of doing: - -```javascript -import uuid from 'uuid'; -uuid.v4(); -``` - -you will now have to use the named exports: - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); -``` - -### Deep Requires No Longer Supported - -Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7`](#deep-requires-now-deprecated) are no longer supported. - -## Upgrading From `uuid@3` - -"_Wait... what happened to `uuid@4` thru `uuid@6`?!?_" - -In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped. - -### Deep Requires Now Deprecated - -`uuid@3` encouraged the use of deep requires to minimize the bundle size of browser builds: - -```javascript -const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED! -uuidv4(); -``` - -As of `uuid@7` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax: - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); -``` - -... or for CommonJS: - -```javascript -const { v4: uuidv4 } = require('uuid'); -uuidv4(); -``` - -### Default Export Removed - -`uuid@3` was exporting the Version 4 UUID method as a default export: - -```javascript -const uuid = require('uuid'); // <== REMOVED! -``` - -This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`. - ---- - -Markdown generated from [README_js.md](README_js.md) by
diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json deleted file mode 100644 index 6cc33618..00000000 --- a/node_modules/uuid/package.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "name": "uuid", - "version": "9.0.1", - "description": "RFC4122 (v1, v4, and v5) UUIDs", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "license": "MIT", - "bin": { - "uuid": "./dist/bin/uuid" - }, - "sideEffects": false, - "main": "./dist/index.js", - "exports": { - ".": { - "node": { - "module": "./dist/esm-node/index.js", - "require": "./dist/index.js", - "import": "./wrapper.mjs" - }, - "browser": { - "import": "./dist/esm-browser/index.js", - "require": "./dist/commonjs-browser/index.js" - }, - "default": "./dist/esm-browser/index.js" - }, - "./package.json": "./package.json" - }, - "module": "./dist/esm-node/index.js", - "browser": { - "./dist/md5.js": "./dist/md5-browser.js", - "./dist/native.js": "./dist/native-browser.js", - "./dist/rng.js": "./dist/rng-browser.js", - "./dist/sha1.js": "./dist/sha1-browser.js", - "./dist/esm-node/index.js": "./dist/esm-browser/index.js" - }, - "files": [ - "CHANGELOG.md", - "CONTRIBUTING.md", - "LICENSE.md", - "README.md", - "dist", - "wrapper.mjs" - ], - "devDependencies": { - "@babel/cli": "7.18.10", - "@babel/core": "7.18.10", - "@babel/eslint-parser": "7.18.9", - "@babel/preset-env": "7.18.10", - "@commitlint/cli": "17.0.3", - "@commitlint/config-conventional": "17.0.3", - "bundlewatch": "0.3.3", - "eslint": "8.21.0", - "eslint-config-prettier": "8.5.0", - "eslint-config-standard": "17.0.0", - "eslint-plugin-import": "2.26.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-promise": "6.0.0", - "husky": "8.0.1", - "jest": "28.1.3", - "lint-staged": "13.0.3", - "npm-run-all": "4.1.5", - "optional-dev-dependency": "2.0.1", - "prettier": "2.7.1", - "random-seed": "0.3.0", - "runmd": "1.3.9", - "standard-version": "9.5.0" - }, - "optionalDevDependencies": { - "@wdio/browserstack-service": "7.16.10", - "@wdio/cli": "7.16.10", - "@wdio/jasmine-framework": "7.16.6", - "@wdio/local-runner": "7.16.10", - "@wdio/spec-reporter": "7.16.9", - "@wdio/static-server-service": "7.16.6" - }, - "scripts": { - "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build", - "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build", - "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test", - "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test", - "examples:node:jest:test": "cd examples/node-jest && npm install && npm test", - "prepare": "cd $( git rev-parse --show-toplevel ) && husky install", - "lint": "npm run eslint:check && npm run prettier:check", - "eslint:check": "eslint src/ test/ examples/ *.js", - "eslint:fix": "eslint --fix src/ test/ examples/ *.js", - "pretest": "[ -n $CI ] || npm run build", - "test": "BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/", - "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**", - "test:browser": "wdio run ./wdio.conf.js", - "pretest:node": "npm run build", - "test:node": "npm-run-all --parallel examples:node:**", - "test:pack": "./scripts/testpack.sh", - "pretest:benchmark": "npm run build", - "test:benchmark": "cd examples/benchmark && npm install && npm test", - "prettier:check": "prettier --check '**/*.{js,jsx,json,md}'", - "prettier:fix": "prettier --write '**/*.{js,jsx,json,md}'", - "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", - "md": "runmd --watch --output=README.md README_js.md", - "docs": "( node --version | grep -q 'v18' ) && ( npm run build && npx runmd --output=README.md README_js.md )", - "docs:diff": "npm run docs && git diff --quiet README.md", - "build": "./scripts/build.sh", - "prepack": "npm run build", - "release": "standard-version --no-verify" - }, - "repository": { - "type": "git", - "url": "https://github.com/uuidjs/uuid.git" - }, - "lint-staged": { - "*.{js,jsx,json,md}": [ - "prettier --write" - ], - "*.{js,jsx}": [ - "eslint --fix" - ] - }, - "standard-version": { - "scripts": { - "postchangelog": "prettier --write CHANGELOG.md" - } - } -} diff --git a/node_modules/uuid/wrapper.mjs b/node_modules/uuid/wrapper.mjs deleted file mode 100644 index c31e9cef..00000000 --- a/node_modules/uuid/wrapper.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import uuid from './dist/index.js'; -export const v1 = uuid.v1; -export const v3 = uuid.v3; -export const v4 = uuid.v4; -export const v5 = uuid.v5; -export const NIL = uuid.NIL; -export const version = uuid.version; -export const validate = uuid.validate; -export const stringify = uuid.stringify; -export const parse = uuid.parse; From 90d4ebc7933e41daaffb5e1085afd9ea2bfb8ab0 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Tue, 3 Mar 2026 19:06:31 +0530 Subject: [PATCH 07/25] added a github action for automating addition of test-ids --- .github/workflows/apply-test-ids.yml | 149 +++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 .github/workflows/apply-test-ids.yml diff --git a/.github/workflows/apply-test-ids.yml b/.github/workflows/apply-test-ids.yml new file mode 100644 index 00000000..df17a245 --- /dev/null +++ b/.github/workflows/apply-test-ids.yml @@ -0,0 +1,149 @@ +name: apply-test-ids + +on: + pull_request_target: + types: [opened, synchronize] + +permissions: + contents: write + pull-requests: write + +jobs: + apply: + runs-on: ubuntu-latest + + steps: + # 1. Checkout base branch (trusted code ) + - name: Checkout base branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.base.ref }} + fetch-depth: 0 + + # 2. Save trusted scripts before checking out PR code + - name: Save base automation scripts + run: | + mkdir -p /tmp/base-scripts/scripts/utils + cp scripts/add-test-ids.js /tmp/base-scripts/scripts/add-test-ids.js + cp scripts/normalize.js /tmp/base-scripts/scripts/normalize.js + cp scripts/load-remotes.js /tmp/base-scripts/scripts/load-remotes.js + cp scripts/utils/generateTestIds.js /tmp/base-scripts/scripts/utils/generateTestIds.js + cp scripts/utils/jsonfiles.js /tmp/base-scripts/scripts/utils/jsonfiles.js + + # 3. Checkout PR branch (contributor test files) + - name: Checkout PR branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + # 4. Restore trusted scripts over PR code (prevents script injection) + - name: Restore trusted scripts + run: | + cp /tmp/base-scripts/scripts/add-test-ids.js scripts/add-test-ids.js + cp /tmp/base-scripts/scripts/normalize.js scripts/normalize.js + cp /tmp/base-scripts/scripts/load-remotes.js scripts/load-remotes.js + cp /tmp/base-scripts/scripts/utils/generateTestIds.js scripts/utils/generateTestIds.js + cp /tmp/base-scripts/scripts/utils/jsonfiles.js scripts/utils/jsonfiles.js + + # 5. Setup Node.js + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + # 6. Install dependencies + - name: Install dependencies + run: npm ci + + # 7. Fetch list of files changed in this PR + - name: Get changed test files + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + curl -s \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + "${{ github.event.pull_request.url }}/files?per_page=100" \ + | jq -r ".[].filename" \ + > changed-files.txt + + grep -E "^tests/(draft[^/]+)/.*\.json$" changed-files.txt \ + | sed -E "s|^tests/([^/]+)/.*|\1|" \ + | sort -u \ + > affected-drafts.txt + + # 8. Run add-test-ids.js for each changed file + - name: Apply missing test IDs + env: + CI: "false" + run: | + if [ ! -s affected-drafts.txt ]; then + echo "No test JSON files changed - nothing to do." + exit 0 + fi + + while IFS= read -r draft; do + echo "Processing dialect: $draft" + grep -E "^tests/${draft}/.*\.json$" changed-files.txt | while IFS= read -r file; do + if [ -f "$file" ]; then + echo " -> $file" + node scripts/add-test-ids.js "$draft" "$file" + fi + done + done < affected-drafts.txt + + # 9. Commit and push back to the PR branch + - name: Commit and push changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config user.name "test-id-bot" + git config user.email "test-id-bot@users.noreply.github.com" + + git add "tests/**/*.json" + + if git diff --cached --quiet; then + echo "No test ID changes needed - nothing to commit." + echo "CHANGES_MADE=false" >> $GITHUB_ENV + else + SUMMARY="" + TOTAL=0 + while IFS= read -r file; do + COUNT=$(git diff --cached -- "$file" | grep "^+" | grep '"id":' | wc -l | tr -d " ") + if [ "$COUNT" -gt 0 ]; then + SUMMARY="${SUMMARY}\n- \`${file}\` - **${COUNT}** ID(s) added" + TOTAL=$((TOTAL + COUNT)) + fi + done < <(git diff --cached --name-only) + + printf "%b" "$SUMMARY" > /tmp/summary.txt + echo "TOTAL_IDS=${TOTAL}" >> $GITHUB_ENV + + git commit -m "chore: auto-add missing test IDs" + + COMMIT_SHA=$(git rev-parse HEAD) + echo "COMMIT_SHA=${COMMIT_SHA}" >> $GITHUB_ENV + + git push \ + https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git \ + HEAD:refs/heads/${{ github.event.pull_request.head.ref }} + + echo "CHANGES_MADE=true" >> $GITHUB_ENV + fi + + # 10. Post a summary comment on the PR + - name: Post PR comment + if: env.CHANGES_MADE == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + SUMMARY=$(cat /tmp/summary.txt) + COMMIT_URL="https://github.com/${{ github.event.pull_request.head.repo.full_name }}/commit/${COMMIT_SHA}" + + BODY="### test-id-bot added ${TOTAL_IDS} missing test ID(s)\n\n${SUMMARY}\n\nView the full diff of added IDs: ${COMMIT_URL}\n\n> IDs are deterministic hashes based on the schema, test data, and expected result." + + curl -s -X POST \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "Content-Type: application/json" \ + "${{ github.event.pull_request.comments_url }}" \ + --data "$(jq -n --arg body "$(printf '%b' "$BODY")" '{body: $body}')" \ No newline at end of file From ab255814fb379afd4db521abe466e7d7b3f75d92 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Fri, 6 Mar 2026 10:30:39 +0530 Subject: [PATCH 08/25] changed the script restore method to the path filtring --- .github/workflows/apply-test-ids.yml | 67 +++++++++++++++------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/.github/workflows/apply-test-ids.yml b/.github/workflows/apply-test-ids.yml index df17a245..2155bb55 100644 --- a/.github/workflows/apply-test-ids.yml +++ b/.github/workflows/apply-test-ids.yml @@ -3,6 +3,8 @@ name: apply-test-ids on: pull_request_target: types: [opened, synchronize] + paths: + - 'tests/**/*.json' permissions: contents: write @@ -13,51 +15,50 @@ jobs: runs-on: ubuntu-latest steps: - # 1. Checkout base branch (trusted code ) - - name: Checkout base branch - uses: actions/checkout@v4 + # 1. Detect what changed in this PR + - name: Check changed paths + uses: dorny/paths-filter@v3 + id: filter with: - ref: ${{ github.event.pull_request.base.ref }} - fetch-depth: 0 - - # 2. Save trusted scripts before checking out PR code - - name: Save base automation scripts + filters: | + tests: + - 'tests/**/*.json' + scripts: + - 'scripts/**' + - 'package.json' + - 'package-lock.json' + + # 2. Fail if both tests AND scripts changed together + - name: Block mixed changes + if: steps.filter.outputs.tests == 'true' && steps.filter.outputs.scripts == 'true' run: | - mkdir -p /tmp/base-scripts/scripts/utils - cp scripts/add-test-ids.js /tmp/base-scripts/scripts/add-test-ids.js - cp scripts/normalize.js /tmp/base-scripts/scripts/normalize.js - cp scripts/load-remotes.js /tmp/base-scripts/scripts/load-remotes.js - cp scripts/utils/generateTestIds.js /tmp/base-scripts/scripts/utils/generateTestIds.js - cp scripts/utils/jsonfiles.js /tmp/base-scripts/scripts/utils/jsonfiles.js - - # 3. Checkout PR branch (contributor test files) - - name: Checkout PR branch + echo "This PR changes both test files and scripts at the same time." + echo "Please split them into separate PRs." + exit 1 + + # 3. Checkout repo + - name: Checkout + if: steps.filter.outputs.tests == 'true' uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - # 4. Restore trusted scripts over PR code (prevents script injection) - - name: Restore trusted scripts - run: | - cp /tmp/base-scripts/scripts/add-test-ids.js scripts/add-test-ids.js - cp /tmp/base-scripts/scripts/normalize.js scripts/normalize.js - cp /tmp/base-scripts/scripts/load-remotes.js scripts/load-remotes.js - cp /tmp/base-scripts/scripts/utils/generateTestIds.js scripts/utils/generateTestIds.js - cp /tmp/base-scripts/scripts/utils/jsonfiles.js scripts/utils/jsonfiles.js - - # 5. Setup Node.js + # 4. Setup Node.js - name: Setup Node.js + if: steps.filter.outputs.tests == 'true' uses: actions/setup-node@v4 with: node-version: 18 - # 6. Install dependencies + # 5. Install dependencies - name: Install dependencies + if: steps.filter.outputs.tests == 'true' run: npm ci - # 7. Fetch list of files changed in this PR + # 6. Fetch list of files changed in this PR - name: Get changed test files + if: steps.filter.outputs.tests == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -72,8 +73,9 @@ jobs: | sort -u \ > affected-drafts.txt - # 8. Run add-test-ids.js for each changed file + # 7. Run add-test-ids.js for each changed file - name: Apply missing test IDs + if: steps.filter.outputs.tests == 'true' env: CI: "false" run: | @@ -92,8 +94,9 @@ jobs: done done < affected-drafts.txt - # 9. Commit and push back to the PR branch + # 8. Commit and push back to the PR branch - name: Commit and push changes + if: steps.filter.outputs.tests == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -131,7 +134,7 @@ jobs: echo "CHANGES_MADE=true" >> $GITHUB_ENV fi - # 10. Post a summary comment on the PR + # 9. Post a summary comment on the PR - name: Post PR comment if: env.CHANGES_MADE == 'true' env: From a236d61c96ee5ea3dabdbf8f70eebb1d7ecd7408 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Tue, 25 Nov 2025 15:37:24 +0530 Subject: [PATCH 09/25] Add test IDs to draft2020-12/enum.json using normalized schema hash (POC for #698) --- package.json | 11 +- scripts/add-test-ids.js | 74 ++++ scripts/check-test-ids.js | 143 ++++++ scripts/load-remotes.js | 36 ++ scripts/normalize.js | 212 +++++++++ tests/draft2020-12/enum.json | 815 ++++++++++++++++++++--------------- 6 files changed, 954 insertions(+), 337 deletions(-) create mode 100644 scripts/add-test-ids.js create mode 100644 scripts/check-test-ids.js create mode 100644 scripts/load-remotes.js create mode 100644 scripts/normalize.js diff --git a/package.json b/package.json index 75da9e29..67058746 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "json-schema-test-suite", "version": "0.1.0", + "type": "module", "description": "A language agnostic test suite for the JSON Schema specifications", "repository": "github:json-schema-org/JSON-Schema-Test-Suite", "keywords": [ @@ -8,5 +9,13 @@ "tests" ], "author": "http://json-schema.org", - "license": "MIT" + "license": "MIT", + "dependencies": { + "@hyperjump/browser": "^1.3.1", + "@hyperjump/json-pointer": "^1.1.1", + "@hyperjump/json-schema": "^1.17.2", + "@hyperjump/pact": "^1.4.0", + "@hyperjump/uri": "^1.3.2", + "json-stringify-deterministic": "^1.0.12" + } } diff --git a/scripts/add-test-ids.js b/scripts/add-test-ids.js new file mode 100644 index 00000000..295414e2 --- /dev/null +++ b/scripts/add-test-ids.js @@ -0,0 +1,74 @@ +import * as fs from "node:fs"; +import * as crypto from "node:crypto"; +import jsonStringify from "json-stringify-deterministic"; +import { normalize } from "./normalize.js"; +import { loadRemotes } from "./load-remotes.js"; + +const DIALECT_MAP = { + "https://json-schema.org/draft/2020-12/schema": "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema": "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#": "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#": "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#": "http://json-schema.org/draft-04/schema#" +}; + +function getDialectUri(schema) { + if (schema.$schema && DIALECT_MAP[schema.$schema]) { + return DIALECT_MAP[schema.$schema]; + } + return "https://json-schema.org/draft/2020-12/schema"; +} + +function generateTestId(normalizedSchema, testData, testValid) { + return crypto + .createHash("md5") + .update(jsonStringify(normalizedSchema) + jsonStringify(testData) + testValid) + .digest("hex"); +} + +async function addIdsToFile(filePath) { + console.log("Reading:", filePath); + const tests = JSON.parse(fs.readFileSync(filePath, "utf8")); + let changed = false; + let added = 0; + + if (!Array.isArray(tests)) { + console.log("Expected an array at top level, got:", typeof tests); + return; + } + + for (const testCase of tests) { + if (!Array.isArray(testCase.tests)) continue; + + const dialectUri = getDialectUri(testCase.schema || {}); + const normalizedSchema = await normalize(testCase.schema || true, dialectUri); + + for (const test of testCase.tests) { + if (!test.id) { + test.id = generateTestId(normalizedSchema, test.data, test.valid); + changed = true; + added++; + } + } + } + + if (changed) { + fs.writeFileSync(filePath, JSON.stringify(tests, null, 2) + "\n"); + console.log(`✓ Added ${added} IDs`); + } else { + console.log("✓ All tests already have IDs"); + } +} + +// Load remotes for all dialects +const remotesPaths = ["./remotes"]; +for (const dialectUri of Object.values(DIALECT_MAP)) { + for (const path of remotesPaths) { + if (fs.existsSync(path)) { + loadRemotes(dialectUri, path); + } + } +} + +const filePath = process.argv[2] || "tests/draft2020-12/enum.json"; +addIdsToFile(filePath).catch(console.error); \ No newline at end of file diff --git a/scripts/check-test-ids.js b/scripts/check-test-ids.js new file mode 100644 index 00000000..feed6513 --- /dev/null +++ b/scripts/check-test-ids.js @@ -0,0 +1,143 @@ +import * as fs from "node:fs"; +import * as path from "node:path"; +import * as crypto from "node:crypto"; +import jsonStringify from "json-stringify-deterministic"; +import { normalize } from "./normalize.js"; +import { loadRemotes } from "./load-remotes.js"; + +const DIALECT_MAP = { + "https://json-schema.org/draft/2020-12/schema": "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema": "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#": "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#": "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#": "http://json-schema.org/draft-04/schema#" +}; + +function* jsonFiles(dir) { + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + const full = path.join(dir, entry.name); + if (entry.isDirectory()) { + yield* jsonFiles(full); + } else if (entry.isFile() && entry.name.endsWith(".json")) { + yield full; + } + } +} + +function getDialectUri(schema) { + if (schema.$schema && DIALECT_MAP[schema.$schema]) { + return DIALECT_MAP[schema.$schema]; + } + return "https://json-schema.org/draft/2020-12/schema"; +} + +function generateTestId(normalizedSchema, testData, testValid) { + return crypto + .createHash("md5") + .update(jsonStringify(normalizedSchema) + jsonStringify(testData) + testValid) + .digest("hex"); +} + +async function checkVersion(dir) { + const missingIdFiles = new Set(); + const duplicateIdFiles = new Set(); + const mismatchedIdFiles = new Set(); + const idMap = new Map(); + + console.log(`Checking tests in ${dir}...`); + + for (const file of jsonFiles(dir)) { + const tests = JSON.parse(fs.readFileSync(file, "utf8")); + + for (let i = 0; i < tests.length; i++) { + const testCase = tests[i]; + if (!Array.isArray(testCase.tests)) continue; + + const dialectUri = getDialectUri(testCase.schema || {}); + const normalizedSchema = await normalize(testCase.schema || true, dialectUri); + + for (let j = 0; j < testCase.tests.length; j++) { + const test = testCase.tests[j]; + + if (!test.id) { + missingIdFiles.add(file); + console.log(` ✗ Missing ID: ${file} | ${testCase.description} | ${test.description}`); + continue; + } + + const expectedId = generateTestId(normalizedSchema, test.data, test.valid); + + if (test.id !== expectedId) { + mismatchedIdFiles.add(file); + console.log(` ✗ Mismatched ID: ${file}`); + console.log(` Test: ${testCase.description} | ${test.description}`); + console.log(` Current ID: ${test.id}`); + console.log(` Expected ID: ${expectedId}`); + } + + if (idMap.has(test.id)) { + const existing = idMap.get(test.id); + duplicateIdFiles.add(file); + duplicateIdFiles.add(existing.file); + console.log(` ✗ Duplicate ID: ${test.id}`); + console.log(` First: ${existing.file} | ${existing.testCase} | ${existing.test}`); + console.log(` Second: ${file} | ${testCase.description} | ${test.description}`); + } else { + idMap.set(test.id, { + file, + testCase: testCase.description, + test: test.description + }); + } + } + } + } + + console.log("\n" + "=".repeat(60)); + console.log("Summary:"); + console.log("=".repeat(60)); + + console.log("\nFiles with missing IDs:"); + if (missingIdFiles.size === 0) { + console.log(" ✓ None"); + } else { + for (const f of missingIdFiles) console.log(` - ${f}`); + } + + console.log("\nFiles with mismatched IDs:"); + if (mismatchedIdFiles.size === 0) { + console.log(" ✓ None"); + } else { + for (const f of mismatchedIdFiles) console.log(` - ${f}`); + } + + console.log("\nFiles with duplicate IDs:"); + if (duplicateIdFiles.size === 0) { + console.log(" ✓ None"); + } else { + for (const f of duplicateIdFiles) console.log(` - ${f}`); + } + + const hasErrors = missingIdFiles.size > 0 || mismatchedIdFiles.size > 0 || duplicateIdFiles.size > 0; + + console.log("\n" + "=".repeat(60)); + if (hasErrors) { + console.log("❌ Check failed - issues found"); + process.exit(1); + } else { + console.log("✅ All checks passed!"); + } +} + +// Load remotes +const remotesPaths = ["./remotes"]; +for (const dialectUri of Object.values(DIALECT_MAP)) { + for (const path of remotesPaths) { + if (fs.existsSync(path)) { + loadRemotes(dialectUri, path); + } + } +} + +const dir = process.argv[2] || "tests/draft2020-12"; +checkVersion(dir).catch(console.error); \ No newline at end of file diff --git a/scripts/load-remotes.js b/scripts/load-remotes.js new file mode 100644 index 00000000..f7ab7aff --- /dev/null +++ b/scripts/load-remotes.js @@ -0,0 +1,36 @@ +// scripts/load-remotes.js +import * as fs from "node:fs"; +import { toAbsoluteIri } from "@hyperjump/uri"; +import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; + +// Keep track of which remote URLs we've already registered +const loadedRemotes = new Set(); + +export const loadRemotes = (dialectId, filePath, url = "") => { + if (!fs.existsSync(filePath)) { + console.warn(`Warning: Remotes path not found: ${filePath}`); + return; + } + + fs.readdirSync(filePath, { withFileTypes: true }).forEach((entry) => { + if (entry.isFile() && entry.name.endsWith(".json")) { + const remotePath = `${filePath}/${entry.name}`; + const remoteUrl = `http://localhost:1234${url}/${entry.name}`; + + // If we've already registered this URL once, skip it + if (loadedRemotes.has(remoteUrl)) { + return; + } + + const remote = JSON.parse(fs.readFileSync(remotePath, "utf8")); + + // Only register if $schema matches dialect OR there's no $schema + if (!remote.$schema || toAbsoluteIri(remote.$schema) === dialectId) { + registerSchema(remote, remoteUrl, dialectId); + loadedRemotes.add(remoteUrl); // ✅ Remember we've registered it + } + } else if (entry.isDirectory()) { + loadRemotes(dialectId, `${filePath}/${entry.name}`, `${url}/${entry.name}`); + } + }); +}; diff --git a/scripts/normalize.js b/scripts/normalize.js new file mode 100644 index 00000000..bad333fc --- /dev/null +++ b/scripts/normalize.js @@ -0,0 +1,212 @@ +import * as Schema from "@hyperjump/browser"; +import * as Pact from "@hyperjump/pact"; +import * as JsonPointer from "@hyperjump/json-pointer"; +import { toAbsoluteIri } from "@hyperjump/uri"; +import { registerSchema, unregisterSchema } from "@hyperjump/json-schema/draft-2020-12"; +import { getSchema, getKeywordId } from "@hyperjump/json-schema/experimental"; +import "@hyperjump/json-schema/draft-2019-09"; +import "@hyperjump/json-schema/draft-07"; +import "@hyperjump/json-schema/draft-06"; +import "@hyperjump/json-schema/draft-04"; + + +// =========================================== +// CHANGE #2 (ADDED): sanitize file:// $id +// =========================================== +const sanitizeTopLevelId = (schema) => { + if (typeof schema !== "object" || schema === null) return schema; + const copy = { ...schema }; + if (typeof copy.$id === "string" && copy.$id.startsWith("file:")) { + delete copy.$id; + } + return copy; +}; +// =========================================== + + +export const normalize = async (rawSchema, dialectUri) => { + const schemaUri = "https://test-suite.json-schema.org/main"; + + // =========================================== + // CHANGE #2 (APPLIED HERE) + // =========================================== + const safeSchema = sanitizeTopLevelId(rawSchema); + // =========================================== + + try { + // BEFORE: registerSchema(rawSchema, schemaUri, dialectUri) + registerSchema(safeSchema, schemaUri, dialectUri); + + const schema = await getSchema(schemaUri); + const ast = { metaData: {} }; + await compile(schema, ast); + return ast; + } finally { + unregisterSchema(schemaUri); + } +}; + +const compile = async (schema, ast) => { + if (!(schema.document.baseUri in ast.metaData)) { + ast.metaData[schema.document.baseUri] = { + anchors: schema.document.anchors, + dynamicAnchors: schema.document.dynamicAnchors + }; + } + + const url = canonicalUri(schema); + if (!(url in ast)) { + const schemaValue = Schema.value(schema); + if (!["object", "boolean"].includes(typeof schemaValue)) { + throw Error(`No schema found at '${url}'`); + } + + if (typeof schemaValue === "boolean") { + ast[url] = schemaValue; + } else { + ast[url] = []; + for await (const [keyword, keywordSchema] of Schema.entries(schema)) { + const keywordUri = getKeywordId(keyword, schema.document.dialectId); + if (!keywordUri || keywordUri === "https://json-schema.org/keyword/comment") { + continue; + } + + ast[url].push({ + keyword: keywordUri, + location: JsonPointer.append(keyword, canonicalUri(schema)), + value: await getKeywordHandler(keywordUri)(keywordSchema, ast, schema) + }); + } + } + } + + return url; +}; + +const canonicalUri = (schema) => `${schema.document.baseUri}#${encodeURI(schema.cursor)}`; + +const getKeywordHandler = (keywordUri) => { + if (keywordUri in keywordHandlers) { + return keywordHandlers[keywordUri]; + } else if (keywordUri.startsWith("https://json-schema.org/keyword/unknown#")) { + return keywordHandlers["https://json-schema.org/keyword/unknown"]; + } else { + throw Error(`Missing handler for keyword: ${keywordUri}`); + } +}; + +const simpleValue = (keyword) => Schema.value(keyword); + +const simpleApplicator = (keyword, ast) => compile(keyword, ast); + +const objectApplicator = (keyword, ast) => { + return Pact.pipe( + Schema.entries(keyword), + Pact.asyncMap(async ([propertyName, subSchema]) => [propertyName, await compile(subSchema, ast)]), + Pact.asyncCollectObject + ); +}; + +const arrayApplicator = (keyword, ast) => { + return Pact.pipe( + Schema.iter(keyword), + Pact.asyncMap(async (subSchema) => await compile(subSchema, ast)), + Pact.asyncCollectArray + ); +}; + +const keywordHandlers = { + "https://json-schema.org/keyword/additionalProperties": simpleApplicator, + "https://json-schema.org/keyword/allOf": arrayApplicator, + "https://json-schema.org/keyword/anyOf": arrayApplicator, + "https://json-schema.org/keyword/const": simpleValue, + "https://json-schema.org/keyword/contains": simpleApplicator, + "https://json-schema.org/keyword/contentEncoding": simpleValue, + "https://json-schema.org/keyword/contentMediaType": simpleValue, + "https://json-schema.org/keyword/contentSchema": simpleApplicator, + "https://json-schema.org/keyword/default": simpleValue, + "https://json-schema.org/keyword/definitions": objectApplicator, + "https://json-schema.org/keyword/dependentRequired": simpleValue, + "https://json-schema.org/keyword/dependentSchemas": objectApplicator, + "https://json-schema.org/keyword/deprecated": simpleValue, + "https://json-schema.org/keyword/description": simpleValue, + "https://json-schema.org/keyword/dynamicRef": simpleValue, // base dynamicRef + + // =========================================== + // CHANGE #1 (ADDED): draft-2020-12/dynamicRef + // =========================================== + "https://json-schema.org/keyword/draft-2020-12/dynamicRef": simpleValue, + // =========================================== + + "https://json-schema.org/keyword/else": simpleApplicator, + "https://json-schema.org/keyword/enum": simpleValue, + "https://json-schema.org/keyword/examples": simpleValue, + "https://json-schema.org/keyword/exclusiveMaximum": simpleValue, + "https://json-schema.org/keyword/exclusiveMinimum": simpleValue, + "https://json-schema.org/keyword/if": simpleApplicator, + "https://json-schema.org/keyword/items": simpleApplicator, + "https://json-schema.org/keyword/maxContains": simpleValue, + "https://json-schema.org/keyword/maxItems": simpleValue, + "https://json-schema.org/keyword/maxLength": simpleValue, + "https://json-schema.org/keyword/maxProperties": simpleValue, + "https://json-schema.org/keyword/maximum": simpleValue, + "https://json-schema.org/keyword/minContains": simpleValue, + "https://json-schema.org/keyword/minItems": simpleValue, + "https://json-schema.org/keyword/minLength": simpleValue, + "https://json-schema.org/keyword/minProperties": simpleValue, + "https://json-schema.org/keyword/minimum": simpleValue, + "https://json-schema.org/keyword/multipleOf": simpleValue, + "https://json-schema.org/keyword/not": simpleApplicator, + "https://json-schema.org/keyword/oneOf": arrayApplicator, + "https://json-schema.org/keyword/pattern": simpleValue, + "https://json-schema.org/keyword/patternProperties": objectApplicator, + "https://json-schema.org/keyword/prefixItems": arrayApplicator, + "https://json-schema.org/keyword/properties": objectApplicator, + "https://json-schema.org/keyword/propertyNames": simpleApplicator, + "https://json-schema.org/keyword/readOnly": simpleValue, + "https://json-schema.org/keyword/ref": compile, + "https://json-schema.org/keyword/required": simpleValue, + "https://json-schema.org/keyword/title": simpleValue, + "https://json-schema.org/keyword/then": simpleApplicator, + "https://json-schema.org/keyword/type": simpleValue, + "https://json-schema.org/keyword/unevaluatedItems": simpleApplicator, + "https://json-schema.org/keyword/unevaluatedProperties": simpleApplicator, + "https://json-schema.org/keyword/uniqueItems": simpleValue, + "https://json-schema.org/keyword/unknown": simpleValue, + "https://json-schema.org/keyword/writeOnly": simpleValue, + + "https://json-schema.org/keyword/draft-2020-12/format": simpleValue, + "https://json-schema.org/keyword/draft-2020-12/format-assertion": simpleValue, + + "https://json-schema.org/keyword/draft-2019-09/formatAssertion": simpleValue, + "https://json-schema.org/keyword/draft-2019-09/format": simpleValue, + + "https://json-schema.org/keyword/draft-07/format": simpleValue, + + "https://json-schema.org/keyword/draft-06/contains": simpleApplicator, + "https://json-schema.org/keyword/draft-06/format": simpleValue, + + "https://json-schema.org/keyword/draft-04/additionalItems": simpleApplicator, + "https://json-schema.org/keyword/draft-04/dependencies": (keyword, ast) => { + return Pact.pipe( + Schema.entries(keyword), + Pact.asyncMap(async ([propertyName, schema]) => { + return [ + propertyName, + Schema.typeOf(schema) === "array" ? Schema.value(schema) : await compile(schema, ast) + ]; + }), + Pact.asyncCollectObject + ); + }, + "https://json-schema.org/keyword/draft-04/exclusiveMaximum": simpleValue, + "https://json-schema.org/keyword/draft-04/exclusiveMinimum": simpleValue, + "https://json-schema.org/keyword/draft-04/format": simpleValue, + "https://json-schema.org/keyword/draft-04/items": (keyword, ast) => { + return Schema.typeOf(keyword) === "array" + ? arrayApplicator(keyword, ast) + : simpleApplicator(keyword, ast); + }, + "https://json-schema.org/keyword/draft-04/maximum": simpleValue, + "https://json-schema.org/keyword/draft-04/minimum": simpleValue +}; diff --git a/tests/draft2020-12/enum.json b/tests/draft2020-12/enum.json index c8f35eac..9b87484b 100644 --- a/tests/draft2020-12/enum.json +++ b/tests/draft2020-12/enum.json @@ -1,358 +1,501 @@ [ - { - "description": "simple enum validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [1, 2, 3] - }, - "tests": [ - { - "description": "one of the enum is valid", - "data": 1, - "valid": true - }, - { - "description": "something else is invalid", - "data": 4, - "valid": false - } - ] + { + "description": "simple enum validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 1, + 2, + 3 + ] }, - { - "description": "heterogeneous enum validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [6, "foo", [], true, {"foo": 12}] - }, - "tests": [ - { - "description": "one of the enum is valid", - "data": [], - "valid": true - }, - { - "description": "something else is invalid", - "data": null, - "valid": false - }, - { - "description": "objects are deep compared", - "data": {"foo": false}, - "valid": false - }, - { - "description": "valid object matches", - "data": {"foo": 12}, - "valid": true - }, - { - "description": "extra properties in object is invalid", - "data": {"foo": 12, "boo": 42}, - "valid": false - } - ] + "tests": [ + { + "description": "one of the enum is valid", + "data": 1, + "valid": true, + "id": "bc16cb75d14903a732326a24d1416757" + }, + { + "description": "something else is invalid", + "data": 4, + "valid": false, + "id": "2ea4a168ef00d32d444b3d49dc5a617d" + } + ] + }, + { + "description": "heterogeneous enum validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 6, + "foo", + [], + true, + { + "foo": 12 + } + ] }, - { - "description": "heterogeneous enum-with-null validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [6, null] + "tests": [ + { + "description": "one of the enum is valid", + "data": [], + "valid": true, + "id": "e31a02b023906271a7f40576a03df0de" + }, + { + "description": "something else is invalid", + "data": null, + "valid": false, + "id": "b47e0170004d316b00a5151b0d2b566c" + }, + { + "description": "objects are deep compared", + "data": { + "foo": false }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true - }, - { - "description": "number is valid", - "data": 6, - "valid": true - }, - { - "description": "something else is invalid", - "data": "test", - "valid": false - } - ] - }, - { - "description": "enums in properties", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type":"object", - "properties": { - "foo": {"enum":["foo"]}, - "bar": {"enum":["bar"]} - }, - "required": ["bar"] + "valid": false, + "id": "7285822674e57f31de9c7280fa9d8900" + }, + { + "description": "valid object matches", + "data": { + "foo": 12 }, - "tests": [ - { - "description": "both properties are valid", - "data": {"foo":"foo", "bar":"bar"}, - "valid": true - }, - { - "description": "wrong foo value", - "data": {"foo":"foot", "bar":"bar"}, - "valid": false - }, - { - "description": "wrong bar value", - "data": {"foo":"foo", "bar":"bart"}, - "valid": false - }, - { - "description": "missing optional property is valid", - "data": {"bar":"bar"}, - "valid": true - }, - { - "description": "missing required property is invalid", - "data": {"foo":"foo"}, - "valid": false - }, - { - "description": "missing all properties is invalid", - "data": {}, - "valid": false - } - ] - }, - { - "description": "enum with escaped characters", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": ["foo\nbar", "foo\rbar"] + "valid": true, + "id": "27ffbacf5774ff2354458a6954ed1591" + }, + { + "description": "extra properties in object is invalid", + "data": { + "foo": 12, + "boo": 42 }, - "tests": [ - { - "description": "member 1 is valid", - "data": "foo\nbar", - "valid": true - }, - { - "description": "member 2 is valid", - "data": "foo\rbar", - "valid": true - }, - { - "description": "another string is invalid", - "data": "abc", - "valid": false - } - ] + "valid": false, + "id": "e220c92cdef194c74c49f9b7eb86b211" + } + ] + }, + { + "description": "heterogeneous enum-with-null validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 6, + null + ] }, - { - "description": "enum with false does not match 0", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [false] + "tests": [ + { + "description": "null is valid", + "data": null, + "valid": true, + "id": "326f454f3db2a5fb76d797b43c812285" + }, + { + "description": "number is valid", + "data": 6, + "valid": true, + "id": "9884c0daef3095b4ff88c309bc87a620" + }, + { + "description": "something else is invalid", + "data": "test", + "valid": false, + "id": "4032c1754a28b94e914f8dfea1e12a26" + } + ] + }, + { + "description": "enums in properties", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "foo": { + "enum": [ + "foo" + ] }, - "tests": [ - { - "description": "false is valid", - "data": false, - "valid": true - }, - { - "description": "integer zero is invalid", - "data": 0, - "valid": false - }, - { - "description": "float zero is invalid", - "data": 0.0, - "valid": false - } - ] + "bar": { + "enum": [ + "bar" + ] + } + }, + "required": [ + "bar" + ] }, - { - "description": "enum with [false] does not match [0]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [[false]] + "tests": [ + { + "description": "both properties are valid", + "data": { + "foo": "foo", + "bar": "bar" }, - "tests": [ - { - "description": "[false] is valid", - "data": [false], - "valid": true - }, - { - "description": "[0] is invalid", - "data": [0], - "valid": false - }, - { - "description": "[0.0] is invalid", - "data": [0.0], - "valid": false - } - ] - }, - { - "description": "enum with true does not match 1", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [true] + "valid": true, + "id": "dba127f9663272184ec3ea3072676b4d" + }, + { + "description": "wrong foo value", + "data": { + "foo": "foot", + "bar": "bar" }, - "tests": [ - { - "description": "true is valid", - "data": true, - "valid": true - }, - { - "description": "integer one is invalid", - "data": 1, - "valid": false - }, - { - "description": "float one is invalid", - "data": 1.0, - "valid": false - } - ] - }, - { - "description": "enum with [true] does not match [1]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [[true]] + "valid": false, + "id": "0f0cca9923128d29922561fe7d92a436" + }, + { + "description": "wrong bar value", + "data": { + "foo": "foo", + "bar": "bart" }, - "tests": [ - { - "description": "[true] is valid", - "data": [true], - "valid": true - }, - { - "description": "[1] is invalid", - "data": [1], - "valid": false - }, - { - "description": "[1.0] is invalid", - "data": [1.0], - "valid": false - } - ] - }, - { - "description": "enum with 0 does not match false", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [0] + "valid": false, + "id": "d32cef9094b8a87100a57cee099310d4" + }, + { + "description": "missing optional property is valid", + "data": { + "bar": "bar" }, - "tests": [ - { - "description": "false is invalid", - "data": false, - "valid": false - }, - { - "description": "integer zero is valid", - "data": 0, - "valid": true - }, - { - "description": "float zero is valid", - "data": 0.0, - "valid": true - } - ] - }, - { - "description": "enum with [0] does not match [false]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [[0]] + "valid": true, + "id": "23a7c86ef0b1e3cac9ebb6175de888d0" + }, + { + "description": "missing required property is invalid", + "data": { + "foo": "foo" }, - "tests": [ - { - "description": "[false] is invalid", - "data": [false], - "valid": false - }, - { - "description": "[0] is valid", - "data": [0], - "valid": true - }, - { - "description": "[0.0] is valid", - "data": [0.0], - "valid": true - } + "valid": false, + "id": "61ac5943d52ba688c77e26a1a7b5d174" + }, + { + "description": "missing all properties is invalid", + "data": {}, + "valid": false, + "id": "8b7be28a144634955b915ad780f4f2a5" + } + ] + }, + { + "description": "enum with escaped characters", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + "foo\nbar", + "foo\rbar" + ] + }, + "tests": [ + { + "description": "member 1 is valid", + "data": "foo\nbar", + "valid": true, + "id": "056ae2b9aad469dd32a63b1c97716c6e" + }, + { + "description": "member 2 is valid", + "data": "foo\rbar", + "valid": true, + "id": "ade764a27bb0fed294cefb1b6b275cd5" + }, + { + "description": "another string is invalid", + "data": "abc", + "valid": false, + "id": "1faca62e488e50dc47de0b3a26751477" + } + ] + }, + { + "description": "enum with false does not match 0", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + false + ] + }, + "tests": [ + { + "description": "false is valid", + "data": false, + "valid": true, + "id": "4e5b4da53732e4fdeaa5ed74127363bc" + }, + { + "description": "integer zero is invalid", + "data": 0, + "valid": false, + "id": "24f12f5bf7ae6be32a9634be17835176" + }, + { + "description": "float zero is invalid", + "data": 0, + "valid": false, + "id": "24f12f5bf7ae6be32a9634be17835176" + } + ] + }, + { + "description": "enum with [false] does not match [0]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + false ] + ] }, - { - "description": "enum with 1 does not match true", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [1] - }, - "tests": [ - { - "description": "true is invalid", - "data": true, - "valid": false - }, - { - "description": "integer one is valid", - "data": 1, - "valid": true - }, - { - "description": "float one is valid", - "data": 1.0, - "valid": true - } + "tests": [ + { + "description": "[false] is valid", + "data": [ + false + ], + "valid": true, + "id": "9fe1fb5471d006782fe7ead4aa9909fa" + }, + { + "description": "[0] is invalid", + "data": [ + 0 + ], + "valid": false, + "id": "8fc4591c8c9ddf9bd41a234d5fa24521" + }, + { + "description": "[0.0] is invalid", + "data": [ + 0 + ], + "valid": false, + "id": "8fc4591c8c9ddf9bd41a234d5fa24521" + } + ] + }, + { + "description": "enum with true does not match 1", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + true + ] + }, + "tests": [ + { + "description": "true is valid", + "data": true, + "valid": true, + "id": "71738e4d71680e268bbee31fc43a4932" + }, + { + "description": "integer one is invalid", + "data": 1, + "valid": false, + "id": "e8901b103bcc1340391efd3e02420500" + }, + { + "description": "float one is invalid", + "data": 1, + "valid": false, + "id": "e8901b103bcc1340391efd3e02420500" + } + ] + }, + { + "description": "enum with [true] does not match [1]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + true ] + ] }, - { - "description": "enum with [1] does not match [true]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [[1]] - }, - "tests": [ - { - "description": "[true] is invalid", - "data": [true], - "valid": false - }, - { - "description": "[1] is valid", - "data": [1], - "valid": true - }, - { - "description": "[1.0] is valid", - "data": [1.0], - "valid": true - } + "tests": [ + { + "description": "[true] is valid", + "data": [ + true + ], + "valid": true, + "id": "44049e91dee93b7dafd9cdbc0156a604" + }, + { + "description": "[1] is invalid", + "data": [ + 1 + ], + "valid": false, + "id": "f8b1b069fd03b04f07f5b70786cb916c" + }, + { + "description": "[1.0] is invalid", + "data": [ + 1 + ], + "valid": false, + "id": "f8b1b069fd03b04f07f5b70786cb916c" + } + ] + }, + { + "description": "enum with 0 does not match false", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 0 + ] + }, + "tests": [ + { + "description": "false is invalid", + "data": false, + "valid": false, + "id": "5cedc4948cc5d6744fa620039487ac15" + }, + { + "description": "integer zero is valid", + "data": 0, + "valid": true, + "id": "133e04205807df77ac09e730c237aba4" + }, + { + "description": "float zero is valid", + "data": 0, + "valid": true, + "id": "133e04205807df77ac09e730c237aba4" + } + ] + }, + { + "description": "enum with [0] does not match [false]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + 0 ] + ] }, - { - "description": "nul characters in strings", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ "hello\u0000there" ] - }, - "tests": [ - { - "description": "match string with nul", - "data": "hello\u0000there", - "valid": true - }, - { - "description": "do not match string lacking nul", - "data": "hellothere", - "valid": false - } + "tests": [ + { + "description": "[false] is invalid", + "data": [ + false + ], + "valid": false, + "id": "e6da8d988a7c265913e24eaed91af3de" + }, + { + "description": "[0] is valid", + "data": [ + 0 + ], + "valid": true, + "id": "10ba58a9539f8558892d28d2f5e3493d" + }, + { + "description": "[0.0] is valid", + "data": [ + 0 + ], + "valid": true, + "id": "10ba58a9539f8558892d28d2f5e3493d" + } + ] + }, + { + "description": "enum with 1 does not match true", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + 1 + ] + }, + "tests": [ + { + "description": "true is invalid", + "data": true, + "valid": false, + "id": "a8356b24823e955bc3895c25b9e442eb" + }, + { + "description": "integer one is valid", + "data": 1, + "valid": true, + "id": "603d6607a05072c21bcbff4578494e22" + }, + { + "description": "float one is valid", + "data": 1, + "valid": true, + "id": "603d6607a05072c21bcbff4578494e22" + } + ] + }, + { + "description": "enum with [1] does not match [true]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + 1 ] - } + ] + }, + "tests": [ + { + "description": "[true] is invalid", + "data": [ + true + ], + "valid": false, + "id": "732eec1f5b7fdf6d24c40d77072628e3" + }, + { + "description": "[1] is valid", + "data": [ + 1 + ], + "valid": true, + "id": "8064c0569b7c7a17631d0dc802090303" + }, + { + "description": "[1.0] is valid", + "data": [ + 1 + ], + "valid": true, + "id": "8064c0569b7c7a17631d0dc802090303" + } + ] + }, + { + "description": "nul characters in strings", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + "hello\u0000there" + ] + }, + "tests": [ + { + "description": "match string with nul", + "data": "hello\u0000there", + "valid": true, + "id": "d94ca2719908ab9c789d7c71e4cc93e4" + }, + { + "description": "do not match string lacking nul", + "data": "hellothere", + "valid": false, + "id": "a2c7a2aa3202a473dc03b5a8fcc070e9" + } + ] + } ] From 0ae5f26edca88456ef42a836e862f1a4c2d22281 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Tue, 25 Nov 2025 16:08:09 +0530 Subject: [PATCH 10/25] Allow optional id property on tests in test-schema --- test-schema.json | 224 ++++++++++++++++++++++++----------------------- 1 file changed, 114 insertions(+), 110 deletions(-) diff --git a/test-schema.json b/test-schema.json index 0087c5e3..fee5a644 100644 --- a/test-schema.json +++ b/test-schema.json @@ -1,124 +1,128 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/tests/test-schema", - "description": "A schema for files contained within this suite", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json-schema.org/tests/test-schema", + "description": "A schema for files contained within this suite", - "type": "array", - "minItems": 1, - "items": { - "description": "An individual test case, containing multiple tests of a single schema's behavior", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual test case, containing multiple tests of a single schema's behavior", - "type": "object", - "required": [ "description", "schema", "tests" ], - "properties": { - "description": { - "description": "The test case description", - "type": "string" + "type": "object", + "required": ["description", "schema", "tests"], + "properties": { + "description": { + "description": "The test case description", + "type": "string" + }, + "comment": { + "description": "Any additional comments about the test case", + "type": "string" + }, + "schema": { + "description": "A valid JSON Schema (one written for the corresponding version directory that the file sits within)." + }, + "tests": { + "description": "A set of related tests all using the same schema", + "type": "array", + "items": { "$ref": "#/$defs/test" }, + "minItems": 1 + }, + "specification": { + "description": "A reference to a specification document which defines the behavior tested by this test case. Typically this should be a JSON Schema specification document, though in cases where the JSON Schema specification points to another RFC it should contain *both* the portion of the JSON Schema specification which indicates what RFC (and section) to follow as *well* as information on where in that specification the behavior is specified.", + + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "properties": { + "core": { + "description": "A section in official JSON Schema core drafts", + "url": "https://json-schema.org/specification-links", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" }, - "comment": { - "description": "Any additional comments about the test case", - "type": "string" + "validation": { + "description": "A section in official JSON Schema validation drafts", + "url": "https://json-schema.org/specification-links", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" }, - "schema": { - "description": "A valid JSON Schema (one written for the corresponding version directory that the file sits within)." + "ecma262": { + "description": "A section in official ECMA 262 specification for defining regular expressions", + "url": "https://262.ecma-international.org/", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" }, - "tests": { - "description": "A set of related tests all using the same schema", - "type": "array", - "items": { "$ref": "#/$defs/test" }, - "minItems": 1 + "perl5": { + "description": "A section name in Perl documentation for defining regular expressions", + "url": "https://perldoc.perl.org/perlre", + "type": "string" }, - "specification":{ - "description": "A reference to a specification document which defines the behavior tested by this test case. Typically this should be a JSON Schema specification document, though in cases where the JSON Schema specification points to another RFC it should contain *both* the portion of the JSON Schema specification which indicates what RFC (and section) to follow as *well* as information on where in that specification the behavior is specified.", - - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items":{ - "properties": { - "core": { - "description": "A section in official JSON Schema core drafts", - "url": "https://json-schema.org/specification-links", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type":"string" - }, - "validation": { - "description": "A section in official JSON Schema validation drafts", - "url": "https://json-schema.org/specification-links", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type":"string" - }, - "ecma262": { - "description": "A section in official ECMA 262 specification for defining regular expressions", - "url": "https://262.ecma-international.org/", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type":"string" - }, - "perl5": { - "description": "A section name in Perl documentation for defining regular expressions", - "url": "https://perldoc.perl.org/perlre", - "type":"string" - }, - "quote": { - "description": "Quote describing the test case", - "type":"string" - } - }, - "patternProperties": { - "^rfc\\d+$": { - "description": "A section in official RFC for the given rfc number", - "url": "https://www.rfc-editor.org/", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type":"string" - }, - "^iso\\d+$": { - "description": "A section in official ISO for the given iso number", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" - } - }, - "additionalProperties": { "type": "string" }, - "minProperties": 1, - "propertyNames": { - "oneOf": [ - { - "pattern": "^((iso)|(rfc))[0-9]+$" - }, - { - "enum": [ "core", "validation", "ecma262", "perl5", "quote" ] - } - ] - } - } + "quote": { + "description": "Quote describing the test case", + "type": "string" } - }, - "additionalProperties": false + }, + "patternProperties": { + "^rfc\\d+$": { + "description": "A section in official RFC for the given rfc number", + "url": "https://www.rfc-editor.org/", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "^iso\\d+$": { + "description": "A section in official ISO for the given iso number", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + } + }, + "additionalProperties": { "type": "string" }, + "minProperties": 1, + "propertyNames": { + "oneOf": [ + { + "pattern": "^((iso)|(rfc))[0-9]+$" + }, + { + "enum": ["core", "validation", "ecma262", "perl5", "quote"] + } + ] + } + } + } }, + "additionalProperties": false + }, - "$defs": { - "test": { - "description": "A single test", + "$defs": { + "test": { + "description": "A single test", - "type": "object", - "required": [ "description", "data", "valid" ], - "properties": { - "description": { - "description": "The test description, briefly explaining which behavior it exercises", - "type": "string" - }, - "comment": { - "description": "Any additional comments about the test", - "type": "string" - }, - "data": { - "description": "The instance which should be validated against the schema in \"schema\"." - }, - "valid": { - "description": "Whether the validation process of this instance should consider the instance valid or not", - "type": "boolean" - } - }, - "additionalProperties": false + "type": "object", + "required": ["description", "data", "valid"], + "properties": { + "description": { + "description": "The test description, briefly explaining which behavior it exercises", + "type": "string" + }, + "comment": { + "description": "Any additional comments about the test", + "type": "string" + }, + "data": { + "description": "The instance which should be validated against the schema in \"schema\"." + }, + "valid": { + "description": "Whether the validation process of this instance should consider the instance valid or not", + "type": "boolean" + }, + "id": { + "description": "Stable identifier for this test", + "type": "string" } + }, + "additionalProperties": false } + } } From 44ab3053309e5f5c977e811602ac6449aa19e39d Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Wed, 17 Dec 2025 17:39:14 +0530 Subject: [PATCH 11/25] Fix script based on reviews --- scripts/add-test-ids.js | 75 ++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/scripts/add-test-ids.js b/scripts/add-test-ids.js index 295414e2..ce1ab879 100644 --- a/scripts/add-test-ids.js +++ b/scripts/add-test-ids.js @@ -5,20 +5,13 @@ import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; const DIALECT_MAP = { - "https://json-schema.org/draft/2020-12/schema": "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema": "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#": "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#": "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#": "http://json-schema.org/draft-04/schema#" + "draft2020-12": "https://json-schema.org/draft/2020-12/schema", + "draft2019-09": "https://json-schema.org/draft/2019-09/schema", + "draft7": "http://json-schema.org/draft-07/schema#", + "draft6": "http://json-schema.org/draft-06/schema#", + "draft4": "http://json-schema.org/draft-04/schema#" }; -function getDialectUri(schema) { - if (schema.$schema && DIALECT_MAP[schema.$schema]) { - return DIALECT_MAP[schema.$schema]; - } - return "https://json-schema.org/draft/2020-12/schema"; -} - function generateTestId(normalizedSchema, testData, testValid) { return crypto .createHash("md5") @@ -26,49 +19,55 @@ function generateTestId(normalizedSchema, testData, testValid) { .digest("hex"); } -async function addIdsToFile(filePath) { +async function addIdsToFile(filePath, dialectUri) { console.log("Reading:", filePath); const tests = JSON.parse(fs.readFileSync(filePath, "utf8")); - let changed = false; let added = 0; - if (!Array.isArray(tests)) { - console.log("Expected an array at top level, got:", typeof tests); - return; - } - for (const testCase of tests) { - if (!Array.isArray(testCase.tests)) continue; - - const dialectUri = getDialectUri(testCase.schema || {}); - const normalizedSchema = await normalize(testCase.schema || true, dialectUri); + // Pass dialectUri from directory, not from schema + // @hyperjump/json-schema handles the schema's $schema internally + const normalizedSchema = await normalize(testCase.schema, dialectUri); for (const test of testCase.tests) { if (!test.id) { test.id = generateTestId(normalizedSchema, test.data, test.valid); - changed = true; added++; } } } - if (changed) { - fs.writeFileSync(filePath, JSON.stringify(tests, null, 2) + "\n"); - console.log(`✓ Added ${added} IDs`); + if (added > 0) { + fs.writeFileSync(filePath, JSON.stringify(tests, null, 4) + "\n"); + console.log(` Added ${added} IDs`); } else { - console.log("✓ All tests already have IDs"); + console.log(" All tests already have IDs"); } } -// Load remotes for all dialects -const remotesPaths = ["./remotes"]; -for (const dialectUri of Object.values(DIALECT_MAP)) { - for (const path of remotesPaths) { - if (fs.existsSync(path)) { - loadRemotes(dialectUri, path); - } - } +// Get dialect from command line argument (e.g., "draft2020-12") +const dialectArg = process.argv[2]; +if (!dialectArg || !DIALECT_MAP[dialectArg]) { + console.error("Usage: node add-test-ids.js [file-path]"); + console.error("Available dialects:", Object.keys(DIALECT_MAP).join(", ")); + process.exit(1); } -const filePath = process.argv[2] || "tests/draft2020-12/enum.json"; -addIdsToFile(filePath).catch(console.error); \ No newline at end of file +const dialectUri = DIALECT_MAP[dialectArg]; +const filePath = process.argv[3]; + +// Load remotes only for the specified dialect +loadRemotes(dialectUri, "./remotes"); + +if (filePath) { + // Process single file + addIdsToFile(filePath, dialectUri); +} else { + // Process all files in the dialect directory + const testDir = `tests/${dialectArg}`; + const files = fs.readdirSync(testDir).filter(f => f.endsWith('.json')); + + for (const file of files) { + await addIdsToFile(`${testDir}/${file}`, dialectUri); + } +} \ No newline at end of file From 927bd9bd7eb48b37cf7b2d91c4cd103eb8119dc8 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Tue, 6 Jan 2026 00:31:16 +0530 Subject: [PATCH 12/25] adding jsoc-parser and updating according to the reviews --- scripts/add-test-ids.js | 57 +++++++++++----- scripts/check-test-ids.js | 137 +++++++++++++++++++------------------- scripts/load-remotes.js | 15 ++++- 3 files changed, 121 insertions(+), 88 deletions(-) diff --git a/scripts/add-test-ids.js b/scripts/add-test-ids.js index ce1ab879..e0fd996d 100644 --- a/scripts/add-test-ids.js +++ b/scripts/add-test-ids.js @@ -1,9 +1,11 @@ import * as fs from "node:fs"; import * as crypto from "node:crypto"; import jsonStringify from "json-stringify-deterministic"; +import { parse, modify, applyEdits } from "jsonc-parser"; import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; + const DIALECT_MAP = { "draft2020-12": "https://json-schema.org/draft/2020-12/schema", "draft2019-09": "https://json-schema.org/draft/2019-09/schema", @@ -12,40 +14,67 @@ const DIALECT_MAP = { "draft4": "http://json-schema.org/draft-04/schema#" }; + function generateTestId(normalizedSchema, testData, testValid) { return crypto .createHash("md5") - .update(jsonStringify(normalizedSchema) + jsonStringify(testData) + testValid) + .update( + jsonStringify(normalizedSchema) + + jsonStringify(testData) + + testValid + ) .digest("hex"); } async function addIdsToFile(filePath, dialectUri) { console.log("Reading:", filePath); - const tests = JSON.parse(fs.readFileSync(filePath, "utf8")); + + const text = fs.readFileSync(filePath, "utf8"); + const tests = parse(text); + let edits = []; let added = 0; - for (const testCase of tests) { - // Pass dialectUri from directory, not from schema - // @hyperjump/json-schema handles the schema's $schema internally + for (let i = 0; i < tests.length; i++) { + const testCase = tests[i]; const normalizedSchema = await normalize(testCase.schema, dialectUri); - for (const test of testCase.tests) { + for (let j = 0; j < testCase.tests.length; j++) { + const test = testCase.tests[j]; + if (!test.id) { - test.id = generateTestId(normalizedSchema, test.data, test.valid); + const id = generateTestId( + normalizedSchema, + test.data, + test.valid + ); + + const path = [i, "tests", j, "id"]; + + edits.push( + ...modify(text, path, id, { + formattingOptions: { + insertSpaces: true, + tabSize: 2 + } + }) + ); + added++; } } } if (added > 0) { - fs.writeFileSync(filePath, JSON.stringify(tests, null, 4) + "\n"); + const updatedText = applyEdits(text, edits); + fs.writeFileSync(filePath, updatedText); console.log(` Added ${added} IDs`); } else { console.log(" All tests already have IDs"); } } -// Get dialect from command line argument (e.g., "draft2020-12") +//CLI stuff + const dialectArg = process.argv[2]; if (!dialectArg || !DIALECT_MAP[dialectArg]) { console.error("Usage: node add-test-ids.js [file-path]"); @@ -60,14 +89,12 @@ const filePath = process.argv[3]; loadRemotes(dialectUri, "./remotes"); if (filePath) { - // Process single file - addIdsToFile(filePath, dialectUri); + await addIdsToFile(filePath, dialectUri); } else { - // Process all files in the dialect directory const testDir = `tests/${dialectArg}`; - const files = fs.readdirSync(testDir).filter(f => f.endsWith('.json')); - + const files = fs.readdirSync(testDir).filter(f => f.endsWith(".json")); + for (const file of files) { await addIdsToFile(`${testDir}/${file}`, dialectUri); } -} \ No newline at end of file +} diff --git a/scripts/check-test-ids.js b/scripts/check-test-ids.js index feed6513..3001536d 100644 --- a/scripts/check-test-ids.js +++ b/scripts/check-test-ids.js @@ -5,13 +5,8 @@ import jsonStringify from "json-stringify-deterministic"; import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; -const DIALECT_MAP = { - "https://json-schema.org/draft/2020-12/schema": "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema": "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#": "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#": "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#": "http://json-schema.org/draft-04/schema#" -}; + +// Helpers function* jsonFiles(dir) { for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { @@ -24,102 +19,105 @@ function* jsonFiles(dir) { } } -function getDialectUri(schema) { - if (schema.$schema && DIALECT_MAP[schema.$schema]) { - return DIALECT_MAP[schema.$schema]; +function dialectFromDir(dir) { + const draft = path.basename(dir); + + switch (draft) { + case "draft2020-12": + return "https://json-schema.org/draft/2020-12/schema"; + case "draft2019-09": + return "https://json-schema.org/draft/2019-09/schema"; + case "draft7": + return "http://json-schema.org/draft-07/schema#"; + case "draft6": + return "http://json-schema.org/draft-06/schema#"; + case "draft4": + return "http://json-schema.org/draft-04/schema#"; + default: + throw new Error(`Unknown draft directory: ${draft}`); } - return "https://json-schema.org/draft/2020-12/schema"; } function generateTestId(normalizedSchema, testData, testValid) { return crypto .createHash("md5") - .update(jsonStringify(normalizedSchema) + jsonStringify(testData) + testValid) + .update( + jsonStringify(normalizedSchema) + + jsonStringify(testData) + + testValid + ) .digest("hex"); } + + async function checkVersion(dir) { const missingIdFiles = new Set(); - const duplicateIdFiles = new Set(); const mismatchedIdFiles = new Set(); - const idMap = new Map(); - console.log(`Checking tests in ${dir}...`); + const dialectUri = dialectFromDir(dir); - for (const file of jsonFiles(dir)) { - const tests = JSON.parse(fs.readFileSync(file, "utf8")); + console.log(`Checking tests in ${dir}...`); + console.log(`Using dialect: ${dialectUri}`); - for (let i = 0; i < tests.length; i++) { - const testCase = tests[i]; - if (!Array.isArray(testCase.tests)) continue; + // Load remotes ONCE for this dialect + const remotesPath = "./remotes"; + if (fs.existsSync(remotesPath)) { + loadRemotes(dialectUri, remotesPath); + } - const dialectUri = getDialectUri(testCase.schema || {}); - const normalizedSchema = await normalize(testCase.schema || true, dialectUri); + for (const file of jsonFiles(dir)) { + const testCases = JSON.parse(fs.readFileSync(file, "utf8")); - for (let j = 0; j < testCase.tests.length; j++) { - const test = testCase.tests[j]; + for (const testCase of testCases) { + const normalizedSchema = await normalize(testCase.schema, dialectUri); + for (const test of testCase.tests) { if (!test.id) { missingIdFiles.add(file); - console.log(` ✗ Missing ID: ${file} | ${testCase.description} | ${test.description}`); + console.log( + ` ✗ Missing ID: ${file} | ${testCase.description} | ${test.description}` + ); continue; } - const expectedId = generateTestId(normalizedSchema, test.data, test.valid); + const expectedId = generateTestId( + normalizedSchema, + test.data, + test.valid + ); if (test.id !== expectedId) { mismatchedIdFiles.add(file); console.log(` ✗ Mismatched ID: ${file}`); - console.log(` Test: ${testCase.description} | ${test.description}`); + console.log( + ` Test: ${testCase.description} | ${test.description}` + ); console.log(` Current ID: ${test.id}`); console.log(` Expected ID: ${expectedId}`); } - - if (idMap.has(test.id)) { - const existing = idMap.get(test.id); - duplicateIdFiles.add(file); - duplicateIdFiles.add(existing.file); - console.log(` ✗ Duplicate ID: ${test.id}`); - console.log(` First: ${existing.file} | ${existing.testCase} | ${existing.test}`); - console.log(` Second: ${file} | ${testCase.description} | ${test.description}`); - } else { - idMap.set(test.id, { - file, - testCase: testCase.description, - test: test.description - }); - } } } } + //Summary console.log("\n" + "=".repeat(60)); console.log("Summary:"); console.log("=".repeat(60)); console.log("\nFiles with missing IDs:"); - if (missingIdFiles.size === 0) { - console.log(" ✓ None"); - } else { - for (const f of missingIdFiles) console.log(` - ${f}`); - } + missingIdFiles.size === 0 + ? console.log(" ✓ None") + : [...missingIdFiles].forEach(f => console.log(` - ${f}`)); console.log("\nFiles with mismatched IDs:"); - if (mismatchedIdFiles.size === 0) { - console.log(" ✓ None"); - } else { - for (const f of mismatchedIdFiles) console.log(` - ${f}`); - } + mismatchedIdFiles.size === 0 + ? console.log(" ✓ None") + : [...mismatchedIdFiles].forEach(f => console.log(` - ${f}`)); - console.log("\nFiles with duplicate IDs:"); - if (duplicateIdFiles.size === 0) { - console.log(" ✓ None"); - } else { - for (const f of duplicateIdFiles) console.log(` - ${f}`); - } + const hasErrors = + missingIdFiles.size > 0 || mismatchedIdFiles.size > 0; - const hasErrors = missingIdFiles.size > 0 || mismatchedIdFiles.size > 0 || duplicateIdFiles.size > 0; - console.log("\n" + "=".repeat(60)); if (hasErrors) { console.log("❌ Check failed - issues found"); @@ -129,15 +127,14 @@ async function checkVersion(dir) { } } -// Load remotes -const remotesPaths = ["./remotes"]; -for (const dialectUri of Object.values(DIALECT_MAP)) { - for (const path of remotesPaths) { - if (fs.existsSync(path)) { - loadRemotes(dialectUri, path); - } - } + +// CLI + + +const dir = process.argv[2]; +if (!dir) { + console.error("Usage: node scripts/check-test-ids.js "); + process.exit(1); } -const dir = process.argv[2] || "tests/draft2020-12"; -checkVersion(dir).catch(console.error); \ No newline at end of file +await checkVersion(dir); diff --git a/scripts/load-remotes.js b/scripts/load-remotes.js index f7ab7aff..eb775cbf 100644 --- a/scripts/load-remotes.js +++ b/scripts/load-remotes.js @@ -17,20 +17,29 @@ export const loadRemotes = (dialectId, filePath, url = "") => { const remotePath = `${filePath}/${entry.name}`; const remoteUrl = `http://localhost:1234${url}/${entry.name}`; - // If we've already registered this URL once, skip it + // Skip if already registered if (loadedRemotes.has(remoteUrl)) { return; } const remote = JSON.parse(fs.readFileSync(remotePath, "utf8")); + // FIXEDhere + if (typeof remote.$id === "string" && remote.$id.startsWith("file:")) { + remote.$id = remote.$id.replace(/^file:/, "x-file:"); + } + // Only register if $schema matches dialect OR there's no $schema if (!remote.$schema || toAbsoluteIri(remote.$schema) === dialectId) { registerSchema(remote, remoteUrl, dialectId); - loadedRemotes.add(remoteUrl); // ✅ Remember we've registered it + loadedRemotes.add(remoteUrl); } } else if (entry.isDirectory()) { - loadRemotes(dialectId, `${filePath}/${entry.name}`, `${url}/${entry.name}`); + loadRemotes( + dialectId, + `${filePath}/${entry.name}`, + `${url}/${entry.name}` + ); } }); }; From 9ca9e3bc68bd661b6effa1e195ccb68d2a631338 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Fri, 9 Jan 2026 02:03:15 +0530 Subject: [PATCH 13/25] minor changes as per review --- node_modules/.bin/uuid | 16 + node_modules/.bin/uuid.cmd | 17 + node_modules/.bin/uuid.ps1 | 28 + node_modules/.package-lock.json | 156 ++ .../@hyperjump/browser/.gitattributes | 1 + node_modules/@hyperjump/browser/LICENCE | 21 + node_modules/@hyperjump/browser/README.md | 249 +++ node_modules/@hyperjump/browser/package.json | 57 + node_modules/@hyperjump/json-pointer/LICENSE | 21 + .../@hyperjump/json-pointer/README.md | 102 + .../@hyperjump/json-pointer/package.json | 32 + .../@hyperjump/json-schema-formats/LICENSE | 21 + .../@hyperjump/json-schema-formats/README.md | 42 + .../json-schema-formats/package.json | 60 + .../json-schema-formats/src/date-math.js | 120 ++ .../draft-bhutton-relative-json-pointer-00.js | 18 + .../json-schema-formats/src/ecma262.js | 13 + .../json-schema-formats/src/index.d.ts | 170 ++ .../json-schema-formats/src/index.js | 33 + .../json-schema-formats/src/rfc1123.js | 13 + .../json-schema-formats/src/rfc2673.js | 12 + .../json-schema-formats/src/rfc3339.js | 78 + .../json-schema-formats/src/rfc3986.js | 17 + .../json-schema-formats/src/rfc3987.js | 17 + .../json-schema-formats/src/rfc4122.js | 20 + .../json-schema-formats/src/rfc4291.js | 18 + .../json-schema-formats/src/rfc5321.js | 46 + .../json-schema-formats/src/rfc6531.js | 55 + .../json-schema-formats/src/rfc6570.js | 38 + .../json-schema-formats/src/rfc6901.js | 14 + .../json-schema-formats/src/uts46.js | 20 + node_modules/@hyperjump/json-schema/LICENSE | 21 + node_modules/@hyperjump/json-schema/README.md | 966 ++++++++++ .../annotations/annotated-instance.d.ts | 4 + .../annotations/annotated-instance.js | 20 + .../json-schema/annotations/index.d.ts | 21 + .../json-schema/annotations/index.js | 45 + .../json-schema/annotations/test-utils.d.ts | 1 + .../json-schema/annotations/test-utils.js | 38 + .../annotations/validation-error.js | 7 + .../@hyperjump/json-schema/bundle/index.d.ts | 14 + .../@hyperjump/json-schema/bundle/index.js | 83 + .../json-schema/draft-04/additionalItems.js | 38 + .../json-schema/draft-04/dependencies.js | 36 + .../json-schema/draft-04/exclusiveMaximum.js | 5 + .../json-schema/draft-04/exclusiveMinimum.js | 5 + .../@hyperjump/json-schema/draft-04/format.js | 31 + .../@hyperjump/json-schema/draft-04/id.js | 1 + .../json-schema/draft-04/index.d.ts | 43 + .../@hyperjump/json-schema/draft-04/index.js | 71 + .../@hyperjump/json-schema/draft-04/items.js | 57 + .../json-schema/draft-04/maximum.js | 25 + .../json-schema/draft-04/minimum.js | 25 + .../@hyperjump/json-schema/draft-04/ref.js | 1 + .../@hyperjump/json-schema/draft-04/schema.js | 149 ++ .../json-schema/draft-06/contains.js | 15 + .../@hyperjump/json-schema/draft-06/format.js | 34 + .../json-schema/draft-06/index.d.ts | 49 + .../@hyperjump/json-schema/draft-06/index.js | 70 + .../@hyperjump/json-schema/draft-06/schema.js | 154 ++ .../@hyperjump/json-schema/draft-07/format.js | 42 + .../json-schema/draft-07/index.d.ts | 55 + .../@hyperjump/json-schema/draft-07/index.js | 78 + .../@hyperjump/json-schema/draft-07/schema.js | 172 ++ .../draft-2019-09/format-assertion.js | 44 + .../json-schema/draft-2019-09/format.js | 44 + .../json-schema/draft-2019-09/index.d.ts | 66 + .../json-schema/draft-2019-09/index.js | 118 ++ .../draft-2019-09/meta/applicator.js | 55 + .../json-schema/draft-2019-09/meta/content.js | 17 + .../json-schema/draft-2019-09/meta/core.js | 57 + .../json-schema/draft-2019-09/meta/format.js | 14 + .../draft-2019-09/meta/meta-data.js | 37 + .../draft-2019-09/meta/validation.js | 98 + .../draft-2019-09/recursiveAnchor.js | 1 + .../json-schema/draft-2019-09/schema.js | 42 + .../draft-2020-12/dynamicAnchor.js | 1 + .../json-schema/draft-2020-12/dynamicRef.js | 38 + .../draft-2020-12/format-assertion.js | 43 + .../json-schema/draft-2020-12/format.js | 44 + .../json-schema/draft-2020-12/index.d.ts | 67 + .../json-schema/draft-2020-12/index.js | 126 ++ .../draft-2020-12/meta/applicator.js | 46 + .../json-schema/draft-2020-12/meta/content.js | 14 + .../json-schema/draft-2020-12/meta/core.js | 54 + .../draft-2020-12/meta/format-annotation.js | 11 + .../draft-2020-12/meta/format-assertion.js | 11 + .../draft-2020-12/meta/meta-data.js | 34 + .../draft-2020-12/meta/unevaluated.js | 12 + .../draft-2020-12/meta/validation.js | 95 + .../json-schema/draft-2020-12/schema.js | 44 + .../json-schema/formats/handlers/date-time.js | 7 + .../json-schema/formats/handlers/date.js | 7 + .../formats/handlers/draft-04/hostname.js | 7 + .../json-schema/formats/handlers/duration.js | 7 + .../json-schema/formats/handlers/email.js | 7 + .../json-schema/formats/handlers/hostname.js | 7 + .../json-schema/formats/handlers/idn-email.js | 7 + .../formats/handlers/idn-hostname.js | 7 + .../json-schema/formats/handlers/ipv4.js | 7 + .../json-schema/formats/handlers/ipv6.js | 7 + .../formats/handlers/iri-reference.js | 7 + .../json-schema/formats/handlers/iri.js | 7 + .../formats/handlers/json-pointer.js | 7 + .../json-schema/formats/handlers/regex.js | 7 + .../formats/handlers/relative-json-pointer.js | 7 + .../json-schema/formats/handlers/time.js | 7 + .../formats/handlers/uri-reference.js | 7 + .../formats/handlers/uri-template.js | 7 + .../json-schema/formats/handlers/uri.js | 7 + .../json-schema/formats/handlers/uuid.js | 7 + .../@hyperjump/json-schema/formats/index.js | 11 + .../@hyperjump/json-schema/formats/lite.js | 38 + .../json-schema/openapi-3-0/dialect.js | 174 ++ .../json-schema/openapi-3-0/discriminator.js | 10 + .../json-schema/openapi-3-0/example.js | 10 + .../json-schema/openapi-3-0/externalDocs.js | 10 + .../json-schema/openapi-3-0/index.d.ts | 298 +++ .../json-schema/openapi-3-0/index.js | 77 + .../json-schema/openapi-3-0/nullable.js | 10 + .../json-schema/openapi-3-0/schema.js | 1368 ++++++++++++++ .../json-schema/openapi-3-0/type.js | 22 + .../@hyperjump/json-schema/openapi-3-0/xml.js | 10 + .../json-schema/openapi-3-1/dialect/base.js | 22 + .../json-schema/openapi-3-1/index.d.ts | 364 ++++ .../json-schema/openapi-3-1/index.js | 49 + .../json-schema/openapi-3-1/meta/base.js | 77 + .../json-schema/openapi-3-1/schema-base.js | 33 + .../openapi-3-1/schema-draft-04.js | 33 + .../openapi-3-1/schema-draft-06.js | 33 + .../openapi-3-1/schema-draft-07.js | 33 + .../openapi-3-1/schema-draft-2019-09.js | 33 + .../openapi-3-1/schema-draft-2020-12.js | 33 + .../json-schema/openapi-3-1/schema.js | 1407 ++++++++++++++ .../json-schema/openapi-3-2/dialect/base.js | 22 + .../json-schema/openapi-3-2/index.d.ts | 415 ++++ .../json-schema/openapi-3-2/index.js | 47 + .../json-schema/openapi-3-2/meta/base.js | 102 + .../json-schema/openapi-3-2/schema-base.js | 32 + .../openapi-3-2/schema-draft-04.js | 33 + .../openapi-3-2/schema-draft-06.js | 33 + .../openapi-3-2/schema-draft-07.js | 33 + .../openapi-3-2/schema-draft-2019-09.js | 33 + .../openapi-3-2/schema-draft-2020-12.js | 33 + .../json-schema/openapi-3-2/schema.js | 1665 +++++++++++++++++ .../@hyperjump/json-schema/package.json | 83 + .../v1/extension-tests/conditional.json | 289 +++ .../v1/extension-tests/itemPattern.json | 462 +++++ .../@hyperjump/json-schema/v1/index.d.ts | 68 + .../@hyperjump/json-schema/v1/index.js | 116 ++ .../json-schema/v1/meta/applicator.js | 73 + .../@hyperjump/json-schema/v1/meta/content.js | 10 + .../@hyperjump/json-schema/v1/meta/core.js | 50 + .../@hyperjump/json-schema/v1/meta/format.js | 8 + .../json-schema/v1/meta/meta-data.js | 14 + .../json-schema/v1/meta/unevaluated.js | 9 + .../json-schema/v1/meta/validation.js | 65 + .../@hyperjump/json-schema/v1/schema.js | 24 + node_modules/@hyperjump/pact/LICENSE | 21 + node_modules/@hyperjump/pact/README.md | 76 + node_modules/@hyperjump/pact/package.json | 45 + node_modules/@hyperjump/pact/src/async.js | 24 + node_modules/@hyperjump/pact/src/curry.d.ts | 13 + node_modules/@hyperjump/pact/src/curry.js | 15 + node_modules/@hyperjump/pact/src/index.d.ts | 443 +++++ node_modules/@hyperjump/pact/src/index.js | 487 +++++ .../@hyperjump/pact/src/type-utils.d.ts | 5 + node_modules/@hyperjump/uri/LICENSE | 21 + node_modules/@hyperjump/uri/README.md | 129 ++ node_modules/@hyperjump/uri/package.json | 39 + node_modules/content-type/HISTORY.md | 29 + node_modules/content-type/LICENSE | 22 + node_modules/content-type/README.md | 94 + node_modules/content-type/index.js | 225 +++ node_modules/content-type/package.json | 42 + node_modules/idn-hostname/#/tests/0/0.json | 5 + node_modules/idn-hostname/#/tests/0/1.json | 5 + node_modules/idn-hostname/#/tests/0/10.json | 5 + node_modules/idn-hostname/#/tests/0/11.json | 5 + node_modules/idn-hostname/#/tests/0/12.json | 5 + node_modules/idn-hostname/#/tests/0/13.json | 5 + node_modules/idn-hostname/#/tests/0/14.json | 5 + node_modules/idn-hostname/#/tests/0/15.json | 5 + node_modules/idn-hostname/#/tests/0/16.json | 5 + node_modules/idn-hostname/#/tests/0/17.json | 5 + node_modules/idn-hostname/#/tests/0/18.json | 5 + node_modules/idn-hostname/#/tests/0/19.json | 5 + node_modules/idn-hostname/#/tests/0/2.json | 5 + node_modules/idn-hostname/#/tests/0/20.json | 6 + node_modules/idn-hostname/#/tests/0/21.json | 6 + node_modules/idn-hostname/#/tests/0/22.json | 6 + node_modules/idn-hostname/#/tests/0/23.json | 6 + node_modules/idn-hostname/#/tests/0/24.json | 6 + node_modules/idn-hostname/#/tests/0/25.json | 6 + node_modules/idn-hostname/#/tests/0/26.json | 6 + node_modules/idn-hostname/#/tests/0/27.json | 6 + node_modules/idn-hostname/#/tests/0/28.json | 6 + node_modules/idn-hostname/#/tests/0/29.json | 6 + node_modules/idn-hostname/#/tests/0/3.json | 5 + node_modules/idn-hostname/#/tests/0/30.json | 6 + node_modules/idn-hostname/#/tests/0/31.json | 6 + node_modules/idn-hostname/#/tests/0/32.json | 6 + node_modules/idn-hostname/#/tests/0/33.json | 6 + node_modules/idn-hostname/#/tests/0/34.json | 6 + node_modules/idn-hostname/#/tests/0/35.json | 6 + node_modules/idn-hostname/#/tests/0/36.json | 6 + node_modules/idn-hostname/#/tests/0/37.json | 6 + node_modules/idn-hostname/#/tests/0/38.json | 6 + node_modules/idn-hostname/#/tests/0/39.json | 6 + node_modules/idn-hostname/#/tests/0/4.json | 5 + node_modules/idn-hostname/#/tests/0/40.json | 6 + node_modules/idn-hostname/#/tests/0/41.json | 6 + node_modules/idn-hostname/#/tests/0/42.json | 6 + node_modules/idn-hostname/#/tests/0/43.json | 6 + node_modules/idn-hostname/#/tests/0/44.json | 6 + node_modules/idn-hostname/#/tests/0/45.json | 6 + node_modules/idn-hostname/#/tests/0/46.json | 6 + node_modules/idn-hostname/#/tests/0/47.json | 6 + node_modules/idn-hostname/#/tests/0/48.json | 6 + node_modules/idn-hostname/#/tests/0/49.json | 6 + node_modules/idn-hostname/#/tests/0/5.json | 5 + node_modules/idn-hostname/#/tests/0/50.json | 6 + node_modules/idn-hostname/#/tests/0/51.json | 6 + node_modules/idn-hostname/#/tests/0/52.json | 6 + node_modules/idn-hostname/#/tests/0/53.json | 6 + node_modules/idn-hostname/#/tests/0/54.json | 6 + node_modules/idn-hostname/#/tests/0/55.json | 6 + node_modules/idn-hostname/#/tests/0/56.json | 6 + node_modules/idn-hostname/#/tests/0/57.json | 6 + node_modules/idn-hostname/#/tests/0/58.json | 6 + node_modules/idn-hostname/#/tests/0/59.json | 6 + node_modules/idn-hostname/#/tests/0/6.json | 5 + node_modules/idn-hostname/#/tests/0/60.json | 6 + node_modules/idn-hostname/#/tests/0/61.json | 6 + node_modules/idn-hostname/#/tests/0/62.json | 6 + node_modules/idn-hostname/#/tests/0/63.json | 5 + node_modules/idn-hostname/#/tests/0/64.json | 5 + node_modules/idn-hostname/#/tests/0/65.json | 5 + node_modules/idn-hostname/#/tests/0/66.json | 5 + node_modules/idn-hostname/#/tests/0/67.json | 5 + node_modules/idn-hostname/#/tests/0/68.json | 5 + node_modules/idn-hostname/#/tests/0/69.json | 5 + node_modules/idn-hostname/#/tests/0/7.json | 5 + node_modules/idn-hostname/#/tests/0/70.json | 5 + node_modules/idn-hostname/#/tests/0/71.json | 5 + node_modules/idn-hostname/#/tests/0/72.json | 5 + node_modules/idn-hostname/#/tests/0/73.json | 5 + node_modules/idn-hostname/#/tests/0/74.json | 5 + node_modules/idn-hostname/#/tests/0/75.json | 5 + node_modules/idn-hostname/#/tests/0/76.json | 5 + node_modules/idn-hostname/#/tests/0/77.json | 5 + node_modules/idn-hostname/#/tests/0/78.json | 5 + node_modules/idn-hostname/#/tests/0/79.json | 5 + node_modules/idn-hostname/#/tests/0/8.json | 5 + node_modules/idn-hostname/#/tests/0/80.json | 5 + node_modules/idn-hostname/#/tests/0/81.json | 5 + node_modules/idn-hostname/#/tests/0/82.json | 5 + node_modules/idn-hostname/#/tests/0/83.json | 5 + node_modules/idn-hostname/#/tests/0/84.json | 5 + node_modules/idn-hostname/#/tests/0/85.json | 5 + node_modules/idn-hostname/#/tests/0/86.json | 5 + node_modules/idn-hostname/#/tests/0/87.json | 5 + node_modules/idn-hostname/#/tests/0/88.json | 5 + node_modules/idn-hostname/#/tests/0/89.json | 5 + node_modules/idn-hostname/#/tests/0/9.json | 5 + node_modules/idn-hostname/#/tests/0/90.json | 5 + node_modules/idn-hostname/#/tests/0/91.json | 5 + node_modules/idn-hostname/#/tests/0/92.json | 5 + node_modules/idn-hostname/#/tests/0/93.json | 5 + node_modules/idn-hostname/#/tests/0/94.json | 5 + node_modules/idn-hostname/#/tests/0/95.json | 6 + .../idn-hostname/#/tests/0/schema.json | 4 + node_modules/idn-hostname/LICENSE | 21 + .../idn-hostname/idnaMappingTableCompact.json | 1 + node_modules/idn-hostname/index.d.ts | 32 + node_modules/idn-hostname/index.js | 172 ++ node_modules/idn-hostname/package.json | 33 + node_modules/idn-hostname/readme.md | 302 +++ .../json-stringify-deterministic/LICENSE.md | 21 + .../json-stringify-deterministic/README.md | 143 ++ .../json-stringify-deterministic/package.json | 101 + node_modules/jsonc-parser/CHANGELOG.md | 76 + node_modules/jsonc-parser/LICENSE.md | 21 + node_modules/jsonc-parser/README.md | 364 ++++ node_modules/jsonc-parser/SECURITY.md | 41 + node_modules/jsonc-parser/package.json | 37 + node_modules/just-curry-it/CHANGELOG.md | 25 + node_modules/just-curry-it/LICENSE | 21 + node_modules/just-curry-it/README.md | 43 + node_modules/just-curry-it/index.cjs | 40 + node_modules/just-curry-it/index.d.ts | 18 + node_modules/just-curry-it/index.mjs | 42 + node_modules/just-curry-it/index.tests.ts | 72 + node_modules/just-curry-it/package.json | 32 + node_modules/just-curry-it/rollup.config.js | 3 + node_modules/punycode/LICENSE-MIT.txt | 20 + node_modules/punycode/README.md | 148 ++ node_modules/punycode/package.json | 58 + node_modules/punycode/punycode.es6.js | 444 +++++ node_modules/punycode/punycode.js | 443 +++++ node_modules/uuid/CHANGELOG.md | 274 +++ node_modules/uuid/CONTRIBUTING.md | 18 + node_modules/uuid/LICENSE.md | 9 + node_modules/uuid/README.md | 466 +++++ node_modules/uuid/package.json | 135 ++ node_modules/uuid/wrapper.mjs | 10 + package-lock.json | 172 ++ package.json | 3 + scripts/add-test-ids.js | 17 +- scripts/check-test-ids.js | 29 +- scripts/load-remotes.js | 18 +- scripts/normalize.js | 21 +- scripts/utils/generateTestIds.js | 13 + scripts/utils/jsonfiles.js | 11 + test-schema.json | 230 +-- tests/draft2020-12/enum.json | 860 ++++----- 316 files changed, 19804 insertions(+), 662 deletions(-) create mode 100644 node_modules/.bin/uuid create mode 100644 node_modules/.bin/uuid.cmd create mode 100644 node_modules/.bin/uuid.ps1 create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@hyperjump/browser/.gitattributes create mode 100644 node_modules/@hyperjump/browser/LICENCE create mode 100644 node_modules/@hyperjump/browser/README.md create mode 100644 node_modules/@hyperjump/browser/package.json create mode 100644 node_modules/@hyperjump/json-pointer/LICENSE create mode 100644 node_modules/@hyperjump/json-pointer/README.md create mode 100644 node_modules/@hyperjump/json-pointer/package.json create mode 100644 node_modules/@hyperjump/json-schema-formats/LICENSE create mode 100644 node_modules/@hyperjump/json-schema-formats/README.md create mode 100644 node_modules/@hyperjump/json-schema-formats/package.json create mode 100644 node_modules/@hyperjump/json-schema-formats/src/date-math.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/ecma262.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema-formats/src/index.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc1123.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc2673.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3339.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3986.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3987.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc4122.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc4291.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc5321.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6531.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6570.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6901.js create mode 100644 node_modules/@hyperjump/json-schema-formats/src/uts46.js create mode 100644 node_modules/@hyperjump/json-schema/LICENSE create mode 100644 node_modules/@hyperjump/json-schema/README.md create mode 100644 node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts create mode 100644 node_modules/@hyperjump/json-schema/annotations/annotated-instance.js create mode 100644 node_modules/@hyperjump/json-schema/annotations/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/annotations/index.js create mode 100644 node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts create mode 100644 node_modules/@hyperjump/json-schema/annotations/test-utils.js create mode 100644 node_modules/@hyperjump/json-schema/annotations/validation-error.js create mode 100644 node_modules/@hyperjump/json-schema/bundle/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/bundle/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/additionalItems.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/dependencies.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/id.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-04/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/items.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/maximum.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/minimum.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/ref.js create mode 100644 node_modules/@hyperjump/json-schema/draft-04/schema.js create mode 100644 node_modules/@hyperjump/json-schema/draft-06/contains.js create mode 100644 node_modules/@hyperjump/json-schema/draft-06/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-06/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-06/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-06/schema.js create mode 100644 node_modules/@hyperjump/json-schema/draft-07/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-07/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-07/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-07/schema.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/schema.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/format.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/index.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js create mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/schema.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/date-time.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/date.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/duration.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/email.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/hostname.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/iri.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/regex.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/time.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri.js create mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uuid.js create mode 100644 node_modules/@hyperjump/json-schema/formats/index.js create mode 100644 node_modules/@hyperjump/json-schema/formats/lite.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/example.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/index.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/schema.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/type.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/xml.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/index.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/index.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js create mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema.js create mode 100644 node_modules/@hyperjump/json-schema/package.json create mode 100644 node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json create mode 100644 node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json create mode 100644 node_modules/@hyperjump/json-schema/v1/index.d.ts create mode 100644 node_modules/@hyperjump/json-schema/v1/index.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/applicator.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/content.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/core.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/format.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/meta-data.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js create mode 100644 node_modules/@hyperjump/json-schema/v1/meta/validation.js create mode 100644 node_modules/@hyperjump/json-schema/v1/schema.js create mode 100644 node_modules/@hyperjump/pact/LICENSE create mode 100644 node_modules/@hyperjump/pact/README.md create mode 100644 node_modules/@hyperjump/pact/package.json create mode 100644 node_modules/@hyperjump/pact/src/async.js create mode 100644 node_modules/@hyperjump/pact/src/curry.d.ts create mode 100644 node_modules/@hyperjump/pact/src/curry.js create mode 100644 node_modules/@hyperjump/pact/src/index.d.ts create mode 100644 node_modules/@hyperjump/pact/src/index.js create mode 100644 node_modules/@hyperjump/pact/src/type-utils.d.ts create mode 100644 node_modules/@hyperjump/uri/LICENSE create mode 100644 node_modules/@hyperjump/uri/README.md create mode 100644 node_modules/@hyperjump/uri/package.json create mode 100644 node_modules/content-type/HISTORY.md create mode 100644 node_modules/content-type/LICENSE create mode 100644 node_modules/content-type/README.md create mode 100644 node_modules/content-type/index.js create mode 100644 node_modules/content-type/package.json create mode 100644 node_modules/idn-hostname/#/tests/0/0.json create mode 100644 node_modules/idn-hostname/#/tests/0/1.json create mode 100644 node_modules/idn-hostname/#/tests/0/10.json create mode 100644 node_modules/idn-hostname/#/tests/0/11.json create mode 100644 node_modules/idn-hostname/#/tests/0/12.json create mode 100644 node_modules/idn-hostname/#/tests/0/13.json create mode 100644 node_modules/idn-hostname/#/tests/0/14.json create mode 100644 node_modules/idn-hostname/#/tests/0/15.json create mode 100644 node_modules/idn-hostname/#/tests/0/16.json create mode 100644 node_modules/idn-hostname/#/tests/0/17.json create mode 100644 node_modules/idn-hostname/#/tests/0/18.json create mode 100644 node_modules/idn-hostname/#/tests/0/19.json create mode 100644 node_modules/idn-hostname/#/tests/0/2.json create mode 100644 node_modules/idn-hostname/#/tests/0/20.json create mode 100644 node_modules/idn-hostname/#/tests/0/21.json create mode 100644 node_modules/idn-hostname/#/tests/0/22.json create mode 100644 node_modules/idn-hostname/#/tests/0/23.json create mode 100644 node_modules/idn-hostname/#/tests/0/24.json create mode 100644 node_modules/idn-hostname/#/tests/0/25.json create mode 100644 node_modules/idn-hostname/#/tests/0/26.json create mode 100644 node_modules/idn-hostname/#/tests/0/27.json create mode 100644 node_modules/idn-hostname/#/tests/0/28.json create mode 100644 node_modules/idn-hostname/#/tests/0/29.json create mode 100644 node_modules/idn-hostname/#/tests/0/3.json create mode 100644 node_modules/idn-hostname/#/tests/0/30.json create mode 100644 node_modules/idn-hostname/#/tests/0/31.json create mode 100644 node_modules/idn-hostname/#/tests/0/32.json create mode 100644 node_modules/idn-hostname/#/tests/0/33.json create mode 100644 node_modules/idn-hostname/#/tests/0/34.json create mode 100644 node_modules/idn-hostname/#/tests/0/35.json create mode 100644 node_modules/idn-hostname/#/tests/0/36.json create mode 100644 node_modules/idn-hostname/#/tests/0/37.json create mode 100644 node_modules/idn-hostname/#/tests/0/38.json create mode 100644 node_modules/idn-hostname/#/tests/0/39.json create mode 100644 node_modules/idn-hostname/#/tests/0/4.json create mode 100644 node_modules/idn-hostname/#/tests/0/40.json create mode 100644 node_modules/idn-hostname/#/tests/0/41.json create mode 100644 node_modules/idn-hostname/#/tests/0/42.json create mode 100644 node_modules/idn-hostname/#/tests/0/43.json create mode 100644 node_modules/idn-hostname/#/tests/0/44.json create mode 100644 node_modules/idn-hostname/#/tests/0/45.json create mode 100644 node_modules/idn-hostname/#/tests/0/46.json create mode 100644 node_modules/idn-hostname/#/tests/0/47.json create mode 100644 node_modules/idn-hostname/#/tests/0/48.json create mode 100644 node_modules/idn-hostname/#/tests/0/49.json create mode 100644 node_modules/idn-hostname/#/tests/0/5.json create mode 100644 node_modules/idn-hostname/#/tests/0/50.json create mode 100644 node_modules/idn-hostname/#/tests/0/51.json create mode 100644 node_modules/idn-hostname/#/tests/0/52.json create mode 100644 node_modules/idn-hostname/#/tests/0/53.json create mode 100644 node_modules/idn-hostname/#/tests/0/54.json create mode 100644 node_modules/idn-hostname/#/tests/0/55.json create mode 100644 node_modules/idn-hostname/#/tests/0/56.json create mode 100644 node_modules/idn-hostname/#/tests/0/57.json create mode 100644 node_modules/idn-hostname/#/tests/0/58.json create mode 100644 node_modules/idn-hostname/#/tests/0/59.json create mode 100644 node_modules/idn-hostname/#/tests/0/6.json create mode 100644 node_modules/idn-hostname/#/tests/0/60.json create mode 100644 node_modules/idn-hostname/#/tests/0/61.json create mode 100644 node_modules/idn-hostname/#/tests/0/62.json create mode 100644 node_modules/idn-hostname/#/tests/0/63.json create mode 100644 node_modules/idn-hostname/#/tests/0/64.json create mode 100644 node_modules/idn-hostname/#/tests/0/65.json create mode 100644 node_modules/idn-hostname/#/tests/0/66.json create mode 100644 node_modules/idn-hostname/#/tests/0/67.json create mode 100644 node_modules/idn-hostname/#/tests/0/68.json create mode 100644 node_modules/idn-hostname/#/tests/0/69.json create mode 100644 node_modules/idn-hostname/#/tests/0/7.json create mode 100644 node_modules/idn-hostname/#/tests/0/70.json create mode 100644 node_modules/idn-hostname/#/tests/0/71.json create mode 100644 node_modules/idn-hostname/#/tests/0/72.json create mode 100644 node_modules/idn-hostname/#/tests/0/73.json create mode 100644 node_modules/idn-hostname/#/tests/0/74.json create mode 100644 node_modules/idn-hostname/#/tests/0/75.json create mode 100644 node_modules/idn-hostname/#/tests/0/76.json create mode 100644 node_modules/idn-hostname/#/tests/0/77.json create mode 100644 node_modules/idn-hostname/#/tests/0/78.json create mode 100644 node_modules/idn-hostname/#/tests/0/79.json create mode 100644 node_modules/idn-hostname/#/tests/0/8.json create mode 100644 node_modules/idn-hostname/#/tests/0/80.json create mode 100644 node_modules/idn-hostname/#/tests/0/81.json create mode 100644 node_modules/idn-hostname/#/tests/0/82.json create mode 100644 node_modules/idn-hostname/#/tests/0/83.json create mode 100644 node_modules/idn-hostname/#/tests/0/84.json create mode 100644 node_modules/idn-hostname/#/tests/0/85.json create mode 100644 node_modules/idn-hostname/#/tests/0/86.json create mode 100644 node_modules/idn-hostname/#/tests/0/87.json create mode 100644 node_modules/idn-hostname/#/tests/0/88.json create mode 100644 node_modules/idn-hostname/#/tests/0/89.json create mode 100644 node_modules/idn-hostname/#/tests/0/9.json create mode 100644 node_modules/idn-hostname/#/tests/0/90.json create mode 100644 node_modules/idn-hostname/#/tests/0/91.json create mode 100644 node_modules/idn-hostname/#/tests/0/92.json create mode 100644 node_modules/idn-hostname/#/tests/0/93.json create mode 100644 node_modules/idn-hostname/#/tests/0/94.json create mode 100644 node_modules/idn-hostname/#/tests/0/95.json create mode 100644 node_modules/idn-hostname/#/tests/0/schema.json create mode 100644 node_modules/idn-hostname/LICENSE create mode 100644 node_modules/idn-hostname/idnaMappingTableCompact.json create mode 100644 node_modules/idn-hostname/index.d.ts create mode 100644 node_modules/idn-hostname/index.js create mode 100644 node_modules/idn-hostname/package.json create mode 100644 node_modules/idn-hostname/readme.md create mode 100644 node_modules/json-stringify-deterministic/LICENSE.md create mode 100644 node_modules/json-stringify-deterministic/README.md create mode 100644 node_modules/json-stringify-deterministic/package.json create mode 100644 node_modules/jsonc-parser/CHANGELOG.md create mode 100644 node_modules/jsonc-parser/LICENSE.md create mode 100644 node_modules/jsonc-parser/README.md create mode 100644 node_modules/jsonc-parser/SECURITY.md create mode 100644 node_modules/jsonc-parser/package.json create mode 100644 node_modules/just-curry-it/CHANGELOG.md create mode 100644 node_modules/just-curry-it/LICENSE create mode 100644 node_modules/just-curry-it/README.md create mode 100644 node_modules/just-curry-it/index.cjs create mode 100644 node_modules/just-curry-it/index.d.ts create mode 100644 node_modules/just-curry-it/index.mjs create mode 100644 node_modules/just-curry-it/index.tests.ts create mode 100644 node_modules/just-curry-it/package.json create mode 100644 node_modules/just-curry-it/rollup.config.js create mode 100644 node_modules/punycode/LICENSE-MIT.txt create mode 100644 node_modules/punycode/README.md create mode 100644 node_modules/punycode/package.json create mode 100644 node_modules/punycode/punycode.es6.js create mode 100644 node_modules/punycode/punycode.js create mode 100644 node_modules/uuid/CHANGELOG.md create mode 100644 node_modules/uuid/CONTRIBUTING.md create mode 100644 node_modules/uuid/LICENSE.md create mode 100644 node_modules/uuid/README.md create mode 100644 node_modules/uuid/package.json create mode 100644 node_modules/uuid/wrapper.mjs create mode 100644 package-lock.json create mode 100644 scripts/utils/generateTestIds.js create mode 100644 scripts/utils/jsonfiles.js diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 100644 index 00000000..0c2d4696 --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@" +else + exec node "$basedir/../uuid/dist/bin/uuid" "$@" +fi diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd new file mode 100644 index 00000000..0f2376ea --- /dev/null +++ b/node_modules/.bin/uuid.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %* diff --git a/node_modules/.bin/uuid.ps1 b/node_modules/.bin/uuid.ps1 new file mode 100644 index 00000000..78046284 --- /dev/null +++ b/node_modules/.bin/uuid.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args + } else { + & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args + } else { + & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 00000000..a7b6eda0 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,156 @@ +{ + "name": "json-schema-test-suite", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@hyperjump/browser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.1.tgz", + "integrity": "sha512-Le5XZUjnVqVjkgLYv6yyWgALat/0HpB1XaCPuCZ+GCFki9NvXloSZITIJ0H+wRW7mb9At1SxvohKBbNQbrr/cw==", + "license": "MIT", + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.5", + "just-curry-it": "^5.3.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-pointer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.1.tgz", + "integrity": "sha512-M0T3s7TC2JepoWPMZQn1W6eYhFh06OXwpMqL+8c5wMVpvnCKNsPgpu9u7WyCI03xVQti8JAeAy4RzUa6SYlJLA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-schema": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.2.tgz", + "integrity": "sha512-pCysQu2kPZFcqyJmiU5JauzPHQIQa9i9F7+S5ui8OiwcdsBZUOjdY1rfSnqgaM5sNeR3akNVXKB/WgxNEnJrWw==", + "license": "MIT", + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/json-schema-formats": "^1.0.0", + "@hyperjump/pact": "^1.2.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.4", + "json-stringify-deterministic": "^1.0.12", + "just-curry-it": "^5.3.0", + "uuid": "^9.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "peerDependencies": { + "@hyperjump/browser": "^1.1.0" + } + }, + "node_modules/@hyperjump/json-schema-formats": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-formats/-/json-schema-formats-1.0.1.tgz", + "integrity": "sha512-qvcIxysnMfcPxyPSFFzzo28o2BN1CNT5b0tQXNUP0kaFpvptQNDg8SCLvlnMg2sYxuiuqna8+azGBaBthiskAw==", + "license": "MIT", + "dependencies": { + "@hyperjump/uri": "^1.3.2", + "idn-hostname": "^15.1.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/hyperjump-io" + } + }, + "node_modules/@hyperjump/pact": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.4.0.tgz", + "integrity": "sha512-01Q7VY6BcAkp9W31Fv+ciiZycxZHGlR2N6ba9BifgyclHYHdbaZgITo0U6QMhYRlem4k8pf8J31/tApxvqAz8A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/uri": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.2.tgz", + "integrity": "sha512-OFo5oxuSEz1ktF/LDdBTptlnPyZ66jywLO4fJRuAhnr7NGnsiL2CPoj1JRVaDqVy0nXvWNsC8O8Muw9DR++eEg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/idn-hostname": { + "version": "15.1.8", + "resolved": "https://registry.npmjs.org/idn-hostname/-/idn-hostname-15.1.8.tgz", + "integrity": "sha512-MmLwddtSVyMtzYxx+xs2IFEbfyg/facubL/mEaAoJX/XIfjt1ly5QhPByihf4yrxZYbkQfRZVEnBgISv/e2ZWw==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + } + }, + "node_modules/json-stringify-deterministic": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", + "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/just-curry-it": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", + "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==", + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + } + } +} diff --git a/node_modules/@hyperjump/browser/.gitattributes b/node_modules/@hyperjump/browser/.gitattributes new file mode 100644 index 00000000..fcadb2cf --- /dev/null +++ b/node_modules/@hyperjump/browser/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/node_modules/@hyperjump/browser/LICENCE b/node_modules/@hyperjump/browser/LICENCE new file mode 100644 index 00000000..6e9846cf --- /dev/null +++ b/node_modules/@hyperjump/browser/LICENCE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/browser/README.md b/node_modules/@hyperjump/browser/README.md new file mode 100644 index 00000000..10c09bdf --- /dev/null +++ b/node_modules/@hyperjump/browser/README.md @@ -0,0 +1,249 @@ +# Hyperjump - Browser + +The Hyperjump Browser is a generic client for traversing JSON Reference ([JRef]) +and other [JRef]-compatible media types in a way that abstracts the references +without loosing information. + +## Install + +This module is designed for node.js (ES Modules, TypeScript) and browsers. It +should work in Bun and Deno as well, but the test runner doesn't work in these +environments, so this module may be less stable in those environments. + +### Node.js + +```bash +npm install @hyperjump/browser +``` + +## JRef Browser + +This example uses the API at +[https://swapi.hyperjump.io](https://explore.hyperjump.io#https://swapi.hyperjump.io/api/films/1). +It's a variation of the [Star Wars API (SWAPI)](https://swapi.dev) implemented +using the [JRef] media type. + +```javascript +import { get, step, value, iter } from "@hyperjump/browser"; + +const aNewHope = await get("https://swapi.hyperjump.io/api/films/1"); +const characters = await get("#/characters", aNewHope); // Or +const characters = await step("characters", aNewHope); + +for await (const character of iter(characters)) { + const name = await step("name", character); + value(name); // => Luke Skywalker, etc. +} +``` + +You can also work with files on the file system. When working with files, media +types are determined by file extensions. The [JRef] media type uses the `.jref` +extension. + +```javascript +import { get, value } from "@hyperjump/browser"; + +const lukeSkywalker = await get("./api/people/1.jref"); // Paths resolve relative to the current working directory +const name = await step("name", lukeSkywalker); +value(name); // => Luke Skywalker +``` + +### API + +* get(uri: string, browser?: Browser): Promise\ + + Retrieve a document located at the given URI. Support for [JRef] is built + in. See the [Media Types](#media-type) section for information on how + to support other media types. Support for `http(s):` and `file:` URI schemes + are built in. See the [Uri Schemes](#uri-schemes) section for information on + how to support other URI schemes. +* value(browser: Browser) => JRef + + Get the JRef compatible value the document represents. +* typeOf(browser: Browser) => JRefType + + Works the same as the `typeof` keyword. It will return one of the JSON types + (null, boolean, number, string, array, object) or "reference". If the value + is not one of these types, it will throw an error. +* has(key: string, browser: Browser) => boolean + + Returns whether or not a property is present in the object that the browser + represents. +* length(browser: Browser) => number + + Get the length of the array that the browser represents. +* step(key: string | number, browser: Browser) => Promise\ + + Move the browser cursor by the given "key" value. This is analogous to + indexing into an object or array (`foo[key]`). This function supports + curried application. +* iter(browser: Browser) => AsyncGenerator\ + + Iterate over the items in the array that the document represents. +* entries(browser: Browser) => AsyncGenerator\<[string, Browser]> + + Similar to `Object.entries`, but yields Browsers for values. +* values(browser: Browser) => AsyncGenerator\ + + Similar to `Object.values`, but yields Browsers for values. +* keys(browser: Browser) => Generator\ + + Similar to `Object.keys`. + +## Media Types + +Support for the [JRef] media type is included by default, but you can add +support for any media type you like as long as it can be represented in a +[JRef]-compatible way. + +```javascript +import { addMediaTypePlugin, removeMediaTypePlugin, setMediaTypeQuality } from "@hyperjump/browser"; +import YAML from "yaml"; + +// Add support for YAML version of JRef (YRef) +addMediaTypePlugin("application/reference+yaml", { + parse: async (response) => { + return { + baseUri: response.url, + root: (response) => YAML.parse(await response.text(), (key, value) => { + return value !== null && typeof value.$ref === "string" + ? new Reference(value.$ref) + : value; + }, + anchorLocation: (fragment) => decodeUri(fragment ?? ""); + }; + }, + fileMatcher: (path) => path.endsWith(".jref") +}); + +// Prefer "YRef" over JRef by reducing the quality for JRef. +setMediaTypeQuality("application/reference+json", 0.9); + +// Only support YRef by removing JRef support. +removeMediaTypePlugin("application/reference+json"); +``` + +### API + +* addMediaTypePlugin(contentType: string, plugin: MediaTypePlugin): void + + Add support for additional media types. + + * type MediaTypePlugin + * parse: (response: Response) => Document + * [quality](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values): + number (defaults to `1`) +* removeMediaTypePlugin(contentType: string): void + + Removed support or a media type. +* setMediaTypeQuality(contentType: string, quality: number): void; + + Set the + [quality](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values) + that will be used in the + [Accept](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept) + header of requests to indicate to servers what media types are preferred + over others. +* acceptableMediaTypes(): string; + + Build an `Accept` request header from the registered media type plugins. + This function is used internally. You would only need it if you're writing a + custom `http(s):` URI scheme plugin. + +## URI Schemes + +By default, `http(s):` and `file:` URIs are supported. You can add support for +additional URI schemes using plugins. + +```javascript +import { addUriSchemePlugin, removeUriSchemePlugin, retrieve } from "@hyperjump/browser"; + +// Add support for the `urn:` scheme +addUriSchemePlugin("urn", { + parse: (urn, baseUri) => { + let { nid, nss, query, fragment } = parseUrn(urn); + nid = nid.toLowerCase(); + + if (!mappings[nid]?.[nss]) { + throw Error(`Not Found -- ${urn}`); + } + + let uri = mappings[nid][nss]; + uri += query ? "?" + query : ""; + uri += fragment ? "#" + fragment : ""; + + return retrieve(uri, baseUri); + } +}); + +// Only support `urn:` by removing default plugins +removeUriSchemePlugin("http"); +removeUriSchemePlugin("https"); +removeUriSchemePlugin("file"); +``` + +### API +* addUriSchemePlugin(scheme: string, plugin: UriSchemePlugin): void + + Add support for additional URI schemes. + + * type UriSchemePlugin + * retrieve: (uri: string, baseUri?: string) => Promise\ +* removeUriSchemePlugin(scheme: string): void + + Remove support for a URI scheme. +* retrieve(uri: string, baseUri?: string) => Promise\ + + This is used internally, but you may need it if mapping names to locators + such as in the example above. + +## JRef + +`parse` and `stringify` [JRef] values using the same API as the `JSON` built-in +functions including `reviver` and `replacer` functions. + +```javascript +import { parse, stringify, jrefTypeOf } from "@hyperjump/browser/jref"; + +const blogPostJref = `{ + "title": "Working with JRef", + "author": { "$ref": "/author/jdesrosiers" }, + "content": "lorem ipsum dolor sit amet", +}`; +const blogPost = parse(blogPostJref); +jrefTypeOf(blogPost.author) // => "reference" +blogPost.author.href; // => "/author/jdesrosiers" + +stringify(blogPost, null, " ") === blogPostJref // => true +``` + +### API +export type Replacer = (key: string, value: unknown) => unknown; + +* parse: (jref: string, reviver?: (key: string, value: unknown) => unknown) => JRef; + + Same as `JSON.parse`, but converts `{ "$ref": "..." }` to `Reference` + objects. +* stringify: (value: JRef, replacer?: (string | number)[] | null | Replacer, space?: string | number) => string; + + Same as `JSON.stringify`, but converts `Reference` objects to `{ "$ref": + "... " }` +* jrefTypeOf: (value: unknown) => "object" | "array" | "string" | "number" | "boolean" | "null" | "reference" | "undefined"; + +## Contributing + +### Tests + +Run the tests + +```bash +npm test +``` + +Run the tests with a continuous test runner + +```bash +npm test -- --watch +``` + +[JRef]: https://github.com/hyperjump-io/browser/blob/main/lib/jref/SPECIFICATION.md diff --git a/node_modules/@hyperjump/browser/package.json b/node_modules/@hyperjump/browser/package.json new file mode 100644 index 00000000..7749969e --- /dev/null +++ b/node_modules/@hyperjump/browser/package.json @@ -0,0 +1,57 @@ +{ + "name": "@hyperjump/browser", + "version": "1.3.1", + "description": "Browse JSON-compatible data with hypermedia references", + "type": "module", + "main": "./lib/index.js", + "exports": { + ".": "./lib/index.js", + "./jref": "./lib/jref/index.js" + }, + "browser": { + "./lib/index.js": "./lib/index.browser.js", + "./lib/browser/context-uri.js": "./lib/browser/context-uri.browser.js" + }, + "scripts": { + "clean": "xargs -a .gitignore rm -rf", + "lint": "eslint lib", + "type-check": "tsc --noEmit", + "test": "vitest --watch=false" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hyperjump-io/browser.git" + }, + "keywords": [ + "json", + "reference", + "jref", + "hypermedia", + "$ref" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "typescript": "*", + "typescript-eslint": "*", + "undici": "*", + "vitest": "*" + }, + "engines": { + "node": ">=18.0.0" + }, + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.5", + "just-curry-it": "^5.3.0" + } +} diff --git a/node_modules/@hyperjump/json-pointer/LICENSE b/node_modules/@hyperjump/json-pointer/LICENSE new file mode 100644 index 00000000..183e8491 --- /dev/null +++ b/node_modules/@hyperjump/json-pointer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/json-pointer/README.md b/node_modules/@hyperjump/json-pointer/README.md new file mode 100644 index 00000000..9ebf05db --- /dev/null +++ b/node_modules/@hyperjump/json-pointer/README.md @@ -0,0 +1,102 @@ +# JSON Pointer + +This is an implementation of RFC-6901 JSON Pointer. JSON Pointer is designed for +referring to data values within a JSON document. It's designed to be URL +friendly so it can be used as a URL fragment that points to a specific part of +the JSON document. + +## Installation + +Includes support for node.js (ES Modules, TypeScript) and browsers. + +```bash +npm install @hyperjump/json-pointer +``` + +## Usage + +```javascript +import * as JsonPointer from "@hyperjump/json-pointer"; + +const value = { + "foo": { + "bar": 42 + } +}; + +// Construct pointers +const fooPointer = JsonPointer.append("foo", JsonPointer.nil); // "/foo" +const fooBarPointer = JsonPointer.append(fooPointer, "bar"); // "/foo/bar" + +// Get a value from a pointer +const getFooBar = JsonPointer.get(fooBarPointer); +getFooBar(value); // 42 + +// Set a value from a pointer +// New value is returned without modifying the original +const setFooBar = JsonPointer.set(fooBarPointer); +setFooBar(value, 33); // { "foo": { "bar": 33 } } + +// Assign a value from a pointer +// The original value is changed and no value is returned +const assignFooBar = JsonPointer.assign(fooBarPointer); +assignFooBar(value, 33); // { "foo": { "bar": 33 } } + +// Unset a value from a pointer +// New value is returned without modifying the original +const unsetFooBar = JsonPointer.unset(fooBarPointer); +setFooBar(value); // { "foo": {} } + +// Delete a value from a pointer +// The original value is changed and no value is returned +const deleteFooBar = JsonPointer.remove(fooBarPointer); +deleteFooBar(value); // { "foo": {} } +``` + +## API + +* **nil**: "" + + The empty pointer. +* **pointerSegments**: (pointer: string) => Generator\ + + An iterator for the segments of a JSON Pointer that handles escaping. +* **append**: (segment: string, pointer: string) => string + + Append a segment to a JSON Pointer. +* **get**: (pointer: string, subject: any) => any + + Use a JSON Pointer to get a value. This function can be curried. +* **set**: (pointer: string, subject: any, value: any) => any + + Immutably set a value using a JSON Pointer. Returns a new version of + `subject` with the value set. The original `subject` is not changed, but the + value isn't entirely cloned. Values that aren't changed will point to + the same value as the original. This function can be curried. +* **assign**: (pointer: string, subject: any, value: any) => void + + Mutate a value using a JSON Pointer. This function can be curried. +* **unset**: (pointer: string, subject: any) => any + + Immutably delete a value using a JSON Pointer. Returns a new version of + `subject` without the value. The original `subject` is not changed, but the + value isn't entirely cloned. Values that aren't changed will point to the + same value as the original. This function can be curried. +* **remove**: (pointer: string, subject: any) => void + + Delete a value using a JSON Pointer. This function can be curried. + +## Contributing + +### Tests + +Run the tests + +```bash +npm test +``` + +Run the tests with a continuous test runner +```bash +npm test -- --watch +``` diff --git a/node_modules/@hyperjump/json-pointer/package.json b/node_modules/@hyperjump/json-pointer/package.json new file mode 100644 index 00000000..fd33dee0 --- /dev/null +++ b/node_modules/@hyperjump/json-pointer/package.json @@ -0,0 +1,32 @@ +{ + "name": "@hyperjump/json-pointer", + "version": "1.1.1", + "description": "An RFC-6901 JSON Pointer implementation", + "type": "module", + "main": "./lib/index.js", + "exports": "./lib/index.js", + "scripts": { + "lint": "eslint lib", + "test": "vitest --watch=false", + "type-check": "tsc --noEmit" + }, + "repository": "github:hyperjump-io/json-pointer", + "keywords": [ + "JSON Pointer", + "RFC-6901" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "typescript-eslint": "*", + "vitest": "*" + } +} diff --git a/node_modules/@hyperjump/json-schema-formats/LICENSE b/node_modules/@hyperjump/json-schema-formats/LICENSE new file mode 100644 index 00000000..82597103 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/json-schema-formats/README.md b/node_modules/@hyperjump/json-schema-formats/README.md new file mode 100644 index 00000000..a6d49704 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/README.md @@ -0,0 +1,42 @@ +# Hyperjump - JSON Schema Formats + +A collection of validation functions for the JSON Schema `format` keyword. + +## Install + +This module is designed for Node.js (ES Modules, TypeScript) and browsers. It +should work in Bun and Deno as well, but the test runner doesn't work in these +environments, so this module may be less stable in those environments. + +### Node.js + +```bash +npm install @hyperjump/json-schema-formats +``` + +### TypeScript + +This package uses the package.json "exports" field. [TypeScript understands +"exports"](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing), +but you need to change a couple settings in your `tsconfig.json` for it to work. + +```jsonc + "module": "Node16", // or "NodeNext" + "moduleResolution": "Node16", // or "NodeNext" +``` + +## API + + + +## Contributing + +Contributions are welcome! Please create an issue to propose and discuss any +changes you'd like to make before implementing it. If it's an obvious bug with +an obvious solution or something simple like a fixing a typo, creating an issue +isn't required. You can just send a PR without creating an issue. Before +submitting any code, please remember to first run the following tests. + +- `npm test` (Tests can also be run continuously using `npm test -- --watch`) +- `npm run lint` +- `npm run type-check` diff --git a/node_modules/@hyperjump/json-schema-formats/package.json b/node_modules/@hyperjump/json-schema-formats/package.json new file mode 100644 index 00000000..1e13b05b --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/package.json @@ -0,0 +1,60 @@ +{ + "name": "@hyperjump/json-schema-formats", + "version": "1.0.1", + "description": "A collection of validation functions for the JSON Schema `format` keyword.", + "keywords": [ + "JSON Schema", + "format", + "rfc3339", + "date", + "date-time", + "duration", + "email", + "hostname", + "idn-hostname", + "idn-email", + "ipv4", + "ipv6", + "iri", + "iri-reference", + "json-pointer", + "regex", + "relative-json-pointer", + "time", + "uri", + "uri-reference", + "uri-template", + "uuid" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "repository": "github:hyperjump-io/json-schema-formats", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/hyperjump-io" + }, + "type": "module", + "exports": { + ".": "./src/index.js" + }, + "scripts": { + "lint": "eslint src", + "test": "vitest run", + "type-check": "tsc --noEmit", + "docs": "typedoc --excludeExternals" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "json-schema-test-suite": "github:json-schema-org/json-schema-test-suite", + "typedoc": "*", + "typescript-eslint": "*", + "vitest": "*" + }, + "dependencies": { + "@hyperjump/uri": "^1.3.2", + "idn-hostname": "^15.1.2" + } +} diff --git a/node_modules/@hyperjump/json-schema-formats/src/date-math.js b/node_modules/@hyperjump/json-schema-formats/src/date-math.js new file mode 100644 index 00000000..60d28c72 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/date-math.js @@ -0,0 +1,120 @@ +/** @type (month: string, year: number) => number */ +export const daysInMonth = (month, year) => { + switch (month) { + case "01": + case "Jan": + case "03": + case "Mar": + case "05": + case "May": + case "07": + case "Jul": + case "08": + case "Aug": + case "10": + case "Oct": + case "12": + case "Dec": + return 31; + case "04": + case "Apr": + case "06": + case "Jun": + case "09": + case "Sep": + case "11": + case "Nov": + return 30; + case "02": + case "Feb": + return isLeapYear(year) ? 29 : 28; + default: + return 0; + } +}; + +/** @type (year: number) => boolean */ +export const isLeapYear = (year) => { + return (year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)); +}; + +/** @type (date: Date) => boolean */ +export const hasLeapSecond = (date) => { + const utcDate = `${date.getUTCFullYear()}-${date.getUTCMonth() + 1}-${date.getUTCDate()}`; + return leapSecondDates.has(utcDate) + && date.getUTCHours() === 23 + && date.getUTCMinutes() === 59; +}; + +const leapSecondDates = new Set([ + "1960-12-31", + "1961-07-31", + "1961-12-31", + "1963-10-31", + "1963-12-31", + "1964-03-31", + "1964-08-31", + "1964-12-31", + "1965-02-28", + "1965-06-30", + "1965-08-31", + "1965-12-31", + "1968-01-31", + "1971-12-31", + "1972-06-30", + "1972-12-31", + "1973-12-31", + "1974-12-31", + "1975-12-31", + "1976-12-31", + "1977-12-31", + "1978-12-31", + "1979-12-31", + "1981-06-30", + "1982-06-30", + "1983-06-30", + "1985-06-30", + "1987-12-31", + "1989-12-31", + "1990-12-31", + "1992-06-30", + "1993-06-30", + "1994-06-30", + "1995-12-31", + "1997-06-30", + "1998-12-31", + "2005-12-31", + "2008-12-31", + "2012-06-30", + "2015-06-30", + "2016-12-31" +]); + +/** @type (dayName: string) => number */ +export const dayOfWeekId = (dayName) => { + switch (dayName) { + case "Sun": + case "Sunday": + return 0; + case "Mon": + case "Monday": + return 1; + case "Tue": + case "Tuesday": + return 2; + case "Wed": + case "Wednesday": + return 3; + case "Thu": + case "Thursday": + return 4; + case "Fri": + case "Friday": + return 5; + case "Sat": + case "Saturday": + return 6; + default: + return -1; + } +}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js b/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js new file mode 100644 index 00000000..2b829b4f --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js @@ -0,0 +1,18 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const unescaped = `[\\u{00}-\\u{2E}\\u{30}-\\u{7D}\\u{7F}-\\u{10FFFF}]`; // %x2F ('/') and %x7E ('~') are excluded from 'unescaped' +const escaped = `~[01]`; // representing '~' and '/', respectively +const referenceToken = `(?:${unescaped}|${escaped})*`; +const jsonPointer = `(?:/${referenceToken})*`; + +const nonNegativeInteger = `(?:0|[1-9][0-9]*)`; +const indexManipulation = `(?:[+-]${nonNegativeInteger})`; +const relativeJsonPointer = `${nonNegativeInteger}(?:${indexManipulation}?${jsonPointer}|#)`; + +/** + * @type API.isRelativeJsonPointer + * @function + */ +export const isRelativeJsonPointer = RegExp.prototype.test.bind(new RegExp(`^${relativeJsonPointer}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/ecma262.js b/node_modules/@hyperjump/json-schema-formats/src/ecma262.js new file mode 100644 index 00000000..47a91ebe --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/ecma262.js @@ -0,0 +1,13 @@ +/** + * @import * as API from "./index.d.ts" + */ + +/** @type API.isRegex */ +export const isRegex = (regex) => { + try { + new RegExp(regex, "u"); + return true; + } catch (_error) { + return false; + } +}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/index.d.ts b/node_modules/@hyperjump/json-schema-formats/src/index.d.ts new file mode 100644 index 00000000..31df2b91 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/index.d.ts @@ -0,0 +1,170 @@ +/** + * The 'date' format. Validates that a string represents a date according to + * [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). + * + * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) + */ +export const isDate: (date: string) => boolean; + +/** + * The 'time' format. Validates that a string represents a time according to + * [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). + * + * **NOTE**: Leap seconds are only allowed on specific dates. Since there is no date + * in this context, leap seconds are never allowed. + * + * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) + */ +export const isTime: (time: string) => boolean; + +/** + * The 'date-time' format. Validates that a string represents a date-time + * according to [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). + * + * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) + */ +export const isDateTime: (dateTime: string) => boolean; + +/** + * The 'duration' format. Validates that a string represents a duration + * according to [RFC 3339, Appendix A](https://www.rfc-editor.org/rfc/rfc3339.html#appendix-A). + * + * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) + */ +export const isDuration: (duration: string) => boolean; + +/** + * The 'email' format. Validates that a string represents an email as defined by + * the "Mailbox" ABNF rule in [RFC 5321, section 4.1.2](https://www.rfc-editor.org/rfc/rfc5321.html#section-4.1.2). + * + * @see [JSON Schema Core, section 7.3.2](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.2) + */ +export const isEmail: (email: string) => boolean; + +/** + * The 'idn-email' format. Validates that a string represents an email as + * defined by the "Mailbox" ABNF rule in [RFC 6531, section 3.3](https://www.rfc-editor.org/rfc/rfc6531.html#section-3.3). + * + * @see [JSON Schema Core, section 7.3.2](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.2) + */ +export const isIdnEmail: (email: string) => boolean; + +/** + * The 'hostname' format in draft-04 - draft-06. Validates that a string + * represents a hostname as defined by [RFC 1123, section 2.1](https://www.rfc-editor.org/rfc/rfc1123.html#section-2.1). + * + * **NOTE**: The 'hostname' format changed in draft-07. Use {@link isAsciiIdn} for + * draft-07 and later. + * + * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) + */ +export const isHostname: (hostname: string) => boolean; + +/** + * The 'hostname' format since draft-07. Validates that a string represents an + * IDNA2008 internationalized domain name consiting of only A-labels and NR-LDH + * labels as defined by [RFC 5890, section 2.3.2.1](https://www.rfc-editor.org/rfc/rfc5890.html#section-2.3.2.3). + * + * **NOTE**: The 'hostname' format changed in draft-07. Use {@link isHostname} + * for draft-06 and earlier. + * + * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) + */ +export const isAsciiIdn: (hostname: string) => boolean; + +/** + * The 'idn-hostname' format. Validates that a string represents an IDNA2008 + * internationalized domain name as defined by [RFC 5890, section 2.3.2.1](https://www.rfc-editor.org/rfc/rfc5890.html#section-2.3.2.1). + * + * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) + */ +export const isIdn: (hostname: string) => boolean; + +/** + * The 'ipv4' format. Validates that a string represents an IPv4 address + * according to the "dotted-quad" ABNF syntax as defined in + * [RFC 2673, section 3.2](https://www.rfc-editor.org/rfc/rfc2673.html#section-3.2). + * + * @see [JSON Schema Core, section 7.3.4](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.4) + */ +export const isIPv4: (ip: string) => boolean; + +/** + * The 'ipv6' format. Validates that a string represents an IPv6 address as + * defined in [RFC 4291, section 2.2](https://www.rfc-editor.org/rfc/rfc4291.html#section-2.2). + * + * @see [JSON Schema Core, section 7.3.4](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.4) + */ +export const isIPv6: (ip: string) => boolean; + +/** + * The 'uri' format. Validates that a string represents a URI as defined by [RFC + * 3986](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isUri: (uri: string) => boolean; + +/** + * The 'uri-reference' format. Validates that a string represents a URI + * Reference as defined by [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isUriReference: (uri: string) => boolean; + +/** + * The 'iri' format. Validates that a string represents an IRI as defined by + * [RFC 3987](https://www.rfc-editor.org/rfc/rfc3987.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isIri: (iri: string) => boolean; + +/** + * The 'iri-reference' format. Validates that a string represents an IRI + * Reference as defined by [RFC 3987](https://www.rfc-editor.org/rfc/rfc3987.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isIriReference: (iri: string) => boolean; + +/** + * The 'uuid' format. Validates that a string represents a UUID address as + * defined by [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.html). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isUuid: (uuid: string) => boolean; + +/** + * The 'uri-template' format. Validates that a string represents a URI Template + * as defined by [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html). + * + * @see [JSON Schema Core, section 7.3.6](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.6) + */ +export const isUriTemplate: (uriTemplate: string) => boolean; + +/** + * The 'json-pointer' format. Validates that a string represents a JSON Pointer + * as defined by [RFC 6901](https://www.rfc-editor.org/rfc/rfc6901.html). + * + * @see [JSON Schema Core, section 7.3.7](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.7) + */ +export const isJsonPointer: (pointer: string) => boolean; + +/** + * The 'relative-json-pointer' format. Validates that a string represents an IRI + * Reference as defined by [draft-bhutton-relative-json-pointer-00](https://datatracker.ietf.org/doc/html/draft-bhutton-relative-json-pointer-00). + * + * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) + */ +export const isRelativeJsonPointer: (pointer: string) => boolean; + +/** + * The 'regex' format. Validates that a string represents a regular expression + * as defined by [ECMA-262](https://262.ecma-international.org/5.1/). + * + * @see [JSON Schema Core, section 7.3.8](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.8) + */ +export const isRegex: (regex: string) => boolean; diff --git a/node_modules/@hyperjump/json-schema-formats/src/index.js b/node_modules/@hyperjump/json-schema-formats/src/index.js new file mode 100644 index 00000000..7c81b5be --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/index.js @@ -0,0 +1,33 @@ +/** + * @module + */ + +// JSON Schema Validation - Dates, Times, and Duration +export { isDate, isTime, isDateTime, isDuration } from "./rfc3339.js"; + +// JSON Schema Validation - Email Addresses +export { isEmail } from "./rfc5321.js"; +export { isIdnEmail } from "./rfc6531.js"; + +// JSON Schema Validation - Hostnames +export { isHostname } from "./rfc1123.js"; +export { isAsciiIdn, isIdn } from "./uts46.js"; + +// JSON Schema Validation - IP Addresses +export { isIPv4 } from "./rfc2673.js"; +export { isIPv6 } from "./rfc4291.js"; + +// JSON Schema Validation - Resource Identifiers +export { isUri, isUriReference } from "./rfc3986.js"; +export { isIri, isIriReference } from "./rfc3987.js"; +export { isUuid } from "./rfc4122.js"; + +// JSON Schema Validation - URI Template +export { isUriTemplate } from "./rfc6570.js"; + +// JSON Schema Validation - JSON Pointers +export { isJsonPointer } from "./rfc6901.js"; +export { isRelativeJsonPointer } from "./draft-bhutton-relative-json-pointer-00.js"; + +// JSON Schema Validation - Regular Expressions +export { isRegex } from "./ecma262.js"; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js b/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js new file mode 100644 index 00000000..6f605adf --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js @@ -0,0 +1,13 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const label = `(?!-)[A-Za-z0-9-]{1,63}(? { + return domainPattern.test(hostname) && hostname.length < 256; +}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js b/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js new file mode 100644 index 00000000..02179fce --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js @@ -0,0 +1,12 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; +const ipV4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; + +/** + * @type API.isIPv4 + * @function + */ +export const isIPv4 = RegExp.prototype.test.bind(new RegExp(`^${ipV4Address}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js new file mode 100644 index 00000000..33175991 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js @@ -0,0 +1,78 @@ +import { daysInMonth, hasLeapSecond } from "./date-math.js"; + +/** + * @import * as API from "./index.d.ts" + */ + +const dateFullyear = `\\d{4}`; +const dateMonth = `(?:0[1-9]|1[0-2])`; // 01-12 +const dateMday = `(?:0[1-9]|[12][0-9]|3[01])`; // 01-28, 01-29, 01-30, 01-31 based on month/year +const fullDate = `(?${dateFullyear})-(?${dateMonth})-(?${dateMday})`; + +const datePattern = new RegExp(`^${fullDate}$`); + +/** @type API.isDate */ +export const isDate = (date) => { + const parsedDate = datePattern.exec(date)?.groups; + if (!parsedDate) { + return false; + } + + const day = Number.parseInt(parsedDate.day, 10); + const year = Number.parseInt(parsedDate.year, 10); + + return day <= daysInMonth(parsedDate.month, year); +}; + +const timeHour = `(?:[01]\\d|2[0-3])`; // 00-23 +const timeMinute = `[0-5]\\d`; // 00-59 +const timeSecond = `[0-5]\\d`; // 00-59 +const timeSecondAllowLeapSeconds = `(?[0-5]\\d|60)`; // 00-58, 00-59, 00-60 based on leap second rules +const timeSecfrac = `\\.\\d+`; +const timeNumoffset = `[+-]${timeHour}:${timeMinute}`; +const timeOffset = `(?:[zZ]|${timeNumoffset})`; +const partialTime = `${timeHour}:${timeMinute}:${timeSecond}(?:${timeSecfrac})?`; +const fullTime = `${partialTime}${timeOffset}`; + +/** + * @type API.isTime + * @function + */ +export const isTime = RegExp.prototype.test.bind(new RegExp(`^${fullTime}$`)); + +const timePattern = new RegExp(`^${timeHour}:${timeMinute}:${timeSecondAllowLeapSeconds}(?:${timeSecfrac})?${timeOffset}$`); + +/** @type (time: string) => { seconds: string } | undefined */ +const parseTime = (time) => { + return /** @type {{ seconds: string } | undefined} */ (timePattern.exec(time)?.groups); +}; + +/** @type API.isDateTime */ +export const isDateTime = (dateTime) => { + const date = dateTime.substring(0, 10); + const t = dateTime[10]; + const time = dateTime.substring(11); + const seconds = parseTime(time)?.seconds; + + return isDate(date) + && /^t$/i.test(t) + && !!seconds + && (seconds !== "60" || hasLeapSecond(new Date(`${date}T${time.replace("60", "59")}`))); +}; + +const durSecond = `\\d+S`; +const durMinute = `\\d+M(?:${durSecond})?`; +const durHour = `\\d+H(?:${durMinute})?`; +const durTime = `T(?:${durHour}|${durMinute}|${durSecond})`; +const durDay = `\\d+D`; +const durWeek = `\\d+W`; +const durMonth = `\\d+M(?:${durDay})?`; +const durYear = `\\d+Y(?:${durMonth})?`; +const durDate = `(?:${durDay}|${durMonth}|${durYear})(?:${durTime})?`; +const duration = `P(?:${durDate}|${durTime}|${durWeek})`; + +/** + * @type API.isDuration + * @function + */ +export const isDuration = RegExp.prototype.test.bind(new RegExp(`^${duration}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js new file mode 100644 index 00000000..400e0b28 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js @@ -0,0 +1,17 @@ +import * as Hyperjump from "@hyperjump/uri"; + +/** + * @import * as API from "./index.d.ts" + */ + +/** + * @type API.isUri + * @function + */ +export const isUri = Hyperjump.isUri; + +/** + * @type API.isUriReference + * @function + */ +export const isUriReference = Hyperjump.isUriReference; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js new file mode 100644 index 00000000..c804e103 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js @@ -0,0 +1,17 @@ +import * as Hyperjump from "@hyperjump/uri"; + +/** + * @import * as API from "./index.d.ts" + */ + +/** + * @type API.isIri + * @function + */ +export const isIri = Hyperjump.isIri; + +/** + * @type API.isIriReference + * @function + */ +export const isIriReference = Hyperjump.isIriReference; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js b/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js new file mode 100644 index 00000000..5737edda --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js @@ -0,0 +1,20 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const hexDigit = `[0-9a-fA-F]`; +const hexOctet = `(?:${hexDigit}{2})`; +const timeLow = `${hexOctet}{4}`; +const timeMid = `${hexOctet}{2}`; +const timeHighAndVersion = `${hexOctet}{2}`; +const clockSeqAndReserved = hexOctet; +const clockSeqLow = hexOctet; +const node = `${hexOctet}{6}`; + +const uuid = `${timeLow}\\-${timeMid}\\-${timeHighAndVersion}\\-${clockSeqAndReserved}${clockSeqLow}\\-${node}`; + +/** + * @type API.isUuid + * @function + */ +export const isUuid = RegExp.prototype.test.bind(new RegExp(`^${uuid}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js b/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js new file mode 100644 index 00000000..6fbd83ef --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js @@ -0,0 +1,18 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const hexdig = `[a-fA-F0-9]`; + +const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; +const ipV4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; + +const h16 = `${hexdig}{1,4}`; +const ls32 = `(?:${h16}:${h16}|${ipV4Address})`; +const ipV6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; + +/** + * @type API.isIPv6 + * @function + */ +export const isIPv6 = RegExp.prototype.test.bind(new RegExp(`^${ipV6Address}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js b/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js new file mode 100644 index 00000000..c7049993 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js @@ -0,0 +1,46 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const alpha = `[a-zA-Z]`; +const hexdig = `[\\da-fA-F]`; + +// Printable US-ASCII characters not including specials. +const atext = `[\\w!#$%&'*+\\-/=?^\`{|}~]`; +const atom = `${atext}+`; +const dotString = `${atom}(?:\\.${atom})*`; + +// Any ASCII graphic or space without blackslash-quoting except double-quote and the backslash itself. +const qtextSMTP = `[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]`; +// backslash followed by any ASCII graphic or space +const quotedPairSMTP = `\\\\[\\x20-\\x7E]`; +const qcontentSMTP = `(?:${qtextSMTP}|${quotedPairSMTP})`; +const quotedString = `"${qcontentSMTP}*"`; + +const localPart = `(?:${dotString}|${quotedString})`; // MAY be case-sensitive + +const letDig = `(?:${alpha}|\\d)`; +const ldhStr = `(?:${letDig}|-)*${letDig}`; +const subDomain = `${letDig}${ldhStr}?`; +const domain = `${subDomain}(?:\\.${subDomain})*`; + +const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; +const ipv4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; + +const h16 = `${hexdig}{1,4}`; +const ls32 = `(?:${h16}:${h16}|${ipv4Address})`; +const ipv6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; +const ipv6AddressLiteral = `IPv6:${ipv6Address}`; + +const dcontent = `[\\x21-\\x5A\\x5E-\\x7E]`; // Printable US-ASCII excluding "[", "\", "]" +const generalAddressLiteral = `${ldhStr}:${dcontent}+`; + +const addressLiteral = `\\[(?:${ipv4Address}|${ipv6AddressLiteral}|${generalAddressLiteral})]`; + +const mailbox = `${localPart}@(?:${domain}|${addressLiteral})`; + +/** + * @type API.isEmail + * @function + */ +export const isEmail = RegExp.prototype.test.bind(new RegExp(`^${mailbox}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js new file mode 100644 index 00000000..281bd7f2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js @@ -0,0 +1,55 @@ +import { isIdn } from "./uts46.js"; + +/** + * @import * as API from "./index.d.ts" + */ + +const ucschar = `[\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}]`; + +const alpha = `[a-zA-Z]`; +const hexdig = `[\\da-fA-F]`; + +// Printable US-ASCII characters not including specials. +const atext = `(?:[\\w!#$%&'*+\\-/=?^\`{|}~]|${ucschar})`; +const atom = `${atext}+`; +const dotString = `${atom}(?:\\.${atom})*`; + +// Any ASCII graphic or space without blackslash-quoting except double-quote and the backslash itself. +const qtextSMTP = `(?:[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]|${ucschar})`; +// backslash followed by any ASCII graphic or space +const quotedPairSMTP = `\\\\[\\x20-\\x7E]`; +const qcontentSMTP = `(?:${qtextSMTP}|${quotedPairSMTP})`; +const quotedString = `"${qcontentSMTP}*"`; + +const localPart = `(?:${dotString}|${quotedString})`; // MAY be case-sensitive + +const letDig = `(?:${alpha}|\\d)`; +const ldhStr = `(?:${letDig}|-)*${letDig}`; +const letDigUcs = `(?:${alpha}|\\d|${ucschar})`; +const ldhStrUcs = `(?:${letDigUcs}|-)*${letDigUcs}`; +const subDomain = `${letDigUcs}${ldhStrUcs}?`; +const domain = `${subDomain}(?:\\.${subDomain})*`; + +const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; +const ipv4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; + +const h16 = `${hexdig}{1,4}`; +const ls32 = `(?:${h16}:${h16}|${ipv4Address})`; +const ipv6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; +const ipv6AddressLiteral = `IPv6:${ipv6Address}`; + +const dcontent = `[\\x21-\\x5A\\x5E-\\x7E]`; // Printable US-ASCII excluding "[", "\", "]" +const generalAddressLiteral = `${ldhStr}:${dcontent}+`; + +const addressLiteral = `\\[(?:${ipv4Address}|${ipv6AddressLiteral}|${generalAddressLiteral})\\]`; + +const mailbox = `(?${localPart})@(?:(?${addressLiteral})|(?${domain}))`; + +const mailboxPattern = new RegExp(`^${mailbox}$`, "u"); + +/** @type API.isIdnEmail */ +export const isIdnEmail = (email) => { + const parsedEmail = mailboxPattern.exec(email)?.groups; + + return !!parsedEmail && (!parsedEmail.domain || isIdn(parsedEmail.domain)); +}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js new file mode 100644 index 00000000..e144a93e --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js @@ -0,0 +1,38 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const alpha = `[a-zA-Z]`; +const hexdig = `[\\da-fA-F]`; +const pctEncoded = `%${hexdig}${hexdig}`; + +const ucschar = `[\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}]`; + +const iprivate = `[\\u{E000}-\\u{F8FF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}]`; + +const opLevel2 = `[+#]`; +const opLevel3 = `[./;?&]`; +const opReserve = `[=,!@|]`; +const operator = `(?:${opLevel2}|${opLevel3}${opReserve})`; + +const varchar = `(?:${alpha}|\\d|_|${pctEncoded})`; +const varname = `${varchar}(?:\\.?${varchar})*`; +const maxLength = `(?:[1-9]|\\d{0,3})`; // positive integer < 10000 +const prefix = `:${maxLength}`; +const explode = `\\*`; +const modifierLevel4 = `(?:${prefix}|${explode})`; +const varspec = `${varname}${modifierLevel4}?`; +const variableList = `${varspec}(?:,${varspec})*`; + +const expression = `\\{${operator}?${variableList}\\}`; + +// any Unicode character except: CTL, SP, DQUOTE, "%" (aside from pct-encoded), "<", ">", "\", "^", "`", "{", "|", "}" +const literals = `(?:[\\x21\\x23-\\x24\\x26-\\x3B\\x3D\\x3F-\\x5B\\x5D\\x5F\\x61-\\x7A\\x7E]|${ucschar}|${iprivate}|${pctEncoded})`; + +const uriTemplate = `(?:${literals}|${expression})*`; + +/** + * @type API.isUriTemplate + * @function + */ +export const isUriTemplate = RegExp.prototype.test.bind(new RegExp(`^${uriTemplate}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js new file mode 100644 index 00000000..727df339 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js @@ -0,0 +1,14 @@ +/** + * @import * as API from "./index.d.ts" + */ + +const unescaped = `[\\u{00}-\\u{2E}\\u{30}-\\u{7D}\\u{7F}-\\u{10FFFF}]`; // %x2F ('/') and %x7E ('~') are excluded from 'unescaped' +const escaped = `~[01]`; // representing '~' and '/', respectively +const referenceToken = `(?:${unescaped}|${escaped})*`; +const jsonPointer = `(?:/${referenceToken})*`; + +/** + * @type API.isJsonPointer + * @function + */ +export const isJsonPointer = RegExp.prototype.test.bind(new RegExp(`^${jsonPointer}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/uts46.js b/node_modules/@hyperjump/json-schema-formats/src/uts46.js new file mode 100644 index 00000000..fee52257 --- /dev/null +++ b/node_modules/@hyperjump/json-schema-formats/src/uts46.js @@ -0,0 +1,20 @@ +import { isIdnHostname } from "idn-hostname"; +import { isHostname } from "./rfc1123.js"; + +/** + * @import * as API from "./index.d.ts" + */ + +/** @type API.isAsciiIdn */ +export const isAsciiIdn = (hostname) => { + return isHostname(hostname) && isIdn(hostname); +}; + +/** @type API.isIdn */ +export const isIdn = (hostname) => { + try { + return isIdnHostname(hostname); + } catch (_error) { + return false; + } +}; diff --git a/node_modules/@hyperjump/json-schema/LICENSE b/node_modules/@hyperjump/json-schema/LICENSE new file mode 100644 index 00000000..b0718c34 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/json-schema/README.md b/node_modules/@hyperjump/json-schema/README.md new file mode 100644 index 00000000..2a84a170 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/README.md @@ -0,0 +1,966 @@ +# Hyperjump - JSON Schema + +A collection of modules for working with JSON Schemas. + +* Validate JSON-compatible values against a JSON Schemas + * Dialects: draft-2020-12, draft-2019-09, draft-07, draft-06, draft-04 + * Complete validation support for all formats defined for the `format` keyword + * Schemas can reference other schemas using a different dialect + * Work directly with schemas on the filesystem or HTTP +* OpenAPI + * Versions: 3.0, 3.1, 3.2 + * Validate an OpenAPI document + * Validate values against a schema from an OpenAPI document +* Create custom keywords, formats, vocabularies, and dialects +* Bundle multiple schemas into one document + * Uses the process defined in the 2020-12 specification but works with any + dialect. +* API for building non-validation JSON Schema tooling +* API for working with annotations + +## Install + +Includes support for node.js/bun.js (ES Modules, TypeScript) and browsers (works +with CSP +[`unsafe-eval`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_eval_expressions)). + +### Node.js + +```bash +npm install @hyperjump/json-schema +``` + +### TypeScript + +This package uses the package.json "exports" field. [TypeScript understands +"exports"](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing), +but you need to change a couple settings in your `tsconfig.json` for it to work. + +```jsonc + "module": "Node16", // or "NodeNext" + "moduleResolution": "Node16", // or "NodeNext" +``` + +### Versioning + +The API for this library is divided into two categories: Stable and +Experimental. The Stable API follows semantic versioning, but the Experimental +API may have backward-incompatible changes between minor versions. + +All experimental features are segregated into exports that include the word +"experimental" so you never accidentally depend on something that could change +or be removed in future releases. + +## Validation + +### Usage + +This library supports many versions of JSON Schema. Use the pattern +`@hyperjump/json-schema/*` to import the version you need. + +```javascript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +``` + +You can import support for additional versions as needed. + +```javascript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +import "@hyperjump/json-schema/draft-07"; +``` + +**Note**: The default export (`@hyperjump/json-schema`) is reserved for v1 of +JSON Schema that will hopefully be released in near future. + +**Validate schema from JavaScript** + +```javascript +registerSchema({ + $schema: "https://json-schema.org/draft/2020-12/schema", + type: "string" +}, "http://example.com/schemas/string"); + +const output = await validate("http://example.com/schemas/string", "foo"); +if (output.valid) { + console.log("Instance is valid :-)"); +} else { + console.log("Instance is invalid :-("); +} +``` + +**Compile schema** + +If you need to validate multiple instances against the same schema, you can +compile the schema into a reusable validation function. + +```javascript +const isString = await validate("http://example.com/schemas/string"); +const output1 = isString("foo"); +const output2 = isString(42); +``` + +**File-based and web-based schemas** + +Schemas that are available on the web can be loaded automatically without +needing to load them manually. + +```javascript +const output = await validate("http://example.com/schemas/string", "foo"); +``` + +When running on the server, you can also load schemas directly from the +filesystem. When fetching from the file system, there are limitations for +security reasons. You can only reference a schema identified by a file URI +scheme (**file**:///path/to/my/schemas) from another schema identified by a file +URI scheme. Also, a schema is not allowed to self-identify (`$id`) with a +`file:` URI scheme. + +```javascript +const output = await validate(`file://${__dirname}/string.schema.json`, "foo"); +``` + +If the schema URI is relative, the base URI in the browser is the browser +location and the base URI on the server is the current working directory. This +is the preferred way to work with file-based schemas on the server. + +```javascript +const output = await validate(`./string.schema.json`, "foo"); +``` + +You can add/modify/remove support for any URI scheme using the [plugin +system](https://github.com/hyperjump-io/browser/#uri-schemes) provided by +`@hyperjump/browser`. + +**Format** + +Format validation support needs to be explicitly loaded by importing +`@hyperjump/json-schema/formats`. Once loaded, it depends on the dialect whether +validation is enabled by default or not. You should explicitly enable/disable it +with the `setShouldValidateFormat` function. + +The `hostname`, `idn-hostname`, and `idn-email` validators are fairly large. If +you don't need support for those formats and bundle size is a concern, you can +use `@hyperjump/json-schema/formats-lite` instead to leave out support for those +formats. + +```javascript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +import { setShouldValidateFormat } from "@hyperjump/json-schema/formats"; + +const schemaUri = "https://example.com/number"; +registerSchema({ + "type": "string", + "format": "date" +}, schemaUri); + +setShouldValidateFormat(true); +const output = await validate(schemaUri, "Feb 29, 2031"); // { valid: false } +``` + +**OpenAPI** + +The OpenAPI 3.0 and 3.1 and 3.2 meta-schemas are pre-loaded and the OpenAPI JSON +Schema dialects for each of those versions is supported. A document with a +Content-Type of `application/openapi+json` (web) or a file extension of +`openapi.json` (filesystem) is understood as an OpenAPI document. + +Use the pattern `@hyperjump/json-schema/*` to import the version you need. The +available versions are `openapi-3-0` for 3.0, `openapi-3-1` for 3.1, and +`openapi-3-2` for 3.2. + +```javascript +import { validate } from "@hyperjump/json-schema/openapi-3-2"; + + +// Validate an OpenAPI 3.2 document +const output = await validate("https://spec.openapis.org/oas/3.2/schema-base", openapi); + +// Validate an instance against a schema in an OpenAPI 3.2 document +const output = await validate("./example.openapi.json#/components/schemas/foo", 42); +``` + +YAML support isn't built in, but you can add it by writing a +[MediaTypePlugin](https://github.com/hyperjump-io/browser/#media-types). You can +use the one at `lib/openapi.js` as an example and replace the JSON parts with +YAML. + +**Media types** + +This library uses media types to determine how to parse a retrieved document. It +will never assume the retrieved document is a schema. By default it's configured +to accept documents with a `application/schema+json` Content-Type header (web) +or a `.schema.json` file extension (filesystem). + +You can add/modify/remove support for any media-type using the [plugin +system](https://github.com/hyperjump-io/browser/#media-types) provided by +`@hyperjump/browser`. The following example shows how to add support for JSON +Schemas written in YAML. + +```javascript +import YAML from "yaml"; +import contentTypeParser from "content-type"; +import { addMediaTypePlugin } from "@hyperjump/browser"; +import { buildSchemaDocument } from "@hyperjump/json-schema/experimental"; + + +addMediaTypePlugin("application/schema+yaml", { + parse: async (response) => { + const contentType = contentTypeParser.parse(response.headers.get("content-type") ?? ""); + const contextDialectId = contentType.parameters.schema ?? contentType.parameters.profile; + + const foo = YAML.parse(await response.text()); + return buildSchemaDocument(foo, response.url, contextDialectId); + }, + fileMatcher: (path) => path.endsWith(".schema.yml") +}); +``` + +### API + +These are available from any of the exports that refer to a version of JSON +Schema, such as `@hyperjump/json-schema/draft-2020-12`. + +* **registerSchema**: (schema: object, retrievalUri?: string, defaultDialectId?: string) => void + + Add a schema the local schema registry. When this schema is needed, it will + be loaded from the register rather than the filesystem or network. If a + schema with the same identifier is already registered, an exception will be + throw. +* **unregisterSchema**: (uri: string) => void + + Remove a schema from the local schema registry. +* **getAllRegisteredSchemaUris**: () => string[] + + This function returns the URIs of all registered schemas +* **hasSchema**: (uri: string) => boolean + + Check if a schema with the given URI is already registered. +* _(deprecated)_ **addSchema**: (schema: object, retrievalUri?: string, defaultDialectId?: string) => void + + Load a schema manually rather than fetching it from the filesystem or over + the network. Any schema already registered with the same identifier will be + replaced with no warning. +* **validate**: (schemaURI: string, instance: any, outputFormat: ValidationOptions | OutputFormat = FLAG) => Promise\ + + Validate an instance against a schema. This function is curried to allow + compiling the schema once and applying it to multiple instances. +* **validate**: (schemaURI: string) => Promise\<(instance: any, outputFormat: ValidationOptions | OutputFormat = FLAG) => OutputUnit> + + Compiling a schema to a validation function. +* **FLAG**: "FLAG" + + An identifier for the `FLAG` output format as defined by the 2019-09 and + 2020-12 specifications. +* **InvalidSchemaError**: Error & { output: OutputUnit } + + This error is thrown if the schema being compiled is found to be invalid. + The `output` field contains an `OutputUnit` with information about the + error. You can use the `setMetaSchemaOutputFormat` configuration to set the + output format that is returned in `output`. +* **setMetaSchemaOutputFormat**: (outputFormat: OutputFormat) => void + + Set the output format used for validating schemas. +* **getMetaSchemaOutputFormat**: () => OutputFormat + + Get the output format used for validating schemas. +* **setShouldMetaValidate**: (isEnabled: boolean) => void + + Enable or disable validating schemas. +* **getShouldMetaValidate**: (isEnabled: boolean) => void + + Determine if validating schemas is enabled. + +**Type Definitions** + +The following types are used in the above definitions + +* **OutputFormat**: **FLAG** + + Only the `FLAG` output format is part of the Stable API. Additional [output + formats](#output-formats) are included as part of the Experimental API. +* **OutputUnit**: { valid: boolean } + + Output is an experimental feature of the JSON Schema specification. There + may be additional fields present in the OutputUnit, but only the `valid` + property should be considered part of the Stable API. +* **ValidationOptions**: + + * outputFormat?: OutputFormat + * plugins?: EvaluationPlugin[] + +## Bundling + +### Usage + +You can bundle schemas with external references into a single deliverable using +the official JSON Schema bundling process introduced in the 2020-12 +specification. Given a schema with external references, any external schemas +will be embedded in the schema resulting in a Compound Schema Document with all +the schemas necessary to evaluate the given schema in a single JSON document. + +The bundling process allows schemas to be embedded without needing to modify any +references which means you get the same output details whether you validate the +bundle or the original unbundled schemas. + +```javascript +import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; +import { bundle } from "@hyperjump/json-schema/bundle"; + + +registerSchema({ + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "type": "object", + "properties": { + "foo": { "$ref": "/string" } + } +}, "https://example.com/main"); + +registerSchema({ + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "type": "string" +}, "https://example.com/string"); + +const bundledSchema = await bundle("https://example.com/main"); // { +// "$schema": "https://json-schema.org/draft/2020-12/schema", +// +// "type": "object", +// "properties": { +// "foo": { "$ref": "/string" } +// }, +// +// "$defs": { +// "string": { +// "$id": "https://example.com/string", +// "type": "string" +// } +// } +// } +``` + +### API + +These are available from the `@hyperjump/json-schema/bundle` export. + +* **bundle**: (uri: string, options: Options) => Promise\ + + Create a bundled schema starting with the given schema. External schemas + will be fetched from the filesystem, the network, or the local schema + registry as needed. + + Options: + * alwaysIncludeDialect: boolean (default: false) -- Include dialect even + when it isn't strictly needed + * definitionNamingStrategy: "uri" | "uuid" (default: "uri") -- By default + the name used in definitions for embedded schemas will match the + identifier of the embedded schema. Alternatively, you can use a UUID + instead of the schema's URI. + * externalSchemas: string[] (default: []) -- A list of schemas URIs that + are available externally and should not be included in the bundle. + +## Experimental + +### Output Formats + +**Change the validation output format** + +The `FLAG` output format isn't very informative. You can change the output +format used for validation to get more information about failures. The official +output format is still evolving, so these may change or be replaced in the +future. This implementation currently supports the BASIC and DETAILED output +formats. + +```javascript +import { BASIC } from "@hyperjump/json-schema/experimental"; + + +const output = await validate("https://example.com/schema1", 42, BASIC); +``` + +**Change the schema validation output format** + +The output format used for validating schemas can be changed as well. + +```javascript +import { validate, setMetaSchemaOutputFormat } from "@hyperjump/json-schema/draft-2020-12"; +import { BASIC } from "@hyperjump/json-schema/experimental"; + + +setMetaSchemaOutputFormat(BASIC); +try { + const output = await validate("https://example.com/invalid-schema"); +} catch (error) { + console.log(error.output); +} +``` + +### Custom Keywords, Vocabularies, and Dialects + +In order to create and use a custom keyword, you need to define your keyword's +behavior, create a vocabulary that includes that keyword, and then create a +dialect that includes your vocabulary. + +Schemas are represented using the +[`@hyperjump/browser`](https://github.com/hyperjump-io/browser) package. You'll +use that API to traverse schemas. `@hyperjump/browser` uses async generators to +iterate over arrays and objects. If you like using higher order functions like +`map`/`filter`/`reduce`, see +[`@hyperjump/pact`](https://github.com/hyperjump-io/pact) for utilities for +working with generators and async generators. + +```javascript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +import { addKeyword, defineVocabulary, Validation } from "@hyperjump/json-schema/experimental"; +import * as Browser from "@hyperjump/browser"; + + +// Define a keyword that's an array of schemas that are applied sequentially +// using implication: A -> B -> C -> D +addKeyword({ + id: "https://example.com/keyword/implication", + + compile: async (schema, ast) => { + const subSchemas = []; + for await (const subSchema of Browser.iter(schema)) { + subSchemas.push(Validation.compile(subSchema, ast)); + } + return subSchemas; + + // Alternative using @hyperjump/pact + // return pipe( + // Browser.iter(schema), + // asyncMap((subSchema) => Validation.compile(subSchema, ast)), + // asyncCollectArray + // ); + }, + + interpret: (implies, instance, context) => { + return implies.reduce((valid, schema) => { + return !valid || Validation.interpret(schema, instance, context); + }, true); + } +}); + +// Create a vocabulary with this keyword and call it "implies" +defineVocabulary("https://example.com/vocab/logic", { + "implies": "https://example.com/keyword/implication" +}); + +// Create a vocabulary schema for this vocabulary +registerSchema({ + "$id": "https://example.com/meta/logic", + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$dynamicAnchor": "meta", + "properties": { + "implies": { + "type": "array", + "items": { "$dynamicRef": "meta" }, + "minItems": 2 + } + } +}); + +// Create a dialect schema adding this vocabulary to the standard JSON Schema +// vocabularies +registerSchema({ + "$id": "https://example.com/dialect/logic", + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true + "https://example.com/vocab/logic": true + }, + + "$dynamicAnchor": "meta", + + "allOf": [ + { "$ref": "https://json-schema.org/draft/2020-12/schema" }, + { "$ref": "/meta/logic" } + ] +}); + +// Use your dialect to validate a JSON instance +registerSchema({ + "$schema": "https://example.com/dialect/logic", + + "type": "number", + "implies": [ + { "minimum": 10 }, + { "multipleOf": 2 } + ] +}, "https://example.com/schema1"); +const output = await validate("https://example.com/schema1", 42); +``` + +### Custom Formats + +Custom formats work similarly to keywords. You define a format handler and then +associate that format handler with the format keyword that applies to the +dialects you're targeting. + +```JavaScript +import { registerSchema, validate, setShouldValidateFormat } from "@hyperjump/json-schema/draft-2020-12"; +import { addFormat, setFormatHandler } from "@hyperjump/json-schema/experimental"; + +const isoDateFormatUri = "https://example.com/format/iso-8601-date"; + +// Add the iso-date format handler +addFormat({ + id: isoDateFormatUri, + handler: (date) => new Date(date).toISOString() === date +}); + +// Add the "iso-date" format to the 2020-12 version of `format` +setFormatHandler("https://json-schema.org/keyword/draft-2020-12/format", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-2020-12/format-assertion", "iso-date", isoDateFormatUri); + +// Optional: Add the "iso-date" format to other dialects +setFormatHandler("https://json-schema.org/keyword/draft-2019-09/format", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-2019-09/format-assertion", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-07/format", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-06/format", "iso-date", isoDateFormatUri); +setFormatHandler("https://json-schema.org/keyword/draft-04/format", "iso-date", isoDateFormatUri); + +const schemaUri = "https://example.com/main"; +registerSchema({ + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "type": "string", + "format": "iso-date" +}, schemaUri); + +setShouldValidateFormat(true); +const output = await validate(schemaUri, "Feb 28, 2031"); // { valid: false } +``` + +### Custom Meta Schema + +You can use a custom meta-schema to restrict users to a subset of JSON Schema +functionality. This example requires that no unknown keywords are used in the +schema. + +```javascript +registerSchema({ + "$id": "https://example.com/meta-schema1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true + }, + + "$dynamicAnchor": "meta", + + "$ref": "https://json-schema.org/draft/2020-12/schema", + "unevaluatedProperties": false +}); + +registerSchema({ + $schema: "https://example.com/meta-schema1", + type: "number", + foo: 42 +}, "https://example.com/schema1"); + +const output = await validate("https://example.com/schema1", 42); // Expect InvalidSchemaError +``` + +### EvaluationPlugins + +EvaluationPlugins allow you to hook into the validation process for various +purposes. There are hooks for before an after schema evaluation and before and +after keyword evaluation. (See the API section for the full interface) The +following is a simple example to record all the schema locations that were +evaluated. This could be used as part of a solution for determining test +coverage for a schema. + +```JavaScript +import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; +import { BASIC } from "@hyperjump/json-schema/experimental.js"; + +class EvaluatedKeywordsPlugin { + constructor() { + this.schemaLocations = new Set(); + } + + beforeKeyword([, schemaUri]) { + this.schemaLocations.add(schemaUri); + } +} + +registerSchema({ + $schema: "https://json-schema.org/draft/2020-12/schema", + type: "object", + properties: { + foo: { type: "number" }, + bar: { type: "boolean" } + }, + required: ["foo"] +}, "https://schemas.hyperjump.io/main"); + +const evaluatedKeywordPlugin = new EvaluatedKeywordsPlugin(); + +await validate("https://schemas.hyperjump.io/main", { foo: 42 }, { + outputFormat: BASIC, + plugins: [evaluatedKeywordPlugin] +}); + +console.log(evaluatedKeywordPlugin.schemaLocations); +// Set(4) { +// 'https://schemas.hyperjump.io/main#/type', +// 'https://schemas.hyperjump.io/main#/properties', +// 'https://schemas.hyperjump.io/main#/properties/foo/type', +// 'https://schemas.hyperjump.io/main#/required' +// } + +// NOTE: #/properties/bar is not in the list because the instance doesn't include that property. +``` + +### API + +These are available from the `@hyperjump/json-schema/experimental` export. + +* **addKeyword**: (keywordHandler: Keyword) => void + + Define a keyword for use in a vocabulary. + + * **Keyword**: object + * id: string + + A URI that uniquely identifies the keyword. It should use a domain you + own to avoid conflict with keywords defined by others. + * compile: (schema: Browser, ast: AST, parentSchema: Browser) => Promise\ + + This function takes the keyword value, does whatever preprocessing it + can on it without an instance, and returns the result. The returned + value will be passed to the `interpret` function. The `ast` parameter + is needed for compiling sub-schemas. The `parentSchema` parameter is + primarily useful for looking up the value of an adjacent keyword that + might effect this one. + * interpret: (compiledKeywordValue: any, instance: JsonNode, context: ValidationContext) => boolean + + This function takes the value returned by the `compile` function and + the instance value that is being validated and returns whether the + value is valid or not. The other parameters are only needed for + validating sub-schemas. + * simpleApplicator?: boolean + + Some applicator keywords just apply schemas and don't do any + validation of its own. In these cases, it isn't helpful to include + them in BASIC output. This flag is used to trim those nodes from the + output. + * annotation?: (compiledKeywordValue: any) => any | undefined + + If the keyword is an annotation, it will need to implement this + function to return the annotation. + * plugin?: EvaluationPlugin + + If the keyword needs to track state during the evaluation process, you + can include an EvaluationPlugin that will get added only when this + keyword is present in the schema. + + * **ValidationContext**: object + * ast: AST + * plugins: EvaluationPlugins[] +* **addFormat**: (formatHandler: Format) => void + + Add a format handler. + + * **Format**: object + * id: string + + A URI that uniquely identifies the format. It should use a domain you + own to avoid conflict with keywords defined by others. + * handler: (value: any) => boolean + + A function that takes the value and returns a boolean determining if + it passes validation for the format. +* **setFormatHandler**: (keywordUri: string, formatName: string, formatUri: string) => void + + Add support for a format to the specified keyword. +* **removeFormatHandler**: (keywordUri, formatName) => void + + Remove support for a format from the specified keyword. +* **defineVocabulary**: (id: string, keywords: { [keyword: string]: string }) => void + + Define a vocabulary that maps keyword name to keyword URIs defined using + `addKeyword`. +* **getKeywordId**: (keywordName: string, dialectId: string) => string + + Get the identifier for a keyword by its name. +* **getKeyword**: (keywordId: string) => Keyword + + Get a keyword object by its URI. This is useful for building non-validation + tooling. +* **getKeywordByName**: (keywordName: string, dialectId: string) => Keyword + + Get a keyword object by its name. This is useful for building non-validation + tooling. +* **getKeywordName**: (dialectId: string, keywordId: string) => string + + Determine a keyword's name given its URI a dialect URI. This is useful when + defining a keyword that depends on the value of another keyword (such as how + `contains` depends on `minContains` and `maxContains`). +* **loadDialect**: (dialectId: string, dialect: { [vocabularyId: string] }, allowUnknownKeywords: boolean = false) => void + + Define a dialect. In most cases, dialects are loaded automatically from the + `$vocabulary` keyword in the meta-schema. The only time you would need to + load a dialect manually is if you're creating a distinct version of JSON + Schema rather than creating a dialect of an existing version of JSON Schema. +* **unloadDialect**: (dialectId: string) => void + + Remove a dialect. You shouldn't need to use this function. It's called for + you when you call `unregisterSchema`. +* **Validation**: Keyword + + A Keyword object that represents a "validate" operation. You would use this + for compiling and evaluating sub-schemas when defining a custom keyword. + +* **getSchema**: (uri: string, browser?: Browser) => Promise\ + + Get a schema by it's URI taking the local schema registry into account. +* **buildSchemaDocument**: (schema: SchemaObject | boolean, retrievalUri?: string, contextDialectId?: string) => SchemaDocument + + Build a SchemaDocument from a JSON-compatible value. You might use this if + you're creating a custom media type plugin, such as supporting JSON Schemas + in YAML. +* **canonicalUri**: (schema: Browser) => string + + Returns a URI for the schema. +* **toSchema**: (schema: Browser, options: ToSchemaOptions) => object + + Get a raw schema from a Schema Document. + + * **ToSchemaOptions**: object + + * contextDialectId: string (default: "") -- If the dialect of the schema + matches this value, the `$schema` keyword will be omitted. + * includeDialect: "auto" | "always" | "never" (default: "auto") -- If + "auto", `$schema` will only be included if it differs from + `contextDialectId`. + * contextUri: string (default: "") -- `$id`s will be relative to this + URI. + * includeEmbedded: boolean (default: true) -- If false, embedded schemas + will be unbundled from the schema. +* **compile**: (schema: Browser) => Promise\ + + Return a compiled schema. This is useful if you're creating tooling for + something other than validation. +* **interpret**: (schema: CompiledSchema, instance: JsonNode, outputFormat: OutputFormat = BASIC) => OutputUnit + + A curried function for validating an instance against a compiled schema. + This can be useful for creating custom output formats. + +* **OutputFormat**: **FLAG** | **BASIC** + + In addition to the `FLAG` output format in the Stable API, the Experimental + API includes support for the `BASIC` format as specified in the 2019-09 + specification (with some minor customizations). This implementation doesn't + include annotations or human readable error messages. The output can be + processed to create human readable error messages as needed. + +* **EvaluationPlugin**: object + * beforeSchema?(url: string, instance: JsonNode, context: Context): void + * beforeKeyword?(keywordNode: CompiledSchemaNode, instance: JsonNode, context: Context, schemaContext: Context, keyword: Keyword): void + * afterKeyword?(keywordNode: CompiledSchemaNode, instance: JsonNode, context: Context, valid: boolean, schemaContext: Context, keyword: Keyword): void + * afterSchema?(url: string, instance: JsonNode, context: Context, valid: boolean): void + +## Instance API (experimental) + +These functions are available from the +`@hyperjump/json-schema/instance/experimental` export. + +This library uses JsonNode objects to represent instances. You'll work with +these objects if you create a custom keyword. + +This API uses generators to iterate over arrays and objects. If you like using +higher order functions like `map`/`filter`/`reduce`, see +[`@hyperjump/pact`](https://github.com/hyperjump-io/pact) for utilities for +working with generators and async generators. + +* **fromJs**: (value: any, uri?: string) => JsonNode + + Construct a JsonNode from a JavaScript value. +* **cons**: (baseUri: string, pointer: string, value: any, type: string, children: JsonNode[], parent?: JsonNode) => JsonNode + + Construct a JsonNode. This is used internally. You probably want `fromJs` + instead. +* **get**: (url: string, instance: JsonNode) => JsonNode + + Apply a same-resource reference to a JsonNode. +* **uri**: (instance: JsonNode) => string + + Returns a URI for the value the JsonNode represents. +* **value**: (instance: JsonNode) => any + + Returns the value the JsonNode represents. +* **has**: (key: string, instance: JsonNode) => boolean + + Returns whether or not "key" is a property name in a JsonNode that + represents an object. +* **typeOf**: (instance: JsonNode) => string + + The JSON type of the JsonNode. In addition to the standard JSON types, + there's also the `property` type that indicates a property name/value pair + in an object. +* **step**: (key: string, instance: JsonNode) => JsonType + + Similar to indexing into a object or array using the `[]` operator. +* **iter**: (instance: JsonNode) => Generator\ + + Iterate over the items in the array that the JsonNode represents. +* **entries**: (instance: JsonNode) => Generator\<[JsonNode, JsonNode]> + + Similar to `Object.entries`, but yields JsonNodes for keys and values. +* **values**: (instance: JsonNode) => Generator\ + + Similar to `Object.values`, but yields JsonNodes for values. +* **keys**: (instance: JsonNode) => Generator\ + + Similar to `Object.keys`, but yields JsonNodes for keys. +* **length**: (instance: JsonNode) => number + + Similar to `Array.prototype.length`. + +## Annotations (experimental) +JSON Schema is for annotating JSON instances as well as validating them. This +module provides utilities for working with JSON documents annotated with JSON +Schema. + +### Usage +An annotated JSON document is represented as a +(JsonNode)[#instance-api-experimental] AST. You can use this AST to traverse +the data structure and get annotations for the values it represents. + +```javascript +import { registerSchema } from "@hyperjump/json-schema/draft/2020-12"; +import { annotate } from "@hyperjump/json-schema/annotations/experimental"; +import * as AnnotatedInstance from "@hyperjump/json-schema/annotated-instance/experimental"; + + +const schemaId = "https://example.com/foo"; +const dialectId = "https://json-schema.org/draft/2020-12/schema"; + +registerSchema({ + "$schema": dialectId, + + "title": "Person", + "unknown": "foo", + + "type": "object", + "properties": { + "name": { + "$ref": "#/$defs/name", + "deprecated": true + }, + "givenName": { + "$ref": "#/$defs/name", + "title": "Given Name" + }, + "familyName": { + "$ref": "#/$defs/name", + "title": "Family Name" + } + }, + + "$defs": { + "name": { + "type": "string", + "title": "Name" + } + } +}, schemaId); + +const instance = await annotate(schemaId, { + name: "Jason Desrosiers", + givenName: "Jason", + familyName: "Desrosiers" +}); + +// Get the title of the instance +const titles = AnnotatedInstance.annotation(instance, "title", dialectId); // => ["Person"] + +// Unknown keywords are collected as annotations +const unknowns = AnnotatedInstance.annotation(instance, "unknown", dialectId); // => ["foo"] + +// The type keyword doesn't produce annotations +const types = AnnotatedInstance.annotation(instance, "type", dialectId); // => [] + +// Get the title of each of the properties in the object +for (const [propertyNameNode, propertyInstance] of AnnotatedInstance.entries(instance)) { + const propertyName = AnnotatedInstance.value(propertyName); + console.log(propertyName, AnnotatedInstance.annotation(propertyInstance, "title", dialectId)); +} + +// List all locations in the instance that are deprecated +for (const deprecated of AnnotatedInstance.annotatedWith(instance, "deprecated", dialectId)) { + if (AnnotatedInstance.annotation(deprecated, "deprecated", dialectId)[0]) { + logger.warn(`The value at '${deprecated.pointer}' has been deprecated.`); // => (Example) "WARN: The value at '/name' has been deprecated." + } +} +``` + +### API +These are available from the `@hyperjump/json-schema/annotations/experimental` +export. + +* **annotate**: (schemaUri: string, instance: any, outputFormat: OutputFormat = BASIC) => Promise\ + + Annotate an instance using the given schema. The function is curried to + allow compiling the schema once and applying it to multiple instances. This + may throw an [InvalidSchemaError](#api) if there is a problem with the + schema or a ValidationError if the instance doesn't validate against the + schema. +* **interpret**: (compiledSchema: CompiledSchema, instance: JsonNode, outputFormat: OutputFormat = BASIC) => JsonNode + + Annotate a JsonNode object rather than a plain JavaScript value. This might + be useful when building tools on top of the annotation functionality, but + you probably don't need it. +* **ValidationError**: Error & { output: OutputUnit } + The `output` field contains an `OutputUnit` with information about the + error. + +## AnnotatedInstance API (experimental) +These are available from the +`@hyperjump/json-schema/annotated-instance/experimental` export. The +following functions are available in addition to the functions available in the +[Instance API](#instance-api-experimental). + +* **annotation**: (instance: JsonNode, keyword: string, dialect?: string): any[]; + + Get the annotations for a keyword for the value represented by the JsonNode. +* **annotatedWith**: (instance: JsonNode, keyword: string, dialect?: string): Generator; + + Get all JsonNodes that are annotated with the given keyword. +* **setAnnotation**: (instance: JsonNode, keywordId: string, value: any) => JsonNode + + Add an annotation to an instance. This is used internally, you probably + don't need it. + +## Contributing + +### Tests + +Run the tests + +```bash +npm test +``` + +Run the tests with a continuous test runner + +```bash +npm test -- --watch +``` diff --git a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts new file mode 100644 index 00000000..206df4f9 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts @@ -0,0 +1,4 @@ +export const annotation: (instance: JsonNode, keyword: string, dialectUri?: string) => A[]; +export const annotatedWith: (instance: A, keyword: string, dialectUri?: string) => Generator; + +export * from "../lib/instance.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js new file mode 100644 index 00000000..47b4c092 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js @@ -0,0 +1,20 @@ +import * as Instance from "../lib/instance.js"; +import { getKeywordId } from "../lib/keywords.js"; + + +const defaultDialectId = "https://json-schema.org/v1"; + +export const annotation = (node, keyword, dialect = defaultDialectId) => { + const keywordUri = getKeywordId(keyword, dialect); + return node.annotations[keywordUri] ?? []; +}; + +export const annotatedWith = function* (instance, keyword, dialectId = defaultDialectId) { + for (const node of Instance.allNodes(instance)) { + if (annotation(node, keyword, dialectId).length > 0) { + yield node; + } + } +}; + +export * from "../lib/instance.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/index.d.ts b/node_modules/@hyperjump/json-schema/annotations/index.d.ts new file mode 100644 index 00000000..75de9ce8 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/index.d.ts @@ -0,0 +1,21 @@ +import type { OutputFormat, Output, ValidationOptions } from "../lib/index.js"; +import type { CompiledSchema } from "../lib/experimental.js"; +import type { JsonNode } from "../lib/instance.js"; +import type { Json } from "@hyperjump/json-pointer"; + + +export const annotate: ( + (schemaUrl: string, value: Json, options?: OutputFormat | ValidationOptions) => Promise +) & ( + (schemaUrl: string) => Promise +); + +export type Annotator = (value: Json, options?: OutputFormat | ValidationOptions) => JsonNode; + +export const interpret: (compiledSchema: CompiledSchema, value: JsonNode, options?: OutputFormat | ValidationOptions) => JsonNode; + +export class ValidationError extends Error { + public output: Output & { valid: false }; + + public constructor(output: Output); +} diff --git a/node_modules/@hyperjump/json-schema/annotations/index.js b/node_modules/@hyperjump/json-schema/annotations/index.js new file mode 100644 index 00000000..82c3d7fd --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/index.js @@ -0,0 +1,45 @@ +import { ValidationError } from "./validation-error.js"; +import { + getSchema, + compile, + interpret as validate, + BASIC, + AnnotationsPlugin +} from "../lib/experimental.js"; +import * as Instance from "../lib/instance.js"; + + +export const annotate = async (schemaUri, json = undefined, options = undefined) => { + const schema = await getSchema(schemaUri); + const compiled = await compile(schema); + const interpretAst = (json, options) => interpret(compiled, Instance.fromJs(json), options); + + return json === undefined ? interpretAst : interpretAst(json, options); +}; + +export const interpret = (compiledSchema, instance, options = BASIC) => { + const annotationsPlugin = new AnnotationsPlugin(); + const plugins = options.plugins ?? []; + + const output = validate(compiledSchema, instance, { + outputFormat: typeof options === "string" ? options : options.outputFormat ?? BASIC, + plugins: [annotationsPlugin, ...plugins] + }); + + if (!output.valid) { + throw new ValidationError(output); + } + + for (const annotation of annotationsPlugin.annotations) { + const node = Instance.get(annotation.instanceLocation, instance); + const keyword = annotation.keyword; + if (!node.annotations[keyword]) { + node.annotations[keyword] = []; + } + node.annotations[keyword].unshift(annotation.annotation); + } + + return instance; +}; + +export { ValidationError } from "./validation-error.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts b/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts new file mode 100644 index 00000000..da8693cf --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts @@ -0,0 +1 @@ +export const isCompatible: (compatibility: string | undefined, versionUnderTest: number) => boolean; diff --git a/node_modules/@hyperjump/json-schema/annotations/test-utils.js b/node_modules/@hyperjump/json-schema/annotations/test-utils.js new file mode 100644 index 00000000..5841ca7f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/test-utils.js @@ -0,0 +1,38 @@ +export const isCompatible = (compatibility, versionUnderTest) => { + if (compatibility === undefined) { + return true; + } + + const constraints = compatibility.split(","); + for (const constraint of constraints) { + const matches = /(?<=|>=|=)?(?\d+)/.exec(constraint); + if (!matches) { + throw Error(`Invalid compatibility string: ${compatibility}`); + } + + const operator = matches[1] ?? ">="; + const version = parseInt(matches[2], 10); + + switch (operator) { + case ">=": + if (versionUnderTest < version) { + return false; + } + break; + case "<=": + if (versionUnderTest > version) { + return false; + } + break; + case "=": + if (versionUnderTest !== version) { + return false; + } + break; + default: + throw Error(`Unsupported contraint operator: ${operator}`); + } + } + + return true; +}; diff --git a/node_modules/@hyperjump/json-schema/annotations/validation-error.js b/node_modules/@hyperjump/json-schema/annotations/validation-error.js new file mode 100644 index 00000000..b0804723 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/annotations/validation-error.js @@ -0,0 +1,7 @@ +export class ValidationError extends Error { + constructor(output) { + super("Validation Error"); + this.name = this.constructor.name; + this.output = output; + } +} diff --git a/node_modules/@hyperjump/json-schema/bundle/index.d.ts b/node_modules/@hyperjump/json-schema/bundle/index.d.ts new file mode 100644 index 00000000..94c6c912 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/bundle/index.d.ts @@ -0,0 +1,14 @@ +import type { SchemaObject } from "../lib/index.js"; + + +export const bundle: (uri: string, options?: BundleOptions) => Promise; +export const URI: "uri"; +export const UUID: "uuid"; + +export type BundleOptions = { + alwaysIncludeDialect?: boolean; + definitionNamingStrategy?: DefinitionNamingStrategy; + externalSchemas?: string[]; +}; + +export type DefinitionNamingStrategy = "uri" | "uuid"; diff --git a/node_modules/@hyperjump/json-schema/bundle/index.js b/node_modules/@hyperjump/json-schema/bundle/index.js new file mode 100644 index 00000000..99c6fe94 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/bundle/index.js @@ -0,0 +1,83 @@ +import { v4 as uuid } from "uuid"; +import { jrefTypeOf } from "@hyperjump/browser/jref"; +import * as JsonPointer from "@hyperjump/json-pointer"; +import { resolveIri, toAbsoluteIri } from "@hyperjump/uri"; +import { getSchema, toSchema, getKeywordName } from "../lib/experimental.js"; + + +export const URI = "uri", UUID = "uuid"; + +const defaultOptions = { + alwaysIncludeDialect: false, + definitionNamingStrategy: URI, + externalSchemas: [] +}; + +export const bundle = async (url, options = {}) => { + const fullOptions = { ...defaultOptions, ...options }; + + const mainSchema = await getSchema(url); + fullOptions.contextUri = mainSchema.document.baseUri; + fullOptions.contextDialectId = mainSchema.document.dialectId; + + const bundled = toSchema(mainSchema); + fullOptions.bundlingLocation = "/" + getKeywordName(fullOptions.contextDialectId, "https://json-schema.org/keyword/definitions"); + if (JsonPointer.get(fullOptions.bundlingLocation, bundled) === undefined) { + JsonPointer.assign(fullOptions.bundlingLocation, bundled, {}); + } + + return await doBundling(mainSchema.uri, bundled, fullOptions); +}; + +const doBundling = async (schemaUri, bundled, fullOptions, contextSchema, visited = new Set()) => { + visited.add(schemaUri); + + const schema = await getSchema(schemaUri, contextSchema); + for (const reference of allReferences(schema.document.root)) { + const uri = toAbsoluteIri(resolveIri(reference.href, schema.document.baseUri)); + if (visited.has(uri) || fullOptions.externalSchemas.includes(uri) || (uri in schema.document.embedded && !(uri in schema._cache))) { + continue; + } + + const externalSchema = await getSchema(uri, contextSchema); + const embeddedSchema = toSchema(externalSchema, { + contextUri: externalSchema.document.baseUri.startsWith("file:") ? fullOptions.contextUri : undefined, + includeDialect: fullOptions.alwaysIncludeDialect ? "always" : "auto", + contextDialectId: fullOptions.contextDialectId + }); + let id; + if (fullOptions.definitionNamingStrategy === URI) { + const idToken = getKeywordName(externalSchema.document.dialectId, "https://json-schema.org/keyword/id") + || getKeywordName(externalSchema.document.dialectId, "https://json-schema.org/keyword/draft-04/id"); + id = embeddedSchema[idToken]; + } else if (fullOptions.definitionNamingStrategy === UUID) { + id = uuid(); + } else { + throw Error(`Unknown definition naming stragety: ${fullOptions.definitionNamingStrategy}`); + } + const pointer = JsonPointer.append(id, fullOptions.bundlingLocation); + JsonPointer.assign(pointer, bundled, embeddedSchema); + + bundled = await doBundling(uri, bundled, fullOptions, schema, visited); + } + + return bundled; +}; + +const allReferences = function* (node) { + switch (jrefTypeOf(node)) { + case "object": + for (const property in node) { + yield* allReferences(node[property]); + } + break; + case "array": + for (const item of node) { + yield* allReferences(item); + } + break; + case "reference": + yield node; + break; + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js b/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js new file mode 100644 index 00000000..da09d332 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js @@ -0,0 +1,38 @@ +import { drop } from "@hyperjump/pact"; +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getKeywordName, Validation } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/additionalItems"; + +const compile = async (schema, ast, parentSchema) => { + const itemsKeywordName = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/items"); + const items = await Browser.step(itemsKeywordName, parentSchema); + const numberOfItems = Browser.typeOf(items) === "array" ? Browser.length(items) : Number.MAX_SAFE_INTEGER; + + return [numberOfItems, await Validation.compile(schema, ast)]; +}; + +const interpret = ([numberOfItems, additionalItems], instance, context) => { + if (Instance.typeOf(instance) !== "array") { + return true; + } + + let isValid = true; + let index = numberOfItems; + for (const item of drop(numberOfItems, Instance.iter(instance))) { + if (!Validation.interpret(additionalItems, item, context)) { + isValid = false; + } + + context.evaluatedItems?.add(index); + index++; + } + + return isValid; +}; + +const simpleApplicator = true; + +export default { id, compile, interpret, simpleApplicator }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/dependencies.js b/node_modules/@hyperjump/json-schema/draft-04/dependencies.js new file mode 100644 index 00000000..60e96ce5 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/dependencies.js @@ -0,0 +1,36 @@ +import { pipe, asyncMap, asyncCollectArray } from "@hyperjump/pact"; +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { Validation } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/dependencies"; + +const compile = (schema, ast) => pipe( + Browser.entries(schema), + asyncMap(async ([key, dependency]) => [ + key, + Browser.typeOf(dependency) === "array" ? Browser.value(dependency) : await Validation.compile(dependency, ast) + ]), + asyncCollectArray +); + +const interpret = (dependencies, instance, context) => { + if (Instance.typeOf(instance) !== "object") { + return true; + } + + return dependencies.every(([propertyName, dependency]) => { + if (!Instance.has(propertyName, instance)) { + return true; + } + + if (Array.isArray(dependency)) { + return dependency.every((key) => Instance.has(key, instance)); + } else { + return Validation.interpret(dependency, instance, context); + } + }); +}; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js new file mode 100644 index 00000000..5acd1aa0 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js @@ -0,0 +1,5 @@ +const id = "https://json-schema.org/keyword/draft-04/exclusiveMaximum"; +const compile = (schema) => schema.value; +const interpret = () => true; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js new file mode 100644 index 00000000..26e00941 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js @@ -0,0 +1,5 @@ +const id = "https://json-schema.org/keyword/draft-04/exclusiveMinimum"; +const compile = (schema) => schema.value; +const interpret = () => true; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/format.js b/node_modules/@hyperjump/json-schema/draft-04/format.js new file mode 100644 index 00000000..e4854f83 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/format.js @@ -0,0 +1,31 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-04/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (getShouldValidateFormat() === false) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "email": "https://json-schema.org/format/email", + "hostname": "https://json-schema.org/format/draft-04/hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/id.js b/node_modules/@hyperjump/json-schema/draft-04/id.js new file mode 100644 index 00000000..b5f6df1b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/id.js @@ -0,0 +1 @@ +export default { id: "https://json-schema.org/keyword/draft-04/id" }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/index.d.ts b/node_modules/@hyperjump/json-schema/draft-04/index.d.ts new file mode 100644 index 00000000..ed6460b2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/index.d.ts @@ -0,0 +1,43 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft04 = { + $ref: string; +} | { + $schema?: "http://json-schema.org/draft-04/schema#"; + id?: string; + title?: string; + description?: string; + default?: Json; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: boolean; + minimum?: number; + exclusiveMinimum?: boolean; + maxLength?: number; + minLength?: number; + pattern?: string; + additionalItems?: boolean | JsonSchemaDraft04; + items?: JsonSchemaDraft04 | JsonSchemaDraft04[]; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxProperties?: number; + minProperties?: number; + required?: string[]; + additionalProperties?: boolean | JsonSchemaDraft04; + definitions?: Record; + properties?: Record; + patternProperties?: Record; + dependencies?: Record; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri"; + allOf?: JsonSchemaDraft04[]; + anyOf?: JsonSchemaDraft04[]; + oneOf?: JsonSchemaDraft04[]; + not?: JsonSchemaDraft04; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-04/index.js b/node_modules/@hyperjump/json-schema/draft-04/index.js new file mode 100644 index 00000000..5ab69ea8 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/index.js @@ -0,0 +1,71 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import metaSchema from "./schema.js"; +import additionalItems from "./additionalItems.js"; +import dependencies from "./dependencies.js"; +import exclusiveMaximum from "./exclusiveMaximum.js"; +import exclusiveMinimum from "./exclusiveMinimum.js"; +import id from "./id.js"; +import items from "./items.js"; +import format from "./format.js"; +import maximum from "./maximum.js"; +import minimum from "./minimum.js"; +import ref from "./ref.js"; + + +addKeyword(additionalItems); +addKeyword(dependencies); +addKeyword(exclusiveMaximum); +addKeyword(exclusiveMinimum); +addKeyword(maximum); +addKeyword(minimum); +addKeyword(id); +addKeyword(items); +addKeyword(format); +addKeyword(ref); + +const jsonSchemaVersion = "http://json-schema.org/draft-04/schema"; + +defineVocabulary(jsonSchemaVersion, { + "id": "https://json-schema.org/keyword/draft-04/id", + "$ref": "https://json-schema.org/keyword/draft-04/ref", + "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "default": "https://json-schema.org/keyword/default", + "definitions": "https://json-schema.org/keyword/definitions", + "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", + "description": "https://json-schema.org/keyword/description", + "enum": "https://json-schema.org/keyword/enum", + "exclusiveMaximum": "https://json-schema.org/keyword/draft-04/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/draft-04/exclusiveMinimum", + "format": "https://json-schema.org/keyword/draft-04/format", + "items": "https://json-schema.org/keyword/draft-04/items", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/draft-04/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/draft-04/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "pattern": "https://json-schema.org/keyword/pattern", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "properties": "https://json-schema.org/keyword/properties", + "required": "https://json-schema.org/keyword/required", + "title": "https://json-schema.org/keyword/title", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +loadDialect(jsonSchemaVersion, { + [jsonSchemaVersion]: true +}, true); + +registerSchema(metaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-04/items.js b/node_modules/@hyperjump/json-schema/draft-04/items.js new file mode 100644 index 00000000..9d1ece4b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/items.js @@ -0,0 +1,57 @@ +import { pipe, asyncMap, asyncCollectArray, zip } from "@hyperjump/pact"; +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { Validation } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/items"; + +const compile = (schema, ast) => { + if (Browser.typeOf(schema) === "array") { + return pipe( + Browser.iter(schema), + asyncMap((itemSchema) => Validation.compile(itemSchema, ast)), + asyncCollectArray + ); + } else { + return Validation.compile(schema, ast); + } +}; + +const interpret = (items, instance, context) => { + if (Instance.typeOf(instance) !== "array") { + return true; + } + + let isValid = true; + let index = 0; + + if (typeof items === "string") { + for (const item of Instance.iter(instance)) { + if (!Validation.interpret(items, item, context)) { + isValid = false; + } + + context.evaluatedItems?.add(index++); + } + } else { + for (const [tupleItem, tupleInstance] of zip(items, Instance.iter(instance))) { + if (!tupleInstance) { + break; + } + + if (!Validation.interpret(tupleItem, tupleInstance, context)) { + isValid = false; + } + + context.evaluatedItems?.add(index); + index++; + } + } + + return isValid; +}; + +const simpleApplicator = true; + +export default { id, compile, interpret, simpleApplicator }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/maximum.js b/node_modules/@hyperjump/json-schema/draft-04/maximum.js new file mode 100644 index 00000000..a2a889ce --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/maximum.js @@ -0,0 +1,25 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getKeywordName } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/maximum"; + +const compile = async (schema, _ast, parentSchema) => { + const exclusiveMaximumKeyword = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/exclusiveMaximum"); + const exclusiveMaximum = await Browser.step(exclusiveMaximumKeyword, parentSchema); + const isExclusive = Browser.value(exclusiveMaximum); + + return [Browser.value(schema), isExclusive]; +}; + +const interpret = ([maximum, isExclusive], instance) => { + if (Instance.typeOf(instance) !== "number") { + return true; + } + + const value = Instance.value(instance); + return isExclusive ? value < maximum : value <= maximum; +}; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/minimum.js b/node_modules/@hyperjump/json-schema/draft-04/minimum.js new file mode 100644 index 00000000..c0146aba --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/minimum.js @@ -0,0 +1,25 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getKeywordName } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-04/minimum"; + +const compile = async (schema, _ast, parentSchema) => { + const exclusiveMinimumKeyword = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/exclusiveMinimum"); + const exclusiveMinimum = await Browser.step(exclusiveMinimumKeyword, parentSchema); + const isExclusive = Browser.value(exclusiveMinimum); + + return [Browser.value(schema), isExclusive]; +}; + +const interpret = ([minimum, isExclusive], instance) => { + if (Instance.typeOf(instance) !== "number") { + return true; + } + + const value = Instance.value(instance); + return isExclusive ? value > minimum : value >= minimum; +}; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/ref.js b/node_modules/@hyperjump/json-schema/draft-04/ref.js new file mode 100644 index 00000000..5e714c50 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/ref.js @@ -0,0 +1 @@ +export default { id: "https://json-schema.org/keyword/draft-04/ref" }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/schema.js b/node_modules/@hyperjump/json-schema/draft-04/schema.js new file mode 100644 index 00000000..130d72f4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-04/schema.js @@ -0,0 +1,149 @@ +export default { + "id": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "positiveInteger": { + "type": "integer", + "minimum": 0 + }, + "positiveIntegerDefault0": { + "allOf": [{ "$ref": "#/definitions/positiveInteger" }, { "default": 0 }] + }, + "simpleTypes": { + "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + } + }, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "$schema": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": {}, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { "$ref": "#/definitions/positiveInteger" }, + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": {} + }, + "maxItems": { "$ref": "#/definitions/positiveInteger" }, + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { "type": "string" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "dependencies": { + "exclusiveMaximum": ["maximum"], + "exclusiveMinimum": ["minimum"] + }, + "default": {} +}; diff --git a/node_modules/@hyperjump/json-schema/draft-06/contains.js b/node_modules/@hyperjump/json-schema/draft-06/contains.js new file mode 100644 index 00000000..628fe03e --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/contains.js @@ -0,0 +1,15 @@ +import { some } from "@hyperjump/pact"; +import * as Instance from "../lib/instance.js"; +import { Validation } from "../lib/experimental.js"; + + +const id = "https://json-schema.org/keyword/draft-06/contains"; + +const compile = (schema, ast) => Validation.compile(schema, ast); + +const interpret = (contains, instance, context) => { + return Instance.typeOf(instance) !== "array" + || some((item) => Validation.interpret(contains, item, context), Instance.iter(instance)); +}; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-06/format.js b/node_modules/@hyperjump/json-schema/draft-06/format.js new file mode 100644 index 00000000..5c8cdf23 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/format.js @@ -0,0 +1,34 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-06/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (getShouldValidateFormat() === false) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "email": "https://json-schema.org/format/email", + "hostname": "https://json-schema.org/format/draft-04/hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-06/index.d.ts b/node_modules/@hyperjump/json-schema/draft-06/index.d.ts new file mode 100644 index 00000000..becf03fa --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/index.d.ts @@ -0,0 +1,49 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft06Ref = { + $ref: string; +}; +export type JsonSchemaDraft06Object = { + $schema?: "http://json-schema.org/draft-06/schema#"; + $id?: string; + title?: string; + description?: string; + default?: Json; + examples?: Json[]; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + additionalItems?: JsonSchemaDraft06; + items?: JsonSchemaDraft06 | JsonSchemaDraft06[]; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + contains?: JsonSchemaDraft06; + maxProperties?: number; + minProperties?: number; + required?: string[]; + additionalProperties?: JsonSchemaDraft06; + definitions?: Record; + properties?: Record; + patternProperties?: Record; + dependencies?: Record; + propertyNames?: JsonSchemaDraft06; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "uri-template" | "json-pointer"; + allOf?: JsonSchemaDraft06[]; + anyOf?: JsonSchemaDraft06[]; + oneOf?: JsonSchemaDraft06[]; + not?: JsonSchemaDraft06; +}; +export type JsonSchemaDraft06 = boolean | JsonSchemaDraft06Ref | JsonSchemaDraft06Object; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-06/index.js b/node_modules/@hyperjump/json-schema/draft-06/index.js new file mode 100644 index 00000000..ac8b1a7c --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/index.js @@ -0,0 +1,70 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; + +import metaSchema from "./schema.js"; +import additionalItems from "../draft-04/additionalItems.js"; +import contains from "./contains.js"; +import dependencies from "../draft-04/dependencies.js"; +import id from "../draft-04/id.js"; +import items from "../draft-04/items.js"; +import format from "./format.js"; +import ref from "../draft-04/ref.js"; + + +addKeyword(additionalItems); +addKeyword(dependencies); +addKeyword(contains); +addKeyword(id); +addKeyword(items); +addKeyword(format); +addKeyword(ref); + +const jsonSchemaVersion = "http://json-schema.org/draft-06/schema"; + +defineVocabulary(jsonSchemaVersion, { + "$id": "https://json-schema.org/keyword/draft-04/id", + "$ref": "https://json-schema.org/keyword/draft-04/ref", + "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "const": "https://json-schema.org/keyword/const", + "contains": "https://json-schema.org/keyword/draft-06/contains", + "default": "https://json-schema.org/keyword/default", + "definitions": "https://json-schema.org/keyword/definitions", + "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", + "description": "https://json-schema.org/keyword/description", + "enum": "https://json-schema.org/keyword/enum", + "examples": "https://json-schema.org/keyword/examples", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "format": "https://json-schema.org/keyword/draft-06/format", + "items": "https://json-schema.org/keyword/draft-04/items", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "pattern": "https://json-schema.org/keyword/pattern", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "properties": "https://json-schema.org/keyword/properties", + "propertyNames": "https://json-schema.org/keyword/propertyNames", + "required": "https://json-schema.org/keyword/required", + "title": "https://json-schema.org/keyword/title", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +loadDialect(jsonSchemaVersion, { + [jsonSchemaVersion]: true +}, true); + +registerSchema(metaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-06/schema.js b/node_modules/@hyperjump/json-schema/draft-06/schema.js new file mode 100644 index 00000000..3ebf9910 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-06/schema.js @@ -0,0 +1,154 @@ +export default { + "$schema": "http://json-schema.org/draft-06/schema#", + "$id": "http://json-schema.org/draft-06/schema#", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { "$ref": "#/definitions/nonNegativeInteger" }, + { "default": 0 } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + }, + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": {}, + "examples": { + "type": "array", + "items": {} + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, + "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { "$ref": "#" }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": {} + }, + "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, + "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { "$ref": "#" }, + "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, + "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { "$ref": "#" }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "propertyNames": { "$ref": "#" }, + "const": {}, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { "type": "string" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "default": {} +}; diff --git a/node_modules/@hyperjump/json-schema/draft-07/format.js b/node_modules/@hyperjump/json-schema/draft-07/format.js new file mode 100644 index 00000000..0da3477f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-07/format.js @@ -0,0 +1,42 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-07/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (getShouldValidateFormat() === false) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-07/index.d.ts b/node_modules/@hyperjump/json-schema/draft-07/index.d.ts new file mode 100644 index 00000000..33a0cdcb --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-07/index.d.ts @@ -0,0 +1,55 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft07 = boolean | { + $ref: string; +} | { + $schema?: "http://json-schema.org/draft-07/schema#"; + $id?: string; + $comment?: string; + title?: string; + description?: string; + default?: Json; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + additionalItems?: JsonSchemaDraft07; + items?: JsonSchemaDraft07 | JsonSchemaDraft07[]; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + contains?: JsonSchemaDraft07; + maxProperties?: number; + minProperties?: number; + required?: string[]; + additionalProperties?: JsonSchemaDraft07; + definitions?: Record; + properties?: Record; + patternProperties?: Record; + dependencies?: Record; + propertyNames?: JsonSchemaDraft07; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + format?: "date-time" | "date" | "time" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + if?: JsonSchemaDraft07; + then?: JsonSchemaDraft07; + else?: JsonSchemaDraft07; + allOf?: JsonSchemaDraft07[]; + anyOf?: JsonSchemaDraft07[]; + oneOf?: JsonSchemaDraft07[]; + not?: JsonSchemaDraft07; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-07/index.js b/node_modules/@hyperjump/json-schema/draft-07/index.js new file mode 100644 index 00000000..0bdbfaa5 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-07/index.js @@ -0,0 +1,78 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; + +import metaSchema from "./schema.js"; +import additionalItems from "../draft-04/additionalItems.js"; +import contains from "../draft-06/contains.js"; +import dependencies from "../draft-04/dependencies.js"; +import items from "../draft-04/items.js"; +import id from "../draft-04/id.js"; +import format from "./format.js"; +import ref from "../draft-04/ref.js"; + + +addKeyword(additionalItems); +addKeyword(contains); +addKeyword(dependencies); +addKeyword(id); +addKeyword(items); +addKeyword(format); +addKeyword(ref); + +const jsonSchemaVersion = "http://json-schema.org/draft-07/schema"; + +defineVocabulary(jsonSchemaVersion, { + "$id": "https://json-schema.org/keyword/draft-04/id", + "$ref": "https://json-schema.org/keyword/draft-04/ref", + "$comment": "https://json-schema.org/keyword/comment", + "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "const": "https://json-schema.org/keyword/const", + "contains": "https://json-schema.org/keyword/draft-06/contains", + "contentEncoding": "https://json-schema.org/keyword/contentEncoding", + "contentMediaType": "https://json-schema.org/keyword/contentMediaType", + "default": "https://json-schema.org/keyword/default", + "definitions": "https://json-schema.org/keyword/definitions", + "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", + "description": "https://json-schema.org/keyword/description", + "enum": "https://json-schema.org/keyword/enum", + "examples": "https://json-schema.org/keyword/examples", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "format": "https://json-schema.org/keyword/draft-07/format", + "if": "https://json-schema.org/keyword/if", + "then": "https://json-schema.org/keyword/then", + "else": "https://json-schema.org/keyword/else", + "items": "https://json-schema.org/keyword/draft-04/items", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "pattern": "https://json-schema.org/keyword/pattern", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "properties": "https://json-schema.org/keyword/properties", + "propertyNames": "https://json-schema.org/keyword/propertyNames", + "readOnly": "https://json-schema.org/keyword/readOnly", + "required": "https://json-schema.org/keyword/required", + "title": "https://json-schema.org/keyword/title", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems", + "writeOnly": "https://json-schema.org/keyword/writeOnly" +}); + +loadDialect(jsonSchemaVersion, { + [jsonSchemaVersion]: true +}, true); + +registerSchema(metaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-07/schema.js b/node_modules/@hyperjump/json-schema/draft-07/schema.js new file mode 100644 index 00000000..83aa3de6 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-07/schema.js @@ -0,0 +1,172 @@ +export default { + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://json-schema.org/draft-07/schema#", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { "$ref": "#/definitions/nonNegativeInteger" }, + { "default": 0 } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + }, + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$comment": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, + "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { "$ref": "#" }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": true + }, + "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, + "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { "$ref": "#" }, + "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, + "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { "$ref": "#" }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "propertyNames": { "format": "regex" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "propertyNames": { "$ref": "#" }, + "const": true, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { "type": "string" }, + "contentMediaType": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "if": { "$ref": "#" }, + "then": { "$ref": "#" }, + "else": { "$ref": "#" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "default": true +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js new file mode 100644 index 00000000..4f884d29 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js @@ -0,0 +1,44 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-2019-09/format-assertion"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (getShouldValidateFormat() === false) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "duration": "https://json-schema.org/format/duration", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uuid": "https://json-schema.org/format/uuid", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/format.js b/node_modules/@hyperjump/json-schema/draft-2019-09/format.js new file mode 100644 index 00000000..2129b595 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/format.js @@ -0,0 +1,44 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-2019-09/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (!getShouldValidateFormat()) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "duration": "https://json-schema.org/format/duration", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uuid": "https://json-schema.org/format/uuid", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts b/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts new file mode 100644 index 00000000..6b332238 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts @@ -0,0 +1,66 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft201909Object = { + $schema?: "https://json-schema.org/draft/2019-09/schema"; + $id?: string; + $anchor?: string; + $ref?: string; + $recursiveRef?: "#"; + $recursiveAnchor?: boolean; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: JsonSchemaDraft201909; + unevaluatedItems?: JsonSchemaDraft201909; + items?: JsonSchemaDraft201909 | JsonSchemaDraft201909[]; + contains?: JsonSchemaDraft201909; + additionalProperties?: JsonSchemaDraft201909; + unevaluatedProperties?: JsonSchemaDraft201909; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: JsonSchemaDraft201909; + if?: JsonSchemaDraft201909; + then?: JsonSchemaDraft201909; + else?: JsonSchemaDraft201909; + allOf?: JsonSchemaDraft201909[]; + anyOf?: JsonSchemaDraft201909[]; + oneOf?: JsonSchemaDraft201909[]; + not?: JsonSchemaDraft201909; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: JsonSchemaDraft201909; +}; +export type JsonSchemaDraft201909 = boolean | JsonSchemaDraft201909Object; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/index.js b/node_modules/@hyperjump/json-schema/draft-2019-09/index.js new file mode 100644 index 00000000..8abfa4e6 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/index.js @@ -0,0 +1,118 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; + +import metaSchema from "./schema.js"; +import coreMetaSchema from "./meta/core.js"; +import applicatorMetaSchema from "./meta/applicator.js"; +import validationMetaSchema from "./meta/validation.js"; +import metaDataMetaSchema from "./meta/meta-data.js"; +import formatMetaSchema from "./meta/format.js"; +import contentMetaSchema from "./meta/content.js"; + +import additionalItems from "../draft-04/additionalItems.js"; +import items from "../draft-04/items.js"; +import formatAssertion from "./format-assertion.js"; +import format from "./format.js"; +import recursiveAnchor from "./recursiveAnchor.js"; +import recursiveRef from "../draft-2020-12/dynamicRef.js"; + + +addKeyword(additionalItems); +addKeyword(items); +addKeyword(formatAssertion); +addKeyword(format); +addKeyword(recursiveAnchor); +addKeyword(recursiveRef); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/core", { + "$anchor": "https://json-schema.org/keyword/anchor", + "$comment": "https://json-schema.org/keyword/comment", + "$defs": "https://json-schema.org/keyword/definitions", + "$recursiveAnchor": "https://json-schema.org/keyword/draft-2019-09/recursiveAnchor", + "$recursiveRef": "https://json-schema.org/keyword/draft-2020-12/dynamicRef", + "$id": "https://json-schema.org/keyword/id", + "$ref": "https://json-schema.org/keyword/ref", + "$vocabulary": "https://json-schema.org/keyword/vocabulary" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/applicator", { + "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "contains": "https://json-schema.org/keyword/contains", + "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", + "if": "https://json-schema.org/keyword/if", + "then": "https://json-schema.org/keyword/then", + "else": "https://json-schema.org/keyword/else", + "items": "https://json-schema.org/keyword/draft-04/items", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "properties": "https://json-schema.org/keyword/properties", + "propertyNames": "https://json-schema.org/keyword/propertyNames", + "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", + "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/validation", { + "const": "https://json-schema.org/keyword/const", + "enum": "https://json-schema.org/keyword/enum", + "dependentRequired": "https://json-schema.org/keyword/dependentRequired", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "maxContains": "https://json-schema.org/keyword/maxContains", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minContains": "https://json-schema.org/keyword/minContains", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "pattern": "https://json-schema.org/keyword/pattern", + "required": "https://json-schema.org/keyword/required", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/meta-data", { + "default": "https://json-schema.org/keyword/default", + "deprecated": "https://json-schema.org/keyword/deprecated", + "description": "https://json-schema.org/keyword/description", + "examples": "https://json-schema.org/keyword/examples", + "readOnly": "https://json-schema.org/keyword/readOnly", + "title": "https://json-schema.org/keyword/title", + "writeOnly": "https://json-schema.org/keyword/writeOnly" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/format", { + "format": "https://json-schema.org/keyword/draft-2019-09/format-assertion" +}); + +defineVocabulary("https://json-schema.org/draft/2019-09/vocab/content", { + "contentEncoding": "https://json-schema.org/keyword/contentEncoding", + "contentMediaType": "https://json-schema.org/keyword/contentMediaType", + "contentSchema": "https://json-schema.org/keyword/contentSchema" +}); + +loadDialect("https://json-schema.org/draft/2019-09/schema", { + "https://json-schema.org/draft/2019-09/vocab/core": true, + "https://json-schema.org/draft/2019-09/vocab/applicator": true, + "https://json-schema.org/draft/2019-09/vocab/validation": true, + "https://json-schema.org/draft/2019-09/vocab/meta-data": true, + "https://json-schema.org/draft/2019-09/vocab/format": true, + "https://json-schema.org/draft/2019-09/vocab/content": true +}, true); + +registerSchema(metaSchema); +registerSchema(coreMetaSchema); +registerSchema(applicatorMetaSchema); +registerSchema(validationMetaSchema); +registerSchema(metaDataMetaSchema); +registerSchema(formatMetaSchema); +registerSchema(contentMetaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js new file mode 100644 index 00000000..3ff97a46 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js @@ -0,0 +1,55 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/applicator", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/applicator": true + }, + "$recursiveAnchor": true, + + "title": "Applicator vocabulary meta-schema", + "properties": { + "additionalItems": { "$recursiveRef": "#" }, + "unevaluatedItems": { "$recursiveRef": "#" }, + "items": { + "anyOf": [ + { "$recursiveRef": "#" }, + { "$ref": "#/$defs/schemaArray" } + ] + }, + "contains": { "$recursiveRef": "#" }, + "additionalProperties": { "$recursiveRef": "#" }, + "unevaluatedProperties": { "$recursiveRef": "#" }, + "properties": { + "type": "object", + "additionalProperties": { "$recursiveRef": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$recursiveRef": "#" }, + "propertyNames": { "format": "regex" }, + "default": {} + }, + "dependentSchemas": { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + }, + "propertyNames": { "$recursiveRef": "#" }, + "if": { "$recursiveRef": "#" }, + "then": { "$recursiveRef": "#" }, + "else": { "$recursiveRef": "#" }, + "allOf": { "$ref": "#/$defs/schemaArray" }, + "anyOf": { "$ref": "#/$defs/schemaArray" }, + "oneOf": { "$ref": "#/$defs/schemaArray" }, + "not": { "$recursiveRef": "#" } + }, + "$defs": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$recursiveRef": "#" } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js new file mode 100644 index 00000000..c62760f3 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js @@ -0,0 +1,17 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/content", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/content": true + }, + "$recursiveAnchor": true, + + "title": "Content vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "contentMediaType": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "contentSchema": { "$recursiveRef": "#" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js new file mode 100644 index 00000000..ea5fefa1 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js @@ -0,0 +1,57 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/core", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/core": true + }, + "$recursiveAnchor": true, + + "title": "Core vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference", + "$comment": "Non-empty fragments not allowed.", + "pattern": "^[^#]*#?$" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$anchor": { + "type": "string", + "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$recursiveRef": { + "type": "string", + "format": "uri-reference" + }, + "$recursiveAnchor": { + "type": "boolean", + "default": false + }, + "$vocabulary": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "$comment": { + "type": "string" + }, + "$defs": { + "type": "object", + "additionalProperties": { "$recursiveRef": "#" }, + "default": {} + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js new file mode 100644 index 00000000..888ddf1b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js @@ -0,0 +1,14 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/format", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/format": true + }, + "$recursiveAnchor": true, + + "title": "Format vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "format": { "type": "string" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js new file mode 100644 index 00000000..63f0c4c2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js @@ -0,0 +1,37 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/meta-data", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/meta-data": true + }, + "$recursiveAnchor": true, + + "title": "Meta-data vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "deprecated": { + "type": "boolean", + "default": false + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js new file mode 100644 index 00000000..5dec0619 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js @@ -0,0 +1,98 @@ +export default { + "$id": "https://json-schema.org/draft/2019-09/meta/validation", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/validation": true + }, + "$recursiveAnchor": true, + + "title": "Validation vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "minContains": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 1 + }, + "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/$defs/stringArray" }, + "dependentRequired": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/stringArray" + } + }, + "const": true, + "enum": { + "type": "array", + "items": true + }, + "type": { + "anyOf": [ + { "$ref": "#/$defs/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/$defs/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + } + }, + "$defs": { + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 0 + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js b/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js new file mode 100644 index 00000000..c2e74085 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js @@ -0,0 +1 @@ +export default { id: "https://json-schema.org/keyword/draft-2019-09/recursiveAnchor" }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js b/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js new file mode 100644 index 00000000..76add3e1 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js @@ -0,0 +1,42 @@ +export default { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "https://json-schema.org/draft/2019-09/schema", + "$vocabulary": { + "https://json-schema.org/draft/2019-09/vocab/core": true, + "https://json-schema.org/draft/2019-09/vocab/applicator": true, + "https://json-schema.org/draft/2019-09/vocab/validation": true, + "https://json-schema.org/draft/2019-09/vocab/meta-data": true, + "https://json-schema.org/draft/2019-09/vocab/format": false, + "https://json-schema.org/draft/2019-09/vocab/content": true + }, + "$recursiveAnchor": true, + + "title": "Core and Validation specifications meta-schema", + "allOf": [ + { "$ref": "meta/core" }, + { "$ref": "meta/applicator" }, + { "$ref": "meta/validation" }, + { "$ref": "meta/meta-data" }, + { "$ref": "meta/format" }, + { "$ref": "meta/content" } + ], + "type": ["object", "boolean"], + "properties": { + "definitions": { + "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", + "type": "object", + "additionalProperties": { "$recursiveRef": "#" }, + "default": {} + }, + "dependencies": { + "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$recursiveRef": "#" }, + { "$ref": "meta/validation#/$defs/stringArray" } + ] + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js new file mode 100644 index 00000000..0e49b934 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js @@ -0,0 +1 @@ +export default { id: "https://json-schema.org/keyword/draft-2020-12/dynamicAnchor" }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js new file mode 100644 index 00000000..a5f2581b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js @@ -0,0 +1,38 @@ +import * as Browser from "@hyperjump/browser"; +import { Validation, canonicalUri } from "../lib/experimental.js"; +import { toAbsoluteUri, uriFragment } from "../lib/common.js"; + + +const id = "https://json-schema.org/keyword/draft-2020-12/dynamicRef"; + +const compile = async (dynamicRef, ast) => { + const fragment = uriFragment(Browser.value(dynamicRef)); + const referencedSchema = await Browser.get(Browser.value(dynamicRef), dynamicRef); + await Validation.compile(referencedSchema, ast); + return [referencedSchema.document.baseUri, fragment, canonicalUri(referencedSchema)]; +}; + +const interpret = ([id, fragment, ref], instance, context) => { + if (fragment in context.ast.metaData[id].dynamicAnchors) { + context.dynamicAnchors = { ...context.ast.metaData[id].dynamicAnchors, ...context.dynamicAnchors }; + return Validation.interpret(context.dynamicAnchors[fragment], instance, context); + } else { + return Validation.interpret(ref, instance, context); + } +}; + +const simpleApplicator = true; + +const plugin = { + beforeSchema(url, _instance, context) { + context.dynamicAnchors = { + ...context.ast.metaData[toAbsoluteUri(url)].dynamicAnchors, + ...context.dynamicAnchors + }; + }, + beforeKeyword(_url, _instance, context, schemaContext) { + context.dynamicAnchors = schemaContext.dynamicAnchors; + } +}; + +export default { id, compile, interpret, simpleApplicator, plugin }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js new file mode 100644 index 00000000..2eecf321 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js @@ -0,0 +1,43 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-2020-12/format-assertion"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + const handler = getFormatHandler(formats[format]); + if (!handler) { + throw Error(`The '${format}' format is not supported.`); + } + + return handler(Instance.value(instance)); +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "duration": "https://json-schema.org/format/duration", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uuid": "https://json-schema.org/format/uuid", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/format.js b/node_modules/@hyperjump/json-schema/draft-2020-12/format.js new file mode 100644 index 00000000..d1550e2a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/format.js @@ -0,0 +1,44 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getShouldValidateFormat } from "../lib/configuration.js"; +import { getFormatHandler } from "../lib/keywords.js"; + + +const id = "https://json-schema.org/keyword/draft-2020-12/format"; + +const compile = (schema) => Browser.value(schema); + +const interpret = (format, instance) => { + if (!getShouldValidateFormat()) { + return true; + } + + const handler = getFormatHandler(formats[format]); + return handler?.(Instance.value(instance)) ?? true; +}; + +const annotation = (format) => format; + +const formats = { + "date-time": "https://json-schema.org/format/date-time", + "date": "https://json-schema.org/format/date", + "time": "https://json-schema.org/format/time", + "duration": "https://json-schema.org/format/duration", + "email": "https://json-schema.org/format/email", + "idn-email": "https://json-schema.org/format/idn-email", + "hostname": "https://json-schema.org/format/hostname", + "idn-hostname": "https://json-schema.org/format/idn-hostname", + "ipv4": "https://json-schema.org/format/ipv4", + "ipv6": "https://json-schema.org/format/ipv6", + "uri": "https://json-schema.org/format/uri", + "uri-reference": "https://json-schema.org/format/uri-reference", + "iri": "https://json-schema.org/format/iri", + "iri-reference": "https://json-schema.org/format/iri-reference", + "uuid": "https://json-schema.org/format/uuid", + "uri-template": "https://json-schema.org/format/uri-template", + "json-pointer": "https://json-schema.org/format/json-pointer", + "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", + "regex": "https://json-schema.org/format/regex" +}; + +export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts b/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts new file mode 100644 index 00000000..75f26f9d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts @@ -0,0 +1,67 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaDraft202012Object = { + $schema?: "https://json-schema.org/draft/2020-12/schema"; + $id?: string; + $anchor?: string; + $ref?: string; + $dynamicRef?: string; + $dynamicAnchor?: string; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: JsonSchemaDraft202012; + unevaluatedItems?: JsonSchemaDraft202012; + prefixItems?: JsonSchemaDraft202012[]; + items?: JsonSchemaDraft202012; + contains?: JsonSchemaDraft202012; + additionalProperties?: JsonSchemaDraft202012; + unevaluatedProperties?: JsonSchemaDraft202012; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: JsonSchemaDraft202012; + if?: JsonSchemaDraft202012; + then?: JsonSchemaDraft202012; + else?: JsonSchemaDraft202012; + allOf?: JsonSchemaDraft202012[]; + anyOf?: JsonSchemaDraft202012[]; + oneOf?: JsonSchemaDraft202012[]; + not?: JsonSchemaDraft202012; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: JsonSchemaDraft202012; +}; +export type JsonSchemaDraft202012 = boolean | JsonSchemaDraft202012Object; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/index.js b/node_modules/@hyperjump/json-schema/draft-2020-12/index.js new file mode 100644 index 00000000..971a7391 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/index.js @@ -0,0 +1,126 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; + +import metaSchema from "./schema.js"; +import coreMetaSchema from "./meta/core.js"; +import applicatorMetaSchema from "./meta/applicator.js"; +import validationMetaSchema from "./meta/validation.js"; +import metaDataMetaSchema from "./meta/meta-data.js"; +import formatAnnotationMetaSchema from "./meta/format-annotation.js"; +import formatAssertionMetaSchema from "./meta/format-assertion.js"; +import contentMetaSchema from "./meta/content.js"; +import unevaluatedMetaSchema from "./meta/unevaluated.js"; + +import dynamicAnchor from "./dynamicAnchor.js"; +import dynamicRef from "./dynamicRef.js"; +import format from "./format.js"; +import formatAssertion from "./format-assertion.js"; + + +addKeyword(dynamicRef); +addKeyword(dynamicAnchor); +addKeyword(format); +addKeyword(formatAssertion); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/core", { + "$anchor": "https://json-schema.org/keyword/anchor", + "$comment": "https://json-schema.org/keyword/comment", + "$defs": "https://json-schema.org/keyword/definitions", + "$dynamicAnchor": "https://json-schema.org/keyword/draft-2020-12/dynamicAnchor", + "$dynamicRef": "https://json-schema.org/keyword/draft-2020-12/dynamicRef", + "$id": "https://json-schema.org/keyword/id", + "$ref": "https://json-schema.org/keyword/ref", + "$vocabulary": "https://json-schema.org/keyword/vocabulary" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/applicator", { + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "contains": "https://json-schema.org/keyword/contains", + "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", + "if": "https://json-schema.org/keyword/if", + "then": "https://json-schema.org/keyword/then", + "else": "https://json-schema.org/keyword/else", + "items": "https://json-schema.org/keyword/items", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "prefixItems": "https://json-schema.org/keyword/prefixItems", + "properties": "https://json-schema.org/keyword/properties", + "propertyNames": "https://json-schema.org/keyword/propertyNames" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/validation", { + "const": "https://json-schema.org/keyword/const", + "dependentRequired": "https://json-schema.org/keyword/dependentRequired", + "enum": "https://json-schema.org/keyword/enum", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "maxContains": "https://json-schema.org/keyword/maxContains", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minContains": "https://json-schema.org/keyword/minContains", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "pattern": "https://json-schema.org/keyword/pattern", + "required": "https://json-schema.org/keyword/required", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/meta-data", { + "default": "https://json-schema.org/keyword/default", + "deprecated": "https://json-schema.org/keyword/deprecated", + "description": "https://json-schema.org/keyword/description", + "examples": "https://json-schema.org/keyword/examples", + "readOnly": "https://json-schema.org/keyword/readOnly", + "title": "https://json-schema.org/keyword/title", + "writeOnly": "https://json-schema.org/keyword/writeOnly" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/format-annotation", { + "format": "https://json-schema.org/keyword/draft-2020-12/format" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/format-assertion", { + "format": "https://json-schema.org/keyword/draft-2020-12/format-assertion" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/content", { + "contentEncoding": "https://json-schema.org/keyword/contentEncoding", + "contentMediaType": "https://json-schema.org/keyword/contentMediaType", + "contentSchema": "https://json-schema.org/keyword/contentSchema" +}); + +defineVocabulary("https://json-schema.org/draft/2020-12/vocab/unevaluated", { + "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", + "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" +}); + +loadDialect("https://json-schema.org/draft/2020-12/schema", { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true +}, true); + +registerSchema(metaSchema); +registerSchema(coreMetaSchema); +registerSchema(applicatorMetaSchema); +registerSchema(validationMetaSchema); +registerSchema(metaDataMetaSchema); +registerSchema(formatAnnotationMetaSchema); +registerSchema(formatAssertionMetaSchema); +registerSchema(contentMetaSchema); +registerSchema(unevaluatedMetaSchema); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js new file mode 100644 index 00000000..cce8a3a2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js @@ -0,0 +1,46 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/applicator", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Applicator vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "prefixItems": { "$ref": "#/$defs/schemaArray" }, + "items": { "$dynamicRef": "#meta" }, + "contains": { "$dynamicRef": "#meta" }, + "additionalProperties": { "$dynamicRef": "#meta" }, + "properties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "#meta" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "#meta" }, + "propertyNames": { "format": "regex" }, + "default": {} + }, + "dependentSchemas": { + "type": "object", + "additionalProperties": { + "$dynamicRef": "#meta" + } + }, + "propertyNames": { "$dynamicRef": "#meta" }, + "if": { "$dynamicRef": "#meta" }, + "then": { "$dynamicRef": "#meta" }, + "else": { "$dynamicRef": "#meta" }, + "allOf": { "$ref": "#/$defs/schemaArray" }, + "anyOf": { "$ref": "#/$defs/schemaArray" }, + "oneOf": { "$ref": "#/$defs/schemaArray" }, + "not": { "$dynamicRef": "#meta" } + }, + "$defs": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$dynamicRef": "#meta" } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js new file mode 100644 index 00000000..f6bd4171 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js @@ -0,0 +1,14 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/content", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Content vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "contentMediaType": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "contentSchema": { "$dynamicRef": "#meta" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js new file mode 100644 index 00000000..f2473e40 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js @@ -0,0 +1,54 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/core", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Core vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference", + "$comment": "Non-empty fragments not allowed.", + "pattern": "^[^#]*#?$" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$anchor": { + "type": "string", + "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$dynamicRef": { + "type": "string", + "format": "uri-reference" + }, + "$dynamicAnchor": { + "type": "string", + "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" + }, + "$vocabulary": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "$comment": { + "type": "string" + }, + "$defs": { + "type": "object", + "additionalProperties": { "$dynamicRef": "#meta" }, + "default": {} + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js new file mode 100644 index 00000000..4d7675d6 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js @@ -0,0 +1,11 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Format vocabulary meta-schema for annotation results", + "type": ["object", "boolean"], + "properties": { + "format": { "type": "string" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js new file mode 100644 index 00000000..09248f38 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js @@ -0,0 +1,11 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/format-assertion", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Format vocabulary meta-schema for assertion results", + "type": ["object", "boolean"], + "properties": { + "format": { "type": "string" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js new file mode 100644 index 00000000..7da3361f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js @@ -0,0 +1,34 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/meta-data", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Meta-data vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "deprecated": { + "type": "boolean", + "default": false + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js new file mode 100644 index 00000000..1a9ab172 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js @@ -0,0 +1,12 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Unevaluated applicator vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "unevaluatedItems": { "$dynamicRef": "#meta" }, + "unevaluatedProperties": { "$dynamicRef": "#meta" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js new file mode 100644 index 00000000..944ea40a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js @@ -0,0 +1,95 @@ +export default { + "$id": "https://json-schema.org/draft/2020-12/meta/validation", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "Validation vocabulary meta-schema", + "type": ["object", "boolean"], + "properties": { + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "minContains": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 1 + }, + "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/$defs/stringArray" }, + "dependentRequired": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/stringArray" + } + }, + "const": true, + "enum": { + "type": "array", + "items": true + }, + "type": { + "anyOf": [ + { "$ref": "#/$defs/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/$defs/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + } + }, + "$defs": { + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 0 + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js b/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js new file mode 100644 index 00000000..d01a036d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js @@ -0,0 +1,44 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json-schema.org/draft/2020-12/schema", + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true + }, + "$dynamicAnchor": "meta", + + "title": "Core and Validation specifications meta-schema", + "allOf": [ + { "$ref": "meta/core" }, + { "$ref": "meta/applicator" }, + { "$ref": "meta/unevaluated" }, + { "$ref": "meta/validation" }, + { "$ref": "meta/meta-data" }, + { "$ref": "meta/format-annotation" }, + { "$ref": "meta/content" } + ], + "type": ["object", "boolean"], + "properties": { + "definitions": { + "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", + "type": "object", + "additionalProperties": { "$dynamicRef": "#meta" }, + "default": {} + }, + "dependencies": { + "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$dynamicRef": "#meta" }, + { "$ref": "meta/validation#/$defs/stringArray" } + ] + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js b/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js new file mode 100644 index 00000000..50901147 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js @@ -0,0 +1,7 @@ +import { isDateTime } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/date-time", + handler: (dateTime) => typeof dateTime !== "string" || isDateTime(dateTime) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/date.js b/node_modules/@hyperjump/json-schema/formats/handlers/date.js new file mode 100644 index 00000000..3c7de2ba --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/date.js @@ -0,0 +1,7 @@ +import { isDate } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/date", + handler: (date) => typeof date !== "string" || isDate(date) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js new file mode 100644 index 00000000..02344e4f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js @@ -0,0 +1,7 @@ +import { isAsciiIdn } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/draft-04/hostname", + handler: (hostname) => typeof hostname !== "string" || isAsciiIdn(hostname) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/duration.js b/node_modules/@hyperjump/json-schema/formats/handlers/duration.js new file mode 100644 index 00000000..33d21220 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/duration.js @@ -0,0 +1,7 @@ +import { isDuration } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/duration", + handler: (duration) => typeof duration !== "string" || isDuration(duration) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/email.js b/node_modules/@hyperjump/json-schema/formats/handlers/email.js new file mode 100644 index 00000000..c335b627 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/email.js @@ -0,0 +1,7 @@ +import { isEmail } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/email", + handler: (email) => typeof email !== "string" || isEmail(email) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js new file mode 100644 index 00000000..43b79a34 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js @@ -0,0 +1,7 @@ +import { isAsciiIdn } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/hostname", + handler: (hostname) => typeof hostname !== "string" || isAsciiIdn(hostname) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js b/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js new file mode 100644 index 00000000..c12e42a4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js @@ -0,0 +1,7 @@ +import { isIdnEmail } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/idn-email", + handler: (email) => typeof email !== "string" || isIdnEmail(email) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js new file mode 100644 index 00000000..b790e251 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js @@ -0,0 +1,7 @@ +import { isIdn } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/idn-hostname", + handler: (hostname) => typeof hostname !== "string" || isIdn(hostname) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js b/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js new file mode 100644 index 00000000..bdc5c35a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js @@ -0,0 +1,7 @@ +import { isIPv4 } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/ipv4", + handler: (ip) => typeof ip !== "string" || isIPv4(ip) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js b/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js new file mode 100644 index 00000000..69d785d2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js @@ -0,0 +1,7 @@ +import { isIPv6 } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/ipv6", + handler: (ip) => typeof ip !== "string" || isIPv6(ip) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js b/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js new file mode 100644 index 00000000..0b4c6836 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js @@ -0,0 +1,7 @@ +import { isIriReference } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/iri-reference", + handler: (uri) => typeof uri !== "string" || isIriReference(uri) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/iri.js b/node_modules/@hyperjump/json-schema/formats/handlers/iri.js new file mode 100644 index 00000000..e6a34efb --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/iri.js @@ -0,0 +1,7 @@ +import { isIri } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/iri", + handler: (uri) => typeof uri !== "string" || isIri(uri) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js b/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js new file mode 100644 index 00000000..1ab64048 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js @@ -0,0 +1,7 @@ +import { isJsonPointer } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/json-pointer", + handler: (pointer) => typeof pointer !== "string" || isJsonPointer(pointer) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/regex.js b/node_modules/@hyperjump/json-schema/formats/handlers/regex.js new file mode 100644 index 00000000..c6ebca60 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/regex.js @@ -0,0 +1,7 @@ +import { isRegex } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/regex", + handler: (regex) => typeof regex !== "string" || isRegex(regex) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js b/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js new file mode 100644 index 00000000..e8fe386a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js @@ -0,0 +1,7 @@ +import { isRelativeJsonPointer } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/relative-json-pointer", + handler: (pointer) => typeof pointer !== "string" || isRelativeJsonPointer(pointer) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/time.js b/node_modules/@hyperjump/json-schema/formats/handlers/time.js new file mode 100644 index 00000000..c98d5b2f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/time.js @@ -0,0 +1,7 @@ +import { isTime } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/time", + handler: (time) => typeof time !== "string" || isTime(time) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js new file mode 100644 index 00000000..4cb2f1ba --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js @@ -0,0 +1,7 @@ +import { isUriReference } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/uri-reference", + handler: (uri) => typeof uri !== "string" || isUriReference(uri) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js new file mode 100644 index 00000000..94febf40 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js @@ -0,0 +1,7 @@ +import { isUriTemplate } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/uri-template", + handler: (uriTemplate) => typeof uriTemplate !== "string" || isUriTemplate(uriTemplate) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri.js new file mode 100644 index 00000000..af883d85 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/uri.js @@ -0,0 +1,7 @@ +import { isUri } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/uri", + handler: (uri) => typeof uri !== "string" || isUri(uri) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js b/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js new file mode 100644 index 00000000..c25de033 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js @@ -0,0 +1,7 @@ +import { isUuid } from "@hyperjump/json-schema-formats"; + + +export default { + id: "https://json-schema.org/format/uuid", + handler: (uuid) => typeof uuid !== "string" || isUuid(uuid) +}; diff --git a/node_modules/@hyperjump/json-schema/formats/index.js b/node_modules/@hyperjump/json-schema/formats/index.js new file mode 100644 index 00000000..c613edf0 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/index.js @@ -0,0 +1,11 @@ +import { addFormat } from "../lib/keywords.js"; +import "./lite.js"; + +import idnEmail from "./handlers/idn-email.js"; +import hostname from "./handlers/hostname.js"; +import idnHostname from "./handlers/idn-hostname.js"; + + +addFormat(idnEmail); +addFormat(hostname); +addFormat(idnHostname); diff --git a/node_modules/@hyperjump/json-schema/formats/lite.js b/node_modules/@hyperjump/json-schema/formats/lite.js new file mode 100644 index 00000000..f1d6aa64 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/formats/lite.js @@ -0,0 +1,38 @@ +import { addFormat } from "../lib/keywords.js"; + +import draft04Hostname from "./handlers/draft-04/hostname.js"; +import dateTime from "./handlers/date-time.js"; +import date from "./handlers/date.js"; +import time from "./handlers/time.js"; +import duration from "./handlers/duration.js"; +import email from "./handlers/email.js"; +import ipv4 from "./handlers/ipv4.js"; +import ipv6 from "./handlers/ipv6.js"; +import uri from "./handlers/uri.js"; +import uriReference from "./handlers/uri-reference.js"; +import iri from "./handlers/iri.js"; +import iriReference from "./handlers/iri-reference.js"; +import uuid from "./handlers/uuid.js"; +import uriTemplate from "./handlers/uri-template.js"; +import jsonPointer from "./handlers/json-pointer.js"; +import relativeJsonPointer from "./handlers/relative-json-pointer.js"; +import regex from "./handlers/regex.js"; + + +addFormat(draft04Hostname); +addFormat(dateTime); +addFormat(date); +addFormat(time); +addFormat(duration); +addFormat(email); +addFormat(ipv4); +addFormat(ipv6); +addFormat(uri); +addFormat(uriReference); +addFormat(iri); +addFormat(iriReference); +addFormat(uuid); +addFormat(uriTemplate); +addFormat(jsonPointer); +addFormat(relativeJsonPointer); +addFormat(regex); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js b/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js new file mode 100644 index 00000000..82a59522 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js @@ -0,0 +1,174 @@ +export default { + "id": "https://spec.openapis.org/oas/3.0/dialect", + "$schema": "http://json-schema.org/draft-04/schema#", + + "type": "object", + "properties": { + "title": { "type": "string" }, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { "type": "number" }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { "type": "number" }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { "$ref": "#/definitions/positiveInteger" }, + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/definitions/positiveInteger" }, + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "required": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": false + }, + "type": { "enum": ["array", "boolean", "integer", "number", "object", "string"] }, + "not": { "$ref": "#" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "items": { "$ref": "#" }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" } + }, + "additionalProperties": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "description": { "type": "string" }, + "format": { "type": "string" }, + "default": {}, + "nullable": { + "type": "boolean", + "default": false + }, + "discriminator": { "$ref": "#/definitions/Discriminator" }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "example": {}, + "externalDocs": { "$ref": "#/definitions/ExternalDocumentation" }, + "deprecated": { + "type": "boolean", + "default": false + }, + "xml": { "$ref": "#/definitions/XML" }, + "$ref": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false, + + "anyOf": [ + { + "not": { "required": ["$ref"] } + }, + { "maxProperties": 1 } + ], + + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "positiveInteger": { + "type": "integer", + "minimum": 0 + }, + "positiveIntegerDefault0": { + "allOf": [{ "$ref": "#/definitions/positiveInteger" }, { "default": 0 }] + }, + "Discriminator": { + "type": "object", + "required": [ + "propertyName" + ], + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ExternalDocumentation": { + "type": "object", + "required": ["url"], + "properties": { + "description": { "type": "string" }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + }, + "XML": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { "type": "string" }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": {} + }, + "additionalProperties": false + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js b/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js new file mode 100644 index 00000000..f45aa21d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/discriminator"; + +const compile = (schema) => Browser.value(schema); +const interpret = () => true; +const annotation = (discriminator) => discriminator; + +export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/example.js b/node_modules/@hyperjump/json-schema/openapi-3-0/example.js new file mode 100644 index 00000000..98bc5869 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/example.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/example"; + +const compile = (schema) => Browser.value(schema); +const interpret = () => true; +const annotation = (example) => example; + +export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js b/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js new file mode 100644 index 00000000..bfee8163 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/externalDocs"; + +const compile = (schema) => Browser.value(schema); +const interpret = () => true; +const annotation = (externalDocs) => externalDocs; + +export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts new file mode 100644 index 00000000..825de2a2 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts @@ -0,0 +1,298 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type OasSchema30 = { + $ref: string; +} | { + title?: string; + description?: string; + default?: Json; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: boolean; + minimum?: number; + exclusiveMinimum?: boolean; + maxLength?: number; + minLength?: number; + pattern?: string; + items?: OasSchema30; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxProperties?: number; + minProperties?: number; + required?: string[]; + additionalProperties?: boolean | OasSchema30; + properties?: Record; + enum?: Json[]; + type?: JsonSchemaType; + nullable?: boolean; + format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri" | "int32" | "int64" | "float" | "double" | "byte" | "binary" | "date" | "password"; + allOf?: OasSchema30[]; + anyOf?: OasSchema30[]; + oneOf?: OasSchema30[]; + not?: OasSchema30; + example?: Json; + discriminator?: Discriminator; + externalDocs?: ExternalDocs; + xml?: Xml; +}; + +type Discriminator = { + propertyName: string; + mappings?: Record; +}; + +type ExternalDocs = { + url: string; + description?: string; +}; + +type Xml = { + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; +}; + +export type OpenApi30 = { + openapi: string; + info: Info; + externalDocs?: ExternalDocs; + servers?: Server[]; + security?: SecurityRequirement[]; + tags?: Tag[]; + paths: Paths; + components?: Components; +}; + +type Reference = { + $ref: "string"; +}; + +type Info = { + title: string; + description?: string; + termsOfService?: string; + contact?: Contact; + license?: License; + version: string; +}; + +type Contact = { + name?: string; + url?: string; + email?: string; +}; + +type License = { + name: string; + url?: string; +}; + +type Server = { + url: string; + description?: string; + variables?: Record; +}; + +type ServerVariable = { + enum?: string[]; + default: string; + description?: string; +}; + +type Components = { + schemas?: Record; + responses?: Record; + parameters?: Record; + examples?: Record; + requestBodies?: Record; + headers?: Record; + securitySchemes: Record; + links: Record; + callbacks: Record; +}; + +type Response = { + description: string; + headers?: Record; + content?: Record; + links?: Record; +}; + +type MediaType = { + schema?: OasSchema30; + example?: unknown; + examples?: Record; + encoding?: Record; +}; + +type Example = { + summary?: string; + description?: string; + value?: unknown; + externalValue?: string; +}; + +type Header = { + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; + style?: "simple"; + explode?: boolean; + allowReserved?: boolean; + schema?: OasSchema30; + content?: Record; + example?: unknown; + examples: Record; +}; + +type Paths = Record; + +type PathItem = { + $ref?: string; + summary?: string; + description?: string; + servers: Server[]; + parameters: (Parameter | Reference)[]; + get?: Operation; + put?: Operation; + post?: Operation; + delete?: Operation; + options?: Operation; + head?: Operation; + patch?: Operation; + trace?: Operation; +}; + +type Operation = { + tags?: string[]; + summary?: string; + description?: string; + externalDocs?: ExternalDocs; + operationId?: string; + parameters?: (Parameter | Reference)[]; + requestBody?: RequestBody | Reference; + responses: Responses; + callbacks?: Record; + deprecated?: boolean; + security?: SecurityRequirement[]; + servers?: Server[]; +}; + +type Responses = Record; + +type SecurityRequirement = Record; + +type Tag = { + name: string; + description?: string; + externalDocs?: ExternalDocs; +}; + +type Parameter = { + name: string; + in: string; + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; + style?: string; + explode?: boolean; + allowReserved?: boolean; + schema?: OasSchema30; + content?: Record; + example?: unknown; + examples?: Record; +}; + +type RequestBody = { + description?: string; + content: Record; + required?: boolean; +}; + +type SecurityScheme = APIKeySecurityScheme | HTTPSecurityScheme | OAuth2SecurityScheme | OpenIdConnectSecurityScheme; + +type APIKeySecurityScheme = { + type: "apiKey"; + name: string; + in: "header" | "query" | "cookie"; + description?: string; +}; + +type HTTPSecurityScheme = { + scheme: string; + bearerFormat?: string; + description?: string; + type: "http"; +}; + +type OAuth2SecurityScheme = { + type: "oauth2"; + flows: OAuthFlows; + description?: string; +}; + +type OpenIdConnectSecurityScheme = { + type: "openIdConnect"; + openIdConnectUrl: string; + description?: string; +}; + +type OAuthFlows = { + implicit?: ImplicitOAuthFlow; + password?: PasswordOAuthFlow; + clientCredentials?: ClientCredentialsFlow; + authorizationCode?: AuthorizationCodeOAuthFlow; +}; + +type ImplicitOAuthFlow = { + authorizationUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type PasswordOAuthFlow = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type ClientCredentialsFlow = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type AuthorizationCodeOAuthFlow = { + authorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type Link = { + operationId?: string; + operationRef?: string; + parameters?: Record; + requestBody?: unknown; + description?: string; + server?: Server; +}; + +type Callback = Record; + +type Encoding = { + contentType?: string; + headers?: Record; + style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; + explode?: boolean; + allowReserved?: boolean; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/index.js b/node_modules/@hyperjump/json-schema/openapi-3-0/index.js new file mode 100644 index 00000000..d75b9009 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/index.js @@ -0,0 +1,77 @@ +import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import "../lib/openapi.js"; + +import dialectSchema from "./dialect.js"; +import schema from "./schema.js"; + +import discriminator from "./discriminator.js"; +import example from "./example.js"; +import externalDocs from "./externalDocs.js"; +import nullable from "./nullable.js"; +import type from "./type.js"; +import xml from "./xml.js"; + + +export * from "../draft-04/index.js"; + +addKeyword(discriminator); +addKeyword(example); +addKeyword(externalDocs); +addKeyword(nullable); +addKeyword(type); +addKeyword(xml); + +const jsonSchemaVersion = "https://spec.openapis.org/oas/3.0/dialect"; + +defineVocabulary(jsonSchemaVersion, { + "$ref": "https://json-schema.org/keyword/draft-04/ref", + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "default": "https://json-schema.org/keyword/default", + "deprecated": "https://json-schema.org/keyword/deprecated", + "description": "https://json-schema.org/keyword/description", + "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", + "enum": "https://json-schema.org/keyword/enum", + "example": "https://spec.openapis.org/oas/3.0/keyword/example", + "exclusiveMaximum": "https://json-schema.org/keyword/draft-04/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/draft-04/exclusiveMinimum", + "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", + "format": "https://json-schema.org/keyword/draft-04/format", + "items": "https://json-schema.org/keyword/draft-04/items", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/draft-04/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/draft-04/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "not": "https://json-schema.org/keyword/not", + "nullable": "https://spec.openapis.org/oas/3.0/keyword/nullable", + "oneOf": "https://json-schema.org/keyword/oneOf", + "pattern": "https://json-schema.org/keyword/pattern", + "properties": "https://json-schema.org/keyword/properties", + "readOnly": "https://json-schema.org/keyword/readOnly", + "required": "https://json-schema.org/keyword/required", + "title": "https://json-schema.org/keyword/title", + "type": "https://spec.openapis.org/oas/3.0/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems", + "writeOnly": "https://json-schema.org/keyword/writeOnly", + "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" +}); + +loadDialect(jsonSchemaVersion, { + [jsonSchemaVersion]: true +}); + +loadDialect("https://spec.openapis.org/oas/3.0/schema", { + [jsonSchemaVersion]: true +}); + +registerSchema(dialectSchema); + +registerSchema(schema, "https://spec.openapis.org/oas/3.0/schema"); +registerSchema(schema, "https://spec.openapis.org/oas/3.0/schema/latest"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js b/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js new file mode 100644 index 00000000..0d5450c4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/nullable"; + +const compile = (schema) => Browser.value(schema); + +const interpret = () => true; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js new file mode 100644 index 00000000..c715879e --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js @@ -0,0 +1,1368 @@ +export default { + "id": "https://spec.openapis.org/oas/3.0/schema/2021-09-28", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Validation schema for OpenAPI Specification 3.0.X.", + "type": "object", + "required": [ + "openapi", + "info", + "paths" + ], + "properties": { + "openapi": { + "type": "string", + "pattern": "^3\\.0\\.\\d(-.+)?$" + }, + "info": { + "$ref": "#/definitions/Info" + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + }, + "uniqueItems": true + }, + "paths": { + "$ref": "#/definitions/Paths" + }, + "components": { + "$ref": "#/definitions/Components" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "definitions": { + "Reference": { + "type": "object", + "required": [ + "$ref" + ], + "patternProperties": { + "^\\$ref$": { + "type": "string", + "format": "uri-reference" + } + } + }, + "Info": { + "type": "object", + "required": [ + "title", + "version" + ], + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "termsOfService": { + "type": "string", + "format": "uri-reference" + }, + "contact": { + "$ref": "#/definitions/Contact" + }, + "license": { + "$ref": "#/definitions/License" + }, + "version": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Contact": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "License": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Server": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ServerVariable" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ServerVariable": { + "type": "object", + "required": [ + "default" + ], + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + } + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Components": { + "type": "object", + "properties": { + "schemas": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { "$ref": "#/definitions/Schema" } + } + }, + "responses": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Response" + } + ] + } + } + }, + "parameters": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Parameter" + } + ] + } + } + }, + "examples": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Example" + } + ] + } + } + }, + "requestBodies": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/RequestBody" + } + ] + } + } + }, + "headers": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Header" + } + ] + } + } + }, + "securitySchemes": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/SecurityScheme" + } + ] + } + } + }, + "links": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Link" + } + ] + } + } + }, + "callbacks": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/Callback" + } + ] + } + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Schema": { "$ref": "/oas/3.0/dialect" }, + "Response": { + "type": "object", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Header" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + } + }, + "links": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Link" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "MediaType": { + "type": "object", + "properties": { + "schema": { "$ref": "#/definitions/Schema" }, + "example": { + }, + "examples": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Example" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "encoding": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Encoding" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/ExampleXORExamples" + } + ] + }, + "Example": { + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "value": { + }, + "externalValue": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Header": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "required": { + "type": "boolean", + "default": false + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "allowEmptyValue": { + "type": "boolean", + "default": false + }, + "style": { + "type": "string", + "enum": [ + "simple" + ], + "default": "simple" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean", + "default": false + }, + "schema": { "$ref": "#/definitions/Schema" }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "example": { + }, + "examples": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Example" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/definitions/ExampleXORExamples" + }, + { + "$ref": "#/definitions/SchemaXORContent" + } + ] + }, + "Paths": { + "type": "object", + "patternProperties": { + "^\\/": { + "$ref": "#/definitions/PathItem" + }, + "^x-": { + } + }, + "additionalProperties": false + }, + "PathItem": { + "type": "object", + "properties": { + "$ref": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + }, + "parameters": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Parameter" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "uniqueItems": true + } + }, + "patternProperties": { + "^(get|put|post|delete|options|head|patch|trace)$": { + "$ref": "#/definitions/Operation" + }, + "^x-": { + } + }, + "additionalProperties": false + }, + "Operation": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Parameter" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "uniqueItems": true + }, + "requestBody": { + "oneOf": [ + { + "$ref": "#/definitions/RequestBody" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "responses": { + "$ref": "#/definitions/Responses" + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Callback" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityRequirement" + } + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Responses": { + "type": "object", + "properties": { + "default": { + "oneOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "patternProperties": { + "^[1-5](?:\\d{2}|XX)$": { + "oneOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "$ref": "#/definitions/Reference" + } + ] + }, + "^x-": { + } + }, + "minProperties": 1, + "additionalProperties": false + }, + "SecurityRequirement": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/ExternalDocumentation" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ExternalDocumentation": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ExampleXORExamples": { + "description": "Example and examples are mutually exclusive", + "not": { + "required": [ + "example", + "examples" + ] + } + }, + "SchemaXORContent": { + "description": "Schema and content are mutually exclusive, at least one is required", + "not": { + "required": [ + "schema", + "content" + ] + }, + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ], + "description": "Some properties are not allowed if content is present", + "allOf": [ + { + "not": { + "required": [ + "style" + ] + } + }, + { + "not": { + "required": [ + "explode" + ] + } + }, + { + "not": { + "required": [ + "allowReserved" + ] + } + }, + { + "not": { + "required": [ + "example" + ] + } + }, + { + "not": { + "required": [ + "examples" + ] + } + } + ] + } + ] + }, + "Parameter": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "in": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean", + "default": false + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "allowEmptyValue": { + "type": "boolean", + "default": false + }, + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean", + "default": false + }, + "schema": { "$ref": "#/definitions/Schema" }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "example": { + }, + "examples": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Example" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "required": [ + "name", + "in" + ], + "allOf": [ + { + "$ref": "#/definitions/ExampleXORExamples" + }, + { + "$ref": "#/definitions/SchemaXORContent" + }, + { + "$ref": "#/definitions/ParameterLocation" + } + ] + }, + "ParameterLocation": { + "description": "Parameter location", + "oneOf": [ + { + "description": "Parameter in path", + "required": [ + "required" + ], + "properties": { + "in": { + "enum": [ + "path" + ] + }, + "style": { + "enum": [ + "matrix", + "label", + "simple" + ], + "default": "simple" + }, + "required": { + "enum": [ + true + ] + } + } + }, + { + "description": "Parameter in query", + "properties": { + "in": { + "enum": [ + "query" + ] + }, + "style": { + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ], + "default": "form" + } + } + }, + { + "description": "Parameter in header", + "properties": { + "in": { + "enum": [ + "header" + ] + }, + "style": { + "enum": [ + "simple" + ], + "default": "simple" + } + } + }, + { + "description": "Parameter in cookie", + "properties": { + "in": { + "enum": [ + "cookie" + ] + }, + "style": { + "enum": [ + "form" + ], + "default": "form" + } + } + } + ] + }, + "RequestBody": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "description": { + "type": "string" + }, + "content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MediaType" + } + }, + "required": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "SecurityScheme": { + "oneOf": [ + { + "$ref": "#/definitions/APIKeySecurityScheme" + }, + { + "$ref": "#/definitions/HTTPSecurityScheme" + }, + { + "$ref": "#/definitions/OAuth2SecurityScheme" + }, + { + "$ref": "#/definitions/OpenIdConnectSecurityScheme" + } + ] + }, + "APIKeySecurityScheme": { + "type": "object", + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query", + "cookie" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "HTTPSecurityScheme": { + "type": "object", + "required": [ + "scheme", + "type" + ], + "properties": { + "scheme": { + "type": "string" + }, + "bearerFormat": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "http" + ] + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "oneOf": [ + { + "description": "Bearer", + "properties": { + "scheme": { + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + } + }, + { + "description": "Non Bearer", + "not": { + "required": [ + "bearerFormat" + ] + }, + "properties": { + "scheme": { + "not": { + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + } + } + } + ] + }, + "OAuth2SecurityScheme": { + "type": "object", + "required": [ + "type", + "flows" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flows": { + "$ref": "#/definitions/OAuthFlows" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "OpenIdConnectSecurityScheme": { + "type": "object", + "required": [ + "type", + "openIdConnectUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openIdConnect" + ] + }, + "openIdConnectUrl": { + "type": "string", + "format": "uri-reference" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "OAuthFlows": { + "type": "object", + "properties": { + "implicit": { + "$ref": "#/definitions/ImplicitOAuthFlow" + }, + "password": { + "$ref": "#/definitions/PasswordOAuthFlow" + }, + "clientCredentials": { + "$ref": "#/definitions/ClientCredentialsFlow" + }, + "authorizationCode": { + "$ref": "#/definitions/AuthorizationCodeOAuthFlow" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ImplicitOAuthFlow": { + "type": "object", + "required": [ + "authorizationUrl", + "scopes" + ], + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "PasswordOAuthFlow": { + "type": "object", + "required": [ + "tokenUrl", + "scopes" + ], + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "ClientCredentialsFlow": { + "type": "object", + "required": [ + "tokenUrl", + "scopes" + ], + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "AuthorizationCodeOAuthFlow": { + "type": "object", + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ], + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false + }, + "Link": { + "type": "object", + "properties": { + "operationId": { + "type": "string" + }, + "operationRef": { + "type": "string", + "format": "uri-reference" + }, + "parameters": { + "type": "object", + "additionalProperties": { + } + }, + "requestBody": { + }, + "description": { + "type": "string" + }, + "server": { + "$ref": "#/definitions/Server" + } + }, + "patternProperties": { + "^x-": { + } + }, + "additionalProperties": false, + "not": { + "description": "Operation Id and Operation Ref are mutually exclusive", + "required": [ + "operationId", + "operationRef" + ] + } + }, + "Callback": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/PathItem" + }, + "patternProperties": { + "^x-": { + } + } + }, + "Encoding": { + "type": "object", + "properties": { + "contentType": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Header" + }, + { + "$ref": "#/definitions/Reference" + } + ] + } + }, + "style": { + "type": "string", + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean", + "default": false + } + }, + "additionalProperties": false + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/type.js b/node_modules/@hyperjump/json-schema/openapi-3-0/type.js new file mode 100644 index 00000000..1cf47195 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/type.js @@ -0,0 +1,22 @@ +import * as Browser from "@hyperjump/browser"; +import * as Instance from "../lib/instance.js"; +import { getKeywordName } from "../lib/experimental.js"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/type"; + +const compile = async (schema, _ast, parentSchema) => { + const nullableKeyword = getKeywordName(schema.document.dialectId, "https://spec.openapis.org/oas/3.0/keyword/nullable"); + const nullable = await Browser.step(nullableKeyword, parentSchema); + return Browser.value(nullable) === true ? ["null", Browser.value(schema)] : Browser.value(schema); +}; + +const interpret = (type, instance) => typeof type === "string" + ? isTypeOf(instance)(type) + : type.some(isTypeOf(instance)); + +const isTypeOf = (instance) => (type) => type === "integer" + ? Instance.typeOf(instance) === "number" && Number.isInteger(Instance.value(instance)) + : Instance.typeOf(instance) === type; + +export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js b/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js new file mode 100644 index 00000000..e6476570 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js @@ -0,0 +1,10 @@ +import * as Browser from "@hyperjump/browser"; + + +const id = "https://spec.openapis.org/oas/3.0/keyword/xml"; + +const compile = (schema) => Browser.value(schema); +const interpret = () => true; +const annotation = (xml) => xml; + +export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js new file mode 100644 index 00000000..6a2f4b5b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js @@ -0,0 +1,22 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + "$dynamicAnchor": "meta", + + "title": "OpenAPI 3.1 Schema Object Dialect", + "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.1 Descriptions", + + "allOf": [ + { "$ref": "https://json-schema.org/draft/2020-12/schema" }, + { "$ref": "https://spec.openapis.org/oas/3.1/meta/base" } + ] +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts new file mode 100644 index 00000000..a437246f --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts @@ -0,0 +1,364 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type OasSchema31 = boolean | { + $schema?: "https://spec.openapis.org/oas/3.1/dialect/base"; + $id?: string; + $anchor?: string; + $ref?: string; + $dynamicRef?: string; + $dynamicAnchor?: string; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: OasSchema31; + unevaluatedItems?: OasSchema31; + prefixItems?: OasSchema31[]; + items?: OasSchema31; + contains?: OasSchema31; + additionalProperties?: OasSchema31; + unevaluatedProperties?: OasSchema31; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: OasSchema31; + if?: OasSchema31; + then?: OasSchema31; + else?: OasSchema31; + allOf?: OasSchema31[]; + anyOf?: OasSchema31[]; + oneOf?: OasSchema31[]; + not?: OasSchema31; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: OasSchema31; + example?: Json; + discriminator?: Discriminator; + externalDocs?: ExternalDocs; + xml?: Xml; +}; + +type Discriminator = { + propertyName: string; + mappings?: Record; +}; + +type ExternalDocs = { + url: string; + description?: string; +}; + +type Xml = { + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; +}; + +export type OpenApi = { + openapi: string; + info: Info; + jsonSchemaDialect?: string; + servers?: Server[]; + security?: SecurityRequirement[]; + tags?: Tag[]; + externalDocs?: ExternalDocumentation; + paths?: Record; + webhooks?: Record; + components?: Components; +}; + +type Info = { + title: string; + summary?: string; + description?: string; + termsOfService?: string; + contact?: Contact; + license?: License; + version: string; +}; + +type Contact = { + name?: string; + url?: string; + email?: string; +}; + +type License = { + name: string; + url?: string; + identifier?: string; +}; + +type Server = { + url: string; + description?: string; + variables?: Record; +}; + +type ServerVariable = { + enum?: string[]; + default: string; + description?: string; +}; + +type Components = { + schemas?: Record; + responses?: Record; + parameters?: Record; + examples?: Record; + requestBodies?: Record; + headers?: Record; + securitySchemes?: Record; + links?: Record; + callbacks?: Record; + pathItems?: Record; +}; + +type PathItem = { + summary?: string; + description?: string; + servers?: Server[]; + parameters?: (Parameter | Reference)[]; + get?: Operation; + put?: Operation; + post?: Operation; + delete?: Operation; + options?: Operation; + head?: Operation; + patch?: Operation; + trace?: Operation; +}; + +type Operation = { + tags?: string[]; + summary?: string; + description?: string; + externalDocs?: ExternalDocumentation; + operationId?: string; + parameters?: (Parameter | Reference)[]; + requestBody?: RequestBody | Reference; + responses?: Record; + callbacks?: Record; + deprecated?: boolean; + security?: SecurityRequirement[]; + servers?: Server[]; +}; + +type ExternalDocumentation = { + description?: string; + url: string; +}; + +export type Parameter = { + name: string; + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; +} & ( + ( + { + in: "path"; + required: true; + } & ( + ({ style?: "matrix" | "label" | "simple" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "query"; + } & ( + ({ style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "header"; + } & ( + ({ style?: "simple" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "cookie"; + } & ( + ({ style?: "form" } & SchemaParameter) + | ContentParameter + ) + ) +); + +type ContentParameter = { + schema?: never; + content: Record; +}; + +type SchemaParameter = { + explode?: boolean; + allowReserved?: boolean; + schema: OasSchema32; + content?: never; +} & Examples; + +type RequestBody = { + description?: string; + content: Content; + required?: boolean; +}; + +type Content = Record; + +type MediaType = { + schema?: OasSchema31; + encoding?: Record; +} & Examples; + +type Encoding = { + contentType?: string; + headers?: Record; + style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; + explode?: boolean; + allowReserved?: boolean; +}; + +type Response = { + description: string; + headers?: Record; + content?: Content; + links?: Record; +}; + +type Callbacks = Record; + +type Example = { + summary?: string; + description?: string; + value?: Json; + externalValue?: string; +}; + +type Link = { + operationRef?: string; + operationId?: string; + parameters?: Record; + requestBody?: Json; + description?: string; + server?: Server; +}; + +type Header = { + description?: string; + required?: boolean; + deprecated?: boolean; + schema?: OasSchema31; + style?: "simple"; + explode?: boolean; + content?: Content; +}; + +type Tag = { + name: string; + description?: string; + externalDocs?: ExternalDocumentation; +}; + +type Reference = { + $ref: string; + summary?: string; + description?: string; +}; + +type SecurityScheme = { + type: "apiKey"; + description?: string; + name: string; + in: "query" | "header" | "cookie"; +} | { + type: "http"; + description?: string; + scheme: string; + bearerFormat?: string; +} | { + type: "mutualTLS"; + description?: string; +} | { + type: "oauth2"; + description?: string; + flows: OauthFlows; +} | { + type: "openIdConnect"; + description?: string; + openIdConnectUrl: string; +}; + +type OauthFlows = { + implicit?: Implicit; + password?: Password; + clientCredentials?: ClientCredentials; + authorizationCode?: AuthorizationCode; +}; + +type Implicit = { + authorizationUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type Password = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type ClientCredentials = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type AuthorizationCode = { + authorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type SecurityRequirement = Record; + +type Examples = { + example?: Json; + examples?: Record; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/index.js b/node_modules/@hyperjump/json-schema/openapi-3-1/index.js new file mode 100644 index 00000000..a2840f53 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/index.js @@ -0,0 +1,49 @@ +import { addKeyword, defineVocabulary } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import "../lib/openapi.js"; + +import dialectSchema from "./dialect/base.js"; +import vocabularySchema from "./meta/base.js"; +import schema from "./schema.js"; +import schemaBase from "./schema-base.js"; +import schemaDraft2020 from "./schema-draft-2020-12.js"; +import schemaDraft2019 from "./schema-draft-2019-09.js"; +import schemaDraft07 from "./schema-draft-07.js"; +import schemaDraft06 from "./schema-draft-06.js"; +import schemaDraft04 from "./schema-draft-04.js"; + +import discriminator from "../openapi-3-0/discriminator.js"; +import example from "../openapi-3-0/example.js"; +import externalDocs from "../openapi-3-0/externalDocs.js"; +import xml from "../openapi-3-0/xml.js"; + + +export * from "../draft-2020-12/index.js"; + +addKeyword(discriminator); +addKeyword(example); +addKeyword(externalDocs); +addKeyword(xml); + +defineVocabulary("https://spec.openapis.org/oas/3.1/vocab/base", { + "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", + "example": "https://spec.openapis.org/oas/3.0/keyword/example", + "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", + "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" +}); + +registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.1/meta/base"); +registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.1/dialect/base"); + +// Current Schemas +registerSchema(schema, "https://spec.openapis.org/oas/3.1/schema"); +registerSchema(schema, "https://spec.openapis.org/oas/3.1/schema/latest"); +registerSchema(schemaBase, "https://spec.openapis.org/oas/3.1/schema-base"); +registerSchema(schemaBase, "https://spec.openapis.org/oas/3.1/schema-base/latest"); + +// Alternative dialect schemas +registerSchema(schemaDraft2020, "https://spec.openapis.org/oas/3.1/schema-draft-2020-12"); +registerSchema(schemaDraft2019, "https://spec.openapis.org/oas/3.1/schema-draft-2019-09"); +registerSchema(schemaDraft07, "https://spec.openapis.org/oas/3.1/schema-draft-07"); +registerSchema(schemaDraft06, "https://spec.openapis.org/oas/3.1/schema-draft-06"); +registerSchema(schemaDraft04, "https://spec.openapis.org/oas/3.1/schema-draft-04"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js new file mode 100644 index 00000000..303423f1 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js @@ -0,0 +1,77 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "OAS Base Vocabulary", + "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", + + "type": ["object", "boolean"], + "properties": { + "example": true, + "discriminator": { "$ref": "#/$defs/discriminator" }, + "externalDocs": { "$ref": "#/$defs/external-docs" }, + "xml": { "$ref": "#/$defs/xml" } + }, + "$defs": { + "extensible": { + "patternProperties": { + "^x-": true + } + }, + "discriminator": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": ["propertyName"], + "unevaluatedProperties": false + }, + "external-docs": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri-reference" + }, + "description": { + "type": "string" + } + }, + "required": ["url"], + "unevaluatedProperties": false + }, + "xml": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "uri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean" + }, + "wrapped": { + "type": "boolean" + } + }, + "unevaluatedProperties": false + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js new file mode 100644 index 00000000..a84f8ab7 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://spec.openapis.org/oas/3.1/dialect/base" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js new file mode 100644 index 00000000..c91acddc --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "OpenAPI v3.1.x documents using draft-04 JSON Schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-04/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js new file mode 100644 index 00000000..87186cf0 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "OpenAPI v3.1.x documents using draft-06 JSON Schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-06/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js new file mode 100644 index 00000000..f4d2f8b5 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "OpenAPI v3.1.x documents using draft-07 JSON Schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-07/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js new file mode 100644 index 00000000..11f27166 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "openapi v3.1.x documents using 2019-09 json schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonschemadialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://json-schema.org/draft/2019-09/schema" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js new file mode 100644 index 00000000..1b0367f8 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.1/vocab/base": false + }, + + "description": "openapi v3.1.x documents using 2020-12 json schemas", + + "$ref": "https://spec.openapis.org/oas/3.1/schema", + "properties": { + "jsonschemadialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://json-schema.org/draft/2020-12/schema" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js new file mode 100644 index 00000000..6aed8baa --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js @@ -0,0 +1,1407 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "The description of OpenAPI v3.1.x Documents without Schema Object validation", + "type": "object", + "properties": { + "openapi": { + "type": "string", + "pattern": "^3\\.1\\.\\d+(-.+)?$" + }, + "info": { + "$ref": "#/$defs/info" + }, + "jsonSchemaDialect": { + "type": "string", + "format": "uri-reference", + "default": "https://spec.openapis.org/oas/3.1/dialect/base" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + }, + "default": [ + { + "url": "/" + } + ] + }, + "paths": { + "$ref": "#/$defs/paths" + }, + "webhooks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "components": { + "$ref": "#/$defs/components" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/$defs/security-requirement" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/$defs/tag" + } + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + } + }, + "required": [ + "openapi", + "info" + ], + "anyOf": [ + { + "required": [ + "paths" + ] + }, + { + "required": [ + "components" + ] + }, + { + "required": [ + "webhooks" + ] + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "$defs": { + "info": { + "$comment": "https://spec.openapis.org/oas/v3.1#info-object", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "termsOfService": { + "type": "string", + "format": "uri-reference" + }, + "contact": { + "$ref": "#/$defs/contact" + }, + "license": { + "$ref": "#/$defs/license" + }, + "version": { + "type": "string" + } + }, + "required": [ + "title", + "version" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "contact": { + "$comment": "https://spec.openapis.org/oas/v3.1#contact-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "license": { + "$comment": "https://spec.openapis.org/oas/v3.1#license-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "name" + ], + "dependentSchemas": { + "identifier": { + "not": { + "required": [ + "url" + ] + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "server": { + "$comment": "https://spec.openapis.org/oas/v3.1#server-object", + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/server-variable" + } + } + }, + "required": [ + "url" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "server-variable": { + "$comment": "https://spec.openapis.org/oas/v3.1#server-variable-object", + "type": "object", + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "default" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "components": { + "$comment": "https://spec.openapis.org/oas/v3.1#components-object", + "type": "object", + "properties": { + "schemas": { + "type": "object", + "additionalProperties": { + "$dynamicRef": "#meta" + } + }, + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/response-or-reference" + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/parameter-or-reference" + } + }, + "examples": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/example-or-reference" + } + }, + "requestBodies": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/request-body-or-reference" + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "securitySchemes": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/security-scheme-or-reference" + } + }, + "links": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/link-or-reference" + } + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/callbacks-or-reference" + } + }, + "pathItems": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + } + }, + "patternProperties": { + "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { + "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", + "propertyNames": { + "pattern": "^[a-zA-Z0-9._-]+$" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "paths": { + "$comment": "https://spec.openapis.org/oas/v3.1#paths-object", + "type": "object", + "patternProperties": { + "^/": { + "$ref": "#/$defs/path-item" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "path-item": { + "$comment": "https://spec.openapis.org/oas/v3.1#path-item-object", + "type": "object", + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + } + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/$defs/parameter-or-reference" + } + }, + "get": { + "$ref": "#/$defs/operation" + }, + "put": { + "$ref": "#/$defs/operation" + }, + "post": { + "$ref": "#/$defs/operation" + }, + "delete": { + "$ref": "#/$defs/operation" + }, + "options": { + "$ref": "#/$defs/operation" + }, + "head": { + "$ref": "#/$defs/operation" + }, + "patch": { + "$ref": "#/$defs/operation" + }, + "trace": { + "$ref": "#/$defs/operation" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "operation": { + "$comment": "https://spec.openapis.org/oas/v3.1#operation-object", + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/$defs/parameter-or-reference" + } + }, + "requestBody": { + "$ref": "#/$defs/request-body-or-reference" + }, + "responses": { + "$ref": "#/$defs/responses" + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/callbacks-or-reference" + } + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/$defs/security-requirement" + } + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "external-documentation": { + "$comment": "https://spec.openapis.org/oas/v3.1#external-documentation-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "url" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "parameter": { + "$comment": "https://spec.openapis.org/oas/v3.1#parameter-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "in": { + "enum": [ + "query", + "header", + "path", + "cookie" + ] + }, + "description": { + "type": "string" + }, + "required": { + "default": false, + "type": "boolean" + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "content": { + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 + } + }, + "required": [ + "name", + "in" + ], + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ] + } + ], + "if": { + "properties": { + "in": { + "const": "query" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "allowEmptyValue": { + "default": false, + "type": "boolean" + } + } + }, + "dependentSchemas": { + "schema": { + "properties": { + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + } + }, + "allOf": [ + { + "$ref": "#/$defs/examples" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" + }, + { + "$ref": "#/$defs/styles-for-form" + } + ], + "$defs": { + "styles-for-path": { + "if": { + "properties": { + "in": { + "const": "path" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "style": { + "default": "simple", + "enum": [ + "matrix", + "label", + "simple" + ] + }, + "required": { + "const": true + } + }, + "required": [ + "required" + ] + } + }, + "styles-for-header": { + "if": { + "properties": { + "in": { + "const": "header" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "style": { + "default": "simple", + "const": "simple" + } + } + } + }, + "styles-for-query": { + "if": { + "properties": { + "in": { + "const": "query" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "style": { + "default": "form", + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + "allowReserved": { + "default": false, + "type": "boolean" + } + } + } + }, + "styles-for-cookie": { + "if": { + "properties": { + "in": { + "const": "cookie" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "style": { + "default": "form", + "const": "form" + } + } + } + } + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "parameter-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/parameter" + } + }, + "request-body": { + "$comment": "https://spec.openapis.org/oas/v3.1#request-body-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "content": { + "$ref": "#/$defs/content" + }, + "required": { + "default": false, + "type": "boolean" + } + }, + "required": [ + "content" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "request-body-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/request-body" + } + }, + "content": { + "$comment": "https://spec.openapis.org/oas/v3.1#fixed-fields-10", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/media-type" + }, + "propertyNames": { + "format": "media-range" + } + }, + "media-type": { + "$comment": "https://spec.openapis.org/oas/v3.1#media-type-object", + "type": "object", + "properties": { + "schema": { + "$dynamicRef": "#meta" + }, + "encoding": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/encoding" + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/examples" + } + ], + "unevaluatedProperties": false + }, + "encoding": { + "$comment": "https://spec.openapis.org/oas/v3.1#encoding-object", + "type": "object", + "properties": { + "contentType": { + "type": "string", + "format": "media-range" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "style": { + "default": "form", + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "default": false, + "type": "boolean" + } + }, + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/styles-for-form" + } + ], + "unevaluatedProperties": false + }, + "responses": { + "$comment": "https://spec.openapis.org/oas/v3.1#responses-object", + "type": "object", + "properties": { + "default": { + "$ref": "#/$defs/response-or-reference" + } + }, + "patternProperties": { + "^[1-5](?:[0-9]{2}|XX)$": { + "$ref": "#/$defs/response-or-reference" + } + }, + "minProperties": 1, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "if": { + "$comment": "either default, or at least one response code property must exist", + "patternProperties": { + "^[1-5](?:[0-9]{2}|XX)$": false + } + }, + "then": { + "required": [ + "default" + ] + } + }, + "response": { + "$comment": "https://spec.openapis.org/oas/v3.1#response-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "content": { + "$ref": "#/$defs/content" + }, + "links": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/link-or-reference" + } + } + }, + "required": [ + "description" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "response-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/response" + } + }, + "callbacks": { + "$comment": "https://spec.openapis.org/oas/v3.1#callback-object", + "type": "object", + "$ref": "#/$defs/specification-extensions", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "callbacks-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/callbacks" + } + }, + "example": { + "$comment": "https://spec.openapis.org/oas/v3.1#example-object", + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "value": true, + "externalValue": { + "type": "string", + "format": "uri-reference" + } + }, + "not": { + "required": [ + "value", + "externalValue" + ] + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "example-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/example" + } + }, + "link": { + "$comment": "https://spec.openapis.org/oas/v3.1#link-object", + "type": "object", + "properties": { + "operationRef": { + "type": "string", + "format": "uri-reference" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "$ref": "#/$defs/map-of-strings" + }, + "requestBody": true, + "description": { + "type": "string" + }, + "body": { + "$ref": "#/$defs/server" + } + }, + "oneOf": [ + { + "required": [ + "operationRef" + ] + }, + { + "required": [ + "operationId" + ] + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "link-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/link" + } + }, + "header": { + "$comment": "https://spec.openapis.org/oas/v3.1#header-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "required": { + "default": false, + "type": "boolean" + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "content": { + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 + } + }, + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ] + } + ], + "dependentSchemas": { + "schema": { + "properties": { + "style": { + "default": "simple", + "const": "simple" + }, + "explode": { + "default": false, + "type": "boolean" + } + }, + "$ref": "#/$defs/examples" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "header-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/header" + } + }, + "tag": { + "$comment": "https://spec.openapis.org/oas/v3.1#tag-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + } + }, + "required": [ + "name" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "reference": { + "$comment": "https://spec.openapis.org/oas/v3.1#reference-object", + "type": "object", + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "schema": { + "$comment": "https://spec.openapis.org/oas/v3.1#schema-object", + "$dynamicAnchor": "meta", + "type": [ + "object", + "boolean" + ] + }, + "security-scheme": { + "$comment": "https://spec.openapis.org/oas/v3.1#security-scheme-object", + "type": "object", + "properties": { + "type": { + "enum": [ + "apiKey", + "http", + "mutualTLS", + "oauth2", + "openIdConnect" + ] + }, + "description": { + "type": "string" + } + }, + "required": [ + "type" + ], + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-apikey" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-http" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-oauth2" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-oidc" + } + ], + "unevaluatedProperties": false, + "$defs": { + "type-apikey": { + "if": { + "properties": { + "type": { + "const": "apiKey" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "name": { + "type": "string" + }, + "in": { + "enum": [ + "query", + "header", + "cookie" + ] + } + }, + "required": [ + "name", + "in" + ] + } + }, + "type-http": { + "if": { + "properties": { + "type": { + "const": "http" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "scheme": { + "type": "string" + } + }, + "required": [ + "scheme" + ] + } + }, + "type-http-bearer": { + "if": { + "properties": { + "type": { + "const": "http" + }, + "scheme": { + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + }, + "required": [ + "type", + "scheme" + ] + }, + "then": { + "properties": { + "bearerFormat": { + "type": "string" + } + } + } + }, + "type-oauth2": { + "if": { + "properties": { + "type": { + "const": "oauth2" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "flows": { + "$ref": "#/$defs/oauth-flows" + } + }, + "required": [ + "flows" + ] + } + }, + "type-oidc": { + "if": { + "properties": { + "type": { + "const": "openIdConnect" + } + }, + "required": [ + "type" + ] + }, + "then": { + "properties": { + "openIdConnectUrl": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "openIdConnectUrl" + ] + } + } + } + }, + "security-scheme-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/security-scheme" + } + }, + "oauth-flows": { + "type": "object", + "properties": { + "implicit": { + "$ref": "#/$defs/oauth-flows/$defs/implicit" + }, + "password": { + "$ref": "#/$defs/oauth-flows/$defs/password" + }, + "clientCredentials": { + "$ref": "#/$defs/oauth-flows/$defs/client-credentials" + }, + "authorizationCode": { + "$ref": "#/$defs/oauth-flows/$defs/authorization-code" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "$defs": { + "implicit": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "authorizationUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "password": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "client-credentials": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "authorization-code": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + } + } + }, + "security-requirement": { + "$comment": "https://spec.openapis.org/oas/v3.1#security-requirement-object", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "specification-extensions": { + "$comment": "https://spec.openapis.org/oas/v3.1#specification-extensions", + "patternProperties": { + "^x-": true + } + }, + "examples": { + "properties": { + "example": true, + "examples": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/example-or-reference" + } + } + } + }, + "map-of-strings": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "styles-for-form": { + "if": { + "properties": { + "style": { + "const": "form" + } + }, + "required": [ + "style" + ] + }, + "then": { + "properties": { + "explode": { + "default": true + } + } + }, + "else": { + "properties": { + "explode": { + "default": false + } + } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js new file mode 100644 index 00000000..3c606117 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js @@ -0,0 +1,22 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + "$dynamicAnchor": "meta", + + "title": "OpenAPI 3.2 Schema Object Dialect", + "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.2.x Descriptions", + + "allOf": [ + { "$ref": "https://json-schema.org/draft/2020-12/schema" }, + { "$ref": "https://spec.openapis.org/oas/3.2/meta" } + ] +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts new file mode 100644 index 00000000..80b94a5c --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts @@ -0,0 +1,415 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type OasSchema32 = boolean | { + $schema?: "https://spec.openapis.org/oas/3.2/dialect/base"; + $id?: string; + $anchor?: string; + $ref?: string; + $dynamicRef?: string; + $dynamicAnchor?: string; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: OasSchema32; + unevaluatedItems?: OasSchema32; + prefixItems?: OasSchema32[]; + items?: OasSchema32; + contains?: OasSchema32; + additionalProperties?: OasSchema32; + unevaluatedProperties?: OasSchema32; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: OasSchema32; + if?: OasSchema32; + then?: OasSchema32; + else?: OasSchema32; + allOf?: OasSchema32[]; + anyOf?: OasSchema32[]; + oneOf?: OasSchema32[]; + not?: OasSchema32; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: OasSchema32; + example?: Json; + discriminator?: Discriminator; + externalDocs?: ExternalDocs; + xml?: Xml; +}; + +type Discriminator = { + propertyName: string; + mappings?: Record; + defaultMapping?: string; +}; + +type ExternalDocs = { + url: string; + description?: string; +}; + +type Xml = { + nodeType?: "element" | "attribute" | "text" | "cdata" | "none"; + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; +}; + +export type OpenApi = { + openapi: string; + $self?: string; + info: Info; + jsonSchemaDialect?: string; + servers?: Server[]; + paths?: Record; + webhooks?: Record; + components?: Components; + security?: SecurityRequirement[]; + tags?: Tag[]; + externalDocs?: ExternalDocs; +}; + +type Info = { + title: string; + summary?: string; + description?: string; + termsOfService?: string; + contact?: Contact; + license?: License; + version: string; +}; + +type Contact = { + name?: string; + url?: string; + email?: string; +}; + +type License = { + name: string; + identifier?: string; + url?: string; +}; + +type Server = { + url: string; + description?: string; + name?: string; + variables?: Record; +}; + +type ServerVariable = { + enum?: string[]; + default: string; + description?: string; +}; + +type Components = { + schemas?: Record; + responses?: Record; + parameters?: Record; + examples?: Record; + requestBodies?: Record; + headers?: Record; + securitySchemes?: Record; + links?: Record; + callbacks?: Record; + pathItems?: Record; + mediaTypes?: Record; +}; + +type PathItem = { + $ref?: string; + summary?: string; + description?: string; + get?: Operation; + put?: Operation; + post?: Operation; + delete?: Operation; + options?: Operation; + head?: Operation; + patch?: Operation; + trace?: Operation; + query?: Operation; + additionOperations?: Record; + servers?: Server[]; + parameters?: (Parameter | Reference)[]; +}; + +type Operation = { + tags?: string[]; + summary?: string; + description?: string; + externalDocs?: ExternalDocs; + operationId?: string; + parameters?: (Parameter | Reference)[]; + requestBody?: RequestBody | Reference; + responses?: Responses; + callbacks?: Record; + deprecated?: boolean; + security?: SecurityRequirement[]; + servers?: Server[]; +}; + +export type Parameter = { + name: string; + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; +} & Examples & ( + ( + { + in: "path"; + required: true; + } & ( + ({ style?: "matrix" | "label" | "simple" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "query"; + } & ( + ({ style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "header"; + } & ( + ({ style?: "simple" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { + in: "cookie"; + } & ( + ({ style?: "cookie" } & SchemaParameter) + | ContentParameter + ) + ) | ( + { in: "querystring" } & ContentParameter + ) +); + +type ContentParameter = { + schema?: never; + content: Record; +}; + +type SchemaParameter = { + explode?: boolean; + allowReserved?: boolean; + schema: OasSchema32; + content?: never; +}; + +type RequestBody = { + description?: string; + content: Record; + required?: boolean; +}; + +type MediaType = { + schema?: OasSchema32; + itemSchema?: OasSchema32; +} & Examples & ({ + encoding?: Record; + prefixEncoding?: never; + itemEncoding?: never; +} | { + encoding?: never; + prefixEncoding?: Encoding[]; + itemEncoding?: Encoding; +}); + +type Encoding = { + contentType?: string; + headers?: Record; + style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; + explode?: boolean; + allowReserved?: boolean; +} & ({ + encoding?: Record; + prefixEncoding?: never; + itemEncoding?: never; +} | { + encoding?: never; + prefixEncoding?: Encoding[]; + itemEncoding?: Encoding; +}); + +type Responses = { + default?: Response | Reference; +} & Record; + +type Response = { + summary?: string; + description?: string; + headers?: Record; + content?: Record; + links?: Record; +}; + +type Callbacks = Record; + +type Examples = { + example?: Json; + examples?: Record; +}; + +type Example = { + summary?: string; + description?: string; +} & ({ + value?: Json; + dataValue?: never; + serializedValue?: never; + externalValue?: never; +} | { + value?: never; + dataValue?: Json; + serializedValue?: string; + externalValue?: string; +}); + +type Link = { + operationRef?: string; + operationId?: string; + parameters?: Record; + requestBody?: Json; + description?: string; + server?: Server; +}; + +type Header = { + description?: string; + required?: boolean; + deprecated?: boolean; +} & Examples & ({ + style?: "simple"; + explode?: boolean; + schema: OasSchema32; +} | { + content: Record; +}); + +type Tag = { + name: string; + summary?: string; + description?: string; + externalDocs?: ExternalDocs; + parent?: string; + kind?: string; +}; + +type Reference = { + $ref: string; + summary?: string; + description?: string; +}; + +type SecurityScheme = { + type: "apiKey"; + description?: string; + name: string; + in: "query" | "header" | "cookie"; + deprecated?: boolean; +} | { + type: "http"; + description?: string; + scheme: string; + bearerFormat?: string; + deprecated?: boolean; +} | { + type: "mutualTLS"; + description?: string; + deprecated?: boolean; +} | { + type: "oauth2"; + description?: string; + flows: OauthFlows; + oauth2MetadataUrl?: string; + deprecated?: boolean; +} | { + type: "openIdConnect"; + description?: string; + openIdConnectUrl: string; + deprecated?: boolean; +}; + +type OauthFlows = { + implicit?: Implicit; + password?: Password; + clientCredentials?: ClientCredentials; + authorizationCode?: AuthorizationCode; + deviceAuthorization?: DeviceAuthorization; +}; + +type Implicit = { + authorizationUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type Password = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type ClientCredentials = { + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type AuthorizationCode = { + authorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type DeviceAuthorization = { + deviceAuthorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Record; +}; + +type SecurityRequirement = Record; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/index.js b/node_modules/@hyperjump/json-schema/openapi-3-2/index.js new file mode 100644 index 00000000..9e03b679 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/index.js @@ -0,0 +1,47 @@ +import { addKeyword, defineVocabulary } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import "../lib/openapi.js"; + +import dialectSchema from "./dialect/base.js"; +import vocabularySchema from "./meta/base.js"; +import schema from "./schema.js"; +import schemaBase from "./schema-base.js"; +import schemaDraft2020 from "./schema-draft-2020-12.js"; +import schemaDraft2019 from "./schema-draft-2019-09.js"; +import schemaDraft07 from "./schema-draft-07.js"; +import schemaDraft06 from "./schema-draft-06.js"; +import schemaDraft04 from "./schema-draft-04.js"; + +import discriminator from "../openapi-3-0/discriminator.js"; +import example from "../openapi-3-0/example.js"; +import externalDocs from "../openapi-3-0/externalDocs.js"; +import xml from "../openapi-3-0/xml.js"; + + +export * from "../draft-2020-12/index.js"; + +addKeyword(discriminator); +addKeyword(example); +addKeyword(externalDocs); +addKeyword(xml); + +defineVocabulary("https://spec.openapis.org/oas/3.2/vocab/base", { + "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", + "example": "https://spec.openapis.org/oas/3.0/keyword/example", + "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", + "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" +}); + +registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.2/meta"); +registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.2/dialect"); + +// Current Schemas +registerSchema(schema, "https://spec.openapis.org/oas/3.2/schema"); +registerSchema(schemaBase, "https://spec.openapis.org/oas/3.2/schema-base"); + +// Alternative dialect schemas +registerSchema(schemaDraft2020, "https://spec.openapis.org/oas/3.2/schema-draft-2020-12"); +registerSchema(schemaDraft2019, "https://spec.openapis.org/oas/3.2/schema-draft-2019-09"); +registerSchema(schemaDraft07, "https://spec.openapis.org/oas/3.2/schema-draft-07"); +registerSchema(schemaDraft06, "https://spec.openapis.org/oas/3.2/schema-draft-06"); +registerSchema(schemaDraft04, "https://spec.openapis.org/oas/3.2/schema-draft-04"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js new file mode 100644 index 00000000..472ceeb4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js @@ -0,0 +1,102 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$dynamicAnchor": "meta", + + "title": "OAS Base Vocabulary", + "description": "A JSON Schema Vocabulary used in the OpenAPI JSON Schema Dialect", + + "type": ["object", "boolean"], + "properties": { + "discriminator": { "$ref": "#/$defs/discriminator" }, + "example": { "deprecated": true }, + "externalDocs": { "$ref": "#/$defs/external-docs" }, + "xml": { "$ref": "#/$defs/xml" } + }, + + "$defs": { + "extensible": { + "patternProperties": { + "^x-": true + } + }, + + "discriminator": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "defaultMapping": { + "type": "string" + } + }, + "required": ["propertyName"], + "unevaluatedProperties": false + }, + "external-docs": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri-reference" + }, + "description": { + "type": "string" + } + }, + "required": ["url"], + "unevaluatedProperties": false + }, + "xml": { + "$ref": "#/$defs/extensible", + "type": "object", + "properties": { + "nodeType": { + "type": "string", + "enum": [ + "element", + "attribute", + "text", + "cdata", + "none" + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string", + "format": "iri" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "deprecated": true + }, + "wrapped": { + "type": "boolean", + "deprecated": true + } + }, + "dependentSchemas": { + "nodeType": { + "properties": { + "attribute": false, + "wrapped": false + } + } + }, + "unevaluatedProperties": false + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js new file mode 100644 index 00000000..8e10c6bb --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js @@ -0,0 +1,32 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the OpenAPI JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://spec.openapis.org/oas/3.2/dialect" }, + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js new file mode 100644 index 00000000..c7bf4347 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the draft-04 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-04/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js new file mode 100644 index 00000000..5057827d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the draft-06 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-06/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js new file mode 100644 index 00000000..e163db4b --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the draft-07 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "http://json-schema.org/draft-07/schema#" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js new file mode 100644 index 00000000..8cf69a7d --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the 2019-09 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonschemadialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://json-schema.org/draft/2019-09/schema" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js new file mode 100644 index 00000000..013dac42 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js @@ -0,0 +1,33 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://spec.openapis.org/oas/3.2/vocab/base": false + }, + + "description": "The description of OpenAPI v3.2.x Documents using the 2020-12 JSON Schema dialect", + + "$ref": "https://spec.openapis.org/oas/3.2/schema", + "properties": { + "jsonschemadialect": { "$ref": "#/$defs/dialect" } + }, + + "$defs": { + "dialect": { "const": "https://json-schema.org/draft/2020-12/schema" }, + + "schema": { + "$dynamicAnchor": "meta", + "$ref": "https://spec.openapis.org/oas/3.2/dialect", + "properties": { + "$schema": { "$ref": "#/$defs/dialect" } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js new file mode 100644 index 00000000..18fd4aa4 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js @@ -0,0 +1,1665 @@ +export default { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "The description of OpenAPI v3.2.x Documents without Schema Object validation", + "type": "object", + "properties": { + "openapi": { + "type": "string", + "pattern": "^3\\.2\\.\\d+(-.+)?$" + }, + "$self": { + "type": "string", + "format": "uri-reference", + "$comment": "MUST NOT contain a fragment", + "pattern": "^[^#]*$" + }, + "info": { + "$ref": "#/$defs/info" + }, + "jsonSchemaDialect": { + "type": "string", + "format": "uri-reference", + "default": "https://spec.openapis.org/oas/3.1/dialect" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + }, + "default": [ + { + "url": "/" + } + ] + }, + "paths": { + "$ref": "#/$defs/paths" + }, + "webhooks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "components": { + "$ref": "#/$defs/components" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/$defs/security-requirement" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/$defs/tag" + } + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + } + }, + "required": [ + "openapi", + "info" + ], + "anyOf": [ + { + "required": [ + "paths" + ] + }, + { + "required": [ + "components" + ] + }, + { + "required": [ + "webhooks" + ] + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "$defs": { + "info": { + "$comment": "https://spec.openapis.org/oas/v3.2#info-object", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "termsOfService": { + "type": "string", + "format": "uri-reference" + }, + "contact": { + "$ref": "#/$defs/contact" + }, + "license": { + "$ref": "#/$defs/license" + }, + "version": { + "type": "string" + } + }, + "required": [ + "title", + "version" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "contact": { + "$comment": "https://spec.openapis.org/oas/v3.2#contact-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "license": { + "$comment": "https://spec.openapis.org/oas/v3.2#license-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "name" + ], + "dependentSchemas": { + "identifier": { + "not": { + "required": [ + "url" + ] + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "server": { + "$comment": "https://spec.openapis.org/oas/v3.2#server-object", + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/server-variable" + } + } + }, + "required": [ + "url" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "server-variable": { + "$comment": "https://spec.openapis.org/oas/v3.2#server-variable-object", + "type": "object", + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "default" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "components": { + "$comment": "https://spec.openapis.org/oas/v3.2#components-object", + "type": "object", + "properties": { + "schemas": { + "type": "object", + "additionalProperties": { + "$dynamicRef": "#meta" + } + }, + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/response-or-reference" + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/parameter-or-reference" + } + }, + "examples": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/example-or-reference" + } + }, + "requestBodies": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/request-body-or-reference" + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "securitySchemes": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/security-scheme-or-reference" + } + }, + "links": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/link-or-reference" + } + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/callbacks-or-reference" + } + }, + "pathItems": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "mediaTypes": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/media-type-or-reference" + } + } + }, + "patternProperties": { + "^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems|mediaTypes)$": { + "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", + "propertyNames": { + "pattern": "^[a-zA-Z0-9._-]+$" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "paths": { + "$comment": "https://spec.openapis.org/oas/v3.2#paths-object", + "type": "object", + "patternProperties": { + "^/": { + "$ref": "#/$defs/path-item" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "path-item": { + "$comment": "https://spec.openapis.org/oas/v3.2#path-item-object", + "type": "object", + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + } + }, + "parameters": { + "$ref": "#/$defs/parameters" + }, + "additionalOperations": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/operation" + }, + "propertyNames": { + "$comment": "RFC9110 restricts methods to \"1*tchar\" in ABNF", + "pattern": "^[a-zA-Z0-9!#$%&'*+.^_`|~-]+$", + "not": { + "enum": [ + "GET", + "PUT", + "POST", + "DELETE", + "OPTIONS", + "HEAD", + "PATCH", + "TRACE", + "QUERY" + ] + } + } + }, + "get": { + "$ref": "#/$defs/operation" + }, + "put": { + "$ref": "#/$defs/operation" + }, + "post": { + "$ref": "#/$defs/operation" + }, + "delete": { + "$ref": "#/$defs/operation" + }, + "options": { + "$ref": "#/$defs/operation" + }, + "head": { + "$ref": "#/$defs/operation" + }, + "patch": { + "$ref": "#/$defs/operation" + }, + "trace": { + "$ref": "#/$defs/operation" + }, + "query": { + "$ref": "#/$defs/operation" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "operation": { + "$comment": "https://spec.openapis.org/oas/v3.2#operation-object", + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "$ref": "#/$defs/parameters" + }, + "requestBody": { + "$ref": "#/$defs/request-body-or-reference" + }, + "responses": { + "$ref": "#/$defs/responses" + }, + "callbacks": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/callbacks-or-reference" + } + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/$defs/security-requirement" + } + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/$defs/server" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "external-documentation": { + "$comment": "https://spec.openapis.org/oas/v3.2#external-documentation-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "url" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/$defs/parameter-or-reference" + }, + "not": { + "allOf": [ + { + "contains": { + "type": "object", + "properties": { + "in": { + "const": "query" + } + }, + "required": [ + "in" + ] + } + }, + { + "contains": { + "type": "object", + "properties": { + "in": { + "const": "querystring" + } + }, + "required": [ + "in" + ] + } + } + ] + }, + "contains": { + "type": "object", + "properties": { + "in": { + "const": "querystring" + } + }, + "required": [ + "in" + ] + }, + "minContains": 0, + "maxContains": 1 + }, + "parameter": { + "$comment": "https://spec.openapis.org/oas/v3.2#parameter-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "in": { + "enum": [ + "query", + "querystring", + "header", + "path", + "cookie" + ] + }, + "description": { + "type": "string" + }, + "required": { + "default": false, + "type": "boolean" + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "content": { + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 + } + }, + "required": [ + "name", + "in" + ], + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ] + } + ], + "allOf": [ + { + "$ref": "#/$defs/examples" + }, + { + "$ref": "#/$defs/specification-extensions" + }, + { + "if": { + "properties": { + "in": { + "const": "query" + } + } + }, + "then": { + "properties": { + "allowEmptyValue": { + "default": false, + "type": "boolean" + } + } + } + }, + { + "if": { + "properties": { + "in": { + "const": "querystring" + } + } + }, + "then": { + "required": [ + "content" + ] + } + } + ], + "dependentSchemas": { + "schema": { + "properties": { + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "default": false, + "type": "boolean" + } + }, + "allOf": [ + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" + }, + { + "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" + }, + { + "$ref": "#/$defs/styles-for-form" + } + ], + "$defs": { + "styles-for-path": { + "if": { + "properties": { + "in": { + "const": "path" + } + } + }, + "then": { + "properties": { + "style": { + "default": "simple", + "enum": [ + "matrix", + "label", + "simple" + ] + }, + "required": { + "const": true + } + }, + "required": [ + "required" + ] + } + }, + "styles-for-header": { + "if": { + "properties": { + "in": { + "const": "header" + } + } + }, + "then": { + "properties": { + "style": { + "default": "simple", + "const": "simple" + } + } + } + }, + "styles-for-query": { + "if": { + "properties": { + "in": { + "const": "query" + } + } + }, + "then": { + "properties": { + "style": { + "default": "form", + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + } + } + } + }, + "styles-for-cookie": { + "if": { + "properties": { + "in": { + "const": "cookie" + } + } + }, + "then": { + "properties": { + "style": { + "default": "form", + "enum": [ + "form", + "cookie" + ] + } + } + } + } + } + } + }, + "unevaluatedProperties": false + }, + "parameter-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/parameter" + } + }, + "request-body": { + "$comment": "https://spec.openapis.org/oas/v3.2#request-body-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "content": { + "$ref": "#/$defs/content" + }, + "required": { + "default": false, + "type": "boolean" + } + }, + "required": [ + "content" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "request-body-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/request-body" + } + }, + "content": { + "$comment": "https://spec.openapis.org/oas/v3.2#fixed-fields-10", + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/media-type-or-reference" + }, + "propertyNames": { + "format": "media-range" + } + }, + "media-type": { + "$comment": "https://spec.openapis.org/oas/v3.2#media-type-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "itemSchema": { + "$dynamicRef": "#meta" + }, + "encoding": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/encoding" + } + }, + "prefixEncoding": { + "type": "array", + "items": { + "$ref": "#/$defs/encoding" + } + }, + "itemEncoding": { + "$ref": "#/$defs/encoding" + } + }, + "dependentSchemas": { + "encoding": { + "properties": { + "prefixEncoding": false, + "itemEncoding": false + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/examples" + }, + { + "$ref": "#/$defs/specification-extensions" + } + ], + "unevaluatedProperties": false + }, + "media-type-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/media-type" + } + }, + "encoding": { + "$comment": "https://spec.openapis.org/oas/v3.2#encoding-object", + "type": "object", + "properties": { + "contentType": { + "type": "string", + "format": "media-range" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "style": { + "enum": [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean" + }, + "encoding": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/encoding" + } + }, + "prefixEncoding": { + "type": "array", + "items": { + "$ref": "#/$defs/encoding" + } + }, + "itemEncoding": { + "$ref": "#/$defs/encoding" + } + }, + "dependentSchemas": { + "encoding": { + "properties": { + "prefixEncoding": false, + "itemEncoding": false + } + }, + "style": { + "properties": { + "allowReserved": { + "default": false + } + } + }, + "explode": { + "properties": { + "style": { + "default": "form" + }, + "allowReserved": { + "default": false + } + } + }, + "allowReserved": { + "properties": { + "style": { + "default": "form" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/styles-for-form" + } + ], + "unevaluatedProperties": false + }, + "responses": { + "$comment": "https://spec.openapis.org/oas/v3.2#responses-object", + "type": "object", + "properties": { + "default": { + "$ref": "#/$defs/response-or-reference" + } + }, + "patternProperties": { + "^[1-5](?:[0-9]{2}|XX)$": { + "$ref": "#/$defs/response-or-reference" + } + }, + "minProperties": 1, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "if": { + "$comment": "either default, or at least one response code property must exist", + "patternProperties": { + "^[1-5](?:[0-9]{2}|XX)$": false + } + }, + "then": { + "required": [ + "default" + ] + } + }, + "response": { + "$comment": "https://spec.openapis.org/oas/v3.2#response-object", + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/header-or-reference" + } + }, + "content": { + "$ref": "#/$defs/content" + }, + "links": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/link-or-reference" + } + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "response-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/response" + } + }, + "callbacks": { + "$comment": "https://spec.openapis.org/oas/v3.2#callback-object", + "type": "object", + "$ref": "#/$defs/specification-extensions", + "additionalProperties": { + "$ref": "#/$defs/path-item" + } + }, + "callbacks-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/callbacks" + } + }, + "example": { + "$comment": "https://spec.openapis.org/oas/v3.2#example-object", + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dataValue": true, + "serializedValue": { + "type": "string" + }, + "value": true, + "externalValue": { + "type": "string", + "format": "uri-reference" + } + }, + "allOf": [ + { + "not": { + "required": [ + "value", + "externalValue" + ] + } + }, + { + "not": { + "required": [ + "value", + "dataValue" + ] + } + }, + { + "not": { + "required": [ + "value", + "serializedValue" + ] + } + }, + { + "not": { + "required": [ + "serializedValue", + "externalValue" + ] + } + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "example-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/example" + } + }, + "link": { + "$comment": "https://spec.openapis.org/oas/v3.2#link-object", + "type": "object", + "properties": { + "operationRef": { + "type": "string", + "format": "uri-reference" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "$ref": "#/$defs/map-of-strings" + }, + "requestBody": true, + "description": { + "type": "string" + }, + "server": { + "$ref": "#/$defs/server" + } + }, + "oneOf": [ + { + "required": [ + "operationRef" + ] + }, + { + "required": [ + "operationId" + ] + } + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "link-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/link" + } + }, + "header": { + "$comment": "https://spec.openapis.org/oas/v3.2#header-object", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "required": { + "default": false, + "type": "boolean" + }, + "deprecated": { + "default": false, + "type": "boolean" + }, + "schema": { + "$dynamicRef": "#meta" + }, + "content": { + "$ref": "#/$defs/content", + "minProperties": 1, + "maxProperties": 1 + } + }, + "oneOf": [ + { + "required": [ + "schema" + ] + }, + { + "required": [ + "content" + ] + } + ], + "dependentSchemas": { + "schema": { + "properties": { + "style": { + "default": "simple", + "const": "simple" + }, + "explode": { + "default": false, + "type": "boolean" + }, + "allowReserved": { + "default": false, + "type": "boolean" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/examples" + }, + { + "$ref": "#/$defs/specification-extensions" + } + ], + "unevaluatedProperties": false + }, + "header-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/header" + } + }, + "tag": { + "$comment": "https://spec.openapis.org/oas/v3.2#tag-object", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/$defs/external-documentation" + }, + "parent": { + "type": "string" + }, + "kind": { + "type": "string" + } + }, + "required": [ + "name" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "reference": { + "$comment": "https://spec.openapis.org/oas/v3.2#reference-object", + "type": "object", + "properties": { + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "schema": { + "$comment": "https://spec.openapis.org/oas/v3.2#schema-object", + "$dynamicAnchor": "meta", + "type": [ + "object", + "boolean" + ] + }, + "security-scheme": { + "$comment": "https://spec.openapis.org/oas/v3.2#security-scheme-object", + "type": "object", + "properties": { + "type": { + "enum": [ + "apiKey", + "http", + "mutualTLS", + "oauth2", + "openIdConnect" + ] + }, + "description": { + "type": "string" + }, + "deprecated": { + "default": false, + "type": "boolean" + } + }, + "required": [ + "type" + ], + "allOf": [ + { + "$ref": "#/$defs/specification-extensions" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-apikey" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-http" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-oauth2" + }, + { + "$ref": "#/$defs/security-scheme/$defs/type-oidc" + } + ], + "unevaluatedProperties": false, + "$defs": { + "type-apikey": { + "if": { + "properties": { + "type": { + "const": "apiKey" + } + } + }, + "then": { + "properties": { + "name": { + "type": "string" + }, + "in": { + "enum": [ + "query", + "header", + "cookie" + ] + } + }, + "required": [ + "name", + "in" + ] + } + }, + "type-http": { + "if": { + "properties": { + "type": { + "const": "http" + } + } + }, + "then": { + "properties": { + "scheme": { + "type": "string" + } + }, + "required": [ + "scheme" + ] + } + }, + "type-http-bearer": { + "if": { + "properties": { + "type": { + "const": "http" + }, + "scheme": { + "type": "string", + "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + }, + "required": [ + "type", + "scheme" + ] + }, + "then": { + "properties": { + "bearerFormat": { + "type": "string" + } + } + } + }, + "type-oauth2": { + "if": { + "properties": { + "type": { + "const": "oauth2" + } + } + }, + "then": { + "properties": { + "flows": { + "$ref": "#/$defs/oauth-flows" + }, + "oauth2MetadataUrl": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "flows" + ] + } + }, + "type-oidc": { + "if": { + "properties": { + "type": { + "const": "openIdConnect" + } + } + }, + "then": { + "properties": { + "openIdConnectUrl": { + "type": "string", + "format": "uri-reference" + } + }, + "required": [ + "openIdConnectUrl" + ] + } + } + } + }, + "security-scheme-or-reference": { + "if": { + "type": "object", + "required": [ + "$ref" + ] + }, + "then": { + "$ref": "#/$defs/reference" + }, + "else": { + "$ref": "#/$defs/security-scheme" + } + }, + "oauth-flows": { + "type": "object", + "properties": { + "implicit": { + "$ref": "#/$defs/oauth-flows/$defs/implicit" + }, + "password": { + "$ref": "#/$defs/oauth-flows/$defs/password" + }, + "clientCredentials": { + "$ref": "#/$defs/oauth-flows/$defs/client-credentials" + }, + "authorizationCode": { + "$ref": "#/$defs/oauth-flows/$defs/authorization-code" + }, + "deviceAuthorization": { + "$ref": "#/$defs/oauth-flows/$defs/device-authorization" + } + }, + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false, + "$defs": { + "implicit": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "authorizationUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "password": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "client-credentials": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "authorization-code": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + }, + "device-authorization": { + "type": "object", + "properties": { + "deviceAuthorizationUrl": { + "type": "string", + "format": "uri-reference" + }, + "tokenUrl": { + "type": "string", + "format": "uri-reference" + }, + "refreshUrl": { + "type": "string", + "format": "uri-reference" + }, + "scopes": { + "$ref": "#/$defs/map-of-strings" + } + }, + "required": [ + "deviceAuthorizationUrl", + "tokenUrl", + "scopes" + ], + "$ref": "#/$defs/specification-extensions", + "unevaluatedProperties": false + } + } + }, + "security-requirement": { + "$comment": "https://spec.openapis.org/oas/v3.2#security-requirement-object", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "specification-extensions": { + "$comment": "https://spec.openapis.org/oas/v3.2#specification-extensions", + "patternProperties": { + "^x-": true + } + }, + "examples": { + "properties": { + "example": true, + "examples": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/example-or-reference" + } + } + }, + "not": { + "required": [ + "example", + "examples" + ] + } + }, + "map-of-strings": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "styles-for-form": { + "if": { + "properties": { + "style": { + "const": "form" + } + }, + "required": [ + "style" + ] + }, + "then": { + "properties": { + "explode": { + "default": true + } + } + }, + "else": { + "properties": { + "explode": { + "default": false + } + } + } + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/package.json b/node_modules/@hyperjump/json-schema/package.json new file mode 100644 index 00000000..5ebfd609 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/package.json @@ -0,0 +1,83 @@ +{ + "name": "@hyperjump/json-schema", + "version": "1.17.2", + "description": "A JSON Schema validator with support for custom keywords, vocabularies, and dialects", + "type": "module", + "main": "./v1/index.js", + "exports": { + ".": "./v1/index.js", + "./draft-04": "./draft-04/index.js", + "./draft-06": "./draft-06/index.js", + "./draft-07": "./draft-07/index.js", + "./draft-2019-09": "./draft-2019-09/index.js", + "./draft-2020-12": "./draft-2020-12/index.js", + "./openapi-3-0": "./openapi-3-0/index.js", + "./openapi-3-1": "./openapi-3-1/index.js", + "./openapi-3-2": "./openapi-3-2/index.js", + "./experimental": "./lib/experimental.js", + "./instance/experimental": "./lib/instance.js", + "./annotations/experimental": "./annotations/index.js", + "./annotated-instance/experimental": "./annotations/annotated-instance.js", + "./bundle": "./bundle/index.js", + "./formats": "./formats/index.js", + "./formats-lite": "./formats/lite.js" + }, + "scripts": { + "clean": "xargs -a .gitignore rm -rf", + "lint": "eslint lib v1 draft-* openapi-* bundle annotations", + "test": "vitest --watch=false", + "check-types": "tsc --noEmit" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hyperjump-io/json-schema.git" + }, + "keywords": [ + "JSON Schema", + "json-schema", + "jsonschema", + "JSON", + "Schema", + "2020-12", + "2019-09", + "draft-07", + "draft-06", + "draft-04", + "vocabulary", + "vocabularies" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/content-type": "*", + "@types/node": "*", + "@types/uuid": "*", + "@vitest/coverage-v8": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "json-schema-test-suite": "github:json-schema-org/JSON-Schema-Test-Suite", + "typescript": "*", + "typescript-eslint": "*", + "undici": "*", + "vitest": "*", + "yaml": "*" + }, + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/json-schema-formats": "^1.0.0", + "@hyperjump/pact": "^1.2.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.4", + "json-stringify-deterministic": "^1.0.12", + "just-curry-it": "^5.3.0", + "uuid": "^9.0.0" + }, + "peerDependencies": { + "@hyperjump/browser": "^1.1.0" + } +} diff --git a/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json b/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json new file mode 100644 index 00000000..4ffcd9dd --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json @@ -0,0 +1,289 @@ +[ + { + "description": "if - then", + "schema": { + "conditional": [ + { "type": "string" }, + { "maxLength": 5 } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails", + "data": 42, + "valid": true + } + ] + }, + { + "description": "if - then - else", + "schema": { + "conditional": [ + { "type": "string" }, + { "maxLength": 5 }, + { "type": "number" } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails, else passes", + "data": 42, + "valid": true + }, + { + "description": "if fails, else fails", + "data": true, + "valid": false + } + ] + }, + { + "description": "if - then - elseif - then", + "schema": { + "conditional": [ + { "type": "string" }, + { "maxLength": 5 }, + { "type": "number" }, + { "maximum": 50 } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails, elseif passes, then passes", + "data": 42, + "valid": true + }, + { + "description": "if fails, elseif passes, then fails", + "data": 100, + "valid": false + }, + { + "description": "if fails, elseif fails", + "data": true, + "valid": true + } + ] + }, + { + "description": "if - then - elseif - then - else", + "schema": { + "conditional": [ + { "type": "string" }, + { "maxLength": 5 }, + { "type": "number" }, + { "maximum": 50 }, + { "const": true } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails, elseif passes, then passes", + "data": 42, + "valid": true + }, + { + "description": "if fails, elseif passes, then fails", + "data": 100, + "valid": false + }, + { + "description": "if fails, elseif fails, else passes", + "data": true, + "valid": true + }, + { + "description": "if fails, elseif fails, else fails", + "data": false, + "valid": false + } + ] + }, + { + "description": "nested if - then - elseif - then - else", + "schema": { + "conditional": [ + [ + { "type": "string" }, + { "maxLength": 5 } + ], + [ + { "type": "number" }, + { "maximum": 50 } + ], + { "const": true } + ] + }, + "tests": [ + { + "description": "if passes, then passes", + "data": "foo", + "valid": true + }, + { + "description": "if passes, then fails", + "data": "foobar", + "valid": false + }, + { + "description": "if fails, elseif passes, then passes", + "data": 42, + "valid": true + }, + { + "description": "if fails, elseif passes, then fails", + "data": 100, + "valid": false + }, + { + "description": "if fails, elseif fails, else passes", + "data": true, + "valid": true + }, + { + "description": "if fails, elseif fails, else fails", + "data": false, + "valid": false + } + ] + }, + { + "description": "if - then - else with unevaluatedProperties", + "schema": { + "allOf": [ + { + "properties": { + "foo": {} + }, + "conditional": [ + { "required": ["foo"] }, + { + "properties": { + "bar": {} + } + }, + { + "properties": { + "baz": {} + } + } + ] + } + ], + "unevaluatedProperties": false + }, + "tests": [ + { + "description": "if foo, then bar is allowed", + "data": { "foo": 42, "bar": true }, + "valid": true + }, + { + "description": "if foo, then baz is not allowed", + "data": { "foo": 42, "baz": true }, + "valid": false + }, + { + "description": "if not foo, then baz is allowed", + "data": { "baz": true }, + "valid": true + }, + { + "description": "if not foo, then bar is not allowed", + "data": { "bar": true }, + "valid": false + } + ] + }, + { + "description": "if - then - else with unevaluatedItems", + "schema": { + "allOf": [ + { + "conditional": [ + { "prefixItems": [{ "const": "foo" }] }, + { + "prefixItems": [{}, { "const": "bar" }] + }, + { + "prefixItems": [{}, { "const": "baz" }] + } + ] + } + ], + "unevaluatedItems": false + }, + "tests": [ + { + "description": "foo, bar", + "data": ["foo", "bar"], + "valid": true + }, + { + "description": "foo, baz", + "data": ["foo", "baz"], + "valid": false + }, + { + "description": "foo, bar, additional", + "data": ["foo", "bar", ""], + "valid": false + }, + { + "description": "not-foo, baz", + "data": ["not-foo", "baz"], + "valid": true + }, + { + "description": "not-foo, bar", + "data": ["not-foo", "bar"], + "valid": false + }, + { + "description": "not-foo, baz, additional", + "data": ["not-foo", "baz", ""], + "valid": false + } + ] + } +] diff --git a/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json b/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json new file mode 100644 index 00000000..b1387804 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json @@ -0,0 +1,462 @@ +[ + { + "description": "itemPattern ``", + "schema": { + "itemPattern": [] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": true + }, + { + "description": "a", + "data": ["a"], + "valid": false + } + ] + }, + { + "description": "itemPattern `a`", + "schema": { + "itemPattern": [ + { "const": "a" } + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": true + }, + { + "description": "b", + "data": ["b"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": false + } + ] + }, + { + "description": "itemPattern `ab`", + "schema": { + "itemPattern": [ + { "const": "a" }, + { "const": "b" } + ] + }, + "tests": [ + { + "description": "a", + "data": ["a"], + "valid": false + }, + { + "description": "aa", + "data": ["a", "a"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + } + ] + }, + { + "description": "itemPattern `a+b`", + "schema": { + "itemPattern": [ + { "const": "a" }, "+", + { "const": "b" } + ] + }, + "tests": [ + { + "description": "b", + "data": ["b"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "aab", + "data": ["a", "a", "b"], + "valid": true + }, + { + "description": "aaab", + "data": ["a", "a", "a", "b"], + "valid": true + } + ] + }, + { + "description": "itemPattern `a*b`", + "schema": { + "itemPattern": [ + { "const": "a" }, "*", + { "const": "b" } + ] + }, + "tests": [ + { + "description": "b", + "data": ["b"], + "valid": true + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "aab", + "data": ["a", "a", "b"], + "valid": true + }, + { + "description": "aaab", + "data": ["a", "a", "a", "b"], + "valid": true + } + ] + }, + { + "description": "itemPattern `(ab)+`", + "schema": { + "itemPattern": [ + [ + { "const": "a" }, + { "const": "b" } + ], "+" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "aba", + "data": ["a", "b", "a"], + "valid": false + }, + { + "description": "abab", + "data": ["a", "b", "a", "b"], + "valid": true + }, + { + "description": "ababa", + "data": ["a", "b", "a", "b", "a"], + "valid": false + } + ] + }, + { + "description": "itemPattern `a(b+c)*`", + "schema": { + "itemPattern": [ + { "const": "a" }, + [ + { "const": "b" }, "+", + { "const": "c" } + ], "*" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": true + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": false + }, + { + "description": "abc", + "data": ["a", "b", "c"], + "valid": true + }, + { + "description": "abbc", + "data": ["a", "b", "b", "c"], + "valid": true + }, + { + "description": "abbbc", + "data": ["a", "b", "b", "b", "c"], + "valid": true + }, + { + "description": "abcbc", + "data": ["a", "b", "c", "b", "c"], + "valid": true + }, + { + "description": "abcb", + "data": ["a", "b", "c", "b"], + "valid": false + }, + { + "description": "abbcbc", + "data": ["a", "b", "b", "c", "b", "c"], + "valid": true + }, + { + "description": "abcbbc", + "data": ["a", "b", "c", "b", "b", "c"], + "valid": true + }, + { + "description": "abbcbbc", + "data": ["a", "b", "b", "c", "b", "b", "c"], + "valid": true + }, + { + "description": "abbcbbcb", + "data": ["a", "b", "b", "c", "b", "b", "c", "b"], + "valid": false + } + ] + }, + { + "description": "itemPattern `(abc)*abd`", + "schema": { + "itemPattern": [ + [ + { "const": "a" }, + { "const": "b" }, + { "const": "c" } + ], "*", + { "const": "a" }, + { "const": "b" }, + { "const": "d" } + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "abc", + "data": ["a", "b", "c"], + "valid": false + }, + { + "description": "abd", + "data": ["a", "b", "d"], + "valid": true + }, + { + "description": "abcabd", + "data": ["a", "b", "c", "a", "b", "d"], + "valid": true + }, + { + "description": "abcabcabd", + "data": ["a", "b", "c", "a", "b", "c", "a", "b", "d"], + "valid": true + }, + { + "description": "abcabcabda", + "data": ["a", "b", "c", "a", "b", "c", "a", "b", "d", "a"], + "valid": false + } + ] + }, + { + "description": "itemPattern `(ab|bd)+`", + "schema": { + "itemPattern": [ + [ + { "const": "a" }, + { "const": "b" }, + "|", + { "const": "c" }, + { "const": "d" } + ], "+" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "cd", + "data": ["c", "d"], + "valid": true + }, + { + "description": "abab", + "data": ["a", "b", "a", "b"], + "valid": true + }, + { + "description": "abcd", + "data": ["a", "b", "c", "d"], + "valid": true + }, + { + "description": "abc", + "data": ["a", "b", "c"], + "valid": false + } + ] + }, + { + "description": "itemPattern `ab?|c`", + "schema": { + "itemPattern": [ + { "const": "a" }, + { "const": "b" }, "?", + "|", + { "const": "c" } + ] + }, + "tests": [ + { + "description": "a", + "data": ["a"], + "valid": true + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "c", + "data": ["c"], + "valid": true + }, + { + "description": "ac", + "data": ["a", "c"], + "valid": false + } + ] + }, + { + "description": "itemPattern `a*(ab)+`", + "schema": { + "itemPattern": [ + { "const": "a" }, "*", + [ + { "const": "a" }, + { "const": "b" } + ], "+" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": false + }, + { + "description": "ab", + "data": ["a", "b"], + "valid": true + }, + { + "description": "aab", + "data": ["a", "a", "b"], + "valid": true + }, + { + "description": "aabab", + "data": ["a", "a", "b", "a", "b"], + "valid": true + }, + { + "description": "aaab", + "data": ["a", "a", "a", "b"], + "valid": true + } + ] + }, + { + "description": "itemPattern `(a+)+`", + "schema": { + "itemPattern": [ + [ + { "const": "a" }, "+" + ], "+" + ] + }, + "tests": [ + { + "description": "*empty*", + "data": [], + "valid": false + }, + { + "description": "a", + "data": ["a"], + "valid": true + }, + { + "description": "aa", + "data": ["a", "a"], + "valid": true + }, + { + "description": "aaaaaaaaaaaaaaaa", + "data": ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"], + "valid": true + }, + { + "description": "aaaaaaaaaaaaaaaaX", + "data": ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "X"], + "valid": false + } + ] + } +] diff --git a/node_modules/@hyperjump/json-schema/v1/index.d.ts b/node_modules/@hyperjump/json-schema/v1/index.d.ts new file mode 100644 index 00000000..878ea277 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/index.d.ts @@ -0,0 +1,68 @@ +import type { Json } from "@hyperjump/json-pointer"; +import type { JsonSchemaType } from "../lib/common.js"; + + +export type JsonSchemaType = JsonSchemaType; + +export type JsonSchemaV1 = boolean | { + $schema?: "https://json-schema.org/v1"; + $id?: string; + $anchor?: string; + $ref?: string; + $dynamicRef?: string; + $dynamicAnchor?: string; + $vocabulary?: Record; + $comment?: string; + $defs?: Record; + additionalItems?: JsonSchema; + unevaluatedItems?: JsonSchema; + prefixItems?: JsonSchema[]; + items?: JsonSchema; + contains?: JsonSchema; + additionalProperties?: JsonSchema; + unevaluatedProperties?: JsonSchema; + properties?: Record; + patternProperties?: Record; + dependentSchemas?: Record; + propertyNames?: JsonSchema; + if?: JsonSchema; + then?: JsonSchema; + else?: JsonSchema; + allOf?: JsonSchema[]; + anyOf?: JsonSchema[]; + oneOf?: JsonSchema[]; + not?: JsonSchema; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxContains?: number; + minContains?: number; + maxProperties?: number; + minProperties?: number; + required?: string[]; + dependentRequired?: Record; + const?: Json; + enum?: Json[]; + type?: JsonSchemaType | JsonSchemaType[]; + title?: string; + description?: string; + default?: Json; + deprecated?: boolean; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Json[]; + format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; + contentMediaType?: string; + contentEncoding?: string; + contentSchema?: JsonSchema; +}; + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/v1/index.js b/node_modules/@hyperjump/json-schema/v1/index.js new file mode 100644 index 00000000..3743f600 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/index.js @@ -0,0 +1,116 @@ +import { defineVocabulary, loadDialect } from "../lib/keywords.js"; +import { registerSchema } from "../lib/index.js"; +import "../formats/lite.js"; + +import metaSchema from "./schema.js"; +import coreMetaSchema from "./meta/core.js"; +import applicatorMetaSchema from "./meta/applicator.js"; +import validationMetaSchema from "./meta/validation.js"; +import metaDataMetaSchema from "./meta/meta-data.js"; +import formatMetaSchema from "./meta/format.js"; +import contentMetaSchema from "./meta/content.js"; +import unevaluatedMetaSchema from "./meta/unevaluated.js"; + + +defineVocabulary("https://json-schema.org/v1/vocab/core", { + "$anchor": "https://json-schema.org/keyword/anchor", + "$comment": "https://json-schema.org/keyword/comment", + "$defs": "https://json-schema.org/keyword/definitions", + "$dynamicAnchor": "https://json-schema.org/keyword/dynamicAnchor", + "$dynamicRef": "https://json-schema.org/keyword/dynamicRef", + "$id": "https://json-schema.org/keyword/id", + "$ref": "https://json-schema.org/keyword/ref", + "$vocabulary": "https://json-schema.org/keyword/vocabulary" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/applicator", { + "additionalProperties": "https://json-schema.org/keyword/additionalProperties", + "allOf": "https://json-schema.org/keyword/allOf", + "anyOf": "https://json-schema.org/keyword/anyOf", + "contains": "https://json-schema.org/keyword/contains", + "minContains": "https://json-schema.org/keyword/minContains", + "maxContains": "https://json-schema.org/keyword/maxContains", + "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", + "if": "https://json-schema.org/keyword/if", + "then": "https://json-schema.org/keyword/then", + "else": "https://json-schema.org/keyword/else", + "conditional": "https://json-schema.org/keyword/conditional", + "items": "https://json-schema.org/keyword/items", + "itemPattern": "https://json-schema.org/keyword/itemPattern", + "not": "https://json-schema.org/keyword/not", + "oneOf": "https://json-schema.org/keyword/oneOf", + "patternProperties": "https://json-schema.org/keyword/patternProperties", + "prefixItems": "https://json-schema.org/keyword/prefixItems", + "properties": "https://json-schema.org/keyword/properties", + "propertyDependencies": "https://json-schema.org/keyword/propertyDependencies", + "propertyNames": "https://json-schema.org/keyword/propertyNames" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/validation", { + "const": "https://json-schema.org/keyword/const", + "dependentRequired": "https://json-schema.org/keyword/dependentRequired", + "enum": "https://json-schema.org/keyword/enum", + "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", + "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", + "maxItems": "https://json-schema.org/keyword/maxItems", + "maxLength": "https://json-schema.org/keyword/maxLength", + "maxProperties": "https://json-schema.org/keyword/maxProperties", + "maximum": "https://json-schema.org/keyword/maximum", + "minItems": "https://json-schema.org/keyword/minItems", + "minLength": "https://json-schema.org/keyword/minLength", + "minProperties": "https://json-schema.org/keyword/minProperties", + "minimum": "https://json-schema.org/keyword/minimum", + "multipleOf": "https://json-schema.org/keyword/multipleOf", + "requireAllExcept": "https://json-schema.org/keyword/requireAllExcept", + "pattern": "https://json-schema.org/keyword/pattern", + "required": "https://json-schema.org/keyword/required", + "type": "https://json-schema.org/keyword/type", + "uniqueItems": "https://json-schema.org/keyword/uniqueItems" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/meta-data", { + "default": "https://json-schema.org/keyword/default", + "deprecated": "https://json-schema.org/keyword/deprecated", + "description": "https://json-schema.org/keyword/description", + "examples": "https://json-schema.org/keyword/examples", + "readOnly": "https://json-schema.org/keyword/readOnly", + "title": "https://json-schema.org/keyword/title", + "writeOnly": "https://json-schema.org/keyword/writeOnly" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/format", { + "format": "https://json-schema.org/keyword/format" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/content", { + "contentEncoding": "https://json-schema.org/keyword/contentEncoding", + "contentMediaType": "https://json-schema.org/keyword/contentMediaType", + "contentSchema": "https://json-schema.org/keyword/contentSchema" +}); + +defineVocabulary("https://json-schema.org/v1/vocab/unevaluated", { + "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", + "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" +}); + +const dialectId = "https://json-schema.org/v1"; +loadDialect(dialectId, { + "https://json-schema.org/v1/vocab/core": true, + "https://json-schema.org/v1/vocab/applicator": true, + "https://json-schema.org/v1/vocab/validation": true, + "https://json-schema.org/v1/vocab/meta-data": true, + "https://json-schema.org/v1/vocab/format": true, + "https://json-schema.org/v1/vocab/content": true, + "https://json-schema.org/v1/vocab/unevaluated": true +}); + +registerSchema(metaSchema, dialectId); +registerSchema(coreMetaSchema, "https://json-schema.org/v1/meta/core"); +registerSchema(applicatorMetaSchema, "https://json-schema.org/v1/meta/applicator"); +registerSchema(validationMetaSchema, "https://json-schema.org/v1/meta/validation"); +registerSchema(metaDataMetaSchema, "https://json-schema.org/v1/meta/meta-data"); +registerSchema(formatMetaSchema, "https://json-schema.org/v1/meta/format"); +registerSchema(contentMetaSchema, "https://json-schema.org/v1/meta/content"); +registerSchema(unevaluatedMetaSchema, "https://json-schema.org/v1/meta/unevaluated"); + +export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/applicator.js b/node_modules/@hyperjump/json-schema/v1/meta/applicator.js new file mode 100644 index 00000000..47aabb2e --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/applicator.js @@ -0,0 +1,73 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Applicator vocabulary meta-schema", + + "properties": { + "prefixItems": { "$ref": "#/$defs/schemaArray" }, + "items": { "$dynamicRef": "meta" }, + "contains": { "$dynamicRef": "meta" }, + "itemPattern": { "$ref": "#/$defs/itemPattern" }, + "additionalProperties": { "$dynamicRef": "meta" }, + "properties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" } + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" }, + "propertyNames": { "format": "regex" } + }, + "dependentSchemas": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" } + }, + "propertyDependencies": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" } + } + }, + "propertyNames": { "$dynamicRef": "meta" }, + "if": { "$dynamicRef": "meta" }, + "then": { "$dynamicRef": "meta" }, + "else": { "$dynamicRef": "meta" }, + "conditional": { + "type": "array", + "items": { + "if": { "type": "array" }, + "then": { + "items": { "$dynamicRef": "meta" } + }, + "else": { "$dynamicRef": "meta" } + } + }, + "allOf": { "$ref": "#/$defs/schemaArray" }, + "anyOf": { "$ref": "#/$defs/schemaArray" }, + "oneOf": { "$ref": "#/$defs/schemaArray" }, + "not": { "$dynamicRef": "meta" } + }, + + "$defs": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$dynamicRef": "meta" } + }, + "itemPattern": { + "type": "array", + "itemPattern": [ + [ + { + "if": { "type": "array" }, + "then": { "$ref": "#/$defs/itemPattern" }, + "else": { "$dynamicRef": "meta" } + }, + { "enum": ["?", "*", "+"] }, "?", + "|", + { "const": "|" } + ], "*" + ] + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/content.js b/node_modules/@hyperjump/json-schema/v1/meta/content.js new file mode 100644 index 00000000..13d81dde --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/content.js @@ -0,0 +1,10 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Content vocabulary meta-schema", + + "properties": { + "contentMediaType": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "contentSchema": { "$dynamicRef": "meta" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/core.js b/node_modules/@hyperjump/json-schema/v1/meta/core.js new file mode 100644 index 00000000..10380051 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/core.js @@ -0,0 +1,50 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Core vocabulary meta-schema", + + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference", + "$comment": "Non-empty fragments not allowed.", + "pattern": "^[^#]*#?$" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$anchor": { "$ref": "#/$defs/anchor" }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$dynamicRef": { + "type": "string", + "pattern": "^#?[A-Za-z_][-A-Za-z0-9._]*$" + }, + "$dynamicAnchor": { "$ref": "#/$defs/anchor" }, + "$vocabulary": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "$comment": { "type": "string" }, + "$defs": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" } + } + }, + + "$defs": { + "anchor": { + "type": "string", + "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/format.js b/node_modules/@hyperjump/json-schema/v1/meta/format.js new file mode 100644 index 00000000..1b4afb96 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/format.js @@ -0,0 +1,8 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Format vocabulary meta-schema", + + "properties": { + "format": { "type": "string" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js b/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js new file mode 100644 index 00000000..9cdd1e0a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js @@ -0,0 +1,14 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Meta-data vocabulary meta-schema", + + "properties": { + "title": { "type": "string" }, + "description": { "type": "string" }, + "default": true, + "deprecated": { "type": "boolean" }, + "readOnly": { "type": "boolean" }, + "writeOnly": { "type": "boolean" }, + "examples": { "type": "array" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js b/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js new file mode 100644 index 00000000..d65d3723 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js @@ -0,0 +1,9 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Unevaluated applicator vocabulary meta-schema", + + "properties": { + "unevaluatedItems": { "$dynamicRef": "meta" }, + "unevaluatedProperties": { "$dynamicRef": "meta" } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/validation.js b/node_modules/@hyperjump/json-schema/v1/meta/validation.js new file mode 100644 index 00000000..c04e7ce6 --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/meta/validation.js @@ -0,0 +1,65 @@ +export default { + "$schema": "https://json-schema.org/v1", + "title": "Validation vocabulary meta-schema", + + "properties": { + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { "type": "number" }, + "exclusiveMaximum": { "type": "number" }, + "minimum": { "type": "number" }, + "exclusiveMinimum": { "type": "number" }, + "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "minLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "minItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "uniqueItems": { "type": "boolean" }, + "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "minContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "minProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "required": { "$ref": "#/$defs/stringArray" }, + "optional": { "$ref": "#/$defs/stringArray" }, + "dependentRequired": { + "type": "object", + "additionalProperties": { "$ref": "#/$defs/stringArray" } + }, + "const": true, + "enum": { + "type": "array", + "items": true + }, + "type": { + "anyOf": [ + { "$ref": "#/$defs/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/$defs/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + } + }, + + "$defs": { + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "simpleTypes": { + "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true + } + } +}; diff --git a/node_modules/@hyperjump/json-schema/v1/schema.js b/node_modules/@hyperjump/json-schema/v1/schema.js new file mode 100644 index 00000000..189e2e5a --- /dev/null +++ b/node_modules/@hyperjump/json-schema/v1/schema.js @@ -0,0 +1,24 @@ +export default { + "$schema": "https://json-schema.org/v1", + "$vocabulary": { + "https://json-schema.org/v1/vocab/core": true, + "https://json-schema.org/v1/vocab/applicator": true, + "https://json-schema.org/v1/vocab/unevaluated": true, + "https://json-schema.org/v1/vocab/validation": true, + "https://json-schema.org/v1/vocab/meta-data": true, + "https://json-schema.org/v1/vocab/format": true, + "https://json-schema.org/v1/vocab/content": true + }, + "title": "Core and Validation specifications meta-schema", + + "$dynamicAnchor": "meta", + + "allOf": [ + { "$ref": "/v1/meta/core" }, + { "$ref": "/v1/meta/applicator" }, + { "$ref": "/v1/meta/validation" }, + { "$ref": "/v1/meta/meta-data" }, + { "$ref": "/v1/meta/format" }, + { "$ref": "/v1/meta/content" } + ] +}; diff --git a/node_modules/@hyperjump/pact/LICENSE b/node_modules/@hyperjump/pact/LICENSE new file mode 100644 index 00000000..6e9846cf --- /dev/null +++ b/node_modules/@hyperjump/pact/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/pact/README.md b/node_modules/@hyperjump/pact/README.md new file mode 100644 index 00000000..32c4cf04 --- /dev/null +++ b/node_modules/@hyperjump/pact/README.md @@ -0,0 +1,76 @@ +# Hyperjump Pact + +Hyperjump Pact is a utility library that provides higher order functions for +working with iterators and async iterators. + +## Installation +Designed for node.js (ES Modules, TypeScript) and browsers. + +```bash +npm install @hyperjump/pact --save +``` + +## Usage + +```javascript +import { pipe, range, map, filter, reduce } from "@hyperjump/pact"; + + +const result = pipe( + range(1, 10), + filter((n) => n % 2 === 0), + map((n) => n * 2), + reduce((sum, n) => sum + n, 0) +); +console.log(result); +``` + +```javascript +import { pipe, asyncMap, asyncFilter, asyncReduce } from "@hyperjump/pact"; +// You can alternatively import the async functions without the prefix +// import { pipe, map, filter, reduce } from "@hyperjump/pact/async"; + + +const asyncSequence = async function* () { + yield 1; + yield 2; + yield 3; + yield 4; + yield 5; +}; + +for await (const value of asyncSequence()) { + console.log(value); +} + +const result = await pipe( + asyncSequence(), + asyncFilter((n) => n % 2 === 0), + asyncMap((n) => n * 2), + asyncReduce((sum, n) => sum + n, 0) +); +console.log(result); +``` + +## API + +https://pact.hyperjump.io + +## Contributing + +### Tests + +Run the tests + +```bash +npm test +``` + +Run the tests with a continuous test runner + +```bash +npm test -- --watch +``` + +[hyperjump]: https://github.com/hyperjump-io/browser +[jref]: https://github.com/hyperjump-io/browser/blob/master/src/json-reference/README.md diff --git a/node_modules/@hyperjump/pact/package.json b/node_modules/@hyperjump/pact/package.json new file mode 100644 index 00000000..b478643c --- /dev/null +++ b/node_modules/@hyperjump/pact/package.json @@ -0,0 +1,45 @@ +{ + "name": "@hyperjump/pact", + "version": "1.4.0", + "description": "Higher order functions for iterators and async iterators", + "type": "module", + "main": "./src/index.js", + "exports": { + ".": "./src/index.js", + "./async": "./src/async.js" + }, + "scripts": { + "lint": "eslint src", + "test": "vitest --watch=false", + "type-check": "tsc --noEmit", + "docs": "typedoc --excludeExternals" + }, + "repository": "github:hyperjump-io/pact", + "keywords": [ + "Hyperjump", + "Promise", + "higher order functions", + "iterator", + "async iterator", + "generator", + "async generator", + "async" + ], + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "^22.13.5", + "@typescript-eslint/eslint-plugin": "*", + "@typescript-eslint/parser": "*", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "typedoc": "^0.27.9", + "typescript-eslint": "*", + "vitest": "*" + } +} diff --git a/node_modules/@hyperjump/pact/src/async.js b/node_modules/@hyperjump/pact/src/async.js new file mode 100644 index 00000000..e01e4b43 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/async.js @@ -0,0 +1,24 @@ +export { + asyncMap as map, + asyncTap as tap, + asyncFilter as filter, + asyncScan as scan, + asyncFlatten as flatten, + asyncDrop as drop, + asyncTake as take, + asyncHead as head, + range, + asyncEmpty as empty, + asyncZip as zip, + asyncConcat as concat, + asyncReduce as reduce, + asyncEvery as every, + asyncSome as some, + asyncCount as count, + asyncCollectArray as collectArray, + asyncCollectSet as collectSet, + asyncCollectMap as collectMap, + asyncCollectObject as collectObject, + asyncJoin as join, + pipe +} from "./index.js"; diff --git a/node_modules/@hyperjump/pact/src/curry.d.ts b/node_modules/@hyperjump/pact/src/curry.d.ts new file mode 100644 index 00000000..17ea2fd4 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/curry.d.ts @@ -0,0 +1,13 @@ +export const curry: ( + (curriedFn: (a: A) => (iterable: I) => R) => ( + (a: A, iterable: I) => R + ) & ( + (a: A) => (iterable: I) => R + ) +) & ( + (curriedFn: (a: A, b: B) => (iterable: I) => R) => ( + (a: A, b: B, iterable: I) => R + ) & ( + (a: A, b: B) => (iterable: I) => R + ) +); diff --git a/node_modules/@hyperjump/pact/src/curry.js b/node_modules/@hyperjump/pact/src/curry.js new file mode 100644 index 00000000..862c56f7 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/curry.js @@ -0,0 +1,15 @@ +/** + * @import * as API from "./curry.d.ts" + */ + + +// eslint-disable-next-line @stylistic/no-extra-parens +export const curry = /** @type API.curry */ ((fn) => (...args) => { + /** @typedef {Parameters>[0]} I */ + + const firstApplication = fn.length === 1 + ? /** @type Extract any> */ (fn)(args[0]) + : fn(args[0], args[1]); + const iterable = /** @type I */ (args[fn.length]); // eslint-disable-line @typescript-eslint/no-unsafe-assignment + return iterable === undefined ? firstApplication : firstApplication(iterable); +}); diff --git a/node_modules/@hyperjump/pact/src/index.d.ts b/node_modules/@hyperjump/pact/src/index.d.ts new file mode 100644 index 00000000..2b31bdc6 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/index.d.ts @@ -0,0 +1,443 @@ +import type { LastReturnType } from "./type-utils.d.ts"; + + +/** + * Apply a function to every value in the iterator + */ +export const map: ( + (fn: Mapper, iterator: Iterable) => Generator +) & ( + (fn: Mapper) => (iterator: Iterable) => Generator +); +export type Mapper = (item: A) => B; + +/** + * Same as `map`, but works with AsyncIterables and async mapping functions. + */ +export const asyncMap: ( + (fn: AsyncMapper, iterator: Iterable | AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncMapper) => (iterator: Iterable | AsyncIterable) => AsyncGenerator +); +export type AsyncMapper = (item: A) => Promise | B; + +/** + * Apply a function to every value in the iterator, but yield the original + * value, not the result of the function. + */ +export const tap: ( + (fn: Tapper, iterator: Iterable) => Generator +) & ( + (fn: Tapper) => (iterator: Iterable) => Generator +); +export type Tapper = (item: A) => void; + +/** + * Same as `tap`, but works with AsyncIterables. + */ +export const asyncTap: ( + (fn: AsyncTapper, iterator: AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncTapper) => (iterator: AsyncIterable) => AsyncGenerator +); +export type AsyncTapper = (item: A) => Promise | void; + +/** + * Yields only the values in the iterator that pass the predicate function. + */ +export const filter: ( + (fn: Predicate, iterator: Iterable) => Generator +) & ( + (fn: Predicate) => (iterator: Iterable) => Generator +); +export type Predicate = (item: A) => boolean; + +/** + * Same as `filter`, but works with AsyncIterables and async predicate + * functions. + */ +export const asyncFilter: ( + (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => AsyncGenerator +); +export type AsyncPredicate = (item: A) => Promise | boolean; + +/** + * Same as `reduce` except it emits the accumulated value after each update + */ +export const scan: ( + (fn: Reducer, acc: B, iter: Iterable) => Generator +) & ( + (fn: Reducer, acc: B) => (iter: Iterable) => Generator +); + +/** + * Same as `scan`, but works with AsyncIterables and async predicate + * functions. + */ +export const asyncScan: ( + (fn: AsyncReducer, acc: B, iter: Iterable | AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncReducer, acc: B) => (iter: Iterable | AsyncIterable) => AsyncGenerator +); + +/** + * Yields values from the iterator with all sub-iterator elements concatenated + * into it recursively up to the specified depth. + */ +export const flatten: (iterator: NestedIterable, depth?: number) => Generator>; +export type NestedIterable = Iterable>; + +/** + * Same as `flatten`, but works with AsyncGenerators. + */ +export const asyncFlatten: (iterator: NestedIterable | NestedAsyncIterable, depth?: number) => AsyncGenerator | NestedAsyncIterable>; +export type NestedAsyncIterable = AsyncIterable | NestedIterable>; + +/** + * Yields all the values in the iterator except for the first `n` values. + */ +export const drop: ( + (count: number, iterator: Iterable) => Generator +) & ( + (count: number) => (iterator: Iterable) => Generator +); + +/** + * Same as `drop`, but works with AsyncIterables. + */ +export const asyncDrop: ( + (count: number, iterator: AsyncIterable) => AsyncGenerator +) & ( + (count: number) => (iterator: AsyncIterable) => AsyncGenerator +); + +/** + * Same as `drop` but instead of dropping a specific number of values, it drops + * values until the `fn(value)` is `false` and then yields the remaining values. + */ +export const dropWhile: ( + (fn: Predicate, iterator: Iterable) => Generator +) & ( + (fn: Predicate) => (iterator: Iterable) => Generator +); + +/** + * Same as `dropWhile`, but works with AsyncIterables. + */ +export const asyncDropWhile: ( + (fn: AsyncPredicate, iterator: AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncPredicate) => (iterator: AsyncIterable) => AsyncGenerator +); + +/** + * Yields the first `n` values in the iterator. + */ +export const take: ( + (count: number, iterator: Iterable) => Generator +) & ( + (count: number) => (iterator: Iterable) => Generator +); + +/** + * Same as `take`, but works with AsyncIterables. + */ +export const asyncTake: ( + (count: number, iterator: AsyncIterable) => AsyncGenerator +) & ( + (count: number) => (iterator: AsyncIterable) => AsyncGenerator +); + +/** + * Same as `take` but instead of yielding a specific number of values, it yields + * values as long as the `fn(value)` returns `true` and drops the rest. + */ +export const takeWhile: ( + (fn: Predicate, iterator: Iterable) => Generator +) & ( + (fn: Predicate) => (iterator: Iterable) => Generator +); + +/** + * Same as `takeWhile`, but works with AsyncGenerators. + */ +export const asyncTakeWhile: ( + (fn: AsyncPredicate, iterator: AsyncIterable) => AsyncGenerator +) & ( + (fn: AsyncPredicate) => (iterator: AsyncIterable) => AsyncGenerator +); + +/** + * Returns the first value in the iterator. + */ +export const head: (iterator: Iterable) => A | undefined; + +/** + * Same as `head`, but works with AsyncGenerators. + */ +export const asyncHead: (iterator: AsyncIterable) => Promise; + +/** + * Yields numbers starting from `from` until `to`. If `to` is not passed, the + * iterator will be infinite. + */ +export const range: (from: number, to?: number) => Generator; + +/** + * Yields nothing. + */ +export const empty: () => Generator; + +/** + * Yields nothing asynchronously. + */ +export const asyncEmpty: () => AsyncGenerator; + +/** + * Yields tuples containing a value from each iterator. The iterator will have + * the same length as `iter1`. If `iter1` is longer than `iter2`, the second + * value of the tuple will be undefined. If `iter2` is longer than `iter1`, the + * remaining values in `iter2` will be ignored. + */ +export const zip: (iter1: Iterable, iter2: Iterable) => Generator<[A, B]>; + +/** + * Same as `zip` but works with AsyncIterables. + */ +export const asyncZip: (iter1: AsyncIterable, iter2: AsyncIterable) => AsyncGenerator<[A, B]>; + +/** + * Yields values from each iterator in order. + */ +export const concat: (...iters: Iterable[]) => Generator; + +/** + * Same as `concat` but works with AsyncIterables. + */ +export const asyncConcat: (...iters: (Iterable | AsyncIterable)[]) => AsyncGenerator; + +/** + * Reduce an iterator to a single value. + */ +export const reduce: ( + (fn: Reducer, acc: B, iter: Iterable) => B +) & ( + (fn: Reducer, acc: B) => (iter: Iterable) => B +); +export type Reducer = (acc: B, item: A) => B; + +/** + * Same as `reduce`, but works with AsyncGenerators and async reducer functions. + */ +export const asyncReduce: ( + (fn: AsyncReducer, acc: B, iter: Iterable | AsyncIterable) => Promise +) & ( + (fn: AsyncReducer, acc: B) => (iter: Iterable | AsyncIterable) => Promise +); +export type AsyncReducer = (acc: B, item: A) => Promise | B; + +/** + * Returns a boolean indicating whether or not all values in the iterator passes + * the predicate function. + */ +export const every: ( + (fn: Predicate, iterator: Iterable) => boolean +) & ( + (fn: Predicate) => (iterator: Iterable) => boolean +); + +/** + * Same as `every`, but works with AsyncIterables and async predicate functions. + */ +export const asyncEvery: ( + (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise +) & ( + (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise +); + +/** + * Returns a boolean indicating whether or not there exists a value in the + * iterator that passes the predicate function. + */ +export const some: ( + (fn: Predicate, iterator: Iterable) => boolean +) & ( + (fn: Predicate) => (iterator: Iterable) => boolean +); + +/** + * Same as `some`, but works with AsyncIterables and async predicate functions. + */ +export const asyncSome: ( + (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise +) & ( + (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise +); + +/** + * Returns the first value that passes the predicate function. + */ +export const find: ( + (fn: Predicate, iterator: Iterable) => A +) & ( + (fn: Predicate) => (iterator: Iterable) => A +); + +/** + * Same as `find`, but works with AsyncIterables and async predicate functions. + */ +export const asyncFind: ( + (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise +) & ( + (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise +); + +/** + * Returns the number of items in the iterator. + */ +export const count: (iterator: Iterable) => number; + +/** + * Same as `count`, but works with AsyncIterables. + */ +export const asyncCount: (iterator: AsyncIterable) => Promise; + +/** + * Collect all the items in the iterator into an array. + */ +export const collectArray: (iterator: Iterable) => A[]; + +/** + * Same as `collectArray`, but works with AsyncIterables. + */ +export const asyncCollectArray: (iterator: AsyncIterable) => Promise; + +/** + * Collect all the items in the iterator into a Set. + */ +export const collectSet: (iterator: Iterable) => Set; + +/** + * Same as `collectSet`, but works with AsyncIterables. + */ +export const asyncCollectSet: (iterator: AsyncIterable) => Promise>; + +/** + * Collect all the key/value tuples in the iterator into a Map. + */ +export const collectMap: (iterator: Iterable<[A, B]>) => Map; + +/** + * Same as `collectMap`, but works with AsyncGenerators. + */ +export const asyncCollectMap: (iterator: AsyncIterable<[A, B]>) => Promise>; + +/** + * Collect all the key/value tuples in the iterator into an Object. + */ +export const collectObject: (iterator: Iterable<[string, A]>) => Record; + +/** + * Same as `collectObject`, but works with AsyncGenerators. + */ +export const asyncCollectObject: (iterator: AsyncIterable<[string, A]>) => Promise>; + +/** + * Collect all the items in the iterator into a string separated by the + * separator token. + */ +export const join: ( + (separator: string, iterator: Iterable) => string +) & ( + (separator: string) => (iterator: Iterable) => string +); + +/** + * Same as `join`, but works with AsyncIterables. + */ +export const asyncJoin: ( + (separator: string, iterator: AsyncIterable) => Promise +) & ( + (separator: string) => (iterator: AsyncIterable) => Promise +); + +/** + * Starting with an iterator, apply any number of functions to transform the + * values and return the result. + */ +export const pipe: ( + (initialValue: A, ...fns: [ + (a: A) => B + ]) => B +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C + ]) => C +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D + ]) => D +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (c: D) => E + ]) => E +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F + ]) => F +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F, + (f: F) => G + ]) => G +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F, + (f: F) => G, + (g: G) => H + ]) => H +) & ( + (initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F, + (f: F) => G, + (g: G) => H, + (h: H) => I + ]) => I +) & ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + any)[]>(initialValue: A, ...fns: [ + (a: A) => B, + (b: B) => C, + (c: C) => D, + (d: D) => E, + (e: E) => F, + (f: F) => G, + (g: G) => H, + (h: H) => I, + ...J + ]) => LastReturnType +); diff --git a/node_modules/@hyperjump/pact/src/index.js b/node_modules/@hyperjump/pact/src/index.js new file mode 100644 index 00000000..e7ee8d8c --- /dev/null +++ b/node_modules/@hyperjump/pact/src/index.js @@ -0,0 +1,487 @@ +/** + * @module pact + */ + +import { curry } from "./curry.js"; + +/** + * @import { AsyncIterableItem, IterableItem } from "./type-utils.d.ts" + * @import * as API from "./index.d.ts" + */ + + +/** @type API.map */ +export const map = curry((fn) => function* (iter) { + for (const n of iter) { + yield fn(n); + } +}); + +/** @type API.asyncMap */ +export const asyncMap = curry((fn) => async function* (iter) { + for await (const n of iter) { + yield fn(n); + } +}); + +/** @type API.tap */ +export const tap = curry((fn) => function* (iter) { + for (const n of iter) { + fn(n); + yield n; + } +}); + +/** @type API.asyncTap */ +export const asyncTap = curry((fn) => async function* (iter) { + for await (const n of iter) { + await fn(n); + yield n; + } +}); + +/** @type API.filter */ +export const filter = curry((fn) => function* (iter) { + for (const n of iter) { + if (fn(n)) { + yield n; + } + } +}); + +/** @type API.asyncFilter */ +export const asyncFilter = curry((fn) => async function* (iter) { + for await (const n of iter) { + if (await fn(n)) { + yield n; + } + } +}); + + +export const scan = /** @type API.scan */ (curry( + // eslint-disable-next-line @stylistic/no-extra-parens + /** @type API.scan */ ((fn, acc) => function* (iter) { + for (const item of iter) { + acc = fn(acc, /** @type any */ (item)); + yield acc; + } + }) +)); + + +export const asyncScan = /** @type API.asyncScan */ (curry( + // eslint-disable-next-line @stylistic/no-extra-parens + /** @type API.asyncScan */ ((fn, acc) => async function* (iter) { + for await (const item of iter) { + acc = await fn(acc, /** @type any */ (item)); + yield acc; + } + }) +)); + +/** @type API.flatten */ +export const flatten = function* (iter, depth = 1) { + for (const n of iter) { + if (depth > 0 && n && typeof n === "object" && Symbol.iterator in n) { + yield* flatten(n, depth - 1); + } else { + yield n; + } + } +}; + +/** @type API.asyncFlatten */ +export const asyncFlatten = async function* (iter, depth = 1) { + for await (const n of iter) { + if (depth > 0 && n && typeof n === "object" && (Symbol.asyncIterator in n || Symbol.iterator in n)) { + yield* asyncFlatten(n, depth - 1); + } else { + yield n; + } + } +}; + +/** @type API.drop */ +export const drop = curry((count) => function* (iter) { + let index = 0; + for (const item of iter) { + if (index++ >= count) { + yield item; + } + } +}); + +/** @type API.asyncDrop */ +export const asyncDrop = curry((count) => async function* (iter) { + let index = 0; + for await (const item of iter) { + if (index++ >= count) { + yield item; + } + } +}); + +/** @type API.dropWhile */ +export const dropWhile = curry((fn) => function* (iter) { + let dropping = true; + for (const n of iter) { + if (dropping) { + if (fn(n)) { + continue; + } else { + dropping = false; + } + } + + yield n; + } +}); + +/** @type API.asyncDropWhile */ +export const asyncDropWhile = curry((fn) => async function* (iter) { + let dropping = true; + for await (const n of iter) { + if (dropping) { + if (await fn(n)) { + continue; + } else { + dropping = false; + } + } + + yield n; + } +}); + +/** @type API.take */ +export const take = curry((count) => function* (iter) { + const iterator = getIterator(iter); + + let current; + while (count-- > 0 && !(current = iterator.next())?.done) { + yield current.value; + } +}); + +/** @type API.asyncTake */ +export const asyncTake = curry((count) => async function* (iter) { + const iterator = getAsyncIterator(iter); + + let current; + while (count-- > 0 && !(current = await iterator.next())?.done) { + yield current.value; + } +}); + +/** @type API.takeWhile */ +export const takeWhile = curry((fn) => function* (iter) { + for (const n of iter) { + if (fn(n)) { + yield n; + } else { + break; + } + } +}); + +/** @type API.asyncTakeWhile */ +export const asyncTakeWhile = curry((fn) => async function* (iter) { + for await (const n of iter) { + if (await fn(n)) { + yield n; + } else { + break; + } + } +}); + +/** @type API.head */ +export const head = (iter) => { + const iterator = getIterator(iter); + const result = iterator.next(); + + return result.done ? undefined : result.value; +}; + +/** @type API.asyncHead */ +export const asyncHead = async (iter) => { + const iterator = getAsyncIterator(iter); + const result = await iterator.next(); + + return result.done ? undefined : result.value; +}; + +/** @type API.range */ +export const range = function* (from, to) { + for (let n = from; to === undefined || n < to; n++) { + yield n; + } +}; + +/** @type API.empty */ +export const empty = function* () {}; + +/** @type API.asyncEmpty */ +export const asyncEmpty = async function* () {}; + +/** @type API.zip */ +export const zip = function* (a, b) { + const bIter = getIterator(b); + for (const item1 of a) { + yield [item1, bIter.next().value]; + } +}; + +/** @type API.asyncZip */ +export const asyncZip = async function* (a, b) { + const bIter = getAsyncIterator(b); + for await (const item1 of a) { + yield [item1, (await bIter.next()).value]; + } +}; + +/** @type API.concat */ +export const concat = function* (...iters) { + for (const iter of iters) { + yield* iter; + } +}; + +/** @type API.asyncConcat */ +export const asyncConcat = async function* (...iters) { + for (const iter of iters) { + yield* iter; + } +}; + +export const reduce = /** @type API.reduce */ (curry( + // eslint-disable-next-line @stylistic/no-extra-parens + /** @type API.reduce */ ((fn, acc) => (iter) => { + for (const item of iter) { + acc = fn(acc, /** @type any */ (item)); + } + + return acc; + }) +)); + + +export const asyncReduce = /** @type API.asyncReduce */ (curry( + // eslint-disable-next-line @stylistic/no-extra-parens + /** @type API.asyncReduce */ ((fn, acc) => async (iter) => { + for await (const item of iter) { + acc = await fn(acc, /** @type any */ (item)); + } + + return acc; + }) +)); + +/** @type API.every */ +export const every = curry((fn) => (iter) => { + for (const item of iter) { + if (!fn(item)) { + return false; + } + } + + return true; +}); + +/** @type API.asyncEvery */ +export const asyncEvery = curry((fn) => async (iter) => { + for await (const item of iter) { + if (!await fn(item)) { + return false; + } + } + + return true; +}); + +/** @type API.some */ +export const some = curry((fn) => (iter) => { + for (const item of iter) { + if (fn(item)) { + return true; + } + } + + return false; +}); + +/** @type API.asyncSome */ +export const asyncSome = curry((fn) => async (iter) => { + for await (const item of iter) { + if (await fn(item)) { + return true; + } + } + + return false; +}); + +/** @type API.find */ +export const find = curry((fn) => (iter) => { + for (const item of iter) { + if (fn(item)) { + return item; + } + } +}); + +/** @type API.asyncFind */ +export const asyncFind = curry((fn) => async (iter) => { + for await (const item of iter) { + if (await fn(item)) { + return item; + } + } +}); + +/** @type API.count */ +export const count = (iter) => reduce((count) => count + 1, 0, iter); + +/** @type API.asyncCount */ +export const asyncCount = (iter) => asyncReduce((count) => count + 1, 0, iter); + +/** @type API.collectArray */ +export const collectArray = (iter) => [...iter]; + +/** @type API.asyncCollectArray */ +export const asyncCollectArray = async (iter) => { + const result = []; + for await (const item of iter) { + result.push(item); + } + + return result; +}; + +/** @type API.collectSet */ +export const collectSet = (iter) => { + /** @type Set> */ + const result = new Set(); + for (const item of iter) { + result.add(item); + } + + return result; +}; + +/** @type API.asyncCollectSet */ +export const asyncCollectSet = async (iter) => { + /** @type Set> */ + const result = new Set(); + for await (const item of iter) { + result.add(item); + } + + return result; +}; + +/** @type API.collectMap */ +export const collectMap = (iter) => { + /** @typedef {IterableItem[0]} K */ + /** @typedef {IterableItem[1]} V */ + + /** @type Map */ + const result = new Map(); + for (const [key, value] of iter) { + result.set(key, value); + } + + return result; +}; + +/** @type API.asyncCollectMap */ +export const asyncCollectMap = async (iter) => { + /** @typedef {AsyncIterableItem[0]} K */ + /** @typedef {AsyncIterableItem[1]} V */ + + /** @type Map */ + const result = new Map(); + for await (const [key, value] of iter) { + result.set(key, value); + } + + return result; +}; + +/** @type API.collectObject */ +export const collectObject = (iter) => { + /** @typedef {IterableItem[1]} V */ + + /** @type Record */ + const result = Object.create(null); // eslint-disable-line @typescript-eslint/no-unsafe-assignment + for (const [key, value] of iter) { + result[key] = value; + } + + return result; +}; + +/** @type API.asyncCollectObject */ +export const asyncCollectObject = async (iter) => { + /** @typedef {AsyncIterableItem[1]} V */ + + /** @type Record */ + const result = Object.create(null); // eslint-disable-line @typescript-eslint/no-unsafe-assignment + for await (const [key, value] of iter) { + result[key] = value; + } + + return result; +}; + +/** @type API.join */ +export const join = curry((separator) => (iter) => { + let result = head(iter) ?? ""; + + for (const n of iter) { + result += separator + n; + } + + return result; +}); + +/** @type API.asyncJoin */ +export const asyncJoin = curry((separator) => async (iter) => { + let result = await asyncHead(iter) ?? ""; + + for await (const n of iter) { + result += separator + n; + } + + return result; +}); + +/** @type (iter: Iterable) => Iterator */ +const getIterator = (iter) => { + if (typeof iter?.[Symbol.iterator] === "function") { + return iter[Symbol.iterator](); + } else { + throw TypeError("`iter` is not iterable"); + } +}; + +/** @type (iter: Iterable | AsyncIterable) => AsyncIterator */ +const getAsyncIterator = (iter) => { + if (Symbol.asyncIterator in iter && typeof iter[Symbol.asyncIterator] === "function") { + return iter[Symbol.asyncIterator](); + } else if (Symbol.iterator in iter && typeof iter[Symbol.iterator] === "function") { + return asyncMap((a) => a, iter); + } else { + throw TypeError("`iter` is not iterable"); + } +}; + +/** @type API.pipe */ +// eslint-disable-next-line @stylistic/no-extra-parens +export const pipe = /** @type (acc: any, ...fns: ((a: any) => any)[]) => any */ ( + (acc, ...fns) => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return reduce((acc, fn) => fn(acc), acc, fns); + } +); diff --git a/node_modules/@hyperjump/pact/src/type-utils.d.ts b/node_modules/@hyperjump/pact/src/type-utils.d.ts new file mode 100644 index 00000000..b808ebc1 --- /dev/null +++ b/node_modules/@hyperjump/pact/src/type-utils.d.ts @@ -0,0 +1,5 @@ +export type IterableItem = T extends Iterable ? U : never; +export type AsyncIterableItem = T extends AsyncIterable ? U : never; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type LastReturnType any)[]> = T extends [...any, (...args: any) => infer R] ? R : never; diff --git a/node_modules/@hyperjump/uri/LICENSE b/node_modules/@hyperjump/uri/LICENSE new file mode 100644 index 00000000..6e9846cf --- /dev/null +++ b/node_modules/@hyperjump/uri/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Hyperjump Software, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@hyperjump/uri/README.md b/node_modules/@hyperjump/uri/README.md new file mode 100644 index 00000000..79bfc451 --- /dev/null +++ b/node_modules/@hyperjump/uri/README.md @@ -0,0 +1,129 @@ +# URI +A small and fast library for validating, parsing, and resolving URIs +([RFC 3986](https://www.rfc-editor.org/rfc/rfc3986)) and IRIs +([RFC 3987](https://www.rfc-editor.org/rfc/rfc3987)). + +## Install +Designed for node.js (ES Modules, TypeScript) and browsers. + +``` +npm install @hyperjump/uri +``` + +## Usage +```javascript +import { resolveUri, parseUri, isUri, isIri } from "@hyperjump/uri" + +const resolved = resolveUri("foo/bar", "http://example.com/aaa/bbb"); // https://example.com/aaa/foo/bar + +const components = parseUri("https://jason@example.com:80/foo?bar#baz"); // { +// scheme: "https", +// authority: "jason@example.com:80", +// userinfo: "jason", +// host: "example.com", +// port: "80", +// path: "/foo", +// query: "bar", +// fragment: "baz" +// } + +const a = isUri("http://examplé.org/rosé#"); // false +const a = isIri("http://examplé.org/rosé#"); // true +``` + +## API +### Resolve Relative References +These functions resolve relative-references against a base URI/IRI. The base +URI/IRI must be absolute, meaning it must have a scheme (`https`) and no +fragment (`#foo`). The resolution process will [normalize](#normalize) the +result. + +* **resolveUri**: (uriReference: string, baseUri: string) => string +* **resolveIri**: (iriReference: string, baseIri: string) => string + +### Normalize +These functions apply the following normalization rules. +1. Decode any unnecessarily percent-encoded characters. +2. Convert any lowercase characters in the hex numbers of percent-encoded + characters to uppercase. +3. Resolve and remove any dot-segments (`/.`, `/..`) in paths. +4. Convert the scheme to lowercase. +5. Convert the authority to lowercase. + +* **normalizeUri**: (uri: string) => string +* **normalizeIri**: (iri: string) => string + +### To Relative +These functions convert a non-relative URI/IRI into a relative URI/IRI given a +base. + +* **toRelativeUri**: (uri: string, relativeTo: string) => string +* **toRelativeIri**: (iri: string, relativeTo: string) => string + +### URI +A [URI](https://www.rfc-editor.org/rfc/rfc3986#section-3) is not relative and +may include a fragment. + +* **isUri**: (value: string) => boolean +* **parseUri**: (value: string) => IdentifierComponents +* **toAbsoluteUri**: (value: string) => string + + Takes a URI and strips its fragment component if it exists. + +### URI-Reference +A [URI-reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.1) may be +relative. + +* **isUriReference**: (value: string) => boolean +* **parseUriReference**: (value: string) => IdentifierComponents + +### absolute-URI +An [absolute-URI](https://www.rfc-editor.org/rfc/rfc3986#section-4.3) is not +relative an does not include a fragment. + +* **isAbsoluteUri**: (value: string) => boolean +* **parseAbsoluteUri**: (value: string) => IdentifierComponents + +### IRI +An IRI is not relative and may include a fragment. + +* **isIri**: (value: string) => boolean +* **parseIri**: (value: string) => IdentifierComponents +* **toAbsoluteIri**: (value: string) => string + + Takes an IRI and strips its fragment component if it exists. + +### IRI-reference +An IRI-reference may be relative. + +* **isIriReference**: (value: string) => boolean +* **parseIriReference**: (value: string) => IdentifierComponents + +### absolute-IRI +An absolute-IRI is not relative an does not include a fragment. + +* **isAbsoluteIri**: (value: string) => boolean +* **parseAbsoluteIri**: (value: string) => IdentifierComponents + +### Types +* **IdentifierComponents** + * **scheme**: string + * **authority**: string + * **userinfo**: string + * **host**: string + * **port**: string + * **path**: string + * **query**: string + * **fragment**: string + +## Contributing +### Tests +Run the tests +``` +npm test +``` + +Run the tests with a continuous test runner +``` +npm test -- --watch +``` diff --git a/node_modules/@hyperjump/uri/package.json b/node_modules/@hyperjump/uri/package.json new file mode 100644 index 00000000..f2753292 --- /dev/null +++ b/node_modules/@hyperjump/uri/package.json @@ -0,0 +1,39 @@ +{ + "name": "@hyperjump/uri", + "version": "1.3.2", + "description": "A small and fast library for validating parsing and resolving URIs and IRIs", + "type": "module", + "main": "./lib/index.js", + "exports": "./lib/index.js", + "scripts": { + "lint": "eslint lib", + "test": "vitest --watch=false", + "type-check": "tsc --noEmit" + }, + "repository": "github:hyperjump-io/uri", + "author": "Jason Desrosiers ", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "keywords": [ + "URI", + "IRI", + "resolve", + "relative", + "parse", + "RFC3986", + "RFC-3986", + "RFC3987", + "RFC-3987" + ], + "devDependencies": { + "@stylistic/eslint-plugin": "*", + "@types/node": "^22.13.0", + "eslint-import-resolver-typescript": "*", + "eslint-plugin-import": "*", + "typescript-eslint": "*", + "vitest": "*" + } +} diff --git a/node_modules/content-type/HISTORY.md b/node_modules/content-type/HISTORY.md new file mode 100644 index 00000000..45836713 --- /dev/null +++ b/node_modules/content-type/HISTORY.md @@ -0,0 +1,29 @@ +1.0.5 / 2023-01-29 +================== + + * perf: skip value escaping when unnecessary + +1.0.4 / 2017-09-11 +================== + + * perf: skip parameter parsing when no parameters + +1.0.3 / 2017-09-10 +================== + + * perf: remove argument reassignment + +1.0.2 / 2016-05-09 +================== + + * perf: enable strict mode + +1.0.1 / 2015-02-13 +================== + + * Improve missing `Content-Type` header error message + +1.0.0 / 2015-02-01 +================== + + * Initial implementation, derived from `media-typer@0.3.0` diff --git a/node_modules/content-type/LICENSE b/node_modules/content-type/LICENSE new file mode 100644 index 00000000..34b1a2de --- /dev/null +++ b/node_modules/content-type/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/content-type/README.md b/node_modules/content-type/README.md new file mode 100644 index 00000000..c1a922a9 --- /dev/null +++ b/node_modules/content-type/README.md @@ -0,0 +1,94 @@ +# content-type + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +Create and parse HTTP Content-Type header according to RFC 7231 + +## Installation + +```sh +$ npm install content-type +``` + +## API + +```js +var contentType = require('content-type') +``` + +### contentType.parse(string) + +```js +var obj = contentType.parse('image/svg+xml; charset=utf-8') +``` + +Parse a `Content-Type` header. This will return an object with the following +properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): + + - `type`: The media type (the type and subtype, always lower case). + Example: `'image/svg+xml'` + + - `parameters`: An object of the parameters in the media type (name of parameter + always lower case). Example: `{charset: 'utf-8'}` + +Throws a `TypeError` if the string is missing or invalid. + +### contentType.parse(req) + +```js +var obj = contentType.parse(req) +``` + +Parse the `Content-Type` header from the given `req`. Short-cut for +`contentType.parse(req.headers['content-type'])`. + +Throws a `TypeError` if the `Content-Type` header is missing or invalid. + +### contentType.parse(res) + +```js +var obj = contentType.parse(res) +``` + +Parse the `Content-Type` header set on the given `res`. Short-cut for +`contentType.parse(res.getHeader('content-type'))`. + +Throws a `TypeError` if the `Content-Type` header is missing or invalid. + +### contentType.format(obj) + +```js +var str = contentType.format({ + type: 'image/svg+xml', + parameters: { charset: 'utf-8' } +}) +``` + +Format an object into a `Content-Type` header. This will return a string of the +content type for the given object with the following properties (examples are +shown that produce the string `'image/svg+xml; charset=utf-8'`): + + - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'` + + - `parameters`: An object of the parameters in the media type (name of the + parameter will be lower-cased). Example: `{charset: 'utf-8'}` + +Throws a `TypeError` if the object contains an invalid type or parameter names. + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/content-type/master?label=ci +[ci-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/content-type/master +[coveralls-url]: https://coveralls.io/r/jshttp/content-type?branch=master +[node-image]: https://badgen.net/npm/node/content-type +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/content-type +[npm-url]: https://npmjs.org/package/content-type +[npm-version-image]: https://badgen.net/npm/v/content-type diff --git a/node_modules/content-type/index.js b/node_modules/content-type/index.js new file mode 100644 index 00000000..41840e7b --- /dev/null +++ b/node_modules/content-type/index.js @@ -0,0 +1,225 @@ +/*! + * content-type + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 + * + * parameter = token "=" ( token / quoted-string ) + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + * / DIGIT / ALPHA + * ; any VCHAR, except delimiters + * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE + * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text + * obs-text = %x80-FF + * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) + */ +var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g // eslint-disable-line no-control-regex +var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ // eslint-disable-line no-control-regex +var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ + +/** + * RegExp to match quoted-pair in RFC 7230 sec 3.2.6 + * + * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) + * obs-text = %x80-FF + */ +var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g // eslint-disable-line no-control-regex + +/** + * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6 + */ +var QUOTE_REGEXP = /([\\"])/g + +/** + * RegExp to match type in RFC 7231 sec 3.1.1.1 + * + * media-type = type "/" subtype + * type = token + * subtype = token + */ +var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ + +/** + * Module exports. + * @public + */ + +exports.format = format +exports.parse = parse + +/** + * Format object to media type. + * + * @param {object} obj + * @return {string} + * @public + */ + +function format (obj) { + if (!obj || typeof obj !== 'object') { + throw new TypeError('argument obj is required') + } + + var parameters = obj.parameters + var type = obj.type + + if (!type || !TYPE_REGEXP.test(type)) { + throw new TypeError('invalid type') + } + + var string = type + + // append parameters + if (parameters && typeof parameters === 'object') { + var param + var params = Object.keys(parameters).sort() + + for (var i = 0; i < params.length; i++) { + param = params[i] + + if (!TOKEN_REGEXP.test(param)) { + throw new TypeError('invalid parameter name') + } + + string += '; ' + param + '=' + qstring(parameters[param]) + } + } + + return string +} + +/** + * Parse media type to object. + * + * @param {string|object} string + * @return {Object} + * @public + */ + +function parse (string) { + if (!string) { + throw new TypeError('argument string is required') + } + + // support req/res-like objects as argument + var header = typeof string === 'object' + ? getcontenttype(string) + : string + + if (typeof header !== 'string') { + throw new TypeError('argument string is required to be a string') + } + + var index = header.indexOf(';') + var type = index !== -1 + ? header.slice(0, index).trim() + : header.trim() + + if (!TYPE_REGEXP.test(type)) { + throw new TypeError('invalid media type') + } + + var obj = new ContentType(type.toLowerCase()) + + // parse parameters + if (index !== -1) { + var key + var match + var value + + PARAM_REGEXP.lastIndex = index + + while ((match = PARAM_REGEXP.exec(header))) { + if (match.index !== index) { + throw new TypeError('invalid parameter format') + } + + index += match[0].length + key = match[1].toLowerCase() + value = match[2] + + if (value.charCodeAt(0) === 0x22 /* " */) { + // remove quotes + value = value.slice(1, -1) + + // remove escapes + if (value.indexOf('\\') !== -1) { + value = value.replace(QESC_REGEXP, '$1') + } + } + + obj.parameters[key] = value + } + + if (index !== header.length) { + throw new TypeError('invalid parameter format') + } + } + + return obj +} + +/** + * Get content-type from req/res objects. + * + * @param {object} + * @return {Object} + * @private + */ + +function getcontenttype (obj) { + var header + + if (typeof obj.getHeader === 'function') { + // res-like + header = obj.getHeader('content-type') + } else if (typeof obj.headers === 'object') { + // req-like + header = obj.headers && obj.headers['content-type'] + } + + if (typeof header !== 'string') { + throw new TypeError('content-type header is missing from object') + } + + return header +} + +/** + * Quote a string if necessary. + * + * @param {string} val + * @return {string} + * @private + */ + +function qstring (val) { + var str = String(val) + + // no need to quote tokens + if (TOKEN_REGEXP.test(str)) { + return str + } + + if (str.length > 0 && !TEXT_REGEXP.test(str)) { + throw new TypeError('invalid parameter value') + } + + return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' +} + +/** + * Class to represent a content type. + * @private + */ +function ContentType (type) { + this.parameters = Object.create(null) + this.type = type +} diff --git a/node_modules/content-type/package.json b/node_modules/content-type/package.json new file mode 100644 index 00000000..9db19f63 --- /dev/null +++ b/node_modules/content-type/package.json @@ -0,0 +1,42 @@ +{ + "name": "content-type", + "description": "Create and parse HTTP Content-Type header", + "version": "1.0.5", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "content-type", + "http", + "req", + "res", + "rfc7231" + ], + "repository": "jshttp/content-type", + "devDependencies": { + "deep-equal": "1.0.1", + "eslint": "8.32.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.27.5", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "6.1.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "10.2.0", + "nyc": "15.1.0" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/node_modules/idn-hostname/#/tests/0/0.json b/node_modules/idn-hostname/#/tests/0/0.json new file mode 100644 index 00000000..29be3a6e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/0.json @@ -0,0 +1,5 @@ +{ + "description": "valid internationalized hostname", + "data": "例子.测试", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/1.json b/node_modules/idn-hostname/#/tests/0/1.json new file mode 100644 index 00000000..52473165 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/1.json @@ -0,0 +1,5 @@ +{ + "description": "valid hostname with mixed scripts", + "data": "xn--fsqu00a.xn--0zwm56d", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/10.json b/node_modules/idn-hostname/#/tests/0/10.json new file mode 100644 index 00000000..12c8a6a7 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/10.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with segment longer than 63 chars", + "data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.example.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/11.json b/node_modules/idn-hostname/#/tests/0/11.json new file mode 100644 index 00000000..0ca8d8bc --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/11.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with more than 255 characters", + "data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/12.json b/node_modules/idn-hostname/#/tests/0/12.json new file mode 100644 index 00000000..17a459c2 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/12.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with trailing dot", + "data": "example.com.", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/13.json b/node_modules/idn-hostname/#/tests/0/13.json new file mode 100644 index 00000000..48d0662d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/13.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with leading dot", + "data": ".example.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/14.json b/node_modules/idn-hostname/#/tests/0/14.json new file mode 100644 index 00000000..157d272b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/14.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with consecutive dots", + "data": "example..com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/15.json b/node_modules/idn-hostname/#/tests/0/15.json new file mode 100644 index 00000000..8cf58357 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/15.json @@ -0,0 +1,5 @@ +{ + "description": "valid hostname with single segment (no TLD)", + "data": "localhost", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/16.json b/node_modules/idn-hostname/#/tests/0/16.json new file mode 100644 index 00000000..080d12fd --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/16.json @@ -0,0 +1,5 @@ +{ + "description": "a valid host name (example.test in Hangul)", + "data": "실례.테스트", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/17.json b/node_modules/idn-hostname/#/tests/0/17.json new file mode 100644 index 00000000..eaa73f4f --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/17.json @@ -0,0 +1,5 @@ +{ + "description": "illegal first char U+302E Hangul single dot tone mark", + "data": "〮실례.테스트", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/18.json b/node_modules/idn-hostname/#/tests/0/18.json new file mode 100644 index 00000000..aead92cc --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/18.json @@ -0,0 +1,5 @@ +{ + "description": "contains illegal char U+302E Hangul single dot tone mark", + "data": "실〮례.테스트", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/19.json b/node_modules/idn-hostname/#/tests/0/19.json new file mode 100644 index 00000000..a736381a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/19.json @@ -0,0 +1,5 @@ +{ + "description": "a host name with a component too long", + "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/2.json b/node_modules/idn-hostname/#/tests/0/2.json new file mode 100644 index 00000000..5478ea8a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/2.json @@ -0,0 +1,5 @@ +{ + "description": "valid hostname with alphanumeric characters and hyphens", + "data": "sub-example.example.com", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/20.json b/node_modules/idn-hostname/#/tests/0/20.json new file mode 100644 index 00000000..4b51d1c9 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/20.json @@ -0,0 +1,6 @@ +{ + "description": "invalid label, correct Punycode", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc3492#section-7.1", + "data": "-> $1.00 <--", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/21.json b/node_modules/idn-hostname/#/tests/0/21.json new file mode 100644 index 00000000..c1067bff --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/21.json @@ -0,0 +1,6 @@ +{ + "description": "valid Chinese Punycode", + "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4", + "data": "xn--ihqwcrb4cv8a8dqg056pqjye", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/22.json b/node_modules/idn-hostname/#/tests/0/22.json new file mode 100644 index 00000000..488f177d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/22.json @@ -0,0 +1,6 @@ +{ + "description": "invalid Punycode", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", + "data": "xn--X", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/23.json b/node_modules/idn-hostname/#/tests/0/23.json new file mode 100644 index 00000000..88390d45 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/23.json @@ -0,0 +1,6 @@ +{ + "description": "U-label contains \"--\" after the 3rd and 4th position", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", + "data": "XN--a--aaaa", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/24.json b/node_modules/idn-hostname/#/tests/0/24.json new file mode 100644 index 00000000..cf2ceddd --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/24.json @@ -0,0 +1,6 @@ +{ + "description": "U-label starts with a dash", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", + "data": "-hello", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/25.json b/node_modules/idn-hostname/#/tests/0/25.json new file mode 100644 index 00000000..499915b1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/25.json @@ -0,0 +1,6 @@ +{ + "description": "U-label ends with a dash", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", + "data": "hello-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/26.json b/node_modules/idn-hostname/#/tests/0/26.json new file mode 100644 index 00000000..5c633fd5 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/26.json @@ -0,0 +1,6 @@ +{ + "description": "U-label starts and ends with a dash", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", + "data": "-hello-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/27.json b/node_modules/idn-hostname/#/tests/0/27.json new file mode 100644 index 00000000..eb6b9a83 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/27.json @@ -0,0 +1,6 @@ +{ + "description": "Begins with a Spacing Combining Mark", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", + "data": "ःhello", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/28.json b/node_modules/idn-hostname/#/tests/0/28.json new file mode 100644 index 00000000..31a795fe --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/28.json @@ -0,0 +1,6 @@ +{ + "description": "Begins with a Nonspacing Mark", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", + "data": "̀hello", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/29.json b/node_modules/idn-hostname/#/tests/0/29.json new file mode 100644 index 00000000..f83cf23d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/29.json @@ -0,0 +1,6 @@ +{ + "description": "Begins with an Enclosing Mark", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", + "data": "҈hello", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/3.json b/node_modules/idn-hostname/#/tests/0/3.json new file mode 100644 index 00000000..c2bb63df --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/3.json @@ -0,0 +1,5 @@ +{ + "description": "valid hostname with multiple internationalized segments", + "data": "测试.例子.测试", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/30.json b/node_modules/idn-hostname/#/tests/0/30.json new file mode 100644 index 00000000..c031e01c --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/30.json @@ -0,0 +1,6 @@ +{ + "description": "Exceptions that are PVALID, left-to-right chars", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "ßς་〇", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/31.json b/node_modules/idn-hostname/#/tests/0/31.json new file mode 100644 index 00000000..82a336f8 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/31.json @@ -0,0 +1,6 @@ +{ + "description": "Exceptions that are PVALID, right-to-left chars", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "۽۾", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/32.json b/node_modules/idn-hostname/#/tests/0/32.json new file mode 100644 index 00000000..307224a3 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/32.json @@ -0,0 +1,6 @@ +{ + "description": "Exceptions that are DISALLOWED, right-to-left chars", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", + "data": "ـߺ", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/33.json b/node_modules/idn-hostname/#/tests/0/33.json new file mode 100644 index 00000000..75572ff1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/33.json @@ -0,0 +1,6 @@ +{ + "description": "Exceptions that are DISALLOWED, left-to-right chars", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start", + "data": "〱〲〳〴〵〮〯〻", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/34.json b/node_modules/idn-hostname/#/tests/0/34.json new file mode 100644 index 00000000..50b230dd --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/34.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with no preceding 'l'", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "a·l", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/35.json b/node_modules/idn-hostname/#/tests/0/35.json new file mode 100644 index 00000000..b1c5b6d8 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/35.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with nothing preceding", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "·l", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/36.json b/node_modules/idn-hostname/#/tests/0/36.json new file mode 100644 index 00000000..969b50e8 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/36.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with no following 'l'", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "l·a", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/37.json b/node_modules/idn-hostname/#/tests/0/37.json new file mode 100644 index 00000000..8902a6e1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/37.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with nothing following", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "l·", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/38.json b/node_modules/idn-hostname/#/tests/0/38.json new file mode 100644 index 00000000..e7a7f73a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/38.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with surrounding 'l's", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "l·l", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/39.json b/node_modules/idn-hostname/#/tests/0/39.json new file mode 100644 index 00000000..feead6d4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/39.json @@ -0,0 +1,6 @@ +{ + "description": "Greek KERAIA not followed by Greek", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", + "data": "α͵S", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/4.json b/node_modules/idn-hostname/#/tests/0/4.json new file mode 100644 index 00000000..f65e220a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/4.json @@ -0,0 +1,5 @@ +{ + "description": "ZERO WIDTH NON-JOINER (U+200C) not preceded by a Virama", + "data": "exam‌ple.测试", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/40.json b/node_modules/idn-hostname/#/tests/0/40.json new file mode 100644 index 00000000..c2ff2e6e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/40.json @@ -0,0 +1,6 @@ +{ + "description": "Greek KERAIA not followed by anything", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", + "data": "α͵", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/41.json b/node_modules/idn-hostname/#/tests/0/41.json new file mode 100644 index 00000000..09e8d145 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/41.json @@ -0,0 +1,6 @@ +{ + "description": "Greek KERAIA followed by Greek", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", + "data": "α͵β", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/42.json b/node_modules/idn-hostname/#/tests/0/42.json new file mode 100644 index 00000000..f0953aac --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/42.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERESH not preceded by Hebrew", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", + "data": "A׳ב", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/43.json b/node_modules/idn-hostname/#/tests/0/43.json new file mode 100644 index 00000000..9c56dea4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/43.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERESH not preceded by anything", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", + "data": "׳ב", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/44.json b/node_modules/idn-hostname/#/tests/0/44.json new file mode 100644 index 00000000..104be9f6 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/44.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERESH preceded by Hebrew", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", + "data": "א׳ב", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/45.json b/node_modules/idn-hostname/#/tests/0/45.json new file mode 100644 index 00000000..f24c59ee --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/45.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERSHAYIM not preceded by Hebrew", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", + "data": "A״ב", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/46.json b/node_modules/idn-hostname/#/tests/0/46.json new file mode 100644 index 00000000..94e004a0 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/46.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERSHAYIM not preceded by anything", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", + "data": "״ב", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/47.json b/node_modules/idn-hostname/#/tests/0/47.json new file mode 100644 index 00000000..faf362d6 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/47.json @@ -0,0 +1,6 @@ +{ + "description": "Hebrew GERSHAYIM preceded by Hebrew", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", + "data": "א״ב", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/48.json b/node_modules/idn-hostname/#/tests/0/48.json new file mode 100644 index 00000000..184db77b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/48.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "def・abc", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/49.json b/node_modules/idn-hostname/#/tests/0/49.json new file mode 100644 index 00000000..443d6870 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/49.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with no other characters", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "・", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/5.json b/node_modules/idn-hostname/#/tests/0/5.json new file mode 100644 index 00000000..1b2f583f --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/5.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname with space", + "data": "ex ample.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/50.json b/node_modules/idn-hostname/#/tests/0/50.json new file mode 100644 index 00000000..08dd95c9 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/50.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with Hiragana", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "・ぁ", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/51.json b/node_modules/idn-hostname/#/tests/0/51.json new file mode 100644 index 00000000..34da1179 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/51.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with Katakana", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "・ァ", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/52.json b/node_modules/idn-hostname/#/tests/0/52.json new file mode 100644 index 00000000..fa79802b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/52.json @@ -0,0 +1,6 @@ +{ + "description": "KATAKANA MIDDLE DOT with Han", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", + "data": "・丈", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/53.json b/node_modules/idn-hostname/#/tests/0/53.json new file mode 100644 index 00000000..ba5614e5 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/53.json @@ -0,0 +1,6 @@ +{ + "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", + "data": "٠۰", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/54.json b/node_modules/idn-hostname/#/tests/0/54.json new file mode 100644 index 00000000..81386902 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/54.json @@ -0,0 +1,6 @@ +{ + "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", + "data": "ب٠ب", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/55.json b/node_modules/idn-hostname/#/tests/0/55.json new file mode 100644 index 00000000..81c3dd69 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/55.json @@ -0,0 +1,6 @@ +{ + "description": "Extended Arabic-Indic digits mixed with ASCII digits", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", + "data": "۰0", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/56.json b/node_modules/idn-hostname/#/tests/0/56.json new file mode 100644 index 00000000..22bc8471 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/56.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH JOINER not preceded by Virama", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", + "data": "क‍ष", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/57.json b/node_modules/idn-hostname/#/tests/0/57.json new file mode 100644 index 00000000..22728cc5 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/57.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH JOINER not preceded by anything", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", + "data": "‍ष", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/58.json b/node_modules/idn-hostname/#/tests/0/58.json new file mode 100644 index 00000000..49187f3e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/58.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH JOINER preceded by Virama", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", + "data": "क्‍ष", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/59.json b/node_modules/idn-hostname/#/tests/0/59.json new file mode 100644 index 00000000..01d03a3e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/59.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH NON-JOINER preceded by Virama", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", + "data": "क्‌ष", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/6.json b/node_modules/idn-hostname/#/tests/0/6.json new file mode 100644 index 00000000..21d8c4be --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/6.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname starting with hyphen", + "data": "-example.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/60.json b/node_modules/idn-hostname/#/tests/0/60.json new file mode 100644 index 00000000..8a924362 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/60.json @@ -0,0 +1,6 @@ +{ + "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches context joining rule", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", + "data": "بي‌بي", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/61.json b/node_modules/idn-hostname/#/tests/0/61.json new file mode 100644 index 00000000..7ee18591 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/61.json @@ -0,0 +1,6 @@ +{ + "description": "Labels with \"--\" in the third and fourth positions are ACE labels and must start with \"xn\" (RFC 5891 §4.2.1).", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.1", + "data": "ab--cd", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/62.json b/node_modules/idn-hostname/#/tests/0/62.json new file mode 100644 index 00000000..96f8516a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/62.json @@ -0,0 +1,6 @@ +{ + "description": "Labels with \"--\" in the third and fourth positions are ACE labels and must start with \"xn\" (RFC 5891 §4.2.1).", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.1", + "data": "xn--cd.ef--gh", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/63.json b/node_modules/idn-hostname/#/tests/0/63.json new file mode 100644 index 00000000..01ca77ad --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/63.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 1 — L-branch pass: label starts with L and contains L", + "data": "gk", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/64.json b/node_modules/idn-hostname/#/tests/0/64.json new file mode 100644 index 00000000..2f1262ca --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/64.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 1 — R-branch pass: label starts with R and contains R", + "data": "אב", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/65.json b/node_modules/idn-hostname/#/tests/0/65.json new file mode 100644 index 00000000..93583c70 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/65.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 1 — R-branch fail: contains R but doesn't start with R", + "data": "gא", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/66.json b/node_modules/idn-hostname/#/tests/0/66.json new file mode 100644 index 00000000..aa44b499 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/66.json @@ -0,0 +1,5 @@ +{ + "description": "BiDi rules not affecting label that does not contain RTL chars", + "data": "1host", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/67.json b/node_modules/idn-hostname/#/tests/0/67.json new file mode 100644 index 00000000..c7f30f14 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/67.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 2 — pass: starts R and uses allowed classes (R, EN)", + "data": "א1", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/68.json b/node_modules/idn-hostname/#/tests/0/68.json new file mode 100644 index 00000000..9b832ab3 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/68.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 2 — pass: starts AL and uses allowed classes (AL, AN)", + "data": "ا١", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/69.json b/node_modules/idn-hostname/#/tests/0/69.json new file mode 100644 index 00000000..b562344d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/69.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 2 — fail: starts R but contains L (disallowed)", + "data": "אg", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/7.json b/node_modules/idn-hostname/#/tests/0/7.json new file mode 100644 index 00000000..2597c58d --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/7.json @@ -0,0 +1,5 @@ +{ + "description": "invalid hostname ending with hyphen", + "data": "example-.com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/70.json b/node_modules/idn-hostname/#/tests/0/70.json new file mode 100644 index 00000000..1edde449 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/70.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 2 — fail: starts AL but contains L (disallowed)", + "data": "اG", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/71.json b/node_modules/idn-hostname/#/tests/0/71.json new file mode 100644 index 00000000..1ccd8aac --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/71.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 3 — pass: starts R and last strong is EN", + "data": "א1", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/72.json b/node_modules/idn-hostname/#/tests/0/72.json new file mode 100644 index 00000000..73146711 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/72.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 3 — pass: starts AL and last strong is AN", + "data": "ا١", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/73.json b/node_modules/idn-hostname/#/tests/0/73.json new file mode 100644 index 00000000..bb52198a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/73.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 3 — fail: starts R but last strong is ES (not allowed)", + "data": "א-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/74.json b/node_modules/idn-hostname/#/tests/0/74.json new file mode 100644 index 00000000..a0e22808 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/74.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 3 — fail: starts AL but last strong is ES (not allowed)", + "data": "ا-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/75.json b/node_modules/idn-hostname/#/tests/0/75.json new file mode 100644 index 00000000..5e02851a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/75.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 4 violation: mixed AN with EN", + "data": "ثال١234ثال", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/76.json b/node_modules/idn-hostname/#/tests/0/76.json new file mode 100644 index 00000000..91f812a9 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/76.json @@ -0,0 +1,5 @@ +{ + "description": "AN only in label not affected by BiDi rules (no R or AL char present)", + "data": "١٢", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/77.json b/node_modules/idn-hostname/#/tests/0/77.json new file mode 100644 index 00000000..97337bec --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/77.json @@ -0,0 +1,5 @@ +{ + "description": "mixed EN and AN not affected by BiDi rules (no R or AL char present)", + "data": "1١", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/78.json b/node_modules/idn-hostname/#/tests/0/78.json new file mode 100644 index 00000000..3c478f2b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/78.json @@ -0,0 +1,5 @@ +{ + "description": "mixed AN and EN not affected by BiDi rules (no R or AL char present)", + "data": "١2", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/79.json b/node_modules/idn-hostname/#/tests/0/79.json new file mode 100644 index 00000000..09ad123f --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/79.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 5 — pass: starts L and contains EN (allowed)", + "data": "g1", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/8.json b/node_modules/idn-hostname/#/tests/0/8.json new file mode 100644 index 00000000..ad99f4c1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/8.json @@ -0,0 +1,5 @@ +{ + "description": "invalid tld starting with hyphen", + "data": "example.-com", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/80.json b/node_modules/idn-hostname/#/tests/0/80.json new file mode 100644 index 00000000..d010e22e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/80.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 5 — pass: starts L and contains ES (allowed)", + "data": "a-b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/81.json b/node_modules/idn-hostname/#/tests/0/81.json new file mode 100644 index 00000000..6f5574cd --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/81.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 5 — fail: starts L but contains R (disallowed)", + "data": "gא", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/82.json b/node_modules/idn-hostname/#/tests/0/82.json new file mode 100644 index 00000000..94c29690 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/82.json @@ -0,0 +1,5 @@ +{ + "description": "mixed L with AN not affected by BiDi rules (no R or AL char present)", + "data": "g١", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/83.json b/node_modules/idn-hostname/#/tests/0/83.json new file mode 100644 index 00000000..ec5ac2c4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/83.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 6 — pass: starts L and ends with L", + "data": "gk", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/84.json b/node_modules/idn-hostname/#/tests/0/84.json new file mode 100644 index 00000000..bd4a1c9e --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/84.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 6 — pass: starts L and ends with EN", + "data": "g1", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/85.json b/node_modules/idn-hostname/#/tests/0/85.json new file mode 100644 index 00000000..6aa832a5 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/85.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 6 — fail: starts L and ends with ET (not L or EN)", + "data": "g#", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/86.json b/node_modules/idn-hostname/#/tests/0/86.json new file mode 100644 index 00000000..c0388bb3 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/86.json @@ -0,0 +1,5 @@ +{ + "description": "Bidi Rule 6 — fail: starts L and ends with ET (not L or EN)", + "data": "g%", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/87.json b/node_modules/idn-hostname/#/tests/0/87.json new file mode 100644 index 00000000..1dce58d4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/87.json @@ -0,0 +1,5 @@ +{ + "description": "single dot", + "data": ".", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/88.json b/node_modules/idn-hostname/#/tests/0/88.json new file mode 100644 index 00000000..6d1f4659 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/88.json @@ -0,0 +1,5 @@ +{ + "description": "single ideographic full stop", + "data": "。", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/89.json b/node_modules/idn-hostname/#/tests/0/89.json new file mode 100644 index 00000000..11f8e66a --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/89.json @@ -0,0 +1,5 @@ +{ + "description": "single fullwidth full stop", + "data": ".", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/9.json b/node_modules/idn-hostname/#/tests/0/9.json new file mode 100644 index 00000000..979d1c53 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/9.json @@ -0,0 +1,5 @@ +{ + "description": "invalid tld ending with hyphen", + "data": "example.com-", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/90.json b/node_modules/idn-hostname/#/tests/0/90.json new file mode 100644 index 00000000..c501b98b --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/90.json @@ -0,0 +1,5 @@ +{ + "description": "single halfwidth ideographic full stop", + "data": "。", + "valid": false +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/91.json b/node_modules/idn-hostname/#/tests/0/91.json new file mode 100644 index 00000000..324c76d1 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/91.json @@ -0,0 +1,5 @@ +{ + "description": "dot as label separator", + "data": "a.b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/92.json b/node_modules/idn-hostname/#/tests/0/92.json new file mode 100644 index 00000000..1068e4cc --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/92.json @@ -0,0 +1,5 @@ +{ + "description": "ideographic full stop as label separator", + "data": "a。b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/93.json b/node_modules/idn-hostname/#/tests/0/93.json new file mode 100644 index 00000000..9c3421f6 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/93.json @@ -0,0 +1,5 @@ +{ + "description": "fullwidth full stop as label separator", + "data": "a.b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/94.json b/node_modules/idn-hostname/#/tests/0/94.json new file mode 100644 index 00000000..175759f8 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/94.json @@ -0,0 +1,5 @@ +{ + "description": "halfwidth ideographic full stop as label separator", + "data": "a。b", + "valid": true +} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/95.json b/node_modules/idn-hostname/#/tests/0/95.json new file mode 100644 index 00000000..349f57f4 --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/95.json @@ -0,0 +1,6 @@ +{ + "description": "MIDDLE DOT with surrounding 'l's as A-Label", + "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", + "data": "xn--ll-0ea", + "valid": true +} diff --git a/node_modules/idn-hostname/#/tests/0/schema.json b/node_modules/idn-hostname/#/tests/0/schema.json new file mode 100644 index 00000000..c21edcbc --- /dev/null +++ b/node_modules/idn-hostname/#/tests/0/schema.json @@ -0,0 +1,4 @@ +{ + "description": "An internationalized hostname as defined by RFC5890, RFC5891, RFC5892, RFC5893, RFC3492 and UTS#46", + "$ref": "#/#/#/#/idn-hostname" +} diff --git a/node_modules/idn-hostname/LICENSE b/node_modules/idn-hostname/LICENSE new file mode 100644 index 00000000..5446d3a8 --- /dev/null +++ b/node_modules/idn-hostname/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 SorinGFS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/idn-hostname/idnaMappingTableCompact.json b/node_modules/idn-hostname/idnaMappingTableCompact.json new file mode 100644 index 00000000..a90116ea --- /dev/null +++ b/node_modules/idn-hostname/idnaMappingTableCompact.json @@ -0,0 +1 @@ +{"props":["valid","mapped","deviation","ignored","disallowed"],"viramas":[2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5909,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,68159,69702,69744,69759,69817,69939,69940,70080,70197,70378,70477,70722,70850,71103,71231,71350,71467,71737,71997,71998,72160,72244,72263,72345,72767,73028,73029,73111,73537,73538],"ranges":[[45,45,0],[48,57,0],[65,90,1],[97,122,0],[170,170,1],[173,173,3],[178,179,1],[181,181,1],[183,183,0],[185,186,1],[188,190,1],[192,214,1],[216,222,1],[223,223,2],[224,246,0],[248,255,0],[256,256,1],[257,257,0],[258,258,1],[259,259,0],[260,260,1],[261,261,0],[262,262,1],[263,263,0],[264,264,1],[265,265,0],[266,266,1],[267,267,0],[268,268,1],[269,269,0],[270,270,1],[271,271,0],[272,272,1],[273,273,0],[274,274,1],[275,275,0],[276,276,1],[277,277,0],[278,278,1],[279,279,0],[280,280,1],[281,281,0],[282,282,1],[283,283,0],[284,284,1],[285,285,0],[286,286,1],[287,287,0],[288,288,1],[289,289,0],[290,290,1],[291,291,0],[292,292,1],[293,293,0],[294,294,1],[295,295,0],[296,296,1],[297,297,0],[298,298,1],[299,299,0],[300,300,1],[301,301,0],[302,302,1],[303,303,0],[304,304,1],[305,305,0],[306,306,1],[308,308,1],[309,309,0],[310,310,1],[311,312,0],[313,313,1],[314,314,0],[315,315,1],[316,316,0],[317,317,1],[318,318,0],[319,319,1],[321,321,1],[322,322,0],[323,323,1],[324,324,0],[325,325,1],[326,326,0],[327,327,1],[328,328,0],[329,330,1],[331,331,0],[332,332,1],[333,333,0],[334,334,1],[335,335,0],[336,336,1],[337,337,0],[338,338,1],[339,339,0],[340,340,1],[341,341,0],[342,342,1],[343,343,0],[344,344,1],[345,345,0],[346,346,1],[347,347,0],[348,348,1],[349,349,0],[350,350,1],[351,351,0],[352,352,1],[353,353,0],[354,354,1],[355,355,0],[356,356,1],[357,357,0],[358,358,1],[359,359,0],[360,360,1],[361,361,0],[362,362,1],[363,363,0],[364,364,1],[365,365,0],[366,366,1],[367,367,0],[368,368,1],[369,369,0],[370,370,1],[371,371,0],[372,372,1],[373,373,0],[374,374,1],[375,375,0],[376,377,1],[378,378,0],[379,379,1],[380,380,0],[381,381,1],[382,382,0],[383,383,1],[384,384,0],[385,386,1],[387,387,0],[388,388,1],[389,389,0],[390,391,1],[392,392,0],[393,395,1],[396,397,0],[398,401,1],[402,402,0],[403,404,1],[405,405,0],[406,408,1],[409,411,0],[412,413,1],[414,414,0],[415,416,1],[417,417,0],[418,418,1],[419,419,0],[420,420,1],[421,421,0],[422,423,1],[424,424,0],[425,425,1],[426,427,0],[428,428,1],[429,429,0],[430,431,1],[432,432,0],[433,435,1],[436,436,0],[437,437,1],[438,438,0],[439,440,1],[441,443,0],[444,444,1],[445,451,0],[452,452,1],[455,455,1],[458,458,1],[461,461,1],[462,462,0],[463,463,1],[464,464,0],[465,465,1],[466,466,0],[467,467,1],[468,468,0],[469,469,1],[470,470,0],[471,471,1],[472,472,0],[473,473,1],[474,474,0],[475,475,1],[476,477,0],[478,478,1],[479,479,0],[480,480,1],[481,481,0],[482,482,1],[483,483,0],[484,484,1],[485,485,0],[486,486,1],[487,487,0],[488,488,1],[489,489,0],[490,490,1],[491,491,0],[492,492,1],[493,493,0],[494,494,1],[495,496,0],[497,497,1],[500,500,1],[501,501,0],[502,504,1],[505,505,0],[506,506,1],[507,507,0],[508,508,1],[509,509,0],[510,510,1],[511,511,0],[512,512,1],[513,513,0],[514,514,1],[515,515,0],[516,516,1],[517,517,0],[518,518,1],[519,519,0],[520,520,1],[521,521,0],[522,522,1],[523,523,0],[524,524,1],[525,525,0],[526,526,1],[527,527,0],[528,528,1],[529,529,0],[530,530,1],[531,531,0],[532,532,1],[533,533,0],[534,534,1],[535,535,0],[536,536,1],[537,537,0],[538,538,1],[539,539,0],[540,540,1],[541,541,0],[542,542,1],[543,543,0],[544,544,1],[545,545,0],[546,546,1],[547,547,0],[548,548,1],[549,549,0],[550,550,1],[551,551,0],[552,552,1],[553,553,0],[554,554,1],[555,555,0],[556,556,1],[557,557,0],[558,558,1],[559,559,0],[560,560,1],[561,561,0],[562,562,1],[563,569,0],[570,571,1],[572,572,0],[573,574,1],[575,576,0],[577,577,1],[578,578,0],[579,582,1],[583,583,0],[584,584,1],[585,585,0],[586,586,1],[587,587,0],[588,588,1],[589,589,0],[590,590,1],[591,687,0],[688,696,1],[697,705,0],[710,721,0],[736,740,1],[748,748,0],[750,750,0],[768,831,0],[832,833,1],[834,834,0],[835,837,1],[838,846,0],[847,847,3],[848,879,0],[880,880,1],[881,881,0],[882,882,1],[883,883,0],[884,884,1],[885,885,0],[886,886,1],[887,887,0],[891,893,0],[895,895,1],[902,906,1],[908,908,1],[910,911,1],[912,912,0],[913,929,1],[931,939,1],[940,961,0],[962,962,2],[963,974,0],[975,982,1],[983,983,0],[984,984,1],[985,985,0],[986,986,1],[987,987,0],[988,988,1],[989,989,0],[990,990,1],[991,991,0],[992,992,1],[993,993,0],[994,994,1],[995,995,0],[996,996,1],[997,997,0],[998,998,1],[999,999,0],[1000,1000,1],[1001,1001,0],[1002,1002,1],[1003,1003,0],[1004,1004,1],[1005,1005,0],[1006,1006,1],[1007,1007,0],[1008,1010,1],[1011,1011,0],[1012,1013,1],[1015,1015,1],[1016,1016,0],[1017,1018,1],[1019,1020,0],[1021,1071,1],[1072,1119,0],[1120,1120,1],[1121,1121,0],[1122,1122,1],[1123,1123,0],[1124,1124,1],[1125,1125,0],[1126,1126,1],[1127,1127,0],[1128,1128,1],[1129,1129,0],[1130,1130,1],[1131,1131,0],[1132,1132,1],[1133,1133,0],[1134,1134,1],[1135,1135,0],[1136,1136,1],[1137,1137,0],[1138,1138,1],[1139,1139,0],[1140,1140,1],[1141,1141,0],[1142,1142,1],[1143,1143,0],[1144,1144,1],[1145,1145,0],[1146,1146,1],[1147,1147,0],[1148,1148,1],[1149,1149,0],[1150,1150,1],[1151,1151,0],[1152,1152,1],[1153,1153,0],[1155,1159,0],[1162,1162,1],[1163,1163,0],[1164,1164,1],[1165,1165,0],[1166,1166,1],[1167,1167,0],[1168,1168,1],[1169,1169,0],[1170,1170,1],[1171,1171,0],[1172,1172,1],[1173,1173,0],[1174,1174,1],[1175,1175,0],[1176,1176,1],[1177,1177,0],[1178,1178,1],[1179,1179,0],[1180,1180,1],[1181,1181,0],[1182,1182,1],[1183,1183,0],[1184,1184,1],[1185,1185,0],[1186,1186,1],[1187,1187,0],[1188,1188,1],[1189,1189,0],[1190,1190,1],[1191,1191,0],[1192,1192,1],[1193,1193,0],[1194,1194,1],[1195,1195,0],[1196,1196,1],[1197,1197,0],[1198,1198,1],[1199,1199,0],[1200,1200,1],[1201,1201,0],[1202,1202,1],[1203,1203,0],[1204,1204,1],[1205,1205,0],[1206,1206,1],[1207,1207,0],[1208,1208,1],[1209,1209,0],[1210,1210,1],[1211,1211,0],[1212,1212,1],[1213,1213,0],[1214,1214,1],[1215,1215,0],[1217,1217,1],[1218,1218,0],[1219,1219,1],[1220,1220,0],[1221,1221,1],[1222,1222,0],[1223,1223,1],[1224,1224,0],[1225,1225,1],[1226,1226,0],[1227,1227,1],[1228,1228,0],[1229,1229,1],[1230,1231,0],[1232,1232,1],[1233,1233,0],[1234,1234,1],[1235,1235,0],[1236,1236,1],[1237,1237,0],[1238,1238,1],[1239,1239,0],[1240,1240,1],[1241,1241,0],[1242,1242,1],[1243,1243,0],[1244,1244,1],[1245,1245,0],[1246,1246,1],[1247,1247,0],[1248,1248,1],[1249,1249,0],[1250,1250,1],[1251,1251,0],[1252,1252,1],[1253,1253,0],[1254,1254,1],[1255,1255,0],[1256,1256,1],[1257,1257,0],[1258,1258,1],[1259,1259,0],[1260,1260,1],[1261,1261,0],[1262,1262,1],[1263,1263,0],[1264,1264,1],[1265,1265,0],[1266,1266,1],[1267,1267,0],[1268,1268,1],[1269,1269,0],[1270,1270,1],[1271,1271,0],[1272,1272,1],[1273,1273,0],[1274,1274,1],[1275,1275,0],[1276,1276,1],[1277,1277,0],[1278,1278,1],[1279,1279,0],[1280,1280,1],[1281,1281,0],[1282,1282,1],[1283,1283,0],[1284,1284,1],[1285,1285,0],[1286,1286,1],[1287,1287,0],[1288,1288,1],[1289,1289,0],[1290,1290,1],[1291,1291,0],[1292,1292,1],[1293,1293,0],[1294,1294,1],[1295,1295,0],[1296,1296,1],[1297,1297,0],[1298,1298,1],[1299,1299,0],[1300,1300,1],[1301,1301,0],[1302,1302,1],[1303,1303,0],[1304,1304,1],[1305,1305,0],[1306,1306,1],[1307,1307,0],[1308,1308,1],[1309,1309,0],[1310,1310,1],[1311,1311,0],[1312,1312,1],[1313,1313,0],[1314,1314,1],[1315,1315,0],[1316,1316,1],[1317,1317,0],[1318,1318,1],[1319,1319,0],[1320,1320,1],[1321,1321,0],[1322,1322,1],[1323,1323,0],[1324,1324,1],[1325,1325,0],[1326,1326,1],[1327,1327,0],[1329,1366,1],[1369,1369,0],[1376,1414,0],[1415,1415,1],[1416,1416,0],[1425,1469,0],[1471,1471,0],[1473,1474,0],[1476,1477,0],[1479,1479,0],[1488,1514,0],[1519,1524,0],[1552,1562,0],[1568,1599,0],[1601,1641,0],[1646,1652,0],[1653,1656,1],[1657,1747,0],[1749,1756,0],[1759,1768,0],[1770,1791,0],[1808,1866,0],[1869,1969,0],[1984,2037,0],[2045,2045,0],[2048,2093,0],[2112,2139,0],[2144,2154,0],[2160,2183,0],[2185,2190,0],[2200,2273,0],[2275,2391,0],[2392,2399,1],[2400,2403,0],[2406,2415,0],[2417,2435,0],[2437,2444,0],[2447,2448,0],[2451,2472,0],[2474,2480,0],[2482,2482,0],[2486,2489,0],[2492,2500,0],[2503,2504,0],[2507,2510,0],[2519,2519,0],[2524,2525,1],[2527,2527,1],[2528,2531,0],[2534,2545,0],[2556,2556,0],[2558,2558,0],[2561,2563,0],[2565,2570,0],[2575,2576,0],[2579,2600,0],[2602,2608,0],[2610,2610,0],[2611,2611,1],[2613,2613,0],[2614,2614,1],[2616,2617,0],[2620,2620,0],[2622,2626,0],[2631,2632,0],[2635,2637,0],[2641,2641,0],[2649,2651,1],[2652,2652,0],[2654,2654,1],[2662,2677,0],[2689,2691,0],[2693,2701,0],[2703,2705,0],[2707,2728,0],[2730,2736,0],[2738,2739,0],[2741,2745,0],[2748,2757,0],[2759,2761,0],[2763,2765,0],[2768,2768,0],[2784,2787,0],[2790,2799,0],[2809,2815,0],[2817,2819,0],[2821,2828,0],[2831,2832,0],[2835,2856,0],[2858,2864,0],[2866,2867,0],[2869,2873,0],[2876,2884,0],[2887,2888,0],[2891,2893,0],[2901,2903,0],[2908,2909,1],[2911,2915,0],[2918,2927,0],[2929,2929,0],[2946,2947,0],[2949,2954,0],[2958,2960,0],[2962,2965,0],[2969,2970,0],[2972,2972,0],[2974,2975,0],[2979,2980,0],[2984,2986,0],[2990,3001,0],[3006,3010,0],[3014,3016,0],[3018,3021,0],[3024,3024,0],[3031,3031,0],[3046,3055,0],[3072,3084,0],[3086,3088,0],[3090,3112,0],[3114,3129,0],[3132,3140,0],[3142,3144,0],[3146,3149,0],[3157,3158,0],[3160,3162,0],[3165,3165,0],[3168,3171,0],[3174,3183,0],[3200,3203,0],[3205,3212,0],[3214,3216,0],[3218,3240,0],[3242,3251,0],[3253,3257,0],[3260,3268,0],[3270,3272,0],[3274,3277,0],[3285,3286,0],[3293,3294,0],[3296,3299,0],[3302,3311,0],[3313,3315,0],[3328,3340,0],[3342,3344,0],[3346,3396,0],[3398,3400,0],[3402,3406,0],[3412,3415,0],[3423,3427,0],[3430,3439,0],[3450,3455,0],[3457,3459,0],[3461,3478,0],[3482,3505,0],[3507,3515,0],[3517,3517,0],[3520,3526,0],[3530,3530,0],[3535,3540,0],[3542,3542,0],[3544,3551,0],[3558,3567,0],[3570,3571,0],[3585,3634,0],[3635,3635,1],[3636,3642,0],[3648,3662,0],[3664,3673,0],[3713,3714,0],[3716,3716,0],[3718,3722,0],[3724,3747,0],[3749,3749,0],[3751,3762,0],[3763,3763,1],[3764,3773,0],[3776,3780,0],[3782,3782,0],[3784,3790,0],[3792,3801,0],[3804,3805,1],[3806,3807,0],[3840,3840,0],[3851,3851,0],[3852,3852,1],[3864,3865,0],[3872,3881,0],[3893,3893,0],[3895,3895,0],[3897,3897,0],[3902,3906,0],[3907,3907,1],[3908,3911,0],[3913,3916,0],[3917,3917,1],[3918,3921,0],[3922,3922,1],[3923,3926,0],[3927,3927,1],[3928,3931,0],[3932,3932,1],[3933,3944,0],[3945,3945,1],[3946,3948,0],[3953,3954,0],[3955,3955,1],[3956,3956,0],[3957,3961,1],[3962,3968,0],[3969,3969,1],[3970,3972,0],[3974,3986,0],[3987,3987,1],[3988,3991,0],[3993,3996,0],[3997,3997,1],[3998,4001,0],[4002,4002,1],[4003,4006,0],[4007,4007,1],[4008,4011,0],[4012,4012,1],[4013,4024,0],[4025,4025,1],[4026,4028,0],[4038,4038,0],[4096,4169,0],[4176,4253,0],[4295,4295,1],[4301,4301,1],[4304,4346,0],[4348,4348,1],[4349,4351,0],[4608,4680,0],[4682,4685,0],[4688,4694,0],[4696,4696,0],[4698,4701,0],[4704,4744,0],[4746,4749,0],[4752,4784,0],[4786,4789,0],[4792,4798,0],[4800,4800,0],[4802,4805,0],[4808,4822,0],[4824,4880,0],[4882,4885,0],[4888,4954,0],[4957,4959,0],[4992,5007,0],[5024,5109,0],[5112,5117,1],[5121,5740,0],[5743,5759,0],[5761,5786,0],[5792,5866,0],[5873,5880,0],[5888,5909,0],[5919,5940,0],[5952,5971,0],[5984,5996,0],[5998,6000,0],[6002,6003,0],[6016,6067,0],[6070,6099,0],[6103,6103,0],[6108,6109,0],[6112,6121,0],[6155,6155,3],[6159,6159,3],[6160,6169,0],[6176,6264,0],[6272,6314,0],[6320,6389,0],[6400,6430,0],[6432,6443,0],[6448,6459,0],[6470,6509,0],[6512,6516,0],[6528,6571,0],[6576,6601,0],[6608,6617,0],[6656,6683,0],[6688,6750,0],[6752,6780,0],[6783,6793,0],[6800,6809,0],[6823,6823,0],[6832,6845,0],[6847,6862,0],[6912,6988,0],[6992,7001,0],[7019,7027,0],[7040,7155,0],[7168,7223,0],[7232,7241,0],[7245,7293,0],[7296,7300,1],[7302,7304,1],[7312,7354,1],[7357,7359,1],[7376,7378,0],[7380,7418,0],[7424,7467,0],[7468,7470,1],[7471,7471,0],[7472,7482,1],[7483,7483,0],[7484,7501,1],[7502,7502,0],[7503,7530,1],[7531,7543,0],[7544,7544,1],[7545,7578,0],[7579,7615,1],[7616,7679,0],[7680,7680,1],[7681,7681,0],[7682,7682,1],[7683,7683,0],[7684,7684,1],[7685,7685,0],[7686,7686,1],[7687,7687,0],[7688,7688,1],[7689,7689,0],[7690,7690,1],[7691,7691,0],[7692,7692,1],[7693,7693,0],[7694,7694,1],[7695,7695,0],[7696,7696,1],[7697,7697,0],[7698,7698,1],[7699,7699,0],[7700,7700,1],[7701,7701,0],[7702,7702,1],[7703,7703,0],[7704,7704,1],[7705,7705,0],[7706,7706,1],[7707,7707,0],[7708,7708,1],[7709,7709,0],[7710,7710,1],[7711,7711,0],[7712,7712,1],[7713,7713,0],[7714,7714,1],[7715,7715,0],[7716,7716,1],[7717,7717,0],[7718,7718,1],[7719,7719,0],[7720,7720,1],[7721,7721,0],[7722,7722,1],[7723,7723,0],[7724,7724,1],[7725,7725,0],[7726,7726,1],[7727,7727,0],[7728,7728,1],[7729,7729,0],[7730,7730,1],[7731,7731,0],[7732,7732,1],[7733,7733,0],[7734,7734,1],[7735,7735,0],[7736,7736,1],[7737,7737,0],[7738,7738,1],[7739,7739,0],[7740,7740,1],[7741,7741,0],[7742,7742,1],[7743,7743,0],[7744,7744,1],[7745,7745,0],[7746,7746,1],[7747,7747,0],[7748,7748,1],[7749,7749,0],[7750,7750,1],[7751,7751,0],[7752,7752,1],[7753,7753,0],[7754,7754,1],[7755,7755,0],[7756,7756,1],[7757,7757,0],[7758,7758,1],[7759,7759,0],[7760,7760,1],[7761,7761,0],[7762,7762,1],[7763,7763,0],[7764,7764,1],[7765,7765,0],[7766,7766,1],[7767,7767,0],[7768,7768,1],[7769,7769,0],[7770,7770,1],[7771,7771,0],[7772,7772,1],[7773,7773,0],[7774,7774,1],[7775,7775,0],[7776,7776,1],[7777,7777,0],[7778,7778,1],[7779,7779,0],[7780,7780,1],[7781,7781,0],[7782,7782,1],[7783,7783,0],[7784,7784,1],[7785,7785,0],[7786,7786,1],[7787,7787,0],[7788,7788,1],[7789,7789,0],[7790,7790,1],[7791,7791,0],[7792,7792,1],[7793,7793,0],[7794,7794,1],[7795,7795,0],[7796,7796,1],[7797,7797,0],[7798,7798,1],[7799,7799,0],[7800,7800,1],[7801,7801,0],[7802,7802,1],[7803,7803,0],[7804,7804,1],[7805,7805,0],[7806,7806,1],[7807,7807,0],[7808,7808,1],[7809,7809,0],[7810,7810,1],[7811,7811,0],[7812,7812,1],[7813,7813,0],[7814,7814,1],[7815,7815,0],[7816,7816,1],[7817,7817,0],[7818,7818,1],[7819,7819,0],[7820,7820,1],[7821,7821,0],[7822,7822,1],[7823,7823,0],[7824,7824,1],[7825,7825,0],[7826,7826,1],[7827,7827,0],[7828,7828,1],[7829,7833,0],[7834,7835,1],[7836,7837,0],[7838,7838,1],[7839,7839,0],[7840,7840,1],[7841,7841,0],[7842,7842,1],[7843,7843,0],[7844,7844,1],[7845,7845,0],[7846,7846,1],[7847,7847,0],[7848,7848,1],[7849,7849,0],[7850,7850,1],[7851,7851,0],[7852,7852,1],[7853,7853,0],[7854,7854,1],[7855,7855,0],[7856,7856,1],[7857,7857,0],[7858,7858,1],[7859,7859,0],[7860,7860,1],[7861,7861,0],[7862,7862,1],[7863,7863,0],[7864,7864,1],[7865,7865,0],[7866,7866,1],[7867,7867,0],[7868,7868,1],[7869,7869,0],[7870,7870,1],[7871,7871,0],[7872,7872,1],[7873,7873,0],[7874,7874,1],[7875,7875,0],[7876,7876,1],[7877,7877,0],[7878,7878,1],[7879,7879,0],[7880,7880,1],[7881,7881,0],[7882,7882,1],[7883,7883,0],[7884,7884,1],[7885,7885,0],[7886,7886,1],[7887,7887,0],[7888,7888,1],[7889,7889,0],[7890,7890,1],[7891,7891,0],[7892,7892,1],[7893,7893,0],[7894,7894,1],[7895,7895,0],[7896,7896,1],[7897,7897,0],[7898,7898,1],[7899,7899,0],[7900,7900,1],[7901,7901,0],[7902,7902,1],[7903,7903,0],[7904,7904,1],[7905,7905,0],[7906,7906,1],[7907,7907,0],[7908,7908,1],[7909,7909,0],[7910,7910,1],[7911,7911,0],[7912,7912,1],[7913,7913,0],[7914,7914,1],[7915,7915,0],[7916,7916,1],[7917,7917,0],[7918,7918,1],[7919,7919,0],[7920,7920,1],[7921,7921,0],[7922,7922,1],[7923,7923,0],[7924,7924,1],[7925,7925,0],[7926,7926,1],[7927,7927,0],[7928,7928,1],[7929,7929,0],[7930,7930,1],[7931,7931,0],[7932,7932,1],[7933,7933,0],[7934,7934,1],[7935,7943,0],[7944,7951,1],[7952,7957,0],[7960,7965,1],[7968,7975,0],[7976,7983,1],[7984,7991,0],[7992,7999,1],[8000,8005,0],[8008,8013,1],[8016,8023,0],[8025,8025,1],[8027,8027,1],[8029,8029,1],[8031,8031,1],[8032,8039,0],[8040,8047,1],[8048,8048,0],[8049,8049,1],[8050,8050,0],[8051,8051,1],[8052,8052,0],[8053,8053,1],[8054,8054,0],[8055,8055,1],[8056,8056,0],[8057,8057,1],[8058,8058,0],[8059,8059,1],[8060,8060,0],[8061,8061,1],[8064,8111,1],[8112,8113,0],[8114,8116,1],[8118,8118,0],[8119,8124,1],[8126,8126,1],[8130,8132,1],[8134,8134,0],[8135,8140,1],[8144,8146,0],[8147,8147,1],[8150,8151,0],[8152,8155,1],[8160,8162,0],[8163,8163,1],[8164,8167,0],[8168,8172,1],[8178,8180,1],[8182,8182,0],[8183,8188,1],[8203,8203,3],[8204,8204,2],[8205,8205,0],[8209,8209,1],[8243,8244,1],[8246,8247,1],[8279,8279,1],[8288,8288,3],[8292,8292,3],[8304,8305,1],[8308,8313,1],[8315,8315,1],[8319,8329,1],[8331,8331,1],[8336,8348,1],[8360,8360,1],[8450,8451,1],[8455,8455,1],[8457,8459,1],[8463,8464,1],[8466,8466,1],[8469,8470,1],[8473,8475,1],[8480,8482,1],[8484,8484,1],[8486,8486,1],[8488,8488,1],[8490,8493,1],[8495,8495,1],[8497,8497,1],[8499,8505,1],[8507,8509,1],[8511,8512,1],[8517,8517,1],[8519,8521,1],[8526,8526,0],[8528,8575,1],[8580,8580,0],[8585,8585,1],[8748,8749,1],[8751,8752,1],[9001,9002,1],[9312,9331,1],[9398,9450,1],[10764,10764,1],[10972,10972,1],[11264,11311,1],[11312,11359,0],[11360,11360,1],[11361,11361,0],[11362,11364,1],[11365,11366,0],[11367,11367,1],[11368,11368,0],[11369,11369,1],[11370,11370,0],[11371,11371,1],[11372,11372,0],[11373,11376,1],[11377,11377,0],[11378,11378,1],[11379,11380,0],[11381,11381,1],[11382,11387,0],[11388,11392,1],[11393,11393,0],[11394,11394,1],[11395,11395,0],[11396,11396,1],[11397,11397,0],[11398,11398,1],[11399,11399,0],[11400,11400,1],[11401,11401,0],[11402,11402,1],[11403,11403,0],[11404,11404,1],[11405,11405,0],[11406,11406,1],[11407,11407,0],[11408,11408,1],[11409,11409,0],[11410,11410,1],[11411,11411,0],[11412,11412,1],[11413,11413,0],[11414,11414,1],[11415,11415,0],[11416,11416,1],[11417,11417,0],[11418,11418,1],[11419,11419,0],[11420,11420,1],[11421,11421,0],[11422,11422,1],[11423,11423,0],[11424,11424,1],[11425,11425,0],[11426,11426,1],[11427,11427,0],[11428,11428,1],[11429,11429,0],[11430,11430,1],[11431,11431,0],[11432,11432,1],[11433,11433,0],[11434,11434,1],[11435,11435,0],[11436,11436,1],[11437,11437,0],[11438,11438,1],[11439,11439,0],[11440,11440,1],[11441,11441,0],[11442,11442,1],[11443,11443,0],[11444,11444,1],[11445,11445,0],[11446,11446,1],[11447,11447,0],[11448,11448,1],[11449,11449,0],[11450,11450,1],[11451,11451,0],[11452,11452,1],[11453,11453,0],[11454,11454,1],[11455,11455,0],[11456,11456,1],[11457,11457,0],[11458,11458,1],[11459,11459,0],[11460,11460,1],[11461,11461,0],[11462,11462,1],[11463,11463,0],[11464,11464,1],[11465,11465,0],[11466,11466,1],[11467,11467,0],[11468,11468,1],[11469,11469,0],[11470,11470,1],[11471,11471,0],[11472,11472,1],[11473,11473,0],[11474,11474,1],[11475,11475,0],[11476,11476,1],[11477,11477,0],[11478,11478,1],[11479,11479,0],[11480,11480,1],[11481,11481,0],[11482,11482,1],[11483,11483,0],[11484,11484,1],[11485,11485,0],[11486,11486,1],[11487,11487,0],[11488,11488,1],[11489,11489,0],[11490,11490,1],[11491,11492,0],[11499,11499,1],[11500,11500,0],[11501,11501,1],[11502,11505,0],[11506,11506,1],[11507,11507,0],[11520,11557,0],[11559,11559,0],[11565,11565,0],[11568,11623,0],[11631,11631,1],[11647,11670,0],[11680,11686,0],[11688,11694,0],[11696,11702,0],[11704,11710,0],[11712,11718,0],[11720,11726,0],[11728,11734,0],[11736,11742,0],[11744,11775,0],[11823,11823,0],[11935,11935,1],[12019,12019,1],[12032,12245,1],[12290,12290,1],[12293,12295,0],[12330,12333,0],[12342,12342,1],[12344,12346,1],[12348,12348,0],[12353,12438,0],[12441,12442,0],[12445,12446,0],[12447,12447,1],[12449,12542,0],[12543,12543,1],[12549,12591,0],[12593,12643,1],[12645,12686,1],[12690,12703,1],[12704,12735,0],[12784,12799,0],[12868,12871,1],[12880,12926,1],[12928,13249,1],[13251,13254,1],[13256,13271,1],[13273,13311,1],[13312,19903,0],[19968,42124,0],[42192,42237,0],[42240,42508,0],[42512,42539,0],[42560,42560,1],[42561,42561,0],[42562,42562,1],[42563,42563,0],[42564,42564,1],[42565,42565,0],[42566,42566,1],[42567,42567,0],[42568,42568,1],[42569,42569,0],[42570,42570,1],[42571,42571,0],[42572,42572,1],[42573,42573,0],[42574,42574,1],[42575,42575,0],[42576,42576,1],[42577,42577,0],[42578,42578,1],[42579,42579,0],[42580,42580,1],[42581,42581,0],[42582,42582,1],[42583,42583,0],[42584,42584,1],[42585,42585,0],[42586,42586,1],[42587,42587,0],[42588,42588,1],[42589,42589,0],[42590,42590,1],[42591,42591,0],[42592,42592,1],[42593,42593,0],[42594,42594,1],[42595,42595,0],[42596,42596,1],[42597,42597,0],[42598,42598,1],[42599,42599,0],[42600,42600,1],[42601,42601,0],[42602,42602,1],[42603,42603,0],[42604,42604,1],[42605,42607,0],[42612,42621,0],[42623,42623,0],[42624,42624,1],[42625,42625,0],[42626,42626,1],[42627,42627,0],[42628,42628,1],[42629,42629,0],[42630,42630,1],[42631,42631,0],[42632,42632,1],[42633,42633,0],[42634,42634,1],[42635,42635,0],[42636,42636,1],[42637,42637,0],[42638,42638,1],[42639,42639,0],[42640,42640,1],[42641,42641,0],[42642,42642,1],[42643,42643,0],[42644,42644,1],[42645,42645,0],[42646,42646,1],[42647,42647,0],[42648,42648,1],[42649,42649,0],[42650,42650,1],[42651,42651,0],[42652,42653,1],[42654,42725,0],[42736,42737,0],[42775,42783,0],[42786,42786,1],[42787,42787,0],[42788,42788,1],[42789,42789,0],[42790,42790,1],[42791,42791,0],[42792,42792,1],[42793,42793,0],[42794,42794,1],[42795,42795,0],[42796,42796,1],[42797,42797,0],[42798,42798,1],[42799,42801,0],[42802,42802,1],[42803,42803,0],[42804,42804,1],[42805,42805,0],[42806,42806,1],[42807,42807,0],[42808,42808,1],[42809,42809,0],[42810,42810,1],[42811,42811,0],[42812,42812,1],[42813,42813,0],[42814,42814,1],[42815,42815,0],[42816,42816,1],[42817,42817,0],[42818,42818,1],[42819,42819,0],[42820,42820,1],[42821,42821,0],[42822,42822,1],[42823,42823,0],[42824,42824,1],[42825,42825,0],[42826,42826,1],[42827,42827,0],[42828,42828,1],[42829,42829,0],[42830,42830,1],[42831,42831,0],[42832,42832,1],[42833,42833,0],[42834,42834,1],[42835,42835,0],[42836,42836,1],[42837,42837,0],[42838,42838,1],[42839,42839,0],[42840,42840,1],[42841,42841,0],[42842,42842,1],[42843,42843,0],[42844,42844,1],[42845,42845,0],[42846,42846,1],[42847,42847,0],[42848,42848,1],[42849,42849,0],[42850,42850,1],[42851,42851,0],[42852,42852,1],[42853,42853,0],[42854,42854,1],[42855,42855,0],[42856,42856,1],[42857,42857,0],[42858,42858,1],[42859,42859,0],[42860,42860,1],[42861,42861,0],[42862,42862,1],[42863,42863,0],[42864,42864,1],[42865,42872,0],[42873,42873,1],[42874,42874,0],[42875,42875,1],[42876,42876,0],[42877,42878,1],[42879,42879,0],[42880,42880,1],[42881,42881,0],[42882,42882,1],[42883,42883,0],[42884,42884,1],[42885,42885,0],[42886,42886,1],[42887,42888,0],[42891,42891,1],[42892,42892,0],[42893,42893,1],[42894,42895,0],[42896,42896,1],[42897,42897,0],[42898,42898,1],[42899,42901,0],[42902,42902,1],[42903,42903,0],[42904,42904,1],[42905,42905,0],[42906,42906,1],[42907,42907,0],[42908,42908,1],[42909,42909,0],[42910,42910,1],[42911,42911,0],[42912,42912,1],[42913,42913,0],[42914,42914,1],[42915,42915,0],[42916,42916,1],[42917,42917,0],[42918,42918,1],[42919,42919,0],[42920,42920,1],[42921,42921,0],[42922,42926,1],[42927,42927,0],[42928,42932,1],[42933,42933,0],[42934,42934,1],[42935,42935,0],[42936,42936,1],[42937,42937,0],[42938,42938,1],[42939,42939,0],[42940,42940,1],[42941,42941,0],[42942,42942,1],[42943,42943,0],[42944,42944,1],[42945,42945,0],[42946,42946,1],[42947,42947,0],[42948,42951,1],[42952,42952,0],[42953,42953,1],[42954,42954,0],[42960,42960,1],[42961,42961,0],[42963,42963,0],[42965,42965,0],[42966,42966,1],[42967,42967,0],[42968,42968,1],[42969,42969,0],[42994,42997,1],[42998,42999,0],[43000,43001,1],[43002,43047,0],[43052,43052,0],[43072,43123,0],[43136,43205,0],[43216,43225,0],[43232,43255,0],[43259,43259,0],[43261,43309,0],[43312,43347,0],[43392,43456,0],[43471,43481,0],[43488,43518,0],[43520,43574,0],[43584,43597,0],[43600,43609,0],[43616,43638,0],[43642,43714,0],[43739,43741,0],[43744,43759,0],[43762,43766,0],[43777,43782,0],[43785,43790,0],[43793,43798,0],[43808,43814,0],[43816,43822,0],[43824,43866,0],[43868,43871,1],[43872,43880,0],[43881,43881,1],[43888,43967,1],[43968,44010,0],[44012,44013,0],[44016,44025,0],[44032,55203,0],[63744,63751,1],[63753,64013,1],[64014,64015,0],[64016,64016,1],[64017,64017,0],[64018,64018,1],[64019,64020,0],[64021,64030,1],[64031,64031,0],[64032,64032,1],[64033,64033,0],[64034,64034,1],[64035,64036,0],[64037,64038,1],[64039,64041,0],[64042,64093,1],[64095,64109,1],[64112,64217,1],[64256,64261,1],[64275,64279,1],[64285,64285,1],[64286,64286,0],[64287,64296,1],[64298,64310,1],[64312,64316,1],[64318,64318,1],[64320,64321,1],[64323,64324,1],[64326,64336,1],[64338,64338,1],[64342,64342,1],[64346,64346,1],[64350,64350,1],[64354,64354,1],[64358,64358,1],[64362,64362,1],[64366,64366,1],[64370,64370,1],[64374,64374,1],[64378,64378,1],[64382,64382,1],[64386,64386,1],[64388,64388,1],[64390,64390,1],[64392,64392,1],[64394,64394,1],[64396,64396,1],[64398,64398,1],[64402,64402,1],[64406,64406,1],[64410,64410,1],[64414,64414,1],[64416,64416,1],[64420,64420,1],[64422,64422,1],[64426,64426,1],[64430,64430,1],[64432,64432,1],[64467,64467,1],[64471,64471,1],[64473,64473,1],[64475,64475,1],[64477,64478,1],[64480,64480,1],[64482,64482,1],[64484,64484,1],[64488,64488,1],[64490,64490,1],[64492,64492,1],[64494,64494,1],[64496,64496,1],[64498,64498,1],[64500,64500,1],[64502,64502,1],[64505,64505,1],[64508,64508,1],[64512,64605,1],[64612,64828,1],[64848,64849,1],[64851,64856,1],[64858,64863,1],[64865,64866,1],[64868,64868,1],[64870,64871,1],[64873,64874,1],[64876,64876,1],[64878,64879,1],[64881,64881,1],[64883,64886,1],[64888,64892,1],[64894,64899,1],[64901,64901,1],[64903,64903,1],[64905,64911,1],[64914,64919,1],[64921,64924,1],[64926,64967,1],[65008,65017,1],[65020,65020,1],[65024,65024,3],[65041,65041,1],[65047,65048,1],[65056,65071,0],[65073,65074,1],[65081,65092,1],[65105,65105,1],[65112,65112,1],[65117,65118,1],[65123,65123,1],[65137,65137,1],[65139,65139,0],[65143,65143,1],[65145,65145,1],[65147,65147,1],[65149,65149,1],[65151,65153,1],[65155,65155,1],[65157,65157,1],[65159,65159,1],[65161,65161,1],[65165,65165,1],[65167,65167,1],[65171,65171,1],[65173,65173,1],[65177,65177,1],[65181,65181,1],[65185,65185,1],[65189,65189,1],[65193,65193,1],[65195,65195,1],[65197,65197,1],[65199,65199,1],[65201,65201,1],[65205,65205,1],[65209,65209,1],[65213,65213,1],[65217,65217,1],[65221,65221,1],[65225,65225,1],[65229,65229,1],[65233,65233,1],[65237,65237,1],[65241,65241,1],[65245,65245,1],[65249,65249,1],[65253,65253,1],[65257,65257,1],[65261,65261,1],[65263,65263,1],[65265,65265,1],[65269,65269,1],[65271,65271,1],[65273,65273,1],[65275,65275,1],[65279,65279,3],[65293,65294,1],[65296,65305,1],[65313,65338,1],[65345,65370,1],[65375,65439,1],[65441,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65504,65506,1],[65508,65510,1],[65512,65518,1],[65536,65547,0],[65549,65574,0],[65576,65594,0],[65596,65597,0],[65599,65613,0],[65616,65629,0],[65664,65786,0],[66045,66045,0],[66176,66204,0],[66208,66256,0],[66272,66272,0],[66304,66335,0],[66349,66368,0],[66370,66377,0],[66384,66426,0],[66432,66461,0],[66464,66499,0],[66504,66511,0],[66560,66599,1],[66600,66717,0],[66720,66729,0],[66736,66771,1],[66776,66811,0],[66816,66855,0],[66864,66915,0],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,0],[66979,66993,0],[66995,67001,0],[67003,67004,0],[67072,67382,0],[67392,67413,0],[67424,67431,0],[67456,67456,0],[67457,67461,1],[67463,67504,1],[67506,67514,1],[67584,67589,0],[67592,67592,0],[67594,67637,0],[67639,67640,0],[67644,67644,0],[67647,67669,0],[67680,67702,0],[67712,67742,0],[67808,67826,0],[67828,67829,0],[67840,67861,0],[67872,67897,0],[67968,68023,0],[68030,68031,0],[68096,68099,0],[68101,68102,0],[68108,68115,0],[68117,68119,0],[68121,68149,0],[68152,68154,0],[68159,68159,0],[68192,68220,0],[68224,68252,0],[68288,68295,0],[68297,68326,0],[68352,68405,0],[68416,68437,0],[68448,68466,0],[68480,68497,0],[68608,68680,0],[68736,68786,1],[68800,68850,0],[68864,68903,0],[68912,68921,0],[69248,69289,0],[69291,69292,0],[69296,69297,0],[69373,69404,0],[69415,69415,0],[69424,69456,0],[69488,69509,0],[69552,69572,0],[69600,69622,0],[69632,69702,0],[69734,69749,0],[69759,69818,0],[69826,69826,0],[69840,69864,0],[69872,69881,0],[69888,69940,0],[69942,69951,0],[69956,69959,0],[69968,70003,0],[70006,70006,0],[70016,70084,0],[70089,70092,0],[70094,70106,0],[70108,70108,0],[70144,70161,0],[70163,70199,0],[70206,70209,0],[70272,70278,0],[70280,70280,0],[70282,70285,0],[70287,70301,0],[70303,70312,0],[70320,70378,0],[70384,70393,0],[70400,70403,0],[70405,70412,0],[70415,70416,0],[70419,70440,0],[70442,70448,0],[70450,70451,0],[70453,70457,0],[70459,70468,0],[70471,70472,0],[70475,70477,0],[70480,70480,0],[70487,70487,0],[70493,70499,0],[70502,70508,0],[70512,70516,0],[70656,70730,0],[70736,70745,0],[70750,70753,0],[70784,70853,0],[70855,70855,0],[70864,70873,0],[71040,71093,0],[71096,71104,0],[71128,71133,0],[71168,71232,0],[71236,71236,0],[71248,71257,0],[71296,71352,0],[71360,71369,0],[71424,71450,0],[71453,71467,0],[71472,71481,0],[71488,71494,0],[71680,71738,0],[71840,71871,1],[71872,71913,0],[71935,71942,0],[71945,71945,0],[71948,71955,0],[71957,71958,0],[71960,71989,0],[71991,71992,0],[71995,72003,0],[72016,72025,0],[72096,72103,0],[72106,72151,0],[72154,72161,0],[72163,72164,0],[72192,72254,0],[72263,72263,0],[72272,72345,0],[72349,72349,0],[72368,72440,0],[72704,72712,0],[72714,72758,0],[72760,72768,0],[72784,72793,0],[72818,72847,0],[72850,72871,0],[72873,72886,0],[72960,72966,0],[72968,72969,0],[72971,73014,0],[73018,73018,0],[73020,73021,0],[73023,73031,0],[73040,73049,0],[73056,73061,0],[73063,73064,0],[73066,73102,0],[73104,73105,0],[73107,73112,0],[73120,73129,0],[73440,73462,0],[73472,73488,0],[73490,73530,0],[73534,73538,0],[73552,73561,0],[73648,73648,0],[73728,74649,0],[74880,75075,0],[77712,77808,0],[77824,78895,0],[78912,78933,0],[82944,83526,0],[92160,92728,0],[92736,92766,0],[92768,92777,0],[92784,92862,0],[92864,92873,0],[92880,92909,0],[92912,92916,0],[92928,92982,0],[92992,92995,0],[93008,93017,0],[93027,93047,0],[93053,93071,0],[93760,93791,1],[93792,93823,0],[93952,94026,0],[94031,94087,0],[94095,94111,0],[94176,94177,0],[94179,94180,0],[94192,94193,0],[94208,100343,0],[100352,101589,0],[101632,101640,0],[110576,110579,0],[110581,110587,0],[110589,110590,0],[110592,110882,0],[110898,110898,0],[110928,110930,0],[110933,110933,0],[110948,110951,0],[110960,111355,0],[113664,113770,0],[113776,113788,0],[113792,113800,0],[113808,113817,0],[113821,113822,0],[113824,113824,3],[118528,118573,0],[118576,118598,0],[119134,119140,1],[119227,119232,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,119970,1],[119973,119974,1],[119977,119980,1],[119982,119993,1],[119995,119995,1],[119997,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120134,1],[120138,120144,1],[120146,120485,1],[120488,120531,1],[120533,120589,1],[120591,120647,1],[120649,120705,1],[120707,120763,1],[120765,120778,1],[120782,120831,1],[121344,121398,0],[121403,121452,0],[121461,121461,0],[121476,121476,0],[121499,121503,0],[121505,121519,0],[122624,122654,0],[122661,122666,0],[122880,122886,0],[122888,122904,0],[122907,122913,0],[122915,122916,0],[122918,122922,0],[122928,122989,1],[123023,123023,0],[123136,123180,0],[123184,123197,0],[123200,123209,0],[123214,123214,0],[123536,123566,0],[123584,123641,0],[124112,124153,0],[124896,124902,0],[124904,124907,0],[124909,124910,0],[124912,124926,0],[124928,125124,0],[125136,125142,0],[125184,125217,1],[125218,125259,0],[125264,125273,0],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126500,1],[126503,126503,1],[126505,126514,1],[126516,126519,1],[126521,126521,1],[126523,126523,1],[126530,126530,1],[126535,126535,1],[126537,126537,1],[126539,126539,1],[126541,126543,1],[126545,126546,1],[126548,126548,1],[126551,126551,1],[126553,126553,1],[126555,126555,1],[126557,126557,1],[126559,126559,1],[126561,126562,1],[126564,126564,1],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126590,1],[126592,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[127274,127278,1],[127280,127311,1],[127338,127340,1],[127376,127376,1],[127488,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[130032,130041,1],[131072,173791,0],[173824,177977,0],[177984,178205,0],[178208,183969,0],[183984,191456,0],[191472,192093,0],[194560,194609,1],[194612,194629,1],[194631,194663,1],[194665,194666,1],[194668,194675,1],[194677,194705,1],[194707,194708,1],[194710,194846,1],[194848,194860,1],[194862,194886,1],[194888,194909,1],[194912,195006,1],[195008,195070,1],[195072,195101,1],[196608,201546,0],[201552,205743,0],[917760,917760,3]],"mappings":{"65":[97],"66":[98],"67":[99],"68":[100],"69":[101],"70":[102],"71":[103],"72":[104],"73":[105],"74":[106],"75":[107],"76":[108],"77":[109],"78":[110],"79":[111],"80":[112],"81":[113],"82":[114],"83":[115],"84":[116],"85":[117],"86":[118],"87":[119],"88":[120],"89":[121],"90":[122],"160":[32],"168":[32,776],"170":[97],"175":[32,772],"178":[50],"179":[51],"180":[32,769],"181":[956],"184":[32,807],"185":[49],"186":[111],"188":[49,8260,52],"189":[49,8260,50],"190":[51,8260,52],"192":[224],"193":[225],"194":[226],"195":[227],"196":[228],"197":[229],"198":[230],"199":[231],"200":[232],"201":[233],"202":[234],"203":[235],"204":[236],"205":[237],"206":[238],"207":[239],"208":[240],"209":[241],"210":[242],"211":[243],"212":[244],"213":[245],"214":[246],"216":[248],"217":[249],"218":[250],"219":[251],"220":[252],"221":[253],"222":[254],"223":[115,115],"256":[257],"258":[259],"260":[261],"262":[263],"264":[265],"266":[267],"268":[269],"270":[271],"272":[273],"274":[275],"276":[277],"278":[279],"280":[281],"282":[283],"284":[285],"286":[287],"288":[289],"290":[291],"292":[293],"294":[295],"296":[297],"298":[299],"300":[301],"302":[303],"304":[105,775],"306":[105,106],"308":[309],"310":[311],"313":[314],"315":[316],"317":[318],"319":[108,183],"321":[322],"323":[324],"325":[326],"327":[328],"329":[700,110],"330":[331],"332":[333],"334":[335],"336":[337],"338":[339],"340":[341],"342":[343],"344":[345],"346":[347],"348":[349],"350":[351],"352":[353],"354":[355],"356":[357],"358":[359],"360":[361],"362":[363],"364":[365],"366":[367],"368":[369],"370":[371],"372":[373],"374":[375],"376":[255],"377":[378],"379":[380],"381":[382],"383":[115],"385":[595],"386":[387],"388":[389],"390":[596],"391":[392],"393":[598],"394":[599],"395":[396],"398":[477],"399":[601],"400":[603],"401":[402],"403":[608],"404":[611],"406":[617],"407":[616],"408":[409],"412":[623],"413":[626],"415":[629],"416":[417],"418":[419],"420":[421],"422":[640],"423":[424],"425":[643],"428":[429],"430":[648],"431":[432],"433":[650],"434":[651],"435":[436],"437":[438],"439":[658],"440":[441],"444":[445],"452":[100,382],"455":[108,106],"458":[110,106],"461":[462],"463":[464],"465":[466],"467":[468],"469":[470],"471":[472],"473":[474],"475":[476],"478":[479],"480":[481],"482":[483],"484":[485],"486":[487],"488":[489],"490":[491],"492":[493],"494":[495],"497":[100,122],"500":[501],"502":[405],"503":[447],"504":[505],"506":[507],"508":[509],"510":[511],"512":[513],"514":[515],"516":[517],"518":[519],"520":[521],"522":[523],"524":[525],"526":[527],"528":[529],"530":[531],"532":[533],"534":[535],"536":[537],"538":[539],"540":[541],"542":[543],"544":[414],"546":[547],"548":[549],"550":[551],"552":[553],"554":[555],"556":[557],"558":[559],"560":[561],"562":[563],"570":[11365],"571":[572],"573":[410],"574":[11366],"577":[578],"579":[384],"580":[649],"581":[652],"582":[583],"584":[585],"586":[587],"588":[589],"590":[591],"688":[104],"689":[614],"690":[106],"691":[114],"692":[633],"693":[635],"694":[641],"695":[119],"696":[121],"728":[32,774],"729":[32,775],"730":[32,778],"731":[32,808],"732":[32,771],"733":[32,779],"736":[611],"737":[108],"738":[115],"739":[120],"740":[661],"832":[768],"833":[769],"835":[787],"836":[776,769],"837":[953],"880":[881],"882":[883],"884":[697],"886":[887],"890":[32,953],"894":[59],"895":[1011],"900":[32,769],"901":[32,776,769],"902":[940],"903":[183],"904":[941],"905":[942],"906":[943],"908":[972],"910":[973],"911":[974],"913":[945],"914":[946],"915":[947],"916":[948],"917":[949],"918":[950],"919":[951],"920":[952],"921":[953],"922":[954],"923":[955],"924":[956],"925":[957],"926":[958],"927":[959],"928":[960],"929":[961],"931":[963],"932":[964],"933":[965],"934":[966],"935":[967],"936":[968],"937":[969],"938":[970],"939":[971],"962":[963],"975":[983],"976":[946],"977":[952],"978":[965],"979":[973],"980":[971],"981":[966],"982":[960],"984":[985],"986":[987],"988":[989],"990":[991],"992":[993],"994":[995],"996":[997],"998":[999],"1000":[1001],"1002":[1003],"1004":[1005],"1006":[1007],"1008":[954],"1009":[961],"1010":[963],"1012":[952],"1013":[949],"1015":[1016],"1017":[963],"1018":[1019],"1021":[891],"1022":[892],"1023":[893],"1024":[1104],"1025":[1105],"1026":[1106],"1027":[1107],"1028":[1108],"1029":[1109],"1030":[1110],"1031":[1111],"1032":[1112],"1033":[1113],"1034":[1114],"1035":[1115],"1036":[1116],"1037":[1117],"1038":[1118],"1039":[1119],"1040":[1072],"1041":[1073],"1042":[1074],"1043":[1075],"1044":[1076],"1045":[1077],"1046":[1078],"1047":[1079],"1048":[1080],"1049":[1081],"1050":[1082],"1051":[1083],"1052":[1084],"1053":[1085],"1054":[1086],"1055":[1087],"1056":[1088],"1057":[1089],"1058":[1090],"1059":[1091],"1060":[1092],"1061":[1093],"1062":[1094],"1063":[1095],"1064":[1096],"1065":[1097],"1066":[1098],"1067":[1099],"1068":[1100],"1069":[1101],"1070":[1102],"1071":[1103],"1120":[1121],"1122":[1123],"1124":[1125],"1126":[1127],"1128":[1129],"1130":[1131],"1132":[1133],"1134":[1135],"1136":[1137],"1138":[1139],"1140":[1141],"1142":[1143],"1144":[1145],"1146":[1147],"1148":[1149],"1150":[1151],"1152":[1153],"1162":[1163],"1164":[1165],"1166":[1167],"1168":[1169],"1170":[1171],"1172":[1173],"1174":[1175],"1176":[1177],"1178":[1179],"1180":[1181],"1182":[1183],"1184":[1185],"1186":[1187],"1188":[1189],"1190":[1191],"1192":[1193],"1194":[1195],"1196":[1197],"1198":[1199],"1200":[1201],"1202":[1203],"1204":[1205],"1206":[1207],"1208":[1209],"1210":[1211],"1212":[1213],"1214":[1215],"1217":[1218],"1219":[1220],"1221":[1222],"1223":[1224],"1225":[1226],"1227":[1228],"1229":[1230],"1232":[1233],"1234":[1235],"1236":[1237],"1238":[1239],"1240":[1241],"1242":[1243],"1244":[1245],"1246":[1247],"1248":[1249],"1250":[1251],"1252":[1253],"1254":[1255],"1256":[1257],"1258":[1259],"1260":[1261],"1262":[1263],"1264":[1265],"1266":[1267],"1268":[1269],"1270":[1271],"1272":[1273],"1274":[1275],"1276":[1277],"1278":[1279],"1280":[1281],"1282":[1283],"1284":[1285],"1286":[1287],"1288":[1289],"1290":[1291],"1292":[1293],"1294":[1295],"1296":[1297],"1298":[1299],"1300":[1301],"1302":[1303],"1304":[1305],"1306":[1307],"1308":[1309],"1310":[1311],"1312":[1313],"1314":[1315],"1316":[1317],"1318":[1319],"1320":[1321],"1322":[1323],"1324":[1325],"1326":[1327],"1329":[1377],"1330":[1378],"1331":[1379],"1332":[1380],"1333":[1381],"1334":[1382],"1335":[1383],"1336":[1384],"1337":[1385],"1338":[1386],"1339":[1387],"1340":[1388],"1341":[1389],"1342":[1390],"1343":[1391],"1344":[1392],"1345":[1393],"1346":[1394],"1347":[1395],"1348":[1396],"1349":[1397],"1350":[1398],"1351":[1399],"1352":[1400],"1353":[1401],"1354":[1402],"1355":[1403],"1356":[1404],"1357":[1405],"1358":[1406],"1359":[1407],"1360":[1408],"1361":[1409],"1362":[1410],"1363":[1411],"1364":[1412],"1365":[1413],"1366":[1414],"1415":[1381,1410],"1653":[1575,1652],"1654":[1608,1652],"1655":[1735,1652],"1656":[1610,1652],"2392":[2325,2364],"2393":[2326,2364],"2394":[2327,2364],"2395":[2332,2364],"2396":[2337,2364],"2397":[2338,2364],"2398":[2347,2364],"2399":[2351,2364],"2524":[2465,2492],"2525":[2466,2492],"2527":[2479,2492],"2611":[2610,2620],"2614":[2616,2620],"2649":[2582,2620],"2650":[2583,2620],"2651":[2588,2620],"2654":[2603,2620],"2908":[2849,2876],"2909":[2850,2876],"3635":[3661,3634],"3763":[3789,3762],"3804":[3755,3737],"3805":[3755,3745],"3852":[3851],"3907":[3906,4023],"3917":[3916,4023],"3922":[3921,4023],"3927":[3926,4023],"3932":[3931,4023],"3945":[3904,4021],"3955":[3953,3954],"3957":[3953,3956],"3958":[4018,3968],"3959":[4018,3953,3968],"3960":[4019,3968],"3961":[4019,3953,3968],"3969":[3953,3968],"3987":[3986,4023],"3997":[3996,4023],"4002":[4001,4023],"4007":[4006,4023],"4012":[4011,4023],"4025":[3984,4021],"4295":[11559],"4301":[11565],"4348":[4316],"5112":[5104],"5113":[5105],"5114":[5106],"5115":[5107],"5116":[5108],"5117":[5109],"7296":[1074],"7297":[1076],"7298":[1086],"7299":[1089],"7300":[1090],"7302":[1098],"7303":[1123],"7304":[42571],"7312":[4304],"7313":[4305],"7314":[4306],"7315":[4307],"7316":[4308],"7317":[4309],"7318":[4310],"7319":[4311],"7320":[4312],"7321":[4313],"7322":[4314],"7323":[4315],"7324":[4316],"7325":[4317],"7326":[4318],"7327":[4319],"7328":[4320],"7329":[4321],"7330":[4322],"7331":[4323],"7332":[4324],"7333":[4325],"7334":[4326],"7335":[4327],"7336":[4328],"7337":[4329],"7338":[4330],"7339":[4331],"7340":[4332],"7341":[4333],"7342":[4334],"7343":[4335],"7344":[4336],"7345":[4337],"7346":[4338],"7347":[4339],"7348":[4340],"7349":[4341],"7350":[4342],"7351":[4343],"7352":[4344],"7353":[4345],"7354":[4346],"7357":[4349],"7358":[4350],"7359":[4351],"7468":[97],"7469":[230],"7470":[98],"7472":[100],"7473":[101],"7474":[477],"7475":[103],"7476":[104],"7477":[105],"7478":[106],"7479":[107],"7480":[108],"7481":[109],"7482":[110],"7484":[111],"7485":[547],"7486":[112],"7487":[114],"7488":[116],"7489":[117],"7490":[119],"7491":[97],"7492":[592],"7493":[593],"7494":[7426],"7495":[98],"7496":[100],"7497":[101],"7498":[601],"7499":[603],"7500":[604],"7501":[103],"7503":[107],"7504":[109],"7505":[331],"7506":[111],"7507":[596],"7508":[7446],"7509":[7447],"7510":[112],"7511":[116],"7512":[117],"7513":[7453],"7514":[623],"7515":[118],"7516":[7461],"7517":[946],"7518":[947],"7519":[948],"7520":[966],"7521":[967],"7522":[105],"7523":[114],"7524":[117],"7525":[118],"7526":[946],"7527":[947],"7528":[961],"7529":[966],"7530":[967],"7544":[1085],"7579":[594],"7580":[99],"7581":[597],"7582":[240],"7583":[604],"7584":[102],"7585":[607],"7586":[609],"7587":[613],"7588":[616],"7589":[617],"7590":[618],"7591":[7547],"7592":[669],"7593":[621],"7594":[7557],"7595":[671],"7596":[625],"7597":[624],"7598":[626],"7599":[627],"7600":[628],"7601":[629],"7602":[632],"7603":[642],"7604":[643],"7605":[427],"7606":[649],"7607":[650],"7608":[7452],"7609":[651],"7610":[652],"7611":[122],"7612":[656],"7613":[657],"7614":[658],"7615":[952],"7680":[7681],"7682":[7683],"7684":[7685],"7686":[7687],"7688":[7689],"7690":[7691],"7692":[7693],"7694":[7695],"7696":[7697],"7698":[7699],"7700":[7701],"7702":[7703],"7704":[7705],"7706":[7707],"7708":[7709],"7710":[7711],"7712":[7713],"7714":[7715],"7716":[7717],"7718":[7719],"7720":[7721],"7722":[7723],"7724":[7725],"7726":[7727],"7728":[7729],"7730":[7731],"7732":[7733],"7734":[7735],"7736":[7737],"7738":[7739],"7740":[7741],"7742":[7743],"7744":[7745],"7746":[7747],"7748":[7749],"7750":[7751],"7752":[7753],"7754":[7755],"7756":[7757],"7758":[7759],"7760":[7761],"7762":[7763],"7764":[7765],"7766":[7767],"7768":[7769],"7770":[7771],"7772":[7773],"7774":[7775],"7776":[7777],"7778":[7779],"7780":[7781],"7782":[7783],"7784":[7785],"7786":[7787],"7788":[7789],"7790":[7791],"7792":[7793],"7794":[7795],"7796":[7797],"7798":[7799],"7800":[7801],"7802":[7803],"7804":[7805],"7806":[7807],"7808":[7809],"7810":[7811],"7812":[7813],"7814":[7815],"7816":[7817],"7818":[7819],"7820":[7821],"7822":[7823],"7824":[7825],"7826":[7827],"7828":[7829],"7834":[97,702],"7835":[7777],"7838":[223],"7840":[7841],"7842":[7843],"7844":[7845],"7846":[7847],"7848":[7849],"7850":[7851],"7852":[7853],"7854":[7855],"7856":[7857],"7858":[7859],"7860":[7861],"7862":[7863],"7864":[7865],"7866":[7867],"7868":[7869],"7870":[7871],"7872":[7873],"7874":[7875],"7876":[7877],"7878":[7879],"7880":[7881],"7882":[7883],"7884":[7885],"7886":[7887],"7888":[7889],"7890":[7891],"7892":[7893],"7894":[7895],"7896":[7897],"7898":[7899],"7900":[7901],"7902":[7903],"7904":[7905],"7906":[7907],"7908":[7909],"7910":[7911],"7912":[7913],"7914":[7915],"7916":[7917],"7918":[7919],"7920":[7921],"7922":[7923],"7924":[7925],"7926":[7927],"7928":[7929],"7930":[7931],"7932":[7933],"7934":[7935],"7944":[7936],"7945":[7937],"7946":[7938],"7947":[7939],"7948":[7940],"7949":[7941],"7950":[7942],"7951":[7943],"7960":[7952],"7961":[7953],"7962":[7954],"7963":[7955],"7964":[7956],"7965":[7957],"7976":[7968],"7977":[7969],"7978":[7970],"7979":[7971],"7980":[7972],"7981":[7973],"7982":[7974],"7983":[7975],"7992":[7984],"7993":[7985],"7994":[7986],"7995":[7987],"7996":[7988],"7997":[7989],"7998":[7990],"7999":[7991],"8008":[8000],"8009":[8001],"8010":[8002],"8011":[8003],"8012":[8004],"8013":[8005],"8025":[8017],"8027":[8019],"8029":[8021],"8031":[8023],"8040":[8032],"8041":[8033],"8042":[8034],"8043":[8035],"8044":[8036],"8045":[8037],"8046":[8038],"8047":[8039],"8049":[940],"8051":[941],"8053":[942],"8055":[943],"8057":[972],"8059":[973],"8061":[974],"8064":[7936,953],"8065":[7937,953],"8066":[7938,953],"8067":[7939,953],"8068":[7940,953],"8069":[7941,953],"8070":[7942,953],"8071":[7943,953],"8072":[7936,953],"8073":[7937,953],"8074":[7938,953],"8075":[7939,953],"8076":[7940,953],"8077":[7941,953],"8078":[7942,953],"8079":[7943,953],"8080":[7968,953],"8081":[7969,953],"8082":[7970,953],"8083":[7971,953],"8084":[7972,953],"8085":[7973,953],"8086":[7974,953],"8087":[7975,953],"8088":[7968,953],"8089":[7969,953],"8090":[7970,953],"8091":[7971,953],"8092":[7972,953],"8093":[7973,953],"8094":[7974,953],"8095":[7975,953],"8096":[8032,953],"8097":[8033,953],"8098":[8034,953],"8099":[8035,953],"8100":[8036,953],"8101":[8037,953],"8102":[8038,953],"8103":[8039,953],"8104":[8032,953],"8105":[8033,953],"8106":[8034,953],"8107":[8035,953],"8108":[8036,953],"8109":[8037,953],"8110":[8038,953],"8111":[8039,953],"8114":[8048,953],"8115":[945,953],"8116":[940,953],"8119":[8118,953],"8120":[8112],"8121":[8113],"8122":[8048],"8123":[940],"8124":[945,953],"8125":[32,787],"8126":[953],"8127":[32,787],"8128":[32,834],"8129":[32,776,834],"8130":[8052,953],"8131":[951,953],"8132":[942,953],"8135":[8134,953],"8136":[8050],"8137":[941],"8138":[8052],"8139":[942],"8140":[951,953],"8141":[32,787,768],"8142":[32,787,769],"8143":[32,787,834],"8147":[912],"8152":[8144],"8153":[8145],"8154":[8054],"8155":[943],"8157":[32,788,768],"8158":[32,788,769],"8159":[32,788,834],"8163":[944],"8168":[8160],"8169":[8161],"8170":[8058],"8171":[973],"8172":[8165],"8173":[32,776,768],"8174":[32,776,769],"8175":[96],"8178":[8060,953],"8179":[969,953],"8180":[974,953],"8183":[8182,953],"8184":[8056],"8185":[972],"8186":[8060],"8187":[974],"8188":[969,953],"8189":[32,769],"8190":[32,788],"8192":[32],"8204":[],"8209":[8208],"8215":[32,819],"8239":[32],"8243":[8242,8242],"8244":[8242,8242,8242],"8246":[8245,8245],"8247":[8245,8245,8245],"8252":[33,33],"8254":[32,773],"8263":[63,63],"8264":[63,33],"8265":[33,63],"8279":[8242,8242,8242,8242],"8287":[32],"8304":[48],"8305":[105],"8308":[52],"8309":[53],"8310":[54],"8311":[55],"8312":[56],"8313":[57],"8314":[43],"8315":[8722],"8316":[61],"8317":[40],"8318":[41],"8319":[110],"8320":[48],"8321":[49],"8322":[50],"8323":[51],"8324":[52],"8325":[53],"8326":[54],"8327":[55],"8328":[56],"8329":[57],"8330":[43],"8331":[8722],"8332":[61],"8333":[40],"8334":[41],"8336":[97],"8337":[101],"8338":[111],"8339":[120],"8340":[601],"8341":[104],"8342":[107],"8343":[108],"8344":[109],"8345":[110],"8346":[112],"8347":[115],"8348":[116],"8360":[114,115],"8448":[97,47,99],"8449":[97,47,115],"8450":[99],"8451":[176,99],"8453":[99,47,111],"8454":[99,47,117],"8455":[603],"8457":[176,102],"8458":[103],"8459":[104],"8463":[295],"8464":[105],"8466":[108],"8469":[110],"8470":[110,111],"8473":[112],"8474":[113],"8475":[114],"8480":[115,109],"8481":[116,101,108],"8482":[116,109],"8484":[122],"8486":[969],"8488":[122],"8490":[107],"8491":[229],"8492":[98],"8493":[99],"8495":[101],"8497":[102],"8499":[109],"8500":[111],"8501":[1488],"8502":[1489],"8503":[1490],"8504":[1491],"8505":[105],"8507":[102,97,120],"8508":[960],"8509":[947],"8511":[960],"8512":[8721],"8517":[100],"8519":[101],"8520":[105],"8521":[106],"8528":[49,8260,55],"8529":[49,8260,57],"8530":[49,8260,49,48],"8531":[49,8260,51],"8532":[50,8260,51],"8533":[49,8260,53],"8534":[50,8260,53],"8535":[51,8260,53],"8536":[52,8260,53],"8537":[49,8260,54],"8538":[53,8260,54],"8539":[49,8260,56],"8540":[51,8260,56],"8541":[53,8260,56],"8542":[55,8260,56],"8543":[49,8260],"8544":[105],"8545":[105,105],"8546":[105,105,105],"8547":[105,118],"8548":[118],"8549":[118,105],"8550":[118,105,105],"8551":[118,105,105,105],"8552":[105,120],"8553":[120],"8554":[120,105],"8555":[120,105,105],"8556":[108],"8557":[99],"8558":[100],"8559":[109],"8560":[105],"8561":[105,105],"8562":[105,105,105],"8563":[105,118],"8564":[118],"8565":[118,105],"8566":[118,105,105],"8567":[118,105,105,105],"8568":[105,120],"8569":[120],"8570":[120,105],"8571":[120,105,105],"8572":[108],"8573":[99],"8574":[100],"8575":[109],"8585":[48,8260,51],"8748":[8747,8747],"8749":[8747,8747,8747],"8751":[8750,8750],"8752":[8750,8750,8750],"9001":[12296],"9002":[12297],"9312":[49],"9313":[50],"9314":[51],"9315":[52],"9316":[53],"9317":[54],"9318":[55],"9319":[56],"9320":[57],"9321":[49,48],"9322":[49,49],"9323":[49,50],"9324":[49,51],"9325":[49,52],"9326":[49,53],"9327":[49,54],"9328":[49,55],"9329":[49,56],"9330":[49,57],"9331":[50,48],"9332":[40,49,41],"9333":[40,50,41],"9334":[40,51,41],"9335":[40,52,41],"9336":[40,53,41],"9337":[40,54,41],"9338":[40,55,41],"9339":[40,56,41],"9340":[40,57,41],"9341":[40,49,48,41],"9342":[40,49,49,41],"9343":[40,49,50,41],"9344":[40,49,51,41],"9345":[40,49,52,41],"9346":[40,49,53,41],"9347":[40,49,54,41],"9348":[40,49,55,41],"9349":[40,49,56,41],"9350":[40,49,57,41],"9351":[40,50,48,41],"9372":[40,97,41],"9373":[40,98,41],"9374":[40,99,41],"9375":[40,100,41],"9376":[40,101,41],"9377":[40,102,41],"9378":[40,103,41],"9379":[40,104,41],"9380":[40,105,41],"9381":[40,106,41],"9382":[40,107,41],"9383":[40,108,41],"9384":[40,109,41],"9385":[40,110,41],"9386":[40,111,41],"9387":[40,112,41],"9388":[40,113,41],"9389":[40,114,41],"9390":[40,115,41],"9391":[40,116,41],"9392":[40,117,41],"9393":[40,118,41],"9394":[40,119,41],"9395":[40,120,41],"9396":[40,121,41],"9397":[40,122,41],"9398":[97],"9399":[98],"9400":[99],"9401":[100],"9402":[101],"9403":[102],"9404":[103],"9405":[104],"9406":[105],"9407":[106],"9408":[107],"9409":[108],"9410":[109],"9411":[110],"9412":[111],"9413":[112],"9414":[113],"9415":[114],"9416":[115],"9417":[116],"9418":[117],"9419":[118],"9420":[119],"9421":[120],"9422":[121],"9423":[122],"9424":[97],"9425":[98],"9426":[99],"9427":[100],"9428":[101],"9429":[102],"9430":[103],"9431":[104],"9432":[105],"9433":[106],"9434":[107],"9435":[108],"9436":[109],"9437":[110],"9438":[111],"9439":[112],"9440":[113],"9441":[114],"9442":[115],"9443":[116],"9444":[117],"9445":[118],"9446":[119],"9447":[120],"9448":[121],"9449":[122],"9450":[48],"10764":[8747,8747,8747,8747],"10868":[58,58,61],"10869":[61,61],"10870":[61,61,61],"10972":[10973,824],"11264":[11312],"11265":[11313],"11266":[11314],"11267":[11315],"11268":[11316],"11269":[11317],"11270":[11318],"11271":[11319],"11272":[11320],"11273":[11321],"11274":[11322],"11275":[11323],"11276":[11324],"11277":[11325],"11278":[11326],"11279":[11327],"11280":[11328],"11281":[11329],"11282":[11330],"11283":[11331],"11284":[11332],"11285":[11333],"11286":[11334],"11287":[11335],"11288":[11336],"11289":[11337],"11290":[11338],"11291":[11339],"11292":[11340],"11293":[11341],"11294":[11342],"11295":[11343],"11296":[11344],"11297":[11345],"11298":[11346],"11299":[11347],"11300":[11348],"11301":[11349],"11302":[11350],"11303":[11351],"11304":[11352],"11305":[11353],"11306":[11354],"11307":[11355],"11308":[11356],"11309":[11357],"11310":[11358],"11311":[11359],"11360":[11361],"11362":[619],"11363":[7549],"11364":[637],"11367":[11368],"11369":[11370],"11371":[11372],"11373":[593],"11374":[625],"11375":[592],"11376":[594],"11378":[11379],"11381":[11382],"11388":[106],"11389":[118],"11390":[575],"11391":[576],"11392":[11393],"11394":[11395],"11396":[11397],"11398":[11399],"11400":[11401],"11402":[11403],"11404":[11405],"11406":[11407],"11408":[11409],"11410":[11411],"11412":[11413],"11414":[11415],"11416":[11417],"11418":[11419],"11420":[11421],"11422":[11423],"11424":[11425],"11426":[11427],"11428":[11429],"11430":[11431],"11432":[11433],"11434":[11435],"11436":[11437],"11438":[11439],"11440":[11441],"11442":[11443],"11444":[11445],"11446":[11447],"11448":[11449],"11450":[11451],"11452":[11453],"11454":[11455],"11456":[11457],"11458":[11459],"11460":[11461],"11462":[11463],"11464":[11465],"11466":[11467],"11468":[11469],"11470":[11471],"11472":[11473],"11474":[11475],"11476":[11477],"11478":[11479],"11480":[11481],"11482":[11483],"11484":[11485],"11486":[11487],"11488":[11489],"11490":[11491],"11499":[11500],"11501":[11502],"11506":[11507],"11631":[11617],"11935":[27597],"12019":[40863],"12032":[19968],"12033":[20008],"12034":[20022],"12035":[20031],"12036":[20057],"12037":[20101],"12038":[20108],"12039":[20128],"12040":[20154],"12041":[20799],"12042":[20837],"12043":[20843],"12044":[20866],"12045":[20886],"12046":[20907],"12047":[20960],"12048":[20981],"12049":[20992],"12050":[21147],"12051":[21241],"12052":[21269],"12053":[21274],"12054":[21304],"12055":[21313],"12056":[21340],"12057":[21353],"12058":[21378],"12059":[21430],"12060":[21448],"12061":[21475],"12062":[22231],"12063":[22303],"12064":[22763],"12065":[22786],"12066":[22794],"12067":[22805],"12068":[22823],"12069":[22899],"12070":[23376],"12071":[23424],"12072":[23544],"12073":[23567],"12074":[23586],"12075":[23608],"12076":[23662],"12077":[23665],"12078":[24027],"12079":[24037],"12080":[24049],"12081":[24062],"12082":[24178],"12083":[24186],"12084":[24191],"12085":[24308],"12086":[24318],"12087":[24331],"12088":[24339],"12089":[24400],"12090":[24417],"12091":[24435],"12092":[24515],"12093":[25096],"12094":[25142],"12095":[25163],"12096":[25903],"12097":[25908],"12098":[25991],"12099":[26007],"12100":[26020],"12101":[26041],"12102":[26080],"12103":[26085],"12104":[26352],"12105":[26376],"12106":[26408],"12107":[27424],"12108":[27490],"12109":[27513],"12110":[27571],"12111":[27595],"12112":[27604],"12113":[27611],"12114":[27663],"12115":[27668],"12116":[27700],"12117":[28779],"12118":[29226],"12119":[29238],"12120":[29243],"12121":[29247],"12122":[29255],"12123":[29273],"12124":[29275],"12125":[29356],"12126":[29572],"12127":[29577],"12128":[29916],"12129":[29926],"12130":[29976],"12131":[29983],"12132":[29992],"12133":[30000],"12134":[30091],"12135":[30098],"12136":[30326],"12137":[30333],"12138":[30382],"12139":[30399],"12140":[30446],"12141":[30683],"12142":[30690],"12143":[30707],"12144":[31034],"12145":[31160],"12146":[31166],"12147":[31348],"12148":[31435],"12149":[31481],"12150":[31859],"12151":[31992],"12152":[32566],"12153":[32593],"12154":[32650],"12155":[32701],"12156":[32769],"12157":[32780],"12158":[32786],"12159":[32819],"12160":[32895],"12161":[32905],"12162":[33251],"12163":[33258],"12164":[33267],"12165":[33276],"12166":[33292],"12167":[33307],"12168":[33311],"12169":[33390],"12170":[33394],"12171":[33400],"12172":[34381],"12173":[34411],"12174":[34880],"12175":[34892],"12176":[34915],"12177":[35198],"12178":[35211],"12179":[35282],"12180":[35328],"12181":[35895],"12182":[35910],"12183":[35925],"12184":[35960],"12185":[35997],"12186":[36196],"12187":[36208],"12188":[36275],"12189":[36523],"12190":[36554],"12191":[36763],"12192":[36784],"12193":[36789],"12194":[37009],"12195":[37193],"12196":[37318],"12197":[37324],"12198":[37329],"12199":[38263],"12200":[38272],"12201":[38428],"12202":[38582],"12203":[38585],"12204":[38632],"12205":[38737],"12206":[38750],"12207":[38754],"12208":[38761],"12209":[38859],"12210":[38893],"12211":[38899],"12212":[38913],"12213":[39080],"12214":[39131],"12215":[39135],"12216":[39318],"12217":[39321],"12218":[39340],"12219":[39592],"12220":[39640],"12221":[39647],"12222":[39717],"12223":[39727],"12224":[39730],"12225":[39740],"12226":[39770],"12227":[40165],"12228":[40565],"12229":[40575],"12230":[40613],"12231":[40635],"12232":[40643],"12233":[40653],"12234":[40657],"12235":[40697],"12236":[40701],"12237":[40718],"12238":[40723],"12239":[40736],"12240":[40763],"12241":[40778],"12242":[40786],"12243":[40845],"12244":[40860],"12245":[40864],"12288":[32],"12290":[46],"12342":[12306],"12344":[21313],"12345":[21316],"12346":[21317],"12443":[32,12441],"12444":[32,12442],"12447":[12424,12426],"12543":[12467,12488],"12593":[4352],"12594":[4353],"12595":[4522],"12596":[4354],"12597":[4524],"12598":[4525],"12599":[4355],"12600":[4356],"12601":[4357],"12602":[4528],"12603":[4529],"12604":[4530],"12605":[4531],"12606":[4532],"12607":[4533],"12608":[4378],"12609":[4358],"12610":[4359],"12611":[4360],"12612":[4385],"12613":[4361],"12614":[4362],"12615":[4363],"12616":[4364],"12617":[4365],"12618":[4366],"12619":[4367],"12620":[4368],"12621":[4369],"12622":[4370],"12623":[4449],"12624":[4450],"12625":[4451],"12626":[4452],"12627":[4453],"12628":[4454],"12629":[4455],"12630":[4456],"12631":[4457],"12632":[4458],"12633":[4459],"12634":[4460],"12635":[4461],"12636":[4462],"12637":[4463],"12638":[4464],"12639":[4465],"12640":[4466],"12641":[4467],"12642":[4468],"12643":[4469],"12645":[4372],"12646":[4373],"12647":[4551],"12648":[4552],"12649":[4556],"12650":[4558],"12651":[4563],"12652":[4567],"12653":[4569],"12654":[4380],"12655":[4573],"12656":[4575],"12657":[4381],"12658":[4382],"12659":[4384],"12660":[4386],"12661":[4387],"12662":[4391],"12663":[4393],"12664":[4395],"12665":[4396],"12666":[4397],"12667":[4398],"12668":[4399],"12669":[4402],"12670":[4406],"12671":[4416],"12672":[4423],"12673":[4428],"12674":[4593],"12675":[4594],"12676":[4439],"12677":[4440],"12678":[4441],"12679":[4484],"12680":[4485],"12681":[4488],"12682":[4497],"12683":[4498],"12684":[4500],"12685":[4510],"12686":[4513],"12690":[19968],"12691":[20108],"12692":[19977],"12693":[22235],"12694":[19978],"12695":[20013],"12696":[19979],"12697":[30002],"12698":[20057],"12699":[19993],"12700":[19969],"12701":[22825],"12702":[22320],"12703":[20154],"12800":[40,4352,41],"12801":[40,4354,41],"12802":[40,4355,41],"12803":[40,4357,41],"12804":[40,4358,41],"12805":[40,4359,41],"12806":[40,4361,41],"12807":[40,4363,41],"12808":[40,4364,41],"12809":[40,4366,41],"12810":[40,4367,41],"12811":[40,4368,41],"12812":[40,4369,41],"12813":[40,4370,41],"12814":[40,44032,41],"12815":[40,45208,41],"12816":[40,45796,41],"12817":[40,46972,41],"12818":[40,47560,41],"12819":[40,48148,41],"12820":[40,49324,41],"12821":[40,50500,41],"12822":[40,51088,41],"12823":[40,52264,41],"12824":[40,52852,41],"12825":[40,53440,41],"12826":[40,54028,41],"12827":[40,54616,41],"12828":[40,51452,41],"12829":[40,50724,51204,41],"12830":[40,50724,54980,41],"12832":[40,19968,41],"12833":[40,20108,41],"12834":[40,19977,41],"12835":[40,22235,41],"12836":[40,20116,41],"12837":[40,20845,41],"12838":[40,19971,41],"12839":[40,20843,41],"12840":[40,20061,41],"12841":[40,21313,41],"12842":[40,26376,41],"12843":[40,28779,41],"12844":[40,27700,41],"12845":[40,26408,41],"12846":[40,37329,41],"12847":[40,22303,41],"12848":[40,26085,41],"12849":[40,26666,41],"12850":[40,26377,41],"12851":[40,31038,41],"12852":[40,21517,41],"12853":[40,29305,41],"12854":[40,36001,41],"12855":[40,31069,41],"12856":[40,21172,41],"12857":[40,20195,41],"12858":[40,21628,41],"12859":[40,23398,41],"12860":[40,30435,41],"12861":[40,20225,41],"12862":[40,36039,41],"12863":[40,21332,41],"12864":[40,31085,41],"12865":[40,20241,41],"12866":[40,33258,41],"12867":[40,33267,41],"12868":[21839],"12869":[24188],"12870":[25991],"12871":[31631],"12880":[112,116,101],"12881":[50,49],"12882":[50,50],"12883":[50,51],"12884":[50,52],"12885":[50,53],"12886":[50,54],"12887":[50,55],"12888":[50,56],"12889":[50,57],"12890":[51,48],"12891":[51,49],"12892":[51,50],"12893":[51,51],"12894":[51,52],"12895":[51,53],"12896":[4352],"12897":[4354],"12898":[4355],"12899":[4357],"12900":[4358],"12901":[4359],"12902":[4361],"12903":[4363],"12904":[4364],"12905":[4366],"12906":[4367],"12907":[4368],"12908":[4369],"12909":[4370],"12910":[44032],"12911":[45208],"12912":[45796],"12913":[46972],"12914":[47560],"12915":[48148],"12916":[49324],"12917":[50500],"12918":[51088],"12919":[52264],"12920":[52852],"12921":[53440],"12922":[54028],"12923":[54616],"12924":[52280,44256],"12925":[51452,51032],"12926":[50864],"12928":[19968],"12929":[20108],"12930":[19977],"12931":[22235],"12932":[20116],"12933":[20845],"12934":[19971],"12935":[20843],"12936":[20061],"12937":[21313],"12938":[26376],"12939":[28779],"12940":[27700],"12941":[26408],"12942":[37329],"12943":[22303],"12944":[26085],"12945":[26666],"12946":[26377],"12947":[31038],"12948":[21517],"12949":[29305],"12950":[36001],"12951":[31069],"12952":[21172],"12953":[31192],"12954":[30007],"12955":[22899],"12956":[36969],"12957":[20778],"12958":[21360],"12959":[27880],"12960":[38917],"12961":[20241],"12962":[20889],"12963":[27491],"12964":[19978],"12965":[20013],"12966":[19979],"12967":[24038],"12968":[21491],"12969":[21307],"12970":[23447],"12971":[23398],"12972":[30435],"12973":[20225],"12974":[36039],"12975":[21332],"12976":[22812],"12977":[51,54],"12978":[51,55],"12979":[51,56],"12980":[51,57],"12981":[52,48],"12982":[52,49],"12983":[52,50],"12984":[52,51],"12985":[52,52],"12986":[52,53],"12987":[52,54],"12988":[52,55],"12989":[52,56],"12990":[52,57],"12991":[53,48],"12992":[49,26376],"12993":[50,26376],"12994":[51,26376],"12995":[52,26376],"12996":[53,26376],"12997":[54,26376],"12998":[55,26376],"12999":[56,26376],"13000":[57,26376],"13001":[49,48,26376],"13002":[49,49,26376],"13003":[49,50,26376],"13004":[104,103],"13005":[101,114,103],"13006":[101,118],"13007":[108,116,100],"13008":[12450],"13009":[12452],"13010":[12454],"13011":[12456],"13012":[12458],"13013":[12459],"13014":[12461],"13015":[12463],"13016":[12465],"13017":[12467],"13018":[12469],"13019":[12471],"13020":[12473],"13021":[12475],"13022":[12477],"13023":[12479],"13024":[12481],"13025":[12484],"13026":[12486],"13027":[12488],"13028":[12490],"13029":[12491],"13030":[12492],"13031":[12493],"13032":[12494],"13033":[12495],"13034":[12498],"13035":[12501],"13036":[12504],"13037":[12507],"13038":[12510],"13039":[12511],"13040":[12512],"13041":[12513],"13042":[12514],"13043":[12516],"13044":[12518],"13045":[12520],"13046":[12521],"13047":[12522],"13048":[12523],"13049":[12524],"13050":[12525],"13051":[12527],"13052":[12528],"13053":[12529],"13054":[12530],"13055":[20196,21644],"13056":[12450,12497,12540,12488],"13057":[12450,12523,12501,12449],"13058":[12450,12531,12506,12450],"13059":[12450,12540,12523],"13060":[12452,12491,12531,12464],"13061":[12452,12531,12481],"13062":[12454,12457,12531],"13063":[12456,12473,12463,12540,12489],"13064":[12456,12540,12459,12540],"13065":[12458,12531,12473],"13066":[12458,12540,12512],"13067":[12459,12452,12522],"13068":[12459,12521,12483,12488],"13069":[12459,12525,12522,12540],"13070":[12460,12525,12531],"13071":[12460,12531,12510],"13072":[12462,12460],"13073":[12462,12491,12540],"13074":[12461,12517,12522,12540],"13075":[12462,12523,12480,12540],"13076":[12461,12525],"13077":[12461,12525,12464,12521,12512],"13078":[12461,12525,12513,12540,12488,12523],"13079":[12461,12525,12527,12483,12488],"13080":[12464,12521,12512],"13081":[12464,12521,12512,12488,12531],"13082":[12463,12523,12476,12452,12525],"13083":[12463,12525,12540,12493],"13084":[12465,12540,12473],"13085":[12467,12523,12490],"13086":[12467,12540,12509],"13087":[12469,12452,12463,12523],"13088":[12469,12531,12481,12540,12512],"13089":[12471,12522,12531,12464],"13090":[12475,12531,12481],"13091":[12475,12531,12488],"13092":[12480,12540,12473],"13093":[12487,12471],"13094":[12489,12523],"13095":[12488,12531],"13096":[12490,12494],"13097":[12494,12483,12488],"13098":[12495,12452,12484],"13099":[12497,12540,12475,12531,12488],"13100":[12497,12540,12484],"13101":[12496,12540,12524,12523],"13102":[12500,12450,12473,12488,12523],"13103":[12500,12463,12523],"13104":[12500,12467],"13105":[12499,12523],"13106":[12501,12449,12521,12483,12489],"13107":[12501,12451,12540,12488],"13108":[12502,12483,12471,12455,12523],"13109":[12501,12521,12531],"13110":[12504,12463,12479,12540,12523],"13111":[12506,12477],"13112":[12506,12491,12498],"13113":[12504,12523,12484],"13114":[12506,12531,12473],"13115":[12506,12540,12472],"13116":[12505,12540,12479],"13117":[12509,12452,12531,12488],"13118":[12508,12523,12488],"13119":[12507,12531],"13120":[12509,12531,12489],"13121":[12507,12540,12523],"13122":[12507,12540,12531],"13123":[12510,12452,12463,12525],"13124":[12510,12452,12523],"13125":[12510,12483,12495],"13126":[12510,12523,12463],"13127":[12510,12531,12471,12519,12531],"13128":[12511,12463,12525,12531],"13129":[12511,12522],"13130":[12511,12522,12496,12540,12523],"13131":[12513,12460],"13132":[12513,12460,12488,12531],"13133":[12513,12540,12488,12523],"13134":[12516,12540,12489],"13135":[12516,12540,12523],"13136":[12518,12450,12531],"13137":[12522,12483,12488,12523],"13138":[12522,12521],"13139":[12523,12500,12540],"13140":[12523,12540,12502,12523],"13141":[12524,12512],"13142":[12524,12531,12488,12466,12531],"13143":[12527,12483,12488],"13144":[48,28857],"13145":[49,28857],"13146":[50,28857],"13147":[51,28857],"13148":[52,28857],"13149":[53,28857],"13150":[54,28857],"13151":[55,28857],"13152":[56,28857],"13153":[57,28857],"13154":[49,48,28857],"13155":[49,49,28857],"13156":[49,50,28857],"13157":[49,51,28857],"13158":[49,52,28857],"13159":[49,53,28857],"13160":[49,54,28857],"13161":[49,55,28857],"13162":[49,56,28857],"13163":[49,57,28857],"13164":[50,48,28857],"13165":[50,49,28857],"13166":[50,50,28857],"13167":[50,51,28857],"13168":[50,52,28857],"13169":[104,112,97],"13170":[100,97],"13171":[97,117],"13172":[98,97,114],"13173":[111,118],"13174":[112,99],"13175":[100,109],"13176":[100,109,50],"13177":[100,109,51],"13178":[105,117],"13179":[24179,25104],"13180":[26157,21644],"13181":[22823,27491],"13182":[26126,27835],"13183":[26666,24335,20250,31038],"13184":[112,97],"13185":[110,97],"13186":[956,97],"13187":[109,97],"13188":[107,97],"13189":[107,98],"13190":[109,98],"13191":[103,98],"13192":[99,97,108],"13193":[107,99,97,108],"13194":[112,102],"13195":[110,102],"13196":[956,102],"13197":[956,103],"13198":[109,103],"13199":[107,103],"13200":[104,122],"13201":[107,104,122],"13202":[109,104,122],"13203":[103,104,122],"13204":[116,104,122],"13205":[956,108],"13206":[109,108],"13207":[100,108],"13208":[107,108],"13209":[102,109],"13210":[110,109],"13211":[956,109],"13212":[109,109],"13213":[99,109],"13214":[107,109],"13215":[109,109,50],"13216":[99,109,50],"13217":[109,50],"13218":[107,109,50],"13219":[109,109,51],"13220":[99,109,51],"13221":[109,51],"13222":[107,109,51],"13223":[109,8725,115],"13224":[109,8725,115,50],"13225":[112,97],"13226":[107,112,97],"13227":[109,112,97],"13228":[103,112,97],"13229":[114,97,100],"13230":[114,97,100,8725,115],"13231":[114,97,100,8725,115,50],"13232":[112,115],"13233":[110,115],"13234":[956,115],"13235":[109,115],"13236":[112,118],"13237":[110,118],"13238":[956,118],"13239":[109,118],"13240":[107,118],"13241":[109,118],"13242":[112,119],"13243":[110,119],"13244":[956,119],"13245":[109,119],"13246":[107,119],"13247":[109,119],"13248":[107,969],"13249":[109,969],"13251":[98,113],"13252":[99,99],"13253":[99,100],"13254":[99,8725,107,103],"13256":[100,98],"13257":[103,121],"13258":[104,97],"13259":[104,112],"13260":[105,110],"13261":[107,107],"13262":[107,109],"13263":[107,116],"13264":[108,109],"13265":[108,110],"13266":[108,111,103],"13267":[108,120],"13268":[109,98],"13269":[109,105,108],"13270":[109,111,108],"13271":[112,104],"13273":[112,112,109],"13274":[112,114],"13275":[115,114],"13276":[115,118],"13277":[119,98],"13278":[118,8725,109],"13279":[97,8725,109],"13280":[49,26085],"13281":[50,26085],"13282":[51,26085],"13283":[52,26085],"13284":[53,26085],"13285":[54,26085],"13286":[55,26085],"13287":[56,26085],"13288":[57,26085],"13289":[49,48,26085],"13290":[49,49,26085],"13291":[49,50,26085],"13292":[49,51,26085],"13293":[49,52,26085],"13294":[49,53,26085],"13295":[49,54,26085],"13296":[49,55,26085],"13297":[49,56,26085],"13298":[49,57,26085],"13299":[50,48,26085],"13300":[50,49,26085],"13301":[50,50,26085],"13302":[50,51,26085],"13303":[50,52,26085],"13304":[50,53,26085],"13305":[50,54,26085],"13306":[50,55,26085],"13307":[50,56,26085],"13308":[50,57,26085],"13309":[51,48,26085],"13310":[51,49,26085],"13311":[103,97,108],"42560":[42561],"42562":[42563],"42564":[42565],"42566":[42567],"42568":[42569],"42570":[42571],"42572":[42573],"42574":[42575],"42576":[42577],"42578":[42579],"42580":[42581],"42582":[42583],"42584":[42585],"42586":[42587],"42588":[42589],"42590":[42591],"42592":[42593],"42594":[42595],"42596":[42597],"42598":[42599],"42600":[42601],"42602":[42603],"42604":[42605],"42624":[42625],"42626":[42627],"42628":[42629],"42630":[42631],"42632":[42633],"42634":[42635],"42636":[42637],"42638":[42639],"42640":[42641],"42642":[42643],"42644":[42645],"42646":[42647],"42648":[42649],"42650":[42651],"42652":[1098],"42653":[1100],"42786":[42787],"42788":[42789],"42790":[42791],"42792":[42793],"42794":[42795],"42796":[42797],"42798":[42799],"42802":[42803],"42804":[42805],"42806":[42807],"42808":[42809],"42810":[42811],"42812":[42813],"42814":[42815],"42816":[42817],"42818":[42819],"42820":[42821],"42822":[42823],"42824":[42825],"42826":[42827],"42828":[42829],"42830":[42831],"42832":[42833],"42834":[42835],"42836":[42837],"42838":[42839],"42840":[42841],"42842":[42843],"42844":[42845],"42846":[42847],"42848":[42849],"42850":[42851],"42852":[42853],"42854":[42855],"42856":[42857],"42858":[42859],"42860":[42861],"42862":[42863],"42864":[42863],"42873":[42874],"42875":[42876],"42877":[7545],"42878":[42879],"42880":[42881],"42882":[42883],"42884":[42885],"42886":[42887],"42891":[42892],"42893":[613],"42896":[42897],"42898":[42899],"42902":[42903],"42904":[42905],"42906":[42907],"42908":[42909],"42910":[42911],"42912":[42913],"42914":[42915],"42916":[42917],"42918":[42919],"42920":[42921],"42922":[614],"42923":[604],"42924":[609],"42925":[620],"42926":[618],"42928":[670],"42929":[647],"42930":[669],"42931":[43859],"42932":[42933],"42934":[42935],"42936":[42937],"42938":[42939],"42940":[42941],"42942":[42943],"42944":[42945],"42946":[42947],"42948":[42900],"42949":[642],"42950":[7566],"42951":[42952],"42953":[42954],"42960":[42961],"42966":[42967],"42968":[42969],"42994":[99],"42995":[102],"42996":[113],"42997":[42998],"43000":[295],"43001":[339],"43868":[42791],"43869":[43831],"43870":[619],"43871":[43858],"43881":[653],"43888":[5024],"43889":[5025],"43890":[5026],"43891":[5027],"43892":[5028],"43893":[5029],"43894":[5030],"43895":[5031],"43896":[5032],"43897":[5033],"43898":[5034],"43899":[5035],"43900":[5036],"43901":[5037],"43902":[5038],"43903":[5039],"43904":[5040],"43905":[5041],"43906":[5042],"43907":[5043],"43908":[5044],"43909":[5045],"43910":[5046],"43911":[5047],"43912":[5048],"43913":[5049],"43914":[5050],"43915":[5051],"43916":[5052],"43917":[5053],"43918":[5054],"43919":[5055],"43920":[5056],"43921":[5057],"43922":[5058],"43923":[5059],"43924":[5060],"43925":[5061],"43926":[5062],"43927":[5063],"43928":[5064],"43929":[5065],"43930":[5066],"43931":[5067],"43932":[5068],"43933":[5069],"43934":[5070],"43935":[5071],"43936":[5072],"43937":[5073],"43938":[5074],"43939":[5075],"43940":[5076],"43941":[5077],"43942":[5078],"43943":[5079],"43944":[5080],"43945":[5081],"43946":[5082],"43947":[5083],"43948":[5084],"43949":[5085],"43950":[5086],"43951":[5087],"43952":[5088],"43953":[5089],"43954":[5090],"43955":[5091],"43956":[5092],"43957":[5093],"43958":[5094],"43959":[5095],"43960":[5096],"43961":[5097],"43962":[5098],"43963":[5099],"43964":[5100],"43965":[5101],"43966":[5102],"43967":[5103],"63744":[35912],"63745":[26356],"63746":[36554],"63747":[36040],"63748":[28369],"63749":[20018],"63750":[21477],"63751":[40860],"63753":[22865],"63754":[37329],"63755":[21895],"63756":[22856],"63757":[25078],"63758":[30313],"63759":[32645],"63760":[34367],"63761":[34746],"63762":[35064],"63763":[37007],"63764":[27138],"63765":[27931],"63766":[28889],"63767":[29662],"63768":[33853],"63769":[37226],"63770":[39409],"63771":[20098],"63772":[21365],"63773":[27396],"63774":[29211],"63775":[34349],"63776":[40478],"63777":[23888],"63778":[28651],"63779":[34253],"63780":[35172],"63781":[25289],"63782":[33240],"63783":[34847],"63784":[24266],"63785":[26391],"63786":[28010],"63787":[29436],"63788":[37070],"63789":[20358],"63790":[20919],"63791":[21214],"63792":[25796],"63793":[27347],"63794":[29200],"63795":[30439],"63796":[32769],"63797":[34310],"63798":[34396],"63799":[36335],"63800":[38706],"63801":[39791],"63802":[40442],"63803":[30860],"63804":[31103],"63805":[32160],"63806":[33737],"63807":[37636],"63808":[40575],"63809":[35542],"63810":[22751],"63811":[24324],"63812":[31840],"63813":[32894],"63814":[29282],"63815":[30922],"63816":[36034],"63817":[38647],"63818":[22744],"63819":[23650],"63820":[27155],"63821":[28122],"63822":[28431],"63823":[32047],"63824":[32311],"63825":[38475],"63826":[21202],"63827":[32907],"63828":[20956],"63829":[20940],"63830":[31260],"63831":[32190],"63832":[33777],"63833":[38517],"63834":[35712],"63835":[25295],"63836":[27138],"63837":[35582],"63838":[20025],"63839":[23527],"63840":[24594],"63841":[29575],"63842":[30064],"63843":[21271],"63844":[30971],"63845":[20415],"63846":[24489],"63847":[19981],"63848":[27852],"63849":[25976],"63850":[32034],"63851":[21443],"63852":[22622],"63853":[30465],"63854":[33865],"63855":[35498],"63856":[27578],"63857":[36784],"63858":[27784],"63859":[25342],"63860":[33509],"63861":[25504],"63862":[30053],"63863":[20142],"63864":[20841],"63865":[20937],"63866":[26753],"63867":[31975],"63868":[33391],"63869":[35538],"63870":[37327],"63871":[21237],"63872":[21570],"63873":[22899],"63874":[24300],"63875":[26053],"63876":[28670],"63877":[31018],"63878":[38317],"63879":[39530],"63880":[40599],"63881":[40654],"63882":[21147],"63883":[26310],"63884":[27511],"63885":[36706],"63886":[24180],"63887":[24976],"63888":[25088],"63889":[25754],"63890":[28451],"63891":[29001],"63892":[29833],"63893":[31178],"63894":[32244],"63895":[32879],"63896":[36646],"63897":[34030],"63898":[36899],"63899":[37706],"63900":[21015],"63901":[21155],"63902":[21693],"63903":[28872],"63904":[35010],"63905":[35498],"63906":[24265],"63907":[24565],"63908":[25467],"63909":[27566],"63910":[31806],"63911":[29557],"63912":[20196],"63913":[22265],"63914":[23527],"63915":[23994],"63916":[24604],"63917":[29618],"63918":[29801],"63919":[32666],"63920":[32838],"63921":[37428],"63922":[38646],"63923":[38728],"63924":[38936],"63925":[20363],"63926":[31150],"63927":[37300],"63928":[38584],"63929":[24801],"63930":[20102],"63931":[20698],"63932":[23534],"63933":[23615],"63934":[26009],"63935":[27138],"63936":[29134],"63937":[30274],"63938":[34044],"63939":[36988],"63940":[40845],"63941":[26248],"63942":[38446],"63943":[21129],"63944":[26491],"63945":[26611],"63946":[27969],"63947":[28316],"63948":[29705],"63949":[30041],"63950":[30827],"63951":[32016],"63952":[39006],"63953":[20845],"63954":[25134],"63955":[38520],"63956":[20523],"63957":[23833],"63958":[28138],"63959":[36650],"63960":[24459],"63961":[24900],"63962":[26647],"63963":[29575],"63964":[38534],"63965":[21033],"63966":[21519],"63967":[23653],"63968":[26131],"63969":[26446],"63970":[26792],"63971":[27877],"63972":[29702],"63973":[30178],"63974":[32633],"63975":[35023],"63976":[35041],"63977":[37324],"63978":[38626],"63979":[21311],"63980":[28346],"63981":[21533],"63982":[29136],"63983":[29848],"63984":[34298],"63985":[38563],"63986":[40023],"63987":[40607],"63988":[26519],"63989":[28107],"63990":[33256],"63991":[31435],"63992":[31520],"63993":[31890],"63994":[29376],"63995":[28825],"63996":[35672],"63997":[20160],"63998":[33590],"63999":[21050],"64000":[20999],"64001":[24230],"64002":[25299],"64003":[31958],"64004":[23429],"64005":[27934],"64006":[26292],"64007":[36667],"64008":[34892],"64009":[38477],"64010":[35211],"64011":[24275],"64012":[20800],"64013":[21952],"64016":[22618],"64018":[26228],"64021":[20958],"64022":[29482],"64023":[30410],"64024":[31036],"64025":[31070],"64026":[31077],"64027":[31119],"64028":[38742],"64029":[31934],"64030":[32701],"64032":[34322],"64034":[35576],"64037":[36920],"64038":[37117],"64042":[39151],"64043":[39164],"64044":[39208],"64045":[40372],"64046":[37086],"64047":[38583],"64048":[20398],"64049":[20711],"64050":[20813],"64051":[21193],"64052":[21220],"64053":[21329],"64054":[21917],"64055":[22022],"64056":[22120],"64057":[22592],"64058":[22696],"64059":[23652],"64060":[23662],"64061":[24724],"64062":[24936],"64063":[24974],"64064":[25074],"64065":[25935],"64066":[26082],"64067":[26257],"64068":[26757],"64069":[28023],"64070":[28186],"64071":[28450],"64072":[29038],"64073":[29227],"64074":[29730],"64075":[30865],"64076":[31038],"64077":[31049],"64078":[31048],"64079":[31056],"64080":[31062],"64081":[31069],"64082":[31117],"64083":[31118],"64084":[31296],"64085":[31361],"64086":[31680],"64087":[32244],"64088":[32265],"64089":[32321],"64090":[32626],"64091":[32773],"64092":[33261],"64093":[33401],"64095":[33879],"64096":[35088],"64097":[35222],"64098":[35585],"64099":[35641],"64100":[36051],"64101":[36104],"64102":[36790],"64103":[36920],"64104":[38627],"64105":[38911],"64106":[38971],"64107":[24693],"64108":[148206],"64109":[33304],"64112":[20006],"64113":[20917],"64114":[20840],"64115":[20352],"64116":[20805],"64117":[20864],"64118":[21191],"64119":[21242],"64120":[21917],"64121":[21845],"64122":[21913],"64123":[21986],"64124":[22618],"64125":[22707],"64126":[22852],"64127":[22868],"64128":[23138],"64129":[23336],"64130":[24274],"64131":[24281],"64132":[24425],"64133":[24493],"64134":[24792],"64135":[24910],"64136":[24840],"64137":[24974],"64138":[24928],"64139":[25074],"64140":[25140],"64141":[25540],"64142":[25628],"64143":[25682],"64144":[25942],"64145":[26228],"64146":[26391],"64147":[26395],"64148":[26454],"64149":[27513],"64150":[27578],"64151":[27969],"64152":[28379],"64153":[28363],"64154":[28450],"64155":[28702],"64156":[29038],"64157":[30631],"64158":[29237],"64159":[29359],"64160":[29482],"64161":[29809],"64162":[29958],"64163":[30011],"64164":[30237],"64165":[30239],"64166":[30410],"64167":[30427],"64168":[30452],"64169":[30538],"64170":[30528],"64171":[30924],"64172":[31409],"64173":[31680],"64174":[31867],"64175":[32091],"64176":[32244],"64177":[32574],"64178":[32773],"64179":[33618],"64180":[33775],"64181":[34681],"64182":[35137],"64183":[35206],"64184":[35222],"64185":[35519],"64186":[35576],"64187":[35531],"64188":[35585],"64189":[35582],"64190":[35565],"64191":[35641],"64192":[35722],"64193":[36104],"64194":[36664],"64195":[36978],"64196":[37273],"64197":[37494],"64198":[38524],"64199":[38627],"64200":[38742],"64201":[38875],"64202":[38911],"64203":[38923],"64204":[38971],"64205":[39698],"64206":[40860],"64207":[141386],"64208":[141380],"64209":[144341],"64210":[15261],"64211":[16408],"64212":[16441],"64213":[152137],"64214":[154832],"64215":[163539],"64216":[40771],"64217":[40846],"64256":[102,102],"64257":[102,105],"64258":[102,108],"64259":[102,102,105],"64260":[102,102,108],"64261":[115,116],"64275":[1396,1398],"64276":[1396,1381],"64277":[1396,1387],"64278":[1406,1398],"64279":[1396,1389],"64285":[1497,1460],"64287":[1522,1463],"64288":[1506],"64289":[1488],"64290":[1491],"64291":[1492],"64292":[1499],"64293":[1500],"64294":[1501],"64295":[1512],"64296":[1514],"64297":[43],"64298":[1513,1473],"64299":[1513,1474],"64300":[1513,1468,1473],"64301":[1513,1468,1474],"64302":[1488,1463],"64303":[1488,1464],"64304":[1488,1468],"64305":[1489,1468],"64306":[1490,1468],"64307":[1491,1468],"64308":[1492,1468],"64309":[1493,1468],"64310":[1494,1468],"64312":[1496,1468],"64313":[1497,1468],"64314":[1498,1468],"64315":[1499,1468],"64316":[1500,1468],"64318":[1502,1468],"64320":[1504,1468],"64321":[1505,1468],"64323":[1507,1468],"64324":[1508,1468],"64326":[1510,1468],"64327":[1511,1468],"64328":[1512,1468],"64329":[1513,1468],"64330":[1514,1468],"64331":[1493,1465],"64332":[1489,1471],"64333":[1499,1471],"64334":[1508,1471],"64335":[1488,1500],"64336":[1649],"64338":[1659],"64342":[1662],"64346":[1664],"64350":[1658],"64354":[1663],"64358":[1657],"64362":[1700],"64366":[1702],"64370":[1668],"64374":[1667],"64378":[1670],"64382":[1671],"64386":[1677],"64388":[1676],"64390":[1678],"64392":[1672],"64394":[1688],"64396":[1681],"64398":[1705],"64402":[1711],"64406":[1715],"64410":[1713],"64414":[1722],"64416":[1723],"64420":[1728],"64422":[1729],"64426":[1726],"64430":[1746],"64432":[1747],"64467":[1709],"64471":[1735],"64473":[1734],"64475":[1736],"64477":[1735,1652],"64478":[1739],"64480":[1733],"64482":[1737],"64484":[1744],"64488":[1609],"64490":[1574,1575],"64492":[1574,1749],"64494":[1574,1608],"64496":[1574,1735],"64498":[1574,1734],"64500":[1574,1736],"64502":[1574,1744],"64505":[1574,1609],"64508":[1740],"64512":[1574,1580],"64513":[1574,1581],"64514":[1574,1605],"64515":[1574,1609],"64516":[1574,1610],"64517":[1576,1580],"64518":[1576,1581],"64519":[1576,1582],"64520":[1576,1605],"64521":[1576,1609],"64522":[1576,1610],"64523":[1578,1580],"64524":[1578,1581],"64525":[1578,1582],"64526":[1578,1605],"64527":[1578,1609],"64528":[1578,1610],"64529":[1579,1580],"64530":[1579,1605],"64531":[1579,1609],"64532":[1579,1610],"64533":[1580,1581],"64534":[1580,1605],"64535":[1581,1580],"64536":[1581,1605],"64537":[1582,1580],"64538":[1582,1581],"64539":[1582,1605],"64540":[1587,1580],"64541":[1587,1581],"64542":[1587,1582],"64543":[1587,1605],"64544":[1589,1581],"64545":[1589,1605],"64546":[1590,1580],"64547":[1590,1581],"64548":[1590,1582],"64549":[1590,1605],"64550":[1591,1581],"64551":[1591,1605],"64552":[1592,1605],"64553":[1593,1580],"64554":[1593,1605],"64555":[1594,1580],"64556":[1594,1605],"64557":[1601,1580],"64558":[1601,1581],"64559":[1601,1582],"64560":[1601,1605],"64561":[1601,1609],"64562":[1601,1610],"64563":[1602,1581],"64564":[1602,1605],"64565":[1602,1609],"64566":[1602,1610],"64567":[1603,1575],"64568":[1603,1580],"64569":[1603,1581],"64570":[1603,1582],"64571":[1603,1604],"64572":[1603,1605],"64573":[1603,1609],"64574":[1603,1610],"64575":[1604,1580],"64576":[1604,1581],"64577":[1604,1582],"64578":[1604,1605],"64579":[1604,1609],"64580":[1604,1610],"64581":[1605,1580],"64582":[1605,1581],"64583":[1605,1582],"64584":[1605,1605],"64585":[1605,1609],"64586":[1605,1610],"64587":[1606,1580],"64588":[1606,1581],"64589":[1606,1582],"64590":[1606,1605],"64591":[1606,1609],"64592":[1606,1610],"64593":[1607,1580],"64594":[1607,1605],"64595":[1607,1609],"64596":[1607,1610],"64597":[1610,1580],"64598":[1610,1581],"64599":[1610,1582],"64600":[1610,1605],"64601":[1610,1609],"64602":[1610,1610],"64603":[1584,1648],"64604":[1585,1648],"64605":[1609,1648],"64606":[32,1612,1617],"64607":[32,1613,1617],"64608":[32,1614,1617],"64609":[32,1615,1617],"64610":[32,1616,1617],"64611":[32,1617,1648],"64612":[1574,1585],"64613":[1574,1586],"64614":[1574,1605],"64615":[1574,1606],"64616":[1574,1609],"64617":[1574,1610],"64618":[1576,1585],"64619":[1576,1586],"64620":[1576,1605],"64621":[1576,1606],"64622":[1576,1609],"64623":[1576,1610],"64624":[1578,1585],"64625":[1578,1586],"64626":[1578,1605],"64627":[1578,1606],"64628":[1578,1609],"64629":[1578,1610],"64630":[1579,1585],"64631":[1579,1586],"64632":[1579,1605],"64633":[1579,1606],"64634":[1579,1609],"64635":[1579,1610],"64636":[1601,1609],"64637":[1601,1610],"64638":[1602,1609],"64639":[1602,1610],"64640":[1603,1575],"64641":[1603,1604],"64642":[1603,1605],"64643":[1603,1609],"64644":[1603,1610],"64645":[1604,1605],"64646":[1604,1609],"64647":[1604,1610],"64648":[1605,1575],"64649":[1605,1605],"64650":[1606,1585],"64651":[1606,1586],"64652":[1606,1605],"64653":[1606,1606],"64654":[1606,1609],"64655":[1606,1610],"64656":[1609,1648],"64657":[1610,1585],"64658":[1610,1586],"64659":[1610,1605],"64660":[1610,1606],"64661":[1610,1609],"64662":[1610,1610],"64663":[1574,1580],"64664":[1574,1581],"64665":[1574,1582],"64666":[1574,1605],"64667":[1574,1607],"64668":[1576,1580],"64669":[1576,1581],"64670":[1576,1582],"64671":[1576,1605],"64672":[1576,1607],"64673":[1578,1580],"64674":[1578,1581],"64675":[1578,1582],"64676":[1578,1605],"64677":[1578,1607],"64678":[1579,1605],"64679":[1580,1581],"64680":[1580,1605],"64681":[1581,1580],"64682":[1581,1605],"64683":[1582,1580],"64684":[1582,1605],"64685":[1587,1580],"64686":[1587,1581],"64687":[1587,1582],"64688":[1587,1605],"64689":[1589,1581],"64690":[1589,1582],"64691":[1589,1605],"64692":[1590,1580],"64693":[1590,1581],"64694":[1590,1582],"64695":[1590,1605],"64696":[1591,1581],"64697":[1592,1605],"64698":[1593,1580],"64699":[1593,1605],"64700":[1594,1580],"64701":[1594,1605],"64702":[1601,1580],"64703":[1601,1581],"64704":[1601,1582],"64705":[1601,1605],"64706":[1602,1581],"64707":[1602,1605],"64708":[1603,1580],"64709":[1603,1581],"64710":[1603,1582],"64711":[1603,1604],"64712":[1603,1605],"64713":[1604,1580],"64714":[1604,1581],"64715":[1604,1582],"64716":[1604,1605],"64717":[1604,1607],"64718":[1605,1580],"64719":[1605,1581],"64720":[1605,1582],"64721":[1605,1605],"64722":[1606,1580],"64723":[1606,1581],"64724":[1606,1582],"64725":[1606,1605],"64726":[1606,1607],"64727":[1607,1580],"64728":[1607,1605],"64729":[1607,1648],"64730":[1610,1580],"64731":[1610,1581],"64732":[1610,1582],"64733":[1610,1605],"64734":[1610,1607],"64735":[1574,1605],"64736":[1574,1607],"64737":[1576,1605],"64738":[1576,1607],"64739":[1578,1605],"64740":[1578,1607],"64741":[1579,1605],"64742":[1579,1607],"64743":[1587,1605],"64744":[1587,1607],"64745":[1588,1605],"64746":[1588,1607],"64747":[1603,1604],"64748":[1603,1605],"64749":[1604,1605],"64750":[1606,1605],"64751":[1606,1607],"64752":[1610,1605],"64753":[1610,1607],"64754":[1600,1614,1617],"64755":[1600,1615,1617],"64756":[1600,1616,1617],"64757":[1591,1609],"64758":[1591,1610],"64759":[1593,1609],"64760":[1593,1610],"64761":[1594,1609],"64762":[1594,1610],"64763":[1587,1609],"64764":[1587,1610],"64765":[1588,1609],"64766":[1588,1610],"64767":[1581,1609],"64768":[1581,1610],"64769":[1580,1609],"64770":[1580,1610],"64771":[1582,1609],"64772":[1582,1610],"64773":[1589,1609],"64774":[1589,1610],"64775":[1590,1609],"64776":[1590,1610],"64777":[1588,1580],"64778":[1588,1581],"64779":[1588,1582],"64780":[1588,1605],"64781":[1588,1585],"64782":[1587,1585],"64783":[1589,1585],"64784":[1590,1585],"64785":[1591,1609],"64786":[1591,1610],"64787":[1593,1609],"64788":[1593,1610],"64789":[1594,1609],"64790":[1594,1610],"64791":[1587,1609],"64792":[1587,1610],"64793":[1588,1609],"64794":[1588,1610],"64795":[1581,1609],"64796":[1581,1610],"64797":[1580,1609],"64798":[1580,1610],"64799":[1582,1609],"64800":[1582,1610],"64801":[1589,1609],"64802":[1589,1610],"64803":[1590,1609],"64804":[1590,1610],"64805":[1588,1580],"64806":[1588,1581],"64807":[1588,1582],"64808":[1588,1605],"64809":[1588,1585],"64810":[1587,1585],"64811":[1589,1585],"64812":[1590,1585],"64813":[1588,1580],"64814":[1588,1581],"64815":[1588,1582],"64816":[1588,1605],"64817":[1587,1607],"64818":[1588,1607],"64819":[1591,1605],"64820":[1587,1580],"64821":[1587,1581],"64822":[1587,1582],"64823":[1588,1580],"64824":[1588,1581],"64825":[1588,1582],"64826":[1591,1605],"64827":[1592,1605],"64828":[1575,1611],"64848":[1578,1580,1605],"64849":[1578,1581,1580],"64851":[1578,1581,1605],"64852":[1578,1582,1605],"64853":[1578,1605,1580],"64854":[1578,1605,1581],"64855":[1578,1605,1582],"64856":[1580,1605,1581],"64858":[1581,1605,1610],"64859":[1581,1605,1609],"64860":[1587,1581,1580],"64861":[1587,1580,1581],"64862":[1587,1580,1609],"64863":[1587,1605,1581],"64865":[1587,1605,1580],"64866":[1587,1605,1605],"64868":[1589,1581,1581],"64870":[1589,1605,1605],"64871":[1588,1581,1605],"64873":[1588,1580,1610],"64874":[1588,1605,1582],"64876":[1588,1605,1605],"64878":[1590,1581,1609],"64879":[1590,1582,1605],"64881":[1591,1605,1581],"64883":[1591,1605,1605],"64884":[1591,1605,1610],"64885":[1593,1580,1605],"64886":[1593,1605,1605],"64888":[1593,1605,1609],"64889":[1594,1605,1605],"64890":[1594,1605,1610],"64891":[1594,1605,1609],"64892":[1601,1582,1605],"64894":[1602,1605,1581],"64895":[1602,1605,1605],"64896":[1604,1581,1605],"64897":[1604,1581,1610],"64898":[1604,1581,1609],"64899":[1604,1580,1580],"64901":[1604,1582,1605],"64903":[1604,1605,1581],"64905":[1605,1581,1580],"64906":[1605,1581,1605],"64907":[1605,1581,1610],"64908":[1605,1580,1581],"64909":[1605,1580,1605],"64910":[1605,1582,1580],"64911":[1605,1582,1605],"64914":[1605,1580,1582],"64915":[1607,1605,1580],"64916":[1607,1605,1605],"64917":[1606,1581,1605],"64918":[1606,1581,1609],"64919":[1606,1580,1605],"64921":[1606,1580,1609],"64922":[1606,1605,1610],"64923":[1606,1605,1609],"64924":[1610,1605,1605],"64926":[1576,1582,1610],"64927":[1578,1580,1610],"64928":[1578,1580,1609],"64929":[1578,1582,1610],"64930":[1578,1582,1609],"64931":[1578,1605,1610],"64932":[1578,1605,1609],"64933":[1580,1605,1610],"64934":[1580,1581,1609],"64935":[1580,1605,1609],"64936":[1587,1582,1609],"64937":[1589,1581,1610],"64938":[1588,1581,1610],"64939":[1590,1581,1610],"64940":[1604,1580,1610],"64941":[1604,1605,1610],"64942":[1610,1581,1610],"64943":[1610,1580,1610],"64944":[1610,1605,1610],"64945":[1605,1605,1610],"64946":[1602,1605,1610],"64947":[1606,1581,1610],"64948":[1602,1605,1581],"64949":[1604,1581,1605],"64950":[1593,1605,1610],"64951":[1603,1605,1610],"64952":[1606,1580,1581],"64953":[1605,1582,1610],"64954":[1604,1580,1605],"64955":[1603,1605,1605],"64956":[1604,1580,1605],"64957":[1606,1580,1581],"64958":[1580,1581,1610],"64959":[1581,1580,1610],"64960":[1605,1580,1610],"64961":[1601,1605,1610],"64962":[1576,1581,1610],"64963":[1603,1605,1605],"64964":[1593,1580,1605],"64965":[1589,1605,1605],"64966":[1587,1582,1610],"64967":[1606,1580,1610],"65008":[1589,1604,1746],"65009":[1602,1604,1746],"65010":[1575,1604,1604,1607],"65011":[1575,1603,1576,1585],"65012":[1605,1581,1605,1583],"65013":[1589,1604,1593,1605],"65014":[1585,1587,1608,1604],"65015":[1593,1604,1610,1607],"65016":[1608,1587,1604,1605],"65017":[1589,1604,1609],"65018":[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],"65019":[1580,1604,32,1580,1604,1575,1604,1607],"65020":[1585,1740,1575,1604],"65040":[44],"65041":[12289],"65043":[58],"65044":[59],"65045":[33],"65046":[63],"65047":[12310],"65048":[12311],"65073":[8212],"65074":[8211],"65075":[95],"65077":[40],"65078":[41],"65079":[123],"65080":[125],"65081":[12308],"65082":[12309],"65083":[12304],"65084":[12305],"65085":[12298],"65086":[12299],"65087":[12296],"65088":[12297],"65089":[12300],"65090":[12301],"65091":[12302],"65092":[12303],"65095":[91],"65096":[93],"65097":[32,773],"65101":[95],"65104":[44],"65105":[12289],"65108":[59],"65109":[58],"65110":[63],"65111":[33],"65112":[8212],"65113":[40],"65114":[41],"65115":[123],"65116":[125],"65117":[12308],"65118":[12309],"65119":[35],"65120":[38],"65121":[42],"65122":[43],"65123":[45],"65124":[60],"65125":[62],"65126":[61],"65128":[92],"65129":[36],"65130":[37],"65131":[64],"65136":[32,1611],"65137":[1600,1611],"65138":[32,1612],"65140":[32,1613],"65142":[32,1614],"65143":[1600,1614],"65144":[32,1615],"65145":[1600,1615],"65146":[32,1616],"65147":[1600,1616],"65148":[32,1617],"65149":[1600,1617],"65150":[32,1618],"65151":[1600,1618],"65152":[1569],"65153":[1570],"65155":[1571],"65157":[1572],"65159":[1573],"65161":[1574],"65165":[1575],"65167":[1576],"65171":[1577],"65173":[1578],"65177":[1579],"65181":[1580],"65185":[1581],"65189":[1582],"65193":[1583],"65195":[1584],"65197":[1585],"65199":[1586],"65201":[1587],"65205":[1588],"65209":[1589],"65213":[1590],"65217":[1591],"65221":[1592],"65225":[1593],"65229":[1594],"65233":[1601],"65237":[1602],"65241":[1603],"65245":[1604],"65249":[1605],"65253":[1606],"65257":[1607],"65261":[1608],"65263":[1609],"65265":[1610],"65269":[1604,1570],"65271":[1604,1571],"65273":[1604,1573],"65275":[1604,1575],"65281":[33],"65282":[34],"65283":[35],"65284":[36],"65285":[37],"65286":[38],"65287":[39],"65288":[40],"65289":[41],"65290":[42],"65291":[43],"65292":[44],"65293":[45],"65294":[46],"65295":[47],"65296":[48],"65297":[49],"65298":[50],"65299":[51],"65300":[52],"65301":[53],"65302":[54],"65303":[55],"65304":[56],"65305":[57],"65306":[58],"65307":[59],"65308":[60],"65309":[61],"65310":[62],"65311":[63],"65312":[64],"65313":[97],"65314":[98],"65315":[99],"65316":[100],"65317":[101],"65318":[102],"65319":[103],"65320":[104],"65321":[105],"65322":[106],"65323":[107],"65324":[108],"65325":[109],"65326":[110],"65327":[111],"65328":[112],"65329":[113],"65330":[114],"65331":[115],"65332":[116],"65333":[117],"65334":[118],"65335":[119],"65336":[120],"65337":[121],"65338":[122],"65339":[91],"65340":[92],"65341":[93],"65342":[94],"65343":[95],"65344":[96],"65345":[97],"65346":[98],"65347":[99],"65348":[100],"65349":[101],"65350":[102],"65351":[103],"65352":[104],"65353":[105],"65354":[106],"65355":[107],"65356":[108],"65357":[109],"65358":[110],"65359":[111],"65360":[112],"65361":[113],"65362":[114],"65363":[115],"65364":[116],"65365":[117],"65366":[118],"65367":[119],"65368":[120],"65369":[121],"65370":[122],"65371":[123],"65372":[124],"65373":[125],"65374":[126],"65375":[10629],"65376":[10630],"65377":[46],"65378":[12300],"65379":[12301],"65380":[12289],"65381":[12539],"65382":[12530],"65383":[12449],"65384":[12451],"65385":[12453],"65386":[12455],"65387":[12457],"65388":[12515],"65389":[12517],"65390":[12519],"65391":[12483],"65392":[12540],"65393":[12450],"65394":[12452],"65395":[12454],"65396":[12456],"65397":[12458],"65398":[12459],"65399":[12461],"65400":[12463],"65401":[12465],"65402":[12467],"65403":[12469],"65404":[12471],"65405":[12473],"65406":[12475],"65407":[12477],"65408":[12479],"65409":[12481],"65410":[12484],"65411":[12486],"65412":[12488],"65413":[12490],"65414":[12491],"65415":[12492],"65416":[12493],"65417":[12494],"65418":[12495],"65419":[12498],"65420":[12501],"65421":[12504],"65422":[12507],"65423":[12510],"65424":[12511],"65425":[12512],"65426":[12513],"65427":[12514],"65428":[12516],"65429":[12518],"65430":[12520],"65431":[12521],"65432":[12522],"65433":[12523],"65434":[12524],"65435":[12525],"65436":[12527],"65437":[12531],"65438":[12441],"65439":[12442],"65441":[4352],"65442":[4353],"65443":[4522],"65444":[4354],"65445":[4524],"65446":[4525],"65447":[4355],"65448":[4356],"65449":[4357],"65450":[4528],"65451":[4529],"65452":[4530],"65453":[4531],"65454":[4532],"65455":[4533],"65456":[4378],"65457":[4358],"65458":[4359],"65459":[4360],"65460":[4385],"65461":[4361],"65462":[4362],"65463":[4363],"65464":[4364],"65465":[4365],"65466":[4366],"65467":[4367],"65468":[4368],"65469":[4369],"65470":[4370],"65474":[4449],"65475":[4450],"65476":[4451],"65477":[4452],"65478":[4453],"65479":[4454],"65482":[4455],"65483":[4456],"65484":[4457],"65485":[4458],"65486":[4459],"65487":[4460],"65490":[4461],"65491":[4462],"65492":[4463],"65493":[4464],"65494":[4465],"65495":[4466],"65498":[4467],"65499":[4468],"65500":[4469],"65504":[162],"65505":[163],"65506":[172],"65507":[32,772],"65508":[166],"65509":[165],"65510":[8361],"65512":[9474],"65513":[8592],"65514":[8593],"65515":[8594],"65516":[8595],"65517":[9632],"65518":[9675],"66560":[66600],"66561":[66601],"66562":[66602],"66563":[66603],"66564":[66604],"66565":[66605],"66566":[66606],"66567":[66607],"66568":[66608],"66569":[66609],"66570":[66610],"66571":[66611],"66572":[66612],"66573":[66613],"66574":[66614],"66575":[66615],"66576":[66616],"66577":[66617],"66578":[66618],"66579":[66619],"66580":[66620],"66581":[66621],"66582":[66622],"66583":[66623],"66584":[66624],"66585":[66625],"66586":[66626],"66587":[66627],"66588":[66628],"66589":[66629],"66590":[66630],"66591":[66631],"66592":[66632],"66593":[66633],"66594":[66634],"66595":[66635],"66596":[66636],"66597":[66637],"66598":[66638],"66599":[66639],"66736":[66776],"66737":[66777],"66738":[66778],"66739":[66779],"66740":[66780],"66741":[66781],"66742":[66782],"66743":[66783],"66744":[66784],"66745":[66785],"66746":[66786],"66747":[66787],"66748":[66788],"66749":[66789],"66750":[66790],"66751":[66791],"66752":[66792],"66753":[66793],"66754":[66794],"66755":[66795],"66756":[66796],"66757":[66797],"66758":[66798],"66759":[66799],"66760":[66800],"66761":[66801],"66762":[66802],"66763":[66803],"66764":[66804],"66765":[66805],"66766":[66806],"66767":[66807],"66768":[66808],"66769":[66809],"66770":[66810],"66771":[66811],"66928":[66967],"66929":[66968],"66930":[66969],"66931":[66970],"66932":[66971],"66933":[66972],"66934":[66973],"66935":[66974],"66936":[66975],"66937":[66976],"66938":[66977],"66940":[66979],"66941":[66980],"66942":[66981],"66943":[66982],"66944":[66983],"66945":[66984],"66946":[66985],"66947":[66986],"66948":[66987],"66949":[66988],"66950":[66989],"66951":[66990],"66952":[66991],"66953":[66992],"66954":[66993],"66956":[66995],"66957":[66996],"66958":[66997],"66959":[66998],"66960":[66999],"66961":[67000],"66962":[67001],"66964":[67003],"66965":[67004],"67457":[720],"67458":[721],"67459":[230],"67460":[665],"67461":[595],"67463":[675],"67464":[43878],"67465":[677],"67466":[676],"67467":[598],"67468":[599],"67469":[7569],"67470":[600],"67471":[606],"67472":[681],"67473":[612],"67474":[610],"67475":[608],"67476":[667],"67477":[295],"67478":[668],"67479":[615],"67480":[644],"67481":[682],"67482":[683],"67483":[620],"67484":[122628],"67485":[42894],"67486":[622],"67487":[122629],"67488":[654],"67489":[122630],"67490":[248],"67491":[630],"67492":[631],"67493":[113],"67494":[634],"67495":[122632],"67496":[637],"67497":[638],"67498":[640],"67499":[680],"67500":[678],"67501":[43879],"67502":[679],"67503":[648],"67504":[11377],"67506":[655],"67507":[673],"67508":[674],"67509":[664],"67510":[448],"67511":[449],"67512":[450],"67513":[122634],"67514":[122654],"68736":[68800],"68737":[68801],"68738":[68802],"68739":[68803],"68740":[68804],"68741":[68805],"68742":[68806],"68743":[68807],"68744":[68808],"68745":[68809],"68746":[68810],"68747":[68811],"68748":[68812],"68749":[68813],"68750":[68814],"68751":[68815],"68752":[68816],"68753":[68817],"68754":[68818],"68755":[68819],"68756":[68820],"68757":[68821],"68758":[68822],"68759":[68823],"68760":[68824],"68761":[68825],"68762":[68826],"68763":[68827],"68764":[68828],"68765":[68829],"68766":[68830],"68767":[68831],"68768":[68832],"68769":[68833],"68770":[68834],"68771":[68835],"68772":[68836],"68773":[68837],"68774":[68838],"68775":[68839],"68776":[68840],"68777":[68841],"68778":[68842],"68779":[68843],"68780":[68844],"68781":[68845],"68782":[68846],"68783":[68847],"68784":[68848],"68785":[68849],"68786":[68850],"71840":[71872],"71841":[71873],"71842":[71874],"71843":[71875],"71844":[71876],"71845":[71877],"71846":[71878],"71847":[71879],"71848":[71880],"71849":[71881],"71850":[71882],"71851":[71883],"71852":[71884],"71853":[71885],"71854":[71886],"71855":[71887],"71856":[71888],"71857":[71889],"71858":[71890],"71859":[71891],"71860":[71892],"71861":[71893],"71862":[71894],"71863":[71895],"71864":[71896],"71865":[71897],"71866":[71898],"71867":[71899],"71868":[71900],"71869":[71901],"71870":[71902],"71871":[71903],"93760":[93792],"93761":[93793],"93762":[93794],"93763":[93795],"93764":[93796],"93765":[93797],"93766":[93798],"93767":[93799],"93768":[93800],"93769":[93801],"93770":[93802],"93771":[93803],"93772":[93804],"93773":[93805],"93774":[93806],"93775":[93807],"93776":[93808],"93777":[93809],"93778":[93810],"93779":[93811],"93780":[93812],"93781":[93813],"93782":[93814],"93783":[93815],"93784":[93816],"93785":[93817],"93786":[93818],"93787":[93819],"93788":[93820],"93789":[93821],"93790":[93822],"93791":[93823],"119134":[119127,119141],"119135":[119128,119141],"119136":[119128,119141,119150],"119137":[119128,119141,119151],"119138":[119128,119141,119152],"119139":[119128,119141,119153],"119140":[119128,119141,119154],"119227":[119225,119141],"119228":[119226,119141],"119229":[119225,119141,119150],"119230":[119226,119141,119150],"119231":[119225,119141,119151],"119232":[119226,119141,119151],"119808":[97],"119809":[98],"119810":[99],"119811":[100],"119812":[101],"119813":[102],"119814":[103],"119815":[104],"119816":[105],"119817":[106],"119818":[107],"119819":[108],"119820":[109],"119821":[110],"119822":[111],"119823":[112],"119824":[113],"119825":[114],"119826":[115],"119827":[116],"119828":[117],"119829":[118],"119830":[119],"119831":[120],"119832":[121],"119833":[122],"119834":[97],"119835":[98],"119836":[99],"119837":[100],"119838":[101],"119839":[102],"119840":[103],"119841":[104],"119842":[105],"119843":[106],"119844":[107],"119845":[108],"119846":[109],"119847":[110],"119848":[111],"119849":[112],"119850":[113],"119851":[114],"119852":[115],"119853":[116],"119854":[117],"119855":[118],"119856":[119],"119857":[120],"119858":[121],"119859":[122],"119860":[97],"119861":[98],"119862":[99],"119863":[100],"119864":[101],"119865":[102],"119866":[103],"119867":[104],"119868":[105],"119869":[106],"119870":[107],"119871":[108],"119872":[109],"119873":[110],"119874":[111],"119875":[112],"119876":[113],"119877":[114],"119878":[115],"119879":[116],"119880":[117],"119881":[118],"119882":[119],"119883":[120],"119884":[121],"119885":[122],"119886":[97],"119887":[98],"119888":[99],"119889":[100],"119890":[101],"119891":[102],"119892":[103],"119894":[105],"119895":[106],"119896":[107],"119897":[108],"119898":[109],"119899":[110],"119900":[111],"119901":[112],"119902":[113],"119903":[114],"119904":[115],"119905":[116],"119906":[117],"119907":[118],"119908":[119],"119909":[120],"119910":[121],"119911":[122],"119912":[97],"119913":[98],"119914":[99],"119915":[100],"119916":[101],"119917":[102],"119918":[103],"119919":[104],"119920":[105],"119921":[106],"119922":[107],"119923":[108],"119924":[109],"119925":[110],"119926":[111],"119927":[112],"119928":[113],"119929":[114],"119930":[115],"119931":[116],"119932":[117],"119933":[118],"119934":[119],"119935":[120],"119936":[121],"119937":[122],"119938":[97],"119939":[98],"119940":[99],"119941":[100],"119942":[101],"119943":[102],"119944":[103],"119945":[104],"119946":[105],"119947":[106],"119948":[107],"119949":[108],"119950":[109],"119951":[110],"119952":[111],"119953":[112],"119954":[113],"119955":[114],"119956":[115],"119957":[116],"119958":[117],"119959":[118],"119960":[119],"119961":[120],"119962":[121],"119963":[122],"119964":[97],"119966":[99],"119967":[100],"119970":[103],"119973":[106],"119974":[107],"119977":[110],"119978":[111],"119979":[112],"119980":[113],"119982":[115],"119983":[116],"119984":[117],"119985":[118],"119986":[119],"119987":[120],"119988":[121],"119989":[122],"119990":[97],"119991":[98],"119992":[99],"119993":[100],"119995":[102],"119997":[104],"119998":[105],"119999":[106],"120000":[107],"120001":[108],"120002":[109],"120003":[110],"120005":[112],"120006":[113],"120007":[114],"120008":[115],"120009":[116],"120010":[117],"120011":[118],"120012":[119],"120013":[120],"120014":[121],"120015":[122],"120016":[97],"120017":[98],"120018":[99],"120019":[100],"120020":[101],"120021":[102],"120022":[103],"120023":[104],"120024":[105],"120025":[106],"120026":[107],"120027":[108],"120028":[109],"120029":[110],"120030":[111],"120031":[112],"120032":[113],"120033":[114],"120034":[115],"120035":[116],"120036":[117],"120037":[118],"120038":[119],"120039":[120],"120040":[121],"120041":[122],"120042":[97],"120043":[98],"120044":[99],"120045":[100],"120046":[101],"120047":[102],"120048":[103],"120049":[104],"120050":[105],"120051":[106],"120052":[107],"120053":[108],"120054":[109],"120055":[110],"120056":[111],"120057":[112],"120058":[113],"120059":[114],"120060":[115],"120061":[116],"120062":[117],"120063":[118],"120064":[119],"120065":[120],"120066":[121],"120067":[122],"120068":[97],"120069":[98],"120071":[100],"120072":[101],"120073":[102],"120074":[103],"120077":[106],"120078":[107],"120079":[108],"120080":[109],"120081":[110],"120082":[111],"120083":[112],"120084":[113],"120086":[115],"120087":[116],"120088":[117],"120089":[118],"120090":[119],"120091":[120],"120092":[121],"120094":[97],"120095":[98],"120096":[99],"120097":[100],"120098":[101],"120099":[102],"120100":[103],"120101":[104],"120102":[105],"120103":[106],"120104":[107],"120105":[108],"120106":[109],"120107":[110],"120108":[111],"120109":[112],"120110":[113],"120111":[114],"120112":[115],"120113":[116],"120114":[117],"120115":[118],"120116":[119],"120117":[120],"120118":[121],"120119":[122],"120120":[97],"120121":[98],"120123":[100],"120124":[101],"120125":[102],"120126":[103],"120128":[105],"120129":[106],"120130":[107],"120131":[108],"120132":[109],"120134":[111],"120138":[115],"120139":[116],"120140":[117],"120141":[118],"120142":[119],"120143":[120],"120144":[121],"120146":[97],"120147":[98],"120148":[99],"120149":[100],"120150":[101],"120151":[102],"120152":[103],"120153":[104],"120154":[105],"120155":[106],"120156":[107],"120157":[108],"120158":[109],"120159":[110],"120160":[111],"120161":[112],"120162":[113],"120163":[114],"120164":[115],"120165":[116],"120166":[117],"120167":[118],"120168":[119],"120169":[120],"120170":[121],"120171":[122],"120172":[97],"120173":[98],"120174":[99],"120175":[100],"120176":[101],"120177":[102],"120178":[103],"120179":[104],"120180":[105],"120181":[106],"120182":[107],"120183":[108],"120184":[109],"120185":[110],"120186":[111],"120187":[112],"120188":[113],"120189":[114],"120190":[115],"120191":[116],"120192":[117],"120193":[118],"120194":[119],"120195":[120],"120196":[121],"120197":[122],"120198":[97],"120199":[98],"120200":[99],"120201":[100],"120202":[101],"120203":[102],"120204":[103],"120205":[104],"120206":[105],"120207":[106],"120208":[107],"120209":[108],"120210":[109],"120211":[110],"120212":[111],"120213":[112],"120214":[113],"120215":[114],"120216":[115],"120217":[116],"120218":[117],"120219":[118],"120220":[119],"120221":[120],"120222":[121],"120223":[122],"120224":[97],"120225":[98],"120226":[99],"120227":[100],"120228":[101],"120229":[102],"120230":[103],"120231":[104],"120232":[105],"120233":[106],"120234":[107],"120235":[108],"120236":[109],"120237":[110],"120238":[111],"120239":[112],"120240":[113],"120241":[114],"120242":[115],"120243":[116],"120244":[117],"120245":[118],"120246":[119],"120247":[120],"120248":[121],"120249":[122],"120250":[97],"120251":[98],"120252":[99],"120253":[100],"120254":[101],"120255":[102],"120256":[103],"120257":[104],"120258":[105],"120259":[106],"120260":[107],"120261":[108],"120262":[109],"120263":[110],"120264":[111],"120265":[112],"120266":[113],"120267":[114],"120268":[115],"120269":[116],"120270":[117],"120271":[118],"120272":[119],"120273":[120],"120274":[121],"120275":[122],"120276":[97],"120277":[98],"120278":[99],"120279":[100],"120280":[101],"120281":[102],"120282":[103],"120283":[104],"120284":[105],"120285":[106],"120286":[107],"120287":[108],"120288":[109],"120289":[110],"120290":[111],"120291":[112],"120292":[113],"120293":[114],"120294":[115],"120295":[116],"120296":[117],"120297":[118],"120298":[119],"120299":[120],"120300":[121],"120301":[122],"120302":[97],"120303":[98],"120304":[99],"120305":[100],"120306":[101],"120307":[102],"120308":[103],"120309":[104],"120310":[105],"120311":[106],"120312":[107],"120313":[108],"120314":[109],"120315":[110],"120316":[111],"120317":[112],"120318":[113],"120319":[114],"120320":[115],"120321":[116],"120322":[117],"120323":[118],"120324":[119],"120325":[120],"120326":[121],"120327":[122],"120328":[97],"120329":[98],"120330":[99],"120331":[100],"120332":[101],"120333":[102],"120334":[103],"120335":[104],"120336":[105],"120337":[106],"120338":[107],"120339":[108],"120340":[109],"120341":[110],"120342":[111],"120343":[112],"120344":[113],"120345":[114],"120346":[115],"120347":[116],"120348":[117],"120349":[118],"120350":[119],"120351":[120],"120352":[121],"120353":[122],"120354":[97],"120355":[98],"120356":[99],"120357":[100],"120358":[101],"120359":[102],"120360":[103],"120361":[104],"120362":[105],"120363":[106],"120364":[107],"120365":[108],"120366":[109],"120367":[110],"120368":[111],"120369":[112],"120370":[113],"120371":[114],"120372":[115],"120373":[116],"120374":[117],"120375":[118],"120376":[119],"120377":[120],"120378":[121],"120379":[122],"120380":[97],"120381":[98],"120382":[99],"120383":[100],"120384":[101],"120385":[102],"120386":[103],"120387":[104],"120388":[105],"120389":[106],"120390":[107],"120391":[108],"120392":[109],"120393":[110],"120394":[111],"120395":[112],"120396":[113],"120397":[114],"120398":[115],"120399":[116],"120400":[117],"120401":[118],"120402":[119],"120403":[120],"120404":[121],"120405":[122],"120406":[97],"120407":[98],"120408":[99],"120409":[100],"120410":[101],"120411":[102],"120412":[103],"120413":[104],"120414":[105],"120415":[106],"120416":[107],"120417":[108],"120418":[109],"120419":[110],"120420":[111],"120421":[112],"120422":[113],"120423":[114],"120424":[115],"120425":[116],"120426":[117],"120427":[118],"120428":[119],"120429":[120],"120430":[121],"120431":[122],"120432":[97],"120433":[98],"120434":[99],"120435":[100],"120436":[101],"120437":[102],"120438":[103],"120439":[104],"120440":[105],"120441":[106],"120442":[107],"120443":[108],"120444":[109],"120445":[110],"120446":[111],"120447":[112],"120448":[113],"120449":[114],"120450":[115],"120451":[116],"120452":[117],"120453":[118],"120454":[119],"120455":[120],"120456":[121],"120457":[122],"120458":[97],"120459":[98],"120460":[99],"120461":[100],"120462":[101],"120463":[102],"120464":[103],"120465":[104],"120466":[105],"120467":[106],"120468":[107],"120469":[108],"120470":[109],"120471":[110],"120472":[111],"120473":[112],"120474":[113],"120475":[114],"120476":[115],"120477":[116],"120478":[117],"120479":[118],"120480":[119],"120481":[120],"120482":[121],"120483":[122],"120484":[305],"120485":[567],"120488":[945],"120489":[946],"120490":[947],"120491":[948],"120492":[949],"120493":[950],"120494":[951],"120495":[952],"120496":[953],"120497":[954],"120498":[955],"120499":[956],"120500":[957],"120501":[958],"120502":[959],"120503":[960],"120504":[961],"120505":[952],"120506":[963],"120507":[964],"120508":[965],"120509":[966],"120510":[967],"120511":[968],"120512":[969],"120513":[8711],"120514":[945],"120515":[946],"120516":[947],"120517":[948],"120518":[949],"120519":[950],"120520":[951],"120521":[952],"120522":[953],"120523":[954],"120524":[955],"120525":[956],"120526":[957],"120527":[958],"120528":[959],"120529":[960],"120530":[961],"120531":[963],"120533":[964],"120534":[965],"120535":[966],"120536":[967],"120537":[968],"120538":[969],"120539":[8706],"120540":[949],"120541":[952],"120542":[954],"120543":[966],"120544":[961],"120545":[960],"120546":[945],"120547":[946],"120548":[947],"120549":[948],"120550":[949],"120551":[950],"120552":[951],"120553":[952],"120554":[953],"120555":[954],"120556":[955],"120557":[956],"120558":[957],"120559":[958],"120560":[959],"120561":[960],"120562":[961],"120563":[952],"120564":[963],"120565":[964],"120566":[965],"120567":[966],"120568":[967],"120569":[968],"120570":[969],"120571":[8711],"120572":[945],"120573":[946],"120574":[947],"120575":[948],"120576":[949],"120577":[950],"120578":[951],"120579":[952],"120580":[953],"120581":[954],"120582":[955],"120583":[956],"120584":[957],"120585":[958],"120586":[959],"120587":[960],"120588":[961],"120589":[963],"120591":[964],"120592":[965],"120593":[966],"120594":[967],"120595":[968],"120596":[969],"120597":[8706],"120598":[949],"120599":[952],"120600":[954],"120601":[966],"120602":[961],"120603":[960],"120604":[945],"120605":[946],"120606":[947],"120607":[948],"120608":[949],"120609":[950],"120610":[951],"120611":[952],"120612":[953],"120613":[954],"120614":[955],"120615":[956],"120616":[957],"120617":[958],"120618":[959],"120619":[960],"120620":[961],"120621":[952],"120622":[963],"120623":[964],"120624":[965],"120625":[966],"120626":[967],"120627":[968],"120628":[969],"120629":[8711],"120630":[945],"120631":[946],"120632":[947],"120633":[948],"120634":[949],"120635":[950],"120636":[951],"120637":[952],"120638":[953],"120639":[954],"120640":[955],"120641":[956],"120642":[957],"120643":[958],"120644":[959],"120645":[960],"120646":[961],"120647":[963],"120649":[964],"120650":[965],"120651":[966],"120652":[967],"120653":[968],"120654":[969],"120655":[8706],"120656":[949],"120657":[952],"120658":[954],"120659":[966],"120660":[961],"120661":[960],"120662":[945],"120663":[946],"120664":[947],"120665":[948],"120666":[949],"120667":[950],"120668":[951],"120669":[952],"120670":[953],"120671":[954],"120672":[955],"120673":[956],"120674":[957],"120675":[958],"120676":[959],"120677":[960],"120678":[961],"120679":[952],"120680":[963],"120681":[964],"120682":[965],"120683":[966],"120684":[967],"120685":[968],"120686":[969],"120687":[8711],"120688":[945],"120689":[946],"120690":[947],"120691":[948],"120692":[949],"120693":[950],"120694":[951],"120695":[952],"120696":[953],"120697":[954],"120698":[955],"120699":[956],"120700":[957],"120701":[958],"120702":[959],"120703":[960],"120704":[961],"120705":[963],"120707":[964],"120708":[965],"120709":[966],"120710":[967],"120711":[968],"120712":[969],"120713":[8706],"120714":[949],"120715":[952],"120716":[954],"120717":[966],"120718":[961],"120719":[960],"120720":[945],"120721":[946],"120722":[947],"120723":[948],"120724":[949],"120725":[950],"120726":[951],"120727":[952],"120728":[953],"120729":[954],"120730":[955],"120731":[956],"120732":[957],"120733":[958],"120734":[959],"120735":[960],"120736":[961],"120737":[952],"120738":[963],"120739":[964],"120740":[965],"120741":[966],"120742":[967],"120743":[968],"120744":[969],"120745":[8711],"120746":[945],"120747":[946],"120748":[947],"120749":[948],"120750":[949],"120751":[950],"120752":[951],"120753":[952],"120754":[953],"120755":[954],"120756":[955],"120757":[956],"120758":[957],"120759":[958],"120760":[959],"120761":[960],"120762":[961],"120763":[963],"120765":[964],"120766":[965],"120767":[966],"120768":[967],"120769":[968],"120770":[969],"120771":[8706],"120772":[949],"120773":[952],"120774":[954],"120775":[966],"120776":[961],"120777":[960],"120778":[989],"120782":[48],"120783":[49],"120784":[50],"120785":[51],"120786":[52],"120787":[53],"120788":[54],"120789":[55],"120790":[56],"120791":[57],"120792":[48],"120793":[49],"120794":[50],"120795":[51],"120796":[52],"120797":[53],"120798":[54],"120799":[55],"120800":[56],"120801":[57],"120802":[48],"120803":[49],"120804":[50],"120805":[51],"120806":[52],"120807":[53],"120808":[54],"120809":[55],"120810":[56],"120811":[57],"120812":[48],"120813":[49],"120814":[50],"120815":[51],"120816":[52],"120817":[53],"120818":[54],"120819":[55],"120820":[56],"120821":[57],"120822":[48],"120823":[49],"120824":[50],"120825":[51],"120826":[52],"120827":[53],"120828":[54],"120829":[55],"120830":[56],"120831":[57],"122928":[1072],"122929":[1073],"122930":[1074],"122931":[1075],"122932":[1076],"122933":[1077],"122934":[1078],"122935":[1079],"122936":[1080],"122937":[1082],"122938":[1083],"122939":[1084],"122940":[1086],"122941":[1087],"122942":[1088],"122943":[1089],"122944":[1090],"122945":[1091],"122946":[1092],"122947":[1093],"122948":[1094],"122949":[1095],"122950":[1096],"122951":[1099],"122952":[1101],"122953":[1102],"122954":[42633],"122955":[1241],"122956":[1110],"122957":[1112],"122958":[1257],"122959":[1199],"122960":[1231],"122961":[1072],"122962":[1073],"122963":[1074],"122964":[1075],"122965":[1076],"122966":[1077],"122967":[1078],"122968":[1079],"122969":[1080],"122970":[1082],"122971":[1083],"122972":[1086],"122973":[1087],"122974":[1089],"122975":[1091],"122976":[1092],"122977":[1093],"122978":[1094],"122979":[1095],"122980":[1096],"122981":[1098],"122982":[1099],"122983":[1169],"122984":[1110],"122985":[1109],"122986":[1119],"122987":[1195],"122988":[42577],"122989":[1201],"125184":[125218],"125185":[125219],"125186":[125220],"125187":[125221],"125188":[125222],"125189":[125223],"125190":[125224],"125191":[125225],"125192":[125226],"125193":[125227],"125194":[125228],"125195":[125229],"125196":[125230],"125197":[125231],"125198":[125232],"125199":[125233],"125200":[125234],"125201":[125235],"125202":[125236],"125203":[125237],"125204":[125238],"125205":[125239],"125206":[125240],"125207":[125241],"125208":[125242],"125209":[125243],"125210":[125244],"125211":[125245],"125212":[125246],"125213":[125247],"125214":[125248],"125215":[125249],"125216":[125250],"125217":[125251],"126464":[1575],"126465":[1576],"126466":[1580],"126467":[1583],"126469":[1608],"126470":[1586],"126471":[1581],"126472":[1591],"126473":[1610],"126474":[1603],"126475":[1604],"126476":[1605],"126477":[1606],"126478":[1587],"126479":[1593],"126480":[1601],"126481":[1589],"126482":[1602],"126483":[1585],"126484":[1588],"126485":[1578],"126486":[1579],"126487":[1582],"126488":[1584],"126489":[1590],"126490":[1592],"126491":[1594],"126492":[1646],"126493":[1722],"126494":[1697],"126495":[1647],"126497":[1576],"126498":[1580],"126500":[1607],"126503":[1581],"126505":[1610],"126506":[1603],"126507":[1604],"126508":[1605],"126509":[1606],"126510":[1587],"126511":[1593],"126512":[1601],"126513":[1589],"126514":[1602],"126516":[1588],"126517":[1578],"126518":[1579],"126519":[1582],"126521":[1590],"126523":[1594],"126530":[1580],"126535":[1581],"126537":[1610],"126539":[1604],"126541":[1606],"126542":[1587],"126543":[1593],"126545":[1589],"126546":[1602],"126548":[1588],"126551":[1582],"126553":[1590],"126555":[1594],"126557":[1722],"126559":[1647],"126561":[1576],"126562":[1580],"126564":[1607],"126567":[1581],"126568":[1591],"126569":[1610],"126570":[1603],"126572":[1605],"126573":[1606],"126574":[1587],"126575":[1593],"126576":[1601],"126577":[1589],"126578":[1602],"126580":[1588],"126581":[1578],"126582":[1579],"126583":[1582],"126585":[1590],"126586":[1592],"126587":[1594],"126588":[1646],"126590":[1697],"126592":[1575],"126593":[1576],"126594":[1580],"126595":[1583],"126596":[1607],"126597":[1608],"126598":[1586],"126599":[1581],"126600":[1591],"126601":[1610],"126603":[1604],"126604":[1605],"126605":[1606],"126606":[1587],"126607":[1593],"126608":[1601],"126609":[1589],"126610":[1602],"126611":[1585],"126612":[1588],"126613":[1578],"126614":[1579],"126615":[1582],"126616":[1584],"126617":[1590],"126618":[1592],"126619":[1594],"126625":[1576],"126626":[1580],"126627":[1583],"126629":[1608],"126630":[1586],"126631":[1581],"126632":[1591],"126633":[1610],"126635":[1604],"126636":[1605],"126637":[1606],"126638":[1587],"126639":[1593],"126640":[1601],"126641":[1589],"126642":[1602],"126643":[1585],"126644":[1588],"126645":[1578],"126646":[1579],"126647":[1582],"126648":[1584],"126649":[1590],"126650":[1592],"126651":[1594],"127233":[48,44],"127234":[49,44],"127235":[50,44],"127236":[51,44],"127237":[52,44],"127238":[53,44],"127239":[54,44],"127240":[55,44],"127241":[56,44],"127242":[57,44],"127248":[40,97,41],"127249":[40,98,41],"127250":[40,99,41],"127251":[40,100,41],"127252":[40,101,41],"127253":[40,102,41],"127254":[40,103,41],"127255":[40,104,41],"127256":[40,105,41],"127257":[40,106,41],"127258":[40,107,41],"127259":[40,108,41],"127260":[40,109,41],"127261":[40,110,41],"127262":[40,111,41],"127263":[40,112,41],"127264":[40,113,41],"127265":[40,114,41],"127266":[40,115,41],"127267":[40,116,41],"127268":[40,117,41],"127269":[40,118,41],"127270":[40,119,41],"127271":[40,120,41],"127272":[40,121,41],"127273":[40,122,41],"127274":[12308,115,12309],"127275":[99],"127276":[114],"127277":[99,100],"127278":[119,122],"127280":[97],"127281":[98],"127282":[99],"127283":[100],"127284":[101],"127285":[102],"127286":[103],"127287":[104],"127288":[105],"127289":[106],"127290":[107],"127291":[108],"127292":[109],"127293":[110],"127294":[111],"127295":[112],"127296":[113],"127297":[114],"127298":[115],"127299":[116],"127300":[117],"127301":[118],"127302":[119],"127303":[120],"127304":[121],"127305":[122],"127306":[104,118],"127307":[109,118],"127308":[115,100],"127309":[115,115],"127310":[112,112,118],"127311":[119,99],"127338":[109,99],"127339":[109,100],"127340":[109,114],"127376":[100,106],"127488":[12411,12363],"127489":[12467,12467],"127490":[12469],"127504":[25163],"127505":[23383],"127506":[21452],"127507":[12487],"127508":[20108],"127509":[22810],"127510":[35299],"127511":[22825],"127512":[20132],"127513":[26144],"127514":[28961],"127515":[26009],"127516":[21069],"127517":[24460],"127518":[20877],"127519":[26032],"127520":[21021],"127521":[32066],"127522":[29983],"127523":[36009],"127524":[22768],"127525":[21561],"127526":[28436],"127527":[25237],"127528":[25429],"127529":[19968],"127530":[19977],"127531":[36938],"127532":[24038],"127533":[20013],"127534":[21491],"127535":[25351],"127536":[36208],"127537":[25171],"127538":[31105],"127539":[31354],"127540":[21512],"127541":[28288],"127542":[26377],"127543":[26376],"127544":[30003],"127545":[21106],"127546":[21942],"127547":[37197],"127552":[12308,26412,12309],"127553":[12308,19977,12309],"127554":[12308,20108,12309],"127555":[12308,23433,12309],"127556":[12308,28857,12309],"127557":[12308,25171,12309],"127558":[12308,30423,12309],"127559":[12308,21213,12309],"127560":[12308,25943,12309],"127568":[24471],"127569":[21487],"130032":[48],"130033":[49],"130034":[50],"130035":[51],"130036":[52],"130037":[53],"130038":[54],"130039":[55],"130040":[56],"130041":[57],"194560":[20029],"194561":[20024],"194562":[20033],"194563":[131362],"194564":[20320],"194565":[20398],"194566":[20411],"194567":[20482],"194568":[20602],"194569":[20633],"194570":[20711],"194571":[20687],"194572":[13470],"194573":[132666],"194574":[20813],"194575":[20820],"194576":[20836],"194577":[20855],"194578":[132380],"194579":[13497],"194580":[20839],"194581":[20877],"194582":[132427],"194583":[20887],"194584":[20900],"194585":[20172],"194586":[20908],"194587":[20917],"194588":[168415],"194589":[20981],"194590":[20995],"194591":[13535],"194592":[21051],"194593":[21062],"194594":[21106],"194595":[21111],"194596":[13589],"194597":[21191],"194598":[21193],"194599":[21220],"194600":[21242],"194601":[21253],"194602":[21254],"194603":[21271],"194604":[21321],"194605":[21329],"194606":[21338],"194607":[21363],"194608":[21373],"194609":[21375],"194612":[133676],"194613":[28784],"194614":[21450],"194615":[21471],"194616":[133987],"194617":[21483],"194618":[21489],"194619":[21510],"194620":[21662],"194621":[21560],"194622":[21576],"194623":[21608],"194624":[21666],"194625":[21750],"194626":[21776],"194627":[21843],"194628":[21859],"194629":[21892],"194631":[21913],"194632":[21931],"194633":[21939],"194634":[21954],"194635":[22294],"194636":[22022],"194637":[22295],"194638":[22097],"194639":[22132],"194640":[20999],"194641":[22766],"194642":[22478],"194643":[22516],"194644":[22541],"194645":[22411],"194646":[22578],"194647":[22577],"194648":[22700],"194649":[136420],"194650":[22770],"194651":[22775],"194652":[22790],"194653":[22810],"194654":[22818],"194655":[22882],"194656":[136872],"194657":[136938],"194658":[23020],"194659":[23067],"194660":[23079],"194661":[23000],"194662":[23142],"194663":[14062],"194665":[23304],"194666":[23358],"194668":[137672],"194669":[23491],"194670":[23512],"194671":[23527],"194672":[23539],"194673":[138008],"194674":[23551],"194675":[23558],"194677":[23586],"194678":[14209],"194679":[23648],"194680":[23662],"194681":[23744],"194682":[23693],"194683":[138724],"194684":[23875],"194685":[138726],"194686":[23918],"194687":[23915],"194688":[23932],"194689":[24033],"194690":[24034],"194691":[14383],"194692":[24061],"194693":[24104],"194694":[24125],"194695":[24169],"194696":[14434],"194697":[139651],"194698":[14460],"194699":[24240],"194700":[24243],"194701":[24246],"194702":[24266],"194703":[172946],"194704":[24318],"194705":[140081],"194707":[33281],"194708":[24354],"194710":[14535],"194711":[144056],"194712":[156122],"194713":[24418],"194714":[24427],"194715":[14563],"194716":[24474],"194717":[24525],"194718":[24535],"194719":[24569],"194720":[24705],"194721":[14650],"194722":[14620],"194723":[24724],"194724":[141012],"194725":[24775],"194726":[24904],"194727":[24908],"194728":[24910],"194729":[24908],"194730":[24954],"194731":[24974],"194732":[25010],"194733":[24996],"194734":[25007],"194735":[25054],"194736":[25074],"194737":[25078],"194738":[25104],"194739":[25115],"194740":[25181],"194741":[25265],"194742":[25300],"194743":[25424],"194744":[142092],"194745":[25405],"194746":[25340],"194747":[25448],"194748":[25475],"194749":[25572],"194750":[142321],"194751":[25634],"194752":[25541],"194753":[25513],"194754":[14894],"194755":[25705],"194756":[25726],"194757":[25757],"194758":[25719],"194759":[14956],"194760":[25935],"194761":[25964],"194762":[143370],"194763":[26083],"194764":[26360],"194765":[26185],"194766":[15129],"194767":[26257],"194768":[15112],"194769":[15076],"194770":[20882],"194771":[20885],"194772":[26368],"194773":[26268],"194774":[32941],"194775":[17369],"194776":[26391],"194777":[26395],"194778":[26401],"194779":[26462],"194780":[26451],"194781":[144323],"194782":[15177],"194783":[26618],"194784":[26501],"194785":[26706],"194786":[26757],"194787":[144493],"194788":[26766],"194789":[26655],"194790":[26900],"194791":[15261],"194792":[26946],"194793":[27043],"194794":[27114],"194795":[27304],"194796":[145059],"194797":[27355],"194798":[15384],"194799":[27425],"194800":[145575],"194801":[27476],"194802":[15438],"194803":[27506],"194804":[27551],"194805":[27578],"194806":[27579],"194807":[146061],"194808":[138507],"194809":[146170],"194810":[27726],"194811":[146620],"194812":[27839],"194813":[27853],"194814":[27751],"194815":[27926],"194816":[27966],"194817":[28023],"194818":[27969],"194819":[28009],"194820":[28024],"194821":[28037],"194822":[146718],"194823":[27956],"194824":[28207],"194825":[28270],"194826":[15667],"194827":[28363],"194828":[28359],"194829":[147153],"194830":[28153],"194831":[28526],"194832":[147294],"194833":[147342],"194834":[28614],"194835":[28729],"194836":[28702],"194837":[28699],"194838":[15766],"194839":[28746],"194840":[28797],"194841":[28791],"194842":[28845],"194843":[132389],"194844":[28997],"194845":[148067],"194846":[29084],"194848":[29224],"194849":[29237],"194850":[29264],"194851":[149000],"194852":[29312],"194853":[29333],"194854":[149301],"194855":[149524],"194856":[29562],"194857":[29579],"194858":[16044],"194859":[29605],"194860":[16056],"194862":[29767],"194863":[29788],"194864":[29809],"194865":[29829],"194866":[29898],"194867":[16155],"194868":[29988],"194869":[150582],"194870":[30014],"194871":[150674],"194872":[30064],"194873":[139679],"194874":[30224],"194875":[151457],"194876":[151480],"194877":[151620],"194878":[16380],"194879":[16392],"194880":[30452],"194881":[151795],"194882":[151794],"194883":[151833],"194884":[151859],"194885":[30494],"194886":[30495],"194888":[30538],"194889":[16441],"194890":[30603],"194891":[16454],"194892":[16534],"194893":[152605],"194894":[30798],"194895":[30860],"194896":[30924],"194897":[16611],"194898":[153126],"194899":[31062],"194900":[153242],"194901":[153285],"194902":[31119],"194903":[31211],"194904":[16687],"194905":[31296],"194906":[31306],"194907":[31311],"194908":[153980],"194909":[154279],"194912":[16898],"194913":[154539],"194914":[31686],"194915":[31689],"194916":[16935],"194917":[154752],"194918":[31954],"194919":[17056],"194920":[31976],"194921":[31971],"194922":[32000],"194923":[155526],"194924":[32099],"194925":[17153],"194926":[32199],"194927":[32258],"194928":[32325],"194929":[17204],"194930":[156200],"194931":[156231],"194932":[17241],"194933":[156377],"194934":[32634],"194935":[156478],"194936":[32661],"194937":[32762],"194938":[32773],"194939":[156890],"194940":[156963],"194941":[32864],"194942":[157096],"194943":[32880],"194944":[144223],"194945":[17365],"194946":[32946],"194947":[33027],"194948":[17419],"194949":[33086],"194950":[23221],"194951":[157607],"194952":[157621],"194953":[144275],"194954":[144284],"194955":[33281],"194956":[33284],"194957":[36766],"194958":[17515],"194959":[33425],"194960":[33419],"194961":[33437],"194962":[21171],"194963":[33457],"194964":[33459],"194965":[33469],"194966":[33510],"194967":[158524],"194968":[33509],"194969":[33565],"194970":[33635],"194971":[33709],"194972":[33571],"194973":[33725],"194974":[33767],"194975":[33879],"194976":[33619],"194977":[33738],"194978":[33740],"194979":[33756],"194980":[158774],"194981":[159083],"194982":[158933],"194983":[17707],"194984":[34033],"194985":[34035],"194986":[34070],"194987":[160714],"194988":[34148],"194989":[159532],"194990":[17757],"194991":[17761],"194992":[159665],"194993":[159954],"194994":[17771],"194995":[34384],"194996":[34396],"194997":[34407],"194998":[34409],"194999":[34473],"195000":[34440],"195001":[34574],"195002":[34530],"195003":[34681],"195004":[34600],"195005":[34667],"195006":[34694],"195008":[34785],"195009":[34817],"195010":[17913],"195011":[34912],"195012":[34915],"195013":[161383],"195014":[35031],"195015":[35038],"195016":[17973],"195017":[35066],"195018":[13499],"195019":[161966],"195020":[162150],"195021":[18110],"195022":[18119],"195023":[35488],"195024":[35565],"195025":[35722],"195026":[35925],"195027":[162984],"195028":[36011],"195029":[36033],"195030":[36123],"195031":[36215],"195032":[163631],"195033":[133124],"195034":[36299],"195035":[36284],"195036":[36336],"195037":[133342],"195038":[36564],"195039":[36664],"195040":[165330],"195041":[165357],"195042":[37012],"195043":[37105],"195044":[37137],"195045":[165678],"195046":[37147],"195047":[37432],"195048":[37591],"195049":[37592],"195050":[37500],"195051":[37881],"195052":[37909],"195053":[166906],"195054":[38283],"195055":[18837],"195056":[38327],"195057":[167287],"195058":[18918],"195059":[38595],"195060":[23986],"195061":[38691],"195062":[168261],"195063":[168474],"195064":[19054],"195065":[19062],"195066":[38880],"195067":[168970],"195068":[19122],"195069":[169110],"195070":[38923],"195072":[38953],"195073":[169398],"195074":[39138],"195075":[19251],"195076":[39209],"195077":[39335],"195078":[39362],"195079":[39422],"195080":[19406],"195081":[170800],"195082":[39698],"195083":[40000],"195084":[40189],"195085":[19662],"195086":[19693],"195087":[40295],"195088":[172238],"195089":[19704],"195090":[172293],"195091":[172558],"195092":[172689],"195093":[40635],"195094":[19798],"195095":[40697],"195096":[40702],"195097":[40709],"195098":[40719],"195099":[40726],"195100":[40763],"195101":[173568]},"bidi_ranges":[[0,8,"BN"],[9,9,"S"],[10,10,"B"],[11,11,"S"],[12,12,"WS"],[13,13,"B"],[14,27,"BN"],[28,30,"B"],[31,31,"S"],[32,32,"WS"],[33,34,"ON"],[35,37,"ET"],[38,42,"ON"],[43,43,"ES"],[44,44,"CS"],[45,45,"ES"],[46,47,"CS"],[48,57,"EN"],[58,58,"CS"],[59,64,"ON"],[65,90,"L"],[91,96,"ON"],[97,122,"L"],[123,126,"ON"],[127,132,"BN"],[133,133,"B"],[134,159,"BN"],[160,160,"CS"],[161,161,"ON"],[162,165,"ET"],[166,169,"ON"],[170,170,"L"],[171,172,"ON"],[173,173,"BN"],[174,175,"ON"],[176,177,"ET"],[178,179,"EN"],[180,180,"ON"],[181,181,"L"],[182,184,"ON"],[185,185,"EN"],[186,186,"L"],[187,191,"ON"],[192,214,"L"],[215,215,"ON"],[216,246,"L"],[247,247,"ON"],[248,696,"L"],[697,698,"ON"],[699,705,"L"],[706,719,"ON"],[720,721,"L"],[722,735,"ON"],[736,740,"L"],[741,749,"ON"],[750,750,"L"],[751,767,"ON"],[768,879,"NSM"],[880,883,"L"],[884,885,"ON"],[886,887,"L"],[890,893,"L"],[894,894,"ON"],[895,895,"L"],[900,901,"ON"],[902,902,"L"],[903,903,"ON"],[904,906,"L"],[908,908,"L"],[910,929,"L"],[931,1013,"L"],[1014,1014,"ON"],[1015,1154,"L"],[1155,1161,"NSM"],[1162,1327,"L"],[1329,1366,"L"],[1369,1417,"L"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1488,1514,"R"],[1519,1524,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1805,"AL"],[1807,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1869,1957,"AL"],[1958,1968,"NSM"],[1969,1969,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2042,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2096,2110,"R"],[2112,2136,"R"],[2137,2139,"NSM"],[2142,2142,"R"],[2144,2154,"AL"],[2160,2190,"AL"],[2192,2193,"AN"],[2200,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2307,2361,"L"],[2362,2362,"NSM"],[2363,2363,"L"],[2364,2364,"NSM"],[2365,2368,"L"],[2369,2376,"NSM"],[2377,2380,"L"],[2381,2381,"NSM"],[2382,2384,"L"],[2385,2391,"NSM"],[2392,2401,"L"],[2402,2403,"NSM"],[2404,2432,"L"],[2433,2433,"NSM"],[2434,2435,"L"],[2437,2444,"L"],[2447,2448,"L"],[2451,2472,"L"],[2474,2480,"L"],[2482,2482,"L"],[2486,2489,"L"],[2492,2492,"NSM"],[2493,2496,"L"],[2497,2500,"NSM"],[2503,2504,"L"],[2507,2508,"L"],[2509,2509,"NSM"],[2510,2510,"L"],[2519,2519,"L"],[2524,2525,"L"],[2527,2529,"L"],[2530,2531,"NSM"],[2534,2545,"L"],[2546,2547,"ET"],[2548,2554,"L"],[2555,2555,"ET"],[2556,2557,"L"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2563,2563,"L"],[2565,2570,"L"],[2575,2576,"L"],[2579,2600,"L"],[2602,2608,"L"],[2610,2611,"L"],[2613,2614,"L"],[2616,2617,"L"],[2620,2620,"NSM"],[2622,2624,"L"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2649,2652,"L"],[2654,2654,"L"],[2662,2671,"L"],[2672,2673,"NSM"],[2674,2676,"L"],[2677,2677,"NSM"],[2678,2678,"L"],[2689,2690,"NSM"],[2691,2691,"L"],[2693,2701,"L"],[2703,2705,"L"],[2707,2728,"L"],[2730,2736,"L"],[2738,2739,"L"],[2741,2745,"L"],[2748,2748,"NSM"],[2749,2752,"L"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2761,2761,"L"],[2763,2764,"L"],[2765,2765,"NSM"],[2768,2768,"L"],[2784,2785,"L"],[2786,2787,"NSM"],[2790,2800,"L"],[2801,2801,"ET"],[2809,2809,"L"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2818,2819,"L"],[2821,2828,"L"],[2831,2832,"L"],[2835,2856,"L"],[2858,2864,"L"],[2866,2867,"L"],[2869,2873,"L"],[2876,2876,"NSM"],[2877,2878,"L"],[2879,2879,"NSM"],[2880,2880,"L"],[2881,2884,"NSM"],[2887,2888,"L"],[2891,2892,"L"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2903,2903,"L"],[2908,2909,"L"],[2911,2913,"L"],[2914,2915,"NSM"],[2918,2935,"L"],[2946,2946,"NSM"],[2947,2947,"L"],[2949,2954,"L"],[2958,2960,"L"],[2962,2965,"L"],[2969,2970,"L"],[2972,2972,"L"],[2974,2975,"L"],[2979,2980,"L"],[2984,2986,"L"],[2990,3001,"L"],[3006,3007,"L"],[3008,3008,"NSM"],[3009,3010,"L"],[3014,3016,"L"],[3018,3020,"L"],[3021,3021,"NSM"],[3024,3024,"L"],[3031,3031,"L"],[3046,3058,"L"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3073,3075,"L"],[3076,3076,"NSM"],[3077,3084,"L"],[3086,3088,"L"],[3090,3112,"L"],[3114,3129,"L"],[3132,3132,"NSM"],[3133,3133,"L"],[3134,3136,"NSM"],[3137,3140,"L"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3160,3162,"L"],[3165,3165,"L"],[3168,3169,"L"],[3170,3171,"NSM"],[3174,3183,"L"],[3191,3191,"L"],[3192,3198,"ON"],[3199,3200,"L"],[3201,3201,"NSM"],[3202,3212,"L"],[3214,3216,"L"],[3218,3240,"L"],[3242,3251,"L"],[3253,3257,"L"],[3260,3260,"NSM"],[3261,3268,"L"],[3270,3272,"L"],[3274,3275,"L"],[3276,3277,"NSM"],[3285,3286,"L"],[3293,3294,"L"],[3296,3297,"L"],[3298,3299,"NSM"],[3302,3311,"L"],[3313,3315,"L"],[3328,3329,"NSM"],[3330,3340,"L"],[3342,3344,"L"],[3346,3386,"L"],[3387,3388,"NSM"],[3389,3392,"L"],[3393,3396,"NSM"],[3398,3400,"L"],[3402,3404,"L"],[3405,3405,"NSM"],[3406,3407,"L"],[3412,3425,"L"],[3426,3427,"NSM"],[3430,3455,"L"],[3457,3457,"NSM"],[3458,3459,"L"],[3461,3478,"L"],[3482,3505,"L"],[3507,3515,"L"],[3517,3517,"L"],[3520,3526,"L"],[3530,3530,"NSM"],[3535,3537,"L"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3544,3551,"L"],[3558,3567,"L"],[3570,3572,"L"],[3585,3632,"L"],[3633,3633,"NSM"],[3634,3635,"L"],[3636,3642,"NSM"],[3647,3647,"ET"],[3648,3654,"L"],[3655,3662,"NSM"],[3663,3675,"L"],[3713,3714,"L"],[3716,3716,"L"],[3718,3722,"L"],[3724,3747,"L"],[3749,3749,"L"],[3751,3760,"L"],[3761,3761,"NSM"],[3762,3763,"L"],[3764,3772,"NSM"],[3773,3773,"L"],[3776,3780,"L"],[3782,3782,"L"],[3784,3790,"NSM"],[3792,3801,"L"],[3804,3807,"L"],[3840,3863,"L"],[3864,3865,"NSM"],[3866,3892,"L"],[3893,3893,"NSM"],[3894,3894,"L"],[3895,3895,"NSM"],[3896,3896,"L"],[3897,3897,"NSM"],[3898,3901,"ON"],[3902,3911,"L"],[3913,3948,"L"],[3953,3966,"NSM"],[3967,3967,"L"],[3968,3972,"NSM"],[3973,3973,"L"],[3974,3975,"NSM"],[3976,3980,"L"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4030,4037,"L"],[4038,4038,"NSM"],[4039,4044,"L"],[4046,4058,"L"],[4096,4140,"L"],[4141,4144,"NSM"],[4145,4145,"L"],[4146,4151,"NSM"],[4152,4152,"L"],[4153,4154,"NSM"],[4155,4156,"L"],[4157,4158,"NSM"],[4159,4183,"L"],[4184,4185,"NSM"],[4186,4189,"L"],[4190,4192,"NSM"],[4193,4208,"L"],[4209,4212,"NSM"],[4213,4225,"L"],[4226,4226,"NSM"],[4227,4228,"L"],[4229,4230,"NSM"],[4231,4236,"L"],[4237,4237,"NSM"],[4238,4252,"L"],[4253,4253,"NSM"],[4254,4293,"L"],[4295,4295,"L"],[4301,4301,"L"],[4304,4680,"L"],[4682,4685,"L"],[4688,4694,"L"],[4696,4696,"L"],[4698,4701,"L"],[4704,4744,"L"],[4746,4749,"L"],[4752,4784,"L"],[4786,4789,"L"],[4792,4798,"L"],[4800,4800,"L"],[4802,4805,"L"],[4808,4822,"L"],[4824,4880,"L"],[4882,4885,"L"],[4888,4954,"L"],[4957,4959,"NSM"],[4960,4988,"L"],[4992,5007,"L"],[5008,5017,"ON"],[5024,5109,"L"],[5112,5117,"L"],[5120,5120,"ON"],[5121,5759,"L"],[5760,5760,"WS"],[5761,5786,"L"],[5787,5788,"ON"],[5792,5880,"L"],[5888,5905,"L"],[5906,5908,"NSM"],[5909,5909,"L"],[5919,5937,"L"],[5938,5939,"NSM"],[5940,5942,"L"],[5952,5969,"L"],[5970,5971,"NSM"],[5984,5996,"L"],[5998,6000,"L"],[6002,6003,"NSM"],[6016,6067,"L"],[6068,6069,"NSM"],[6070,6070,"L"],[6071,6077,"NSM"],[6078,6085,"L"],[6086,6086,"NSM"],[6087,6088,"L"],[6089,6099,"NSM"],[6100,6106,"L"],[6107,6107,"ET"],[6108,6108,"L"],[6109,6109,"NSM"],[6112,6121,"L"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6160,6169,"L"],[6176,6264,"L"],[6272,6276,"L"],[6277,6278,"NSM"],[6279,6312,"L"],[6313,6313,"NSM"],[6314,6314,"L"],[6320,6389,"L"],[6400,6430,"L"],[6432,6434,"NSM"],[6435,6438,"L"],[6439,6440,"NSM"],[6441,6443,"L"],[6448,6449,"L"],[6450,6450,"NSM"],[6451,6456,"L"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6470,6509,"L"],[6512,6516,"L"],[6528,6571,"L"],[6576,6601,"L"],[6608,6618,"L"],[6622,6655,"ON"],[6656,6678,"L"],[6679,6680,"NSM"],[6681,6682,"L"],[6683,6683,"NSM"],[6686,6741,"L"],[6742,6742,"NSM"],[6743,6743,"L"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6753,6753,"L"],[6754,6754,"NSM"],[6755,6756,"L"],[6757,6764,"NSM"],[6765,6770,"L"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6784,6793,"L"],[6800,6809,"L"],[6816,6829,"L"],[6832,6862,"NSM"],[6912,6915,"NSM"],[6916,6963,"L"],[6964,6964,"NSM"],[6965,6965,"L"],[6966,6970,"NSM"],[6971,6971,"L"],[6972,6972,"NSM"],[6973,6977,"L"],[6978,6978,"NSM"],[6979,6988,"L"],[6992,7018,"L"],[7019,7027,"NSM"],[7028,7038,"L"],[7040,7041,"NSM"],[7042,7073,"L"],[7074,7077,"NSM"],[7078,7079,"L"],[7080,7081,"NSM"],[7082,7082,"L"],[7083,7085,"NSM"],[7086,7141,"L"],[7142,7142,"NSM"],[7143,7143,"L"],[7144,7145,"NSM"],[7146,7148,"L"],[7149,7149,"NSM"],[7150,7150,"L"],[7151,7153,"NSM"],[7154,7155,"L"],[7164,7211,"L"],[7212,7219,"NSM"],[7220,7221,"L"],[7222,7223,"NSM"],[7227,7241,"L"],[7245,7304,"L"],[7312,7354,"L"],[7357,7367,"L"],[7376,7378,"NSM"],[7379,7379,"L"],[7380,7392,"NSM"],[7393,7393,"L"],[7394,7400,"NSM"],[7401,7404,"L"],[7405,7405,"NSM"],[7406,7411,"L"],[7412,7412,"NSM"],[7413,7415,"L"],[7416,7417,"NSM"],[7418,7418,"L"],[7424,7615,"L"],[7616,7679,"NSM"],[7680,7957,"L"],[7960,7965,"L"],[7968,8005,"L"],[8008,8013,"L"],[8016,8023,"L"],[8025,8025,"L"],[8027,8027,"L"],[8029,8029,"L"],[8031,8061,"L"],[8064,8116,"L"],[8118,8124,"L"],[8125,8125,"ON"],[8126,8126,"L"],[8127,8129,"ON"],[8130,8132,"L"],[8134,8140,"L"],[8141,8143,"ON"],[8144,8147,"L"],[8150,8155,"L"],[8157,8159,"ON"],[8160,8172,"L"],[8173,8175,"ON"],[8178,8180,"L"],[8182,8188,"L"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8206,8206,"L"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8234,"LRE"],[8235,8235,"RLE"],[8236,8236,"PDF"],[8237,8237,"LRO"],[8238,8238,"RLO"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8293,"BN"],[8294,8294,"LRI"],[8295,8295,"RLI"],[8296,8296,"FSI"],[8297,8297,"PDI"],[8298,8303,"BN"],[8304,8304,"EN"],[8305,8305,"L"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8319,8319,"L"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8336,8348,"L"],[8352,8384,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8450,8450,"L"],[8451,8454,"ON"],[8455,8455,"L"],[8456,8457,"ON"],[8458,8467,"L"],[8468,8468,"ON"],[8469,8469,"L"],[8470,8472,"ON"],[8473,8477,"L"],[8478,8483,"ON"],[8484,8484,"L"],[8485,8485,"ON"],[8486,8486,"L"],[8487,8487,"ON"],[8488,8488,"L"],[8489,8489,"ON"],[8490,8493,"L"],[8494,8494,"ET"],[8495,8505,"L"],[8506,8507,"ON"],[8508,8511,"L"],[8512,8516,"ON"],[8517,8521,"L"],[8522,8525,"ON"],[8526,8527,"L"],[8528,8543,"ON"],[8544,8584,"L"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9014,9082,"L"],[9083,9108,"ON"],[9109,9109,"L"],[9110,9254,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9372,9449,"L"],[9450,9899,"ON"],[9900,9900,"L"],[9901,10239,"ON"],[10240,10495,"L"],[10496,11123,"ON"],[11126,11157,"ON"],[11159,11263,"ON"],[11264,11492,"L"],[11493,11498,"ON"],[11499,11502,"L"],[11503,11505,"NSM"],[11506,11507,"L"],[11513,11519,"ON"],[11520,11557,"L"],[11559,11559,"L"],[11565,11565,"L"],[11568,11623,"L"],[11631,11632,"L"],[11647,11647,"NSM"],[11648,11670,"L"],[11680,11686,"L"],[11688,11694,"L"],[11696,11702,"L"],[11704,11710,"L"],[11712,11718,"L"],[11720,11726,"L"],[11728,11734,"L"],[11736,11742,"L"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12293,12295,"L"],[12296,12320,"ON"],[12321,12329,"L"],[12330,12333,"NSM"],[12334,12335,"L"],[12336,12336,"ON"],[12337,12341,"L"],[12342,12343,"ON"],[12344,12348,"L"],[12349,12351,"ON"],[12353,12438,"L"],[12441,12442,"NSM"],[12443,12444,"ON"],[12445,12447,"L"],[12448,12448,"ON"],[12449,12538,"L"],[12539,12539,"ON"],[12540,12543,"L"],[12549,12591,"L"],[12593,12686,"L"],[12688,12735,"L"],[12736,12771,"ON"],[12783,12783,"ON"],[12784,12828,"L"],[12829,12830,"ON"],[12832,12879,"L"],[12880,12895,"ON"],[12896,12923,"L"],[12924,12926,"ON"],[12927,12976,"L"],[12977,12991,"ON"],[12992,13003,"L"],[13004,13007,"ON"],[13008,13174,"L"],[13175,13178,"ON"],[13179,13277,"L"],[13278,13279,"ON"],[13280,13310,"L"],[13311,13311,"ON"],[13312,19903,"L"],[19904,19967,"ON"],[19968,42124,"L"],[42128,42182,"ON"],[42192,42508,"L"],[42509,42511,"ON"],[42512,42539,"L"],[42560,42606,"L"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42624,42653,"L"],[42654,42655,"NSM"],[42656,42735,"L"],[42736,42737,"NSM"],[42738,42743,"L"],[42752,42785,"ON"],[42786,42887,"L"],[42888,42888,"ON"],[42889,42954,"L"],[42960,42961,"L"],[42963,42963,"L"],[42965,42969,"L"],[42994,43009,"L"],[43010,43010,"NSM"],[43011,43013,"L"],[43014,43014,"NSM"],[43015,43018,"L"],[43019,43019,"NSM"],[43020,43044,"L"],[43045,43046,"NSM"],[43047,43047,"L"],[43048,43051,"ON"],[43052,43052,"NSM"],[43056,43063,"L"],[43064,43065,"ET"],[43072,43123,"L"],[43124,43127,"ON"],[43136,43203,"L"],[43204,43205,"NSM"],[43214,43225,"L"],[43232,43249,"NSM"],[43250,43262,"L"],[43263,43263,"NSM"],[43264,43301,"L"],[43302,43309,"NSM"],[43310,43334,"L"],[43335,43345,"NSM"],[43346,43347,"L"],[43359,43388,"L"],[43392,43394,"NSM"],[43395,43442,"L"],[43443,43443,"NSM"],[43444,43445,"L"],[43446,43449,"NSM"],[43450,43451,"L"],[43452,43453,"NSM"],[43454,43469,"L"],[43471,43481,"L"],[43486,43492,"L"],[43493,43493,"NSM"],[43494,43518,"L"],[43520,43560,"L"],[43561,43566,"NSM"],[43567,43568,"L"],[43569,43570,"NSM"],[43571,43572,"L"],[43573,43574,"NSM"],[43584,43586,"L"],[43587,43587,"NSM"],[43588,43595,"L"],[43596,43596,"NSM"],[43597,43597,"L"],[43600,43609,"L"],[43612,43643,"L"],[43644,43644,"NSM"],[43645,43695,"L"],[43696,43696,"NSM"],[43697,43697,"L"],[43698,43700,"NSM"],[43701,43702,"L"],[43703,43704,"NSM"],[43705,43709,"L"],[43710,43711,"NSM"],[43712,43712,"L"],[43713,43713,"NSM"],[43714,43714,"L"],[43739,43755,"L"],[43756,43757,"NSM"],[43758,43765,"L"],[43766,43766,"NSM"],[43777,43782,"L"],[43785,43790,"L"],[43793,43798,"L"],[43808,43814,"L"],[43816,43822,"L"],[43824,43881,"L"],[43882,43883,"ON"],[43888,44004,"L"],[44005,44005,"NSM"],[44006,44007,"L"],[44008,44008,"NSM"],[44009,44012,"L"],[44013,44013,"NSM"],[44016,44025,"L"],[44032,55203,"L"],[55216,55238,"L"],[55243,55291,"L"],[57344,64109,"L"],[64112,64217,"L"],[64256,64262,"L"],[64275,64279,"L"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64310,"R"],[64312,64316,"R"],[64318,64318,"R"],[64320,64321,"R"],[64323,64324,"R"],[64326,64335,"R"],[64336,64450,"AL"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64914,64967,"AL"],[64975,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65140,"AL"],[65142,65276,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65313,65338,"L"],[65339,65344,"ON"],[65345,65370,"L"],[65371,65381,"ON"],[65382,65470,"L"],[65474,65479,"L"],[65482,65487,"L"],[65490,65495,"L"],[65498,65500,"L"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65536,65547,"L"],[65549,65574,"L"],[65576,65594,"L"],[65596,65597,"L"],[65599,65613,"L"],[65616,65629,"L"],[65664,65786,"L"],[65792,65792,"L"],[65793,65793,"ON"],[65794,65794,"L"],[65799,65843,"L"],[65847,65855,"L"],[65856,65932,"ON"],[65933,65934,"L"],[65936,65948,"ON"],[65952,65952,"ON"],[66000,66044,"L"],[66045,66045,"NSM"],[66176,66204,"L"],[66208,66256,"L"],[66272,66272,"NSM"],[66273,66299,"EN"],[66304,66339,"L"],[66349,66378,"L"],[66384,66421,"L"],[66422,66426,"NSM"],[66432,66461,"L"],[66463,66499,"L"],[66504,66517,"L"],[66560,66717,"L"],[66720,66729,"L"],[66736,66771,"L"],[66776,66811,"L"],[66816,66855,"L"],[66864,66915,"L"],[66927,66938,"L"],[66940,66954,"L"],[66956,66962,"L"],[66964,66965,"L"],[66967,66977,"L"],[66979,66993,"L"],[66995,67001,"L"],[67003,67004,"L"],[67072,67382,"L"],[67392,67413,"L"],[67424,67431,"L"],[67456,67461,"L"],[67463,67504,"L"],[67506,67514,"L"],[67584,67589,"R"],[67592,67592,"R"],[67594,67637,"R"],[67639,67640,"R"],[67644,67644,"R"],[67647,67669,"R"],[67671,67742,"R"],[67751,67759,"R"],[67808,67826,"R"],[67828,67829,"R"],[67835,67867,"R"],[67871,67871,"ON"],[67872,67897,"R"],[67903,67903,"R"],[67968,68023,"R"],[68028,68047,"R"],[68050,68096,"R"],[68097,68099,"NSM"],[68101,68102,"NSM"],[68108,68111,"NSM"],[68112,68115,"R"],[68117,68119,"R"],[68121,68149,"R"],[68152,68154,"NSM"],[68159,68159,"NSM"],[68160,68168,"R"],[68176,68184,"R"],[68192,68255,"R"],[68288,68324,"R"],[68325,68326,"NSM"],[68331,68342,"R"],[68352,68405,"R"],[68409,68415,"ON"],[68416,68437,"R"],[68440,68466,"R"],[68472,68497,"R"],[68505,68508,"R"],[68521,68527,"R"],[68608,68680,"R"],[68736,68786,"R"],[68800,68850,"R"],[68858,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68912,68921,"AN"],[69216,69246,"AN"],[69248,69289,"R"],[69291,69292,"NSM"],[69293,69293,"R"],[69296,69297,"R"],[69373,69375,"NSM"],[69376,69415,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69465,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69513,"R"],[69552,69579,"R"],[69600,69622,"R"],[69632,69632,"L"],[69633,69633,"NSM"],[69634,69687,"L"],[69688,69702,"NSM"],[69703,69709,"L"],[69714,69733,"ON"],[69734,69743,"L"],[69744,69744,"NSM"],[69745,69746,"L"],[69747,69748,"NSM"],[69749,69749,"L"],[69759,69761,"NSM"],[69762,69810,"L"],[69811,69814,"NSM"],[69815,69816,"L"],[69817,69818,"NSM"],[69819,69825,"L"],[69826,69826,"NSM"],[69837,69837,"L"],[69840,69864,"L"],[69872,69881,"L"],[69888,69890,"NSM"],[69891,69926,"L"],[69927,69931,"NSM"],[69932,69932,"L"],[69933,69940,"NSM"],[69942,69959,"L"],[69968,70002,"L"],[70003,70003,"NSM"],[70004,70006,"L"],[70016,70017,"NSM"],[70018,70069,"L"],[70070,70078,"NSM"],[70079,70088,"L"],[70089,70092,"NSM"],[70093,70094,"L"],[70095,70095,"NSM"],[70096,70111,"L"],[70113,70132,"L"],[70144,70161,"L"],[70163,70190,"L"],[70191,70193,"NSM"],[70194,70195,"L"],[70196,70196,"NSM"],[70197,70197,"L"],[70198,70199,"NSM"],[70200,70205,"L"],[70206,70206,"NSM"],[70207,70208,"L"],[70209,70209,"NSM"],[70272,70278,"L"],[70280,70280,"L"],[70282,70285,"L"],[70287,70301,"L"],[70303,70313,"L"],[70320,70366,"L"],[70367,70367,"NSM"],[70368,70370,"L"],[70371,70378,"NSM"],[70384,70393,"L"],[70400,70401,"NSM"],[70402,70403,"L"],[70405,70412,"L"],[70415,70416,"L"],[70419,70440,"L"],[70442,70448,"L"],[70450,70451,"L"],[70453,70457,"L"],[70459,70460,"NSM"],[70461,70463,"L"],[70464,70464,"NSM"],[70465,70468,"L"],[70471,70472,"L"],[70475,70477,"L"],[70480,70480,"L"],[70487,70487,"L"],[70493,70499,"L"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70656,70711,"L"],[70712,70719,"NSM"],[70720,70721,"L"],[70722,70724,"NSM"],[70725,70725,"L"],[70726,70726,"NSM"],[70727,70747,"L"],[70749,70749,"L"],[70750,70750,"NSM"],[70751,70753,"L"],[70784,70834,"L"],[70835,70840,"NSM"],[70841,70841,"L"],[70842,70842,"NSM"],[70843,70846,"L"],[70847,70848,"NSM"],[70849,70849,"L"],[70850,70851,"NSM"],[70852,70855,"L"],[70864,70873,"L"],[71040,71089,"L"],[71090,71093,"NSM"],[71096,71099,"L"],[71100,71101,"NSM"],[71102,71102,"L"],[71103,71104,"NSM"],[71105,71131,"L"],[71132,71133,"NSM"],[71168,71218,"L"],[71219,71226,"NSM"],[71227,71228,"L"],[71229,71229,"NSM"],[71230,71230,"L"],[71231,71232,"NSM"],[71233,71236,"L"],[71248,71257,"L"],[71264,71276,"ON"],[71296,71338,"L"],[71339,71339,"NSM"],[71340,71340,"L"],[71341,71341,"NSM"],[71342,71343,"L"],[71344,71349,"NSM"],[71350,71350,"L"],[71351,71351,"NSM"],[71352,71353,"L"],[71360,71369,"L"],[71424,71450,"L"],[71453,71455,"NSM"],[71456,71457,"L"],[71458,71461,"NSM"],[71462,71462,"L"],[71463,71467,"NSM"],[71472,71494,"L"],[71680,71726,"L"],[71727,71735,"NSM"],[71736,71736,"L"],[71737,71738,"NSM"],[71739,71739,"L"],[71840,71922,"L"],[71935,71942,"L"],[71945,71945,"L"],[71948,71955,"L"],[71957,71958,"L"],[71960,71989,"L"],[71991,71992,"L"],[71995,71996,"NSM"],[71997,71997,"L"],[71998,71998,"NSM"],[71999,72002,"L"],[72003,72003,"NSM"],[72004,72006,"L"],[72016,72025,"L"],[72096,72103,"L"],[72106,72147,"L"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72156,72159,"L"],[72160,72160,"NSM"],[72161,72164,"L"],[72192,72192,"L"],[72193,72198,"NSM"],[72199,72200,"L"],[72201,72202,"NSM"],[72203,72242,"L"],[72243,72248,"NSM"],[72249,72250,"L"],[72251,72254,"NSM"],[72255,72262,"L"],[72263,72263,"NSM"],[72272,72272,"L"],[72273,72278,"NSM"],[72279,72280,"L"],[72281,72283,"NSM"],[72284,72329,"L"],[72330,72342,"NSM"],[72343,72343,"L"],[72344,72345,"NSM"],[72346,72354,"L"],[72368,72440,"L"],[72448,72457,"L"],[72704,72712,"L"],[72714,72751,"L"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72766,72773,"L"],[72784,72812,"L"],[72816,72847,"L"],[72850,72871,"NSM"],[72873,72873,"L"],[72874,72880,"NSM"],[72881,72881,"L"],[72882,72883,"NSM"],[72884,72884,"L"],[72885,72886,"NSM"],[72960,72966,"L"],[72968,72969,"L"],[72971,73008,"L"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73030,73030,"L"],[73031,73031,"NSM"],[73040,73049,"L"],[73056,73061,"L"],[73063,73064,"L"],[73066,73102,"L"],[73104,73105,"NSM"],[73107,73108,"L"],[73109,73109,"NSM"],[73110,73110,"L"],[73111,73111,"NSM"],[73112,73112,"L"],[73120,73129,"L"],[73440,73458,"L"],[73459,73460,"NSM"],[73461,73464,"L"],[73472,73473,"NSM"],[73474,73488,"L"],[73490,73525,"L"],[73526,73530,"NSM"],[73534,73535,"L"],[73536,73536,"NSM"],[73537,73537,"L"],[73538,73538,"NSM"],[73539,73561,"L"],[73648,73648,"L"],[73664,73684,"L"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[73727,74649,"L"],[74752,74862,"L"],[74864,74868,"L"],[74880,75075,"L"],[77712,77810,"L"],[77824,78911,"L"],[78912,78912,"NSM"],[78913,78918,"L"],[78919,78933,"NSM"],[82944,83526,"L"],[92160,92728,"L"],[92736,92766,"L"],[92768,92777,"L"],[92782,92862,"L"],[92864,92873,"L"],[92880,92909,"L"],[92912,92916,"NSM"],[92917,92917,"L"],[92928,92975,"L"],[92976,92982,"NSM"],[92983,92997,"L"],[93008,93017,"L"],[93019,93025,"L"],[93027,93047,"L"],[93053,93071,"L"],[93760,93850,"L"],[93952,94026,"L"],[94031,94031,"NSM"],[94032,94087,"L"],[94095,94098,"NSM"],[94099,94111,"L"],[94176,94177,"L"],[94178,94178,"ON"],[94179,94179,"L"],[94180,94180,"NSM"],[94192,94193,"L"],[94208,100343,"L"],[100352,101589,"L"],[101632,101640,"L"],[110576,110579,"L"],[110581,110587,"L"],[110589,110590,"L"],[110592,110882,"L"],[110898,110898,"L"],[110928,110930,"L"],[110933,110933,"L"],[110948,110951,"L"],[110960,111355,"L"],[113664,113770,"L"],[113776,113788,"L"],[113792,113800,"L"],[113808,113817,"L"],[113820,113820,"L"],[113821,113822,"NSM"],[113823,113823,"L"],[113824,113827,"BN"],[118528,118573,"NSM"],[118576,118598,"NSM"],[118608,118723,"L"],[118784,119029,"L"],[119040,119078,"L"],[119081,119142,"L"],[119143,119145,"NSM"],[119146,119154,"L"],[119155,119162,"BN"],[119163,119170,"NSM"],[119171,119172,"L"],[119173,119179,"NSM"],[119180,119209,"L"],[119210,119213,"NSM"],[119214,119272,"L"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119488,119507,"L"],[119520,119539,"L"],[119552,119638,"ON"],[119648,119672,"L"],[119808,119892,"L"],[119894,119964,"L"],[119966,119967,"L"],[119970,119970,"L"],[119973,119974,"L"],[119977,119980,"L"],[119982,119993,"L"],[119995,119995,"L"],[119997,120003,"L"],[120005,120069,"L"],[120071,120074,"L"],[120077,120084,"L"],[120086,120092,"L"],[120094,120121,"L"],[120123,120126,"L"],[120128,120132,"L"],[120134,120134,"L"],[120138,120144,"L"],[120146,120485,"L"],[120488,120538,"L"],[120539,120539,"ON"],[120540,120596,"L"],[120597,120597,"ON"],[120598,120654,"L"],[120655,120655,"ON"],[120656,120712,"L"],[120713,120713,"ON"],[120714,120770,"L"],[120771,120771,"ON"],[120772,120779,"L"],[120782,120831,"EN"],[120832,121343,"L"],[121344,121398,"NSM"],[121399,121402,"L"],[121403,121452,"NSM"],[121453,121460,"L"],[121461,121461,"NSM"],[121462,121475,"L"],[121476,121476,"NSM"],[121477,121483,"L"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122624,122654,"L"],[122661,122666,"L"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[122928,122989,"L"],[123023,123023,"NSM"],[123136,123180,"L"],[123184,123190,"NSM"],[123191,123197,"L"],[123200,123209,"L"],[123214,123215,"L"],[123536,123565,"L"],[123566,123566,"NSM"],[123584,123627,"L"],[123628,123631,"NSM"],[123632,123641,"L"],[123647,123647,"ET"],[124112,124139,"L"],[124140,124143,"NSM"],[124144,124153,"L"],[124896,124902,"L"],[124904,124907,"L"],[124909,124910,"L"],[124912,124926,"L"],[124928,125124,"R"],[125127,125135,"R"],[125136,125142,"NSM"],[125184,125251,"R"],[125252,125258,"NSM"],[125259,125259,"R"],[125264,125273,"R"],[125278,125279,"R"],[126065,126132,"AL"],[126209,126269,"AL"],[126464,126467,"AL"],[126469,126495,"AL"],[126497,126498,"AL"],[126500,126500,"AL"],[126503,126503,"AL"],[126505,126514,"AL"],[126516,126519,"AL"],[126521,126521,"AL"],[126523,126523,"AL"],[126530,126530,"AL"],[126535,126535,"AL"],[126537,126537,"AL"],[126539,126539,"AL"],[126541,126543,"AL"],[126545,126546,"AL"],[126548,126548,"AL"],[126551,126551,"AL"],[126553,126553,"AL"],[126555,126555,"AL"],[126557,126557,"AL"],[126559,126559,"AL"],[126561,126562,"AL"],[126564,126564,"AL"],[126567,126570,"AL"],[126572,126578,"AL"],[126580,126583,"AL"],[126585,126588,"AL"],[126590,126590,"AL"],[126592,126601,"AL"],[126603,126619,"AL"],[126625,126627,"AL"],[126629,126633,"AL"],[126635,126651,"AL"],[126704,126705,"ON"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127248,127278,"L"],[127279,127279,"ON"],[127280,127337,"L"],[127338,127343,"ON"],[127344,127404,"L"],[127405,127405,"ON"],[127462,127490,"L"],[127504,127547,"L"],[127552,127560,"L"],[127568,127569,"L"],[127584,127589,"ON"],[127744,128727,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128886,"ON"],[128891,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129201,"ON"],[129280,129619,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129672,"ON"],[129680,129725,"ON"],[129727,129733,"ON"],[129742,129755,"ON"],[129760,129768,"ON"],[129776,129784,"ON"],[129792,129938,"ON"],[129940,129994,"ON"],[130032,130041,"EN"],[131070,131071,"BN"],[131072,173791,"L"],[173824,177977,"L"],[177984,178205,"L"],[178208,183969,"L"],[183984,191456,"L"],[191472,192093,"L"],[194560,195101,"L"],[196606,196607,"BN"],[196608,201546,"L"],[201552,205743,"L"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918000,921599,"BN"],[983038,983039,"BN"],[983040,1048573,"L"],[1048574,1048575,"BN"],[1048576,1114109,"L"],[1114110,1114111,"BN"]],"joining_type_ranges":[[173,173,"T"],[768,879,"T"],[1155,1161,"T"],[1425,1469,"T"],[1471,1471,"T"],[1473,1474,"T"],[1476,1477,"T"],[1479,1479,"T"],[1552,1562,"T"],[1564,1564,"T"],[1568,1568,"D"],[1570,1573,"R"],[1574,1574,"D"],[1575,1575,"R"],[1576,1576,"D"],[1577,1577,"R"],[1578,1582,"D"],[1583,1586,"R"],[1587,1599,"D"],[1600,1600,"C"],[1601,1607,"D"],[1608,1608,"R"],[1609,1610,"D"],[1611,1631,"T"],[1646,1647,"D"],[1648,1648,"T"],[1649,1651,"R"],[1653,1655,"R"],[1656,1671,"D"],[1672,1689,"R"],[1690,1727,"D"],[1728,1728,"R"],[1729,1730,"D"],[1731,1739,"R"],[1740,1740,"D"],[1741,1741,"R"],[1742,1742,"D"],[1743,1743,"R"],[1744,1745,"D"],[1746,1747,"R"],[1749,1749,"R"],[1750,1756,"T"],[1759,1764,"T"],[1767,1768,"T"],[1770,1773,"T"],[1774,1775,"R"],[1786,1788,"D"],[1791,1791,"D"],[1807,1807,"T"],[1808,1808,"R"],[1809,1809,"T"],[1810,1812,"D"],[1813,1817,"R"],[1818,1821,"D"],[1822,1822,"R"],[1823,1831,"D"],[1832,1832,"R"],[1833,1833,"D"],[1834,1834,"R"],[1835,1835,"D"],[1836,1836,"R"],[1837,1838,"D"],[1839,1839,"R"],[1840,1866,"T"],[1869,1869,"R"],[1870,1880,"D"],[1881,1883,"R"],[1884,1898,"D"],[1899,1900,"R"],[1901,1904,"D"],[1905,1905,"R"],[1906,1906,"D"],[1907,1908,"R"],[1909,1911,"D"],[1912,1913,"R"],[1914,1919,"D"],[1958,1968,"T"],[1994,2026,"D"],[2027,2035,"T"],[2042,2042,"C"],[2045,2045,"T"],[2070,2073,"T"],[2075,2083,"T"],[2085,2087,"T"],[2089,2093,"T"],[2112,2112,"R"],[2113,2117,"D"],[2118,2119,"R"],[2120,2120,"D"],[2121,2121,"R"],[2122,2131,"D"],[2132,2132,"R"],[2133,2133,"D"],[2134,2136,"R"],[2137,2139,"T"],[2144,2144,"D"],[2146,2149,"D"],[2151,2151,"R"],[2152,2152,"D"],[2153,2154,"R"],[2160,2178,"R"],[2179,2181,"C"],[2182,2182,"D"],[2185,2189,"D"],[2190,2190,"R"],[2200,2207,"T"],[2208,2217,"D"],[2218,2220,"R"],[2222,2222,"R"],[2223,2224,"D"],[2225,2226,"R"],[2227,2232,"D"],[2233,2233,"R"],[2234,2248,"D"],[2250,2273,"T"],[2275,2306,"T"],[2362,2362,"T"],[2364,2364,"T"],[2369,2376,"T"],[2381,2381,"T"],[2385,2391,"T"],[2402,2403,"T"],[2433,2433,"T"],[2492,2492,"T"],[2497,2500,"T"],[2509,2509,"T"],[2530,2531,"T"],[2558,2558,"T"],[2561,2562,"T"],[2620,2620,"T"],[2625,2626,"T"],[2631,2632,"T"],[2635,2637,"T"],[2641,2641,"T"],[2672,2673,"T"],[2677,2677,"T"],[2689,2690,"T"],[2748,2748,"T"],[2753,2757,"T"],[2759,2760,"T"],[2765,2765,"T"],[2786,2787,"T"],[2810,2815,"T"],[2817,2817,"T"],[2876,2876,"T"],[2879,2879,"T"],[2881,2884,"T"],[2893,2893,"T"],[2901,2902,"T"],[2914,2915,"T"],[2946,2946,"T"],[3008,3008,"T"],[3021,3021,"T"],[3072,3072,"T"],[3076,3076,"T"],[3132,3132,"T"],[3134,3136,"T"],[3142,3144,"T"],[3146,3149,"T"],[3157,3158,"T"],[3170,3171,"T"],[3201,3201,"T"],[3260,3260,"T"],[3263,3263,"T"],[3270,3270,"T"],[3276,3277,"T"],[3298,3299,"T"],[3328,3329,"T"],[3387,3388,"T"],[3393,3396,"T"],[3405,3405,"T"],[3426,3427,"T"],[3457,3457,"T"],[3530,3530,"T"],[3538,3540,"T"],[3542,3542,"T"],[3633,3633,"T"],[3636,3642,"T"],[3655,3662,"T"],[3761,3761,"T"],[3764,3772,"T"],[3784,3790,"T"],[3864,3865,"T"],[3893,3893,"T"],[3895,3895,"T"],[3897,3897,"T"],[3953,3966,"T"],[3968,3972,"T"],[3974,3975,"T"],[3981,3991,"T"],[3993,4028,"T"],[4038,4038,"T"],[4141,4144,"T"],[4146,4151,"T"],[4153,4154,"T"],[4157,4158,"T"],[4184,4185,"T"],[4190,4192,"T"],[4209,4212,"T"],[4226,4226,"T"],[4229,4230,"T"],[4237,4237,"T"],[4253,4253,"T"],[4957,4959,"T"],[5906,5908,"T"],[5938,5939,"T"],[5970,5971,"T"],[6002,6003,"T"],[6068,6069,"T"],[6071,6077,"T"],[6086,6086,"T"],[6089,6099,"T"],[6109,6109,"T"],[6151,6151,"D"],[6154,6154,"C"],[6155,6157,"T"],[6159,6159,"T"],[6176,6264,"D"],[6277,6278,"T"],[6279,6312,"D"],[6313,6313,"T"],[6314,6314,"D"],[6432,6434,"T"],[6439,6440,"T"],[6450,6450,"T"],[6457,6459,"T"],[6679,6680,"T"],[6683,6683,"T"],[6742,6742,"T"],[6744,6750,"T"],[6752,6752,"T"],[6754,6754,"T"],[6757,6764,"T"],[6771,6780,"T"],[6783,6783,"T"],[6832,6862,"T"],[6912,6915,"T"],[6964,6964,"T"],[6966,6970,"T"],[6972,6972,"T"],[6978,6978,"T"],[7019,7027,"T"],[7040,7041,"T"],[7074,7077,"T"],[7080,7081,"T"],[7083,7085,"T"],[7142,7142,"T"],[7144,7145,"T"],[7149,7149,"T"],[7151,7153,"T"],[7212,7219,"T"],[7222,7223,"T"],[7376,7378,"T"],[7380,7392,"T"],[7394,7400,"T"],[7405,7405,"T"],[7412,7412,"T"],[7416,7417,"T"],[7616,7679,"T"],[8203,8203,"T"],[8205,8205,"C"],[8206,8207,"T"],[8234,8238,"T"],[8288,8292,"T"],[8298,8303,"T"],[8400,8432,"T"],[11503,11505,"T"],[11647,11647,"T"],[11744,11775,"T"],[12330,12333,"T"],[12441,12442,"T"],[42607,42610,"T"],[42612,42621,"T"],[42654,42655,"T"],[42736,42737,"T"],[43010,43010,"T"],[43014,43014,"T"],[43019,43019,"T"],[43045,43046,"T"],[43052,43052,"T"],[43072,43121,"D"],[43122,43122,"L"],[43204,43205,"T"],[43232,43249,"T"],[43263,43263,"T"],[43302,43309,"T"],[43335,43345,"T"],[43392,43394,"T"],[43443,43443,"T"],[43446,43449,"T"],[43452,43453,"T"],[43493,43493,"T"],[43561,43566,"T"],[43569,43570,"T"],[43573,43574,"T"],[43587,43587,"T"],[43596,43596,"T"],[43644,43644,"T"],[43696,43696,"T"],[43698,43700,"T"],[43703,43704,"T"],[43710,43711,"T"],[43713,43713,"T"],[43756,43757,"T"],[43766,43766,"T"],[44005,44005,"T"],[44008,44008,"T"],[44013,44013,"T"],[64286,64286,"T"],[65024,65039,"T"],[65056,65071,"T"],[65279,65279,"T"],[65529,65531,"T"],[66045,66045,"T"],[66272,66272,"T"],[66422,66426,"T"],[68097,68099,"T"],[68101,68102,"T"],[68108,68111,"T"],[68152,68154,"T"],[68159,68159,"T"],[68288,68292,"D"],[68293,68293,"R"],[68295,68295,"R"],[68297,68298,"R"],[68301,68301,"L"],[68302,68306,"R"],[68307,68310,"D"],[68311,68311,"L"],[68312,68316,"D"],[68317,68317,"R"],[68318,68320,"D"],[68321,68321,"R"],[68324,68324,"R"],[68325,68326,"T"],[68331,68334,"D"],[68335,68335,"R"],[68480,68480,"D"],[68481,68481,"R"],[68482,68482,"D"],[68483,68485,"R"],[68486,68488,"D"],[68489,68489,"R"],[68490,68491,"D"],[68492,68492,"R"],[68493,68493,"D"],[68494,68495,"R"],[68496,68496,"D"],[68497,68497,"R"],[68521,68524,"R"],[68525,68526,"D"],[68864,68864,"L"],[68865,68897,"D"],[68898,68898,"R"],[68899,68899,"D"],[68900,68903,"T"],[69291,69292,"T"],[69373,69375,"T"],[69424,69426,"D"],[69427,69427,"R"],[69428,69444,"D"],[69446,69456,"T"],[69457,69459,"D"],[69460,69460,"R"],[69488,69491,"D"],[69492,69493,"R"],[69494,69505,"D"],[69506,69509,"T"],[69552,69552,"D"],[69554,69555,"D"],[69556,69558,"R"],[69560,69560,"D"],[69561,69562,"R"],[69563,69564,"D"],[69565,69565,"R"],[69566,69567,"D"],[69569,69569,"D"],[69570,69571,"R"],[69572,69572,"D"],[69577,69577,"R"],[69578,69578,"D"],[69579,69579,"L"],[69633,69633,"T"],[69688,69702,"T"],[69744,69744,"T"],[69747,69748,"T"],[69759,69761,"T"],[69811,69814,"T"],[69817,69818,"T"],[69826,69826,"T"],[69888,69890,"T"],[69927,69931,"T"],[69933,69940,"T"],[70003,70003,"T"],[70016,70017,"T"],[70070,70078,"T"],[70089,70092,"T"],[70095,70095,"T"],[70191,70193,"T"],[70196,70196,"T"],[70198,70199,"T"],[70206,70206,"T"],[70209,70209,"T"],[70367,70367,"T"],[70371,70378,"T"],[70400,70401,"T"],[70459,70460,"T"],[70464,70464,"T"],[70502,70508,"T"],[70512,70516,"T"],[70712,70719,"T"],[70722,70724,"T"],[70726,70726,"T"],[70750,70750,"T"],[70835,70840,"T"],[70842,70842,"T"],[70847,70848,"T"],[70850,70851,"T"],[71090,71093,"T"],[71100,71101,"T"],[71103,71104,"T"],[71132,71133,"T"],[71219,71226,"T"],[71229,71229,"T"],[71231,71232,"T"],[71339,71339,"T"],[71341,71341,"T"],[71344,71349,"T"],[71351,71351,"T"],[71453,71455,"T"],[71458,71461,"T"],[71463,71467,"T"],[71727,71735,"T"],[71737,71738,"T"],[71995,71996,"T"],[71998,71998,"T"],[72003,72003,"T"],[72148,72151,"T"],[72154,72155,"T"],[72160,72160,"T"],[72193,72202,"T"],[72243,72248,"T"],[72251,72254,"T"],[72263,72263,"T"],[72273,72278,"T"],[72281,72283,"T"],[72330,72342,"T"],[72344,72345,"T"],[72752,72758,"T"],[72760,72765,"T"],[72767,72767,"T"],[72850,72871,"T"],[72874,72880,"T"],[72882,72883,"T"],[72885,72886,"T"],[73009,73014,"T"],[73018,73018,"T"],[73020,73021,"T"],[73023,73029,"T"],[73031,73031,"T"],[73104,73105,"T"],[73109,73109,"T"],[73111,73111,"T"],[73459,73460,"T"],[73472,73473,"T"],[73526,73530,"T"],[73536,73536,"T"],[73538,73538,"T"],[78896,78912,"T"],[78919,78933,"T"],[92912,92916,"T"],[92976,92982,"T"],[94031,94031,"T"],[94095,94098,"T"],[94180,94180,"T"],[113821,113822,"T"],[113824,113827,"T"],[118528,118573,"T"],[118576,118598,"T"],[119143,119145,"T"],[119155,119170,"T"],[119173,119179,"T"],[119210,119213,"T"],[119362,119364,"T"],[121344,121398,"T"],[121403,121452,"T"],[121461,121461,"T"],[121476,121476,"T"],[121499,121503,"T"],[121505,121519,"T"],[122880,122886,"T"],[122888,122904,"T"],[122907,122913,"T"],[122915,122916,"T"],[122918,122922,"T"],[123023,123023,"T"],[123184,123190,"T"],[123566,123566,"T"],[123628,123631,"T"],[124140,124143,"T"],[125136,125142,"T"],[125184,125251,"D"],[125252,125259,"T"],[917505,917505,"T"],[917536,917631,"T"],[917760,917999,"T"]]} \ No newline at end of file diff --git a/node_modules/idn-hostname/index.d.ts b/node_modules/idn-hostname/index.d.ts new file mode 100644 index 00000000..40a73f57 --- /dev/null +++ b/node_modules/idn-hostname/index.d.ts @@ -0,0 +1,32 @@ +import punycode = require('punycode/'); + +/** + * Validate a hostname. Returns true or throws a detailed error. + * + * @throws {SyntaxError} + */ +declare function isIdnHostname(hostname: string): true; + +/** + * Returns the ACE hostname or throws a detailed error (it also validates the input) + * + * @throws {SyntaxError} + */ +declare function idnHostname(hostname: string): string; + +/** + * Returns the uts46 mapped label (not hostname) or throws an error if the label + * has dissallowed or unassigned chars. + * + * @throws {SyntaxError} + */ +declare function uts46map(label: string): string; + +declare const IdnHostname: { + isIdnHostname: typeof isIdnHostname; + idnHostname: typeof idnHostname; + uts46map: typeof uts46map; + punycode: typeof punycode; +}; + +export = IdnHostname; diff --git a/node_modules/idn-hostname/index.js b/node_modules/idn-hostname/index.js new file mode 100644 index 00000000..fbedd84e --- /dev/null +++ b/node_modules/idn-hostname/index.js @@ -0,0 +1,172 @@ +'use strict'; +// IDNA2008 validator using idnaMappingTableCompact.json +const punycode = require('punycode/'); +const { props, viramas, ranges, mappings, bidi_ranges, joining_type_ranges } = require('./idnaMappingTableCompact.json'); +// --- Error classes (short messages; RFC refs included in message) --- +const throwIdnaContextJError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaContextJError" }); }; +const throwIdnaContextOError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaContextOError" }); }; +const throwIdnaUnicodeError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaUnicodeError" }); }; +const throwIdnaLengthError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaLengthError" }); }; +const throwIdnaSyntaxError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaSyntaxError" }); }; +const throwPunycodeError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "PunycodeError" }); }; +const throwIdnaBidiError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaBidiError" }); }; +// --- constants --- +const ZWNJ = 0x200c; +const ZWJ = 0x200d; +const MIDDLE_DOT = 0x00b7; +const GREEK_KERAIA = 0x0375; +const KATAKANA_MIDDLE_DOT = 0x30fb; +const HEBREW_GERESH = 0x05f3; +const HEBREW_GERSHAYIM = 0x05f4; +// Viramas (used for special ZWJ/ZWNJ acceptance) +const VIRAMAS = new Set(viramas); +// binary range lookup +function getRange(range, key) { + if (!Array.isArray(range) || range.length === 0) return null; + let lb = 0; + let ub = range.length - 1; + while (lb <= ub) { + const mid = (lb + ub) >> 1; + const r = range[mid]; + if (key < r[0]) ub = mid - 1; + else if (key > r[1]) lb = mid + 1; + else return r[2]; + } + return null; +} +// mapping label (disallowed chars were removed from ranges, so undefined means disallowed or unassigned) +function uts46map(label) { + const mappedCps = []; + for (let i = 0; i < label.length; ) { + const cp = label.codePointAt(i); + const prop = props[getRange(ranges, cp)]; + const maps = mappings[String(cp)]; + // mapping cases + if (prop === 'mapped' && Array.isArray(maps) && maps.length) { + for (const mcp of maps) mappedCps.push(mcp); + } else if (prop === 'valid' || prop === 'deviation') { + mappedCps.push(cp); + } else if (prop === 'ignored') { + // drop + } else { + throwIdnaUnicodeError(`${cpHex(cp)} is disallowed in hostname (RFC 5892, UTS #46).`); + } + i += cp > 0xffff ? 2 : 1; + } + // mapped → label + return String.fromCodePoint(...mappedCps); +} +// --- helpers --- +function cpHex(cp) { + return `char '${String.fromCodePoint(cp)}' ` + JSON.stringify('(U+' + cp.toString(16).toUpperCase().padStart(4, '0') + ')'); +} +// main validator +function isIdnHostname(hostname) { + // basic hostname checks + if (typeof hostname !== 'string') throwIdnaSyntaxError('Label must be a string (RFC 5890 §2.3.2.3).'); + // split hostname in labels by the separators defined in uts#46 §2.3 + const rawLabels = hostname.split(/[\x2E\uFF0E\u3002\uFF61]/); + if (rawLabels.some((label) => label.length === 0)) throwIdnaLengthError('Label cannot be empty (consecutive or leading/trailing dot) (RFC 5890 §2.3.2.3).'); + // checks per label (IDNA is defined for labels, not for parts of them and not for complete domain names. RFC 5890 §2.3.2.1) + let aceHostnameLength = 0; + for (const rawLabel of rawLabels) { + // ACE label (xn--) validation: decode and re-encode must match + let label = rawLabel; + if (/^xn--/i.test(rawLabel)) { + if (/[^\p{ASCII}]/u.test(rawLabel)) throwIdnaSyntaxError(`A-label '${rawLabel}' cannot contain non-ASCII character(s) (RFC 5890 §2.3.2.1).`); + const aceBody = rawLabel.slice(4); + try { + label = punycode.decode(aceBody); + } catch (e) { + throwPunycodeError(`Invalid ASCII Compatible Encoding (ACE) of label '${rawLabel}' (RFC 5891 §4.4 → RFC 3492).`); + } + if (!/[^\p{ASCII}]/u.test(label)) throwIdnaSyntaxError(`decoded A-label '${rawLabel}' result U-label '${label}' cannot be empty or all-ASCII character(s) (RFC 5890 §2.3.2.1).`); + if (punycode.encode(label) !== aceBody) throwPunycodeError(`Re-encode mismatch for ASCII Compatible Encoding (ACE) label '${rawLabel}' (RFC 5891 §4.4 → RFC 3492).`); + } + // mapping phase (here because decoded A-label may contain disallowed chars) + label = uts46map(label).normalize('NFC'); + // final ACE label lenght accounting + let aceLabel; + try { + aceLabel = /[^\p{ASCII}]/u.test(label) ? punycode.toASCII(label) : label; + } catch (e) { + throwPunycodeError(`ASCII conversion failed for '${label}' (RFC 3492).`); + } + if (aceLabel.length > 63) throwIdnaLengthError('Final ASCII Compatible Encoding (ACE) label cannot exceed 63 bytes (RFC 5890 §2.3.2.1).'); + aceHostnameLength += aceLabel.length + 1; + // hyphen rules (the other one is covered by bidi) + if (/^-|-$/.test(label)) throwIdnaSyntaxError('Label cannot begin or end with hyphen-minus (RFC 5891 §4.2.3.1).'); + if (label.indexOf('--') === 2) throwIdnaSyntaxError('Label cannot contain consecutive hyphen-minus in the 3rd and 4th positions (RFC 5891 §4.2.3.1).'); + // leading combining marks check (some are not covered by bidi) + if (/^\p{M}$/u.test(String.fromCodePoint(label.codePointAt(0)))) throwIdnaSyntaxError(`Label cannot begin with combining/enclosing mark ${cpHex(label.codePointAt(0))} (RFC 5891 §4.2.3.2).`); + // spread cps for context and bidi checks + const cps = Array.from(label).map((char) => char.codePointAt(0)); + let joinTypes = ''; + let digits = ''; + let bidiClasses = []; + // per-codepoint contextual checks + for (let j = 0; j < cps.length; j++) { + const cp = cps[j]; + // check ContextJ ZWNJ (uses joining types and virama rule) + if (cps.includes(ZWNJ)) { + joinTypes += VIRAMAS.has(cp) ? 'V' : cp === ZWNJ ? 'Z' : getRange(joining_type_ranges, cp) || 'U'; + if (j === cps.length - 1 && /(?![LD][T]*)(?= 0x0660 && cp <= 0x0669) || (cp >= 0x06f0 && cp <= 0x06f9)) digits += (cp < 0x06f0 ? 'a' : 'e' ); + if (j === cps.length - 1 && /^(?=.*a)(?=.*e).*$/.test(digits)) throwIdnaContextOError('Arabic-Indic digits cannot be mixed with Extended Arabic-Indic digits (RFC 5892 Appendix A.8/A.9).'); + // validate bidi + bidiClasses.push(getRange(bidi_ranges, cp)); + if (j === cps.length - 1 && (bidiClasses.includes('R') || bidiClasses.includes('AL'))) { + // order of chars in label (RFC 5890 §2.3.3) + if (bidiClasses[0] === 'R' || bidiClasses[0] === 'AL') { + for (let cls of bidiClasses) if (!['R', 'AL', 'AN', 'EN', 'ET', 'ES', 'CS', 'ON', 'BN', 'NSM'].includes(cls)) throwIdnaBidiError(`'${label}' breaks rule #2: Only R, AL, AN, EN, ET, ES, CS, ON, BN, NSM allowed in label (RFC 5893 §2.2)`); + if (!/(R|AL|EN|AN)(NSM)*$/.test(bidiClasses.join(''))) throwIdnaBidiError(`'${label}' breaks rule #3: label must end with R, AL, EN, or AN, followed by zero or more NSM (RFC 5893 §2.3)`); + if (bidiClasses.includes('EN') && bidiClasses.includes('AN')) throwIdnaBidiError(`'${label}' breaks rule #4: EN and AN cannot be mixed in the same label (RFC 5893 §2.4)`); + } else if (bidiClasses[0] === 'L') { + for (let cls of bidiClasses) if (!['L', 'EN', 'ET', 'ES', 'CS', 'ON', 'BN', 'NSM'].includes(cls)) throwIdnaBidiError(`'${label}' breaks rule #5: Only L, EN, ET, ES, CS, ON, BN, NSM allowed in label (RFC 5893 §2.5)`); + if (!/(L|EN)(NSM)*$/.test(bidiClasses.join(''))) throwIdnaBidiError(`'${label}' breaks rule #6: label must end with L or EN, followed by zero or more NSM (RFC 5893 §2.6)`); + } else { + throwIdnaBidiError(`'${label}' breaks rule #1: label must start with L or R or AL (RFC 5893 §2.1)`); + } + } + } + } + if (aceHostnameLength - 1 > 253) throwIdnaLengthError('Final ASCII Compatible Encoding (ACE) hostname cannot exceed 253 bytes (RFC 5890 → RFC 1034 §3.1).'); + return true; +} +// return ACE hostname if valid +const idnHostname = (string) => + isIdnHostname(string) && + punycode.toASCII( + string + .split('.') + .map((label) => uts46map(label).normalize('NFC')) + .join('.') + ); +// export +module.exports = { isIdnHostname, idnHostname, uts46map, punycode }; diff --git a/node_modules/idn-hostname/package.json b/node_modules/idn-hostname/package.json new file mode 100644 index 00000000..6d55ee34 --- /dev/null +++ b/node_modules/idn-hostname/package.json @@ -0,0 +1,33 @@ +{ + "name": "idn-hostname", + "version": "15.1.8", + "description": "An internationalized hostname validator as defined by RFC5890, RFC5891, RFC5892, RFC5893, RFC3492 and UTS#46", + "keywords": [ + "idn-hostname", + "idna", + "validation", + "unicode", + "mapping" + ], + "homepage": "https://github.com/SorinGFS/idn-hostname#readme", + "bugs": { + "url": "https://github.com/SorinGFS/idn-hostname/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/SorinGFS/idn-hostname.git" + }, + "license": "MIT", + "author": "SorinGFS", + "type": "commonjs", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "punycode": "^2.3.1" + }, + "devDependencies": { + "@types/punycode": "^2.1.4" + } +} diff --git a/node_modules/idn-hostname/readme.md b/node_modules/idn-hostname/readme.md new file mode 100644 index 00000000..7634e087 --- /dev/null +++ b/node_modules/idn-hostname/readme.md @@ -0,0 +1,302 @@ +--- + +title: IDN Hostname + +description: A validator for Internationalized Domain Names (`IDNA`) in conformance with the current standards. + +--- + +## Overview + +This is a validator for Internationalized Domain Names (`IDNA`) in conformance with the current standards (`RFC 5890 - 5891 - 5892 - 5893 - 3492`) and the current adoption level of Unicode (`UTS#46`) in javascript (`15.1.0`). + +**Browser/Engine Support:** Modern browsers (Chrome, Firefox, Safari, Edge) and Node.js (v18+). + +This document explains, in plain terms, what this validator does, which RFC/UTS rules it enforces, what it intentionally **does not** check, and gives some relevant examples so you can see how hostnames are classified. + +The data source for the validator is a `json` constructed as follows: + +- Baseline = Unicode `IdnaMappingTable` with allowed chars (based on props: valid/mapped/deviation/ignored/disallowed). +- Viramas = Unicode `DerivedCombiningClass` with `viramas`(Canonical_Combining_Class=Virama). +- Overlay 1 = Unicode `IdnaMappingTable` for mappings applied on top of the baseline. +- Overlay 2 = Unicode `DerivedJoinTypes` for join types (D,L,R,T,U) applied on top of the baseline. +- Overlay 3 = Unicode `DerivedBidiClass` for bidi classes (L,R,AL,NSM,EN,ES,ET,AN,CS,BN,B,S,WS,ON) applied on top of the baseline. + +## Usage + +**Install:** +```js title="js" +npm i idn-hostname +``` + +**Import the idn-hostname validator:** +```js title="js" +const { isIdnHostname } = require('idn-hostname'); +// the validator is returning true or detailed error +try { + if ( isIdnHostname('abc')) console.log(true); +} catch (error) { + console.log(error.message); +} +``` + +**Import the idn-hostname ACE converter:** +```js title="js" +const { idnHostname } = require('idn-hostname'); +// the idnHostname is returning the ACE hostname or detailed error (it also validates the input) +try { + const idna = idnHostname('abc'); +} catch (error) { + console.log(error.message); +} +``` + +**Import the punycode converter (convenient exposure of punycode functions):** +```js title="js" +const { idnHostname, punycode } = require('idn-hostname'); +// get the unicode version of an ACE hostname or detailed error +try { + const uLabel = punycode.toUnicode(idnHostname('abc')); + // or simply use the punycode API for some needs +} catch (error) { + console.log(error.message); +} +``` + +**Import the UTS46 mapping function:** +```js title="js" +const { uts46map } = require('idn-hostname'); +// the uts46map is returning the uts46 mapped label (not hostname) or an error if label has dissallowed or unassigned chars +try { + const label = uts46map('abc').normalize('NFC'); +} catch (error) { + console.log(error.message); +} +``` + +## Versioning + +Each release will have its `major` and `minor` version identical with the related `unicode` version, and the `minor` version variable. No `major` or `minor` (structural) changes are expected other than a `unicode` version based updated `json` data source. + +## What does (point-by-point) + +1. **Baseline data**: uses the Unicode `IdnaMappingTable` (RFC 5892 / Unicode UCD) decoded into per-code-point classes (PVALID, DISALLOWED, CONTEXTJ, CONTEXTO, UNASSIGNED). + + - Reference: RFC 5892 (IDNA Mapping Table derived from Unicode). + +2. **UTS#46 overlay**: applies UTS#46 statuses/mappings on top of the baseline. Where `UTS#46` marks a code point as `valid`, `mapped`, `deviation`, `ignored` or `disallowed`, those override the baseline for that codepoint. Mappings from `UTS#46` are stored in the `mappings` layer. + + - Reference: `UTS#46` (Unicode IDNA Compatibility Processing). + +3. **Join Types overlay**: uses the Unicode `DerivedJoinTypes` to apply char join types on top of the baseline. Mappings from Join Types are stored in the `joining_type_ranges` layer. + + - Reference: `RFC 5892` (The Unicode Code Points and IDNA). + +4. **BIDI overlay**: uses the Unicode `DerivedBidiClass` to apply BIDI derived classes on top of the baseline. Mappings from BIDI are stored in the `bidi_ranges` layer. + + - Reference: `RFC 5893` (Right-to-Left Scripts for IDNA). + +5. **Compact four-layer data source**: the script uses a compact JSON (`idnaMappingTableCompact.json`) merged from three data sources with: + + - `props` — list of property names (`valid`,`mapped`,`deviation`,`ignored`,`disallowed`), + - `viramas` — list of `virama` codepoints (Canonical_Combining_Class=Virama), + - `ranges` — merged contiguous ranges with a property index, + - `mappings` — map from code point → sequence of code points (for `mapped`/`deviation`), + - `joining_type_ranges` — merged contiguous ranges with a property index. + - `bidi_ranges` — merged contiguous ranges with a property index. + +6. **Mapping phase (at validation time)**: + + - For each input label the validator: + 1. Splits the hostname into labels (by `.` or alternate label separators). Empty labels are rejected. + 2. For each label, maps codepoints according to `mappings` (`valid` and `deviation` are passed as they are, `mapped` are replaced with the corresponding codepoints, `ignored` are ignored, any other chars are triggering `IdnaUnicodeError`). + 3. Normalizes the resulting mapped label with NFC. + 4. Checks length limits (label ≤ 63, full name ≤ 253 octets after ASCII punycode conversion). + 5. Validates label-level rules (leading combining/enclosing marks forbidden, hyphen rules, ACE/punycode re-encode correctness). + 6. Spreads each label into code points for contextual and bidi checks. + 7. Performs contextual checks (CONTEXTJ, CONTEXTO) using the `joining_type_ranges` from compact table (e.g. virama handling for ZWJ/ZWNJ, Catalan middle dot rule, Hebrew geresh/gershayim rule, Katakana middle dot contextual rule, Arabic digit mixing rule). + 8. Checks Bidi rules using the `bidi_ranges` from compact table. + - See the sections below for exact checks and RFC references. + +7. **Punycode / ACE checking**: + + - If a label starts with the ACE prefix `xn--`, the validator will decode the ACE part (using punycode), verify decoding succeeds, and re-encode to verify idempotency (the encoded value must match the original ACE, case-insensitive). + - If punycode decode or re-encode fails, the label is rejected. + - Reference: RFC 5890 §2.3.2.1, RFC 3492 (Punycode). + +8. **Leading/trailing/compressed-hyphens**: + + - Labels cannot start or end with `-` (LDH rule). + - ACE/punycode special rule: labels containing `--` at positions 3–4 (that’s the ACE indicator) and not starting with `xn` are invalid (RFC 5891 §4.2) + +9. **Combining/enclosing marks**: + + - A label may not start with General Category `M` — i.e. combining or enclosing mark at the start of a label is rejected. (RFC 5891 §4.2.3.2) + +10. **Contextual checks (exhaustive requirements from RFC 5892 A.1-A.9 appendices)**: + + - ZWNJ / ZWJ: allowed in context only (CONTEXTJ) (Appendix A.1/A.2, RFC 5892 and PR-37). Implemented checks: + - ZWJ/ZWNJ allowed without other contextual condition if preceded by a virama (a diacritic mark used in many Indic scripts to suppress the inherent vowel that normally follows a consonant). + - ZWNJ (if not preceded by virama) allowed only if joining context matches the RFC rules. + - Middle dot (U+00B7): allowed only between two `l` / `L` (Catalan rule). (RFC 5891 §4.2.3.3; RFC 5892 Appendix A.3) + - Greek keraia (U+0375): must be followed by a Greek letter. (RFC 5892 Appendix A.4) + - Hebrew geresh/gershayim (U+05F3 / U+05F4): must follow a Hebrew letter. (RFC 5892 Appendix A.5/A.6) + - Katakana middle dot (U+30FB): allowed if the label contains at least one character in Hiragana/Katakana/Han. (RFC 5892 Appendix A.7) + - Arabic/Extended Arabic digits: the mix of Arabic-Indic digits (U+0660–U+0669) with Extended Arabic-Indic digits (U+06F0–U+06F9) within the same label is not allowed. (RFC 5892 Appendix A.8/A.9) + +11. **Bidi enforcement**: + + - In the Unicode Bidirectional Algorithm (BiDi), characters are assigned to bidirectional classes that determine their behavior in mixed-direction text. These classes are used by the algorithm to resolve the order of characters. If given input is breaking one of the six Bidi rules the label is rejected. (RFC 5893) + +12. **Total and per-label length**: + + - Total ASCII length (after ASCII conversion of non-ASCII labels) must be ≤ 253 octets. (RFC 5890, RFC 3492) + +13. **Failure handling**: + + - The validator throws short errors (single-line, named exceptions) at the first fatal violation encountered (the smallest error ends the function). Each thrown error includes the RFC/UTS rule reference in its message. + +## What does _not_ do + +- This validator does not support `context` or `locale` specific [Special Casing](https://www.unicode.org/Public/16.0.0/ucd/SpecialCasing.txt) mappings. For such needs some sort of `mapping` must be done before using this validator. +- This validator does not support `UTS#46 useTransitional` backward compatibility flag. +- This validator does not support `UTS#46 STD3 ASCII rules`, when required they can be enforced on separate layer. +- This validator does not attempt to resolve or query DNS — it only validates label syntax/mapping/contextual/bidi rules. + +## Examples + +### PASS examples + +```yaml title="yaml" + - hostname: "a" # single char label + - hostname: "a⁠b" # contains WORD JOINER (U+2060), ignored in IDNA table + - hostname: "example" # multi char label + - hostname: "host123" # label with digits + - hostname: "test-domain" # label with hyphen-minus + - hostname: "my-site123" # label with hyphen-minus and digits + - hostname: "sub.domain" # multi-label + - hostname: "mañana" # contains U+00F1 + - hostname: "xn--maana-pta" # ACE for mañana + - hostname: "bücher" # contains U+00FC + - hostname: "xn--bcher-kva" # ACE for bücher + - hostname: "café" # contains U+00E9 + - hostname: "xn--caf-dma" # ACE for café + - hostname: "straße" # German sharp s; allowed via exceptions + - hostname: "façade" # French ç + - hostname: "élève" # French é and è + - hostname: "Γειά" # Greek + - hostname: "åland" # Swedish å + - hostname: "naïve" # Swedish ï + - hostname: "smörgåsbord" # Swedish ö + - hostname: "пример" # Cyrillic + - hostname: "пример.рф" # multi-label Cyrillic + - hostname: "xn--d1acpjx3f.xn--p1ai" # ACE for Cyrillic + - hostname: "مثال" # Arabic + - hostname: "דוגמה" # Hebrew + - hostname: "예시" # Korean Hangul + - hostname: "ひらがな" # Japanese Hiragana + - hostname: "カタカナ" # Japanese Katakana + - hostname: "例.例" # multi-label Japanese Katakana + - hostname: "例子" # Chinese Han + - hostname: "สาธิต" # Thai + - hostname: "ຕົວຢ່າງ" # Lao + - hostname: "उदाहरण" # Devanagari + - hostname: "क्‍ष" # Devanagari with Virama + ZWJ + - hostname: "क्‌ष" # Devanagari with Virama + ZWNJ + - hostname: "l·l" # Catalan middle dot between 'l' (U+00B7) + - hostname: "L·l" # Catalan middle dot between mixed case 'l' chars + - hostname: "L·L" # Catalan middle dot between 'L' (U+004C) + - hostname: "( "a".repeat(63) ) " # 63 'a's (label length OK) +``` + +### FAIL examples + +```yaml title="yaml" + - hostname: "" # empty hostname + - hostname: "-abc" # leading hyphen forbidden (LDH) + - hostname: "abc-" # trailing hyphen forbidden (LDH) + - hostname: "a b" # contains space + - hostname: "a b" # contains control/tab + - hostname: "a@b" # '@' + - hostname: ".abc" # leading dot → empty label + - hostname: "abc." # trailing dot → empty label (unless FQDN handling expects trailing dot) + - hostname: "a..b" # empty label between dots + - hostname: "a.b..c" # empty label between dots + - hostname: "a#b" # illegal char '#' + - hostname: "a$b" # illegal char '$' + - hostname: "abc/def" # contains slash + - hostname: "a\b" # contains backslash + - hostname: "a%b" # contains percent sign + - hostname: "a^b" # contains caret + - hostname: "a*b" # contains asterisk + - hostname: "a(b)c" # contains parentheses + - hostname: "a=b" # contains equal sign + - hostname: "a+b" # contains plus sign + - hostname: "a,b" # contains comma + - hostname: "a@b" # contains '@' + - hostname: "a;b" # contains semicolon + - hostname: "\n" # contains newline + - hostname: "·" # middle-dot without neighbors + - hostname: "a·" # middle-dot at end + - hostname: "·a" # middle-dot at start + - hostname: "a·l" # middle dot not between two 'l' (Catalan rule) + - hostname: "l·a" # middle dot not between two 'l' + - hostname: "α͵" # Greek keraia not followed by Greek + - hostname: "α͵S" # Greek keraia followed by non-Greek + - hostname: "٠۰" # Arabic-Indic & Extended Arabic-Indic digits mixed + - hostname: ( "a".repeat(64) ) # label length > 63 + - hostname: "￿" # noncharacter (U+FFFF) disallowed in IDNA table + - hostname: "a‌" # contains ZWNJ (U+200C) at end (contextual rules fail) + - hostname: "a‍" # contains ZWJ (U+200D) at end (contextual rules fail) + - hostname: "̀hello" # begins with combining mark (U+0300) + - hostname: "҈hello" # begins with enclosing mark (U+0488) + - hostname: "실〮례" # contains HANGUL SINGLE DOT TONE MARK (U+302E) + - hostname: "control\x01char" # contains control character + - hostname: "abc\u202Edef" # bidi formatting codepoint, disallowed in IDNA table + - hostname: "́" # contains combining mark (U+0301) + - hostname: "؜" # contains Arabic control (control U+061C) + - hostname: "۝" # Arabic end of ayah (control U+06DD) + - hostname: "〯" # Hangul double-dot (U+302F), disallowed in IDNA table + - hostname: "a￰b" # contains noncharacter (U+FFF0) in the middle + - hostname: "emoji😀" # emoji (U+1F600), disallowed in IDNA table + - hostname: "label\uD800" # contains high surrogate on its own + - hostname: "\uDC00label" # contains low surrogate on its own + - hostname: "a‎" # contains left-to-right mark (control formatting) + - hostname: "a‏" # contains right-to-left mark (control formatting) + - hostname: "xn--" # ACE prefix without payload + - hostname: "xn---" # triple hyphen-minus (extra '-') in ACE + - hostname: "xn---abc" # triple hyphen-minus followed by chars + - hostname: "xn--aa--bb" # ACE payload having hyphen-minus in the third and fourth position + - hostname: "xn--xn--double" # ACE payload that is also ACE + - hostname: "xn--X" # invalid punycode (decode fails) + - hostname: "xn--abcナ" # ACE containing non-ASCII char + - hostname: "xn--abc\x00" # ACE containing control/NUL + - hostname: "xn--abc\uFFFF" # ACE containing noncharacter +``` + +:::note + +Far from being exhaustive, the examples are illustrative and chosen to demonstrate rule coverage. Also: +- some of the characters are invisible, +- some unicode codepoints that cannot be represented in `yaml` (those having `\uXXXX`) should be considered as `json`. + +::: + +**References (specs)** + +- `RFC 5890` — Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework. +- `RFC 5891` — IDNA2008: Protocol and Implementation (label rules, contextual rules, ACE considerations). +- `RFC 5892` — IDNA Mapping Table (derived from Unicode). +- `RFC 5893` — Right-to-left Scripts: Bidirectional text handling for domain names. +- `RFC 3492` — Punycode (ACE / punycode algorithm). +- `UTS #46` — Unicode IDNA Compatibility Processing (mappings / deviations / transitional handling). + +:::info + +Links are intentionally not embedded here — use the RFC/UTS numbers to fetch authoritative copies on ietf.org and unicode.org. + +::: + +## Disclaimer + +Some hostnames above are language or script-specific examples — they are provided to exercise the mapping/context rules, not to endorse any particular registration practice. Also, there should be no expectation that results validated by this validator will be automatically accepted by registrants, they may apply their own additional rules on top of those defined by IDNA. diff --git a/node_modules/json-stringify-deterministic/LICENSE.md b/node_modules/json-stringify-deterministic/LICENSE.md new file mode 100644 index 00000000..6fdd0d27 --- /dev/null +++ b/node_modules/json-stringify-deterministic/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © 2016 Kiko Beats (https://github.com/Kikobeats) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/json-stringify-deterministic/README.md b/node_modules/json-stringify-deterministic/README.md new file mode 100644 index 00000000..aca277dc --- /dev/null +++ b/node_modules/json-stringify-deterministic/README.md @@ -0,0 +1,143 @@ +# json-stringify-deterministic + +![Last version](https://img.shields.io/github/tag/Kikobeats/json-stringify-deterministic.svg?style=flat-square) +[![Coverage Status](https://img.shields.io/coveralls/Kikobeats/json-stringify-deterministic.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/json-stringify-deterministic) +[![NPM Status](https://img.shields.io/npm/dm/json-stringify-deterministic.svg?style=flat-square)](https://www.npmjs.org/package/json-stringify-deterministic) + +> Deterministic version of `JSON.stringify()`, so you can get a consistent hash from stringified results. + +Similar to [json-stable-stringify](https://github.com/substack/json-stable-stringify) *but*: + +- No Dependencies. Minimal as possible. +- Better cycles detection. +- Support serialization for object without `.toJSON` (such as `RegExp`). +- Provides built-in TypeScript declarations. + +## Install + +```bash +npm install json-stringify-deterministic --save +``` + +## Usage + +```js +const stringify = require('json-stringify-deterministic') +const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 } + +console.log(stringify(obj)) +// => {"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} +``` + +## API + +### stringify(<obj>, [opts]) + +#### obj + +*Required*
+Type: `object` + +The input `object` to be serialized. + +#### opts + +##### opts.stringify + +Type: `function` +Default: `JSON.stringify` + +Determinate how to stringify primitives values. + +##### opts.cycles + +Type: `boolean` +Default: `false` + +Determinate how to resolve cycles. + +Under `true`, when a cycle is detected, `[Circular]` will be inserted in the node. + +##### opts.compare + +Type: `function` + +Custom comparison function for object keys. + +Your function `opts.compare` is called with these parameters: + +``` js +opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) +``` + +For example, to sort on the object key names in reverse order you could write: + +``` js +const stringify = require('json-stringify-deterministic') + +const obj = { c: 8, b: [{z: 6,y: 5,x: 4}, 7], a: 3 } +const objSerializer = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1 +}) + +console.log(objSerializer) +// => {"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} +``` + +Or if you wanted to sort on the object values in reverse order, you could write: + +```js +const stringify = require('json-stringify-deterministic') + +const obj = { d: 6, c: 5, b: [{ z: 3, y: 2, x: 1 }, 9], a: 10 } +const objtSerializer = stringify(obj, function (a, b) { + return a.value < b.value ? 1 : -1 +}) + +console.log(objtSerializer) +// => {"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} +``` + +##### opts.space + +Type: `string`
+Default: `''` + +If you specify `opts.space`, it will indent the output for pretty-printing. + +Valid values are strings (e.g. `{space: \t}`). For example: + +```js +const stringify = require('json-stringify-deterministic') + +const obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } } +const objSerializer = stringify(obj, { space: ' ' }) +console.log(objSerializer) +// => { +// "a": { +// "and": [ +// 1, +// 2, +// 3 +// ], +// "foo": "bar" +// }, +// "b": 1 +// } +``` + +##### opts.replacer + +Type: `function`
+ +The replacer parameter is a function `opts.replacer(key, value)` that behaves +the same as the replacer +[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter). + +## Related + +- [sort-keys-recursive](https://github.com/Kikobeats/sort-keys-recursive): Sort the keys of an array/object recursively. + +## License + +MIT © [Kiko Beats](https://github.com/Kikobeats). diff --git a/node_modules/json-stringify-deterministic/package.json b/node_modules/json-stringify-deterministic/package.json new file mode 100644 index 00000000..76ab7a65 --- /dev/null +++ b/node_modules/json-stringify-deterministic/package.json @@ -0,0 +1,101 @@ +{ + "name": "json-stringify-deterministic", + "description": "deterministic version of JSON.stringify() so you can get a consistent hash from stringified results.", + "homepage": "https://github.com/Kikobeats/json-stringify-deterministic", + "version": "1.0.12", + "types": "./lib/index.d.ts", + "main": "lib", + "author": { + "email": "josefrancisco.verdu@gmail.com", + "name": "Kiko Beats", + "url": "https://github.com/Kikobeats" + }, + "contributors": [ + { + "name": "Junxiao Shi", + "email": "sunnylandh@gmail.com" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/kikobeats/json-stringify-deterministic.git" + }, + "bugs": { + "url": "https://github.com/Kikobeats/json-stringify-deterministic/issues" + }, + "keywords": [ + "deterministic", + "hash", + "json", + "sort", + "stable", + "stringify" + ], + "devDependencies": { + "@commitlint/cli": "latest", + "@commitlint/config-conventional": "latest", + "@ksmithut/prettier-standard": "latest", + "c8": "latest", + "ci-publish": "latest", + "conventional-github-releaser": "latest", + "finepack": "latest", + "git-authors-cli": "latest", + "mocha": "latest", + "nano-staged": "latest", + "npm-check-updates": "latest", + "should": "latest", + "simple-git-hooks": "latest", + "standard": "latest", + "standard-markdown": "latest", + "standard-version": "latest" + }, + "engines": { + "node": ">= 4" + }, + "files": [ + "index.js", + "lib" + ], + "scripts": { + "clean": "rm -rf node_modules", + "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "lint": "standard && standard-markdown", + "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)", + "prerelease": "npm run update:check && npm run contributors", + "pretest": "npm run lint", + "release": "standard-version -a", + "release:github": "conventional-github-releaser -p angular", + "release:tags": "git push --follow-tags origin HEAD:master", + "test": "c8 mocha --require should", + "update": "ncu -u", + "update:check": "ncu -- --error-level 2" + }, + "license": "MIT", + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "nano-staged": { + "*.js": [ + "prettier-standard" + ], + "*.md": [ + "standard-markdown" + ], + "package.json": [ + "finepack" + ] + }, + "simple-git-hooks": { + "commit-msg": "npx commitlint --edit", + "pre-commit": "npx nano-staged" + }, + "standard": { + "globals": [ + "describe", + "it" + ] + } +} diff --git a/node_modules/jsonc-parser/CHANGELOG.md b/node_modules/jsonc-parser/CHANGELOG.md new file mode 100644 index 00000000..3414a3f1 --- /dev/null +++ b/node_modules/jsonc-parser/CHANGELOG.md @@ -0,0 +1,76 @@ +3.3.0 2022-06-24 +================= +- `JSONVisitor.onObjectBegin` and `JSONVisitor.onArrayBegin` can now return `false` to instruct the visitor that no children should be visited. + + +3.2.0 2022-08-30 +================= +- update the version of the bundled Javascript files to `es2020`. +- include all `const enum` values in the bundled JavaScript files (`ScanError`, `SyntaxKind`, `ParseErrorCode`). + +3.1.0 2022-07-07 +================== + * added new API `FormattingOptions.keepLines` : It leaves the initial line positions in the formatting. + +3.0.0 2020-11-13 +================== + * fixed API spec for `parseTree`. Can return `undefine` for empty input. + * added new API `FormattingOptions.insertFinalNewline`. + + +2.3.0 2020-07-03 +================== + * new API `ModificationOptions.isArrayInsertion`: If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then `modify` will insert a new item at that location instead of overwriting its contents. + * `ModificationOptions.formattingOptions` is now optional. If not set, newly inserted content will not be formatted. + + +2.2.0 2019-10-25 +================== + * added `ParseOptions.allowEmptyContent`. Default is `false`. + * new API `getNodeType`: Returns the type of a value returned by parse. + * `parse`: Fix issue with empty property name + +2.1.0 2019-03-29 +================== + * `JSONScanner` and `JSONVisitor` return lineNumber / character. + +2.0.0 2018-04-12 +================== + * renamed `Node.columnOffset` to `Node.colonOffset` + * new API `getNodePath`: Gets the JSON path of the given JSON DOM node + * new API `findNodeAtOffset`: Finds the most inner node at the given offset. If `includeRightBound` is set, also finds nodes that end at the given offset. + +1.0.3 2018-03-07 +================== + * provide ems modules + +1.0.2 2018-03-05 +================== + * added the `visit.onComment` API, reported when comments are allowed. + * added the `ParseErrorCode.InvalidCommentToken` enum value, reported when comments are disallowed. + +1.0.1 +================== + * added the `format` API: computes edits to format a JSON document. + * added the `modify` API: computes edits to insert, remove or replace a property or value in a JSON document. + * added the `allyEdits` API: applies edits to a document + +1.0.0 +================== + * remove nls dependency (remove `getParseErrorMessage`) + +0.4.2 / 2017-05-05 +================== + * added `ParseError.offset` & `ParseError.length` + +0.4.1 / 2017-04-02 +================== + * added `ParseOptions.allowTrailingComma` + +0.4.0 / 2017-02-23 +================== + * fix for `getLocation`. Now `getLocation` inside an object will always return a property from inside that property. Can be empty string if the object has no properties or if the offset is before a actual property `{ "a": { | }} will return location ['a', ' ']` + +0.3.0 / 2017-01-17 +================== + * Updating to typescript 2.0 \ No newline at end of file diff --git a/node_modules/jsonc-parser/LICENSE.md b/node_modules/jsonc-parser/LICENSE.md new file mode 100644 index 00000000..f54f08dc --- /dev/null +++ b/node_modules/jsonc-parser/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/jsonc-parser/README.md b/node_modules/jsonc-parser/README.md new file mode 100644 index 00000000..d569b706 --- /dev/null +++ b/node_modules/jsonc-parser/README.md @@ -0,0 +1,364 @@ +# jsonc-parser +Scanner and parser for JSON with comments. + +[![npm Package](https://img.shields.io/npm/v/jsonc-parser.svg?style=flat-square)](https://www.npmjs.org/package/jsonc-parser) +[![NPM Downloads](https://img.shields.io/npm/dm/jsonc-parser.svg)](https://npmjs.org/package/jsonc-parser) +[![Build Status](https://github.com/microsoft/node-jsonc-parser/workflows/Tests/badge.svg)](https://github.com/microsoft/node-jsonc-parser/workflows/Tests) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + +Why? +---- +JSONC is JSON with JavaScript style comments. This node module provides a scanner and fault tolerant parser that can process JSONC but is also useful for standard JSON. + - the *scanner* tokenizes the input string into tokens and token offsets + - the *visit* function implements a 'SAX' style parser with callbacks for the encountered properties and values. + - the *parseTree* function computes a hierarchical DOM with offsets representing the encountered properties and values. + - the *parse* function evaluates the JavaScript object represented by JSON string in a fault tolerant fashion. + - the *getLocation* API returns a location object that describes the property or value located at a given offset in a JSON document. + - the *findNodeAtLocation* API finds the node at a given location path in a JSON DOM. + - the *format* API computes edits to format a JSON document. + - the *modify* API computes edits to insert, remove or replace a property or value in a JSON document. + - the *applyEdits* API applies edits to a document. + +Installation +------------ + +``` +npm install --save jsonc-parser +``` + +API +--- + +### Scanner: +```typescript + +/** + * Creates a JSON scanner on the given text. + * If ignoreTrivia is set, whitespaces or comments are ignored. + */ +export function createScanner(text: string, ignoreTrivia: boolean = false): JSONScanner; + +/** + * The scanner object, representing a JSON scanner at a position in the input string. + */ +export interface JSONScanner { + /** + * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. + */ + setPosition(pos: number): any; + /** + * Read the next token. Returns the token code. + */ + scan(): SyntaxKind; + /** + * Returns the zero-based current scan position, which is after the last read token. + */ + getPosition(): number; + /** + * Returns the last read token. + */ + getToken(): SyntaxKind; + /** + * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. + */ + getTokenValue(): string; + /** + * The zero-based start offset of the last read token. + */ + getTokenOffset(): number; + /** + * The length of the last read token. + */ + getTokenLength(): number; + /** + * The zero-based start line number of the last read token. + */ + getTokenStartLine(): number; + /** + * The zero-based start character (column) of the last read token. + */ + getTokenStartCharacter(): number; + /** + * An error code of the last scan. + */ + getTokenError(): ScanError; +} +``` + +### Parser: +```typescript + +export interface ParseOptions { + disallowComments?: boolean; + allowTrailingComma?: boolean; + allowEmptyContent?: boolean; +} +/** + * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + * Therefore always check the errors list to find out if the input was valid. + */ +export declare function parse(text: string, errors?: {error: ParseErrorCode;}[], options?: ParseOptions): any; + +/** + * Parses the given text and invokes the visitor functions for each object, array and literal reached. + */ +export declare function visit(text: string, visitor: JSONVisitor, options?: ParseOptions): any; + +/** + * Visitor called by {@linkcode visit} when parsing JSON. + * + * The visitor functions have the following common parameters: + * - `offset`: Global offset within the JSON document, starting at 0 + * - `startLine`: Line number, starting at 0 + * - `startCharacter`: Start character (column) within the current line, starting at 0 + * + * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the + * current `JSONPath` within the document. + */ +export interface JSONVisitor { + /** + * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. + * When `false` is returned, the array items will not be visited. + */ + onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void | boolean; + + /** + * Invoked when a property is encountered. The offset and length represent the location of the property name. + * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the + * property name yet. + */ + onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. + */ + onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. + * When `false` is returned, the array items will not be visited.* + */ + onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void | boolean; + /** + * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. + */ + onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. + */ + onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; + /** + * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. + */ + onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. + */ + onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; + /** + * Invoked on an error. + */ + onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; +} + +/** + * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. + */ +export declare function parseTree(text: string, errors?: ParseError[], options?: ParseOptions): Node | undefined; + +export declare type NodeType = "object" | "array" | "property" | "string" | "number" | "boolean" | "null"; +export interface Node { + type: NodeType; + value?: any; + offset: number; + length: number; + colonOffset?: number; + parent?: Node; + children?: Node[]; +} + +``` + +### Utilities: +```typescript +/** + * Takes JSON with JavaScript-style comments and remove + * them. Optionally replaces every none-newline character + * of comments with a replaceCharacter + */ +export declare function stripComments(text: string, replaceCh?: string): string; + +/** + * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. + */ +export declare function getLocation(text: string, position: number): Location; + +/** + * A {@linkcode JSONPath} segment. Either a string representing an object property name + * or a number (starting at 0) for array indices. + */ +export declare type Segment = string | number; +export declare type JSONPath = Segment[]; +export interface Location { + /** + * The previous property key or literal value (string, number, boolean or null) or undefined. + */ + previousNode?: Node; + /** + * The path describing the location in the JSON document. The path consists of a sequence strings + * representing an object property or numbers for array indices. + */ + path: JSONPath; + /** + * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). + * '*' will match a single segment, of any property name or index. + * '**' will match a sequence of segments or no segment, of any property name or index. + */ + matches: (patterns: JSONPath) => boolean; + /** + * If set, the location's offset is at a property key. + */ + isAtPropertyKey: boolean; +} + +/** + * Finds the node at the given path in a JSON DOM. + */ +export function findNodeAtLocation(root: Node, path: JSONPath): Node | undefined; + +/** + * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. + */ +export function findNodeAtOffset(root: Node, offset: number, includeRightBound?: boolean) : Node | undefined; + +/** + * Gets the JSON path of the given JSON DOM node + */ +export function getNodePath(node: Node): JSONPath; + +/** + * Evaluates the JavaScript object of the given JSON DOM node + */ +export function getNodeValue(node: Node): any; + +/** + * Computes the edit operations needed to format a JSON document. + * + * @param documentText The input text + * @param range The range to format or `undefined` to format the full content + * @param options The formatting options + * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function format(documentText: string, range: Range, options: FormattingOptions): EditResult; + +/** + * Computes the edit operations needed to modify a value in the JSON document. + * + * @param documentText The input text + * @param path The path of the value to change. The path represents either to the document root, a property or an array item. + * If the path points to an non-existing property or item, it will be created. + * @param value The new value for the specified property or item. If the value is undefined, + * the property or item will be removed. + * @param options Options + * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. + * To apply the edit operations to the input, use {@linkcode applyEdits}. + */ +export function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; + +/** + * Applies edits to an input string. + * @param text The input text + * @param edits Edit operations following the format described in {@linkcode EditResult}. + * @returns The text with the applied edits. + * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. + */ +export function applyEdits(text: string, edits: EditResult): string; + +/** + * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. + * It consist of one or more edits describing insertions, replacements or removals of text segments. + * * The offsets of the edits refer to the original state of the document. + * * No two edits change or remove the same range of text in the original document. + * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. + * * The order in the array defines which edit is applied first. + * To apply an edit result use {@linkcode applyEdits}. + * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. + */ +export type EditResult = Edit[]; + +/** + * Represents a text modification + */ +export interface Edit { + /** + * The start offset of the modification. + */ + offset: number; + /** + * The length of the modification. Must not be negative. Empty length represents an *insert*. + */ + length: number; + /** + * The new content. Empty content represents a *remove*. + */ + content: string; +} + +/** + * A text range in the document +*/ +export interface Range { + /** + * The start offset of the range. + */ + offset: number; + /** + * The length of the range. Must not be negative. + */ + length: number; +} + +/** + * Options used by {@linkcode format} when computing the formatting edit operations + */ +export interface FormattingOptions { + /** + * If indentation is based on spaces (`insertSpaces` = true), then what is the number of spaces that make an indent? + */ + tabSize: number; + /** + * Is indentation based on spaces? + */ + insertSpaces: boolean; + /** + * The default 'end of line' character + */ + eol: string; +} + +/** + * Options used by {@linkcode modify} when computing the modification edit operations + */ +export interface ModificationOptions { + /** + * Formatting options. If undefined, the newly inserted code will be inserted unformatted. + */ + formattingOptions?: FormattingOptions; + /** + * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then + * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. + */ + isArrayInsertion?: boolean; + /** + * Optional function to define the insertion index given an existing list of properties. + */ + getInsertionIndex?: (properties: string[]) => number; +} +``` + + +License +------- + +(MIT License) + +Copyright 2018, Microsoft diff --git a/node_modules/jsonc-parser/SECURITY.md b/node_modules/jsonc-parser/SECURITY.md new file mode 100644 index 00000000..f7b89984 --- /dev/null +++ b/node_modules/jsonc-parser/SECURITY.md @@ -0,0 +1,41 @@ + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). + + \ No newline at end of file diff --git a/node_modules/jsonc-parser/package.json b/node_modules/jsonc-parser/package.json new file mode 100644 index 00000000..6536a20b --- /dev/null +++ b/node_modules/jsonc-parser/package.json @@ -0,0 +1,37 @@ +{ + "name": "jsonc-parser", + "version": "3.3.1", + "description": "Scanner and parser for JSON with comments.", + "main": "./lib/umd/main.js", + "typings": "./lib/umd/main.d.ts", + "module": "./lib/esm/main.js", + "author": "Microsoft Corporation", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/node-jsonc-parser" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/microsoft/node-jsonc-parser/issues" + }, + "devDependencies": { + "@types/mocha": "^10.0.7", + "@types/node": "^18.x", + "@typescript-eslint/eslint-plugin": "^7.13.1", + "@typescript-eslint/parser": "^7.13.1", + "eslint": "^8.57.0", + "mocha": "^10.4.0", + "rimraf": "^5.0.7", + "typescript": "^5.4.2" + }, + "scripts": { + "prepack": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs", + "compile": "tsc -p ./src && npm run lint", + "compile-esm": "tsc -p ./src/tsconfig.esm.json", + "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", + "clean": "rimraf lib", + "watch": "tsc -w -p ./src", + "test": "npm run compile && mocha ./lib/umd/test", + "lint": "eslint src/**/*.ts" + } +} diff --git a/node_modules/just-curry-it/CHANGELOG.md b/node_modules/just-curry-it/CHANGELOG.md new file mode 100644 index 00000000..f05ab7b7 --- /dev/null +++ b/node_modules/just-curry-it/CHANGELOG.md @@ -0,0 +1,25 @@ +# just-curry-it + +## 5.3.0 + +### Minor Changes + +- Rename node module .js -> .cjs + +## 5.2.1 + +### Patch Changes + +- fix: reorder exports to set default last #488 + +## 5.2.0 + +### Minor Changes + +- package.json updates to fix #467 and #483 + +## 5.1.0 + +### Minor Changes + +- Enhanced Type Defintions diff --git a/node_modules/just-curry-it/LICENSE b/node_modules/just-curry-it/LICENSE new file mode 100644 index 00000000..5d2c6e57 --- /dev/null +++ b/node_modules/just-curry-it/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 angus croll + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/just-curry-it/README.md b/node_modules/just-curry-it/README.md new file mode 100644 index 00000000..83f07a29 --- /dev/null +++ b/node_modules/just-curry-it/README.md @@ -0,0 +1,43 @@ + + + +## just-curry-it + +Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing. +Guilt-free utilities for every occasion. + +[`🍦 Try it`](https://anguscroll.com/just/just-curry-it) + +```shell +npm install just-curry-it +``` +```shell +yarn add just-curry-it +``` + +Return a curried function + +```js +import curry from 'just-curry-it'; + +function add(a, b, c) { + return a + b + c; +} +curry(add)(1)(2)(3); // 6 +curry(add)(1)(2)(2); // 5 +curry(add)(2)(4, 3); // 9 + +function add(...args) { + return args.reduce((sum, n) => sum + n, 0) +} +var curryAdd4 = curry(add, 4) +curryAdd4(1)(2, 3)(4); // 10 + +function converter(ratio, input) { + return (input*ratio).toFixed(1); +} +const curriedConverter = curry(converter) +const milesToKm = curriedConverter(1.62); +milesToKm(35); // 56.7 +milesToKm(10); // 16.2 +``` diff --git a/node_modules/just-curry-it/index.cjs b/node_modules/just-curry-it/index.cjs new file mode 100644 index 00000000..8917dec9 --- /dev/null +++ b/node_modules/just-curry-it/index.cjs @@ -0,0 +1,40 @@ +module.exports = curry; + +/* + function add(a, b, c) { + return a + b + c; + } + curry(add)(1)(2)(3); // 6 + curry(add)(1)(2)(2); // 5 + curry(add)(2)(4, 3); // 9 + + function add(...args) { + return args.reduce((sum, n) => sum + n, 0) + } + var curryAdd4 = curry(add, 4) + curryAdd4(1)(2, 3)(4); // 10 + + function converter(ratio, input) { + return (input*ratio).toFixed(1); + } + const curriedConverter = curry(converter) + const milesToKm = curriedConverter(1.62); + milesToKm(35); // 56.7 + milesToKm(10); // 16.2 +*/ + +function curry(fn, arity) { + return function curried() { + if (arity == null) { + arity = fn.length; + } + var args = [].slice.call(arguments); + if (args.length >= arity) { + return fn.apply(this, args); + } else { + return function() { + return curried.apply(this, args.concat([].slice.call(arguments))); + }; + } + }; +} diff --git a/node_modules/just-curry-it/index.d.ts b/node_modules/just-curry-it/index.d.ts new file mode 100644 index 00000000..ab9e7b3a --- /dev/null +++ b/node_modules/just-curry-it/index.d.ts @@ -0,0 +1,18 @@ +export default curry; + +type MakeTuple = C['length'] extends LEN ? C : MakeTuple +type CurryOverload any, N extends unknown[], P extends unknown[]> = + N extends [infer L, ...infer R] + ? ((...args: [...P, L]) => CurryInternal) & CurryOverload + : () => CurryInternal +type CurryInternal any, N extends unknown[]> = + 0 extends N['length'] ? ReturnType : CurryOverload +type Curry any, LEN extends number | undefined = undefined, I extends any = any> = + 0 extends (LEN extends undefined ? Parameters['length'] : LEN) + ? () => ReturnType + : CurryInternal : MakeTuple> + +declare function curry any, L extends number>( + fn: F, + arity?: L | undefined, +) : Curry[number]>; diff --git a/node_modules/just-curry-it/index.mjs b/node_modules/just-curry-it/index.mjs new file mode 100644 index 00000000..c4c185b2 --- /dev/null +++ b/node_modules/just-curry-it/index.mjs @@ -0,0 +1,42 @@ +var functionCurry = curry; + +/* + function add(a, b, c) { + return a + b + c; + } + curry(add)(1)(2)(3); // 6 + curry(add)(1)(2)(2); // 5 + curry(add)(2)(4, 3); // 9 + + function add(...args) { + return args.reduce((sum, n) => sum + n, 0) + } + var curryAdd4 = curry(add, 4) + curryAdd4(1)(2, 3)(4); // 10 + + function converter(ratio, input) { + return (input*ratio).toFixed(1); + } + const curriedConverter = curry(converter) + const milesToKm = curriedConverter(1.62); + milesToKm(35); // 56.7 + milesToKm(10); // 16.2 +*/ + +function curry(fn, arity) { + return function curried() { + if (arity == null) { + arity = fn.length; + } + var args = [].slice.call(arguments); + if (args.length >= arity) { + return fn.apply(this, args); + } else { + return function() { + return curried.apply(this, args.concat([].slice.call(arguments))); + }; + } + }; +} + +export {functionCurry as default}; diff --git a/node_modules/just-curry-it/index.tests.ts b/node_modules/just-curry-it/index.tests.ts new file mode 100644 index 00000000..5bb51f16 --- /dev/null +++ b/node_modules/just-curry-it/index.tests.ts @@ -0,0 +1,72 @@ +import curry from './index' + +function add(a: number, b: number, c: number) { + return a + b + c; +} + +// OK +curry(add); +curry(add)(1); +curry(add)(1)(2); +curry(add)(1)(2)(3); + +curry(add, 1); +curry(add, 1)(1); + +function many(a: string, b: number, c: boolean, d: bigint, e: number[], f: string | undefined, g: Record): boolean { + return true +} +const return1 = curry(many)('')(123)(false)(BigInt(2))([1])(undefined)({}) +const return2 = curry(many)('', 123)(false, BigInt(2))([1], '123')({}) +const return3 = curry(many)('', 123, false)(BigInt(2), [1], undefined)({}) +const return4 = curry(many)('', 123, false, BigInt(2))([1], undefined, {}) +const return5 = curry(many)('', 123, false, BigInt(2), [1])(undefined, {}) +const return6 = curry(many)('', 123, false, BigInt(2), [1], undefined)({}) +const return7 = curry(many)('', 123, false)(BigInt(2), [1])(undefined)({}) +const returns: boolean[] = [return1, return2, return3, return4, return5, return6, return7] + +function dynamic(...args: string[]): number { + return args.length +} +const dy1 = curry(dynamic, 1)('') +const dy2 = curry(dynamic, 2)('')('') +const dy3 = curry(dynamic, 3)('')('')('') +const dys: number[] = [dy1, dy2, dy3] + +// not OK +// @ts-expect-error +curry(add, 1)(1)(2); +// @ts-expect-error +curry(add, 1)(1)(2)(3); +// @ts-expect-error +curry(add, 4)(''); + +// @ts-expect-error +curry(many)(123) +// @ts-expect-error +curry(many)('', 123)(123) +// @ts-expect-error +curry(many)('', 123, true)('') +// @ts-expect-error +curry(many)('', 123, true, BigInt(2))('') +// @ts-expect-error +curry(many)('', 123, true, BigInt(2), [1])(123) +// @ts-expect-error +curry(many)('', 123, true, BigInt(2), [1,1], '')('') +// @ts-expect-error +curry(dynamic)(123) + +// @ts-expect-error +curry(); +// @ts-expect-error +curry(add, {}); +// @ts-expect-error +curry(add, 'abc')(1); +// @ts-expect-error +curry(1); +// @ts-expect-error +curry('hello'); +// @ts-expect-error +curry({}); +// @ts-expect-error +curry().a(); diff --git a/node_modules/just-curry-it/package.json b/node_modules/just-curry-it/package.json new file mode 100644 index 00000000..b735efff --- /dev/null +++ b/node_modules/just-curry-it/package.json @@ -0,0 +1,32 @@ +{ + "name": "just-curry-it", + "version": "5.3.0", + "description": "return a curried function", + "type": "module", + "exports": { + ".": { + "types": "./index.d.ts", + "require": "./index.cjs", + "import": "./index.mjs" + }, + "./package.json": "./package.json" + }, + "main": "index.cjs", + "types": "index.d.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "rollup -c" + }, + "repository": "https://github.com/angus-c/just", + "keywords": [ + "function", + "curry", + "no-dependencies", + "just" + ], + "author": "Angus Croll", + "license": "MIT", + "bugs": { + "url": "https://github.com/angus-c/just/issues" + } +} \ No newline at end of file diff --git a/node_modules/just-curry-it/rollup.config.js b/node_modules/just-curry-it/rollup.config.js new file mode 100644 index 00000000..fb9d24a3 --- /dev/null +++ b/node_modules/just-curry-it/rollup.config.js @@ -0,0 +1,3 @@ +const createRollupConfig = require('../../config/createRollupConfig'); + +module.exports = createRollupConfig(__dirname); diff --git a/node_modules/punycode/LICENSE-MIT.txt b/node_modules/punycode/LICENSE-MIT.txt new file mode 100644 index 00000000..a41e0a7e --- /dev/null +++ b/node_modules/punycode/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/punycode/README.md b/node_modules/punycode/README.md new file mode 100644 index 00000000..f611016b --- /dev/null +++ b/node_modules/punycode/README.md @@ -0,0 +1,148 @@ +# Punycode.js [![punycode on npm](https://img.shields.io/npm/v/punycode)](https://www.npmjs.com/package/punycode) [![](https://data.jsdelivr.com/v1/package/npm/punycode/badge)](https://www.jsdelivr.com/package/npm/punycode) + +Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891). + +This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: + +* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) +* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) +* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) +* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) +* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) + +This project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated). + +This project provides a CommonJS module that uses ES2015+ features and JavaScript module, which work in modern Node.js versions and browsers. For the old Punycode.js version that offers the same functionality in a UMD build with support for older pre-ES2015 runtimes, including Rhino, Ringo, and Narwhal, see [v1.4.1](https://github.com/mathiasbynens/punycode.js/releases/tag/v1.4.1). + +## Installation + +Via [npm](https://www.npmjs.com/): + +```bash +npm install punycode --save +``` + +In [Node.js](https://nodejs.org/): + +> ⚠️ Note that userland modules don't hide core modules. +> For example, `require('punycode')` still imports the deprecated core module even if you executed `npm install punycode`. +> Use `require('punycode/')` to import userland modules rather than core modules. + +```js +const punycode = require('punycode/'); +``` + +## API + +### `punycode.decode(string)` + +Converts a Punycode string of ASCII symbols to a string of Unicode symbols. + +```js +// decode domain name parts +punycode.decode('maana-pta'); // 'mañana' +punycode.decode('--dqo34k'); // '☃-⌘' +``` + +### `punycode.encode(string)` + +Converts a string of Unicode symbols to a Punycode string of ASCII symbols. + +```js +// encode domain name parts +punycode.encode('mañana'); // 'maana-pta' +punycode.encode('☃-⌘'); // '--dqo34k' +``` + +### `punycode.toUnicode(input)` + +Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. + +```js +// decode domain names +punycode.toUnicode('xn--maana-pta.com'); +// → 'mañana.com' +punycode.toUnicode('xn----dqo34k.com'); +// → '☃-⌘.com' + +// decode email addresses +punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); +// → 'джумла@джpумлатест.bрфa' +``` + +### `punycode.toASCII(input)` + +Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. + +```js +// encode domain names +punycode.toASCII('mañana.com'); +// → 'xn--maana-pta.com' +punycode.toASCII('☃-⌘.com'); +// → 'xn----dqo34k.com' + +// encode email addresses +punycode.toASCII('джумла@джpумлатест.bрфa'); +// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' +``` + +### `punycode.ucs2` + +#### `punycode.ucs2.decode(string)` + +Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. + +```js +punycode.ucs2.decode('abc'); +// → [0x61, 0x62, 0x63] +// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: +punycode.ucs2.decode('\uD834\uDF06'); +// → [0x1D306] +``` + +#### `punycode.ucs2.encode(codePoints)` + +Creates a string based on an array of numeric code point values. + +```js +punycode.ucs2.encode([0x61, 0x62, 0x63]); +// → 'abc' +punycode.ucs2.encode([0x1D306]); +// → '\uD834\uDF06' +``` + +### `punycode.version` + +A string representing the current Punycode.js version number. + +## For maintainers + +### How to publish a new release + +1. On the `main` branch, bump the version number in `package.json`: + + ```sh + npm version patch -m 'Release v%s' + ``` + + Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). + + Note that this produces a Git commit + tag. + +1. Push the release commit and tag: + + ```sh + git push && git push --tags + ``` + + Our CI then automatically publishes the new release to npm, under both the [`punycode`](https://www.npmjs.com/package/punycode) and [`punycode.js`](https://www.npmjs.com/package/punycode.js) names. + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## License + +Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/punycode/package.json b/node_modules/punycode/package.json new file mode 100644 index 00000000..b8b76fc7 --- /dev/null +++ b/node_modules/punycode/package.json @@ -0,0 +1,58 @@ +{ + "name": "punycode", + "version": "2.3.1", + "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", + "homepage": "https://mths.be/punycode", + "main": "punycode.js", + "jsnext:main": "punycode.es6.js", + "module": "punycode.es6.js", + "engines": { + "node": ">=6" + }, + "keywords": [ + "punycode", + "unicode", + "idn", + "idna", + "dns", + "url", + "domain" + ], + "license": "MIT", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/mathiasbynens/punycode.js.git" + }, + "bugs": "https://github.com/mathiasbynens/punycode.js/issues", + "files": [ + "LICENSE-MIT.txt", + "punycode.js", + "punycode.es6.js" + ], + "scripts": { + "test": "mocha tests", + "build": "node scripts/prepublish.js" + }, + "devDependencies": { + "codecov": "^3.8.3", + "nyc": "^15.1.0", + "mocha": "^10.2.0" + }, + "jspm": { + "map": { + "./punycode.js": { + "node": "@node/punycode" + } + } + } +} diff --git a/node_modules/punycode/punycode.es6.js b/node_modules/punycode/punycode.es6.js new file mode 100644 index 00000000..dadece25 --- /dev/null +++ b/node_modules/punycode/punycode.es6.js @@ -0,0 +1,444 @@ +'use strict'; + +/** Highest positive signed 32-bit float value */ +const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +const base = 36; +const tMin = 1; +const tMax = 26; +const skew = 38; +const damp = 700; +const initialBias = 72; +const initialN = 128; // 0x80 +const delimiter = '-'; // '\x2D' + +/** Regular expressions */ +const regexPunycode = /^xn--/; +const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. +const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +const baseMinusTMin = base - tMin; +const floor = Math.floor; +const stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, callback) { + const result = []; + let length = array.length; + while (length--) { + result[length] = callback(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {String} A new string of characters returned by the callback + * function. + */ +function mapDomain(domain, callback) { + const parts = domain.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + domain = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + domain = domain.replace(regexSeparators, '\x2E'); + const labels = domain.split('.'); + const encoded = map(labels, callback).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +const ucs2encode = codePoints => String.fromCodePoint(...codePoints); + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +const basicToDigit = function(codePoint) { + if (codePoint >= 0x30 && codePoint < 0x3A) { + return 26 + (codePoint - 0x30); + } + if (codePoint >= 0x41 && codePoint < 0x5B) { + return codePoint - 0x41; + } + if (codePoint >= 0x61 && codePoint < 0x7B) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +const digitToBasic = function(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +const adapt = function(delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +const decode = function(input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + const oldi = i; + for (let w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + const digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base) { + error('invalid-input'); + } + if (digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + + } + + return String.fromCodePoint(...output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +const encode = function(input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + const inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + const basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue === n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for (let k = base; /* no condition */; k += base) { + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +const toUnicode = function(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +const toASCII = function(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.3.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +export { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode }; +export default punycode; diff --git a/node_modules/punycode/punycode.js b/node_modules/punycode/punycode.js new file mode 100644 index 00000000..a1ef2519 --- /dev/null +++ b/node_modules/punycode/punycode.js @@ -0,0 +1,443 @@ +'use strict'; + +/** Highest positive signed 32-bit float value */ +const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +const base = 36; +const tMin = 1; +const tMax = 26; +const skew = 38; +const damp = 700; +const initialBias = 72; +const initialN = 128; // 0x80 +const delimiter = '-'; // '\x2D' + +/** Regular expressions */ +const regexPunycode = /^xn--/; +const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. +const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +const errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +const baseMinusTMin = base - tMin; +const floor = Math.floor; +const stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, callback) { + const result = []; + let length = array.length; + while (length--) { + result[length] = callback(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {String} A new string of characters returned by the callback + * function. + */ +function mapDomain(domain, callback) { + const parts = domain.split('@'); + let result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + domain = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + domain = domain.replace(regexSeparators, '\x2E'); + const labels = domain.split('.'); + const encoded = map(labels, callback).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + const output = []; + let counter = 0; + const length = string.length; + while (counter < length) { + const value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + const extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +const ucs2encode = codePoints => String.fromCodePoint(...codePoints); + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +const basicToDigit = function(codePoint) { + if (codePoint >= 0x30 && codePoint < 0x3A) { + return 26 + (codePoint - 0x30); + } + if (codePoint >= 0x41 && codePoint < 0x5B) { + return codePoint - 0x41; + } + if (codePoint >= 0x61 && codePoint < 0x7B) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +const digitToBasic = function(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +const adapt = function(delta, numPoints, firstTime) { + let k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +const decode = function(input) { + // Don't use UCS-2. + const output = []; + const inputLength = input.length; + let i = 0; + let n = initialN; + let bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + let basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (let j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + const oldi = i; + for (let w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + const digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base) { + error('invalid-input'); + } + if (digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + const baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + const out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + + } + + return String.fromCodePoint(...output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +const encode = function(input) { + const output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + const inputLength = input.length; + + // Initialize the state. + let n = initialN; + let delta = 0; + let bias = initialBias; + + // Handle the basic code points. + for (const currentValue of input) { + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + const basicLength = output.length; + let handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + let m = maxInt; + for (const currentValue of input) { + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + const handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (const currentValue of input) { + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + if (currentValue === n) { + // Represent delta as a generalized variable-length integer. + let q = delta; + for (let k = base; /* no condition */; k += base) { + const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + const qMinusT = q - t; + const baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +const toUnicode = function(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +const toASCII = function(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +const punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.3.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +module.exports = punycode; diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md new file mode 100644 index 00000000..0412ad8a --- /dev/null +++ b/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,274 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [9.0.1](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1) (2023-09-12) + +### build + +- Fix CI to work with Node.js 20.x + +## [9.0.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05) + +### ⚠ BREAKING CHANGES + +- Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022. + +- Remove the minified UMD build from the package. + + Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays. + + For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished. + +- Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015. + + This also removes the fallback on msCrypto instead of the crypto API. + + Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack. + +### Features + +- optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#597](https://github.com/uuidjs/uuid/issues/597)) ([3a033f6](https://github.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc)) +- remove UMD build ([#645](https://github.com/uuidjs/uuid/issues/645)) ([e948a0f](https://github.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#620](https://github.com/uuidjs/uuid/issues/620) +- use native crypto.randomUUID when available ([#600](https://github.com/uuidjs/uuid/issues/600)) ([c9e076c](https://github.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4)) + +### Bug Fixes + +- add Jest/jsdom compatibility ([#642](https://github.com/uuidjs/uuid/issues/642)) ([16f9c46](https://github.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd)) +- change default export to named function ([#545](https://github.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://github.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a)) +- handle error when parameter is not set in v3 and v5 ([#622](https://github.com/uuidjs/uuid/issues/622)) ([fcd7388](https://github.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091)) +- run npm audit fix ([#644](https://github.com/uuidjs/uuid/issues/644)) ([04686f5](https://github.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353)) +- upgrading from uuid3 broken link ([#568](https://github.com/uuidjs/uuid/issues/568)) ([1c849da](https://github.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6)) + +### build + +- drop Node.js 8.x from babel transpile target ([#603](https://github.com/uuidjs/uuid/issues/603)) ([aa11485](https://github.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5)) +- drop support for legacy browsers (IE11, Safari 10) ([#604](https://github.com/uuidjs/uuid/issues/604)) ([0f433e5](https://github.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148)) + +- drop node 10.x to upgrade dev dependencies ([#653](https://github.com/uuidjs/uuid/issues/653)) ([28a5712](https://github.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#643](https://github.com/uuidjs/uuid/issues/643) + +### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) + +### Bug Fixes + +- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536) + +### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) + +### Bug Fixes + +- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375) + +## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27) + +### Features + +- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180) + +## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23) + +### Features + +- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) +- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437) +- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659)) + +### Bug Fixes + +- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8)) + +## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20) + +### Features + +- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d)) +- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2)) + +### Bug Fixes + +- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444) + +## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29) + +### ⚠ BREAKING CHANGES + +- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. + + ```diff + -import uuid from 'uuid'; + -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' + +import { v4 as uuidv4 } from 'uuid'; + +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' + ``` + +- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. + + Instead use the named exports that this module exports. + + For ECMAScript Modules (ESM): + + ```diff + -import uuidv4 from 'uuid/v4'; + +import { v4 as uuidv4 } from 'uuid'; + uuidv4(); + ``` + + For CommonJS: + + ```diff + -const uuidv4 = require('uuid/v4'); + +const { v4: uuidv4 } = require('uuid'); + uuidv4(); + ``` + +### Features + +- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342) +- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) + +### Bug Fixes + +- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) + +### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) + +### Bug Fixes + +- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408) + +### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) + +### Bug Fixes + +- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) +- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) +- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) + +### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) + +### Bug Fixes + +- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) +- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378) + +## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24) + +### ⚠ BREAKING CHANGES + +- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. +- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. +- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. +- Remove support for generating v3 and v5 UUIDs in Node.js<4.x +- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. + +### Features + +- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345) +- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) +- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) +- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) +- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173) +- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) +- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### Bug Fixes + +- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) +- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370) +- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23)) + +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + +### Features + +- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + +### Bug Fixes + +- no longer run ci tests on node v4 +- upgrade dependencies + +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + +### Bug Fixes + +- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) + +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + +### Bug Fixes + +- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) + +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) + +### Bug Fixes + +- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) + +### Features + +- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) + +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + +### Bug Fixes + +- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + +### Bug Fixes + +- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + +### Features + +- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) + +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) + +### Bug Fixes + +- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) +- Fix typo (#178) +- Simple typo fix (#165) + +### Features + +- v5 support in CLI (#197) +- V5 support (#188) + +# 3.0.1 (2016-11-28) + +- split uuid versions into separate files + +# 3.0.0 (2016-11-17) + +- remove .parse and .unparse + +# 2.0.0 + +- Removed uuid.BufferClass + +# 1.4.0 + +- Improved module context detection +- Removed public RNG functions + +# 1.3.2 + +- Improve tests and handling of v1() options (Issue #24) +- Expose RNG option to allow for perf testing with different generators + +# 1.3.0 + +- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +- Support for node.js crypto API +- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/uuid/CONTRIBUTING.md b/node_modules/uuid/CONTRIBUTING.md new file mode 100644 index 00000000..4a4503d0 --- /dev/null +++ b/node_modules/uuid/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! + +## Testing + +```shell +npm test +``` + +## Releasing + +Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): + +```shell +npm run release -- --dry-run # verify output manually +npm run release # follow the instructions from the output of this command +``` diff --git a/node_modules/uuid/LICENSE.md b/node_modules/uuid/LICENSE.md new file mode 100644 index 00000000..39341683 --- /dev/null +++ b/node_modules/uuid/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2010-2020 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md new file mode 100644 index 00000000..4f51e098 --- /dev/null +++ b/node_modules/uuid/README.md @@ -0,0 +1,466 @@ + + + +# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser) + +For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs + +- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs +- **Cross-platform** - Support for ... + - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) + - NodeJS 12+ ([LTS releases](https://github.com/nodejs/Release)) + - Chrome, Safari, Firefox, Edge browsers + - Webpack and rollup.js module bundlers + - [React Native / Expo](#react-native--expo) +- **Secure** - Cryptographically-strong random values +- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers +- **CLI** - Includes the [`uuid` command line](#command-line) utility + +> **Note** Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details. + +> **Note** Only interested in creating a version 4 UUID? You might be able to use [`crypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library. + +## Quickstart + +To create a random UUID... + +**1. Install** + +```shell +npm install uuid +``` + +**2. Create a UUID** (ES6 module syntax) + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' +``` + +... or using CommonJS syntax: + +```javascript +const { v4: uuidv4 } = require('uuid'); +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +For timestamp UUIDs, namespace UUIDs, and other options read on ... + +## API Summary + +| | | | +| --- | --- | --- | +| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | +| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | +| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | +| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | +| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | +| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | +| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | +| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | +| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | + +## API + +### uuid.NIL + +The nil UUID string (all zeros). + +Example: + +```javascript +import { NIL as NIL_UUID } from 'uuid'; + +NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' +``` + +### uuid.parse(str) + +Convert UUID string to array of bytes + +| | | +| --------- | ---------------------------------------- | +| `str` | A valid UUID `String` | +| _returns_ | `Uint8Array[16]` | +| _throws_ | `TypeError` if `str` is not a valid UUID | + +Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. + +Example: + +```javascript +import { parse as uuidParse } from 'uuid'; + +// Parse a UUID +const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); + +// Convert to hex strings to show byte order (for documentation purposes) +[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ + // [ + // '6e', 'c0', 'bd', '7f', + // '11', 'c0', '43', 'da', + // '97', '5e', '2a', '8a', + // 'd9', 'eb', 'ae', '0b' + // ] +``` + +### uuid.stringify(arr[, offset]) + +Convert array of bytes to UUID string + +| | | +| -------------- | ---------------------------------------------------------------------------- | +| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | +| [`offset` = 0] | `Number` Starting index in the Array | +| _returns_ | `String` | +| _throws_ | `TypeError` if a valid UUID string cannot be generated | + +Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. + +Example: + +```javascript +import { stringify as uuidStringify } from 'uuid'; + +const uuidBytes = [ + 0x6e, 0xc0, 0xbd, 0x7f, 0x11, 0xc0, 0x43, 0xda, 0x97, 0x5e, 0x2a, 0x8a, 0xd9, 0xeb, 0xae, 0x0b, +]; + +uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' +``` + +### uuid.v1([options[, buffer[, offset]]]) + +Create an RFC version 1 (timestamp) UUID + +| | | +| --- | --- | +| [`options`] | `Object` with one or more of the following properties: | +| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | +| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | +| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | +| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) | +| [`options.random`] | `Array` of 16 random bytes (0-255) | +| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | +| _throws_ | `Error` if more than 10M UUIDs/sec are requested | + +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. + +Note: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields. + +Example: + +```javascript +import { v1 as uuidv1 } from 'uuid'; + +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' +``` + +Example using `options`: + +```javascript +import { v1 as uuidv1 } from 'uuid'; + +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678, +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' +``` + +### uuid.v3(name, namespace[, buffer[, offset]]) + +Create an RFC version 3 (namespace w/ MD5) UUID + +API is identical to `v5()`, but uses "v3" instead. + +⚠️ Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." + +### uuid.v4([options[, buffer[, offset]]]) + +Create an RFC version 4 (random) UUID + +| | | +| --- | --- | +| [`options`] | `Object` with one or more of the following properties: | +| [`options.random`] | `Array` of 16 random bytes (0-255) | +| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | + +Example: + +```javascript +import { v4 as uuidv4 } from 'uuid'; + +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +Example using predefined `random` values: + +```javascript +import { v4 as uuidv4 } from 'uuid'; + +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36, + ], +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' +``` + +### uuid.v5(name, namespace[, buffer[, offset]]) + +Create an RFC version 5 (namespace w/ SHA-1) UUID + +| | | +| --- | --- | +| `name` | `String \| Array` | +| `namespace` | `String \| Array[16]` Namespace UUID | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | + +Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. + +Example with custom namespace: + +```javascript +import { v5 as uuidv5 } from 'uuid'; + +// Define a custom namespace. Readers, create your own using something like +// https://www.uuidgenerator.net/ +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; + +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' +``` + +Example with RFC `URL` namespace: + +```javascript +import { v5 as uuidv5 } from 'uuid'; + +uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' +``` + +### uuid.validate(str) + +Test a string to see if it is a valid UUID + +| | | +| --------- | --------------------------------------------------- | +| `str` | `String` to validate | +| _returns_ | `true` if string is a valid UUID, `false` otherwise | + +Example: + +```javascript +import { validate as uuidValidate } from 'uuid'; + +uuidValidate('not a UUID'); // ⇨ false +uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true +``` + +Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. + +```javascript +import { version as uuidVersion } from 'uuid'; +import { validate as uuidValidate } from 'uuid'; + +function uuidValidateV4(uuid) { + return uuidValidate(uuid) && uuidVersion(uuid) === 4; +} + +const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; +const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; + +uuidValidateV4(v4Uuid); // ⇨ true +uuidValidateV4(v1Uuid); // ⇨ false +``` + +### uuid.version(str) + +Detect RFC version of a UUID + +| | | +| --------- | ---------------------------------------- | +| `str` | A valid UUID `String` | +| _returns_ | `Number` The RFC version of the UUID | +| _throws_ | `TypeError` if `str` is not a valid UUID | + +Example: + +```javascript +import { version as uuidVersion } from 'uuid'; + +uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 +uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 +``` + +## Command Line + +UUIDs can be generated from the command line using `uuid`. + +```shell +$ npx uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 +``` + +The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: + +```shell +$ npx uuid --help + +Usage: + uuid + uuid v1 + uuid v3 + uuid v4 + uuid v5 + uuid --help + +Note: may be "URL" or "DNS" to use the corresponding UUIDs +defined by RFC4122 +``` + +## ECMAScript Modules + +This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments). + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +To run the examples you must first create a dist build of this library in the module root: + +```shell +npm run build +``` + +## CDN Builds + +### ECMAScript Modules + +To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/): + +```html + +``` + +### UMD + +As of `uuid@9` [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds are no longer shipped with this library. + +If you need a UMD build of this library, use a bundler like Webpack or Rollup. Alternatively, refer to the documentation of [`uuid@8.3.2`](https://github.com/uuidjs/uuid/blob/v8.3.2/README.md#umd) which was the last version that shipped UMD builds. + +## Known issues + +### Duplicate UUIDs (Googlebot) + +This module may generate duplicate UUIDs when run in clients with _deterministic_ random number generators, such as [Googlebot crawlers](https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers). This can cause problems for apps that expect client-generated UUIDs to always be unique. Developers should be prepared for this and have a strategy for dealing with possible collisions, such as: + +- Check for duplicate UUIDs, fail gracefully +- Disable write operations for Googlebot clients + +### "getRandomValues() not supported" + +This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: + +### React Native / Expo + +1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) +1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: + +```javascript +import 'react-native-get-random-values'; +import { v4 as uuidv4 } from 'uuid'; +``` + +Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`. + +### Web Workers / Service Workers (Edge <= 18) + +[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). + +### IE 11 (Internet Explorer) + +Support for IE11 and other legacy browsers has been dropped as of `uuid@9`. If you need to support legacy browsers, you can always transpile the uuid module source yourself (e.g. using [Babel](https://babeljs.io/)). + +## Upgrading From `uuid@7` + +### Only Named Exports Supported When Using with Node.js ESM + +`uuid@7` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports. + +Instead of doing: + +```javascript +import uuid from 'uuid'; +uuid.v4(); +``` + +you will now have to use the named exports: + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); +``` + +### Deep Requires No Longer Supported + +Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7`](#deep-requires-now-deprecated) are no longer supported. + +## Upgrading From `uuid@3` + +"_Wait... what happened to `uuid@4` thru `uuid@6`?!?_" + +In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped. + +### Deep Requires Now Deprecated + +`uuid@3` encouraged the use of deep requires to minimize the bundle size of browser builds: + +```javascript +const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED! +uuidv4(); +``` + +As of `uuid@7` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax: + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); +``` + +... or for CommonJS: + +```javascript +const { v4: uuidv4 } = require('uuid'); +uuidv4(); +``` + +### Default Export Removed + +`uuid@3` was exporting the Version 4 UUID method as a default export: + +```javascript +const uuid = require('uuid'); // <== REMOVED! +``` + +This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`. + +--- + +Markdown generated from [README_js.md](README_js.md) by
diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json new file mode 100644 index 00000000..6cc33618 --- /dev/null +++ b/node_modules/uuid/package.json @@ -0,0 +1,135 @@ +{ + "name": "uuid", + "version": "9.0.1", + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "bin": { + "uuid": "./dist/bin/uuid" + }, + "sideEffects": false, + "main": "./dist/index.js", + "exports": { + ".": { + "node": { + "module": "./dist/esm-node/index.js", + "require": "./dist/index.js", + "import": "./wrapper.mjs" + }, + "browser": { + "import": "./dist/esm-browser/index.js", + "require": "./dist/commonjs-browser/index.js" + }, + "default": "./dist/esm-browser/index.js" + }, + "./package.json": "./package.json" + }, + "module": "./dist/esm-node/index.js", + "browser": { + "./dist/md5.js": "./dist/md5-browser.js", + "./dist/native.js": "./dist/native-browser.js", + "./dist/rng.js": "./dist/rng-browser.js", + "./dist/sha1.js": "./dist/sha1-browser.js", + "./dist/esm-node/index.js": "./dist/esm-browser/index.js" + }, + "files": [ + "CHANGELOG.md", + "CONTRIBUTING.md", + "LICENSE.md", + "README.md", + "dist", + "wrapper.mjs" + ], + "devDependencies": { + "@babel/cli": "7.18.10", + "@babel/core": "7.18.10", + "@babel/eslint-parser": "7.18.9", + "@babel/preset-env": "7.18.10", + "@commitlint/cli": "17.0.3", + "@commitlint/config-conventional": "17.0.3", + "bundlewatch": "0.3.3", + "eslint": "8.21.0", + "eslint-config-prettier": "8.5.0", + "eslint-config-standard": "17.0.0", + "eslint-plugin-import": "2.26.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-prettier": "4.2.1", + "eslint-plugin-promise": "6.0.0", + "husky": "8.0.1", + "jest": "28.1.3", + "lint-staged": "13.0.3", + "npm-run-all": "4.1.5", + "optional-dev-dependency": "2.0.1", + "prettier": "2.7.1", + "random-seed": "0.3.0", + "runmd": "1.3.9", + "standard-version": "9.5.0" + }, + "optionalDevDependencies": { + "@wdio/browserstack-service": "7.16.10", + "@wdio/cli": "7.16.10", + "@wdio/jasmine-framework": "7.16.6", + "@wdio/local-runner": "7.16.10", + "@wdio/spec-reporter": "7.16.9", + "@wdio/static-server-service": "7.16.6" + }, + "scripts": { + "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build", + "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build", + "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test", + "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test", + "examples:node:jest:test": "cd examples/node-jest && npm install && npm test", + "prepare": "cd $( git rev-parse --show-toplevel ) && husky install", + "lint": "npm run eslint:check && npm run prettier:check", + "eslint:check": "eslint src/ test/ examples/ *.js", + "eslint:fix": "eslint --fix src/ test/ examples/ *.js", + "pretest": "[ -n $CI ] || npm run build", + "test": "BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/", + "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**", + "test:browser": "wdio run ./wdio.conf.js", + "pretest:node": "npm run build", + "test:node": "npm-run-all --parallel examples:node:**", + "test:pack": "./scripts/testpack.sh", + "pretest:benchmark": "npm run build", + "test:benchmark": "cd examples/benchmark && npm install && npm test", + "prettier:check": "prettier --check '**/*.{js,jsx,json,md}'", + "prettier:fix": "prettier --write '**/*.{js,jsx,json,md}'", + "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", + "md": "runmd --watch --output=README.md README_js.md", + "docs": "( node --version | grep -q 'v18' ) && ( npm run build && npx runmd --output=README.md README_js.md )", + "docs:diff": "npm run docs && git diff --quiet README.md", + "build": "./scripts/build.sh", + "prepack": "npm run build", + "release": "standard-version --no-verify" + }, + "repository": { + "type": "git", + "url": "https://github.com/uuidjs/uuid.git" + }, + "lint-staged": { + "*.{js,jsx,json,md}": [ + "prettier --write" + ], + "*.{js,jsx}": [ + "eslint --fix" + ] + }, + "standard-version": { + "scripts": { + "postchangelog": "prettier --write CHANGELOG.md" + } + } +} diff --git a/node_modules/uuid/wrapper.mjs b/node_modules/uuid/wrapper.mjs new file mode 100644 index 00000000..c31e9cef --- /dev/null +++ b/node_modules/uuid/wrapper.mjs @@ -0,0 +1,10 @@ +import uuid from './dist/index.js'; +export const v1 = uuid.v1; +export const v3 = uuid.v3; +export const v4 = uuid.v4; +export const v5 = uuid.v5; +export const NIL = uuid.NIL; +export const version = uuid.version; +export const validate = uuid.validate; +export const stringify = uuid.stringify; +export const parse = uuid.parse; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..5ce6b91d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,172 @@ +{ + "name": "json-schema-test-suite", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "json-schema-test-suite", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@hyperjump/browser": "^1.3.1", + "@hyperjump/json-pointer": "^1.1.1", + "@hyperjump/json-schema": "^1.17.2", + "@hyperjump/pact": "^1.4.0", + "@hyperjump/uri": "^1.3.2", + "json-stringify-deterministic": "^1.0.12" + }, + "devDependencies": { + "jsonc-parser": "^3.3.1" + } + }, + "node_modules/@hyperjump/browser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.1.tgz", + "integrity": "sha512-Le5XZUjnVqVjkgLYv6yyWgALat/0HpB1XaCPuCZ+GCFki9NvXloSZITIJ0H+wRW7mb9At1SxvohKBbNQbrr/cw==", + "license": "MIT", + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.5", + "just-curry-it": "^5.3.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-pointer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.1.tgz", + "integrity": "sha512-M0T3s7TC2JepoWPMZQn1W6eYhFh06OXwpMqL+8c5wMVpvnCKNsPgpu9u7WyCI03xVQti8JAeAy4RzUa6SYlJLA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/json-schema": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.2.tgz", + "integrity": "sha512-pCysQu2kPZFcqyJmiU5JauzPHQIQa9i9F7+S5ui8OiwcdsBZUOjdY1rfSnqgaM5sNeR3akNVXKB/WgxNEnJrWw==", + "license": "MIT", + "dependencies": { + "@hyperjump/json-pointer": "^1.1.0", + "@hyperjump/json-schema-formats": "^1.0.0", + "@hyperjump/pact": "^1.2.0", + "@hyperjump/uri": "^1.2.0", + "content-type": "^1.0.4", + "json-stringify-deterministic": "^1.0.12", + "just-curry-it": "^5.3.0", + "uuid": "^9.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + }, + "peerDependencies": { + "@hyperjump/browser": "^1.1.0" + } + }, + "node_modules/@hyperjump/json-schema-formats": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-formats/-/json-schema-formats-1.0.1.tgz", + "integrity": "sha512-qvcIxysnMfcPxyPSFFzzo28o2BN1CNT5b0tQXNUP0kaFpvptQNDg8SCLvlnMg2sYxuiuqna8+azGBaBthiskAw==", + "license": "MIT", + "dependencies": { + "@hyperjump/uri": "^1.3.2", + "idn-hostname": "^15.1.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/hyperjump-io" + } + }, + "node_modules/@hyperjump/pact": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.4.0.tgz", + "integrity": "sha512-01Q7VY6BcAkp9W31Fv+ciiZycxZHGlR2N6ba9BifgyclHYHdbaZgITo0U6QMhYRlem4k8pf8J31/tApxvqAz8A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/@hyperjump/uri": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.2.tgz", + "integrity": "sha512-OFo5oxuSEz1ktF/LDdBTptlnPyZ66jywLO4fJRuAhnr7NGnsiL2CPoj1JRVaDqVy0nXvWNsC8O8Muw9DR++eEg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jdesrosiers" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/idn-hostname": { + "version": "15.1.8", + "resolved": "https://registry.npmjs.org/idn-hostname/-/idn-hostname-15.1.8.tgz", + "integrity": "sha512-MmLwddtSVyMtzYxx+xs2IFEbfyg/facubL/mEaAoJX/XIfjt1ly5QhPByihf4yrxZYbkQfRZVEnBgISv/e2ZWw==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + } + }, + "node_modules/json-stringify-deterministic": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", + "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/just-curry-it": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", + "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==", + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + } + } +} diff --git a/package.json b/package.json index 67058746..14a9dc12 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,8 @@ "@hyperjump/pact": "^1.4.0", "@hyperjump/uri": "^1.3.2", "json-stringify-deterministic": "^1.0.12" + }, + "devDependencies": { + "jsonc-parser": "^3.3.1" } } diff --git a/scripts/add-test-ids.js b/scripts/add-test-ids.js index e0fd996d..420fa5a8 100644 --- a/scripts/add-test-ids.js +++ b/scripts/add-test-ids.js @@ -1,9 +1,9 @@ import * as fs from "node:fs"; -import * as crypto from "node:crypto"; -import jsonStringify from "json-stringify-deterministic"; + import { parse, modify, applyEdits } from "jsonc-parser"; import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; +import generateTestId from "./utils/generateTestIds.js"; const DIALECT_MAP = { @@ -15,16 +15,7 @@ const DIALECT_MAP = { }; -function generateTestId(normalizedSchema, testData, testValid) { - return crypto - .createHash("md5") - .update( - jsonStringify(normalizedSchema) + - jsonStringify(testData) + - testValid - ) - .digest("hex"); -} + async function addIdsToFile(filePath, dialectUri) { console.log("Reading:", filePath); @@ -54,7 +45,7 @@ async function addIdsToFile(filePath, dialectUri) { ...modify(text, path, id, { formattingOptions: { insertSpaces: true, - tabSize: 2 + tabSize: 4 } }) ); diff --git a/scripts/check-test-ids.js b/scripts/check-test-ids.js index 3001536d..1d1d9baf 100644 --- a/scripts/check-test-ids.js +++ b/scripts/check-test-ids.js @@ -1,24 +1,13 @@ import * as fs from "node:fs"; import * as path from "node:path"; -import * as crypto from "node:crypto"; -import jsonStringify from "json-stringify-deterministic"; import { normalize } from "./normalize.js"; import { loadRemotes } from "./load-remotes.js"; +import generateTestId from "./utils/generateTestIds.js"; +import jsonFiles from "./utils/jsonfiles.js"; // Helpers -function* jsonFiles(dir) { - for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { - const full = path.join(dir, entry.name); - if (entry.isDirectory()) { - yield* jsonFiles(full); - } else if (entry.isFile() && entry.name.endsWith(".json")) { - yield full; - } - } -} - function dialectFromDir(dir) { const draft = path.basename(dir); @@ -38,16 +27,6 @@ function dialectFromDir(dir) { } } -function generateTestId(normalizedSchema, testData, testValid) { - return crypto - .createHash("md5") - .update( - jsonStringify(normalizedSchema) + - jsonStringify(testData) + - testValid - ) - .digest("hex"); -} @@ -62,9 +41,7 @@ async function checkVersion(dir) { // Load remotes ONCE for this dialect const remotesPath = "./remotes"; - if (fs.existsSync(remotesPath)) { - loadRemotes(dialectUri, remotesPath); - } + loadRemotes(dialectUri, remotesPath); for (const file of jsonFiles(dir)) { const testCases = JSON.parse(fs.readFileSync(file, "utf8")); diff --git a/scripts/load-remotes.js b/scripts/load-remotes.js index eb775cbf..eec8ba77 100644 --- a/scripts/load-remotes.js +++ b/scripts/load-remotes.js @@ -1,4 +1,3 @@ -// scripts/load-remotes.js import * as fs from "node:fs"; import { toAbsoluteIri } from "@hyperjump/uri"; import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; @@ -17,29 +16,20 @@ export const loadRemotes = (dialectId, filePath, url = "") => { const remotePath = `${filePath}/${entry.name}`; const remoteUrl = `http://localhost:1234${url}/${entry.name}`; - // Skip if already registered + // If we've already registered this URL once, skip it if (loadedRemotes.has(remoteUrl)) { return; } const remote = JSON.parse(fs.readFileSync(remotePath, "utf8")); - // FIXEDhere - if (typeof remote.$id === "string" && remote.$id.startsWith("file:")) { - remote.$id = remote.$id.replace(/^file:/, "x-file:"); - } - // Only register if $schema matches dialect OR there's no $schema if (!remote.$schema || toAbsoluteIri(remote.$schema) === dialectId) { registerSchema(remote, remoteUrl, dialectId); - loadedRemotes.add(remoteUrl); + loadedRemotes.add(remoteUrl); // Remember we've registered it } } else if (entry.isDirectory()) { - loadRemotes( - dialectId, - `${filePath}/${entry.name}`, - `${url}/${entry.name}` - ); + loadRemotes(dialectId, `${filePath}/${entry.name}`, `${url}/${entry.name}`); } }); -}; +}; \ No newline at end of file diff --git a/scripts/normalize.js b/scripts/normalize.js index bad333fc..94ffeb91 100644 --- a/scripts/normalize.js +++ b/scripts/normalize.js @@ -10,14 +10,11 @@ import "@hyperjump/json-schema/draft-06"; import "@hyperjump/json-schema/draft-04"; -// =========================================== -// CHANGE #2 (ADDED): sanitize file:// $id -// =========================================== const sanitizeTopLevelId = (schema) => { if (typeof schema !== "object" || schema === null) return schema; const copy = { ...schema }; if (typeof copy.$id === "string" && copy.$id.startsWith("file:")) { - delete copy.$id; + copy.$id = copy.$id.replace(/^file:/, "x-file:"); } return copy; }; @@ -27,14 +24,11 @@ const sanitizeTopLevelId = (schema) => { export const normalize = async (rawSchema, dialectUri) => { const schemaUri = "https://test-suite.json-schema.org/main"; - // =========================================== - // CHANGE #2 (APPLIED HERE) - // =========================================== + const safeSchema = sanitizeTopLevelId(rawSchema); - // =========================================== - + try { - // BEFORE: registerSchema(rawSchema, schemaUri, dialectUri) + registerSchema(safeSchema, schemaUri, dialectUri); const schema = await getSchema(schemaUri); @@ -132,11 +126,8 @@ const keywordHandlers = { "https://json-schema.org/keyword/description": simpleValue, "https://json-schema.org/keyword/dynamicRef": simpleValue, // base dynamicRef - // =========================================== - // CHANGE #1 (ADDED): draft-2020-12/dynamicRef - // =========================================== "https://json-schema.org/keyword/draft-2020-12/dynamicRef": simpleValue, - // =========================================== + "https://json-schema.org/keyword/else": simpleApplicator, "https://json-schema.org/keyword/enum": simpleValue, @@ -209,4 +200,4 @@ const keywordHandlers = { }, "https://json-schema.org/keyword/draft-04/maximum": simpleValue, "https://json-schema.org/keyword/draft-04/minimum": simpleValue -}; +}; \ No newline at end of file diff --git a/scripts/utils/generateTestIds.js b/scripts/utils/generateTestIds.js new file mode 100644 index 00000000..45a3dbb7 --- /dev/null +++ b/scripts/utils/generateTestIds.js @@ -0,0 +1,13 @@ +import * as crypto from "node:crypto"; +import jsonStringify from "json-stringify-deterministic"; + +export default function generateTestId(normalizedSchema, testData, testValid) { + return crypto + .createHash("md5") + .update( + jsonStringify(normalizedSchema) + + jsonStringify(testData) + + testValid + ) + .digest("hex"); +} \ No newline at end of file diff --git a/scripts/utils/jsonfiles.js b/scripts/utils/jsonfiles.js new file mode 100644 index 00000000..b4c41a08 --- /dev/null +++ b/scripts/utils/jsonfiles.js @@ -0,0 +1,11 @@ + +export default function* jsonFiles(dir) { + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + const full = path.join(dir, entry.name); + if (entry.isDirectory()) { + yield* jsonFiles(full); + } else if (entry.isFile() && entry.name.endsWith(".json")) { + yield full; + } + } +} diff --git a/test-schema.json b/test-schema.json index fee5a644..5ff6d9ae 100644 --- a/test-schema.json +++ b/test-schema.json @@ -1,128 +1,128 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/tests/test-schema", - "description": "A schema for files contained within this suite", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json-schema.org/tests/test-schema", + "description": "A schema for files contained within this suite", - "type": "array", - "minItems": 1, - "items": { - "description": "An individual test case, containing multiple tests of a single schema's behavior", + "type": "array", + "minItems": 1, + "items": { + "description": "An individual test case, containing multiple tests of a single schema's behavior", - "type": "object", - "required": ["description", "schema", "tests"], - "properties": { - "description": { - "description": "The test case description", - "type": "string" - }, - "comment": { - "description": "Any additional comments about the test case", - "type": "string" - }, - "schema": { - "description": "A valid JSON Schema (one written for the corresponding version directory that the file sits within)." - }, - "tests": { - "description": "A set of related tests all using the same schema", - "type": "array", - "items": { "$ref": "#/$defs/test" }, - "minItems": 1 - }, - "specification": { - "description": "A reference to a specification document which defines the behavior tested by this test case. Typically this should be a JSON Schema specification document, though in cases where the JSON Schema specification points to another RFC it should contain *both* the portion of the JSON Schema specification which indicates what RFC (and section) to follow as *well* as information on where in that specification the behavior is specified.", - - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "properties": { - "core": { - "description": "A section in official JSON Schema core drafts", - "url": "https://json-schema.org/specification-links", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" - }, - "validation": { - "description": "A section in official JSON Schema validation drafts", - "url": "https://json-schema.org/specification-links", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" + "type": "object", + "required": ["description", "schema", "tests"], + "properties": { + "description": { + "description": "The test case description", + "type": "string" }, - "ecma262": { - "description": "A section in official ECMA 262 specification for defining regular expressions", - "url": "https://262.ecma-international.org/", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" + "comment": { + "description": "Any additional comments about the test case", + "type": "string" }, - "perl5": { - "description": "A section name in Perl documentation for defining regular expressions", - "url": "https://perldoc.perl.org/perlre", - "type": "string" + "schema": { + "description": "A valid JSON Schema (one written for the corresponding version directory that the file sits within)." }, - "quote": { - "description": "Quote describing the test case", - "type": "string" - } - }, - "patternProperties": { - "^rfc\\d+$": { - "description": "A section in official RFC for the given rfc number", - "url": "https://www.rfc-editor.org/", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" + "tests": { + "description": "A set of related tests all using the same schema", + "type": "array", + "items": { "$ref": "#/$defs/test" }, + "minItems": 1 }, - "^iso\\d+$": { - "description": "A section in official ISO for the given iso number", - "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", - "type": "string" + "specification": { + "description": "A reference to a specification document which defines the behavior tested by this test case. Typically this should be a JSON Schema specification document, though in cases where the JSON Schema specification points to another RFC it should contain *both* the portion of the JSON Schema specification which indicates what RFC (and section) to follow as *well* as information on where in that specification the behavior is specified.", + + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "properties": { + "core": { + "description": "A section in official JSON Schema core drafts", + "url": "https://json-schema.org/specification-links", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "validation": { + "description": "A section in official JSON Schema validation drafts", + "url": "https://json-schema.org/specification-links", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "ecma262": { + "description": "A section in official ECMA 262 specification for defining regular expressions", + "url": "https://262.ecma-international.org/", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "perl5": { + "description": "A section name in Perl documentation for defining regular expressions", + "url": "https://perldoc.perl.org/perlre", + "type": "string" + }, + "quote": { + "description": "Quote describing the test case", + "type": "string" + } + }, + "patternProperties": { + "^rfc\\d+$": { + "description": "A section in official RFC for the given rfc number", + "url": "https://www.rfc-editor.org/", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + }, + "^iso\\d+$": { + "description": "A section in official ISO for the given iso number", + "pattern": "^[0-9a-zA-Z]+(\\.[0-9a-zA-Z]+)*$", + "type": "string" + } + }, + "additionalProperties": { "type": "string" }, + "minProperties": 1, + "propertyNames": { + "oneOf": [ + { + "pattern": "^((iso)|(rfc))[0-9]+$" + }, + { + "enum": ["core", "validation", "ecma262", "perl5", "quote"] + } + ] + } + } } - }, - "additionalProperties": { "type": "string" }, - "minProperties": 1, - "propertyNames": { - "oneOf": [ - { - "pattern": "^((iso)|(rfc))[0-9]+$" - }, - { - "enum": ["core", "validation", "ecma262", "perl5", "quote"] - } - ] - } - } - } + }, + "additionalProperties": false }, - "additionalProperties": false - }, - "$defs": { - "test": { - "description": "A single test", + "$defs": { + "test": { + "description": "A single test", - "type": "object", - "required": ["description", "data", "valid"], - "properties": { - "description": { - "description": "The test description, briefly explaining which behavior it exercises", - "type": "string" - }, - "comment": { - "description": "Any additional comments about the test", - "type": "string" - }, - "data": { - "description": "The instance which should be validated against the schema in \"schema\"." - }, - "valid": { - "description": "Whether the validation process of this instance should consider the instance valid or not", - "type": "boolean" - }, - "id": { - "description": "Stable identifier for this test", - "type": "string" + "type": "object", + "required": ["description", "data", "valid"], + "properties": { + "description": { + "description": "The test description, briefly explaining which behavior it exercises", + "type": "string" + }, + "comment": { + "description": "Any additional comments about the test", + "type": "string" + }, + "data": { + "description": "The instance which should be validated against the schema in \"schema\"." + }, + "valid": { + "description": "Whether the validation process of this instance should consider the instance valid or not", + "type": "boolean" + }, + "id": { + "description": "Stable identifier for this test", + "type": "string" + } + }, + "additionalProperties": false } - }, - "additionalProperties": false } - } -} +} \ No newline at end of file diff --git a/tests/draft2020-12/enum.json b/tests/draft2020-12/enum.json index 9b87484b..15d26c2e 100644 --- a/tests/draft2020-12/enum.json +++ b/tests/draft2020-12/enum.json @@ -1,501 +1,403 @@ [ - { - "description": "simple enum validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 1, - 2, - 3 - ] - }, - "tests": [ - { - "description": "one of the enum is valid", - "data": 1, - "valid": true, - "id": "bc16cb75d14903a732326a24d1416757" - }, - { - "description": "something else is invalid", - "data": 4, - "valid": false, - "id": "2ea4a168ef00d32d444b3d49dc5a617d" - } - ] - }, - { - "description": "heterogeneous enum validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 6, - "foo", - [], - true, - { - "foo": 12 - } - ] - }, - "tests": [ - { - "description": "one of the enum is valid", - "data": [], - "valid": true, - "id": "e31a02b023906271a7f40576a03df0de" - }, - { - "description": "something else is invalid", - "data": null, - "valid": false, - "id": "b47e0170004d316b00a5151b0d2b566c" - }, - { - "description": "objects are deep compared", - "data": { - "foo": false - }, - "valid": false, - "id": "7285822674e57f31de9c7280fa9d8900" - }, - { - "description": "valid object matches", - "data": { - "foo": 12 - }, - "valid": true, - "id": "27ffbacf5774ff2354458a6954ed1591" - }, - { - "description": "extra properties in object is invalid", - "data": { - "foo": 12, - "boo": 42 + { + "description": "simple enum validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [1, 2, 3] }, - "valid": false, - "id": "e220c92cdef194c74c49f9b7eb86b211" - } - ] - }, - { - "description": "heterogeneous enum-with-null validation", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 6, - null - ] + "tests": [ + { + "description": "one of the enum is valid", + "data": 1, + "valid": true, + "id": "bc16cb75d14903a732326a24d1416757" + }, + { + "description": "something else is invalid", + "data": 4, + "valid": false, + "id": "2ea4a168ef00d32d444b3d49dc5a617d" + } + ] }, - "tests": [ - { - "description": "null is valid", - "data": null, - "valid": true, - "id": "326f454f3db2a5fb76d797b43c812285" - }, - { - "description": "number is valid", - "data": 6, - "valid": true, - "id": "9884c0daef3095b4ff88c309bc87a620" - }, - { - "description": "something else is invalid", - "data": "test", - "valid": false, - "id": "4032c1754a28b94e914f8dfea1e12a26" - } - ] - }, - { - "description": "enums in properties", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "foo": { - "enum": [ - "foo" - ] + { + "description": "heterogeneous enum validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [6, "foo", [], true, {"foo": 12}] }, - "bar": { - "enum": [ - "bar" - ] - } - }, - "required": [ - "bar" - ] + "tests": [ + { + "description": "one of the enum is valid", + "data": [], + "valid": true, + "id": "e31a02b023906271a7f40576a03df0de" + }, + { + "description": "something else is invalid", + "data": null, + "valid": false, + "id": "b47e0170004d316b00a5151b0d2b566c" + }, + { + "description": "objects are deep compared", + "data": {"foo": false}, + "valid": false, + "id": "7285822674e57f31de9c7280fa9d8900" + }, + { + "description": "valid object matches", + "data": {"foo": 12}, + "valid": true, + "id": "27ffbacf5774ff2354458a6954ed1591" + }, + { + "description": "extra properties in object is invalid", + "data": {"foo": 12, "boo": 42}, + "valid": false, + "id": "e220c92cdef194c74c49f9b7eb86b211" + } + ] }, - "tests": [ - { - "description": "both properties are valid", - "data": { - "foo": "foo", - "bar": "bar" - }, - "valid": true, - "id": "dba127f9663272184ec3ea3072676b4d" - }, - { - "description": "wrong foo value", - "data": { - "foo": "foot", - "bar": "bar" + { + "description": "heterogeneous enum-with-null validation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [6, null] }, - "valid": false, - "id": "0f0cca9923128d29922561fe7d92a436" - }, - { - "description": "wrong bar value", - "data": { - "foo": "foo", - "bar": "bart" - }, - "valid": false, - "id": "d32cef9094b8a87100a57cee099310d4" - }, - { - "description": "missing optional property is valid", - "data": { - "bar": "bar" - }, - "valid": true, - "id": "23a7c86ef0b1e3cac9ebb6175de888d0" - }, - { - "description": "missing required property is invalid", - "data": { - "foo": "foo" + "tests": [ + { + "description": "null is valid", + "data": null, + "valid": true, + "id": "326f454f3db2a5fb76d797b43c812285" + }, + { + "description": "number is valid", + "data": 6, + "valid": true, + "id": "9884c0daef3095b4ff88c309bc87a620" + }, + { + "description": "something else is invalid", + "data": "test", + "valid": false, + "id": "4032c1754a28b94e914f8dfea1e12a26" + } + ] + }, + { + "description": "enums in properties", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type":"object", + "properties": { + "foo": {"enum":["foo"]}, + "bar": {"enum":["bar"]} + }, + "required": ["bar"] }, - "valid": false, - "id": "61ac5943d52ba688c77e26a1a7b5d174" - }, - { - "description": "missing all properties is invalid", - "data": {}, - "valid": false, - "id": "8b7be28a144634955b915ad780f4f2a5" - } - ] - }, - { - "description": "enum with escaped characters", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - "foo\nbar", - "foo\rbar" - ] + "tests": [ + { + "description": "both properties are valid", + "data": {"foo":"foo", "bar":"bar"}, + "valid": true, + "id": "dba127f9663272184ec3ea3072676b4d" + }, + { + "description": "wrong foo value", + "data": {"foo":"foot", "bar":"bar"}, + "valid": false, + "id": "0f0cca9923128d29922561fe7d92a436" + }, + { + "description": "wrong bar value", + "data": {"foo":"foo", "bar":"bart"}, + "valid": false, + "id": "d32cef9094b8a87100a57cee099310d4" + }, + { + "description": "missing optional property is valid", + "data": {"bar":"bar"}, + "valid": true, + "id": "23a7c86ef0b1e3cac9ebb6175de888d0" + }, + { + "description": "missing required property is invalid", + "data": {"foo":"foo"}, + "valid": false, + "id": "61ac5943d52ba688c77e26a1a7b5d174" + }, + { + "description": "missing all properties is invalid", + "data": {}, + "valid": false, + "id": "8b7be28a144634955b915ad780f4f2a5" + } + ] }, - "tests": [ - { - "description": "member 1 is valid", - "data": "foo\nbar", - "valid": true, - "id": "056ae2b9aad469dd32a63b1c97716c6e" - }, - { - "description": "member 2 is valid", - "data": "foo\rbar", - "valid": true, - "id": "ade764a27bb0fed294cefb1b6b275cd5" - }, - { - "description": "another string is invalid", - "data": "abc", - "valid": false, - "id": "1faca62e488e50dc47de0b3a26751477" - } - ] - }, - { - "description": "enum with false does not match 0", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - false - ] + { + "description": "enum with escaped characters", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": ["foo\nbar", "foo\rbar"] + }, + "tests": [ + { + "description": "member 1 is valid", + "data": "foo\nbar", + "valid": true, + "id": "056ae2b9aad469dd32a63b1c97716c6e" + }, + { + "description": "member 2 is valid", + "data": "foo\rbar", + "valid": true, + "id": "ade764a27bb0fed294cefb1b6b275cd5" + }, + { + "description": "another string is invalid", + "data": "abc", + "valid": false, + "id": "1faca62e488e50dc47de0b3a26751477" + } + ] }, - "tests": [ - { - "description": "false is valid", - "data": false, - "valid": true, - "id": "4e5b4da53732e4fdeaa5ed74127363bc" - }, - { - "description": "integer zero is invalid", - "data": 0, - "valid": false, - "id": "24f12f5bf7ae6be32a9634be17835176" - }, - { - "description": "float zero is invalid", - "data": 0, - "valid": false, - "id": "24f12f5bf7ae6be32a9634be17835176" - } - ] - }, - { - "description": "enum with [false] does not match [0]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - [ - false + { + "description": "enum with false does not match 0", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [false] + }, + "tests": [ + { + "description": "false is valid", + "data": false, + "valid": true, + "id": "4e5b4da53732e4fdeaa5ed74127363bc" + }, + { + "description": "integer zero is invalid", + "data": 0, + "valid": false, + "id": "24f12f5bf7ae6be32a9634be17835176" + }, + { + "description": "float zero is invalid", + "data": 0.0, + "valid": false, + "id": "24f12f5bf7ae6be32a9634be17835176" + } ] - ] }, - "tests": [ - { - "description": "[false] is valid", - "data": [ - false - ], - "valid": true, - "id": "9fe1fb5471d006782fe7ead4aa9909fa" - }, - { - "description": "[0] is invalid", - "data": [ - 0 - ], - "valid": false, - "id": "8fc4591c8c9ddf9bd41a234d5fa24521" - }, - { - "description": "[0.0] is invalid", - "data": [ - 0 - ], - "valid": false, - "id": "8fc4591c8c9ddf9bd41a234d5fa24521" - } - ] - }, - { - "description": "enum with true does not match 1", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - true - ] + { + "description": "enum with [false] does not match [0]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[false]] + }, + "tests": [ + { + "description": "[false] is valid", + "data": [false], + "valid": true, + "id": "9fe1fb5471d006782fe7ead4aa9909fa" + }, + { + "description": "[0] is invalid", + "data": [0], + "valid": false, + "id": "8fc4591c8c9ddf9bd41a234d5fa24521" + }, + { + "description": "[0.0] is invalid", + "data": [0.0], + "valid": false, + "id": "8fc4591c8c9ddf9bd41a234d5fa24521" + } + ] }, - "tests": [ - { - "description": "true is valid", - "data": true, - "valid": true, - "id": "71738e4d71680e268bbee31fc43a4932" - }, - { - "description": "integer one is invalid", - "data": 1, - "valid": false, - "id": "e8901b103bcc1340391efd3e02420500" - }, - { - "description": "float one is invalid", - "data": 1, - "valid": false, - "id": "e8901b103bcc1340391efd3e02420500" - } - ] - }, - { - "description": "enum with [true] does not match [1]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - [ - true + { + "description": "enum with true does not match 1", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [true] + }, + "tests": [ + { + "description": "true is valid", + "data": true, + "valid": true, + "id": "71738e4d71680e268bbee31fc43a4932" + }, + { + "description": "integer one is invalid", + "data": 1, + "valid": false, + "id": "e8901b103bcc1340391efd3e02420500" + }, + { + "description": "float one is invalid", + "data": 1.0, + "valid": false, + "id": "e8901b103bcc1340391efd3e02420500" + } ] - ] }, - "tests": [ - { - "description": "[true] is valid", - "data": [ - true - ], - "valid": true, - "id": "44049e91dee93b7dafd9cdbc0156a604" - }, - { - "description": "[1] is invalid", - "data": [ - 1 - ], - "valid": false, - "id": "f8b1b069fd03b04f07f5b70786cb916c" - }, - { - "description": "[1.0] is invalid", - "data": [ - 1 - ], - "valid": false, - "id": "f8b1b069fd03b04f07f5b70786cb916c" - } - ] - }, - { - "description": "enum with 0 does not match false", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 0 - ] + { + "description": "enum with [true] does not match [1]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[true]] + }, + "tests": [ + { + "description": "[true] is valid", + "data": [true], + "valid": true, + "id": "44049e91dee93b7dafd9cdbc0156a604" + }, + { + "description": "[1] is invalid", + "data": [1], + "valid": false, + "id": "f8b1b069fd03b04f07f5b70786cb916c" + }, + { + "description": "[1.0] is invalid", + "data": [1.0], + "valid": false, + "id": "f8b1b069fd03b04f07f5b70786cb916c" + } + ] }, - "tests": [ - { - "description": "false is invalid", - "data": false, - "valid": false, - "id": "5cedc4948cc5d6744fa620039487ac15" - }, - { - "description": "integer zero is valid", - "data": 0, - "valid": true, - "id": "133e04205807df77ac09e730c237aba4" - }, - { - "description": "float zero is valid", - "data": 0, - "valid": true, - "id": "133e04205807df77ac09e730c237aba4" - } - ] - }, - { - "description": "enum with [0] does not match [false]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - [ - 0 + { + "description": "enum with 0 does not match false", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [0] + }, + "tests": [ + { + "description": "false is invalid", + "data": false, + "valid": false, + "id": "5cedc4948cc5d6744fa620039487ac15" + }, + { + "description": "integer zero is valid", + "data": 0, + "valid": true, + "id": "133e04205807df77ac09e730c237aba4" + }, + { + "description": "float zero is valid", + "data": 0.0, + "valid": true, + "id": "133e04205807df77ac09e730c237aba4" + } ] - ] }, - "tests": [ - { - "description": "[false] is invalid", - "data": [ - false - ], - "valid": false, - "id": "e6da8d988a7c265913e24eaed91af3de" - }, - { - "description": "[0] is valid", - "data": [ - 0 - ], - "valid": true, - "id": "10ba58a9539f8558892d28d2f5e3493d" - }, - { - "description": "[0.0] is valid", - "data": [ - 0 - ], - "valid": true, - "id": "10ba58a9539f8558892d28d2f5e3493d" - } - ] - }, - { - "description": "enum with 1 does not match true", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - 1 - ] + { + "description": "enum with [0] does not match [false]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[0]] + }, + "tests": [ + { + "description": "[false] is invalid", + "data": [false], + "valid": false, + "id": "e6da8d988a7c265913e24eaed91af3de" + }, + { + "description": "[0] is valid", + "data": [0], + "valid": true, + "id": "10ba58a9539f8558892d28d2f5e3493d" + }, + { + "description": "[0.0] is valid", + "data": [0.0], + "valid": true, + "id": "10ba58a9539f8558892d28d2f5e3493d" + } + ] }, - "tests": [ - { - "description": "true is invalid", - "data": true, - "valid": false, - "id": "a8356b24823e955bc3895c25b9e442eb" - }, - { - "description": "integer one is valid", - "data": 1, - "valid": true, - "id": "603d6607a05072c21bcbff4578494e22" - }, - { - "description": "float one is valid", - "data": 1, - "valid": true, - "id": "603d6607a05072c21bcbff4578494e22" - } - ] - }, - { - "description": "enum with [1] does not match [true]", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - [ - 1 + { + "description": "enum with 1 does not match true", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [1] + }, + "tests": [ + { + "description": "true is invalid", + "data": true, + "valid": false, + "id": "a8356b24823e955bc3895c25b9e442eb" + }, + { + "description": "integer one is valid", + "data": 1, + "valid": true, + "id": "603d6607a05072c21bcbff4578494e22" + }, + { + "description": "float one is valid", + "data": 1.0, + "valid": true, + "id": "603d6607a05072c21bcbff4578494e22" + } ] - ] }, - "tests": [ - { - "description": "[true] is invalid", - "data": [ - true - ], - "valid": false, - "id": "732eec1f5b7fdf6d24c40d77072628e3" - }, - { - "description": "[1] is valid", - "data": [ - 1 - ], - "valid": true, - "id": "8064c0569b7c7a17631d0dc802090303" - }, - { - "description": "[1.0] is valid", - "data": [ - 1 - ], - "valid": true, - "id": "8064c0569b7c7a17631d0dc802090303" - } - ] - }, - { - "description": "nul characters in strings", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "enum": [ - "hello\u0000there" - ] + { + "description": "enum with [1] does not match [true]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[1]] + }, + "tests": [ + { + "description": "[true] is invalid", + "data": [true], + "valid": false, + "id": "732eec1f5b7fdf6d24c40d77072628e3" + }, + { + "description": "[1] is valid", + "data": [1], + "valid": true, + "id": "8064c0569b7c7a17631d0dc802090303" + }, + { + "description": "[1.0] is valid", + "data": [1.0], + "valid": true, + "id": "8064c0569b7c7a17631d0dc802090303" + } + ] }, - "tests": [ - { - "description": "match string with nul", - "data": "hello\u0000there", - "valid": true, - "id": "d94ca2719908ab9c789d7c71e4cc93e4" - }, - { - "description": "do not match string lacking nul", - "data": "hellothere", - "valid": false, - "id": "a2c7a2aa3202a473dc03b5a8fcc070e9" - } - ] - } + { + "description": "nul characters in strings", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ "hello\u0000there" ] + }, + "tests": [ + { + "description": "match string with nul", + "data": "hello\u0000there", + "valid": true, + "id": "d94ca2719908ab9c789d7c71e4cc93e4" + }, + { + "description": "do not match string lacking nul", + "data": "hellothere", + "valid": false, + "id": "a2c7a2aa3202a473dc03b5a8fcc070e9" + } + ] + } ] From c7799ef9188bf24e3005c476799a3e7202967258 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Sun, 11 Jan 2026 14:23:19 +0530 Subject: [PATCH 14/25] Remove accidentally committed node_modules --- .gitignore | 1 + node_modules/.bin/uuid | 16 - node_modules/.bin/uuid.cmd | 17 - node_modules/.bin/uuid.ps1 | 28 - node_modules/.package-lock.json | 156 -- .../@hyperjump/browser/.gitattributes | 1 - node_modules/@hyperjump/browser/LICENCE | 21 - node_modules/@hyperjump/browser/README.md | 249 --- node_modules/@hyperjump/browser/package.json | 57 - node_modules/@hyperjump/json-pointer/LICENSE | 21 - .../@hyperjump/json-pointer/README.md | 102 - .../@hyperjump/json-pointer/package.json | 32 - .../@hyperjump/json-schema-formats/LICENSE | 21 - .../@hyperjump/json-schema-formats/README.md | 42 - .../json-schema-formats/package.json | 60 - .../json-schema-formats/src/date-math.js | 120 -- .../draft-bhutton-relative-json-pointer-00.js | 18 - .../json-schema-formats/src/ecma262.js | 13 - .../json-schema-formats/src/index.d.ts | 170 -- .../json-schema-formats/src/index.js | 33 - .../json-schema-formats/src/rfc1123.js | 13 - .../json-schema-formats/src/rfc2673.js | 12 - .../json-schema-formats/src/rfc3339.js | 78 - .../json-schema-formats/src/rfc3986.js | 17 - .../json-schema-formats/src/rfc3987.js | 17 - .../json-schema-formats/src/rfc4122.js | 20 - .../json-schema-formats/src/rfc4291.js | 18 - .../json-schema-formats/src/rfc5321.js | 46 - .../json-schema-formats/src/rfc6531.js | 55 - .../json-schema-formats/src/rfc6570.js | 38 - .../json-schema-formats/src/rfc6901.js | 14 - .../json-schema-formats/src/uts46.js | 20 - node_modules/@hyperjump/json-schema/LICENSE | 21 - node_modules/@hyperjump/json-schema/README.md | 966 ---------- .../annotations/annotated-instance.d.ts | 4 - .../annotations/annotated-instance.js | 20 - .../json-schema/annotations/index.d.ts | 21 - .../json-schema/annotations/index.js | 45 - .../json-schema/annotations/test-utils.d.ts | 1 - .../json-schema/annotations/test-utils.js | 38 - .../annotations/validation-error.js | 7 - .../@hyperjump/json-schema/bundle/index.d.ts | 14 - .../@hyperjump/json-schema/bundle/index.js | 83 - .../json-schema/draft-04/additionalItems.js | 38 - .../json-schema/draft-04/dependencies.js | 36 - .../json-schema/draft-04/exclusiveMaximum.js | 5 - .../json-schema/draft-04/exclusiveMinimum.js | 5 - .../@hyperjump/json-schema/draft-04/format.js | 31 - .../@hyperjump/json-schema/draft-04/id.js | 1 - .../json-schema/draft-04/index.d.ts | 43 - .../@hyperjump/json-schema/draft-04/index.js | 71 - .../@hyperjump/json-schema/draft-04/items.js | 57 - .../json-schema/draft-04/maximum.js | 25 - .../json-schema/draft-04/minimum.js | 25 - .../@hyperjump/json-schema/draft-04/ref.js | 1 - .../@hyperjump/json-schema/draft-04/schema.js | 149 -- .../json-schema/draft-06/contains.js | 15 - .../@hyperjump/json-schema/draft-06/format.js | 34 - .../json-schema/draft-06/index.d.ts | 49 - .../@hyperjump/json-schema/draft-06/index.js | 70 - .../@hyperjump/json-schema/draft-06/schema.js | 154 -- .../@hyperjump/json-schema/draft-07/format.js | 42 - .../json-schema/draft-07/index.d.ts | 55 - .../@hyperjump/json-schema/draft-07/index.js | 78 - .../@hyperjump/json-schema/draft-07/schema.js | 172 -- .../draft-2019-09/format-assertion.js | 44 - .../json-schema/draft-2019-09/format.js | 44 - .../json-schema/draft-2019-09/index.d.ts | 66 - .../json-schema/draft-2019-09/index.js | 118 -- .../draft-2019-09/meta/applicator.js | 55 - .../json-schema/draft-2019-09/meta/content.js | 17 - .../json-schema/draft-2019-09/meta/core.js | 57 - .../json-schema/draft-2019-09/meta/format.js | 14 - .../draft-2019-09/meta/meta-data.js | 37 - .../draft-2019-09/meta/validation.js | 98 - .../draft-2019-09/recursiveAnchor.js | 1 - .../json-schema/draft-2019-09/schema.js | 42 - .../draft-2020-12/dynamicAnchor.js | 1 - .../json-schema/draft-2020-12/dynamicRef.js | 38 - .../draft-2020-12/format-assertion.js | 43 - .../json-schema/draft-2020-12/format.js | 44 - .../json-schema/draft-2020-12/index.d.ts | 67 - .../json-schema/draft-2020-12/index.js | 126 -- .../draft-2020-12/meta/applicator.js | 46 - .../json-schema/draft-2020-12/meta/content.js | 14 - .../json-schema/draft-2020-12/meta/core.js | 54 - .../draft-2020-12/meta/format-annotation.js | 11 - .../draft-2020-12/meta/format-assertion.js | 11 - .../draft-2020-12/meta/meta-data.js | 34 - .../draft-2020-12/meta/unevaluated.js | 12 - .../draft-2020-12/meta/validation.js | 95 - .../json-schema/draft-2020-12/schema.js | 44 - .../json-schema/formats/handlers/date-time.js | 7 - .../json-schema/formats/handlers/date.js | 7 - .../formats/handlers/draft-04/hostname.js | 7 - .../json-schema/formats/handlers/duration.js | 7 - .../json-schema/formats/handlers/email.js | 7 - .../json-schema/formats/handlers/hostname.js | 7 - .../json-schema/formats/handlers/idn-email.js | 7 - .../formats/handlers/idn-hostname.js | 7 - .../json-schema/formats/handlers/ipv4.js | 7 - .../json-schema/formats/handlers/ipv6.js | 7 - .../formats/handlers/iri-reference.js | 7 - .../json-schema/formats/handlers/iri.js | 7 - .../formats/handlers/json-pointer.js | 7 - .../json-schema/formats/handlers/regex.js | 7 - .../formats/handlers/relative-json-pointer.js | 7 - .../json-schema/formats/handlers/time.js | 7 - .../formats/handlers/uri-reference.js | 7 - .../formats/handlers/uri-template.js | 7 - .../json-schema/formats/handlers/uri.js | 7 - .../json-schema/formats/handlers/uuid.js | 7 - .../@hyperjump/json-schema/formats/index.js | 11 - .../@hyperjump/json-schema/formats/lite.js | 38 - .../json-schema/openapi-3-0/dialect.js | 174 -- .../json-schema/openapi-3-0/discriminator.js | 10 - .../json-schema/openapi-3-0/example.js | 10 - .../json-schema/openapi-3-0/externalDocs.js | 10 - .../json-schema/openapi-3-0/index.d.ts | 298 --- .../json-schema/openapi-3-0/index.js | 77 - .../json-schema/openapi-3-0/nullable.js | 10 - .../json-schema/openapi-3-0/schema.js | 1368 -------------- .../json-schema/openapi-3-0/type.js | 22 - .../@hyperjump/json-schema/openapi-3-0/xml.js | 10 - .../json-schema/openapi-3-1/dialect/base.js | 22 - .../json-schema/openapi-3-1/index.d.ts | 364 ---- .../json-schema/openapi-3-1/index.js | 49 - .../json-schema/openapi-3-1/meta/base.js | 77 - .../json-schema/openapi-3-1/schema-base.js | 33 - .../openapi-3-1/schema-draft-04.js | 33 - .../openapi-3-1/schema-draft-06.js | 33 - .../openapi-3-1/schema-draft-07.js | 33 - .../openapi-3-1/schema-draft-2019-09.js | 33 - .../openapi-3-1/schema-draft-2020-12.js | 33 - .../json-schema/openapi-3-1/schema.js | 1407 -------------- .../json-schema/openapi-3-2/dialect/base.js | 22 - .../json-schema/openapi-3-2/index.d.ts | 415 ---- .../json-schema/openapi-3-2/index.js | 47 - .../json-schema/openapi-3-2/meta/base.js | 102 - .../json-schema/openapi-3-2/schema-base.js | 32 - .../openapi-3-2/schema-draft-04.js | 33 - .../openapi-3-2/schema-draft-06.js | 33 - .../openapi-3-2/schema-draft-07.js | 33 - .../openapi-3-2/schema-draft-2019-09.js | 33 - .../openapi-3-2/schema-draft-2020-12.js | 33 - .../json-schema/openapi-3-2/schema.js | 1665 ----------------- .../@hyperjump/json-schema/package.json | 83 - .../v1/extension-tests/conditional.json | 289 --- .../v1/extension-tests/itemPattern.json | 462 ----- .../@hyperjump/json-schema/v1/index.d.ts | 68 - .../@hyperjump/json-schema/v1/index.js | 116 -- .../json-schema/v1/meta/applicator.js | 73 - .../@hyperjump/json-schema/v1/meta/content.js | 10 - .../@hyperjump/json-schema/v1/meta/core.js | 50 - .../@hyperjump/json-schema/v1/meta/format.js | 8 - .../json-schema/v1/meta/meta-data.js | 14 - .../json-schema/v1/meta/unevaluated.js | 9 - .../json-schema/v1/meta/validation.js | 65 - .../@hyperjump/json-schema/v1/schema.js | 24 - node_modules/@hyperjump/pact/LICENSE | 21 - node_modules/@hyperjump/pact/README.md | 76 - node_modules/@hyperjump/pact/package.json | 45 - node_modules/@hyperjump/pact/src/async.js | 24 - node_modules/@hyperjump/pact/src/curry.d.ts | 13 - node_modules/@hyperjump/pact/src/curry.js | 15 - node_modules/@hyperjump/pact/src/index.d.ts | 443 ----- node_modules/@hyperjump/pact/src/index.js | 487 ----- .../@hyperjump/pact/src/type-utils.d.ts | 5 - node_modules/@hyperjump/uri/LICENSE | 21 - node_modules/@hyperjump/uri/README.md | 129 -- node_modules/@hyperjump/uri/package.json | 39 - node_modules/content-type/HISTORY.md | 29 - node_modules/content-type/LICENSE | 22 - node_modules/content-type/README.md | 94 - node_modules/content-type/index.js | 225 --- node_modules/content-type/package.json | 42 - node_modules/idn-hostname/#/tests/0/0.json | 5 - node_modules/idn-hostname/#/tests/0/1.json | 5 - node_modules/idn-hostname/#/tests/0/10.json | 5 - node_modules/idn-hostname/#/tests/0/11.json | 5 - node_modules/idn-hostname/#/tests/0/12.json | 5 - node_modules/idn-hostname/#/tests/0/13.json | 5 - node_modules/idn-hostname/#/tests/0/14.json | 5 - node_modules/idn-hostname/#/tests/0/15.json | 5 - node_modules/idn-hostname/#/tests/0/16.json | 5 - node_modules/idn-hostname/#/tests/0/17.json | 5 - node_modules/idn-hostname/#/tests/0/18.json | 5 - node_modules/idn-hostname/#/tests/0/19.json | 5 - node_modules/idn-hostname/#/tests/0/2.json | 5 - node_modules/idn-hostname/#/tests/0/20.json | 6 - node_modules/idn-hostname/#/tests/0/21.json | 6 - node_modules/idn-hostname/#/tests/0/22.json | 6 - node_modules/idn-hostname/#/tests/0/23.json | 6 - node_modules/idn-hostname/#/tests/0/24.json | 6 - node_modules/idn-hostname/#/tests/0/25.json | 6 - node_modules/idn-hostname/#/tests/0/26.json | 6 - node_modules/idn-hostname/#/tests/0/27.json | 6 - node_modules/idn-hostname/#/tests/0/28.json | 6 - node_modules/idn-hostname/#/tests/0/29.json | 6 - node_modules/idn-hostname/#/tests/0/3.json | 5 - node_modules/idn-hostname/#/tests/0/30.json | 6 - node_modules/idn-hostname/#/tests/0/31.json | 6 - node_modules/idn-hostname/#/tests/0/32.json | 6 - node_modules/idn-hostname/#/tests/0/33.json | 6 - node_modules/idn-hostname/#/tests/0/34.json | 6 - node_modules/idn-hostname/#/tests/0/35.json | 6 - node_modules/idn-hostname/#/tests/0/36.json | 6 - node_modules/idn-hostname/#/tests/0/37.json | 6 - node_modules/idn-hostname/#/tests/0/38.json | 6 - node_modules/idn-hostname/#/tests/0/39.json | 6 - node_modules/idn-hostname/#/tests/0/4.json | 5 - node_modules/idn-hostname/#/tests/0/40.json | 6 - node_modules/idn-hostname/#/tests/0/41.json | 6 - node_modules/idn-hostname/#/tests/0/42.json | 6 - node_modules/idn-hostname/#/tests/0/43.json | 6 - node_modules/idn-hostname/#/tests/0/44.json | 6 - node_modules/idn-hostname/#/tests/0/45.json | 6 - node_modules/idn-hostname/#/tests/0/46.json | 6 - node_modules/idn-hostname/#/tests/0/47.json | 6 - node_modules/idn-hostname/#/tests/0/48.json | 6 - node_modules/idn-hostname/#/tests/0/49.json | 6 - node_modules/idn-hostname/#/tests/0/5.json | 5 - node_modules/idn-hostname/#/tests/0/50.json | 6 - node_modules/idn-hostname/#/tests/0/51.json | 6 - node_modules/idn-hostname/#/tests/0/52.json | 6 - node_modules/idn-hostname/#/tests/0/53.json | 6 - node_modules/idn-hostname/#/tests/0/54.json | 6 - node_modules/idn-hostname/#/tests/0/55.json | 6 - node_modules/idn-hostname/#/tests/0/56.json | 6 - node_modules/idn-hostname/#/tests/0/57.json | 6 - node_modules/idn-hostname/#/tests/0/58.json | 6 - node_modules/idn-hostname/#/tests/0/59.json | 6 - node_modules/idn-hostname/#/tests/0/6.json | 5 - node_modules/idn-hostname/#/tests/0/60.json | 6 - node_modules/idn-hostname/#/tests/0/61.json | 6 - node_modules/idn-hostname/#/tests/0/62.json | 6 - node_modules/idn-hostname/#/tests/0/63.json | 5 - node_modules/idn-hostname/#/tests/0/64.json | 5 - node_modules/idn-hostname/#/tests/0/65.json | 5 - node_modules/idn-hostname/#/tests/0/66.json | 5 - node_modules/idn-hostname/#/tests/0/67.json | 5 - node_modules/idn-hostname/#/tests/0/68.json | 5 - node_modules/idn-hostname/#/tests/0/69.json | 5 - node_modules/idn-hostname/#/tests/0/7.json | 5 - node_modules/idn-hostname/#/tests/0/70.json | 5 - node_modules/idn-hostname/#/tests/0/71.json | 5 - node_modules/idn-hostname/#/tests/0/72.json | 5 - node_modules/idn-hostname/#/tests/0/73.json | 5 - node_modules/idn-hostname/#/tests/0/74.json | 5 - node_modules/idn-hostname/#/tests/0/75.json | 5 - node_modules/idn-hostname/#/tests/0/76.json | 5 - node_modules/idn-hostname/#/tests/0/77.json | 5 - node_modules/idn-hostname/#/tests/0/78.json | 5 - node_modules/idn-hostname/#/tests/0/79.json | 5 - node_modules/idn-hostname/#/tests/0/8.json | 5 - node_modules/idn-hostname/#/tests/0/80.json | 5 - node_modules/idn-hostname/#/tests/0/81.json | 5 - node_modules/idn-hostname/#/tests/0/82.json | 5 - node_modules/idn-hostname/#/tests/0/83.json | 5 - node_modules/idn-hostname/#/tests/0/84.json | 5 - node_modules/idn-hostname/#/tests/0/85.json | 5 - node_modules/idn-hostname/#/tests/0/86.json | 5 - node_modules/idn-hostname/#/tests/0/87.json | 5 - node_modules/idn-hostname/#/tests/0/88.json | 5 - node_modules/idn-hostname/#/tests/0/89.json | 5 - node_modules/idn-hostname/#/tests/0/9.json | 5 - node_modules/idn-hostname/#/tests/0/90.json | 5 - node_modules/idn-hostname/#/tests/0/91.json | 5 - node_modules/idn-hostname/#/tests/0/92.json | 5 - node_modules/idn-hostname/#/tests/0/93.json | 5 - node_modules/idn-hostname/#/tests/0/94.json | 5 - node_modules/idn-hostname/#/tests/0/95.json | 6 - .../idn-hostname/#/tests/0/schema.json | 4 - node_modules/idn-hostname/LICENSE | 21 - .../idn-hostname/idnaMappingTableCompact.json | 1 - node_modules/idn-hostname/index.d.ts | 32 - node_modules/idn-hostname/index.js | 172 -- node_modules/idn-hostname/package.json | 33 - node_modules/idn-hostname/readme.md | 302 --- .../json-stringify-deterministic/LICENSE.md | 21 - .../json-stringify-deterministic/README.md | 143 -- .../json-stringify-deterministic/package.json | 101 - node_modules/jsonc-parser/CHANGELOG.md | 76 - node_modules/jsonc-parser/LICENSE.md | 21 - node_modules/jsonc-parser/README.md | 364 ---- node_modules/jsonc-parser/SECURITY.md | 41 - node_modules/jsonc-parser/package.json | 37 - node_modules/just-curry-it/CHANGELOG.md | 25 - node_modules/just-curry-it/LICENSE | 21 - node_modules/just-curry-it/README.md | 43 - node_modules/just-curry-it/index.cjs | 40 - node_modules/just-curry-it/index.d.ts | 18 - node_modules/just-curry-it/index.mjs | 42 - node_modules/just-curry-it/index.tests.ts | 72 - node_modules/just-curry-it/package.json | 32 - node_modules/just-curry-it/rollup.config.js | 3 - node_modules/punycode/LICENSE-MIT.txt | 20 - node_modules/punycode/README.md | 148 -- node_modules/punycode/package.json | 58 - node_modules/punycode/punycode.es6.js | 444 ----- node_modules/punycode/punycode.js | 443 ----- node_modules/uuid/CHANGELOG.md | 274 --- node_modules/uuid/CONTRIBUTING.md | 18 - node_modules/uuid/LICENSE.md | 9 - node_modules/uuid/README.md | 466 ----- node_modules/uuid/package.json | 135 -- node_modules/uuid/wrapper.mjs | 10 - 307 files changed, 1 insertion(+), 19092 deletions(-) delete mode 100644 node_modules/.bin/uuid delete mode 100644 node_modules/.bin/uuid.cmd delete mode 100644 node_modules/.bin/uuid.ps1 delete mode 100644 node_modules/.package-lock.json delete mode 100644 node_modules/@hyperjump/browser/.gitattributes delete mode 100644 node_modules/@hyperjump/browser/LICENCE delete mode 100644 node_modules/@hyperjump/browser/README.md delete mode 100644 node_modules/@hyperjump/browser/package.json delete mode 100644 node_modules/@hyperjump/json-pointer/LICENSE delete mode 100644 node_modules/@hyperjump/json-pointer/README.md delete mode 100644 node_modules/@hyperjump/json-pointer/package.json delete mode 100644 node_modules/@hyperjump/json-schema-formats/LICENSE delete mode 100644 node_modules/@hyperjump/json-schema-formats/README.md delete mode 100644 node_modules/@hyperjump/json-schema-formats/package.json delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/date-math.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/ecma262.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/index.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc1123.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc2673.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3339.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3986.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc3987.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc4122.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc4291.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc5321.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6531.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6570.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/rfc6901.js delete mode 100644 node_modules/@hyperjump/json-schema-formats/src/uts46.js delete mode 100644 node_modules/@hyperjump/json-schema/LICENSE delete mode 100644 node_modules/@hyperjump/json-schema/README.md delete mode 100644 node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/annotations/annotated-instance.js delete mode 100644 node_modules/@hyperjump/json-schema/annotations/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/annotations/index.js delete mode 100644 node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/annotations/test-utils.js delete mode 100644 node_modules/@hyperjump/json-schema/annotations/validation-error.js delete mode 100644 node_modules/@hyperjump/json-schema/bundle/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/bundle/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/additionalItems.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/dependencies.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/id.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/items.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/maximum.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/minimum.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/ref.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-04/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/contains.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-06/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-07/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-07/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-07/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-07/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2019-09/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/format.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/index.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js delete mode 100644 node_modules/@hyperjump/json-schema/draft-2020-12/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/date-time.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/date.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/duration.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/email.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/hostname.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/iri.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/regex.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/time.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uri.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/handlers/uuid.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/index.js delete mode 100644 node_modules/@hyperjump/json-schema/formats/lite.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/example.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/index.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/type.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-0/xml.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/index.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-1/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/index.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js delete mode 100644 node_modules/@hyperjump/json-schema/openapi-3-2/schema.js delete mode 100644 node_modules/@hyperjump/json-schema/package.json delete mode 100644 node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json delete mode 100644 node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json delete mode 100644 node_modules/@hyperjump/json-schema/v1/index.d.ts delete mode 100644 node_modules/@hyperjump/json-schema/v1/index.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/applicator.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/content.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/core.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/format.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/meta-data.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/meta/validation.js delete mode 100644 node_modules/@hyperjump/json-schema/v1/schema.js delete mode 100644 node_modules/@hyperjump/pact/LICENSE delete mode 100644 node_modules/@hyperjump/pact/README.md delete mode 100644 node_modules/@hyperjump/pact/package.json delete mode 100644 node_modules/@hyperjump/pact/src/async.js delete mode 100644 node_modules/@hyperjump/pact/src/curry.d.ts delete mode 100644 node_modules/@hyperjump/pact/src/curry.js delete mode 100644 node_modules/@hyperjump/pact/src/index.d.ts delete mode 100644 node_modules/@hyperjump/pact/src/index.js delete mode 100644 node_modules/@hyperjump/pact/src/type-utils.d.ts delete mode 100644 node_modules/@hyperjump/uri/LICENSE delete mode 100644 node_modules/@hyperjump/uri/README.md delete mode 100644 node_modules/@hyperjump/uri/package.json delete mode 100644 node_modules/content-type/HISTORY.md delete mode 100644 node_modules/content-type/LICENSE delete mode 100644 node_modules/content-type/README.md delete mode 100644 node_modules/content-type/index.js delete mode 100644 node_modules/content-type/package.json delete mode 100644 node_modules/idn-hostname/#/tests/0/0.json delete mode 100644 node_modules/idn-hostname/#/tests/0/1.json delete mode 100644 node_modules/idn-hostname/#/tests/0/10.json delete mode 100644 node_modules/idn-hostname/#/tests/0/11.json delete mode 100644 node_modules/idn-hostname/#/tests/0/12.json delete mode 100644 node_modules/idn-hostname/#/tests/0/13.json delete mode 100644 node_modules/idn-hostname/#/tests/0/14.json delete mode 100644 node_modules/idn-hostname/#/tests/0/15.json delete mode 100644 node_modules/idn-hostname/#/tests/0/16.json delete mode 100644 node_modules/idn-hostname/#/tests/0/17.json delete mode 100644 node_modules/idn-hostname/#/tests/0/18.json delete mode 100644 node_modules/idn-hostname/#/tests/0/19.json delete mode 100644 node_modules/idn-hostname/#/tests/0/2.json delete mode 100644 node_modules/idn-hostname/#/tests/0/20.json delete mode 100644 node_modules/idn-hostname/#/tests/0/21.json delete mode 100644 node_modules/idn-hostname/#/tests/0/22.json delete mode 100644 node_modules/idn-hostname/#/tests/0/23.json delete mode 100644 node_modules/idn-hostname/#/tests/0/24.json delete mode 100644 node_modules/idn-hostname/#/tests/0/25.json delete mode 100644 node_modules/idn-hostname/#/tests/0/26.json delete mode 100644 node_modules/idn-hostname/#/tests/0/27.json delete mode 100644 node_modules/idn-hostname/#/tests/0/28.json delete mode 100644 node_modules/idn-hostname/#/tests/0/29.json delete mode 100644 node_modules/idn-hostname/#/tests/0/3.json delete mode 100644 node_modules/idn-hostname/#/tests/0/30.json delete mode 100644 node_modules/idn-hostname/#/tests/0/31.json delete mode 100644 node_modules/idn-hostname/#/tests/0/32.json delete mode 100644 node_modules/idn-hostname/#/tests/0/33.json delete mode 100644 node_modules/idn-hostname/#/tests/0/34.json delete mode 100644 node_modules/idn-hostname/#/tests/0/35.json delete mode 100644 node_modules/idn-hostname/#/tests/0/36.json delete mode 100644 node_modules/idn-hostname/#/tests/0/37.json delete mode 100644 node_modules/idn-hostname/#/tests/0/38.json delete mode 100644 node_modules/idn-hostname/#/tests/0/39.json delete mode 100644 node_modules/idn-hostname/#/tests/0/4.json delete mode 100644 node_modules/idn-hostname/#/tests/0/40.json delete mode 100644 node_modules/idn-hostname/#/tests/0/41.json delete mode 100644 node_modules/idn-hostname/#/tests/0/42.json delete mode 100644 node_modules/idn-hostname/#/tests/0/43.json delete mode 100644 node_modules/idn-hostname/#/tests/0/44.json delete mode 100644 node_modules/idn-hostname/#/tests/0/45.json delete mode 100644 node_modules/idn-hostname/#/tests/0/46.json delete mode 100644 node_modules/idn-hostname/#/tests/0/47.json delete mode 100644 node_modules/idn-hostname/#/tests/0/48.json delete mode 100644 node_modules/idn-hostname/#/tests/0/49.json delete mode 100644 node_modules/idn-hostname/#/tests/0/5.json delete mode 100644 node_modules/idn-hostname/#/tests/0/50.json delete mode 100644 node_modules/idn-hostname/#/tests/0/51.json delete mode 100644 node_modules/idn-hostname/#/tests/0/52.json delete mode 100644 node_modules/idn-hostname/#/tests/0/53.json delete mode 100644 node_modules/idn-hostname/#/tests/0/54.json delete mode 100644 node_modules/idn-hostname/#/tests/0/55.json delete mode 100644 node_modules/idn-hostname/#/tests/0/56.json delete mode 100644 node_modules/idn-hostname/#/tests/0/57.json delete mode 100644 node_modules/idn-hostname/#/tests/0/58.json delete mode 100644 node_modules/idn-hostname/#/tests/0/59.json delete mode 100644 node_modules/idn-hostname/#/tests/0/6.json delete mode 100644 node_modules/idn-hostname/#/tests/0/60.json delete mode 100644 node_modules/idn-hostname/#/tests/0/61.json delete mode 100644 node_modules/idn-hostname/#/tests/0/62.json delete mode 100644 node_modules/idn-hostname/#/tests/0/63.json delete mode 100644 node_modules/idn-hostname/#/tests/0/64.json delete mode 100644 node_modules/idn-hostname/#/tests/0/65.json delete mode 100644 node_modules/idn-hostname/#/tests/0/66.json delete mode 100644 node_modules/idn-hostname/#/tests/0/67.json delete mode 100644 node_modules/idn-hostname/#/tests/0/68.json delete mode 100644 node_modules/idn-hostname/#/tests/0/69.json delete mode 100644 node_modules/idn-hostname/#/tests/0/7.json delete mode 100644 node_modules/idn-hostname/#/tests/0/70.json delete mode 100644 node_modules/idn-hostname/#/tests/0/71.json delete mode 100644 node_modules/idn-hostname/#/tests/0/72.json delete mode 100644 node_modules/idn-hostname/#/tests/0/73.json delete mode 100644 node_modules/idn-hostname/#/tests/0/74.json delete mode 100644 node_modules/idn-hostname/#/tests/0/75.json delete mode 100644 node_modules/idn-hostname/#/tests/0/76.json delete mode 100644 node_modules/idn-hostname/#/tests/0/77.json delete mode 100644 node_modules/idn-hostname/#/tests/0/78.json delete mode 100644 node_modules/idn-hostname/#/tests/0/79.json delete mode 100644 node_modules/idn-hostname/#/tests/0/8.json delete mode 100644 node_modules/idn-hostname/#/tests/0/80.json delete mode 100644 node_modules/idn-hostname/#/tests/0/81.json delete mode 100644 node_modules/idn-hostname/#/tests/0/82.json delete mode 100644 node_modules/idn-hostname/#/tests/0/83.json delete mode 100644 node_modules/idn-hostname/#/tests/0/84.json delete mode 100644 node_modules/idn-hostname/#/tests/0/85.json delete mode 100644 node_modules/idn-hostname/#/tests/0/86.json delete mode 100644 node_modules/idn-hostname/#/tests/0/87.json delete mode 100644 node_modules/idn-hostname/#/tests/0/88.json delete mode 100644 node_modules/idn-hostname/#/tests/0/89.json delete mode 100644 node_modules/idn-hostname/#/tests/0/9.json delete mode 100644 node_modules/idn-hostname/#/tests/0/90.json delete mode 100644 node_modules/idn-hostname/#/tests/0/91.json delete mode 100644 node_modules/idn-hostname/#/tests/0/92.json delete mode 100644 node_modules/idn-hostname/#/tests/0/93.json delete mode 100644 node_modules/idn-hostname/#/tests/0/94.json delete mode 100644 node_modules/idn-hostname/#/tests/0/95.json delete mode 100644 node_modules/idn-hostname/#/tests/0/schema.json delete mode 100644 node_modules/idn-hostname/LICENSE delete mode 100644 node_modules/idn-hostname/idnaMappingTableCompact.json delete mode 100644 node_modules/idn-hostname/index.d.ts delete mode 100644 node_modules/idn-hostname/index.js delete mode 100644 node_modules/idn-hostname/package.json delete mode 100644 node_modules/idn-hostname/readme.md delete mode 100644 node_modules/json-stringify-deterministic/LICENSE.md delete mode 100644 node_modules/json-stringify-deterministic/README.md delete mode 100644 node_modules/json-stringify-deterministic/package.json delete mode 100644 node_modules/jsonc-parser/CHANGELOG.md delete mode 100644 node_modules/jsonc-parser/LICENSE.md delete mode 100644 node_modules/jsonc-parser/README.md delete mode 100644 node_modules/jsonc-parser/SECURITY.md delete mode 100644 node_modules/jsonc-parser/package.json delete mode 100644 node_modules/just-curry-it/CHANGELOG.md delete mode 100644 node_modules/just-curry-it/LICENSE delete mode 100644 node_modules/just-curry-it/README.md delete mode 100644 node_modules/just-curry-it/index.cjs delete mode 100644 node_modules/just-curry-it/index.d.ts delete mode 100644 node_modules/just-curry-it/index.mjs delete mode 100644 node_modules/just-curry-it/index.tests.ts delete mode 100644 node_modules/just-curry-it/package.json delete mode 100644 node_modules/just-curry-it/rollup.config.js delete mode 100644 node_modules/punycode/LICENSE-MIT.txt delete mode 100644 node_modules/punycode/README.md delete mode 100644 node_modules/punycode/package.json delete mode 100644 node_modules/punycode/punycode.es6.js delete mode 100644 node_modules/punycode/punycode.js delete mode 100644 node_modules/uuid/CHANGELOG.md delete mode 100644 node_modules/uuid/CONTRIBUTING.md delete mode 100644 node_modules/uuid/LICENSE.md delete mode 100644 node_modules/uuid/README.md delete mode 100644 node_modules/uuid/package.json delete mode 100644 node_modules/uuid/wrapper.mjs diff --git a/.gitignore b/.gitignore index 68bc17f9..6953a1ef 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,4 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +node_modules/ diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid deleted file mode 100644 index 0c2d4696..00000000 --- a/node_modules/.bin/uuid +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@" -else - exec node "$basedir/../uuid/dist/bin/uuid" "$@" -fi diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd deleted file mode 100644 index 0f2376ea..00000000 --- a/node_modules/.bin/uuid.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %* diff --git a/node_modules/.bin/uuid.ps1 b/node_modules/.bin/uuid.ps1 deleted file mode 100644 index 78046284..00000000 --- a/node_modules/.bin/uuid.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } else { - & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } else { - & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index a7b6eda0..00000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "name": "json-schema-test-suite", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@hyperjump/browser": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.1.tgz", - "integrity": "sha512-Le5XZUjnVqVjkgLYv6yyWgALat/0HpB1XaCPuCZ+GCFki9NvXloSZITIJ0H+wRW7mb9At1SxvohKBbNQbrr/cw==", - "license": "MIT", - "dependencies": { - "@hyperjump/json-pointer": "^1.1.0", - "@hyperjump/uri": "^1.2.0", - "content-type": "^1.0.5", - "just-curry-it": "^5.3.0" - }, - "engines": { - "node": ">=18.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - } - }, - "node_modules/@hyperjump/json-pointer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.1.tgz", - "integrity": "sha512-M0T3s7TC2JepoWPMZQn1W6eYhFh06OXwpMqL+8c5wMVpvnCKNsPgpu9u7WyCI03xVQti8JAeAy4RzUa6SYlJLA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - } - }, - "node_modules/@hyperjump/json-schema": { - "version": "1.17.2", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.2.tgz", - "integrity": "sha512-pCysQu2kPZFcqyJmiU5JauzPHQIQa9i9F7+S5ui8OiwcdsBZUOjdY1rfSnqgaM5sNeR3akNVXKB/WgxNEnJrWw==", - "license": "MIT", - "dependencies": { - "@hyperjump/json-pointer": "^1.1.0", - "@hyperjump/json-schema-formats": "^1.0.0", - "@hyperjump/pact": "^1.2.0", - "@hyperjump/uri": "^1.2.0", - "content-type": "^1.0.4", - "json-stringify-deterministic": "^1.0.12", - "just-curry-it": "^5.3.0", - "uuid": "^9.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "peerDependencies": { - "@hyperjump/browser": "^1.1.0" - } - }, - "node_modules/@hyperjump/json-schema-formats": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-formats/-/json-schema-formats-1.0.1.tgz", - "integrity": "sha512-qvcIxysnMfcPxyPSFFzzo28o2BN1CNT5b0tQXNUP0kaFpvptQNDg8SCLvlnMg2sYxuiuqna8+azGBaBthiskAw==", - "license": "MIT", - "dependencies": { - "@hyperjump/uri": "^1.3.2", - "idn-hostname": "^15.1.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/hyperjump-io" - } - }, - "node_modules/@hyperjump/pact": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.4.0.tgz", - "integrity": "sha512-01Q7VY6BcAkp9W31Fv+ciiZycxZHGlR2N6ba9BifgyclHYHdbaZgITo0U6QMhYRlem4k8pf8J31/tApxvqAz8A==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - } - }, - "node_modules/@hyperjump/uri": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.2.tgz", - "integrity": "sha512-OFo5oxuSEz1ktF/LDdBTptlnPyZ66jywLO4fJRuAhnr7NGnsiL2CPoj1JRVaDqVy0nXvWNsC8O8Muw9DR++eEg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/idn-hostname": { - "version": "15.1.8", - "resolved": "https://registry.npmjs.org/idn-hostname/-/idn-hostname-15.1.8.tgz", - "integrity": "sha512-MmLwddtSVyMtzYxx+xs2IFEbfyg/facubL/mEaAoJX/XIfjt1ly5QhPByihf4yrxZYbkQfRZVEnBgISv/e2ZWw==", - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - } - }, - "node_modules/json-stringify-deterministic": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", - "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/jsonc-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", - "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/just-curry-it": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", - "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==", - "license": "MIT" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - } - } -} diff --git a/node_modules/@hyperjump/browser/.gitattributes b/node_modules/@hyperjump/browser/.gitattributes deleted file mode 100644 index fcadb2cf..00000000 --- a/node_modules/@hyperjump/browser/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text eol=lf diff --git a/node_modules/@hyperjump/browser/LICENCE b/node_modules/@hyperjump/browser/LICENCE deleted file mode 100644 index 6e9846cf..00000000 --- a/node_modules/@hyperjump/browser/LICENCE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/browser/README.md b/node_modules/@hyperjump/browser/README.md deleted file mode 100644 index 10c09bdf..00000000 --- a/node_modules/@hyperjump/browser/README.md +++ /dev/null @@ -1,249 +0,0 @@ -# Hyperjump - Browser - -The Hyperjump Browser is a generic client for traversing JSON Reference ([JRef]) -and other [JRef]-compatible media types in a way that abstracts the references -without loosing information. - -## Install - -This module is designed for node.js (ES Modules, TypeScript) and browsers. It -should work in Bun and Deno as well, but the test runner doesn't work in these -environments, so this module may be less stable in those environments. - -### Node.js - -```bash -npm install @hyperjump/browser -``` - -## JRef Browser - -This example uses the API at -[https://swapi.hyperjump.io](https://explore.hyperjump.io#https://swapi.hyperjump.io/api/films/1). -It's a variation of the [Star Wars API (SWAPI)](https://swapi.dev) implemented -using the [JRef] media type. - -```javascript -import { get, step, value, iter } from "@hyperjump/browser"; - -const aNewHope = await get("https://swapi.hyperjump.io/api/films/1"); -const characters = await get("#/characters", aNewHope); // Or -const characters = await step("characters", aNewHope); - -for await (const character of iter(characters)) { - const name = await step("name", character); - value(name); // => Luke Skywalker, etc. -} -``` - -You can also work with files on the file system. When working with files, media -types are determined by file extensions. The [JRef] media type uses the `.jref` -extension. - -```javascript -import { get, value } from "@hyperjump/browser"; - -const lukeSkywalker = await get("./api/people/1.jref"); // Paths resolve relative to the current working directory -const name = await step("name", lukeSkywalker); -value(name); // => Luke Skywalker -``` - -### API - -* get(uri: string, browser?: Browser): Promise\ - - Retrieve a document located at the given URI. Support for [JRef] is built - in. See the [Media Types](#media-type) section for information on how - to support other media types. Support for `http(s):` and `file:` URI schemes - are built in. See the [Uri Schemes](#uri-schemes) section for information on - how to support other URI schemes. -* value(browser: Browser) => JRef - - Get the JRef compatible value the document represents. -* typeOf(browser: Browser) => JRefType - - Works the same as the `typeof` keyword. It will return one of the JSON types - (null, boolean, number, string, array, object) or "reference". If the value - is not one of these types, it will throw an error. -* has(key: string, browser: Browser) => boolean - - Returns whether or not a property is present in the object that the browser - represents. -* length(browser: Browser) => number - - Get the length of the array that the browser represents. -* step(key: string | number, browser: Browser) => Promise\ - - Move the browser cursor by the given "key" value. This is analogous to - indexing into an object or array (`foo[key]`). This function supports - curried application. -* iter(browser: Browser) => AsyncGenerator\ - - Iterate over the items in the array that the document represents. -* entries(browser: Browser) => AsyncGenerator\<[string, Browser]> - - Similar to `Object.entries`, but yields Browsers for values. -* values(browser: Browser) => AsyncGenerator\ - - Similar to `Object.values`, but yields Browsers for values. -* keys(browser: Browser) => Generator\ - - Similar to `Object.keys`. - -## Media Types - -Support for the [JRef] media type is included by default, but you can add -support for any media type you like as long as it can be represented in a -[JRef]-compatible way. - -```javascript -import { addMediaTypePlugin, removeMediaTypePlugin, setMediaTypeQuality } from "@hyperjump/browser"; -import YAML from "yaml"; - -// Add support for YAML version of JRef (YRef) -addMediaTypePlugin("application/reference+yaml", { - parse: async (response) => { - return { - baseUri: response.url, - root: (response) => YAML.parse(await response.text(), (key, value) => { - return value !== null && typeof value.$ref === "string" - ? new Reference(value.$ref) - : value; - }, - anchorLocation: (fragment) => decodeUri(fragment ?? ""); - }; - }, - fileMatcher: (path) => path.endsWith(".jref") -}); - -// Prefer "YRef" over JRef by reducing the quality for JRef. -setMediaTypeQuality("application/reference+json", 0.9); - -// Only support YRef by removing JRef support. -removeMediaTypePlugin("application/reference+json"); -``` - -### API - -* addMediaTypePlugin(contentType: string, plugin: MediaTypePlugin): void - - Add support for additional media types. - - * type MediaTypePlugin - * parse: (response: Response) => Document - * [quality](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values): - number (defaults to `1`) -* removeMediaTypePlugin(contentType: string): void - - Removed support or a media type. -* setMediaTypeQuality(contentType: string, quality: number): void; - - Set the - [quality](https://developer.mozilla.org/en-US/docs/Glossary/Quality_values) - that will be used in the - [Accept](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept) - header of requests to indicate to servers what media types are preferred - over others. -* acceptableMediaTypes(): string; - - Build an `Accept` request header from the registered media type plugins. - This function is used internally. You would only need it if you're writing a - custom `http(s):` URI scheme plugin. - -## URI Schemes - -By default, `http(s):` and `file:` URIs are supported. You can add support for -additional URI schemes using plugins. - -```javascript -import { addUriSchemePlugin, removeUriSchemePlugin, retrieve } from "@hyperjump/browser"; - -// Add support for the `urn:` scheme -addUriSchemePlugin("urn", { - parse: (urn, baseUri) => { - let { nid, nss, query, fragment } = parseUrn(urn); - nid = nid.toLowerCase(); - - if (!mappings[nid]?.[nss]) { - throw Error(`Not Found -- ${urn}`); - } - - let uri = mappings[nid][nss]; - uri += query ? "?" + query : ""; - uri += fragment ? "#" + fragment : ""; - - return retrieve(uri, baseUri); - } -}); - -// Only support `urn:` by removing default plugins -removeUriSchemePlugin("http"); -removeUriSchemePlugin("https"); -removeUriSchemePlugin("file"); -``` - -### API -* addUriSchemePlugin(scheme: string, plugin: UriSchemePlugin): void - - Add support for additional URI schemes. - - * type UriSchemePlugin - * retrieve: (uri: string, baseUri?: string) => Promise\ -* removeUriSchemePlugin(scheme: string): void - - Remove support for a URI scheme. -* retrieve(uri: string, baseUri?: string) => Promise\ - - This is used internally, but you may need it if mapping names to locators - such as in the example above. - -## JRef - -`parse` and `stringify` [JRef] values using the same API as the `JSON` built-in -functions including `reviver` and `replacer` functions. - -```javascript -import { parse, stringify, jrefTypeOf } from "@hyperjump/browser/jref"; - -const blogPostJref = `{ - "title": "Working with JRef", - "author": { "$ref": "/author/jdesrosiers" }, - "content": "lorem ipsum dolor sit amet", -}`; -const blogPost = parse(blogPostJref); -jrefTypeOf(blogPost.author) // => "reference" -blogPost.author.href; // => "/author/jdesrosiers" - -stringify(blogPost, null, " ") === blogPostJref // => true -``` - -### API -export type Replacer = (key: string, value: unknown) => unknown; - -* parse: (jref: string, reviver?: (key: string, value: unknown) => unknown) => JRef; - - Same as `JSON.parse`, but converts `{ "$ref": "..." }` to `Reference` - objects. -* stringify: (value: JRef, replacer?: (string | number)[] | null | Replacer, space?: string | number) => string; - - Same as `JSON.stringify`, but converts `Reference` objects to `{ "$ref": - "... " }` -* jrefTypeOf: (value: unknown) => "object" | "array" | "string" | "number" | "boolean" | "null" | "reference" | "undefined"; - -## Contributing - -### Tests - -Run the tests - -```bash -npm test -``` - -Run the tests with a continuous test runner - -```bash -npm test -- --watch -``` - -[JRef]: https://github.com/hyperjump-io/browser/blob/main/lib/jref/SPECIFICATION.md diff --git a/node_modules/@hyperjump/browser/package.json b/node_modules/@hyperjump/browser/package.json deleted file mode 100644 index 7749969e..00000000 --- a/node_modules/@hyperjump/browser/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "@hyperjump/browser", - "version": "1.3.1", - "description": "Browse JSON-compatible data with hypermedia references", - "type": "module", - "main": "./lib/index.js", - "exports": { - ".": "./lib/index.js", - "./jref": "./lib/jref/index.js" - }, - "browser": { - "./lib/index.js": "./lib/index.browser.js", - "./lib/browser/context-uri.js": "./lib/browser/context-uri.browser.js" - }, - "scripts": { - "clean": "xargs -a .gitignore rm -rf", - "lint": "eslint lib", - "type-check": "tsc --noEmit", - "test": "vitest --watch=false" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperjump-io/browser.git" - }, - "keywords": [ - "json", - "reference", - "jref", - "hypermedia", - "$ref" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "typescript": "*", - "typescript-eslint": "*", - "undici": "*", - "vitest": "*" - }, - "engines": { - "node": ">=18.0.0" - }, - "dependencies": { - "@hyperjump/json-pointer": "^1.1.0", - "@hyperjump/uri": "^1.2.0", - "content-type": "^1.0.5", - "just-curry-it": "^5.3.0" - } -} diff --git a/node_modules/@hyperjump/json-pointer/LICENSE b/node_modules/@hyperjump/json-pointer/LICENSE deleted file mode 100644 index 183e8491..00000000 --- a/node_modules/@hyperjump/json-pointer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/json-pointer/README.md b/node_modules/@hyperjump/json-pointer/README.md deleted file mode 100644 index 9ebf05db..00000000 --- a/node_modules/@hyperjump/json-pointer/README.md +++ /dev/null @@ -1,102 +0,0 @@ -# JSON Pointer - -This is an implementation of RFC-6901 JSON Pointer. JSON Pointer is designed for -referring to data values within a JSON document. It's designed to be URL -friendly so it can be used as a URL fragment that points to a specific part of -the JSON document. - -## Installation - -Includes support for node.js (ES Modules, TypeScript) and browsers. - -```bash -npm install @hyperjump/json-pointer -``` - -## Usage - -```javascript -import * as JsonPointer from "@hyperjump/json-pointer"; - -const value = { - "foo": { - "bar": 42 - } -}; - -// Construct pointers -const fooPointer = JsonPointer.append("foo", JsonPointer.nil); // "/foo" -const fooBarPointer = JsonPointer.append(fooPointer, "bar"); // "/foo/bar" - -// Get a value from a pointer -const getFooBar = JsonPointer.get(fooBarPointer); -getFooBar(value); // 42 - -// Set a value from a pointer -// New value is returned without modifying the original -const setFooBar = JsonPointer.set(fooBarPointer); -setFooBar(value, 33); // { "foo": { "bar": 33 } } - -// Assign a value from a pointer -// The original value is changed and no value is returned -const assignFooBar = JsonPointer.assign(fooBarPointer); -assignFooBar(value, 33); // { "foo": { "bar": 33 } } - -// Unset a value from a pointer -// New value is returned without modifying the original -const unsetFooBar = JsonPointer.unset(fooBarPointer); -setFooBar(value); // { "foo": {} } - -// Delete a value from a pointer -// The original value is changed and no value is returned -const deleteFooBar = JsonPointer.remove(fooBarPointer); -deleteFooBar(value); // { "foo": {} } -``` - -## API - -* **nil**: "" - - The empty pointer. -* **pointerSegments**: (pointer: string) => Generator\ - - An iterator for the segments of a JSON Pointer that handles escaping. -* **append**: (segment: string, pointer: string) => string - - Append a segment to a JSON Pointer. -* **get**: (pointer: string, subject: any) => any - - Use a JSON Pointer to get a value. This function can be curried. -* **set**: (pointer: string, subject: any, value: any) => any - - Immutably set a value using a JSON Pointer. Returns a new version of - `subject` with the value set. The original `subject` is not changed, but the - value isn't entirely cloned. Values that aren't changed will point to - the same value as the original. This function can be curried. -* **assign**: (pointer: string, subject: any, value: any) => void - - Mutate a value using a JSON Pointer. This function can be curried. -* **unset**: (pointer: string, subject: any) => any - - Immutably delete a value using a JSON Pointer. Returns a new version of - `subject` without the value. The original `subject` is not changed, but the - value isn't entirely cloned. Values that aren't changed will point to the - same value as the original. This function can be curried. -* **remove**: (pointer: string, subject: any) => void - - Delete a value using a JSON Pointer. This function can be curried. - -## Contributing - -### Tests - -Run the tests - -```bash -npm test -``` - -Run the tests with a continuous test runner -```bash -npm test -- --watch -``` diff --git a/node_modules/@hyperjump/json-pointer/package.json b/node_modules/@hyperjump/json-pointer/package.json deleted file mode 100644 index fd33dee0..00000000 --- a/node_modules/@hyperjump/json-pointer/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@hyperjump/json-pointer", - "version": "1.1.1", - "description": "An RFC-6901 JSON Pointer implementation", - "type": "module", - "main": "./lib/index.js", - "exports": "./lib/index.js", - "scripts": { - "lint": "eslint lib", - "test": "vitest --watch=false", - "type-check": "tsc --noEmit" - }, - "repository": "github:hyperjump-io/json-pointer", - "keywords": [ - "JSON Pointer", - "RFC-6901" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "typescript-eslint": "*", - "vitest": "*" - } -} diff --git a/node_modules/@hyperjump/json-schema-formats/LICENSE b/node_modules/@hyperjump/json-schema-formats/LICENSE deleted file mode 100644 index 82597103..00000000 --- a/node_modules/@hyperjump/json-schema-formats/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/json-schema-formats/README.md b/node_modules/@hyperjump/json-schema-formats/README.md deleted file mode 100644 index a6d49704..00000000 --- a/node_modules/@hyperjump/json-schema-formats/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Hyperjump - JSON Schema Formats - -A collection of validation functions for the JSON Schema `format` keyword. - -## Install - -This module is designed for Node.js (ES Modules, TypeScript) and browsers. It -should work in Bun and Deno as well, but the test runner doesn't work in these -environments, so this module may be less stable in those environments. - -### Node.js - -```bash -npm install @hyperjump/json-schema-formats -``` - -### TypeScript - -This package uses the package.json "exports" field. [TypeScript understands -"exports"](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing), -but you need to change a couple settings in your `tsconfig.json` for it to work. - -```jsonc - "module": "Node16", // or "NodeNext" - "moduleResolution": "Node16", // or "NodeNext" -``` - -## API - - - -## Contributing - -Contributions are welcome! Please create an issue to propose and discuss any -changes you'd like to make before implementing it. If it's an obvious bug with -an obvious solution or something simple like a fixing a typo, creating an issue -isn't required. You can just send a PR without creating an issue. Before -submitting any code, please remember to first run the following tests. - -- `npm test` (Tests can also be run continuously using `npm test -- --watch`) -- `npm run lint` -- `npm run type-check` diff --git a/node_modules/@hyperjump/json-schema-formats/package.json b/node_modules/@hyperjump/json-schema-formats/package.json deleted file mode 100644 index 1e13b05b..00000000 --- a/node_modules/@hyperjump/json-schema-formats/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@hyperjump/json-schema-formats", - "version": "1.0.1", - "description": "A collection of validation functions for the JSON Schema `format` keyword.", - "keywords": [ - "JSON Schema", - "format", - "rfc3339", - "date", - "date-time", - "duration", - "email", - "hostname", - "idn-hostname", - "idn-email", - "ipv4", - "ipv6", - "iri", - "iri-reference", - "json-pointer", - "regex", - "relative-json-pointer", - "time", - "uri", - "uri-reference", - "uri-template", - "uuid" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "repository": "github:hyperjump-io/json-schema-formats", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/hyperjump-io" - }, - "type": "module", - "exports": { - ".": "./src/index.js" - }, - "scripts": { - "lint": "eslint src", - "test": "vitest run", - "type-check": "tsc --noEmit", - "docs": "typedoc --excludeExternals" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "json-schema-test-suite": "github:json-schema-org/json-schema-test-suite", - "typedoc": "*", - "typescript-eslint": "*", - "vitest": "*" - }, - "dependencies": { - "@hyperjump/uri": "^1.3.2", - "idn-hostname": "^15.1.2" - } -} diff --git a/node_modules/@hyperjump/json-schema-formats/src/date-math.js b/node_modules/@hyperjump/json-schema-formats/src/date-math.js deleted file mode 100644 index 60d28c72..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/date-math.js +++ /dev/null @@ -1,120 +0,0 @@ -/** @type (month: string, year: number) => number */ -export const daysInMonth = (month, year) => { - switch (month) { - case "01": - case "Jan": - case "03": - case "Mar": - case "05": - case "May": - case "07": - case "Jul": - case "08": - case "Aug": - case "10": - case "Oct": - case "12": - case "Dec": - return 31; - case "04": - case "Apr": - case "06": - case "Jun": - case "09": - case "Sep": - case "11": - case "Nov": - return 30; - case "02": - case "Feb": - return isLeapYear(year) ? 29 : 28; - default: - return 0; - } -}; - -/** @type (year: number) => boolean */ -export const isLeapYear = (year) => { - return (year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)); -}; - -/** @type (date: Date) => boolean */ -export const hasLeapSecond = (date) => { - const utcDate = `${date.getUTCFullYear()}-${date.getUTCMonth() + 1}-${date.getUTCDate()}`; - return leapSecondDates.has(utcDate) - && date.getUTCHours() === 23 - && date.getUTCMinutes() === 59; -}; - -const leapSecondDates = new Set([ - "1960-12-31", - "1961-07-31", - "1961-12-31", - "1963-10-31", - "1963-12-31", - "1964-03-31", - "1964-08-31", - "1964-12-31", - "1965-02-28", - "1965-06-30", - "1965-08-31", - "1965-12-31", - "1968-01-31", - "1971-12-31", - "1972-06-30", - "1972-12-31", - "1973-12-31", - "1974-12-31", - "1975-12-31", - "1976-12-31", - "1977-12-31", - "1978-12-31", - "1979-12-31", - "1981-06-30", - "1982-06-30", - "1983-06-30", - "1985-06-30", - "1987-12-31", - "1989-12-31", - "1990-12-31", - "1992-06-30", - "1993-06-30", - "1994-06-30", - "1995-12-31", - "1997-06-30", - "1998-12-31", - "2005-12-31", - "2008-12-31", - "2012-06-30", - "2015-06-30", - "2016-12-31" -]); - -/** @type (dayName: string) => number */ -export const dayOfWeekId = (dayName) => { - switch (dayName) { - case "Sun": - case "Sunday": - return 0; - case "Mon": - case "Monday": - return 1; - case "Tue": - case "Tuesday": - return 2; - case "Wed": - case "Wednesday": - return 3; - case "Thu": - case "Thursday": - return 4; - case "Fri": - case "Friday": - return 5; - case "Sat": - case "Saturday": - return 6; - default: - return -1; - } -}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js b/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js deleted file mode 100644 index 2b829b4f..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/draft-bhutton-relative-json-pointer-00.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const unescaped = `[\\u{00}-\\u{2E}\\u{30}-\\u{7D}\\u{7F}-\\u{10FFFF}]`; // %x2F ('/') and %x7E ('~') are excluded from 'unescaped' -const escaped = `~[01]`; // representing '~' and '/', respectively -const referenceToken = `(?:${unescaped}|${escaped})*`; -const jsonPointer = `(?:/${referenceToken})*`; - -const nonNegativeInteger = `(?:0|[1-9][0-9]*)`; -const indexManipulation = `(?:[+-]${nonNegativeInteger})`; -const relativeJsonPointer = `${nonNegativeInteger}(?:${indexManipulation}?${jsonPointer}|#)`; - -/** - * @type API.isRelativeJsonPointer - * @function - */ -export const isRelativeJsonPointer = RegExp.prototype.test.bind(new RegExp(`^${relativeJsonPointer}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/ecma262.js b/node_modules/@hyperjump/json-schema-formats/src/ecma262.js deleted file mode 100644 index 47a91ebe..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/ecma262.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -/** @type API.isRegex */ -export const isRegex = (regex) => { - try { - new RegExp(regex, "u"); - return true; - } catch (_error) { - return false; - } -}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/index.d.ts b/node_modules/@hyperjump/json-schema-formats/src/index.d.ts deleted file mode 100644 index 31df2b91..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/index.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * The 'date' format. Validates that a string represents a date according to - * [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). - * - * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) - */ -export const isDate: (date: string) => boolean; - -/** - * The 'time' format. Validates that a string represents a time according to - * [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). - * - * **NOTE**: Leap seconds are only allowed on specific dates. Since there is no date - * in this context, leap seconds are never allowed. - * - * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) - */ -export const isTime: (time: string) => boolean; - -/** - * The 'date-time' format. Validates that a string represents a date-time - * according to [RFC 3339, section 5.6](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6). - * - * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) - */ -export const isDateTime: (dateTime: string) => boolean; - -/** - * The 'duration' format. Validates that a string represents a duration - * according to [RFC 3339, Appendix A](https://www.rfc-editor.org/rfc/rfc3339.html#appendix-A). - * - * @see [JSON Schema Core, section 7.3.1](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.1) - */ -export const isDuration: (duration: string) => boolean; - -/** - * The 'email' format. Validates that a string represents an email as defined by - * the "Mailbox" ABNF rule in [RFC 5321, section 4.1.2](https://www.rfc-editor.org/rfc/rfc5321.html#section-4.1.2). - * - * @see [JSON Schema Core, section 7.3.2](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.2) - */ -export const isEmail: (email: string) => boolean; - -/** - * The 'idn-email' format. Validates that a string represents an email as - * defined by the "Mailbox" ABNF rule in [RFC 6531, section 3.3](https://www.rfc-editor.org/rfc/rfc6531.html#section-3.3). - * - * @see [JSON Schema Core, section 7.3.2](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.2) - */ -export const isIdnEmail: (email: string) => boolean; - -/** - * The 'hostname' format in draft-04 - draft-06. Validates that a string - * represents a hostname as defined by [RFC 1123, section 2.1](https://www.rfc-editor.org/rfc/rfc1123.html#section-2.1). - * - * **NOTE**: The 'hostname' format changed in draft-07. Use {@link isAsciiIdn} for - * draft-07 and later. - * - * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) - */ -export const isHostname: (hostname: string) => boolean; - -/** - * The 'hostname' format since draft-07. Validates that a string represents an - * IDNA2008 internationalized domain name consiting of only A-labels and NR-LDH - * labels as defined by [RFC 5890, section 2.3.2.1](https://www.rfc-editor.org/rfc/rfc5890.html#section-2.3.2.3). - * - * **NOTE**: The 'hostname' format changed in draft-07. Use {@link isHostname} - * for draft-06 and earlier. - * - * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) - */ -export const isAsciiIdn: (hostname: string) => boolean; - -/** - * The 'idn-hostname' format. Validates that a string represents an IDNA2008 - * internationalized domain name as defined by [RFC 5890, section 2.3.2.1](https://www.rfc-editor.org/rfc/rfc5890.html#section-2.3.2.1). - * - * @see [JSON Schema Core, section 7.3.3](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.3) - */ -export const isIdn: (hostname: string) => boolean; - -/** - * The 'ipv4' format. Validates that a string represents an IPv4 address - * according to the "dotted-quad" ABNF syntax as defined in - * [RFC 2673, section 3.2](https://www.rfc-editor.org/rfc/rfc2673.html#section-3.2). - * - * @see [JSON Schema Core, section 7.3.4](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.4) - */ -export const isIPv4: (ip: string) => boolean; - -/** - * The 'ipv6' format. Validates that a string represents an IPv6 address as - * defined in [RFC 4291, section 2.2](https://www.rfc-editor.org/rfc/rfc4291.html#section-2.2). - * - * @see [JSON Schema Core, section 7.3.4](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.4) - */ -export const isIPv6: (ip: string) => boolean; - -/** - * The 'uri' format. Validates that a string represents a URI as defined by [RFC - * 3986](https://www.rfc-editor.org/rfc/rfc3986.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isUri: (uri: string) => boolean; - -/** - * The 'uri-reference' format. Validates that a string represents a URI - * Reference as defined by [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isUriReference: (uri: string) => boolean; - -/** - * The 'iri' format. Validates that a string represents an IRI as defined by - * [RFC 3987](https://www.rfc-editor.org/rfc/rfc3987.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isIri: (iri: string) => boolean; - -/** - * The 'iri-reference' format. Validates that a string represents an IRI - * Reference as defined by [RFC 3987](https://www.rfc-editor.org/rfc/rfc3987.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isIriReference: (iri: string) => boolean; - -/** - * The 'uuid' format. Validates that a string represents a UUID address as - * defined by [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.html). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isUuid: (uuid: string) => boolean; - -/** - * The 'uri-template' format. Validates that a string represents a URI Template - * as defined by [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html). - * - * @see [JSON Schema Core, section 7.3.6](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.6) - */ -export const isUriTemplate: (uriTemplate: string) => boolean; - -/** - * The 'json-pointer' format. Validates that a string represents a JSON Pointer - * as defined by [RFC 6901](https://www.rfc-editor.org/rfc/rfc6901.html). - * - * @see [JSON Schema Core, section 7.3.7](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.7) - */ -export const isJsonPointer: (pointer: string) => boolean; - -/** - * The 'relative-json-pointer' format. Validates that a string represents an IRI - * Reference as defined by [draft-bhutton-relative-json-pointer-00](https://datatracker.ietf.org/doc/html/draft-bhutton-relative-json-pointer-00). - * - * @see [JSON Schema Core, section 7.3.5](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.5) - */ -export const isRelativeJsonPointer: (pointer: string) => boolean; - -/** - * The 'regex' format. Validates that a string represents a regular expression - * as defined by [ECMA-262](https://262.ecma-international.org/5.1/). - * - * @see [JSON Schema Core, section 7.3.8](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-01#section-7.3.8) - */ -export const isRegex: (regex: string) => boolean; diff --git a/node_modules/@hyperjump/json-schema-formats/src/index.js b/node_modules/@hyperjump/json-schema-formats/src/index.js deleted file mode 100644 index 7c81b5be..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @module - */ - -// JSON Schema Validation - Dates, Times, and Duration -export { isDate, isTime, isDateTime, isDuration } from "./rfc3339.js"; - -// JSON Schema Validation - Email Addresses -export { isEmail } from "./rfc5321.js"; -export { isIdnEmail } from "./rfc6531.js"; - -// JSON Schema Validation - Hostnames -export { isHostname } from "./rfc1123.js"; -export { isAsciiIdn, isIdn } from "./uts46.js"; - -// JSON Schema Validation - IP Addresses -export { isIPv4 } from "./rfc2673.js"; -export { isIPv6 } from "./rfc4291.js"; - -// JSON Schema Validation - Resource Identifiers -export { isUri, isUriReference } from "./rfc3986.js"; -export { isIri, isIriReference } from "./rfc3987.js"; -export { isUuid } from "./rfc4122.js"; - -// JSON Schema Validation - URI Template -export { isUriTemplate } from "./rfc6570.js"; - -// JSON Schema Validation - JSON Pointers -export { isJsonPointer } from "./rfc6901.js"; -export { isRelativeJsonPointer } from "./draft-bhutton-relative-json-pointer-00.js"; - -// JSON Schema Validation - Regular Expressions -export { isRegex } from "./ecma262.js"; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js b/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js deleted file mode 100644 index 6f605adf..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc1123.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const label = `(?!-)[A-Za-z0-9-]{1,63}(? { - return domainPattern.test(hostname) && hostname.length < 256; -}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js b/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js deleted file mode 100644 index 02179fce..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc2673.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; -const ipV4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; - -/** - * @type API.isIPv4 - * @function - */ -export const isIPv4 = RegExp.prototype.test.bind(new RegExp(`^${ipV4Address}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js deleted file mode 100644 index 33175991..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc3339.js +++ /dev/null @@ -1,78 +0,0 @@ -import { daysInMonth, hasLeapSecond } from "./date-math.js"; - -/** - * @import * as API from "./index.d.ts" - */ - -const dateFullyear = `\\d{4}`; -const dateMonth = `(?:0[1-9]|1[0-2])`; // 01-12 -const dateMday = `(?:0[1-9]|[12][0-9]|3[01])`; // 01-28, 01-29, 01-30, 01-31 based on month/year -const fullDate = `(?${dateFullyear})-(?${dateMonth})-(?${dateMday})`; - -const datePattern = new RegExp(`^${fullDate}$`); - -/** @type API.isDate */ -export const isDate = (date) => { - const parsedDate = datePattern.exec(date)?.groups; - if (!parsedDate) { - return false; - } - - const day = Number.parseInt(parsedDate.day, 10); - const year = Number.parseInt(parsedDate.year, 10); - - return day <= daysInMonth(parsedDate.month, year); -}; - -const timeHour = `(?:[01]\\d|2[0-3])`; // 00-23 -const timeMinute = `[0-5]\\d`; // 00-59 -const timeSecond = `[0-5]\\d`; // 00-59 -const timeSecondAllowLeapSeconds = `(?[0-5]\\d|60)`; // 00-58, 00-59, 00-60 based on leap second rules -const timeSecfrac = `\\.\\d+`; -const timeNumoffset = `[+-]${timeHour}:${timeMinute}`; -const timeOffset = `(?:[zZ]|${timeNumoffset})`; -const partialTime = `${timeHour}:${timeMinute}:${timeSecond}(?:${timeSecfrac})?`; -const fullTime = `${partialTime}${timeOffset}`; - -/** - * @type API.isTime - * @function - */ -export const isTime = RegExp.prototype.test.bind(new RegExp(`^${fullTime}$`)); - -const timePattern = new RegExp(`^${timeHour}:${timeMinute}:${timeSecondAllowLeapSeconds}(?:${timeSecfrac})?${timeOffset}$`); - -/** @type (time: string) => { seconds: string } | undefined */ -const parseTime = (time) => { - return /** @type {{ seconds: string } | undefined} */ (timePattern.exec(time)?.groups); -}; - -/** @type API.isDateTime */ -export const isDateTime = (dateTime) => { - const date = dateTime.substring(0, 10); - const t = dateTime[10]; - const time = dateTime.substring(11); - const seconds = parseTime(time)?.seconds; - - return isDate(date) - && /^t$/i.test(t) - && !!seconds - && (seconds !== "60" || hasLeapSecond(new Date(`${date}T${time.replace("60", "59")}`))); -}; - -const durSecond = `\\d+S`; -const durMinute = `\\d+M(?:${durSecond})?`; -const durHour = `\\d+H(?:${durMinute})?`; -const durTime = `T(?:${durHour}|${durMinute}|${durSecond})`; -const durDay = `\\d+D`; -const durWeek = `\\d+W`; -const durMonth = `\\d+M(?:${durDay})?`; -const durYear = `\\d+Y(?:${durMonth})?`; -const durDate = `(?:${durDay}|${durMonth}|${durYear})(?:${durTime})?`; -const duration = `P(?:${durDate}|${durTime}|${durWeek})`; - -/** - * @type API.isDuration - * @function - */ -export const isDuration = RegExp.prototype.test.bind(new RegExp(`^${duration}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js deleted file mode 100644 index 400e0b28..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc3986.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as Hyperjump from "@hyperjump/uri"; - -/** - * @import * as API from "./index.d.ts" - */ - -/** - * @type API.isUri - * @function - */ -export const isUri = Hyperjump.isUri; - -/** - * @type API.isUriReference - * @function - */ -export const isUriReference = Hyperjump.isUriReference; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js b/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js deleted file mode 100644 index c804e103..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc3987.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as Hyperjump from "@hyperjump/uri"; - -/** - * @import * as API from "./index.d.ts" - */ - -/** - * @type API.isIri - * @function - */ -export const isIri = Hyperjump.isIri; - -/** - * @type API.isIriReference - * @function - */ -export const isIriReference = Hyperjump.isIriReference; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js b/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js deleted file mode 100644 index 5737edda..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc4122.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const hexDigit = `[0-9a-fA-F]`; -const hexOctet = `(?:${hexDigit}{2})`; -const timeLow = `${hexOctet}{4}`; -const timeMid = `${hexOctet}{2}`; -const timeHighAndVersion = `${hexOctet}{2}`; -const clockSeqAndReserved = hexOctet; -const clockSeqLow = hexOctet; -const node = `${hexOctet}{6}`; - -const uuid = `${timeLow}\\-${timeMid}\\-${timeHighAndVersion}\\-${clockSeqAndReserved}${clockSeqLow}\\-${node}`; - -/** - * @type API.isUuid - * @function - */ -export const isUuid = RegExp.prototype.test.bind(new RegExp(`^${uuid}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js b/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js deleted file mode 100644 index 6fbd83ef..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc4291.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const hexdig = `[a-fA-F0-9]`; - -const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; -const ipV4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; - -const h16 = `${hexdig}{1,4}`; -const ls32 = `(?:${h16}:${h16}|${ipV4Address})`; -const ipV6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; - -/** - * @type API.isIPv6 - * @function - */ -export const isIPv6 = RegExp.prototype.test.bind(new RegExp(`^${ipV6Address}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js b/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js deleted file mode 100644 index c7049993..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc5321.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const alpha = `[a-zA-Z]`; -const hexdig = `[\\da-fA-F]`; - -// Printable US-ASCII characters not including specials. -const atext = `[\\w!#$%&'*+\\-/=?^\`{|}~]`; -const atom = `${atext}+`; -const dotString = `${atom}(?:\\.${atom})*`; - -// Any ASCII graphic or space without blackslash-quoting except double-quote and the backslash itself. -const qtextSMTP = `[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]`; -// backslash followed by any ASCII graphic or space -const quotedPairSMTP = `\\\\[\\x20-\\x7E]`; -const qcontentSMTP = `(?:${qtextSMTP}|${quotedPairSMTP})`; -const quotedString = `"${qcontentSMTP}*"`; - -const localPart = `(?:${dotString}|${quotedString})`; // MAY be case-sensitive - -const letDig = `(?:${alpha}|\\d)`; -const ldhStr = `(?:${letDig}|-)*${letDig}`; -const subDomain = `${letDig}${ldhStr}?`; -const domain = `${subDomain}(?:\\.${subDomain})*`; - -const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; -const ipv4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; - -const h16 = `${hexdig}{1,4}`; -const ls32 = `(?:${h16}:${h16}|${ipv4Address})`; -const ipv6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; -const ipv6AddressLiteral = `IPv6:${ipv6Address}`; - -const dcontent = `[\\x21-\\x5A\\x5E-\\x7E]`; // Printable US-ASCII excluding "[", "\", "]" -const generalAddressLiteral = `${ldhStr}:${dcontent}+`; - -const addressLiteral = `\\[(?:${ipv4Address}|${ipv6AddressLiteral}|${generalAddressLiteral})]`; - -const mailbox = `${localPart}@(?:${domain}|${addressLiteral})`; - -/** - * @type API.isEmail - * @function - */ -export const isEmail = RegExp.prototype.test.bind(new RegExp(`^${mailbox}$`)); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js deleted file mode 100644 index 281bd7f2..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc6531.js +++ /dev/null @@ -1,55 +0,0 @@ -import { isIdn } from "./uts46.js"; - -/** - * @import * as API from "./index.d.ts" - */ - -const ucschar = `[\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}]`; - -const alpha = `[a-zA-Z]`; -const hexdig = `[\\da-fA-F]`; - -// Printable US-ASCII characters not including specials. -const atext = `(?:[\\w!#$%&'*+\\-/=?^\`{|}~]|${ucschar})`; -const atom = `${atext}+`; -const dotString = `${atom}(?:\\.${atom})*`; - -// Any ASCII graphic or space without blackslash-quoting except double-quote and the backslash itself. -const qtextSMTP = `(?:[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]|${ucschar})`; -// backslash followed by any ASCII graphic or space -const quotedPairSMTP = `\\\\[\\x20-\\x7E]`; -const qcontentSMTP = `(?:${qtextSMTP}|${quotedPairSMTP})`; -const quotedString = `"${qcontentSMTP}*"`; - -const localPart = `(?:${dotString}|${quotedString})`; // MAY be case-sensitive - -const letDig = `(?:${alpha}|\\d)`; -const ldhStr = `(?:${letDig}|-)*${letDig}`; -const letDigUcs = `(?:${alpha}|\\d|${ucschar})`; -const ldhStrUcs = `(?:${letDigUcs}|-)*${letDigUcs}`; -const subDomain = `${letDigUcs}${ldhStrUcs}?`; -const domain = `${subDomain}(?:\\.${subDomain})*`; - -const decOctet = `(?:\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`; -const ipv4Address = `${decOctet}\\.${decOctet}\\.${decOctet}\\.${decOctet}`; - -const h16 = `${hexdig}{1,4}`; -const ls32 = `(?:${h16}:${h16}|${ipv4Address})`; -const ipv6Address = `(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::(?:${h16}:){1}${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`; -const ipv6AddressLiteral = `IPv6:${ipv6Address}`; - -const dcontent = `[\\x21-\\x5A\\x5E-\\x7E]`; // Printable US-ASCII excluding "[", "\", "]" -const generalAddressLiteral = `${ldhStr}:${dcontent}+`; - -const addressLiteral = `\\[(?:${ipv4Address}|${ipv6AddressLiteral}|${generalAddressLiteral})\\]`; - -const mailbox = `(?${localPart})@(?:(?${addressLiteral})|(?${domain}))`; - -const mailboxPattern = new RegExp(`^${mailbox}$`, "u"); - -/** @type API.isIdnEmail */ -export const isIdnEmail = (email) => { - const parsedEmail = mailboxPattern.exec(email)?.groups; - - return !!parsedEmail && (!parsedEmail.domain || isIdn(parsedEmail.domain)); -}; diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js deleted file mode 100644 index e144a93e..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc6570.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const alpha = `[a-zA-Z]`; -const hexdig = `[\\da-fA-F]`; -const pctEncoded = `%${hexdig}${hexdig}`; - -const ucschar = `[\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}]`; - -const iprivate = `[\\u{E000}-\\u{F8FF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}]`; - -const opLevel2 = `[+#]`; -const opLevel3 = `[./;?&]`; -const opReserve = `[=,!@|]`; -const operator = `(?:${opLevel2}|${opLevel3}${opReserve})`; - -const varchar = `(?:${alpha}|\\d|_|${pctEncoded})`; -const varname = `${varchar}(?:\\.?${varchar})*`; -const maxLength = `(?:[1-9]|\\d{0,3})`; // positive integer < 10000 -const prefix = `:${maxLength}`; -const explode = `\\*`; -const modifierLevel4 = `(?:${prefix}|${explode})`; -const varspec = `${varname}${modifierLevel4}?`; -const variableList = `${varspec}(?:,${varspec})*`; - -const expression = `\\{${operator}?${variableList}\\}`; - -// any Unicode character except: CTL, SP, DQUOTE, "%" (aside from pct-encoded), "<", ">", "\", "^", "`", "{", "|", "}" -const literals = `(?:[\\x21\\x23-\\x24\\x26-\\x3B\\x3D\\x3F-\\x5B\\x5D\\x5F\\x61-\\x7A\\x7E]|${ucschar}|${iprivate}|${pctEncoded})`; - -const uriTemplate = `(?:${literals}|${expression})*`; - -/** - * @type API.isUriTemplate - * @function - */ -export const isUriTemplate = RegExp.prototype.test.bind(new RegExp(`^${uriTemplate}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js b/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js deleted file mode 100644 index 727df339..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/rfc6901.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @import * as API from "./index.d.ts" - */ - -const unescaped = `[\\u{00}-\\u{2E}\\u{30}-\\u{7D}\\u{7F}-\\u{10FFFF}]`; // %x2F ('/') and %x7E ('~') are excluded from 'unescaped' -const escaped = `~[01]`; // representing '~' and '/', respectively -const referenceToken = `(?:${unescaped}|${escaped})*`; -const jsonPointer = `(?:/${referenceToken})*`; - -/** - * @type API.isJsonPointer - * @function - */ -export const isJsonPointer = RegExp.prototype.test.bind(new RegExp(`^${jsonPointer}$`, "u")); diff --git a/node_modules/@hyperjump/json-schema-formats/src/uts46.js b/node_modules/@hyperjump/json-schema-formats/src/uts46.js deleted file mode 100644 index fee52257..00000000 --- a/node_modules/@hyperjump/json-schema-formats/src/uts46.js +++ /dev/null @@ -1,20 +0,0 @@ -import { isIdnHostname } from "idn-hostname"; -import { isHostname } from "./rfc1123.js"; - -/** - * @import * as API from "./index.d.ts" - */ - -/** @type API.isAsciiIdn */ -export const isAsciiIdn = (hostname) => { - return isHostname(hostname) && isIdn(hostname); -}; - -/** @type API.isIdn */ -export const isIdn = (hostname) => { - try { - return isIdnHostname(hostname); - } catch (_error) { - return false; - } -}; diff --git a/node_modules/@hyperjump/json-schema/LICENSE b/node_modules/@hyperjump/json-schema/LICENSE deleted file mode 100644 index b0718c34..00000000 --- a/node_modules/@hyperjump/json-schema/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/json-schema/README.md b/node_modules/@hyperjump/json-schema/README.md deleted file mode 100644 index 2a84a170..00000000 --- a/node_modules/@hyperjump/json-schema/README.md +++ /dev/null @@ -1,966 +0,0 @@ -# Hyperjump - JSON Schema - -A collection of modules for working with JSON Schemas. - -* Validate JSON-compatible values against a JSON Schemas - * Dialects: draft-2020-12, draft-2019-09, draft-07, draft-06, draft-04 - * Complete validation support for all formats defined for the `format` keyword - * Schemas can reference other schemas using a different dialect - * Work directly with schemas on the filesystem or HTTP -* OpenAPI - * Versions: 3.0, 3.1, 3.2 - * Validate an OpenAPI document - * Validate values against a schema from an OpenAPI document -* Create custom keywords, formats, vocabularies, and dialects -* Bundle multiple schemas into one document - * Uses the process defined in the 2020-12 specification but works with any - dialect. -* API for building non-validation JSON Schema tooling -* API for working with annotations - -## Install - -Includes support for node.js/bun.js (ES Modules, TypeScript) and browsers (works -with CSP -[`unsafe-eval`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_eval_expressions)). - -### Node.js - -```bash -npm install @hyperjump/json-schema -``` - -### TypeScript - -This package uses the package.json "exports" field. [TypeScript understands -"exports"](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing), -but you need to change a couple settings in your `tsconfig.json` for it to work. - -```jsonc - "module": "Node16", // or "NodeNext" - "moduleResolution": "Node16", // or "NodeNext" -``` - -### Versioning - -The API for this library is divided into two categories: Stable and -Experimental. The Stable API follows semantic versioning, but the Experimental -API may have backward-incompatible changes between minor versions. - -All experimental features are segregated into exports that include the word -"experimental" so you never accidentally depend on something that could change -or be removed in future releases. - -## Validation - -### Usage - -This library supports many versions of JSON Schema. Use the pattern -`@hyperjump/json-schema/*` to import the version you need. - -```javascript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -``` - -You can import support for additional versions as needed. - -```javascript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -import "@hyperjump/json-schema/draft-07"; -``` - -**Note**: The default export (`@hyperjump/json-schema`) is reserved for v1 of -JSON Schema that will hopefully be released in near future. - -**Validate schema from JavaScript** - -```javascript -registerSchema({ - $schema: "https://json-schema.org/draft/2020-12/schema", - type: "string" -}, "http://example.com/schemas/string"); - -const output = await validate("http://example.com/schemas/string", "foo"); -if (output.valid) { - console.log("Instance is valid :-)"); -} else { - console.log("Instance is invalid :-("); -} -``` - -**Compile schema** - -If you need to validate multiple instances against the same schema, you can -compile the schema into a reusable validation function. - -```javascript -const isString = await validate("http://example.com/schemas/string"); -const output1 = isString("foo"); -const output2 = isString(42); -``` - -**File-based and web-based schemas** - -Schemas that are available on the web can be loaded automatically without -needing to load them manually. - -```javascript -const output = await validate("http://example.com/schemas/string", "foo"); -``` - -When running on the server, you can also load schemas directly from the -filesystem. When fetching from the file system, there are limitations for -security reasons. You can only reference a schema identified by a file URI -scheme (**file**:///path/to/my/schemas) from another schema identified by a file -URI scheme. Also, a schema is not allowed to self-identify (`$id`) with a -`file:` URI scheme. - -```javascript -const output = await validate(`file://${__dirname}/string.schema.json`, "foo"); -``` - -If the schema URI is relative, the base URI in the browser is the browser -location and the base URI on the server is the current working directory. This -is the preferred way to work with file-based schemas on the server. - -```javascript -const output = await validate(`./string.schema.json`, "foo"); -``` - -You can add/modify/remove support for any URI scheme using the [plugin -system](https://github.com/hyperjump-io/browser/#uri-schemes) provided by -`@hyperjump/browser`. - -**Format** - -Format validation support needs to be explicitly loaded by importing -`@hyperjump/json-schema/formats`. Once loaded, it depends on the dialect whether -validation is enabled by default or not. You should explicitly enable/disable it -with the `setShouldValidateFormat` function. - -The `hostname`, `idn-hostname`, and `idn-email` validators are fairly large. If -you don't need support for those formats and bundle size is a concern, you can -use `@hyperjump/json-schema/formats-lite` instead to leave out support for those -formats. - -```javascript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -import { setShouldValidateFormat } from "@hyperjump/json-schema/formats"; - -const schemaUri = "https://example.com/number"; -registerSchema({ - "type": "string", - "format": "date" -}, schemaUri); - -setShouldValidateFormat(true); -const output = await validate(schemaUri, "Feb 29, 2031"); // { valid: false } -``` - -**OpenAPI** - -The OpenAPI 3.0 and 3.1 and 3.2 meta-schemas are pre-loaded and the OpenAPI JSON -Schema dialects for each of those versions is supported. A document with a -Content-Type of `application/openapi+json` (web) or a file extension of -`openapi.json` (filesystem) is understood as an OpenAPI document. - -Use the pattern `@hyperjump/json-schema/*` to import the version you need. The -available versions are `openapi-3-0` for 3.0, `openapi-3-1` for 3.1, and -`openapi-3-2` for 3.2. - -```javascript -import { validate } from "@hyperjump/json-schema/openapi-3-2"; - - -// Validate an OpenAPI 3.2 document -const output = await validate("https://spec.openapis.org/oas/3.2/schema-base", openapi); - -// Validate an instance against a schema in an OpenAPI 3.2 document -const output = await validate("./example.openapi.json#/components/schemas/foo", 42); -``` - -YAML support isn't built in, but you can add it by writing a -[MediaTypePlugin](https://github.com/hyperjump-io/browser/#media-types). You can -use the one at `lib/openapi.js` as an example and replace the JSON parts with -YAML. - -**Media types** - -This library uses media types to determine how to parse a retrieved document. It -will never assume the retrieved document is a schema. By default it's configured -to accept documents with a `application/schema+json` Content-Type header (web) -or a `.schema.json` file extension (filesystem). - -You can add/modify/remove support for any media-type using the [plugin -system](https://github.com/hyperjump-io/browser/#media-types) provided by -`@hyperjump/browser`. The following example shows how to add support for JSON -Schemas written in YAML. - -```javascript -import YAML from "yaml"; -import contentTypeParser from "content-type"; -import { addMediaTypePlugin } from "@hyperjump/browser"; -import { buildSchemaDocument } from "@hyperjump/json-schema/experimental"; - - -addMediaTypePlugin("application/schema+yaml", { - parse: async (response) => { - const contentType = contentTypeParser.parse(response.headers.get("content-type") ?? ""); - const contextDialectId = contentType.parameters.schema ?? contentType.parameters.profile; - - const foo = YAML.parse(await response.text()); - return buildSchemaDocument(foo, response.url, contextDialectId); - }, - fileMatcher: (path) => path.endsWith(".schema.yml") -}); -``` - -### API - -These are available from any of the exports that refer to a version of JSON -Schema, such as `@hyperjump/json-schema/draft-2020-12`. - -* **registerSchema**: (schema: object, retrievalUri?: string, defaultDialectId?: string) => void - - Add a schema the local schema registry. When this schema is needed, it will - be loaded from the register rather than the filesystem or network. If a - schema with the same identifier is already registered, an exception will be - throw. -* **unregisterSchema**: (uri: string) => void - - Remove a schema from the local schema registry. -* **getAllRegisteredSchemaUris**: () => string[] - - This function returns the URIs of all registered schemas -* **hasSchema**: (uri: string) => boolean - - Check if a schema with the given URI is already registered. -* _(deprecated)_ **addSchema**: (schema: object, retrievalUri?: string, defaultDialectId?: string) => void - - Load a schema manually rather than fetching it from the filesystem or over - the network. Any schema already registered with the same identifier will be - replaced with no warning. -* **validate**: (schemaURI: string, instance: any, outputFormat: ValidationOptions | OutputFormat = FLAG) => Promise\ - - Validate an instance against a schema. This function is curried to allow - compiling the schema once and applying it to multiple instances. -* **validate**: (schemaURI: string) => Promise\<(instance: any, outputFormat: ValidationOptions | OutputFormat = FLAG) => OutputUnit> - - Compiling a schema to a validation function. -* **FLAG**: "FLAG" - - An identifier for the `FLAG` output format as defined by the 2019-09 and - 2020-12 specifications. -* **InvalidSchemaError**: Error & { output: OutputUnit } - - This error is thrown if the schema being compiled is found to be invalid. - The `output` field contains an `OutputUnit` with information about the - error. You can use the `setMetaSchemaOutputFormat` configuration to set the - output format that is returned in `output`. -* **setMetaSchemaOutputFormat**: (outputFormat: OutputFormat) => void - - Set the output format used for validating schemas. -* **getMetaSchemaOutputFormat**: () => OutputFormat - - Get the output format used for validating schemas. -* **setShouldMetaValidate**: (isEnabled: boolean) => void - - Enable or disable validating schemas. -* **getShouldMetaValidate**: (isEnabled: boolean) => void - - Determine if validating schemas is enabled. - -**Type Definitions** - -The following types are used in the above definitions - -* **OutputFormat**: **FLAG** - - Only the `FLAG` output format is part of the Stable API. Additional [output - formats](#output-formats) are included as part of the Experimental API. -* **OutputUnit**: { valid: boolean } - - Output is an experimental feature of the JSON Schema specification. There - may be additional fields present in the OutputUnit, but only the `valid` - property should be considered part of the Stable API. -* **ValidationOptions**: - - * outputFormat?: OutputFormat - * plugins?: EvaluationPlugin[] - -## Bundling - -### Usage - -You can bundle schemas with external references into a single deliverable using -the official JSON Schema bundling process introduced in the 2020-12 -specification. Given a schema with external references, any external schemas -will be embedded in the schema resulting in a Compound Schema Document with all -the schemas necessary to evaluate the given schema in a single JSON document. - -The bundling process allows schemas to be embedded without needing to modify any -references which means you get the same output details whether you validate the -bundle or the original unbundled schemas. - -```javascript -import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; -import { bundle } from "@hyperjump/json-schema/bundle"; - - -registerSchema({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "type": "object", - "properties": { - "foo": { "$ref": "/string" } - } -}, "https://example.com/main"); - -registerSchema({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "type": "string" -}, "https://example.com/string"); - -const bundledSchema = await bundle("https://example.com/main"); // { -// "$schema": "https://json-schema.org/draft/2020-12/schema", -// -// "type": "object", -// "properties": { -// "foo": { "$ref": "/string" } -// }, -// -// "$defs": { -// "string": { -// "$id": "https://example.com/string", -// "type": "string" -// } -// } -// } -``` - -### API - -These are available from the `@hyperjump/json-schema/bundle` export. - -* **bundle**: (uri: string, options: Options) => Promise\ - - Create a bundled schema starting with the given schema. External schemas - will be fetched from the filesystem, the network, or the local schema - registry as needed. - - Options: - * alwaysIncludeDialect: boolean (default: false) -- Include dialect even - when it isn't strictly needed - * definitionNamingStrategy: "uri" | "uuid" (default: "uri") -- By default - the name used in definitions for embedded schemas will match the - identifier of the embedded schema. Alternatively, you can use a UUID - instead of the schema's URI. - * externalSchemas: string[] (default: []) -- A list of schemas URIs that - are available externally and should not be included in the bundle. - -## Experimental - -### Output Formats - -**Change the validation output format** - -The `FLAG` output format isn't very informative. You can change the output -format used for validation to get more information about failures. The official -output format is still evolving, so these may change or be replaced in the -future. This implementation currently supports the BASIC and DETAILED output -formats. - -```javascript -import { BASIC } from "@hyperjump/json-schema/experimental"; - - -const output = await validate("https://example.com/schema1", 42, BASIC); -``` - -**Change the schema validation output format** - -The output format used for validating schemas can be changed as well. - -```javascript -import { validate, setMetaSchemaOutputFormat } from "@hyperjump/json-schema/draft-2020-12"; -import { BASIC } from "@hyperjump/json-schema/experimental"; - - -setMetaSchemaOutputFormat(BASIC); -try { - const output = await validate("https://example.com/invalid-schema"); -} catch (error) { - console.log(error.output); -} -``` - -### Custom Keywords, Vocabularies, and Dialects - -In order to create and use a custom keyword, you need to define your keyword's -behavior, create a vocabulary that includes that keyword, and then create a -dialect that includes your vocabulary. - -Schemas are represented using the -[`@hyperjump/browser`](https://github.com/hyperjump-io/browser) package. You'll -use that API to traverse schemas. `@hyperjump/browser` uses async generators to -iterate over arrays and objects. If you like using higher order functions like -`map`/`filter`/`reduce`, see -[`@hyperjump/pact`](https://github.com/hyperjump-io/pact) for utilities for -working with generators and async generators. - -```javascript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -import { addKeyword, defineVocabulary, Validation } from "@hyperjump/json-schema/experimental"; -import * as Browser from "@hyperjump/browser"; - - -// Define a keyword that's an array of schemas that are applied sequentially -// using implication: A -> B -> C -> D -addKeyword({ - id: "https://example.com/keyword/implication", - - compile: async (schema, ast) => { - const subSchemas = []; - for await (const subSchema of Browser.iter(schema)) { - subSchemas.push(Validation.compile(subSchema, ast)); - } - return subSchemas; - - // Alternative using @hyperjump/pact - // return pipe( - // Browser.iter(schema), - // asyncMap((subSchema) => Validation.compile(subSchema, ast)), - // asyncCollectArray - // ); - }, - - interpret: (implies, instance, context) => { - return implies.reduce((valid, schema) => { - return !valid || Validation.interpret(schema, instance, context); - }, true); - } -}); - -// Create a vocabulary with this keyword and call it "implies" -defineVocabulary("https://example.com/vocab/logic", { - "implies": "https://example.com/keyword/implication" -}); - -// Create a vocabulary schema for this vocabulary -registerSchema({ - "$id": "https://example.com/meta/logic", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$dynamicAnchor": "meta", - "properties": { - "implies": { - "type": "array", - "items": { "$dynamicRef": "meta" }, - "minItems": 2 - } - } -}); - -// Create a dialect schema adding this vocabulary to the standard JSON Schema -// vocabularies -registerSchema({ - "$id": "https://example.com/dialect/logic", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true - "https://example.com/vocab/logic": true - }, - - "$dynamicAnchor": "meta", - - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "/meta/logic" } - ] -}); - -// Use your dialect to validate a JSON instance -registerSchema({ - "$schema": "https://example.com/dialect/logic", - - "type": "number", - "implies": [ - { "minimum": 10 }, - { "multipleOf": 2 } - ] -}, "https://example.com/schema1"); -const output = await validate("https://example.com/schema1", 42); -``` - -### Custom Formats - -Custom formats work similarly to keywords. You define a format handler and then -associate that format handler with the format keyword that applies to the -dialects you're targeting. - -```JavaScript -import { registerSchema, validate, setShouldValidateFormat } from "@hyperjump/json-schema/draft-2020-12"; -import { addFormat, setFormatHandler } from "@hyperjump/json-schema/experimental"; - -const isoDateFormatUri = "https://example.com/format/iso-8601-date"; - -// Add the iso-date format handler -addFormat({ - id: isoDateFormatUri, - handler: (date) => new Date(date).toISOString() === date -}); - -// Add the "iso-date" format to the 2020-12 version of `format` -setFormatHandler("https://json-schema.org/keyword/draft-2020-12/format", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-2020-12/format-assertion", "iso-date", isoDateFormatUri); - -// Optional: Add the "iso-date" format to other dialects -setFormatHandler("https://json-schema.org/keyword/draft-2019-09/format", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-2019-09/format-assertion", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-07/format", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-06/format", "iso-date", isoDateFormatUri); -setFormatHandler("https://json-schema.org/keyword/draft-04/format", "iso-date", isoDateFormatUri); - -const schemaUri = "https://example.com/main"; -registerSchema({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "type": "string", - "format": "iso-date" -}, schemaUri); - -setShouldValidateFormat(true); -const output = await validate(schemaUri, "Feb 28, 2031"); // { valid: false } -``` - -### Custom Meta Schema - -You can use a custom meta-schema to restrict users to a subset of JSON Schema -functionality. This example requires that no unknown keywords are used in the -schema. - -```javascript -registerSchema({ - "$id": "https://example.com/meta-schema1", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - - "$dynamicAnchor": "meta", - - "$ref": "https://json-schema.org/draft/2020-12/schema", - "unevaluatedProperties": false -}); - -registerSchema({ - $schema: "https://example.com/meta-schema1", - type: "number", - foo: 42 -}, "https://example.com/schema1"); - -const output = await validate("https://example.com/schema1", 42); // Expect InvalidSchemaError -``` - -### EvaluationPlugins - -EvaluationPlugins allow you to hook into the validation process for various -purposes. There are hooks for before an after schema evaluation and before and -after keyword evaluation. (See the API section for the full interface) The -following is a simple example to record all the schema locations that were -evaluated. This could be used as part of a solution for determining test -coverage for a schema. - -```JavaScript -import { registerSchema, validate } from "@hyperjump/json-schema/draft-2020-12"; -import { BASIC } from "@hyperjump/json-schema/experimental.js"; - -class EvaluatedKeywordsPlugin { - constructor() { - this.schemaLocations = new Set(); - } - - beforeKeyword([, schemaUri]) { - this.schemaLocations.add(schemaUri); - } -} - -registerSchema({ - $schema: "https://json-schema.org/draft/2020-12/schema", - type: "object", - properties: { - foo: { type: "number" }, - bar: { type: "boolean" } - }, - required: ["foo"] -}, "https://schemas.hyperjump.io/main"); - -const evaluatedKeywordPlugin = new EvaluatedKeywordsPlugin(); - -await validate("https://schemas.hyperjump.io/main", { foo: 42 }, { - outputFormat: BASIC, - plugins: [evaluatedKeywordPlugin] -}); - -console.log(evaluatedKeywordPlugin.schemaLocations); -// Set(4) { -// 'https://schemas.hyperjump.io/main#/type', -// 'https://schemas.hyperjump.io/main#/properties', -// 'https://schemas.hyperjump.io/main#/properties/foo/type', -// 'https://schemas.hyperjump.io/main#/required' -// } - -// NOTE: #/properties/bar is not in the list because the instance doesn't include that property. -``` - -### API - -These are available from the `@hyperjump/json-schema/experimental` export. - -* **addKeyword**: (keywordHandler: Keyword) => void - - Define a keyword for use in a vocabulary. - - * **Keyword**: object - * id: string - - A URI that uniquely identifies the keyword. It should use a domain you - own to avoid conflict with keywords defined by others. - * compile: (schema: Browser, ast: AST, parentSchema: Browser) => Promise\ - - This function takes the keyword value, does whatever preprocessing it - can on it without an instance, and returns the result. The returned - value will be passed to the `interpret` function. The `ast` parameter - is needed for compiling sub-schemas. The `parentSchema` parameter is - primarily useful for looking up the value of an adjacent keyword that - might effect this one. - * interpret: (compiledKeywordValue: any, instance: JsonNode, context: ValidationContext) => boolean - - This function takes the value returned by the `compile` function and - the instance value that is being validated and returns whether the - value is valid or not. The other parameters are only needed for - validating sub-schemas. - * simpleApplicator?: boolean - - Some applicator keywords just apply schemas and don't do any - validation of its own. In these cases, it isn't helpful to include - them in BASIC output. This flag is used to trim those nodes from the - output. - * annotation?: (compiledKeywordValue: any) => any | undefined - - If the keyword is an annotation, it will need to implement this - function to return the annotation. - * plugin?: EvaluationPlugin - - If the keyword needs to track state during the evaluation process, you - can include an EvaluationPlugin that will get added only when this - keyword is present in the schema. - - * **ValidationContext**: object - * ast: AST - * plugins: EvaluationPlugins[] -* **addFormat**: (formatHandler: Format) => void - - Add a format handler. - - * **Format**: object - * id: string - - A URI that uniquely identifies the format. It should use a domain you - own to avoid conflict with keywords defined by others. - * handler: (value: any) => boolean - - A function that takes the value and returns a boolean determining if - it passes validation for the format. -* **setFormatHandler**: (keywordUri: string, formatName: string, formatUri: string) => void - - Add support for a format to the specified keyword. -* **removeFormatHandler**: (keywordUri, formatName) => void - - Remove support for a format from the specified keyword. -* **defineVocabulary**: (id: string, keywords: { [keyword: string]: string }) => void - - Define a vocabulary that maps keyword name to keyword URIs defined using - `addKeyword`. -* **getKeywordId**: (keywordName: string, dialectId: string) => string - - Get the identifier for a keyword by its name. -* **getKeyword**: (keywordId: string) => Keyword - - Get a keyword object by its URI. This is useful for building non-validation - tooling. -* **getKeywordByName**: (keywordName: string, dialectId: string) => Keyword - - Get a keyword object by its name. This is useful for building non-validation - tooling. -* **getKeywordName**: (dialectId: string, keywordId: string) => string - - Determine a keyword's name given its URI a dialect URI. This is useful when - defining a keyword that depends on the value of another keyword (such as how - `contains` depends on `minContains` and `maxContains`). -* **loadDialect**: (dialectId: string, dialect: { [vocabularyId: string] }, allowUnknownKeywords: boolean = false) => void - - Define a dialect. In most cases, dialects are loaded automatically from the - `$vocabulary` keyword in the meta-schema. The only time you would need to - load a dialect manually is if you're creating a distinct version of JSON - Schema rather than creating a dialect of an existing version of JSON Schema. -* **unloadDialect**: (dialectId: string) => void - - Remove a dialect. You shouldn't need to use this function. It's called for - you when you call `unregisterSchema`. -* **Validation**: Keyword - - A Keyword object that represents a "validate" operation. You would use this - for compiling and evaluating sub-schemas when defining a custom keyword. - -* **getSchema**: (uri: string, browser?: Browser) => Promise\ - - Get a schema by it's URI taking the local schema registry into account. -* **buildSchemaDocument**: (schema: SchemaObject | boolean, retrievalUri?: string, contextDialectId?: string) => SchemaDocument - - Build a SchemaDocument from a JSON-compatible value. You might use this if - you're creating a custom media type plugin, such as supporting JSON Schemas - in YAML. -* **canonicalUri**: (schema: Browser) => string - - Returns a URI for the schema. -* **toSchema**: (schema: Browser, options: ToSchemaOptions) => object - - Get a raw schema from a Schema Document. - - * **ToSchemaOptions**: object - - * contextDialectId: string (default: "") -- If the dialect of the schema - matches this value, the `$schema` keyword will be omitted. - * includeDialect: "auto" | "always" | "never" (default: "auto") -- If - "auto", `$schema` will only be included if it differs from - `contextDialectId`. - * contextUri: string (default: "") -- `$id`s will be relative to this - URI. - * includeEmbedded: boolean (default: true) -- If false, embedded schemas - will be unbundled from the schema. -* **compile**: (schema: Browser) => Promise\ - - Return a compiled schema. This is useful if you're creating tooling for - something other than validation. -* **interpret**: (schema: CompiledSchema, instance: JsonNode, outputFormat: OutputFormat = BASIC) => OutputUnit - - A curried function for validating an instance against a compiled schema. - This can be useful for creating custom output formats. - -* **OutputFormat**: **FLAG** | **BASIC** - - In addition to the `FLAG` output format in the Stable API, the Experimental - API includes support for the `BASIC` format as specified in the 2019-09 - specification (with some minor customizations). This implementation doesn't - include annotations or human readable error messages. The output can be - processed to create human readable error messages as needed. - -* **EvaluationPlugin**: object - * beforeSchema?(url: string, instance: JsonNode, context: Context): void - * beforeKeyword?(keywordNode: CompiledSchemaNode, instance: JsonNode, context: Context, schemaContext: Context, keyword: Keyword): void - * afterKeyword?(keywordNode: CompiledSchemaNode, instance: JsonNode, context: Context, valid: boolean, schemaContext: Context, keyword: Keyword): void - * afterSchema?(url: string, instance: JsonNode, context: Context, valid: boolean): void - -## Instance API (experimental) - -These functions are available from the -`@hyperjump/json-schema/instance/experimental` export. - -This library uses JsonNode objects to represent instances. You'll work with -these objects if you create a custom keyword. - -This API uses generators to iterate over arrays and objects. If you like using -higher order functions like `map`/`filter`/`reduce`, see -[`@hyperjump/pact`](https://github.com/hyperjump-io/pact) for utilities for -working with generators and async generators. - -* **fromJs**: (value: any, uri?: string) => JsonNode - - Construct a JsonNode from a JavaScript value. -* **cons**: (baseUri: string, pointer: string, value: any, type: string, children: JsonNode[], parent?: JsonNode) => JsonNode - - Construct a JsonNode. This is used internally. You probably want `fromJs` - instead. -* **get**: (url: string, instance: JsonNode) => JsonNode - - Apply a same-resource reference to a JsonNode. -* **uri**: (instance: JsonNode) => string - - Returns a URI for the value the JsonNode represents. -* **value**: (instance: JsonNode) => any - - Returns the value the JsonNode represents. -* **has**: (key: string, instance: JsonNode) => boolean - - Returns whether or not "key" is a property name in a JsonNode that - represents an object. -* **typeOf**: (instance: JsonNode) => string - - The JSON type of the JsonNode. In addition to the standard JSON types, - there's also the `property` type that indicates a property name/value pair - in an object. -* **step**: (key: string, instance: JsonNode) => JsonType - - Similar to indexing into a object or array using the `[]` operator. -* **iter**: (instance: JsonNode) => Generator\ - - Iterate over the items in the array that the JsonNode represents. -* **entries**: (instance: JsonNode) => Generator\<[JsonNode, JsonNode]> - - Similar to `Object.entries`, but yields JsonNodes for keys and values. -* **values**: (instance: JsonNode) => Generator\ - - Similar to `Object.values`, but yields JsonNodes for values. -* **keys**: (instance: JsonNode) => Generator\ - - Similar to `Object.keys`, but yields JsonNodes for keys. -* **length**: (instance: JsonNode) => number - - Similar to `Array.prototype.length`. - -## Annotations (experimental) -JSON Schema is for annotating JSON instances as well as validating them. This -module provides utilities for working with JSON documents annotated with JSON -Schema. - -### Usage -An annotated JSON document is represented as a -(JsonNode)[#instance-api-experimental] AST. You can use this AST to traverse -the data structure and get annotations for the values it represents. - -```javascript -import { registerSchema } from "@hyperjump/json-schema/draft/2020-12"; -import { annotate } from "@hyperjump/json-schema/annotations/experimental"; -import * as AnnotatedInstance from "@hyperjump/json-schema/annotated-instance/experimental"; - - -const schemaId = "https://example.com/foo"; -const dialectId = "https://json-schema.org/draft/2020-12/schema"; - -registerSchema({ - "$schema": dialectId, - - "title": "Person", - "unknown": "foo", - - "type": "object", - "properties": { - "name": { - "$ref": "#/$defs/name", - "deprecated": true - }, - "givenName": { - "$ref": "#/$defs/name", - "title": "Given Name" - }, - "familyName": { - "$ref": "#/$defs/name", - "title": "Family Name" - } - }, - - "$defs": { - "name": { - "type": "string", - "title": "Name" - } - } -}, schemaId); - -const instance = await annotate(schemaId, { - name: "Jason Desrosiers", - givenName: "Jason", - familyName: "Desrosiers" -}); - -// Get the title of the instance -const titles = AnnotatedInstance.annotation(instance, "title", dialectId); // => ["Person"] - -// Unknown keywords are collected as annotations -const unknowns = AnnotatedInstance.annotation(instance, "unknown", dialectId); // => ["foo"] - -// The type keyword doesn't produce annotations -const types = AnnotatedInstance.annotation(instance, "type", dialectId); // => [] - -// Get the title of each of the properties in the object -for (const [propertyNameNode, propertyInstance] of AnnotatedInstance.entries(instance)) { - const propertyName = AnnotatedInstance.value(propertyName); - console.log(propertyName, AnnotatedInstance.annotation(propertyInstance, "title", dialectId)); -} - -// List all locations in the instance that are deprecated -for (const deprecated of AnnotatedInstance.annotatedWith(instance, "deprecated", dialectId)) { - if (AnnotatedInstance.annotation(deprecated, "deprecated", dialectId)[0]) { - logger.warn(`The value at '${deprecated.pointer}' has been deprecated.`); // => (Example) "WARN: The value at '/name' has been deprecated." - } -} -``` - -### API -These are available from the `@hyperjump/json-schema/annotations/experimental` -export. - -* **annotate**: (schemaUri: string, instance: any, outputFormat: OutputFormat = BASIC) => Promise\ - - Annotate an instance using the given schema. The function is curried to - allow compiling the schema once and applying it to multiple instances. This - may throw an [InvalidSchemaError](#api) if there is a problem with the - schema or a ValidationError if the instance doesn't validate against the - schema. -* **interpret**: (compiledSchema: CompiledSchema, instance: JsonNode, outputFormat: OutputFormat = BASIC) => JsonNode - - Annotate a JsonNode object rather than a plain JavaScript value. This might - be useful when building tools on top of the annotation functionality, but - you probably don't need it. -* **ValidationError**: Error & { output: OutputUnit } - The `output` field contains an `OutputUnit` with information about the - error. - -## AnnotatedInstance API (experimental) -These are available from the -`@hyperjump/json-schema/annotated-instance/experimental` export. The -following functions are available in addition to the functions available in the -[Instance API](#instance-api-experimental). - -* **annotation**: (instance: JsonNode, keyword: string, dialect?: string): any[]; - - Get the annotations for a keyword for the value represented by the JsonNode. -* **annotatedWith**: (instance: JsonNode, keyword: string, dialect?: string): Generator; - - Get all JsonNodes that are annotated with the given keyword. -* **setAnnotation**: (instance: JsonNode, keywordId: string, value: any) => JsonNode - - Add an annotation to an instance. This is used internally, you probably - don't need it. - -## Contributing - -### Tests - -Run the tests - -```bash -npm test -``` - -Run the tests with a continuous test runner - -```bash -npm test -- --watch -``` diff --git a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts deleted file mode 100644 index 206df4f9..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const annotation: (instance: JsonNode, keyword: string, dialectUri?: string) => A[]; -export const annotatedWith: (instance: A, keyword: string, dialectUri?: string) => Generator; - -export * from "../lib/instance.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js b/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js deleted file mode 100644 index 47b4c092..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/annotated-instance.js +++ /dev/null @@ -1,20 +0,0 @@ -import * as Instance from "../lib/instance.js"; -import { getKeywordId } from "../lib/keywords.js"; - - -const defaultDialectId = "https://json-schema.org/v1"; - -export const annotation = (node, keyword, dialect = defaultDialectId) => { - const keywordUri = getKeywordId(keyword, dialect); - return node.annotations[keywordUri] ?? []; -}; - -export const annotatedWith = function* (instance, keyword, dialectId = defaultDialectId) { - for (const node of Instance.allNodes(instance)) { - if (annotation(node, keyword, dialectId).length > 0) { - yield node; - } - } -}; - -export * from "../lib/instance.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/index.d.ts b/node_modules/@hyperjump/json-schema/annotations/index.d.ts deleted file mode 100644 index 75de9ce8..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OutputFormat, Output, ValidationOptions } from "../lib/index.js"; -import type { CompiledSchema } from "../lib/experimental.js"; -import type { JsonNode } from "../lib/instance.js"; -import type { Json } from "@hyperjump/json-pointer"; - - -export const annotate: ( - (schemaUrl: string, value: Json, options?: OutputFormat | ValidationOptions) => Promise -) & ( - (schemaUrl: string) => Promise -); - -export type Annotator = (value: Json, options?: OutputFormat | ValidationOptions) => JsonNode; - -export const interpret: (compiledSchema: CompiledSchema, value: JsonNode, options?: OutputFormat | ValidationOptions) => JsonNode; - -export class ValidationError extends Error { - public output: Output & { valid: false }; - - public constructor(output: Output); -} diff --git a/node_modules/@hyperjump/json-schema/annotations/index.js b/node_modules/@hyperjump/json-schema/annotations/index.js deleted file mode 100644 index 82c3d7fd..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/index.js +++ /dev/null @@ -1,45 +0,0 @@ -import { ValidationError } from "./validation-error.js"; -import { - getSchema, - compile, - interpret as validate, - BASIC, - AnnotationsPlugin -} from "../lib/experimental.js"; -import * as Instance from "../lib/instance.js"; - - -export const annotate = async (schemaUri, json = undefined, options = undefined) => { - const schema = await getSchema(schemaUri); - const compiled = await compile(schema); - const interpretAst = (json, options) => interpret(compiled, Instance.fromJs(json), options); - - return json === undefined ? interpretAst : interpretAst(json, options); -}; - -export const interpret = (compiledSchema, instance, options = BASIC) => { - const annotationsPlugin = new AnnotationsPlugin(); - const plugins = options.plugins ?? []; - - const output = validate(compiledSchema, instance, { - outputFormat: typeof options === "string" ? options : options.outputFormat ?? BASIC, - plugins: [annotationsPlugin, ...plugins] - }); - - if (!output.valid) { - throw new ValidationError(output); - } - - for (const annotation of annotationsPlugin.annotations) { - const node = Instance.get(annotation.instanceLocation, instance); - const keyword = annotation.keyword; - if (!node.annotations[keyword]) { - node.annotations[keyword] = []; - } - node.annotations[keyword].unshift(annotation.annotation); - } - - return instance; -}; - -export { ValidationError } from "./validation-error.js"; diff --git a/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts b/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts deleted file mode 100644 index da8693cf..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/test-utils.d.ts +++ /dev/null @@ -1 +0,0 @@ -export const isCompatible: (compatibility: string | undefined, versionUnderTest: number) => boolean; diff --git a/node_modules/@hyperjump/json-schema/annotations/test-utils.js b/node_modules/@hyperjump/json-schema/annotations/test-utils.js deleted file mode 100644 index 5841ca7f..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/test-utils.js +++ /dev/null @@ -1,38 +0,0 @@ -export const isCompatible = (compatibility, versionUnderTest) => { - if (compatibility === undefined) { - return true; - } - - const constraints = compatibility.split(","); - for (const constraint of constraints) { - const matches = /(?<=|>=|=)?(?\d+)/.exec(constraint); - if (!matches) { - throw Error(`Invalid compatibility string: ${compatibility}`); - } - - const operator = matches[1] ?? ">="; - const version = parseInt(matches[2], 10); - - switch (operator) { - case ">=": - if (versionUnderTest < version) { - return false; - } - break; - case "<=": - if (versionUnderTest > version) { - return false; - } - break; - case "=": - if (versionUnderTest !== version) { - return false; - } - break; - default: - throw Error(`Unsupported contraint operator: ${operator}`); - } - } - - return true; -}; diff --git a/node_modules/@hyperjump/json-schema/annotations/validation-error.js b/node_modules/@hyperjump/json-schema/annotations/validation-error.js deleted file mode 100644 index b0804723..00000000 --- a/node_modules/@hyperjump/json-schema/annotations/validation-error.js +++ /dev/null @@ -1,7 +0,0 @@ -export class ValidationError extends Error { - constructor(output) { - super("Validation Error"); - this.name = this.constructor.name; - this.output = output; - } -} diff --git a/node_modules/@hyperjump/json-schema/bundle/index.d.ts b/node_modules/@hyperjump/json-schema/bundle/index.d.ts deleted file mode 100644 index 94c6c912..00000000 --- a/node_modules/@hyperjump/json-schema/bundle/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { SchemaObject } from "../lib/index.js"; - - -export const bundle: (uri: string, options?: BundleOptions) => Promise; -export const URI: "uri"; -export const UUID: "uuid"; - -export type BundleOptions = { - alwaysIncludeDialect?: boolean; - definitionNamingStrategy?: DefinitionNamingStrategy; - externalSchemas?: string[]; -}; - -export type DefinitionNamingStrategy = "uri" | "uuid"; diff --git a/node_modules/@hyperjump/json-schema/bundle/index.js b/node_modules/@hyperjump/json-schema/bundle/index.js deleted file mode 100644 index 99c6fe94..00000000 --- a/node_modules/@hyperjump/json-schema/bundle/index.js +++ /dev/null @@ -1,83 +0,0 @@ -import { v4 as uuid } from "uuid"; -import { jrefTypeOf } from "@hyperjump/browser/jref"; -import * as JsonPointer from "@hyperjump/json-pointer"; -import { resolveIri, toAbsoluteIri } from "@hyperjump/uri"; -import { getSchema, toSchema, getKeywordName } from "../lib/experimental.js"; - - -export const URI = "uri", UUID = "uuid"; - -const defaultOptions = { - alwaysIncludeDialect: false, - definitionNamingStrategy: URI, - externalSchemas: [] -}; - -export const bundle = async (url, options = {}) => { - const fullOptions = { ...defaultOptions, ...options }; - - const mainSchema = await getSchema(url); - fullOptions.contextUri = mainSchema.document.baseUri; - fullOptions.contextDialectId = mainSchema.document.dialectId; - - const bundled = toSchema(mainSchema); - fullOptions.bundlingLocation = "/" + getKeywordName(fullOptions.contextDialectId, "https://json-schema.org/keyword/definitions"); - if (JsonPointer.get(fullOptions.bundlingLocation, bundled) === undefined) { - JsonPointer.assign(fullOptions.bundlingLocation, bundled, {}); - } - - return await doBundling(mainSchema.uri, bundled, fullOptions); -}; - -const doBundling = async (schemaUri, bundled, fullOptions, contextSchema, visited = new Set()) => { - visited.add(schemaUri); - - const schema = await getSchema(schemaUri, contextSchema); - for (const reference of allReferences(schema.document.root)) { - const uri = toAbsoluteIri(resolveIri(reference.href, schema.document.baseUri)); - if (visited.has(uri) || fullOptions.externalSchemas.includes(uri) || (uri in schema.document.embedded && !(uri in schema._cache))) { - continue; - } - - const externalSchema = await getSchema(uri, contextSchema); - const embeddedSchema = toSchema(externalSchema, { - contextUri: externalSchema.document.baseUri.startsWith("file:") ? fullOptions.contextUri : undefined, - includeDialect: fullOptions.alwaysIncludeDialect ? "always" : "auto", - contextDialectId: fullOptions.contextDialectId - }); - let id; - if (fullOptions.definitionNamingStrategy === URI) { - const idToken = getKeywordName(externalSchema.document.dialectId, "https://json-schema.org/keyword/id") - || getKeywordName(externalSchema.document.dialectId, "https://json-schema.org/keyword/draft-04/id"); - id = embeddedSchema[idToken]; - } else if (fullOptions.definitionNamingStrategy === UUID) { - id = uuid(); - } else { - throw Error(`Unknown definition naming stragety: ${fullOptions.definitionNamingStrategy}`); - } - const pointer = JsonPointer.append(id, fullOptions.bundlingLocation); - JsonPointer.assign(pointer, bundled, embeddedSchema); - - bundled = await doBundling(uri, bundled, fullOptions, schema, visited); - } - - return bundled; -}; - -const allReferences = function* (node) { - switch (jrefTypeOf(node)) { - case "object": - for (const property in node) { - yield* allReferences(node[property]); - } - break; - case "array": - for (const item of node) { - yield* allReferences(item); - } - break; - case "reference": - yield node; - break; - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js b/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js deleted file mode 100644 index da09d332..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/additionalItems.js +++ /dev/null @@ -1,38 +0,0 @@ -import { drop } from "@hyperjump/pact"; -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getKeywordName, Validation } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/additionalItems"; - -const compile = async (schema, ast, parentSchema) => { - const itemsKeywordName = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/items"); - const items = await Browser.step(itemsKeywordName, parentSchema); - const numberOfItems = Browser.typeOf(items) === "array" ? Browser.length(items) : Number.MAX_SAFE_INTEGER; - - return [numberOfItems, await Validation.compile(schema, ast)]; -}; - -const interpret = ([numberOfItems, additionalItems], instance, context) => { - if (Instance.typeOf(instance) !== "array") { - return true; - } - - let isValid = true; - let index = numberOfItems; - for (const item of drop(numberOfItems, Instance.iter(instance))) { - if (!Validation.interpret(additionalItems, item, context)) { - isValid = false; - } - - context.evaluatedItems?.add(index); - index++; - } - - return isValid; -}; - -const simpleApplicator = true; - -export default { id, compile, interpret, simpleApplicator }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/dependencies.js b/node_modules/@hyperjump/json-schema/draft-04/dependencies.js deleted file mode 100644 index 60e96ce5..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/dependencies.js +++ /dev/null @@ -1,36 +0,0 @@ -import { pipe, asyncMap, asyncCollectArray } from "@hyperjump/pact"; -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { Validation } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/dependencies"; - -const compile = (schema, ast) => pipe( - Browser.entries(schema), - asyncMap(async ([key, dependency]) => [ - key, - Browser.typeOf(dependency) === "array" ? Browser.value(dependency) : await Validation.compile(dependency, ast) - ]), - asyncCollectArray -); - -const interpret = (dependencies, instance, context) => { - if (Instance.typeOf(instance) !== "object") { - return true; - } - - return dependencies.every(([propertyName, dependency]) => { - if (!Instance.has(propertyName, instance)) { - return true; - } - - if (Array.isArray(dependency)) { - return dependency.every((key) => Instance.has(key, instance)); - } else { - return Validation.interpret(dependency, instance, context); - } - }); -}; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js deleted file mode 100644 index 5acd1aa0..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMaximum.js +++ /dev/null @@ -1,5 +0,0 @@ -const id = "https://json-schema.org/keyword/draft-04/exclusiveMaximum"; -const compile = (schema) => schema.value; -const interpret = () => true; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js b/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js deleted file mode 100644 index 26e00941..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/exclusiveMinimum.js +++ /dev/null @@ -1,5 +0,0 @@ -const id = "https://json-schema.org/keyword/draft-04/exclusiveMinimum"; -const compile = (schema) => schema.value; -const interpret = () => true; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/format.js b/node_modules/@hyperjump/json-schema/draft-04/format.js deleted file mode 100644 index e4854f83..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/format.js +++ /dev/null @@ -1,31 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-04/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (getShouldValidateFormat() === false) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "email": "https://json-schema.org/format/email", - "hostname": "https://json-schema.org/format/draft-04/hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/id.js b/node_modules/@hyperjump/json-schema/draft-04/id.js deleted file mode 100644 index b5f6df1b..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/id.js +++ /dev/null @@ -1 +0,0 @@ -export default { id: "https://json-schema.org/keyword/draft-04/id" }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/index.d.ts b/node_modules/@hyperjump/json-schema/draft-04/index.d.ts deleted file mode 100644 index ed6460b2..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft04 = { - $ref: string; -} | { - $schema?: "http://json-schema.org/draft-04/schema#"; - id?: string; - title?: string; - description?: string; - default?: Json; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: boolean; - minimum?: number; - exclusiveMinimum?: boolean; - maxLength?: number; - minLength?: number; - pattern?: string; - additionalItems?: boolean | JsonSchemaDraft04; - items?: JsonSchemaDraft04 | JsonSchemaDraft04[]; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxProperties?: number; - minProperties?: number; - required?: string[]; - additionalProperties?: boolean | JsonSchemaDraft04; - definitions?: Record; - properties?: Record; - patternProperties?: Record; - dependencies?: Record; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri"; - allOf?: JsonSchemaDraft04[]; - anyOf?: JsonSchemaDraft04[]; - oneOf?: JsonSchemaDraft04[]; - not?: JsonSchemaDraft04; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-04/index.js b/node_modules/@hyperjump/json-schema/draft-04/index.js deleted file mode 100644 index 5ab69ea8..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/index.js +++ /dev/null @@ -1,71 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import metaSchema from "./schema.js"; -import additionalItems from "./additionalItems.js"; -import dependencies from "./dependencies.js"; -import exclusiveMaximum from "./exclusiveMaximum.js"; -import exclusiveMinimum from "./exclusiveMinimum.js"; -import id from "./id.js"; -import items from "./items.js"; -import format from "./format.js"; -import maximum from "./maximum.js"; -import minimum from "./minimum.js"; -import ref from "./ref.js"; - - -addKeyword(additionalItems); -addKeyword(dependencies); -addKeyword(exclusiveMaximum); -addKeyword(exclusiveMinimum); -addKeyword(maximum); -addKeyword(minimum); -addKeyword(id); -addKeyword(items); -addKeyword(format); -addKeyword(ref); - -const jsonSchemaVersion = "http://json-schema.org/draft-04/schema"; - -defineVocabulary(jsonSchemaVersion, { - "id": "https://json-schema.org/keyword/draft-04/id", - "$ref": "https://json-schema.org/keyword/draft-04/ref", - "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "default": "https://json-schema.org/keyword/default", - "definitions": "https://json-schema.org/keyword/definitions", - "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", - "description": "https://json-schema.org/keyword/description", - "enum": "https://json-schema.org/keyword/enum", - "exclusiveMaximum": "https://json-schema.org/keyword/draft-04/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/draft-04/exclusiveMinimum", - "format": "https://json-schema.org/keyword/draft-04/format", - "items": "https://json-schema.org/keyword/draft-04/items", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/draft-04/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/draft-04/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "pattern": "https://json-schema.org/keyword/pattern", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "properties": "https://json-schema.org/keyword/properties", - "required": "https://json-schema.org/keyword/required", - "title": "https://json-schema.org/keyword/title", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -loadDialect(jsonSchemaVersion, { - [jsonSchemaVersion]: true -}, true); - -registerSchema(metaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-04/items.js b/node_modules/@hyperjump/json-schema/draft-04/items.js deleted file mode 100644 index 9d1ece4b..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/items.js +++ /dev/null @@ -1,57 +0,0 @@ -import { pipe, asyncMap, asyncCollectArray, zip } from "@hyperjump/pact"; -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { Validation } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/items"; - -const compile = (schema, ast) => { - if (Browser.typeOf(schema) === "array") { - return pipe( - Browser.iter(schema), - asyncMap((itemSchema) => Validation.compile(itemSchema, ast)), - asyncCollectArray - ); - } else { - return Validation.compile(schema, ast); - } -}; - -const interpret = (items, instance, context) => { - if (Instance.typeOf(instance) !== "array") { - return true; - } - - let isValid = true; - let index = 0; - - if (typeof items === "string") { - for (const item of Instance.iter(instance)) { - if (!Validation.interpret(items, item, context)) { - isValid = false; - } - - context.evaluatedItems?.add(index++); - } - } else { - for (const [tupleItem, tupleInstance] of zip(items, Instance.iter(instance))) { - if (!tupleInstance) { - break; - } - - if (!Validation.interpret(tupleItem, tupleInstance, context)) { - isValid = false; - } - - context.evaluatedItems?.add(index); - index++; - } - } - - return isValid; -}; - -const simpleApplicator = true; - -export default { id, compile, interpret, simpleApplicator }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/maximum.js b/node_modules/@hyperjump/json-schema/draft-04/maximum.js deleted file mode 100644 index a2a889ce..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/maximum.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getKeywordName } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/maximum"; - -const compile = async (schema, _ast, parentSchema) => { - const exclusiveMaximumKeyword = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/exclusiveMaximum"); - const exclusiveMaximum = await Browser.step(exclusiveMaximumKeyword, parentSchema); - const isExclusive = Browser.value(exclusiveMaximum); - - return [Browser.value(schema), isExclusive]; -}; - -const interpret = ([maximum, isExclusive], instance) => { - if (Instance.typeOf(instance) !== "number") { - return true; - } - - const value = Instance.value(instance); - return isExclusive ? value < maximum : value <= maximum; -}; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/minimum.js b/node_modules/@hyperjump/json-schema/draft-04/minimum.js deleted file mode 100644 index c0146aba..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/minimum.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getKeywordName } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-04/minimum"; - -const compile = async (schema, _ast, parentSchema) => { - const exclusiveMinimumKeyword = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/draft-04/exclusiveMinimum"); - const exclusiveMinimum = await Browser.step(exclusiveMinimumKeyword, parentSchema); - const isExclusive = Browser.value(exclusiveMinimum); - - return [Browser.value(schema), isExclusive]; -}; - -const interpret = ([minimum, isExclusive], instance) => { - if (Instance.typeOf(instance) !== "number") { - return true; - } - - const value = Instance.value(instance); - return isExclusive ? value > minimum : value >= minimum; -}; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/ref.js b/node_modules/@hyperjump/json-schema/draft-04/ref.js deleted file mode 100644 index 5e714c50..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/ref.js +++ /dev/null @@ -1 +0,0 @@ -export default { id: "https://json-schema.org/keyword/draft-04/ref" }; diff --git a/node_modules/@hyperjump/json-schema/draft-04/schema.js b/node_modules/@hyperjump/json-schema/draft-04/schema.js deleted file mode 100644 index 130d72f4..00000000 --- a/node_modules/@hyperjump/json-schema/draft-04/schema.js +++ /dev/null @@ -1,149 +0,0 @@ -export default { - "id": "http://json-schema.org/draft-04/schema#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "positiveInteger": { - "type": "integer", - "minimum": 0 - }, - "positiveIntegerDefault0": { - "allOf": [{ "$ref": "#/definitions/positiveInteger" }, { "default": 0 }] - }, - "simpleTypes": { - "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "minItems": 1, - "uniqueItems": true - } - }, - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "$schema": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "multipleOf": { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { "$ref": "#/definitions/positiveInteger" }, - "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": {} - }, - "maxItems": { "$ref": "#/definitions/positiveInteger" }, - "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { "$ref": "#/definitions/positiveInteger" }, - "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "dependencies": { - "exclusiveMaximum": ["maximum"], - "exclusiveMinimum": ["minimum"] - }, - "default": {} -}; diff --git a/node_modules/@hyperjump/json-schema/draft-06/contains.js b/node_modules/@hyperjump/json-schema/draft-06/contains.js deleted file mode 100644 index 628fe03e..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/contains.js +++ /dev/null @@ -1,15 +0,0 @@ -import { some } from "@hyperjump/pact"; -import * as Instance from "../lib/instance.js"; -import { Validation } from "../lib/experimental.js"; - - -const id = "https://json-schema.org/keyword/draft-06/contains"; - -const compile = (schema, ast) => Validation.compile(schema, ast); - -const interpret = (contains, instance, context) => { - return Instance.typeOf(instance) !== "array" - || some((item) => Validation.interpret(contains, item, context), Instance.iter(instance)); -}; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/draft-06/format.js b/node_modules/@hyperjump/json-schema/draft-06/format.js deleted file mode 100644 index 5c8cdf23..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/format.js +++ /dev/null @@ -1,34 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-06/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (getShouldValidateFormat() === false) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "email": "https://json-schema.org/format/email", - "hostname": "https://json-schema.org/format/draft-04/hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-06/index.d.ts b/node_modules/@hyperjump/json-schema/draft-06/index.d.ts deleted file mode 100644 index becf03fa..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft06Ref = { - $ref: string; -}; -export type JsonSchemaDraft06Object = { - $schema?: "http://json-schema.org/draft-06/schema#"; - $id?: string; - title?: string; - description?: string; - default?: Json; - examples?: Json[]; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - additionalItems?: JsonSchemaDraft06; - items?: JsonSchemaDraft06 | JsonSchemaDraft06[]; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - contains?: JsonSchemaDraft06; - maxProperties?: number; - minProperties?: number; - required?: string[]; - additionalProperties?: JsonSchemaDraft06; - definitions?: Record; - properties?: Record; - patternProperties?: Record; - dependencies?: Record; - propertyNames?: JsonSchemaDraft06; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "uri-template" | "json-pointer"; - allOf?: JsonSchemaDraft06[]; - anyOf?: JsonSchemaDraft06[]; - oneOf?: JsonSchemaDraft06[]; - not?: JsonSchemaDraft06; -}; -export type JsonSchemaDraft06 = boolean | JsonSchemaDraft06Ref | JsonSchemaDraft06Object; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-06/index.js b/node_modules/@hyperjump/json-schema/draft-06/index.js deleted file mode 100644 index ac8b1a7c..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/index.js +++ /dev/null @@ -1,70 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; - -import metaSchema from "./schema.js"; -import additionalItems from "../draft-04/additionalItems.js"; -import contains from "./contains.js"; -import dependencies from "../draft-04/dependencies.js"; -import id from "../draft-04/id.js"; -import items from "../draft-04/items.js"; -import format from "./format.js"; -import ref from "../draft-04/ref.js"; - - -addKeyword(additionalItems); -addKeyword(dependencies); -addKeyword(contains); -addKeyword(id); -addKeyword(items); -addKeyword(format); -addKeyword(ref); - -const jsonSchemaVersion = "http://json-schema.org/draft-06/schema"; - -defineVocabulary(jsonSchemaVersion, { - "$id": "https://json-schema.org/keyword/draft-04/id", - "$ref": "https://json-schema.org/keyword/draft-04/ref", - "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "const": "https://json-schema.org/keyword/const", - "contains": "https://json-schema.org/keyword/draft-06/contains", - "default": "https://json-schema.org/keyword/default", - "definitions": "https://json-schema.org/keyword/definitions", - "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", - "description": "https://json-schema.org/keyword/description", - "enum": "https://json-schema.org/keyword/enum", - "examples": "https://json-schema.org/keyword/examples", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "format": "https://json-schema.org/keyword/draft-06/format", - "items": "https://json-schema.org/keyword/draft-04/items", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "pattern": "https://json-schema.org/keyword/pattern", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "properties": "https://json-schema.org/keyword/properties", - "propertyNames": "https://json-schema.org/keyword/propertyNames", - "required": "https://json-schema.org/keyword/required", - "title": "https://json-schema.org/keyword/title", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -loadDialect(jsonSchemaVersion, { - [jsonSchemaVersion]: true -}, true); - -registerSchema(metaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-06/schema.js b/node_modules/@hyperjump/json-schema/draft-06/schema.js deleted file mode 100644 index 3ebf9910..00000000 --- a/node_modules/@hyperjump/json-schema/draft-06/schema.js +++ /dev/null @@ -1,154 +0,0 @@ -export default { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "http://json-schema.org/draft-06/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { "$ref": "#/definitions/nonNegativeInteger" }, - { "default": 0 } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - }, - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "examples": { - "type": "array", - "items": {} - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, - "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { "$ref": "#" }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": {} - }, - "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, - "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { "$ref": "#" }, - "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, - "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { "$ref": "#" }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "propertyNames": { "$ref": "#" }, - "const": {}, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "default": {} -}; diff --git a/node_modules/@hyperjump/json-schema/draft-07/format.js b/node_modules/@hyperjump/json-schema/draft-07/format.js deleted file mode 100644 index 0da3477f..00000000 --- a/node_modules/@hyperjump/json-schema/draft-07/format.js +++ /dev/null @@ -1,42 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-07/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (getShouldValidateFormat() === false) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-07/index.d.ts b/node_modules/@hyperjump/json-schema/draft-07/index.d.ts deleted file mode 100644 index 33a0cdcb..00000000 --- a/node_modules/@hyperjump/json-schema/draft-07/index.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft07 = boolean | { - $ref: string; -} | { - $schema?: "http://json-schema.org/draft-07/schema#"; - $id?: string; - $comment?: string; - title?: string; - description?: string; - default?: Json; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - additionalItems?: JsonSchemaDraft07; - items?: JsonSchemaDraft07 | JsonSchemaDraft07[]; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - contains?: JsonSchemaDraft07; - maxProperties?: number; - minProperties?: number; - required?: string[]; - additionalProperties?: JsonSchemaDraft07; - definitions?: Record; - properties?: Record; - patternProperties?: Record; - dependencies?: Record; - propertyNames?: JsonSchemaDraft07; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - format?: "date-time" | "date" | "time" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - if?: JsonSchemaDraft07; - then?: JsonSchemaDraft07; - else?: JsonSchemaDraft07; - allOf?: JsonSchemaDraft07[]; - anyOf?: JsonSchemaDraft07[]; - oneOf?: JsonSchemaDraft07[]; - not?: JsonSchemaDraft07; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-07/index.js b/node_modules/@hyperjump/json-schema/draft-07/index.js deleted file mode 100644 index 0bdbfaa5..00000000 --- a/node_modules/@hyperjump/json-schema/draft-07/index.js +++ /dev/null @@ -1,78 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; - -import metaSchema from "./schema.js"; -import additionalItems from "../draft-04/additionalItems.js"; -import contains from "../draft-06/contains.js"; -import dependencies from "../draft-04/dependencies.js"; -import items from "../draft-04/items.js"; -import id from "../draft-04/id.js"; -import format from "./format.js"; -import ref from "../draft-04/ref.js"; - - -addKeyword(additionalItems); -addKeyword(contains); -addKeyword(dependencies); -addKeyword(id); -addKeyword(items); -addKeyword(format); -addKeyword(ref); - -const jsonSchemaVersion = "http://json-schema.org/draft-07/schema"; - -defineVocabulary(jsonSchemaVersion, { - "$id": "https://json-schema.org/keyword/draft-04/id", - "$ref": "https://json-schema.org/keyword/draft-04/ref", - "$comment": "https://json-schema.org/keyword/comment", - "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "const": "https://json-schema.org/keyword/const", - "contains": "https://json-schema.org/keyword/draft-06/contains", - "contentEncoding": "https://json-schema.org/keyword/contentEncoding", - "contentMediaType": "https://json-schema.org/keyword/contentMediaType", - "default": "https://json-schema.org/keyword/default", - "definitions": "https://json-schema.org/keyword/definitions", - "dependencies": "https://json-schema.org/keyword/draft-04/dependencies", - "description": "https://json-schema.org/keyword/description", - "enum": "https://json-schema.org/keyword/enum", - "examples": "https://json-schema.org/keyword/examples", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "format": "https://json-schema.org/keyword/draft-07/format", - "if": "https://json-schema.org/keyword/if", - "then": "https://json-schema.org/keyword/then", - "else": "https://json-schema.org/keyword/else", - "items": "https://json-schema.org/keyword/draft-04/items", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "pattern": "https://json-schema.org/keyword/pattern", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "properties": "https://json-schema.org/keyword/properties", - "propertyNames": "https://json-schema.org/keyword/propertyNames", - "readOnly": "https://json-schema.org/keyword/readOnly", - "required": "https://json-schema.org/keyword/required", - "title": "https://json-schema.org/keyword/title", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems", - "writeOnly": "https://json-schema.org/keyword/writeOnly" -}); - -loadDialect(jsonSchemaVersion, { - [jsonSchemaVersion]: true -}, true); - -registerSchema(metaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-07/schema.js b/node_modules/@hyperjump/json-schema/draft-07/schema.js deleted file mode 100644 index 83aa3de6..00000000 --- a/node_modules/@hyperjump/json-schema/draft-07/schema.js +++ /dev/null @@ -1,172 +0,0 @@ -export default { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://json-schema.org/draft-07/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { "$ref": "#/definitions/nonNegativeInteger" }, - { "default": 0 } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - }, - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, - "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { "$ref": "#" }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": true - }, - "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, - "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { "$ref": "#" }, - "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, - "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { "$ref": "#" }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "propertyNames": { "$ref": "#" }, - "const": true, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "if": { "$ref": "#" }, - "then": { "$ref": "#" }, - "else": { "$ref": "#" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "default": true -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js deleted file mode 100644 index 4f884d29..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/format-assertion.js +++ /dev/null @@ -1,44 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-2019-09/format-assertion"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (getShouldValidateFormat() === false) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "duration": "https://json-schema.org/format/duration", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uuid": "https://json-schema.org/format/uuid", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/format.js b/node_modules/@hyperjump/json-schema/draft-2019-09/format.js deleted file mode 100644 index 2129b595..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/format.js +++ /dev/null @@ -1,44 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-2019-09/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (!getShouldValidateFormat()) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "duration": "https://json-schema.org/format/duration", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uuid": "https://json-schema.org/format/uuid", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts b/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts deleted file mode 100644 index 6b332238..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/index.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft201909Object = { - $schema?: "https://json-schema.org/draft/2019-09/schema"; - $id?: string; - $anchor?: string; - $ref?: string; - $recursiveRef?: "#"; - $recursiveAnchor?: boolean; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: JsonSchemaDraft201909; - unevaluatedItems?: JsonSchemaDraft201909; - items?: JsonSchemaDraft201909 | JsonSchemaDraft201909[]; - contains?: JsonSchemaDraft201909; - additionalProperties?: JsonSchemaDraft201909; - unevaluatedProperties?: JsonSchemaDraft201909; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: JsonSchemaDraft201909; - if?: JsonSchemaDraft201909; - then?: JsonSchemaDraft201909; - else?: JsonSchemaDraft201909; - allOf?: JsonSchemaDraft201909[]; - anyOf?: JsonSchemaDraft201909[]; - oneOf?: JsonSchemaDraft201909[]; - not?: JsonSchemaDraft201909; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: JsonSchemaDraft201909; -}; -export type JsonSchemaDraft201909 = boolean | JsonSchemaDraft201909Object; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/index.js b/node_modules/@hyperjump/json-schema/draft-2019-09/index.js deleted file mode 100644 index 8abfa4e6..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/index.js +++ /dev/null @@ -1,118 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; - -import metaSchema from "./schema.js"; -import coreMetaSchema from "./meta/core.js"; -import applicatorMetaSchema from "./meta/applicator.js"; -import validationMetaSchema from "./meta/validation.js"; -import metaDataMetaSchema from "./meta/meta-data.js"; -import formatMetaSchema from "./meta/format.js"; -import contentMetaSchema from "./meta/content.js"; - -import additionalItems from "../draft-04/additionalItems.js"; -import items from "../draft-04/items.js"; -import formatAssertion from "./format-assertion.js"; -import format from "./format.js"; -import recursiveAnchor from "./recursiveAnchor.js"; -import recursiveRef from "../draft-2020-12/dynamicRef.js"; - - -addKeyword(additionalItems); -addKeyword(items); -addKeyword(formatAssertion); -addKeyword(format); -addKeyword(recursiveAnchor); -addKeyword(recursiveRef); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/core", { - "$anchor": "https://json-schema.org/keyword/anchor", - "$comment": "https://json-schema.org/keyword/comment", - "$defs": "https://json-schema.org/keyword/definitions", - "$recursiveAnchor": "https://json-schema.org/keyword/draft-2019-09/recursiveAnchor", - "$recursiveRef": "https://json-schema.org/keyword/draft-2020-12/dynamicRef", - "$id": "https://json-schema.org/keyword/id", - "$ref": "https://json-schema.org/keyword/ref", - "$vocabulary": "https://json-schema.org/keyword/vocabulary" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/applicator", { - "additionalItems": "https://json-schema.org/keyword/draft-04/additionalItems", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "contains": "https://json-schema.org/keyword/contains", - "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", - "if": "https://json-schema.org/keyword/if", - "then": "https://json-schema.org/keyword/then", - "else": "https://json-schema.org/keyword/else", - "items": "https://json-schema.org/keyword/draft-04/items", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "properties": "https://json-schema.org/keyword/properties", - "propertyNames": "https://json-schema.org/keyword/propertyNames", - "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", - "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/validation", { - "const": "https://json-schema.org/keyword/const", - "enum": "https://json-schema.org/keyword/enum", - "dependentRequired": "https://json-schema.org/keyword/dependentRequired", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "maxContains": "https://json-schema.org/keyword/maxContains", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minContains": "https://json-schema.org/keyword/minContains", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "pattern": "https://json-schema.org/keyword/pattern", - "required": "https://json-schema.org/keyword/required", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/meta-data", { - "default": "https://json-schema.org/keyword/default", - "deprecated": "https://json-schema.org/keyword/deprecated", - "description": "https://json-schema.org/keyword/description", - "examples": "https://json-schema.org/keyword/examples", - "readOnly": "https://json-schema.org/keyword/readOnly", - "title": "https://json-schema.org/keyword/title", - "writeOnly": "https://json-schema.org/keyword/writeOnly" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/format", { - "format": "https://json-schema.org/keyword/draft-2019-09/format-assertion" -}); - -defineVocabulary("https://json-schema.org/draft/2019-09/vocab/content", { - "contentEncoding": "https://json-schema.org/keyword/contentEncoding", - "contentMediaType": "https://json-schema.org/keyword/contentMediaType", - "contentSchema": "https://json-schema.org/keyword/contentSchema" -}); - -loadDialect("https://json-schema.org/draft/2019-09/schema", { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true, - "https://json-schema.org/draft/2019-09/vocab/validation": true, - "https://json-schema.org/draft/2019-09/vocab/meta-data": true, - "https://json-schema.org/draft/2019-09/vocab/format": true, - "https://json-schema.org/draft/2019-09/vocab/content": true -}, true); - -registerSchema(metaSchema); -registerSchema(coreMetaSchema); -registerSchema(applicatorMetaSchema); -registerSchema(validationMetaSchema); -registerSchema(metaDataMetaSchema); -registerSchema(formatMetaSchema); -registerSchema(contentMetaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js deleted file mode 100644 index 3ff97a46..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/applicator.js +++ /dev/null @@ -1,55 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/applicator", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/applicator": true - }, - "$recursiveAnchor": true, - - "title": "Applicator vocabulary meta-schema", - "properties": { - "additionalItems": { "$recursiveRef": "#" }, - "unevaluatedItems": { "$recursiveRef": "#" }, - "items": { - "anyOf": [ - { "$recursiveRef": "#" }, - { "$ref": "#/$defs/schemaArray" } - ] - }, - "contains": { "$recursiveRef": "#" }, - "additionalProperties": { "$recursiveRef": "#" }, - "unevaluatedProperties": { "$recursiveRef": "#" }, - "properties": { - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - }, - "propertyNames": { "$recursiveRef": "#" }, - "if": { "$recursiveRef": "#" }, - "then": { "$recursiveRef": "#" }, - "else": { "$recursiveRef": "#" }, - "allOf": { "$ref": "#/$defs/schemaArray" }, - "anyOf": { "$ref": "#/$defs/schemaArray" }, - "oneOf": { "$ref": "#/$defs/schemaArray" }, - "not": { "$recursiveRef": "#" } - }, - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$recursiveRef": "#" } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js deleted file mode 100644 index c62760f3..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/content.js +++ /dev/null @@ -1,17 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/content", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/content": true - }, - "$recursiveAnchor": true, - - "title": "Content vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "contentSchema": { "$recursiveRef": "#" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js deleted file mode 100644 index ea5fefa1..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/core.js +++ /dev/null @@ -1,57 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/core", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true - }, - "$recursiveAnchor": true, - - "title": "Core vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$anchor": { - "type": "string", - "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$recursiveRef": { - "type": "string", - "format": "uri-reference" - }, - "$recursiveAnchor": { - "type": "boolean", - "default": false - }, - "$vocabulary": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { - "type": "string" - }, - "$defs": { - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "default": {} - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js deleted file mode 100644 index 888ddf1b..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/format.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/format", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/format": true - }, - "$recursiveAnchor": true, - - "title": "Format vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "format": { "type": "string" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js deleted file mode 100644 index 63f0c4c2..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/meta-data.js +++ /dev/null @@ -1,37 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/meta-data", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/meta-data": true - }, - "$recursiveAnchor": true, - - "title": "Meta-data vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "deprecated": { - "type": "boolean", - "default": false - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js b/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js deleted file mode 100644 index 5dec0619..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/meta/validation.js +++ /dev/null @@ -1,98 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2019-09/meta/validation", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/validation": true - }, - "$recursiveAnchor": true, - - "title": "Validation vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/$defs/stringArray" }, - "dependentRequired": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "type": { - "anyOf": [ - { "$ref": "#/$defs/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/$defs/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js b/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js deleted file mode 100644 index c2e74085..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/recursiveAnchor.js +++ /dev/null @@ -1 +0,0 @@ -export default { id: "https://json-schema.org/keyword/draft-2019-09/recursiveAnchor" }; diff --git a/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js b/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js deleted file mode 100644 index 76add3e1..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2019-09/schema.js +++ /dev/null @@ -1,42 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true, - "https://json-schema.org/draft/2019-09/vocab/validation": true, - "https://json-schema.org/draft/2019-09/vocab/meta-data": true, - "https://json-schema.org/draft/2019-09/vocab/format": false, - "https://json-schema.org/draft/2019-09/vocab/content": true - }, - "$recursiveAnchor": true, - - "title": "Core and Validation specifications meta-schema", - "allOf": [ - { "$ref": "meta/core" }, - { "$ref": "meta/applicator" }, - { "$ref": "meta/validation" }, - { "$ref": "meta/meta-data" }, - { "$ref": "meta/format" }, - { "$ref": "meta/content" } - ], - "type": ["object", "boolean"], - "properties": { - "definitions": { - "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "default": {} - }, - "dependencies": { - "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$recursiveRef": "#" }, - { "$ref": "meta/validation#/$defs/stringArray" } - ] - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js deleted file mode 100644 index 0e49b934..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicAnchor.js +++ /dev/null @@ -1 +0,0 @@ -export default { id: "https://json-schema.org/keyword/draft-2020-12/dynamicAnchor" }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js b/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js deleted file mode 100644 index a5f2581b..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/dynamicRef.js +++ /dev/null @@ -1,38 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import { Validation, canonicalUri } from "../lib/experimental.js"; -import { toAbsoluteUri, uriFragment } from "../lib/common.js"; - - -const id = "https://json-schema.org/keyword/draft-2020-12/dynamicRef"; - -const compile = async (dynamicRef, ast) => { - const fragment = uriFragment(Browser.value(dynamicRef)); - const referencedSchema = await Browser.get(Browser.value(dynamicRef), dynamicRef); - await Validation.compile(referencedSchema, ast); - return [referencedSchema.document.baseUri, fragment, canonicalUri(referencedSchema)]; -}; - -const interpret = ([id, fragment, ref], instance, context) => { - if (fragment in context.ast.metaData[id].dynamicAnchors) { - context.dynamicAnchors = { ...context.ast.metaData[id].dynamicAnchors, ...context.dynamicAnchors }; - return Validation.interpret(context.dynamicAnchors[fragment], instance, context); - } else { - return Validation.interpret(ref, instance, context); - } -}; - -const simpleApplicator = true; - -const plugin = { - beforeSchema(url, _instance, context) { - context.dynamicAnchors = { - ...context.ast.metaData[toAbsoluteUri(url)].dynamicAnchors, - ...context.dynamicAnchors - }; - }, - beforeKeyword(_url, _instance, context, schemaContext) { - context.dynamicAnchors = schemaContext.dynamicAnchors; - } -}; - -export default { id, compile, interpret, simpleApplicator, plugin }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js deleted file mode 100644 index 2eecf321..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/format-assertion.js +++ /dev/null @@ -1,43 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-2020-12/format-assertion"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - const handler = getFormatHandler(formats[format]); - if (!handler) { - throw Error(`The '${format}' format is not supported.`); - } - - return handler(Instance.value(instance)); -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "duration": "https://json-schema.org/format/duration", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uuid": "https://json-schema.org/format/uuid", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/format.js b/node_modules/@hyperjump/json-schema/draft-2020-12/format.js deleted file mode 100644 index d1550e2a..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/format.js +++ /dev/null @@ -1,44 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getShouldValidateFormat } from "../lib/configuration.js"; -import { getFormatHandler } from "../lib/keywords.js"; - - -const id = "https://json-schema.org/keyword/draft-2020-12/format"; - -const compile = (schema) => Browser.value(schema); - -const interpret = (format, instance) => { - if (!getShouldValidateFormat()) { - return true; - } - - const handler = getFormatHandler(formats[format]); - return handler?.(Instance.value(instance)) ?? true; -}; - -const annotation = (format) => format; - -const formats = { - "date-time": "https://json-schema.org/format/date-time", - "date": "https://json-schema.org/format/date", - "time": "https://json-schema.org/format/time", - "duration": "https://json-schema.org/format/duration", - "email": "https://json-schema.org/format/email", - "idn-email": "https://json-schema.org/format/idn-email", - "hostname": "https://json-schema.org/format/hostname", - "idn-hostname": "https://json-schema.org/format/idn-hostname", - "ipv4": "https://json-schema.org/format/ipv4", - "ipv6": "https://json-schema.org/format/ipv6", - "uri": "https://json-schema.org/format/uri", - "uri-reference": "https://json-schema.org/format/uri-reference", - "iri": "https://json-schema.org/format/iri", - "iri-reference": "https://json-schema.org/format/iri-reference", - "uuid": "https://json-schema.org/format/uuid", - "uri-template": "https://json-schema.org/format/uri-template", - "json-pointer": "https://json-schema.org/format/json-pointer", - "relative-json-pointer": "https://json-schema.org/format/relative-json-pointer", - "regex": "https://json-schema.org/format/regex" -}; - -export default { id, compile, interpret, annotation, formats }; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts b/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts deleted file mode 100644 index 75f26f9d..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/index.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaDraft202012Object = { - $schema?: "https://json-schema.org/draft/2020-12/schema"; - $id?: string; - $anchor?: string; - $ref?: string; - $dynamicRef?: string; - $dynamicAnchor?: string; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: JsonSchemaDraft202012; - unevaluatedItems?: JsonSchemaDraft202012; - prefixItems?: JsonSchemaDraft202012[]; - items?: JsonSchemaDraft202012; - contains?: JsonSchemaDraft202012; - additionalProperties?: JsonSchemaDraft202012; - unevaluatedProperties?: JsonSchemaDraft202012; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: JsonSchemaDraft202012; - if?: JsonSchemaDraft202012; - then?: JsonSchemaDraft202012; - else?: JsonSchemaDraft202012; - allOf?: JsonSchemaDraft202012[]; - anyOf?: JsonSchemaDraft202012[]; - oneOf?: JsonSchemaDraft202012[]; - not?: JsonSchemaDraft202012; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: JsonSchemaDraft202012; -}; -export type JsonSchemaDraft202012 = boolean | JsonSchemaDraft202012Object; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/index.js b/node_modules/@hyperjump/json-schema/draft-2020-12/index.js deleted file mode 100644 index 971a7391..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/index.js +++ /dev/null @@ -1,126 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; - -import metaSchema from "./schema.js"; -import coreMetaSchema from "./meta/core.js"; -import applicatorMetaSchema from "./meta/applicator.js"; -import validationMetaSchema from "./meta/validation.js"; -import metaDataMetaSchema from "./meta/meta-data.js"; -import formatAnnotationMetaSchema from "./meta/format-annotation.js"; -import formatAssertionMetaSchema from "./meta/format-assertion.js"; -import contentMetaSchema from "./meta/content.js"; -import unevaluatedMetaSchema from "./meta/unevaluated.js"; - -import dynamicAnchor from "./dynamicAnchor.js"; -import dynamicRef from "./dynamicRef.js"; -import format from "./format.js"; -import formatAssertion from "./format-assertion.js"; - - -addKeyword(dynamicRef); -addKeyword(dynamicAnchor); -addKeyword(format); -addKeyword(formatAssertion); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/core", { - "$anchor": "https://json-schema.org/keyword/anchor", - "$comment": "https://json-schema.org/keyword/comment", - "$defs": "https://json-schema.org/keyword/definitions", - "$dynamicAnchor": "https://json-schema.org/keyword/draft-2020-12/dynamicAnchor", - "$dynamicRef": "https://json-schema.org/keyword/draft-2020-12/dynamicRef", - "$id": "https://json-schema.org/keyword/id", - "$ref": "https://json-schema.org/keyword/ref", - "$vocabulary": "https://json-schema.org/keyword/vocabulary" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/applicator", { - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "contains": "https://json-schema.org/keyword/contains", - "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", - "if": "https://json-schema.org/keyword/if", - "then": "https://json-schema.org/keyword/then", - "else": "https://json-schema.org/keyword/else", - "items": "https://json-schema.org/keyword/items", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "prefixItems": "https://json-schema.org/keyword/prefixItems", - "properties": "https://json-schema.org/keyword/properties", - "propertyNames": "https://json-schema.org/keyword/propertyNames" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/validation", { - "const": "https://json-schema.org/keyword/const", - "dependentRequired": "https://json-schema.org/keyword/dependentRequired", - "enum": "https://json-schema.org/keyword/enum", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "maxContains": "https://json-schema.org/keyword/maxContains", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minContains": "https://json-schema.org/keyword/minContains", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "pattern": "https://json-schema.org/keyword/pattern", - "required": "https://json-schema.org/keyword/required", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/meta-data", { - "default": "https://json-schema.org/keyword/default", - "deprecated": "https://json-schema.org/keyword/deprecated", - "description": "https://json-schema.org/keyword/description", - "examples": "https://json-schema.org/keyword/examples", - "readOnly": "https://json-schema.org/keyword/readOnly", - "title": "https://json-schema.org/keyword/title", - "writeOnly": "https://json-schema.org/keyword/writeOnly" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/format-annotation", { - "format": "https://json-schema.org/keyword/draft-2020-12/format" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/format-assertion", { - "format": "https://json-schema.org/keyword/draft-2020-12/format-assertion" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/content", { - "contentEncoding": "https://json-schema.org/keyword/contentEncoding", - "contentMediaType": "https://json-schema.org/keyword/contentMediaType", - "contentSchema": "https://json-schema.org/keyword/contentSchema" -}); - -defineVocabulary("https://json-schema.org/draft/2020-12/vocab/unevaluated", { - "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", - "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" -}); - -loadDialect("https://json-schema.org/draft/2020-12/schema", { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true -}, true); - -registerSchema(metaSchema); -registerSchema(coreMetaSchema); -registerSchema(applicatorMetaSchema); -registerSchema(validationMetaSchema); -registerSchema(metaDataMetaSchema); -registerSchema(formatAnnotationMetaSchema); -registerSchema(formatAssertionMetaSchema); -registerSchema(contentMetaSchema); -registerSchema(unevaluatedMetaSchema); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js deleted file mode 100644 index cce8a3a2..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/applicator.js +++ /dev/null @@ -1,46 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/applicator", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "prefixItems": { "$ref": "#/$defs/schemaArray" }, - "items": { "$dynamicRef": "#meta" }, - "contains": { "$dynamicRef": "#meta" }, - "additionalProperties": { "$dynamicRef": "#meta" }, - "properties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "propertyNames": { "$dynamicRef": "#meta" }, - "if": { "$dynamicRef": "#meta" }, - "then": { "$dynamicRef": "#meta" }, - "else": { "$dynamicRef": "#meta" }, - "allOf": { "$ref": "#/$defs/schemaArray" }, - "anyOf": { "$ref": "#/$defs/schemaArray" }, - "oneOf": { "$ref": "#/$defs/schemaArray" }, - "not": { "$dynamicRef": "#meta" } - }, - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$dynamicRef": "#meta" } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js deleted file mode 100644 index f6bd4171..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/content.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/content", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Content vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "contentSchema": { "$dynamicRef": "#meta" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js deleted file mode 100644 index f2473e40..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/core.js +++ /dev/null @@ -1,54 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/core", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Core vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$anchor": { - "type": "string", - "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$dynamicRef": { - "type": "string", - "format": "uri-reference" - }, - "$dynamicAnchor": { - "type": "string", - "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" - }, - "$vocabulary": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { - "type": "string" - }, - "$defs": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "default": {} - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js deleted file mode 100644 index 4d7675d6..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-annotation.js +++ /dev/null @@ -1,11 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Format vocabulary meta-schema for annotation results", - "type": ["object", "boolean"], - "properties": { - "format": { "type": "string" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js deleted file mode 100644 index 09248f38..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/format-assertion.js +++ /dev/null @@ -1,11 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/format-assertion", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Format vocabulary meta-schema for assertion results", - "type": ["object", "boolean"], - "properties": { - "format": { "type": "string" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js deleted file mode 100644 index 7da3361f..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/meta-data.js +++ /dev/null @@ -1,34 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/meta-data", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Meta-data vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "deprecated": { - "type": "boolean", - "default": false - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js deleted file mode 100644 index 1a9ab172..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/unevaluated.js +++ /dev/null @@ -1,12 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Unevaluated applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "unevaluatedItems": { "$dynamicRef": "#meta" }, - "unevaluatedProperties": { "$dynamicRef": "#meta" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js b/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js deleted file mode 100644 index 944ea40a..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/meta/validation.js +++ /dev/null @@ -1,95 +0,0 @@ -export default { - "$id": "https://json-schema.org/draft/2020-12/meta/validation", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "Validation vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/$defs/stringArray" }, - "dependentRequired": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "type": { - "anyOf": [ - { "$ref": "#/$defs/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/$defs/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js b/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js deleted file mode 100644 index d01a036d..00000000 --- a/node_modules/@hyperjump/json-schema/draft-2020-12/schema.js +++ /dev/null @@ -1,44 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - "$dynamicAnchor": "meta", - - "title": "Core and Validation specifications meta-schema", - "allOf": [ - { "$ref": "meta/core" }, - { "$ref": "meta/applicator" }, - { "$ref": "meta/unevaluated" }, - { "$ref": "meta/validation" }, - { "$ref": "meta/meta-data" }, - { "$ref": "meta/format-annotation" }, - { "$ref": "meta/content" } - ], - "type": ["object", "boolean"], - "properties": { - "definitions": { - "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "default": {} - }, - "dependencies": { - "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$dynamicRef": "#meta" }, - { "$ref": "meta/validation#/$defs/stringArray" } - ] - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js b/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js deleted file mode 100644 index 50901147..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/date-time.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isDateTime } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/date-time", - handler: (dateTime) => typeof dateTime !== "string" || isDateTime(dateTime) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/date.js b/node_modules/@hyperjump/json-schema/formats/handlers/date.js deleted file mode 100644 index 3c7de2ba..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/date.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isDate } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/date", - handler: (date) => typeof date !== "string" || isDate(date) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js deleted file mode 100644 index 02344e4f..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/draft-04/hostname.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isAsciiIdn } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/draft-04/hostname", - handler: (hostname) => typeof hostname !== "string" || isAsciiIdn(hostname) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/duration.js b/node_modules/@hyperjump/json-schema/formats/handlers/duration.js deleted file mode 100644 index 33d21220..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/duration.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isDuration } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/duration", - handler: (duration) => typeof duration !== "string" || isDuration(duration) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/email.js b/node_modules/@hyperjump/json-schema/formats/handlers/email.js deleted file mode 100644 index c335b627..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/email.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isEmail } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/email", - handler: (email) => typeof email !== "string" || isEmail(email) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js deleted file mode 100644 index 43b79a34..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/hostname.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isAsciiIdn } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/hostname", - handler: (hostname) => typeof hostname !== "string" || isAsciiIdn(hostname) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js b/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js deleted file mode 100644 index c12e42a4..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/idn-email.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIdnEmail } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/idn-email", - handler: (email) => typeof email !== "string" || isIdnEmail(email) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js b/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js deleted file mode 100644 index b790e251..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/idn-hostname.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIdn } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/idn-hostname", - handler: (hostname) => typeof hostname !== "string" || isIdn(hostname) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js b/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js deleted file mode 100644 index bdc5c35a..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/ipv4.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIPv4 } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/ipv4", - handler: (ip) => typeof ip !== "string" || isIPv4(ip) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js b/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js deleted file mode 100644 index 69d785d2..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/ipv6.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIPv6 } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/ipv6", - handler: (ip) => typeof ip !== "string" || isIPv6(ip) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js b/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js deleted file mode 100644 index 0b4c6836..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/iri-reference.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIriReference } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/iri-reference", - handler: (uri) => typeof uri !== "string" || isIriReference(uri) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/iri.js b/node_modules/@hyperjump/json-schema/formats/handlers/iri.js deleted file mode 100644 index e6a34efb..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/iri.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isIri } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/iri", - handler: (uri) => typeof uri !== "string" || isIri(uri) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js b/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js deleted file mode 100644 index 1ab64048..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/json-pointer.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isJsonPointer } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/json-pointer", - handler: (pointer) => typeof pointer !== "string" || isJsonPointer(pointer) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/regex.js b/node_modules/@hyperjump/json-schema/formats/handlers/regex.js deleted file mode 100644 index c6ebca60..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/regex.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isRegex } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/regex", - handler: (regex) => typeof regex !== "string" || isRegex(regex) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js b/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js deleted file mode 100644 index e8fe386a..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/relative-json-pointer.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isRelativeJsonPointer } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/relative-json-pointer", - handler: (pointer) => typeof pointer !== "string" || isRelativeJsonPointer(pointer) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/time.js b/node_modules/@hyperjump/json-schema/formats/handlers/time.js deleted file mode 100644 index c98d5b2f..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/time.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isTime } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/time", - handler: (time) => typeof time !== "string" || isTime(time) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js deleted file mode 100644 index 4cb2f1ba..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/uri-reference.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isUriReference } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/uri-reference", - handler: (uri) => typeof uri !== "string" || isUriReference(uri) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js deleted file mode 100644 index 94febf40..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/uri-template.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isUriTemplate } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/uri-template", - handler: (uriTemplate) => typeof uriTemplate !== "string" || isUriTemplate(uriTemplate) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uri.js b/node_modules/@hyperjump/json-schema/formats/handlers/uri.js deleted file mode 100644 index af883d85..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/uri.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isUri } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/uri", - handler: (uri) => typeof uri !== "string" || isUri(uri) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js b/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js deleted file mode 100644 index c25de033..00000000 --- a/node_modules/@hyperjump/json-schema/formats/handlers/uuid.js +++ /dev/null @@ -1,7 +0,0 @@ -import { isUuid } from "@hyperjump/json-schema-formats"; - - -export default { - id: "https://json-schema.org/format/uuid", - handler: (uuid) => typeof uuid !== "string" || isUuid(uuid) -}; diff --git a/node_modules/@hyperjump/json-schema/formats/index.js b/node_modules/@hyperjump/json-schema/formats/index.js deleted file mode 100644 index c613edf0..00000000 --- a/node_modules/@hyperjump/json-schema/formats/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import { addFormat } from "../lib/keywords.js"; -import "./lite.js"; - -import idnEmail from "./handlers/idn-email.js"; -import hostname from "./handlers/hostname.js"; -import idnHostname from "./handlers/idn-hostname.js"; - - -addFormat(idnEmail); -addFormat(hostname); -addFormat(idnHostname); diff --git a/node_modules/@hyperjump/json-schema/formats/lite.js b/node_modules/@hyperjump/json-schema/formats/lite.js deleted file mode 100644 index f1d6aa64..00000000 --- a/node_modules/@hyperjump/json-schema/formats/lite.js +++ /dev/null @@ -1,38 +0,0 @@ -import { addFormat } from "../lib/keywords.js"; - -import draft04Hostname from "./handlers/draft-04/hostname.js"; -import dateTime from "./handlers/date-time.js"; -import date from "./handlers/date.js"; -import time from "./handlers/time.js"; -import duration from "./handlers/duration.js"; -import email from "./handlers/email.js"; -import ipv4 from "./handlers/ipv4.js"; -import ipv6 from "./handlers/ipv6.js"; -import uri from "./handlers/uri.js"; -import uriReference from "./handlers/uri-reference.js"; -import iri from "./handlers/iri.js"; -import iriReference from "./handlers/iri-reference.js"; -import uuid from "./handlers/uuid.js"; -import uriTemplate from "./handlers/uri-template.js"; -import jsonPointer from "./handlers/json-pointer.js"; -import relativeJsonPointer from "./handlers/relative-json-pointer.js"; -import regex from "./handlers/regex.js"; - - -addFormat(draft04Hostname); -addFormat(dateTime); -addFormat(date); -addFormat(time); -addFormat(duration); -addFormat(email); -addFormat(ipv4); -addFormat(ipv6); -addFormat(uri); -addFormat(uriReference); -addFormat(iri); -addFormat(iriReference); -addFormat(uuid); -addFormat(uriTemplate); -addFormat(jsonPointer); -addFormat(relativeJsonPointer); -addFormat(regex); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js b/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js deleted file mode 100644 index 82a59522..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/dialect.js +++ /dev/null @@ -1,174 +0,0 @@ -export default { - "id": "https://spec.openapis.org/oas/3.0/dialect", - "$schema": "http://json-schema.org/draft-04/schema#", - - "type": "object", - "properties": { - "title": { "type": "string" }, - "multipleOf": { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - "maximum": { "type": "number" }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { "type": "number" }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { "$ref": "#/definitions/positiveInteger" }, - "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/definitions/positiveInteger" }, - "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { "$ref": "#/definitions/positiveInteger" }, - "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "required": { - "type": "array", - "items": { "type": "string" }, - "minItems": 1, - "uniqueItems": true - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": false - }, - "type": { "enum": ["array", "boolean", "integer", "number", "object", "string"] }, - "not": { "$ref": "#" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "items": { "$ref": "#" }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" } - }, - "additionalProperties": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, - "description": { "type": "string" }, - "format": { "type": "string" }, - "default": {}, - "nullable": { - "type": "boolean", - "default": false - }, - "discriminator": { "$ref": "#/definitions/Discriminator" }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "example": {}, - "externalDocs": { "$ref": "#/definitions/ExternalDocumentation" }, - "deprecated": { - "type": "boolean", - "default": false - }, - "xml": { "$ref": "#/definitions/XML" }, - "$ref": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false, - - "anyOf": [ - { - "not": { "required": ["$ref"] } - }, - { "maxProperties": 1 } - ], - - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "positiveInteger": { - "type": "integer", - "minimum": 0 - }, - "positiveIntegerDefault0": { - "allOf": [{ "$ref": "#/definitions/positiveInteger" }, { "default": 0 }] - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ExternalDocumentation": { - "type": "object", - "required": ["url"], - "properties": { - "description": { "type": "string" }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "XML": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { "type": "string" }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js b/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js deleted file mode 100644 index f45aa21d..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/discriminator.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/discriminator"; - -const compile = (schema) => Browser.value(schema); -const interpret = () => true; -const annotation = (discriminator) => discriminator; - -export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/example.js b/node_modules/@hyperjump/json-schema/openapi-3-0/example.js deleted file mode 100644 index 98bc5869..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/example.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/example"; - -const compile = (schema) => Browser.value(schema); -const interpret = () => true; -const annotation = (example) => example; - -export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js b/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js deleted file mode 100644 index bfee8163..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/externalDocs.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/externalDocs"; - -const compile = (schema) => Browser.value(schema); -const interpret = () => true; -const annotation = (externalDocs) => externalDocs; - -export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts deleted file mode 100644 index 825de2a2..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/index.d.ts +++ /dev/null @@ -1,298 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type OasSchema30 = { - $ref: string; -} | { - title?: string; - description?: string; - default?: Json; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: boolean; - minimum?: number; - exclusiveMinimum?: boolean; - maxLength?: number; - minLength?: number; - pattern?: string; - items?: OasSchema30; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxProperties?: number; - minProperties?: number; - required?: string[]; - additionalProperties?: boolean | OasSchema30; - properties?: Record; - enum?: Json[]; - type?: JsonSchemaType; - nullable?: boolean; - format?: "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "uri" | "int32" | "int64" | "float" | "double" | "byte" | "binary" | "date" | "password"; - allOf?: OasSchema30[]; - anyOf?: OasSchema30[]; - oneOf?: OasSchema30[]; - not?: OasSchema30; - example?: Json; - discriminator?: Discriminator; - externalDocs?: ExternalDocs; - xml?: Xml; -}; - -type Discriminator = { - propertyName: string; - mappings?: Record; -}; - -type ExternalDocs = { - url: string; - description?: string; -}; - -type Xml = { - name?: string; - namespace?: string; - prefix?: string; - attribute?: boolean; - wrapped?: boolean; -}; - -export type OpenApi30 = { - openapi: string; - info: Info; - externalDocs?: ExternalDocs; - servers?: Server[]; - security?: SecurityRequirement[]; - tags?: Tag[]; - paths: Paths; - components?: Components; -}; - -type Reference = { - $ref: "string"; -}; - -type Info = { - title: string; - description?: string; - termsOfService?: string; - contact?: Contact; - license?: License; - version: string; -}; - -type Contact = { - name?: string; - url?: string; - email?: string; -}; - -type License = { - name: string; - url?: string; -}; - -type Server = { - url: string; - description?: string; - variables?: Record; -}; - -type ServerVariable = { - enum?: string[]; - default: string; - description?: string; -}; - -type Components = { - schemas?: Record; - responses?: Record; - parameters?: Record; - examples?: Record; - requestBodies?: Record; - headers?: Record; - securitySchemes: Record; - links: Record; - callbacks: Record; -}; - -type Response = { - description: string; - headers?: Record; - content?: Record; - links?: Record; -}; - -type MediaType = { - schema?: OasSchema30; - example?: unknown; - examples?: Record; - encoding?: Record; -}; - -type Example = { - summary?: string; - description?: string; - value?: unknown; - externalValue?: string; -}; - -type Header = { - description?: string; - required?: boolean; - deprecated?: boolean; - allowEmptyValue?: boolean; - style?: "simple"; - explode?: boolean; - allowReserved?: boolean; - schema?: OasSchema30; - content?: Record; - example?: unknown; - examples: Record; -}; - -type Paths = Record; - -type PathItem = { - $ref?: string; - summary?: string; - description?: string; - servers: Server[]; - parameters: (Parameter | Reference)[]; - get?: Operation; - put?: Operation; - post?: Operation; - delete?: Operation; - options?: Operation; - head?: Operation; - patch?: Operation; - trace?: Operation; -}; - -type Operation = { - tags?: string[]; - summary?: string; - description?: string; - externalDocs?: ExternalDocs; - operationId?: string; - parameters?: (Parameter | Reference)[]; - requestBody?: RequestBody | Reference; - responses: Responses; - callbacks?: Record; - deprecated?: boolean; - security?: SecurityRequirement[]; - servers?: Server[]; -}; - -type Responses = Record; - -type SecurityRequirement = Record; - -type Tag = { - name: string; - description?: string; - externalDocs?: ExternalDocs; -}; - -type Parameter = { - name: string; - in: string; - description?: string; - required?: boolean; - deprecated?: boolean; - allowEmptyValue?: boolean; - style?: string; - explode?: boolean; - allowReserved?: boolean; - schema?: OasSchema30; - content?: Record; - example?: unknown; - examples?: Record; -}; - -type RequestBody = { - description?: string; - content: Record; - required?: boolean; -}; - -type SecurityScheme = APIKeySecurityScheme | HTTPSecurityScheme | OAuth2SecurityScheme | OpenIdConnectSecurityScheme; - -type APIKeySecurityScheme = { - type: "apiKey"; - name: string; - in: "header" | "query" | "cookie"; - description?: string; -}; - -type HTTPSecurityScheme = { - scheme: string; - bearerFormat?: string; - description?: string; - type: "http"; -}; - -type OAuth2SecurityScheme = { - type: "oauth2"; - flows: OAuthFlows; - description?: string; -}; - -type OpenIdConnectSecurityScheme = { - type: "openIdConnect"; - openIdConnectUrl: string; - description?: string; -}; - -type OAuthFlows = { - implicit?: ImplicitOAuthFlow; - password?: PasswordOAuthFlow; - clientCredentials?: ClientCredentialsFlow; - authorizationCode?: AuthorizationCodeOAuthFlow; -}; - -type ImplicitOAuthFlow = { - authorizationUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type PasswordOAuthFlow = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type ClientCredentialsFlow = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type AuthorizationCodeOAuthFlow = { - authorizationUrl: string; - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type Link = { - operationId?: string; - operationRef?: string; - parameters?: Record; - requestBody?: unknown; - description?: string; - server?: Server; -}; - -type Callback = Record; - -type Encoding = { - contentType?: string; - headers?: Record; - style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; - explode?: boolean; - allowReserved?: boolean; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/index.js b/node_modules/@hyperjump/json-schema/openapi-3-0/index.js deleted file mode 100644 index d75b9009..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/index.js +++ /dev/null @@ -1,77 +0,0 @@ -import { addKeyword, defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import "../lib/openapi.js"; - -import dialectSchema from "./dialect.js"; -import schema from "./schema.js"; - -import discriminator from "./discriminator.js"; -import example from "./example.js"; -import externalDocs from "./externalDocs.js"; -import nullable from "./nullable.js"; -import type from "./type.js"; -import xml from "./xml.js"; - - -export * from "../draft-04/index.js"; - -addKeyword(discriminator); -addKeyword(example); -addKeyword(externalDocs); -addKeyword(nullable); -addKeyword(type); -addKeyword(xml); - -const jsonSchemaVersion = "https://spec.openapis.org/oas/3.0/dialect"; - -defineVocabulary(jsonSchemaVersion, { - "$ref": "https://json-schema.org/keyword/draft-04/ref", - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "default": "https://json-schema.org/keyword/default", - "deprecated": "https://json-schema.org/keyword/deprecated", - "description": "https://json-schema.org/keyword/description", - "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", - "enum": "https://json-schema.org/keyword/enum", - "example": "https://spec.openapis.org/oas/3.0/keyword/example", - "exclusiveMaximum": "https://json-schema.org/keyword/draft-04/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/draft-04/exclusiveMinimum", - "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", - "format": "https://json-schema.org/keyword/draft-04/format", - "items": "https://json-schema.org/keyword/draft-04/items", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/draft-04/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/draft-04/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "not": "https://json-schema.org/keyword/not", - "nullable": "https://spec.openapis.org/oas/3.0/keyword/nullable", - "oneOf": "https://json-schema.org/keyword/oneOf", - "pattern": "https://json-schema.org/keyword/pattern", - "properties": "https://json-schema.org/keyword/properties", - "readOnly": "https://json-schema.org/keyword/readOnly", - "required": "https://json-schema.org/keyword/required", - "title": "https://json-schema.org/keyword/title", - "type": "https://spec.openapis.org/oas/3.0/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems", - "writeOnly": "https://json-schema.org/keyword/writeOnly", - "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" -}); - -loadDialect(jsonSchemaVersion, { - [jsonSchemaVersion]: true -}); - -loadDialect("https://spec.openapis.org/oas/3.0/schema", { - [jsonSchemaVersion]: true -}); - -registerSchema(dialectSchema); - -registerSchema(schema, "https://spec.openapis.org/oas/3.0/schema"); -registerSchema(schema, "https://spec.openapis.org/oas/3.0/schema/latest"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js b/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js deleted file mode 100644 index 0d5450c4..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/nullable.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/nullable"; - -const compile = (schema) => Browser.value(schema); - -const interpret = () => true; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js deleted file mode 100644 index c715879e..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/schema.js +++ /dev/null @@ -1,1368 +0,0 @@ -export default { - "id": "https://spec.openapis.org/oas/3.0/schema/2021-09-28", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Validation schema for OpenAPI Specification 3.0.X.", - "type": "object", - "required": [ - "openapi", - "info", - "paths" - ], - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.0\\.\\d(-.+)?$" - }, - "info": { - "$ref": "#/definitions/Info" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/Tag" - }, - "uniqueItems": true - }, - "paths": { - "$ref": "#/definitions/Paths" - }, - "components": { - "$ref": "#/definitions/Components" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } - }, - "Info": { - "type": "object", - "required": [ - "title", - "version" - ], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/definitions/Contact" - }, - "license": { - "$ref": "#/definitions/License" - }, - "version": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Contact": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "License": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Server": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ServerVariable" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ServerVariable": { - "type": "object", - "required": [ - "default" - ], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Components": { - "type": "object", - "properties": { - "schemas": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { "$ref": "#/definitions/Schema" } - } - }, - "responses": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Response" - } - ] - } - } - }, - "parameters": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Parameter" - } - ] - } - } - }, - "examples": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Example" - } - ] - } - } - }, - "requestBodies": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/RequestBody" - } - ] - } - } - }, - "headers": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Header" - } - ] - } - } - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } - }, - "links": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Link" - } - ] - } - } - }, - "callbacks": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Callback" - } - ] - } - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Schema": { "$ref": "/oas/3.0/dialect" }, - "Response": { - "type": "object", - "required": [ - "description" - ], - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Header" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Link" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "MediaType": { - "type": "object", - "properties": { - "schema": { "$ref": "#/definitions/Schema" }, - "example": { - }, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Encoding" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - } - ] - }, - "Example": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": { - }, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Header": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "type": "boolean", - "default": false - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "allowEmptyValue": { - "type": "boolean", - "default": false - }, - "style": { - "type": "string", - "enum": [ - "simple" - ], - "default": "simple" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - }, - "schema": { "$ref": "#/definitions/Schema" }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "example": { - }, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - }, - { - "$ref": "#/definitions/SchemaXORContent" - } - ] - }, - "Paths": { - "type": "object", - "patternProperties": { - "^\\/": { - "$ref": "#/definitions/PathItem" - }, - "^x-": { - } - }, - "additionalProperties": false - }, - "PathItem": { - "type": "object", - "properties": { - "$ref": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - }, - "parameters": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Parameter" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "uniqueItems": true - } - }, - "patternProperties": { - "^(get|put|post|delete|options|head|patch|trace)$": { - "$ref": "#/definitions/Operation" - }, - "^x-": { - } - }, - "additionalProperties": false - }, - "Operation": { - "type": "object", - "required": [ - "responses" - ], - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Parameter" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "uniqueItems": true - }, - "requestBody": { - "oneOf": [ - { - "$ref": "#/definitions/RequestBody" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "responses": { - "$ref": "#/definitions/Responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Callback" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Responses": { - "type": "object", - "properties": { - "default": { - "oneOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "patternProperties": { - "^[1-5](?:\\d{2}|XX)$": { - "oneOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "^x-": { - } - }, - "minProperties": 1, - "additionalProperties": false - }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Tag": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ExampleXORExamples": { - "description": "Example and examples are mutually exclusive", - "not": { - "required": [ - "example", - "examples" - ] - } - }, - "SchemaXORContent": { - "description": "Schema and content are mutually exclusive, at least one is required", - "not": { - "required": [ - "schema", - "content" - ] - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ], - "description": "Some properties are not allowed if content is present", - "allOf": [ - { - "not": { - "required": [ - "style" - ] - } - }, - { - "not": { - "required": [ - "explode" - ] - } - }, - { - "not": { - "required": [ - "allowReserved" - ] - } - }, - { - "not": { - "required": [ - "example" - ] - } - }, - { - "not": { - "required": [ - "examples" - ] - } - } - ] - } - ] - }, - "Parameter": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean", - "default": false - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "allowEmptyValue": { - "type": "boolean", - "default": false - }, - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - }, - "schema": { "$ref": "#/definitions/Schema" }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "example": { - }, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "required": [ - "name", - "in" - ], - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - }, - { - "$ref": "#/definitions/SchemaXORContent" - }, - { - "$ref": "#/definitions/ParameterLocation" - } - ] - }, - "ParameterLocation": { - "description": "Parameter location", - "oneOf": [ - { - "description": "Parameter in path", - "required": [ - "required" - ], - "properties": { - "in": { - "enum": [ - "path" - ] - }, - "style": { - "enum": [ - "matrix", - "label", - "simple" - ], - "default": "simple" - }, - "required": { - "enum": [ - true - ] - } - } - }, - { - "description": "Parameter in query", - "properties": { - "in": { - "enum": [ - "query" - ] - }, - "style": { - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ], - "default": "form" - } - } - }, - { - "description": "Parameter in header", - "properties": { - "in": { - "enum": [ - "header" - ] - }, - "style": { - "enum": [ - "simple" - ], - "default": "simple" - } - } - }, - { - "description": "Parameter in cookie", - "properties": { - "in": { - "enum": [ - "cookie" - ] - }, - "style": { - "enum": [ - "form" - ], - "default": "form" - } - } - } - ] - }, - "RequestBody": { - "type": "object", - "required": [ - "content" - ], - "properties": { - "description": { - "type": "string" - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - } - }, - "required": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/APIKeySecurityScheme" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - }, - { - "$ref": "#/definitions/OAuth2SecurityScheme" - }, - { - "$ref": "#/definitions/OpenIdConnectSecurityScheme" - } - ] - }, - "APIKeySecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "bearerFormat": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "oneOf": [ - { - "description": "Bearer", - "properties": { - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - } - }, - { - "description": "Non Bearer", - "not": { - "required": [ - "bearerFormat" - ] - }, - "properties": { - "scheme": { - "not": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - } - } - } - ] - }, - "OAuth2SecurityScheme": { - "type": "object", - "required": [ - "type", - "flows" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flows": { - "$ref": "#/definitions/OAuthFlows" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "OpenIdConnectSecurityScheme": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] - }, - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "OAuthFlows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/definitions/ImplicitOAuthFlow" - }, - "password": { - "$ref": "#/definitions/PasswordOAuthFlow" - }, - "clientCredentials": { - "$ref": "#/definitions/ClientCredentialsFlow" - }, - "authorizationCode": { - "$ref": "#/definitions/AuthorizationCodeOAuthFlow" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ImplicitOAuthFlow": { - "type": "object", - "required": [ - "authorizationUrl", - "scopes" - ], - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "PasswordOAuthFlow": { - "type": "object", - "required": [ - "tokenUrl", - "scopes" - ], - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ClientCredentialsFlow": { - "type": "object", - "required": [ - "tokenUrl", - "scopes" - ], - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "AuthorizationCodeOAuthFlow": { - "type": "object", - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Link": { - "type": "object", - "properties": { - "operationId": { - "type": "string" - }, - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "parameters": { - "type": "object", - "additionalProperties": { - } - }, - "requestBody": { - }, - "description": { - "type": "string" - }, - "server": { - "$ref": "#/definitions/Server" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "not": { - "description": "Operation Id and Operation Ref are mutually exclusive", - "required": [ - "operationId", - "operationRef" - ] - } - }, - "Callback": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/PathItem" - }, - "patternProperties": { - "^x-": { - } - } - }, - "Encoding": { - "type": "object", - "properties": { - "contentType": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Header" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "style": { - "type": "string", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - } - }, - "additionalProperties": false - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/type.js b/node_modules/@hyperjump/json-schema/openapi-3-0/type.js deleted file mode 100644 index 1cf47195..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/type.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as Browser from "@hyperjump/browser"; -import * as Instance from "../lib/instance.js"; -import { getKeywordName } from "../lib/experimental.js"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/type"; - -const compile = async (schema, _ast, parentSchema) => { - const nullableKeyword = getKeywordName(schema.document.dialectId, "https://spec.openapis.org/oas/3.0/keyword/nullable"); - const nullable = await Browser.step(nullableKeyword, parentSchema); - return Browser.value(nullable) === true ? ["null", Browser.value(schema)] : Browser.value(schema); -}; - -const interpret = (type, instance) => typeof type === "string" - ? isTypeOf(instance)(type) - : type.some(isTypeOf(instance)); - -const isTypeOf = (instance) => (type) => type === "integer" - ? Instance.typeOf(instance) === "number" && Number.isInteger(Instance.value(instance)) - : Instance.typeOf(instance) === type; - -export default { id, compile, interpret }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js b/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js deleted file mode 100644 index e6476570..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-0/xml.js +++ /dev/null @@ -1,10 +0,0 @@ -import * as Browser from "@hyperjump/browser"; - - -const id = "https://spec.openapis.org/oas/3.0/keyword/xml"; - -const compile = (schema) => Browser.value(schema); -const interpret = () => true; -const annotation = (xml) => xml; - -export default { id, compile, interpret, annotation }; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js deleted file mode 100644 index 6a2f4b5b..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/dialect/base.js +++ /dev/null @@ -1,22 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - "$dynamicAnchor": "meta", - - "title": "OpenAPI 3.1 Schema Object Dialect", - "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.1 Descriptions", - - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "https://spec.openapis.org/oas/3.1/meta/base" } - ] -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts deleted file mode 100644 index a437246f..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/index.d.ts +++ /dev/null @@ -1,364 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type OasSchema31 = boolean | { - $schema?: "https://spec.openapis.org/oas/3.1/dialect/base"; - $id?: string; - $anchor?: string; - $ref?: string; - $dynamicRef?: string; - $dynamicAnchor?: string; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: OasSchema31; - unevaluatedItems?: OasSchema31; - prefixItems?: OasSchema31[]; - items?: OasSchema31; - contains?: OasSchema31; - additionalProperties?: OasSchema31; - unevaluatedProperties?: OasSchema31; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: OasSchema31; - if?: OasSchema31; - then?: OasSchema31; - else?: OasSchema31; - allOf?: OasSchema31[]; - anyOf?: OasSchema31[]; - oneOf?: OasSchema31[]; - not?: OasSchema31; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: OasSchema31; - example?: Json; - discriminator?: Discriminator; - externalDocs?: ExternalDocs; - xml?: Xml; -}; - -type Discriminator = { - propertyName: string; - mappings?: Record; -}; - -type ExternalDocs = { - url: string; - description?: string; -}; - -type Xml = { - name?: string; - namespace?: string; - prefix?: string; - attribute?: boolean; - wrapped?: boolean; -}; - -export type OpenApi = { - openapi: string; - info: Info; - jsonSchemaDialect?: string; - servers?: Server[]; - security?: SecurityRequirement[]; - tags?: Tag[]; - externalDocs?: ExternalDocumentation; - paths?: Record; - webhooks?: Record; - components?: Components; -}; - -type Info = { - title: string; - summary?: string; - description?: string; - termsOfService?: string; - contact?: Contact; - license?: License; - version: string; -}; - -type Contact = { - name?: string; - url?: string; - email?: string; -}; - -type License = { - name: string; - url?: string; - identifier?: string; -}; - -type Server = { - url: string; - description?: string; - variables?: Record; -}; - -type ServerVariable = { - enum?: string[]; - default: string; - description?: string; -}; - -type Components = { - schemas?: Record; - responses?: Record; - parameters?: Record; - examples?: Record; - requestBodies?: Record; - headers?: Record; - securitySchemes?: Record; - links?: Record; - callbacks?: Record; - pathItems?: Record; -}; - -type PathItem = { - summary?: string; - description?: string; - servers?: Server[]; - parameters?: (Parameter | Reference)[]; - get?: Operation; - put?: Operation; - post?: Operation; - delete?: Operation; - options?: Operation; - head?: Operation; - patch?: Operation; - trace?: Operation; -}; - -type Operation = { - tags?: string[]; - summary?: string; - description?: string; - externalDocs?: ExternalDocumentation; - operationId?: string; - parameters?: (Parameter | Reference)[]; - requestBody?: RequestBody | Reference; - responses?: Record; - callbacks?: Record; - deprecated?: boolean; - security?: SecurityRequirement[]; - servers?: Server[]; -}; - -type ExternalDocumentation = { - description?: string; - url: string; -}; - -export type Parameter = { - name: string; - description?: string; - required?: boolean; - deprecated?: boolean; - allowEmptyValue?: boolean; -} & ( - ( - { - in: "path"; - required: true; - } & ( - ({ style?: "matrix" | "label" | "simple" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "query"; - } & ( - ({ style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "header"; - } & ( - ({ style?: "simple" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "cookie"; - } & ( - ({ style?: "form" } & SchemaParameter) - | ContentParameter - ) - ) -); - -type ContentParameter = { - schema?: never; - content: Record; -}; - -type SchemaParameter = { - explode?: boolean; - allowReserved?: boolean; - schema: OasSchema32; - content?: never; -} & Examples; - -type RequestBody = { - description?: string; - content: Content; - required?: boolean; -}; - -type Content = Record; - -type MediaType = { - schema?: OasSchema31; - encoding?: Record; -} & Examples; - -type Encoding = { - contentType?: string; - headers?: Record; - style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; - explode?: boolean; - allowReserved?: boolean; -}; - -type Response = { - description: string; - headers?: Record; - content?: Content; - links?: Record; -}; - -type Callbacks = Record; - -type Example = { - summary?: string; - description?: string; - value?: Json; - externalValue?: string; -}; - -type Link = { - operationRef?: string; - operationId?: string; - parameters?: Record; - requestBody?: Json; - description?: string; - server?: Server; -}; - -type Header = { - description?: string; - required?: boolean; - deprecated?: boolean; - schema?: OasSchema31; - style?: "simple"; - explode?: boolean; - content?: Content; -}; - -type Tag = { - name: string; - description?: string; - externalDocs?: ExternalDocumentation; -}; - -type Reference = { - $ref: string; - summary?: string; - description?: string; -}; - -type SecurityScheme = { - type: "apiKey"; - description?: string; - name: string; - in: "query" | "header" | "cookie"; -} | { - type: "http"; - description?: string; - scheme: string; - bearerFormat?: string; -} | { - type: "mutualTLS"; - description?: string; -} | { - type: "oauth2"; - description?: string; - flows: OauthFlows; -} | { - type: "openIdConnect"; - description?: string; - openIdConnectUrl: string; -}; - -type OauthFlows = { - implicit?: Implicit; - password?: Password; - clientCredentials?: ClientCredentials; - authorizationCode?: AuthorizationCode; -}; - -type Implicit = { - authorizationUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type Password = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type ClientCredentials = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type AuthorizationCode = { - authorizationUrl: string; - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type SecurityRequirement = Record; - -type Examples = { - example?: Json; - examples?: Record; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/index.js b/node_modules/@hyperjump/json-schema/openapi-3-1/index.js deleted file mode 100644 index a2840f53..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/index.js +++ /dev/null @@ -1,49 +0,0 @@ -import { addKeyword, defineVocabulary } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import "../lib/openapi.js"; - -import dialectSchema from "./dialect/base.js"; -import vocabularySchema from "./meta/base.js"; -import schema from "./schema.js"; -import schemaBase from "./schema-base.js"; -import schemaDraft2020 from "./schema-draft-2020-12.js"; -import schemaDraft2019 from "./schema-draft-2019-09.js"; -import schemaDraft07 from "./schema-draft-07.js"; -import schemaDraft06 from "./schema-draft-06.js"; -import schemaDraft04 from "./schema-draft-04.js"; - -import discriminator from "../openapi-3-0/discriminator.js"; -import example from "../openapi-3-0/example.js"; -import externalDocs from "../openapi-3-0/externalDocs.js"; -import xml from "../openapi-3-0/xml.js"; - - -export * from "../draft-2020-12/index.js"; - -addKeyword(discriminator); -addKeyword(example); -addKeyword(externalDocs); -addKeyword(xml); - -defineVocabulary("https://spec.openapis.org/oas/3.1/vocab/base", { - "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", - "example": "https://spec.openapis.org/oas/3.0/keyword/example", - "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", - "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" -}); - -registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.1/meta/base"); -registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.1/dialect/base"); - -// Current Schemas -registerSchema(schema, "https://spec.openapis.org/oas/3.1/schema"); -registerSchema(schema, "https://spec.openapis.org/oas/3.1/schema/latest"); -registerSchema(schemaBase, "https://spec.openapis.org/oas/3.1/schema-base"); -registerSchema(schemaBase, "https://spec.openapis.org/oas/3.1/schema-base/latest"); - -// Alternative dialect schemas -registerSchema(schemaDraft2020, "https://spec.openapis.org/oas/3.1/schema-draft-2020-12"); -registerSchema(schemaDraft2019, "https://spec.openapis.org/oas/3.1/schema-draft-2019-09"); -registerSchema(schemaDraft07, "https://spec.openapis.org/oas/3.1/schema-draft-07"); -registerSchema(schemaDraft06, "https://spec.openapis.org/oas/3.1/schema-draft-06"); -registerSchema(schemaDraft04, "https://spec.openapis.org/oas/3.1/schema-draft-04"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js deleted file mode 100644 index 303423f1..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/meta/base.js +++ /dev/null @@ -1,77 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "OAS Base Vocabulary", - "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", - - "type": ["object", "boolean"], - "properties": { - "example": true, - "discriminator": { "$ref": "#/$defs/discriminator" }, - "externalDocs": { "$ref": "#/$defs/external-docs" }, - "xml": { "$ref": "#/$defs/xml" } - }, - "$defs": { - "extensible": { - "patternProperties": { - "^x-": true - } - }, - "discriminator": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "required": ["propertyName"], - "unevaluatedProperties": false - }, - "external-docs": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - } - }, - "required": ["url"], - "unevaluatedProperties": false - }, - "xml": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean" - }, - "wrapped": { - "type": "boolean" - } - }, - "unevaluatedProperties": false - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js deleted file mode 100644 index a84f8ab7..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-base.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://spec.openapis.org/oas/3.1/dialect/base" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js deleted file mode 100644 index c91acddc..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-04.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "OpenAPI v3.1.x documents using draft-04 JSON Schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-04/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js deleted file mode 100644 index 87186cf0..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-06.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "OpenAPI v3.1.x documents using draft-06 JSON Schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-06/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js deleted file mode 100644 index f4d2f8b5..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-07.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "OpenAPI v3.1.x documents using draft-07 JSON Schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-07/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js deleted file mode 100644 index 11f27166..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2019-09.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "openapi v3.1.x documents using 2019-09 json schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonschemadialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://json-schema.org/draft/2019-09/schema" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js deleted file mode 100644 index 1b0367f8..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema-draft-2020-12.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "description": "openapi v3.1.x documents using 2020-12 json schemas", - - "$ref": "https://spec.openapis.org/oas/3.1/schema", - "properties": { - "jsonschemadialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://json-schema.org/draft/2020-12/schema" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js deleted file mode 100644 index 6aed8baa..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-1/schema.js +++ /dev/null @@ -1,1407 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents without Schema Object validation", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri-reference", - "default": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.1#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.1#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.1#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-object", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.1#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.1#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.1#path-item-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.1#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.1#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.1#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "const": "form" - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.1#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.1#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.1#media-type-object", - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.1#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "unevaluatedProperties": false - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.1#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "if": { - "$comment": "either default, or at least one response code property must exist", - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": false - } - }, - "then": { - "required": [ - "default" - ] - } - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.1#response-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.1#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.1#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "not": { - "required": [ - "value", - "externalValue" - ] - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.1#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.1#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - } - }, - "$ref": "#/$defs/examples" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.1#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.1#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.1#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.1#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js deleted file mode 100644 index 3c606117..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/dialect/base.js +++ /dev/null @@ -1,22 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - "$dynamicAnchor": "meta", - - "title": "OpenAPI 3.2 Schema Object Dialect", - "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.2.x Descriptions", - - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "https://spec.openapis.org/oas/3.2/meta" } - ] -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts b/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts deleted file mode 100644 index 80b94a5c..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/index.d.ts +++ /dev/null @@ -1,415 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type OasSchema32 = boolean | { - $schema?: "https://spec.openapis.org/oas/3.2/dialect/base"; - $id?: string; - $anchor?: string; - $ref?: string; - $dynamicRef?: string; - $dynamicAnchor?: string; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: OasSchema32; - unevaluatedItems?: OasSchema32; - prefixItems?: OasSchema32[]; - items?: OasSchema32; - contains?: OasSchema32; - additionalProperties?: OasSchema32; - unevaluatedProperties?: OasSchema32; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: OasSchema32; - if?: OasSchema32; - then?: OasSchema32; - else?: OasSchema32; - allOf?: OasSchema32[]; - anyOf?: OasSchema32[]; - oneOf?: OasSchema32[]; - not?: OasSchema32; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: OasSchema32; - example?: Json; - discriminator?: Discriminator; - externalDocs?: ExternalDocs; - xml?: Xml; -}; - -type Discriminator = { - propertyName: string; - mappings?: Record; - defaultMapping?: string; -}; - -type ExternalDocs = { - url: string; - description?: string; -}; - -type Xml = { - nodeType?: "element" | "attribute" | "text" | "cdata" | "none"; - name?: string; - namespace?: string; - prefix?: string; - attribute?: boolean; - wrapped?: boolean; -}; - -export type OpenApi = { - openapi: string; - $self?: string; - info: Info; - jsonSchemaDialect?: string; - servers?: Server[]; - paths?: Record; - webhooks?: Record; - components?: Components; - security?: SecurityRequirement[]; - tags?: Tag[]; - externalDocs?: ExternalDocs; -}; - -type Info = { - title: string; - summary?: string; - description?: string; - termsOfService?: string; - contact?: Contact; - license?: License; - version: string; -}; - -type Contact = { - name?: string; - url?: string; - email?: string; -}; - -type License = { - name: string; - identifier?: string; - url?: string; -}; - -type Server = { - url: string; - description?: string; - name?: string; - variables?: Record; -}; - -type ServerVariable = { - enum?: string[]; - default: string; - description?: string; -}; - -type Components = { - schemas?: Record; - responses?: Record; - parameters?: Record; - examples?: Record; - requestBodies?: Record; - headers?: Record; - securitySchemes?: Record; - links?: Record; - callbacks?: Record; - pathItems?: Record; - mediaTypes?: Record; -}; - -type PathItem = { - $ref?: string; - summary?: string; - description?: string; - get?: Operation; - put?: Operation; - post?: Operation; - delete?: Operation; - options?: Operation; - head?: Operation; - patch?: Operation; - trace?: Operation; - query?: Operation; - additionOperations?: Record; - servers?: Server[]; - parameters?: (Parameter | Reference)[]; -}; - -type Operation = { - tags?: string[]; - summary?: string; - description?: string; - externalDocs?: ExternalDocs; - operationId?: string; - parameters?: (Parameter | Reference)[]; - requestBody?: RequestBody | Reference; - responses?: Responses; - callbacks?: Record; - deprecated?: boolean; - security?: SecurityRequirement[]; - servers?: Server[]; -}; - -export type Parameter = { - name: string; - description?: string; - required?: boolean; - deprecated?: boolean; - allowEmptyValue?: boolean; -} & Examples & ( - ( - { - in: "path"; - required: true; - } & ( - ({ style?: "matrix" | "label" | "simple" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "query"; - } & ( - ({ style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "header"; - } & ( - ({ style?: "simple" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { - in: "cookie"; - } & ( - ({ style?: "cookie" } & SchemaParameter) - | ContentParameter - ) - ) | ( - { in: "querystring" } & ContentParameter - ) -); - -type ContentParameter = { - schema?: never; - content: Record; -}; - -type SchemaParameter = { - explode?: boolean; - allowReserved?: boolean; - schema: OasSchema32; - content?: never; -}; - -type RequestBody = { - description?: string; - content: Record; - required?: boolean; -}; - -type MediaType = { - schema?: OasSchema32; - itemSchema?: OasSchema32; -} & Examples & ({ - encoding?: Record; - prefixEncoding?: never; - itemEncoding?: never; -} | { - encoding?: never; - prefixEncoding?: Encoding[]; - itemEncoding?: Encoding; -}); - -type Encoding = { - contentType?: string; - headers?: Record; - style?: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject"; - explode?: boolean; - allowReserved?: boolean; -} & ({ - encoding?: Record; - prefixEncoding?: never; - itemEncoding?: never; -} | { - encoding?: never; - prefixEncoding?: Encoding[]; - itemEncoding?: Encoding; -}); - -type Responses = { - default?: Response | Reference; -} & Record; - -type Response = { - summary?: string; - description?: string; - headers?: Record; - content?: Record; - links?: Record; -}; - -type Callbacks = Record; - -type Examples = { - example?: Json; - examples?: Record; -}; - -type Example = { - summary?: string; - description?: string; -} & ({ - value?: Json; - dataValue?: never; - serializedValue?: never; - externalValue?: never; -} | { - value?: never; - dataValue?: Json; - serializedValue?: string; - externalValue?: string; -}); - -type Link = { - operationRef?: string; - operationId?: string; - parameters?: Record; - requestBody?: Json; - description?: string; - server?: Server; -}; - -type Header = { - description?: string; - required?: boolean; - deprecated?: boolean; -} & Examples & ({ - style?: "simple"; - explode?: boolean; - schema: OasSchema32; -} | { - content: Record; -}); - -type Tag = { - name: string; - summary?: string; - description?: string; - externalDocs?: ExternalDocs; - parent?: string; - kind?: string; -}; - -type Reference = { - $ref: string; - summary?: string; - description?: string; -}; - -type SecurityScheme = { - type: "apiKey"; - description?: string; - name: string; - in: "query" | "header" | "cookie"; - deprecated?: boolean; -} | { - type: "http"; - description?: string; - scheme: string; - bearerFormat?: string; - deprecated?: boolean; -} | { - type: "mutualTLS"; - description?: string; - deprecated?: boolean; -} | { - type: "oauth2"; - description?: string; - flows: OauthFlows; - oauth2MetadataUrl?: string; - deprecated?: boolean; -} | { - type: "openIdConnect"; - description?: string; - openIdConnectUrl: string; - deprecated?: boolean; -}; - -type OauthFlows = { - implicit?: Implicit; - password?: Password; - clientCredentials?: ClientCredentials; - authorizationCode?: AuthorizationCode; - deviceAuthorization?: DeviceAuthorization; -}; - -type Implicit = { - authorizationUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type Password = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type ClientCredentials = { - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type AuthorizationCode = { - authorizationUrl: string; - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type DeviceAuthorization = { - deviceAuthorizationUrl: string; - tokenUrl: string; - refreshUrl?: string; - scopes: Record; -}; - -type SecurityRequirement = Record; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/index.js b/node_modules/@hyperjump/json-schema/openapi-3-2/index.js deleted file mode 100644 index 9e03b679..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/index.js +++ /dev/null @@ -1,47 +0,0 @@ -import { addKeyword, defineVocabulary } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import "../lib/openapi.js"; - -import dialectSchema from "./dialect/base.js"; -import vocabularySchema from "./meta/base.js"; -import schema from "./schema.js"; -import schemaBase from "./schema-base.js"; -import schemaDraft2020 from "./schema-draft-2020-12.js"; -import schemaDraft2019 from "./schema-draft-2019-09.js"; -import schemaDraft07 from "./schema-draft-07.js"; -import schemaDraft06 from "./schema-draft-06.js"; -import schemaDraft04 from "./schema-draft-04.js"; - -import discriminator from "../openapi-3-0/discriminator.js"; -import example from "../openapi-3-0/example.js"; -import externalDocs from "../openapi-3-0/externalDocs.js"; -import xml from "../openapi-3-0/xml.js"; - - -export * from "../draft-2020-12/index.js"; - -addKeyword(discriminator); -addKeyword(example); -addKeyword(externalDocs); -addKeyword(xml); - -defineVocabulary("https://spec.openapis.org/oas/3.2/vocab/base", { - "discriminator": "https://spec.openapis.org/oas/3.0/keyword/discriminator", - "example": "https://spec.openapis.org/oas/3.0/keyword/example", - "externalDocs": "https://spec.openapis.org/oas/3.0/keyword/externalDocs", - "xml": "https://spec.openapis.org/oas/3.0/keyword/xml" -}); - -registerSchema(vocabularySchema, "https://spec.openapis.org/oas/3.2/meta"); -registerSchema(dialectSchema, "https://spec.openapis.org/oas/3.2/dialect"); - -// Current Schemas -registerSchema(schema, "https://spec.openapis.org/oas/3.2/schema"); -registerSchema(schemaBase, "https://spec.openapis.org/oas/3.2/schema-base"); - -// Alternative dialect schemas -registerSchema(schemaDraft2020, "https://spec.openapis.org/oas/3.2/schema-draft-2020-12"); -registerSchema(schemaDraft2019, "https://spec.openapis.org/oas/3.2/schema-draft-2019-09"); -registerSchema(schemaDraft07, "https://spec.openapis.org/oas/3.2/schema-draft-07"); -registerSchema(schemaDraft06, "https://spec.openapis.org/oas/3.2/schema-draft-06"); -registerSchema(schemaDraft04, "https://spec.openapis.org/oas/3.2/schema-draft-04"); diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js deleted file mode 100644 index 472ceeb4..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/meta/base.js +++ /dev/null @@ -1,102 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - - "title": "OAS Base Vocabulary", - "description": "A JSON Schema Vocabulary used in the OpenAPI JSON Schema Dialect", - - "type": ["object", "boolean"], - "properties": { - "discriminator": { "$ref": "#/$defs/discriminator" }, - "example": { "deprecated": true }, - "externalDocs": { "$ref": "#/$defs/external-docs" }, - "xml": { "$ref": "#/$defs/xml" } - }, - - "$defs": { - "extensible": { - "patternProperties": { - "^x-": true - } - }, - - "discriminator": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "defaultMapping": { - "type": "string" - } - }, - "required": ["propertyName"], - "unevaluatedProperties": false - }, - "external-docs": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - } - }, - "required": ["url"], - "unevaluatedProperties": false - }, - "xml": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "nodeType": { - "type": "string", - "enum": [ - "element", - "attribute", - "text", - "cdata", - "none" - ] - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "iri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "deprecated": true - }, - "wrapped": { - "type": "boolean", - "deprecated": true - } - }, - "dependentSchemas": { - "nodeType": { - "properties": { - "attribute": false, - "wrapped": false - } - } - }, - "unevaluatedProperties": false - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js deleted file mode 100644 index 8e10c6bb..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-base.js +++ /dev/null @@ -1,32 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the OpenAPI JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://spec.openapis.org/oas/3.2/dialect" }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js deleted file mode 100644 index c7bf4347..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-04.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the draft-04 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-04/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js deleted file mode 100644 index 5057827d..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-06.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the draft-06 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-06/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js deleted file mode 100644 index e163db4b..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-07.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the draft-07 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "http://json-schema.org/draft-07/schema#" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js deleted file mode 100644 index 8cf69a7d..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2019-09.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the 2019-09 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonschemadialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://json-schema.org/draft/2019-09/schema" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js deleted file mode 100644 index 013dac42..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema-draft-2020-12.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - - "description": "The description of OpenAPI v3.2.x Documents using the 2020-12 JSON Schema dialect", - - "$ref": "https://spec.openapis.org/oas/3.2/schema", - "properties": { - "jsonschemadialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://json-schema.org/draft/2020-12/schema" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js b/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js deleted file mode 100644 index 18fd4aa4..00000000 --- a/node_modules/@hyperjump/json-schema/openapi-3-2/schema.js +++ /dev/null @@ -1,1665 +0,0 @@ -export default { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.2.x Documents without Schema Object validation", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.2\\.\\d+(-.+)?$" - }, - "$self": { - "type": "string", - "format": "uri-reference", - "$comment": "MUST NOT contain a fragment", - "pattern": "^[^#]*$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri-reference", - "default": "https://spec.openapis.org/oas/3.1/dialect" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.2#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.2#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.2#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.2#server-object", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.2#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.2#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "mediaTypes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type-or-reference" - } - } - }, - "patternProperties": { - "^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems|mediaTypes)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.2#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.2#path-item-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "$ref": "#/$defs/parameters" - }, - "additionalOperations": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/operation" - }, - "propertyNames": { - "$comment": "RFC9110 restricts methods to \"1*tchar\" in ABNF", - "pattern": "^[a-zA-Z0-9!#$%&'*+.^_`|~-]+$", - "not": { - "enum": [ - "GET", - "PUT", - "POST", - "DELETE", - "OPTIONS", - "HEAD", - "PATCH", - "TRACE", - "QUERY" - ] - } - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - }, - "query": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.2#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/parameters" - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.2#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - }, - "not": { - "allOf": [ - { - "contains": { - "type": "object", - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - } - }, - { - "contains": { - "type": "object", - "properties": { - "in": { - "const": "querystring" - } - }, - "required": [ - "in" - ] - } - } - ] - }, - "contains": { - "type": "object", - "properties": { - "in": { - "const": "querystring" - } - }, - "required": [ - "in" - ] - }, - "minContains": 0, - "maxContains": 1 - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.2#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "querystring", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/specification-extensions" - }, - { - "if": { - "properties": { - "in": { - "const": "query" - } - } - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - } - }, - { - "if": { - "properties": { - "in": { - "const": "querystring" - } - } - }, - "then": { - "required": [ - "content" - ] - } - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - } - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - } - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - } - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - } - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "cookie" - ] - } - } - } - } - } - } - }, - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.2#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.2#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type-or-reference" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.2#media-type-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "itemSchema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - }, - "prefixEncoding": { - "type": "array", - "items": { - "$ref": "#/$defs/encoding" - } - }, - "itemEncoding": { - "$ref": "#/$defs/encoding" - } - }, - "dependentSchemas": { - "encoding": { - "properties": { - "prefixEncoding": false, - "itemEncoding": false - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/specification-extensions" - } - ], - "unevaluatedProperties": false - }, - "media-type-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/media-type" - } - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.2#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - }, - "prefixEncoding": { - "type": "array", - "items": { - "$ref": "#/$defs/encoding" - } - }, - "itemEncoding": { - "$ref": "#/$defs/encoding" - } - }, - "dependentSchemas": { - "encoding": { - "properties": { - "prefixEncoding": false, - "itemEncoding": false - } - }, - "style": { - "properties": { - "allowReserved": { - "default": false - } - } - }, - "explode": { - "properties": { - "style": { - "default": "form" - }, - "allowReserved": { - "default": false - } - } - }, - "allowReserved": { - "properties": { - "style": { - "default": "form" - } - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "unevaluatedProperties": false - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.2#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "if": { - "$comment": "either default, or at least one response code property must exist", - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": false - } - }, - "then": { - "required": [ - "default" - ] - } - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.2#response-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.2#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.2#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "dataValue": true, - "serializedValue": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "allOf": [ - { - "not": { - "required": [ - "value", - "externalValue" - ] - } - }, - { - "not": { - "required": [ - "value", - "dataValue" - ] - } - }, - { - "not": { - "required": [ - "value", - "serializedValue" - ] - } - }, - { - "not": { - "required": [ - "serializedValue", - "externalValue" - ] - } - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.2#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "server": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.2#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/specification-extensions" - } - ], - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.2#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "parent": { - "type": "string" - }, - "kind": { - "type": "string" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.2#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.2#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.2#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - }, - "deprecated": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - } - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - } - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - } - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - }, - "oauth2MetadataUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - } - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - }, - "deviceAuthorization": { - "$ref": "#/$defs/oauth-flows/$defs/device-authorization" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "device-authorization": { - "type": "object", - "properties": { - "deviceAuthorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "deviceAuthorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.2#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.2#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - }, - "not": { - "required": [ - "example", - "examples" - ] - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/package.json b/node_modules/@hyperjump/json-schema/package.json deleted file mode 100644 index 5ebfd609..00000000 --- a/node_modules/@hyperjump/json-schema/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "@hyperjump/json-schema", - "version": "1.17.2", - "description": "A JSON Schema validator with support for custom keywords, vocabularies, and dialects", - "type": "module", - "main": "./v1/index.js", - "exports": { - ".": "./v1/index.js", - "./draft-04": "./draft-04/index.js", - "./draft-06": "./draft-06/index.js", - "./draft-07": "./draft-07/index.js", - "./draft-2019-09": "./draft-2019-09/index.js", - "./draft-2020-12": "./draft-2020-12/index.js", - "./openapi-3-0": "./openapi-3-0/index.js", - "./openapi-3-1": "./openapi-3-1/index.js", - "./openapi-3-2": "./openapi-3-2/index.js", - "./experimental": "./lib/experimental.js", - "./instance/experimental": "./lib/instance.js", - "./annotations/experimental": "./annotations/index.js", - "./annotated-instance/experimental": "./annotations/annotated-instance.js", - "./bundle": "./bundle/index.js", - "./formats": "./formats/index.js", - "./formats-lite": "./formats/lite.js" - }, - "scripts": { - "clean": "xargs -a .gitignore rm -rf", - "lint": "eslint lib v1 draft-* openapi-* bundle annotations", - "test": "vitest --watch=false", - "check-types": "tsc --noEmit" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hyperjump-io/json-schema.git" - }, - "keywords": [ - "JSON Schema", - "json-schema", - "jsonschema", - "JSON", - "Schema", - "2020-12", - "2019-09", - "draft-07", - "draft-06", - "draft-04", - "vocabulary", - "vocabularies" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/content-type": "*", - "@types/node": "*", - "@types/uuid": "*", - "@vitest/coverage-v8": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "json-schema-test-suite": "github:json-schema-org/JSON-Schema-Test-Suite", - "typescript": "*", - "typescript-eslint": "*", - "undici": "*", - "vitest": "*", - "yaml": "*" - }, - "dependencies": { - "@hyperjump/json-pointer": "^1.1.0", - "@hyperjump/json-schema-formats": "^1.0.0", - "@hyperjump/pact": "^1.2.0", - "@hyperjump/uri": "^1.2.0", - "content-type": "^1.0.4", - "json-stringify-deterministic": "^1.0.12", - "just-curry-it": "^5.3.0", - "uuid": "^9.0.0" - }, - "peerDependencies": { - "@hyperjump/browser": "^1.1.0" - } -} diff --git a/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json b/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json deleted file mode 100644 index 4ffcd9dd..00000000 --- a/node_modules/@hyperjump/json-schema/v1/extension-tests/conditional.json +++ /dev/null @@ -1,289 +0,0 @@ -[ - { - "description": "if - then", - "schema": { - "conditional": [ - { "type": "string" }, - { "maxLength": 5 } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails", - "data": 42, - "valid": true - } - ] - }, - { - "description": "if - then - else", - "schema": { - "conditional": [ - { "type": "string" }, - { "maxLength": 5 }, - { "type": "number" } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails, else passes", - "data": 42, - "valid": true - }, - { - "description": "if fails, else fails", - "data": true, - "valid": false - } - ] - }, - { - "description": "if - then - elseif - then", - "schema": { - "conditional": [ - { "type": "string" }, - { "maxLength": 5 }, - { "type": "number" }, - { "maximum": 50 } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails, elseif passes, then passes", - "data": 42, - "valid": true - }, - { - "description": "if fails, elseif passes, then fails", - "data": 100, - "valid": false - }, - { - "description": "if fails, elseif fails", - "data": true, - "valid": true - } - ] - }, - { - "description": "if - then - elseif - then - else", - "schema": { - "conditional": [ - { "type": "string" }, - { "maxLength": 5 }, - { "type": "number" }, - { "maximum": 50 }, - { "const": true } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails, elseif passes, then passes", - "data": 42, - "valid": true - }, - { - "description": "if fails, elseif passes, then fails", - "data": 100, - "valid": false - }, - { - "description": "if fails, elseif fails, else passes", - "data": true, - "valid": true - }, - { - "description": "if fails, elseif fails, else fails", - "data": false, - "valid": false - } - ] - }, - { - "description": "nested if - then - elseif - then - else", - "schema": { - "conditional": [ - [ - { "type": "string" }, - { "maxLength": 5 } - ], - [ - { "type": "number" }, - { "maximum": 50 } - ], - { "const": true } - ] - }, - "tests": [ - { - "description": "if passes, then passes", - "data": "foo", - "valid": true - }, - { - "description": "if passes, then fails", - "data": "foobar", - "valid": false - }, - { - "description": "if fails, elseif passes, then passes", - "data": 42, - "valid": true - }, - { - "description": "if fails, elseif passes, then fails", - "data": 100, - "valid": false - }, - { - "description": "if fails, elseif fails, else passes", - "data": true, - "valid": true - }, - { - "description": "if fails, elseif fails, else fails", - "data": false, - "valid": false - } - ] - }, - { - "description": "if - then - else with unevaluatedProperties", - "schema": { - "allOf": [ - { - "properties": { - "foo": {} - }, - "conditional": [ - { "required": ["foo"] }, - { - "properties": { - "bar": {} - } - }, - { - "properties": { - "baz": {} - } - } - ] - } - ], - "unevaluatedProperties": false - }, - "tests": [ - { - "description": "if foo, then bar is allowed", - "data": { "foo": 42, "bar": true }, - "valid": true - }, - { - "description": "if foo, then baz is not allowed", - "data": { "foo": 42, "baz": true }, - "valid": false - }, - { - "description": "if not foo, then baz is allowed", - "data": { "baz": true }, - "valid": true - }, - { - "description": "if not foo, then bar is not allowed", - "data": { "bar": true }, - "valid": false - } - ] - }, - { - "description": "if - then - else with unevaluatedItems", - "schema": { - "allOf": [ - { - "conditional": [ - { "prefixItems": [{ "const": "foo" }] }, - { - "prefixItems": [{}, { "const": "bar" }] - }, - { - "prefixItems": [{}, { "const": "baz" }] - } - ] - } - ], - "unevaluatedItems": false - }, - "tests": [ - { - "description": "foo, bar", - "data": ["foo", "bar"], - "valid": true - }, - { - "description": "foo, baz", - "data": ["foo", "baz"], - "valid": false - }, - { - "description": "foo, bar, additional", - "data": ["foo", "bar", ""], - "valid": false - }, - { - "description": "not-foo, baz", - "data": ["not-foo", "baz"], - "valid": true - }, - { - "description": "not-foo, bar", - "data": ["not-foo", "bar"], - "valid": false - }, - { - "description": "not-foo, baz, additional", - "data": ["not-foo", "baz", ""], - "valid": false - } - ] - } -] diff --git a/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json b/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json deleted file mode 100644 index b1387804..00000000 --- a/node_modules/@hyperjump/json-schema/v1/extension-tests/itemPattern.json +++ /dev/null @@ -1,462 +0,0 @@ -[ - { - "description": "itemPattern ``", - "schema": { - "itemPattern": [] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": true - }, - { - "description": "a", - "data": ["a"], - "valid": false - } - ] - }, - { - "description": "itemPattern `a`", - "schema": { - "itemPattern": [ - { "const": "a" } - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": true - }, - { - "description": "b", - "data": ["b"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": false - } - ] - }, - { - "description": "itemPattern `ab`", - "schema": { - "itemPattern": [ - { "const": "a" }, - { "const": "b" } - ] - }, - "tests": [ - { - "description": "a", - "data": ["a"], - "valid": false - }, - { - "description": "aa", - "data": ["a", "a"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - } - ] - }, - { - "description": "itemPattern `a+b`", - "schema": { - "itemPattern": [ - { "const": "a" }, "+", - { "const": "b" } - ] - }, - "tests": [ - { - "description": "b", - "data": ["b"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "aab", - "data": ["a", "a", "b"], - "valid": true - }, - { - "description": "aaab", - "data": ["a", "a", "a", "b"], - "valid": true - } - ] - }, - { - "description": "itemPattern `a*b`", - "schema": { - "itemPattern": [ - { "const": "a" }, "*", - { "const": "b" } - ] - }, - "tests": [ - { - "description": "b", - "data": ["b"], - "valid": true - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "aab", - "data": ["a", "a", "b"], - "valid": true - }, - { - "description": "aaab", - "data": ["a", "a", "a", "b"], - "valid": true - } - ] - }, - { - "description": "itemPattern `(ab)+`", - "schema": { - "itemPattern": [ - [ - { "const": "a" }, - { "const": "b" } - ], "+" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "aba", - "data": ["a", "b", "a"], - "valid": false - }, - { - "description": "abab", - "data": ["a", "b", "a", "b"], - "valid": true - }, - { - "description": "ababa", - "data": ["a", "b", "a", "b", "a"], - "valid": false - } - ] - }, - { - "description": "itemPattern `a(b+c)*`", - "schema": { - "itemPattern": [ - { "const": "a" }, - [ - { "const": "b" }, "+", - { "const": "c" } - ], "*" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": true - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": false - }, - { - "description": "abc", - "data": ["a", "b", "c"], - "valid": true - }, - { - "description": "abbc", - "data": ["a", "b", "b", "c"], - "valid": true - }, - { - "description": "abbbc", - "data": ["a", "b", "b", "b", "c"], - "valid": true - }, - { - "description": "abcbc", - "data": ["a", "b", "c", "b", "c"], - "valid": true - }, - { - "description": "abcb", - "data": ["a", "b", "c", "b"], - "valid": false - }, - { - "description": "abbcbc", - "data": ["a", "b", "b", "c", "b", "c"], - "valid": true - }, - { - "description": "abcbbc", - "data": ["a", "b", "c", "b", "b", "c"], - "valid": true - }, - { - "description": "abbcbbc", - "data": ["a", "b", "b", "c", "b", "b", "c"], - "valid": true - }, - { - "description": "abbcbbcb", - "data": ["a", "b", "b", "c", "b", "b", "c", "b"], - "valid": false - } - ] - }, - { - "description": "itemPattern `(abc)*abd`", - "schema": { - "itemPattern": [ - [ - { "const": "a" }, - { "const": "b" }, - { "const": "c" } - ], "*", - { "const": "a" }, - { "const": "b" }, - { "const": "d" } - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "abc", - "data": ["a", "b", "c"], - "valid": false - }, - { - "description": "abd", - "data": ["a", "b", "d"], - "valid": true - }, - { - "description": "abcabd", - "data": ["a", "b", "c", "a", "b", "d"], - "valid": true - }, - { - "description": "abcabcabd", - "data": ["a", "b", "c", "a", "b", "c", "a", "b", "d"], - "valid": true - }, - { - "description": "abcabcabda", - "data": ["a", "b", "c", "a", "b", "c", "a", "b", "d", "a"], - "valid": false - } - ] - }, - { - "description": "itemPattern `(ab|bd)+`", - "schema": { - "itemPattern": [ - [ - { "const": "a" }, - { "const": "b" }, - "|", - { "const": "c" }, - { "const": "d" } - ], "+" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "cd", - "data": ["c", "d"], - "valid": true - }, - { - "description": "abab", - "data": ["a", "b", "a", "b"], - "valid": true - }, - { - "description": "abcd", - "data": ["a", "b", "c", "d"], - "valid": true - }, - { - "description": "abc", - "data": ["a", "b", "c"], - "valid": false - } - ] - }, - { - "description": "itemPattern `ab?|c`", - "schema": { - "itemPattern": [ - { "const": "a" }, - { "const": "b" }, "?", - "|", - { "const": "c" } - ] - }, - "tests": [ - { - "description": "a", - "data": ["a"], - "valid": true - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "c", - "data": ["c"], - "valid": true - }, - { - "description": "ac", - "data": ["a", "c"], - "valid": false - } - ] - }, - { - "description": "itemPattern `a*(ab)+`", - "schema": { - "itemPattern": [ - { "const": "a" }, "*", - [ - { "const": "a" }, - { "const": "b" } - ], "+" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": false - }, - { - "description": "ab", - "data": ["a", "b"], - "valid": true - }, - { - "description": "aab", - "data": ["a", "a", "b"], - "valid": true - }, - { - "description": "aabab", - "data": ["a", "a", "b", "a", "b"], - "valid": true - }, - { - "description": "aaab", - "data": ["a", "a", "a", "b"], - "valid": true - } - ] - }, - { - "description": "itemPattern `(a+)+`", - "schema": { - "itemPattern": [ - [ - { "const": "a" }, "+" - ], "+" - ] - }, - "tests": [ - { - "description": "*empty*", - "data": [], - "valid": false - }, - { - "description": "a", - "data": ["a"], - "valid": true - }, - { - "description": "aa", - "data": ["a", "a"], - "valid": true - }, - { - "description": "aaaaaaaaaaaaaaaa", - "data": ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a"], - "valid": true - }, - { - "description": "aaaaaaaaaaaaaaaaX", - "data": ["a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "X"], - "valid": false - } - ] - } -] diff --git a/node_modules/@hyperjump/json-schema/v1/index.d.ts b/node_modules/@hyperjump/json-schema/v1/index.d.ts deleted file mode 100644 index 878ea277..00000000 --- a/node_modules/@hyperjump/json-schema/v1/index.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { Json } from "@hyperjump/json-pointer"; -import type { JsonSchemaType } from "../lib/common.js"; - - -export type JsonSchemaType = JsonSchemaType; - -export type JsonSchemaV1 = boolean | { - $schema?: "https://json-schema.org/v1"; - $id?: string; - $anchor?: string; - $ref?: string; - $dynamicRef?: string; - $dynamicAnchor?: string; - $vocabulary?: Record; - $comment?: string; - $defs?: Record; - additionalItems?: JsonSchema; - unevaluatedItems?: JsonSchema; - prefixItems?: JsonSchema[]; - items?: JsonSchema; - contains?: JsonSchema; - additionalProperties?: JsonSchema; - unevaluatedProperties?: JsonSchema; - properties?: Record; - patternProperties?: Record; - dependentSchemas?: Record; - propertyNames?: JsonSchema; - if?: JsonSchema; - then?: JsonSchema; - else?: JsonSchema; - allOf?: JsonSchema[]; - anyOf?: JsonSchema[]; - oneOf?: JsonSchema[]; - not?: JsonSchema; - multipleOf?: number; - maximum?: number; - exclusiveMaximum?: number; - minimum?: number; - exclusiveMinimum?: number; - maxLength?: number; - minLength?: number; - pattern?: string; - maxItems?: number; - minItems?: number; - uniqueItems?: boolean; - maxContains?: number; - minContains?: number; - maxProperties?: number; - minProperties?: number; - required?: string[]; - dependentRequired?: Record; - const?: Json; - enum?: Json[]; - type?: JsonSchemaType | JsonSchemaType[]; - title?: string; - description?: string; - default?: Json; - deprecated?: boolean; - readOnly?: boolean; - writeOnly?: boolean; - examples?: Json[]; - format?: "date-time" | "date" | "time" | "duration" | "email" | "idn-email" | "hostname" | "idn-hostname" | "ipv4" | "ipv6" | "uri" | "uri-reference" | "iri" | "iri-reference" | "uuid" | "uri-template" | "json-pointer" | "relative-json-pointer" | "regex"; - contentMediaType?: string; - contentEncoding?: string; - contentSchema?: JsonSchema; -}; - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/v1/index.js b/node_modules/@hyperjump/json-schema/v1/index.js deleted file mode 100644 index 3743f600..00000000 --- a/node_modules/@hyperjump/json-schema/v1/index.js +++ /dev/null @@ -1,116 +0,0 @@ -import { defineVocabulary, loadDialect } from "../lib/keywords.js"; -import { registerSchema } from "../lib/index.js"; -import "../formats/lite.js"; - -import metaSchema from "./schema.js"; -import coreMetaSchema from "./meta/core.js"; -import applicatorMetaSchema from "./meta/applicator.js"; -import validationMetaSchema from "./meta/validation.js"; -import metaDataMetaSchema from "./meta/meta-data.js"; -import formatMetaSchema from "./meta/format.js"; -import contentMetaSchema from "./meta/content.js"; -import unevaluatedMetaSchema from "./meta/unevaluated.js"; - - -defineVocabulary("https://json-schema.org/v1/vocab/core", { - "$anchor": "https://json-schema.org/keyword/anchor", - "$comment": "https://json-schema.org/keyword/comment", - "$defs": "https://json-schema.org/keyword/definitions", - "$dynamicAnchor": "https://json-schema.org/keyword/dynamicAnchor", - "$dynamicRef": "https://json-schema.org/keyword/dynamicRef", - "$id": "https://json-schema.org/keyword/id", - "$ref": "https://json-schema.org/keyword/ref", - "$vocabulary": "https://json-schema.org/keyword/vocabulary" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/applicator", { - "additionalProperties": "https://json-schema.org/keyword/additionalProperties", - "allOf": "https://json-schema.org/keyword/allOf", - "anyOf": "https://json-schema.org/keyword/anyOf", - "contains": "https://json-schema.org/keyword/contains", - "minContains": "https://json-schema.org/keyword/minContains", - "maxContains": "https://json-schema.org/keyword/maxContains", - "dependentSchemas": "https://json-schema.org/keyword/dependentSchemas", - "if": "https://json-schema.org/keyword/if", - "then": "https://json-schema.org/keyword/then", - "else": "https://json-schema.org/keyword/else", - "conditional": "https://json-schema.org/keyword/conditional", - "items": "https://json-schema.org/keyword/items", - "itemPattern": "https://json-schema.org/keyword/itemPattern", - "not": "https://json-schema.org/keyword/not", - "oneOf": "https://json-schema.org/keyword/oneOf", - "patternProperties": "https://json-schema.org/keyword/patternProperties", - "prefixItems": "https://json-schema.org/keyword/prefixItems", - "properties": "https://json-schema.org/keyword/properties", - "propertyDependencies": "https://json-schema.org/keyword/propertyDependencies", - "propertyNames": "https://json-schema.org/keyword/propertyNames" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/validation", { - "const": "https://json-schema.org/keyword/const", - "dependentRequired": "https://json-schema.org/keyword/dependentRequired", - "enum": "https://json-schema.org/keyword/enum", - "exclusiveMaximum": "https://json-schema.org/keyword/exclusiveMaximum", - "exclusiveMinimum": "https://json-schema.org/keyword/exclusiveMinimum", - "maxItems": "https://json-schema.org/keyword/maxItems", - "maxLength": "https://json-schema.org/keyword/maxLength", - "maxProperties": "https://json-schema.org/keyword/maxProperties", - "maximum": "https://json-schema.org/keyword/maximum", - "minItems": "https://json-schema.org/keyword/minItems", - "minLength": "https://json-schema.org/keyword/minLength", - "minProperties": "https://json-schema.org/keyword/minProperties", - "minimum": "https://json-schema.org/keyword/minimum", - "multipleOf": "https://json-schema.org/keyword/multipleOf", - "requireAllExcept": "https://json-schema.org/keyword/requireAllExcept", - "pattern": "https://json-schema.org/keyword/pattern", - "required": "https://json-schema.org/keyword/required", - "type": "https://json-schema.org/keyword/type", - "uniqueItems": "https://json-schema.org/keyword/uniqueItems" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/meta-data", { - "default": "https://json-schema.org/keyword/default", - "deprecated": "https://json-schema.org/keyword/deprecated", - "description": "https://json-schema.org/keyword/description", - "examples": "https://json-schema.org/keyword/examples", - "readOnly": "https://json-schema.org/keyword/readOnly", - "title": "https://json-schema.org/keyword/title", - "writeOnly": "https://json-schema.org/keyword/writeOnly" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/format", { - "format": "https://json-schema.org/keyword/format" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/content", { - "contentEncoding": "https://json-schema.org/keyword/contentEncoding", - "contentMediaType": "https://json-schema.org/keyword/contentMediaType", - "contentSchema": "https://json-schema.org/keyword/contentSchema" -}); - -defineVocabulary("https://json-schema.org/v1/vocab/unevaluated", { - "unevaluatedItems": "https://json-schema.org/keyword/unevaluatedItems", - "unevaluatedProperties": "https://json-schema.org/keyword/unevaluatedProperties" -}); - -const dialectId = "https://json-schema.org/v1"; -loadDialect(dialectId, { - "https://json-schema.org/v1/vocab/core": true, - "https://json-schema.org/v1/vocab/applicator": true, - "https://json-schema.org/v1/vocab/validation": true, - "https://json-schema.org/v1/vocab/meta-data": true, - "https://json-schema.org/v1/vocab/format": true, - "https://json-schema.org/v1/vocab/content": true, - "https://json-schema.org/v1/vocab/unevaluated": true -}); - -registerSchema(metaSchema, dialectId); -registerSchema(coreMetaSchema, "https://json-schema.org/v1/meta/core"); -registerSchema(applicatorMetaSchema, "https://json-schema.org/v1/meta/applicator"); -registerSchema(validationMetaSchema, "https://json-schema.org/v1/meta/validation"); -registerSchema(metaDataMetaSchema, "https://json-schema.org/v1/meta/meta-data"); -registerSchema(formatMetaSchema, "https://json-schema.org/v1/meta/format"); -registerSchema(contentMetaSchema, "https://json-schema.org/v1/meta/content"); -registerSchema(unevaluatedMetaSchema, "https://json-schema.org/v1/meta/unevaluated"); - -export * from "../lib/index.js"; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/applicator.js b/node_modules/@hyperjump/json-schema/v1/meta/applicator.js deleted file mode 100644 index 47aabb2e..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/applicator.js +++ /dev/null @@ -1,73 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Applicator vocabulary meta-schema", - - "properties": { - "prefixItems": { "$ref": "#/$defs/schemaArray" }, - "items": { "$dynamicRef": "meta" }, - "contains": { "$dynamicRef": "meta" }, - "itemPattern": { "$ref": "#/$defs/itemPattern" }, - "additionalProperties": { "$dynamicRef": "meta" }, - "properties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" } - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" }, - "propertyNames": { "format": "regex" } - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" } - }, - "propertyDependencies": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" } - } - }, - "propertyNames": { "$dynamicRef": "meta" }, - "if": { "$dynamicRef": "meta" }, - "then": { "$dynamicRef": "meta" }, - "else": { "$dynamicRef": "meta" }, - "conditional": { - "type": "array", - "items": { - "if": { "type": "array" }, - "then": { - "items": { "$dynamicRef": "meta" } - }, - "else": { "$dynamicRef": "meta" } - } - }, - "allOf": { "$ref": "#/$defs/schemaArray" }, - "anyOf": { "$ref": "#/$defs/schemaArray" }, - "oneOf": { "$ref": "#/$defs/schemaArray" }, - "not": { "$dynamicRef": "meta" } - }, - - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$dynamicRef": "meta" } - }, - "itemPattern": { - "type": "array", - "itemPattern": [ - [ - { - "if": { "type": "array" }, - "then": { "$ref": "#/$defs/itemPattern" }, - "else": { "$dynamicRef": "meta" } - }, - { "enum": ["?", "*", "+"] }, "?", - "|", - { "const": "|" } - ], "*" - ] - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/content.js b/node_modules/@hyperjump/json-schema/v1/meta/content.js deleted file mode 100644 index 13d81dde..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/content.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Content vocabulary meta-schema", - - "properties": { - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "contentSchema": { "$dynamicRef": "meta" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/core.js b/node_modules/@hyperjump/json-schema/v1/meta/core.js deleted file mode 100644 index 10380051..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/core.js +++ /dev/null @@ -1,50 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Core vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$anchor": { "$ref": "#/$defs/anchor" }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$dynamicRef": { - "type": "string", - "pattern": "^#?[A-Za-z_][-A-Za-z0-9._]*$" - }, - "$dynamicAnchor": { "$ref": "#/$defs/anchor" }, - "$vocabulary": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { "type": "string" }, - "$defs": { - "type": "object", - "additionalProperties": { "$dynamicRef": "meta" } - } - }, - - "$defs": { - "anchor": { - "type": "string", - "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/format.js b/node_modules/@hyperjump/json-schema/v1/meta/format.js deleted file mode 100644 index 1b4afb96..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/format.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Format vocabulary meta-schema", - - "properties": { - "format": { "type": "string" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js b/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js deleted file mode 100644 index 9cdd1e0a..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/meta-data.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Meta-data vocabulary meta-schema", - - "properties": { - "title": { "type": "string" }, - "description": { "type": "string" }, - "default": true, - "deprecated": { "type": "boolean" }, - "readOnly": { "type": "boolean" }, - "writeOnly": { "type": "boolean" }, - "examples": { "type": "array" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js b/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js deleted file mode 100644 index d65d3723..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/unevaluated.js +++ /dev/null @@ -1,9 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Unevaluated applicator vocabulary meta-schema", - - "properties": { - "unevaluatedItems": { "$dynamicRef": "meta" }, - "unevaluatedProperties": { "$dynamicRef": "meta" } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/meta/validation.js b/node_modules/@hyperjump/json-schema/v1/meta/validation.js deleted file mode 100644 index c04e7ce6..00000000 --- a/node_modules/@hyperjump/json-schema/v1/meta/validation.js +++ /dev/null @@ -1,65 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "title": "Validation vocabulary meta-schema", - - "properties": { - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { "type": "number" }, - "exclusiveMaximum": { "type": "number" }, - "minimum": { "type": "number" }, - "exclusiveMinimum": { "type": "number" }, - "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "minLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "minItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "uniqueItems": { "type": "boolean" }, - "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "minContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "minProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "required": { "$ref": "#/$defs/stringArray" }, - "optional": { "$ref": "#/$defs/stringArray" }, - "dependentRequired": { - "type": "object", - "additionalProperties": { "$ref": "#/$defs/stringArray" } - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "type": { - "anyOf": [ - { "$ref": "#/$defs/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/$defs/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - } - }, - - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "simpleTypes": { - "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true - } - } -}; diff --git a/node_modules/@hyperjump/json-schema/v1/schema.js b/node_modules/@hyperjump/json-schema/v1/schema.js deleted file mode 100644 index 189e2e5a..00000000 --- a/node_modules/@hyperjump/json-schema/v1/schema.js +++ /dev/null @@ -1,24 +0,0 @@ -export default { - "$schema": "https://json-schema.org/v1", - "$vocabulary": { - "https://json-schema.org/v1/vocab/core": true, - "https://json-schema.org/v1/vocab/applicator": true, - "https://json-schema.org/v1/vocab/unevaluated": true, - "https://json-schema.org/v1/vocab/validation": true, - "https://json-schema.org/v1/vocab/meta-data": true, - "https://json-schema.org/v1/vocab/format": true, - "https://json-schema.org/v1/vocab/content": true - }, - "title": "Core and Validation specifications meta-schema", - - "$dynamicAnchor": "meta", - - "allOf": [ - { "$ref": "/v1/meta/core" }, - { "$ref": "/v1/meta/applicator" }, - { "$ref": "/v1/meta/validation" }, - { "$ref": "/v1/meta/meta-data" }, - { "$ref": "/v1/meta/format" }, - { "$ref": "/v1/meta/content" } - ] -}; diff --git a/node_modules/@hyperjump/pact/LICENSE b/node_modules/@hyperjump/pact/LICENSE deleted file mode 100644 index 6e9846cf..00000000 --- a/node_modules/@hyperjump/pact/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/pact/README.md b/node_modules/@hyperjump/pact/README.md deleted file mode 100644 index 32c4cf04..00000000 --- a/node_modules/@hyperjump/pact/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# Hyperjump Pact - -Hyperjump Pact is a utility library that provides higher order functions for -working with iterators and async iterators. - -## Installation -Designed for node.js (ES Modules, TypeScript) and browsers. - -```bash -npm install @hyperjump/pact --save -``` - -## Usage - -```javascript -import { pipe, range, map, filter, reduce } from "@hyperjump/pact"; - - -const result = pipe( - range(1, 10), - filter((n) => n % 2 === 0), - map((n) => n * 2), - reduce((sum, n) => sum + n, 0) -); -console.log(result); -``` - -```javascript -import { pipe, asyncMap, asyncFilter, asyncReduce } from "@hyperjump/pact"; -// You can alternatively import the async functions without the prefix -// import { pipe, map, filter, reduce } from "@hyperjump/pact/async"; - - -const asyncSequence = async function* () { - yield 1; - yield 2; - yield 3; - yield 4; - yield 5; -}; - -for await (const value of asyncSequence()) { - console.log(value); -} - -const result = await pipe( - asyncSequence(), - asyncFilter((n) => n % 2 === 0), - asyncMap((n) => n * 2), - asyncReduce((sum, n) => sum + n, 0) -); -console.log(result); -``` - -## API - -https://pact.hyperjump.io - -## Contributing - -### Tests - -Run the tests - -```bash -npm test -``` - -Run the tests with a continuous test runner - -```bash -npm test -- --watch -``` - -[hyperjump]: https://github.com/hyperjump-io/browser -[jref]: https://github.com/hyperjump-io/browser/blob/master/src/json-reference/README.md diff --git a/node_modules/@hyperjump/pact/package.json b/node_modules/@hyperjump/pact/package.json deleted file mode 100644 index b478643c..00000000 --- a/node_modules/@hyperjump/pact/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@hyperjump/pact", - "version": "1.4.0", - "description": "Higher order functions for iterators and async iterators", - "type": "module", - "main": "./src/index.js", - "exports": { - ".": "./src/index.js", - "./async": "./src/async.js" - }, - "scripts": { - "lint": "eslint src", - "test": "vitest --watch=false", - "type-check": "tsc --noEmit", - "docs": "typedoc --excludeExternals" - }, - "repository": "github:hyperjump-io/pact", - "keywords": [ - "Hyperjump", - "Promise", - "higher order functions", - "iterator", - "async iterator", - "generator", - "async generator", - "async" - ], - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "^22.13.5", - "@typescript-eslint/eslint-plugin": "*", - "@typescript-eslint/parser": "*", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "typedoc": "^0.27.9", - "typescript-eslint": "*", - "vitest": "*" - } -} diff --git a/node_modules/@hyperjump/pact/src/async.js b/node_modules/@hyperjump/pact/src/async.js deleted file mode 100644 index e01e4b43..00000000 --- a/node_modules/@hyperjump/pact/src/async.js +++ /dev/null @@ -1,24 +0,0 @@ -export { - asyncMap as map, - asyncTap as tap, - asyncFilter as filter, - asyncScan as scan, - asyncFlatten as flatten, - asyncDrop as drop, - asyncTake as take, - asyncHead as head, - range, - asyncEmpty as empty, - asyncZip as zip, - asyncConcat as concat, - asyncReduce as reduce, - asyncEvery as every, - asyncSome as some, - asyncCount as count, - asyncCollectArray as collectArray, - asyncCollectSet as collectSet, - asyncCollectMap as collectMap, - asyncCollectObject as collectObject, - asyncJoin as join, - pipe -} from "./index.js"; diff --git a/node_modules/@hyperjump/pact/src/curry.d.ts b/node_modules/@hyperjump/pact/src/curry.d.ts deleted file mode 100644 index 17ea2fd4..00000000 --- a/node_modules/@hyperjump/pact/src/curry.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const curry: ( - (curriedFn: (a: A) => (iterable: I) => R) => ( - (a: A, iterable: I) => R - ) & ( - (a: A) => (iterable: I) => R - ) -) & ( - (curriedFn: (a: A, b: B) => (iterable: I) => R) => ( - (a: A, b: B, iterable: I) => R - ) & ( - (a: A, b: B) => (iterable: I) => R - ) -); diff --git a/node_modules/@hyperjump/pact/src/curry.js b/node_modules/@hyperjump/pact/src/curry.js deleted file mode 100644 index 862c56f7..00000000 --- a/node_modules/@hyperjump/pact/src/curry.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @import * as API from "./curry.d.ts" - */ - - -// eslint-disable-next-line @stylistic/no-extra-parens -export const curry = /** @type API.curry */ ((fn) => (...args) => { - /** @typedef {Parameters>[0]} I */ - - const firstApplication = fn.length === 1 - ? /** @type Extract any> */ (fn)(args[0]) - : fn(args[0], args[1]); - const iterable = /** @type I */ (args[fn.length]); // eslint-disable-line @typescript-eslint/no-unsafe-assignment - return iterable === undefined ? firstApplication : firstApplication(iterable); -}); diff --git a/node_modules/@hyperjump/pact/src/index.d.ts b/node_modules/@hyperjump/pact/src/index.d.ts deleted file mode 100644 index 2b31bdc6..00000000 --- a/node_modules/@hyperjump/pact/src/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -import type { LastReturnType } from "./type-utils.d.ts"; - - -/** - * Apply a function to every value in the iterator - */ -export const map: ( - (fn: Mapper, iterator: Iterable) => Generator -) & ( - (fn: Mapper) => (iterator: Iterable) => Generator -); -export type Mapper = (item: A) => B; - -/** - * Same as `map`, but works with AsyncIterables and async mapping functions. - */ -export const asyncMap: ( - (fn: AsyncMapper, iterator: Iterable | AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncMapper) => (iterator: Iterable | AsyncIterable) => AsyncGenerator -); -export type AsyncMapper = (item: A) => Promise | B; - -/** - * Apply a function to every value in the iterator, but yield the original - * value, not the result of the function. - */ -export const tap: ( - (fn: Tapper, iterator: Iterable) => Generator -) & ( - (fn: Tapper) => (iterator: Iterable) => Generator -); -export type Tapper = (item: A) => void; - -/** - * Same as `tap`, but works with AsyncIterables. - */ -export const asyncTap: ( - (fn: AsyncTapper, iterator: AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncTapper) => (iterator: AsyncIterable) => AsyncGenerator -); -export type AsyncTapper = (item: A) => Promise | void; - -/** - * Yields only the values in the iterator that pass the predicate function. - */ -export const filter: ( - (fn: Predicate, iterator: Iterable) => Generator -) & ( - (fn: Predicate) => (iterator: Iterable) => Generator -); -export type Predicate = (item: A) => boolean; - -/** - * Same as `filter`, but works with AsyncIterables and async predicate - * functions. - */ -export const asyncFilter: ( - (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => AsyncGenerator -); -export type AsyncPredicate = (item: A) => Promise | boolean; - -/** - * Same as `reduce` except it emits the accumulated value after each update - */ -export const scan: ( - (fn: Reducer, acc: B, iter: Iterable) => Generator -) & ( - (fn: Reducer, acc: B) => (iter: Iterable) => Generator -); - -/** - * Same as `scan`, but works with AsyncIterables and async predicate - * functions. - */ -export const asyncScan: ( - (fn: AsyncReducer, acc: B, iter: Iterable | AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncReducer, acc: B) => (iter: Iterable | AsyncIterable) => AsyncGenerator -); - -/** - * Yields values from the iterator with all sub-iterator elements concatenated - * into it recursively up to the specified depth. - */ -export const flatten: (iterator: NestedIterable, depth?: number) => Generator>; -export type NestedIterable = Iterable>; - -/** - * Same as `flatten`, but works with AsyncGenerators. - */ -export const asyncFlatten: (iterator: NestedIterable | NestedAsyncIterable, depth?: number) => AsyncGenerator | NestedAsyncIterable>; -export type NestedAsyncIterable = AsyncIterable | NestedIterable>; - -/** - * Yields all the values in the iterator except for the first `n` values. - */ -export const drop: ( - (count: number, iterator: Iterable) => Generator -) & ( - (count: number) => (iterator: Iterable) => Generator -); - -/** - * Same as `drop`, but works with AsyncIterables. - */ -export const asyncDrop: ( - (count: number, iterator: AsyncIterable) => AsyncGenerator -) & ( - (count: number) => (iterator: AsyncIterable) => AsyncGenerator -); - -/** - * Same as `drop` but instead of dropping a specific number of values, it drops - * values until the `fn(value)` is `false` and then yields the remaining values. - */ -export const dropWhile: ( - (fn: Predicate, iterator: Iterable) => Generator -) & ( - (fn: Predicate) => (iterator: Iterable) => Generator -); - -/** - * Same as `dropWhile`, but works with AsyncIterables. - */ -export const asyncDropWhile: ( - (fn: AsyncPredicate, iterator: AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncPredicate) => (iterator: AsyncIterable) => AsyncGenerator -); - -/** - * Yields the first `n` values in the iterator. - */ -export const take: ( - (count: number, iterator: Iterable) => Generator -) & ( - (count: number) => (iterator: Iterable) => Generator -); - -/** - * Same as `take`, but works with AsyncIterables. - */ -export const asyncTake: ( - (count: number, iterator: AsyncIterable) => AsyncGenerator -) & ( - (count: number) => (iterator: AsyncIterable) => AsyncGenerator -); - -/** - * Same as `take` but instead of yielding a specific number of values, it yields - * values as long as the `fn(value)` returns `true` and drops the rest. - */ -export const takeWhile: ( - (fn: Predicate, iterator: Iterable) => Generator -) & ( - (fn: Predicate) => (iterator: Iterable) => Generator -); - -/** - * Same as `takeWhile`, but works with AsyncGenerators. - */ -export const asyncTakeWhile: ( - (fn: AsyncPredicate, iterator: AsyncIterable) => AsyncGenerator -) & ( - (fn: AsyncPredicate) => (iterator: AsyncIterable) => AsyncGenerator -); - -/** - * Returns the first value in the iterator. - */ -export const head: (iterator: Iterable) => A | undefined; - -/** - * Same as `head`, but works with AsyncGenerators. - */ -export const asyncHead: (iterator: AsyncIterable) => Promise; - -/** - * Yields numbers starting from `from` until `to`. If `to` is not passed, the - * iterator will be infinite. - */ -export const range: (from: number, to?: number) => Generator; - -/** - * Yields nothing. - */ -export const empty: () => Generator; - -/** - * Yields nothing asynchronously. - */ -export const asyncEmpty: () => AsyncGenerator; - -/** - * Yields tuples containing a value from each iterator. The iterator will have - * the same length as `iter1`. If `iter1` is longer than `iter2`, the second - * value of the tuple will be undefined. If `iter2` is longer than `iter1`, the - * remaining values in `iter2` will be ignored. - */ -export const zip: (iter1: Iterable, iter2: Iterable) => Generator<[A, B]>; - -/** - * Same as `zip` but works with AsyncIterables. - */ -export const asyncZip: (iter1: AsyncIterable, iter2: AsyncIterable) => AsyncGenerator<[A, B]>; - -/** - * Yields values from each iterator in order. - */ -export const concat: (...iters: Iterable[]) => Generator; - -/** - * Same as `concat` but works with AsyncIterables. - */ -export const asyncConcat: (...iters: (Iterable | AsyncIterable)[]) => AsyncGenerator; - -/** - * Reduce an iterator to a single value. - */ -export const reduce: ( - (fn: Reducer, acc: B, iter: Iterable) => B -) & ( - (fn: Reducer, acc: B) => (iter: Iterable) => B -); -export type Reducer = (acc: B, item: A) => B; - -/** - * Same as `reduce`, but works with AsyncGenerators and async reducer functions. - */ -export const asyncReduce: ( - (fn: AsyncReducer, acc: B, iter: Iterable | AsyncIterable) => Promise -) & ( - (fn: AsyncReducer, acc: B) => (iter: Iterable | AsyncIterable) => Promise -); -export type AsyncReducer = (acc: B, item: A) => Promise | B; - -/** - * Returns a boolean indicating whether or not all values in the iterator passes - * the predicate function. - */ -export const every: ( - (fn: Predicate, iterator: Iterable) => boolean -) & ( - (fn: Predicate) => (iterator: Iterable) => boolean -); - -/** - * Same as `every`, but works with AsyncIterables and async predicate functions. - */ -export const asyncEvery: ( - (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise -) & ( - (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise -); - -/** - * Returns a boolean indicating whether or not there exists a value in the - * iterator that passes the predicate function. - */ -export const some: ( - (fn: Predicate, iterator: Iterable) => boolean -) & ( - (fn: Predicate) => (iterator: Iterable) => boolean -); - -/** - * Same as `some`, but works with AsyncIterables and async predicate functions. - */ -export const asyncSome: ( - (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise -) & ( - (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise -); - -/** - * Returns the first value that passes the predicate function. - */ -export const find: ( - (fn: Predicate, iterator: Iterable) => A -) & ( - (fn: Predicate) => (iterator: Iterable) => A -); - -/** - * Same as `find`, but works with AsyncIterables and async predicate functions. - */ -export const asyncFind: ( - (fn: AsyncPredicate, iterator: Iterable | AsyncIterable) => Promise -) & ( - (fn: AsyncPredicate) => (iterator: Iterable | AsyncIterable) => Promise -); - -/** - * Returns the number of items in the iterator. - */ -export const count: (iterator: Iterable) => number; - -/** - * Same as `count`, but works with AsyncIterables. - */ -export const asyncCount: (iterator: AsyncIterable) => Promise; - -/** - * Collect all the items in the iterator into an array. - */ -export const collectArray: (iterator: Iterable) => A[]; - -/** - * Same as `collectArray`, but works with AsyncIterables. - */ -export const asyncCollectArray: (iterator: AsyncIterable) => Promise; - -/** - * Collect all the items in the iterator into a Set. - */ -export const collectSet: (iterator: Iterable) => Set; - -/** - * Same as `collectSet`, but works with AsyncIterables. - */ -export const asyncCollectSet: (iterator: AsyncIterable) => Promise>; - -/** - * Collect all the key/value tuples in the iterator into a Map. - */ -export const collectMap: (iterator: Iterable<[A, B]>) => Map; - -/** - * Same as `collectMap`, but works with AsyncGenerators. - */ -export const asyncCollectMap: (iterator: AsyncIterable<[A, B]>) => Promise>; - -/** - * Collect all the key/value tuples in the iterator into an Object. - */ -export const collectObject: (iterator: Iterable<[string, A]>) => Record; - -/** - * Same as `collectObject`, but works with AsyncGenerators. - */ -export const asyncCollectObject: (iterator: AsyncIterable<[string, A]>) => Promise>; - -/** - * Collect all the items in the iterator into a string separated by the - * separator token. - */ -export const join: ( - (separator: string, iterator: Iterable) => string -) & ( - (separator: string) => (iterator: Iterable) => string -); - -/** - * Same as `join`, but works with AsyncIterables. - */ -export const asyncJoin: ( - (separator: string, iterator: AsyncIterable) => Promise -) & ( - (separator: string) => (iterator: AsyncIterable) => Promise -); - -/** - * Starting with an iterator, apply any number of functions to transform the - * values and return the result. - */ -export const pipe: ( - (initialValue: A, ...fns: [ - (a: A) => B - ]) => B -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C - ]) => C -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D - ]) => D -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (c: D) => E - ]) => E -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F - ]) => F -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F, - (f: F) => G - ]) => G -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F, - (f: F) => G, - (g: G) => H - ]) => H -) & ( - (initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F, - (f: F) => G, - (g: G) => H, - (h: H) => I - ]) => I -) & ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - any)[]>(initialValue: A, ...fns: [ - (a: A) => B, - (b: B) => C, - (c: C) => D, - (d: D) => E, - (e: E) => F, - (f: F) => G, - (g: G) => H, - (h: H) => I, - ...J - ]) => LastReturnType -); diff --git a/node_modules/@hyperjump/pact/src/index.js b/node_modules/@hyperjump/pact/src/index.js deleted file mode 100644 index e7ee8d8c..00000000 --- a/node_modules/@hyperjump/pact/src/index.js +++ /dev/null @@ -1,487 +0,0 @@ -/** - * @module pact - */ - -import { curry } from "./curry.js"; - -/** - * @import { AsyncIterableItem, IterableItem } from "./type-utils.d.ts" - * @import * as API from "./index.d.ts" - */ - - -/** @type API.map */ -export const map = curry((fn) => function* (iter) { - for (const n of iter) { - yield fn(n); - } -}); - -/** @type API.asyncMap */ -export const asyncMap = curry((fn) => async function* (iter) { - for await (const n of iter) { - yield fn(n); - } -}); - -/** @type API.tap */ -export const tap = curry((fn) => function* (iter) { - for (const n of iter) { - fn(n); - yield n; - } -}); - -/** @type API.asyncTap */ -export const asyncTap = curry((fn) => async function* (iter) { - for await (const n of iter) { - await fn(n); - yield n; - } -}); - -/** @type API.filter */ -export const filter = curry((fn) => function* (iter) { - for (const n of iter) { - if (fn(n)) { - yield n; - } - } -}); - -/** @type API.asyncFilter */ -export const asyncFilter = curry((fn) => async function* (iter) { - for await (const n of iter) { - if (await fn(n)) { - yield n; - } - } -}); - - -export const scan = /** @type API.scan */ (curry( - // eslint-disable-next-line @stylistic/no-extra-parens - /** @type API.scan */ ((fn, acc) => function* (iter) { - for (const item of iter) { - acc = fn(acc, /** @type any */ (item)); - yield acc; - } - }) -)); - - -export const asyncScan = /** @type API.asyncScan */ (curry( - // eslint-disable-next-line @stylistic/no-extra-parens - /** @type API.asyncScan */ ((fn, acc) => async function* (iter) { - for await (const item of iter) { - acc = await fn(acc, /** @type any */ (item)); - yield acc; - } - }) -)); - -/** @type API.flatten */ -export const flatten = function* (iter, depth = 1) { - for (const n of iter) { - if (depth > 0 && n && typeof n === "object" && Symbol.iterator in n) { - yield* flatten(n, depth - 1); - } else { - yield n; - } - } -}; - -/** @type API.asyncFlatten */ -export const asyncFlatten = async function* (iter, depth = 1) { - for await (const n of iter) { - if (depth > 0 && n && typeof n === "object" && (Symbol.asyncIterator in n || Symbol.iterator in n)) { - yield* asyncFlatten(n, depth - 1); - } else { - yield n; - } - } -}; - -/** @type API.drop */ -export const drop = curry((count) => function* (iter) { - let index = 0; - for (const item of iter) { - if (index++ >= count) { - yield item; - } - } -}); - -/** @type API.asyncDrop */ -export const asyncDrop = curry((count) => async function* (iter) { - let index = 0; - for await (const item of iter) { - if (index++ >= count) { - yield item; - } - } -}); - -/** @type API.dropWhile */ -export const dropWhile = curry((fn) => function* (iter) { - let dropping = true; - for (const n of iter) { - if (dropping) { - if (fn(n)) { - continue; - } else { - dropping = false; - } - } - - yield n; - } -}); - -/** @type API.asyncDropWhile */ -export const asyncDropWhile = curry((fn) => async function* (iter) { - let dropping = true; - for await (const n of iter) { - if (dropping) { - if (await fn(n)) { - continue; - } else { - dropping = false; - } - } - - yield n; - } -}); - -/** @type API.take */ -export const take = curry((count) => function* (iter) { - const iterator = getIterator(iter); - - let current; - while (count-- > 0 && !(current = iterator.next())?.done) { - yield current.value; - } -}); - -/** @type API.asyncTake */ -export const asyncTake = curry((count) => async function* (iter) { - const iterator = getAsyncIterator(iter); - - let current; - while (count-- > 0 && !(current = await iterator.next())?.done) { - yield current.value; - } -}); - -/** @type API.takeWhile */ -export const takeWhile = curry((fn) => function* (iter) { - for (const n of iter) { - if (fn(n)) { - yield n; - } else { - break; - } - } -}); - -/** @type API.asyncTakeWhile */ -export const asyncTakeWhile = curry((fn) => async function* (iter) { - for await (const n of iter) { - if (await fn(n)) { - yield n; - } else { - break; - } - } -}); - -/** @type API.head */ -export const head = (iter) => { - const iterator = getIterator(iter); - const result = iterator.next(); - - return result.done ? undefined : result.value; -}; - -/** @type API.asyncHead */ -export const asyncHead = async (iter) => { - const iterator = getAsyncIterator(iter); - const result = await iterator.next(); - - return result.done ? undefined : result.value; -}; - -/** @type API.range */ -export const range = function* (from, to) { - for (let n = from; to === undefined || n < to; n++) { - yield n; - } -}; - -/** @type API.empty */ -export const empty = function* () {}; - -/** @type API.asyncEmpty */ -export const asyncEmpty = async function* () {}; - -/** @type API.zip */ -export const zip = function* (a, b) { - const bIter = getIterator(b); - for (const item1 of a) { - yield [item1, bIter.next().value]; - } -}; - -/** @type API.asyncZip */ -export const asyncZip = async function* (a, b) { - const bIter = getAsyncIterator(b); - for await (const item1 of a) { - yield [item1, (await bIter.next()).value]; - } -}; - -/** @type API.concat */ -export const concat = function* (...iters) { - for (const iter of iters) { - yield* iter; - } -}; - -/** @type API.asyncConcat */ -export const asyncConcat = async function* (...iters) { - for (const iter of iters) { - yield* iter; - } -}; - -export const reduce = /** @type API.reduce */ (curry( - // eslint-disable-next-line @stylistic/no-extra-parens - /** @type API.reduce */ ((fn, acc) => (iter) => { - for (const item of iter) { - acc = fn(acc, /** @type any */ (item)); - } - - return acc; - }) -)); - - -export const asyncReduce = /** @type API.asyncReduce */ (curry( - // eslint-disable-next-line @stylistic/no-extra-parens - /** @type API.asyncReduce */ ((fn, acc) => async (iter) => { - for await (const item of iter) { - acc = await fn(acc, /** @type any */ (item)); - } - - return acc; - }) -)); - -/** @type API.every */ -export const every = curry((fn) => (iter) => { - for (const item of iter) { - if (!fn(item)) { - return false; - } - } - - return true; -}); - -/** @type API.asyncEvery */ -export const asyncEvery = curry((fn) => async (iter) => { - for await (const item of iter) { - if (!await fn(item)) { - return false; - } - } - - return true; -}); - -/** @type API.some */ -export const some = curry((fn) => (iter) => { - for (const item of iter) { - if (fn(item)) { - return true; - } - } - - return false; -}); - -/** @type API.asyncSome */ -export const asyncSome = curry((fn) => async (iter) => { - for await (const item of iter) { - if (await fn(item)) { - return true; - } - } - - return false; -}); - -/** @type API.find */ -export const find = curry((fn) => (iter) => { - for (const item of iter) { - if (fn(item)) { - return item; - } - } -}); - -/** @type API.asyncFind */ -export const asyncFind = curry((fn) => async (iter) => { - for await (const item of iter) { - if (await fn(item)) { - return item; - } - } -}); - -/** @type API.count */ -export const count = (iter) => reduce((count) => count + 1, 0, iter); - -/** @type API.asyncCount */ -export const asyncCount = (iter) => asyncReduce((count) => count + 1, 0, iter); - -/** @type API.collectArray */ -export const collectArray = (iter) => [...iter]; - -/** @type API.asyncCollectArray */ -export const asyncCollectArray = async (iter) => { - const result = []; - for await (const item of iter) { - result.push(item); - } - - return result; -}; - -/** @type API.collectSet */ -export const collectSet = (iter) => { - /** @type Set> */ - const result = new Set(); - for (const item of iter) { - result.add(item); - } - - return result; -}; - -/** @type API.asyncCollectSet */ -export const asyncCollectSet = async (iter) => { - /** @type Set> */ - const result = new Set(); - for await (const item of iter) { - result.add(item); - } - - return result; -}; - -/** @type API.collectMap */ -export const collectMap = (iter) => { - /** @typedef {IterableItem[0]} K */ - /** @typedef {IterableItem[1]} V */ - - /** @type Map */ - const result = new Map(); - for (const [key, value] of iter) { - result.set(key, value); - } - - return result; -}; - -/** @type API.asyncCollectMap */ -export const asyncCollectMap = async (iter) => { - /** @typedef {AsyncIterableItem[0]} K */ - /** @typedef {AsyncIterableItem[1]} V */ - - /** @type Map */ - const result = new Map(); - for await (const [key, value] of iter) { - result.set(key, value); - } - - return result; -}; - -/** @type API.collectObject */ -export const collectObject = (iter) => { - /** @typedef {IterableItem[1]} V */ - - /** @type Record */ - const result = Object.create(null); // eslint-disable-line @typescript-eslint/no-unsafe-assignment - for (const [key, value] of iter) { - result[key] = value; - } - - return result; -}; - -/** @type API.asyncCollectObject */ -export const asyncCollectObject = async (iter) => { - /** @typedef {AsyncIterableItem[1]} V */ - - /** @type Record */ - const result = Object.create(null); // eslint-disable-line @typescript-eslint/no-unsafe-assignment - for await (const [key, value] of iter) { - result[key] = value; - } - - return result; -}; - -/** @type API.join */ -export const join = curry((separator) => (iter) => { - let result = head(iter) ?? ""; - - for (const n of iter) { - result += separator + n; - } - - return result; -}); - -/** @type API.asyncJoin */ -export const asyncJoin = curry((separator) => async (iter) => { - let result = await asyncHead(iter) ?? ""; - - for await (const n of iter) { - result += separator + n; - } - - return result; -}); - -/** @type (iter: Iterable) => Iterator */ -const getIterator = (iter) => { - if (typeof iter?.[Symbol.iterator] === "function") { - return iter[Symbol.iterator](); - } else { - throw TypeError("`iter` is not iterable"); - } -}; - -/** @type (iter: Iterable | AsyncIterable) => AsyncIterator */ -const getAsyncIterator = (iter) => { - if (Symbol.asyncIterator in iter && typeof iter[Symbol.asyncIterator] === "function") { - return iter[Symbol.asyncIterator](); - } else if (Symbol.iterator in iter && typeof iter[Symbol.iterator] === "function") { - return asyncMap((a) => a, iter); - } else { - throw TypeError("`iter` is not iterable"); - } -}; - -/** @type API.pipe */ -// eslint-disable-next-line @stylistic/no-extra-parens -export const pipe = /** @type (acc: any, ...fns: ((a: any) => any)[]) => any */ ( - (acc, ...fns) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return reduce((acc, fn) => fn(acc), acc, fns); - } -); diff --git a/node_modules/@hyperjump/pact/src/type-utils.d.ts b/node_modules/@hyperjump/pact/src/type-utils.d.ts deleted file mode 100644 index b808ebc1..00000000 --- a/node_modules/@hyperjump/pact/src/type-utils.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type IterableItem = T extends Iterable ? U : never; -export type AsyncIterableItem = T extends AsyncIterable ? U : never; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -type LastReturnType any)[]> = T extends [...any, (...args: any) => infer R] ? R : never; diff --git a/node_modules/@hyperjump/uri/LICENSE b/node_modules/@hyperjump/uri/LICENSE deleted file mode 100644 index 6e9846cf..00000000 --- a/node_modules/@hyperjump/uri/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Hyperjump Software, LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@hyperjump/uri/README.md b/node_modules/@hyperjump/uri/README.md deleted file mode 100644 index 79bfc451..00000000 --- a/node_modules/@hyperjump/uri/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# URI -A small and fast library for validating, parsing, and resolving URIs -([RFC 3986](https://www.rfc-editor.org/rfc/rfc3986)) and IRIs -([RFC 3987](https://www.rfc-editor.org/rfc/rfc3987)). - -## Install -Designed for node.js (ES Modules, TypeScript) and browsers. - -``` -npm install @hyperjump/uri -``` - -## Usage -```javascript -import { resolveUri, parseUri, isUri, isIri } from "@hyperjump/uri" - -const resolved = resolveUri("foo/bar", "http://example.com/aaa/bbb"); // https://example.com/aaa/foo/bar - -const components = parseUri("https://jason@example.com:80/foo?bar#baz"); // { -// scheme: "https", -// authority: "jason@example.com:80", -// userinfo: "jason", -// host: "example.com", -// port: "80", -// path: "/foo", -// query: "bar", -// fragment: "baz" -// } - -const a = isUri("http://examplé.org/rosé#"); // false -const a = isIri("http://examplé.org/rosé#"); // true -``` - -## API -### Resolve Relative References -These functions resolve relative-references against a base URI/IRI. The base -URI/IRI must be absolute, meaning it must have a scheme (`https`) and no -fragment (`#foo`). The resolution process will [normalize](#normalize) the -result. - -* **resolveUri**: (uriReference: string, baseUri: string) => string -* **resolveIri**: (iriReference: string, baseIri: string) => string - -### Normalize -These functions apply the following normalization rules. -1. Decode any unnecessarily percent-encoded characters. -2. Convert any lowercase characters in the hex numbers of percent-encoded - characters to uppercase. -3. Resolve and remove any dot-segments (`/.`, `/..`) in paths. -4. Convert the scheme to lowercase. -5. Convert the authority to lowercase. - -* **normalizeUri**: (uri: string) => string -* **normalizeIri**: (iri: string) => string - -### To Relative -These functions convert a non-relative URI/IRI into a relative URI/IRI given a -base. - -* **toRelativeUri**: (uri: string, relativeTo: string) => string -* **toRelativeIri**: (iri: string, relativeTo: string) => string - -### URI -A [URI](https://www.rfc-editor.org/rfc/rfc3986#section-3) is not relative and -may include a fragment. - -* **isUri**: (value: string) => boolean -* **parseUri**: (value: string) => IdentifierComponents -* **toAbsoluteUri**: (value: string) => string - - Takes a URI and strips its fragment component if it exists. - -### URI-Reference -A [URI-reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.1) may be -relative. - -* **isUriReference**: (value: string) => boolean -* **parseUriReference**: (value: string) => IdentifierComponents - -### absolute-URI -An [absolute-URI](https://www.rfc-editor.org/rfc/rfc3986#section-4.3) is not -relative an does not include a fragment. - -* **isAbsoluteUri**: (value: string) => boolean -* **parseAbsoluteUri**: (value: string) => IdentifierComponents - -### IRI -An IRI is not relative and may include a fragment. - -* **isIri**: (value: string) => boolean -* **parseIri**: (value: string) => IdentifierComponents -* **toAbsoluteIri**: (value: string) => string - - Takes an IRI and strips its fragment component if it exists. - -### IRI-reference -An IRI-reference may be relative. - -* **isIriReference**: (value: string) => boolean -* **parseIriReference**: (value: string) => IdentifierComponents - -### absolute-IRI -An absolute-IRI is not relative an does not include a fragment. - -* **isAbsoluteIri**: (value: string) => boolean -* **parseAbsoluteIri**: (value: string) => IdentifierComponents - -### Types -* **IdentifierComponents** - * **scheme**: string - * **authority**: string - * **userinfo**: string - * **host**: string - * **port**: string - * **path**: string - * **query**: string - * **fragment**: string - -## Contributing -### Tests -Run the tests -``` -npm test -``` - -Run the tests with a continuous test runner -``` -npm test -- --watch -``` diff --git a/node_modules/@hyperjump/uri/package.json b/node_modules/@hyperjump/uri/package.json deleted file mode 100644 index f2753292..00000000 --- a/node_modules/@hyperjump/uri/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "@hyperjump/uri", - "version": "1.3.2", - "description": "A small and fast library for validating parsing and resolving URIs and IRIs", - "type": "module", - "main": "./lib/index.js", - "exports": "./lib/index.js", - "scripts": { - "lint": "eslint lib", - "test": "vitest --watch=false", - "type-check": "tsc --noEmit" - }, - "repository": "github:hyperjump-io/uri", - "author": "Jason Desrosiers ", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jdesrosiers" - }, - "keywords": [ - "URI", - "IRI", - "resolve", - "relative", - "parse", - "RFC3986", - "RFC-3986", - "RFC3987", - "RFC-3987" - ], - "devDependencies": { - "@stylistic/eslint-plugin": "*", - "@types/node": "^22.13.0", - "eslint-import-resolver-typescript": "*", - "eslint-plugin-import": "*", - "typescript-eslint": "*", - "vitest": "*" - } -} diff --git a/node_modules/content-type/HISTORY.md b/node_modules/content-type/HISTORY.md deleted file mode 100644 index 45836713..00000000 --- a/node_modules/content-type/HISTORY.md +++ /dev/null @@ -1,29 +0,0 @@ -1.0.5 / 2023-01-29 -================== - - * perf: skip value escaping when unnecessary - -1.0.4 / 2017-09-11 -================== - - * perf: skip parameter parsing when no parameters - -1.0.3 / 2017-09-10 -================== - - * perf: remove argument reassignment - -1.0.2 / 2016-05-09 -================== - - * perf: enable strict mode - -1.0.1 / 2015-02-13 -================== - - * Improve missing `Content-Type` header error message - -1.0.0 / 2015-02-01 -================== - - * Initial implementation, derived from `media-typer@0.3.0` diff --git a/node_modules/content-type/LICENSE b/node_modules/content-type/LICENSE deleted file mode 100644 index 34b1a2de..00000000 --- a/node_modules/content-type/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/content-type/README.md b/node_modules/content-type/README.md deleted file mode 100644 index c1a922a9..00000000 --- a/node_modules/content-type/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# content-type - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -Create and parse HTTP Content-Type header according to RFC 7231 - -## Installation - -```sh -$ npm install content-type -``` - -## API - -```js -var contentType = require('content-type') -``` - -### contentType.parse(string) - -```js -var obj = contentType.parse('image/svg+xml; charset=utf-8') -``` - -Parse a `Content-Type` header. This will return an object with the following -properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): - - - `type`: The media type (the type and subtype, always lower case). - Example: `'image/svg+xml'` - - - `parameters`: An object of the parameters in the media type (name of parameter - always lower case). Example: `{charset: 'utf-8'}` - -Throws a `TypeError` if the string is missing or invalid. - -### contentType.parse(req) - -```js -var obj = contentType.parse(req) -``` - -Parse the `Content-Type` header from the given `req`. Short-cut for -`contentType.parse(req.headers['content-type'])`. - -Throws a `TypeError` if the `Content-Type` header is missing or invalid. - -### contentType.parse(res) - -```js -var obj = contentType.parse(res) -``` - -Parse the `Content-Type` header set on the given `res`. Short-cut for -`contentType.parse(res.getHeader('content-type'))`. - -Throws a `TypeError` if the `Content-Type` header is missing or invalid. - -### contentType.format(obj) - -```js -var str = contentType.format({ - type: 'image/svg+xml', - parameters: { charset: 'utf-8' } -}) -``` - -Format an object into a `Content-Type` header. This will return a string of the -content type for the given object with the following properties (examples are -shown that produce the string `'image/svg+xml; charset=utf-8'`): - - - `type`: The media type (will be lower-cased). Example: `'image/svg+xml'` - - - `parameters`: An object of the parameters in the media type (name of the - parameter will be lower-cased). Example: `{charset: 'utf-8'}` - -Throws a `TypeError` if the object contains an invalid type or parameter names. - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/content-type/master?label=ci -[ci-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/content-type/master -[coveralls-url]: https://coveralls.io/r/jshttp/content-type?branch=master -[node-image]: https://badgen.net/npm/node/content-type -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/content-type -[npm-url]: https://npmjs.org/package/content-type -[npm-version-image]: https://badgen.net/npm/v/content-type diff --git a/node_modules/content-type/index.js b/node_modules/content-type/index.js deleted file mode 100644 index 41840e7b..00000000 --- a/node_modules/content-type/index.js +++ /dev/null @@ -1,225 +0,0 @@ -/*! - * content-type - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 - * - * parameter = token "=" ( token / quoted-string ) - * token = 1*tchar - * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" - * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" - * / DIGIT / ALPHA - * ; any VCHAR, except delimiters - * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE - * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text - * obs-text = %x80-FF - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - */ -var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g // eslint-disable-line no-control-regex -var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ // eslint-disable-line no-control-regex -var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ - -/** - * RegExp to match quoted-pair in RFC 7230 sec 3.2.6 - * - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - * obs-text = %x80-FF - */ -var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g // eslint-disable-line no-control-regex - -/** - * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6 - */ -var QUOTE_REGEXP = /([\\"])/g - -/** - * RegExp to match type in RFC 7231 sec 3.1.1.1 - * - * media-type = type "/" subtype - * type = token - * subtype = token - */ -var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ - -/** - * Module exports. - * @public - */ - -exports.format = format -exports.parse = parse - -/** - * Format object to media type. - * - * @param {object} obj - * @return {string} - * @public - */ - -function format (obj) { - if (!obj || typeof obj !== 'object') { - throw new TypeError('argument obj is required') - } - - var parameters = obj.parameters - var type = obj.type - - if (!type || !TYPE_REGEXP.test(type)) { - throw new TypeError('invalid type') - } - - var string = type - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - if (!TOKEN_REGEXP.test(param)) { - throw new TypeError('invalid parameter name') - } - - string += '; ' + param + '=' + qstring(parameters[param]) - } - } - - return string -} - -/** - * Parse media type to object. - * - * @param {string|object} string - * @return {Object} - * @public - */ - -function parse (string) { - if (!string) { - throw new TypeError('argument string is required') - } - - // support req/res-like objects as argument - var header = typeof string === 'object' - ? getcontenttype(string) - : string - - if (typeof header !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - var index = header.indexOf(';') - var type = index !== -1 - ? header.slice(0, index).trim() - : header.trim() - - if (!TYPE_REGEXP.test(type)) { - throw new TypeError('invalid media type') - } - - var obj = new ContentType(type.toLowerCase()) - - // parse parameters - if (index !== -1) { - var key - var match - var value - - PARAM_REGEXP.lastIndex = index - - while ((match = PARAM_REGEXP.exec(header))) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (value.charCodeAt(0) === 0x22 /* " */) { - // remove quotes - value = value.slice(1, -1) - - // remove escapes - if (value.indexOf('\\') !== -1) { - value = value.replace(QESC_REGEXP, '$1') - } - } - - obj.parameters[key] = value - } - - if (index !== header.length) { - throw new TypeError('invalid parameter format') - } - } - - return obj -} - -/** - * Get content-type from req/res objects. - * - * @param {object} - * @return {Object} - * @private - */ - -function getcontenttype (obj) { - var header - - if (typeof obj.getHeader === 'function') { - // res-like - header = obj.getHeader('content-type') - } else if (typeof obj.headers === 'object') { - // req-like - header = obj.headers && obj.headers['content-type'] - } - - if (typeof header !== 'string') { - throw new TypeError('content-type header is missing from object') - } - - return header -} - -/** - * Quote a string if necessary. - * - * @param {string} val - * @return {string} - * @private - */ - -function qstring (val) { - var str = String(val) - - // no need to quote tokens - if (TOKEN_REGEXP.test(str)) { - return str - } - - if (str.length > 0 && !TEXT_REGEXP.test(str)) { - throw new TypeError('invalid parameter value') - } - - return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' -} - -/** - * Class to represent a content type. - * @private - */ -function ContentType (type) { - this.parameters = Object.create(null) - this.type = type -} diff --git a/node_modules/content-type/package.json b/node_modules/content-type/package.json deleted file mode 100644 index 9db19f63..00000000 --- a/node_modules/content-type/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "content-type", - "description": "Create and parse HTTP Content-Type header", - "version": "1.0.5", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "keywords": [ - "content-type", - "http", - "req", - "res", - "rfc7231" - ], - "repository": "jshttp/content-type", - "devDependencies": { - "deep-equal": "1.0.1", - "eslint": "8.32.0", - "eslint-config-standard": "15.0.1", - "eslint-plugin-import": "2.27.5", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "6.1.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "10.2.0", - "nyc": "15.1.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/idn-hostname/#/tests/0/0.json b/node_modules/idn-hostname/#/tests/0/0.json deleted file mode 100644 index 29be3a6e..00000000 --- a/node_modules/idn-hostname/#/tests/0/0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid internationalized hostname", - "data": "例子.测试", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/1.json b/node_modules/idn-hostname/#/tests/0/1.json deleted file mode 100644 index 52473165..00000000 --- a/node_modules/idn-hostname/#/tests/0/1.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid hostname with mixed scripts", - "data": "xn--fsqu00a.xn--0zwm56d", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/10.json b/node_modules/idn-hostname/#/tests/0/10.json deleted file mode 100644 index 12c8a6a7..00000000 --- a/node_modules/idn-hostname/#/tests/0/10.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with segment longer than 63 chars", - "data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.example.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/11.json b/node_modules/idn-hostname/#/tests/0/11.json deleted file mode 100644 index 0ca8d8bc..00000000 --- a/node_modules/idn-hostname/#/tests/0/11.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with more than 255 characters", - "data": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/12.json b/node_modules/idn-hostname/#/tests/0/12.json deleted file mode 100644 index 17a459c2..00000000 --- a/node_modules/idn-hostname/#/tests/0/12.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with trailing dot", - "data": "example.com.", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/13.json b/node_modules/idn-hostname/#/tests/0/13.json deleted file mode 100644 index 48d0662d..00000000 --- a/node_modules/idn-hostname/#/tests/0/13.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with leading dot", - "data": ".example.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/14.json b/node_modules/idn-hostname/#/tests/0/14.json deleted file mode 100644 index 157d272b..00000000 --- a/node_modules/idn-hostname/#/tests/0/14.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with consecutive dots", - "data": "example..com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/15.json b/node_modules/idn-hostname/#/tests/0/15.json deleted file mode 100644 index 8cf58357..00000000 --- a/node_modules/idn-hostname/#/tests/0/15.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid hostname with single segment (no TLD)", - "data": "localhost", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/16.json b/node_modules/idn-hostname/#/tests/0/16.json deleted file mode 100644 index 080d12fd..00000000 --- a/node_modules/idn-hostname/#/tests/0/16.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "a valid host name (example.test in Hangul)", - "data": "실례.테스트", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/17.json b/node_modules/idn-hostname/#/tests/0/17.json deleted file mode 100644 index eaa73f4f..00000000 --- a/node_modules/idn-hostname/#/tests/0/17.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "illegal first char U+302E Hangul single dot tone mark", - "data": "〮실례.테스트", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/18.json b/node_modules/idn-hostname/#/tests/0/18.json deleted file mode 100644 index aead92cc..00000000 --- a/node_modules/idn-hostname/#/tests/0/18.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "contains illegal char U+302E Hangul single dot tone mark", - "data": "실〮례.테스트", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/19.json b/node_modules/idn-hostname/#/tests/0/19.json deleted file mode 100644 index a736381a..00000000 --- a/node_modules/idn-hostname/#/tests/0/19.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "a host name with a component too long", - "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/2.json b/node_modules/idn-hostname/#/tests/0/2.json deleted file mode 100644 index 5478ea8a..00000000 --- a/node_modules/idn-hostname/#/tests/0/2.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid hostname with alphanumeric characters and hyphens", - "data": "sub-example.example.com", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/20.json b/node_modules/idn-hostname/#/tests/0/20.json deleted file mode 100644 index 4b51d1c9..00000000 --- a/node_modules/idn-hostname/#/tests/0/20.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "invalid label, correct Punycode", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc3492#section-7.1", - "data": "-> $1.00 <--", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/21.json b/node_modules/idn-hostname/#/tests/0/21.json deleted file mode 100644 index c1067bff..00000000 --- a/node_modules/idn-hostname/#/tests/0/21.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "valid Chinese Punycode", - "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4", - "data": "xn--ihqwcrb4cv8a8dqg056pqjye", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/22.json b/node_modules/idn-hostname/#/tests/0/22.json deleted file mode 100644 index 488f177d..00000000 --- a/node_modules/idn-hostname/#/tests/0/22.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "invalid Punycode", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", - "data": "xn--X", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/23.json b/node_modules/idn-hostname/#/tests/0/23.json deleted file mode 100644 index 88390d45..00000000 --- a/node_modules/idn-hostname/#/tests/0/23.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "U-label contains \"--\" after the 3rd and 4th position", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", - "data": "XN--a--aaaa", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/24.json b/node_modules/idn-hostname/#/tests/0/24.json deleted file mode 100644 index cf2ceddd..00000000 --- a/node_modules/idn-hostname/#/tests/0/24.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "U-label starts with a dash", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", - "data": "-hello", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/25.json b/node_modules/idn-hostname/#/tests/0/25.json deleted file mode 100644 index 499915b1..00000000 --- a/node_modules/idn-hostname/#/tests/0/25.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "U-label ends with a dash", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", - "data": "hello-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/26.json b/node_modules/idn-hostname/#/tests/0/26.json deleted file mode 100644 index 5c633fd5..00000000 --- a/node_modules/idn-hostname/#/tests/0/26.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "U-label starts and ends with a dash", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", - "data": "-hello-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/27.json b/node_modules/idn-hostname/#/tests/0/27.json deleted file mode 100644 index eb6b9a83..00000000 --- a/node_modules/idn-hostname/#/tests/0/27.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Begins with a Spacing Combining Mark", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", - "data": "ःhello", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/28.json b/node_modules/idn-hostname/#/tests/0/28.json deleted file mode 100644 index 31a795fe..00000000 --- a/node_modules/idn-hostname/#/tests/0/28.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Begins with a Nonspacing Mark", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", - "data": "̀hello", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/29.json b/node_modules/idn-hostname/#/tests/0/29.json deleted file mode 100644 index f83cf23d..00000000 --- a/node_modules/idn-hostname/#/tests/0/29.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Begins with an Enclosing Mark", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", - "data": "҈hello", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/3.json b/node_modules/idn-hostname/#/tests/0/3.json deleted file mode 100644 index c2bb63df..00000000 --- a/node_modules/idn-hostname/#/tests/0/3.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "valid hostname with multiple internationalized segments", - "data": "测试.例子.测试", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/30.json b/node_modules/idn-hostname/#/tests/0/30.json deleted file mode 100644 index c031e01c..00000000 --- a/node_modules/idn-hostname/#/tests/0/30.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Exceptions that are PVALID, left-to-right chars", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", - "data": "ßς་〇", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/31.json b/node_modules/idn-hostname/#/tests/0/31.json deleted file mode 100644 index 82a336f8..00000000 --- a/node_modules/idn-hostname/#/tests/0/31.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Exceptions that are PVALID, right-to-left chars", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", - "data": "۽۾", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/32.json b/node_modules/idn-hostname/#/tests/0/32.json deleted file mode 100644 index 307224a3..00000000 --- a/node_modules/idn-hostname/#/tests/0/32.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Exceptions that are DISALLOWED, right-to-left chars", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", - "data": "ـߺ", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/33.json b/node_modules/idn-hostname/#/tests/0/33.json deleted file mode 100644 index 75572ff1..00000000 --- a/node_modules/idn-hostname/#/tests/0/33.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Exceptions that are DISALLOWED, left-to-right chars", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start", - "data": "〱〲〳〴〵〮〯〻", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/34.json b/node_modules/idn-hostname/#/tests/0/34.json deleted file mode 100644 index 50b230dd..00000000 --- a/node_modules/idn-hostname/#/tests/0/34.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with no preceding 'l'", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "a·l", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/35.json b/node_modules/idn-hostname/#/tests/0/35.json deleted file mode 100644 index b1c5b6d8..00000000 --- a/node_modules/idn-hostname/#/tests/0/35.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with nothing preceding", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "·l", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/36.json b/node_modules/idn-hostname/#/tests/0/36.json deleted file mode 100644 index 969b50e8..00000000 --- a/node_modules/idn-hostname/#/tests/0/36.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with no following 'l'", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "l·a", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/37.json b/node_modules/idn-hostname/#/tests/0/37.json deleted file mode 100644 index 8902a6e1..00000000 --- a/node_modules/idn-hostname/#/tests/0/37.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with nothing following", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "l·", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/38.json b/node_modules/idn-hostname/#/tests/0/38.json deleted file mode 100644 index e7a7f73a..00000000 --- a/node_modules/idn-hostname/#/tests/0/38.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with surrounding 'l's", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "l·l", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/39.json b/node_modules/idn-hostname/#/tests/0/39.json deleted file mode 100644 index feead6d4..00000000 --- a/node_modules/idn-hostname/#/tests/0/39.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Greek KERAIA not followed by Greek", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", - "data": "α͵S", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/4.json b/node_modules/idn-hostname/#/tests/0/4.json deleted file mode 100644 index f65e220a..00000000 --- a/node_modules/idn-hostname/#/tests/0/4.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "ZERO WIDTH NON-JOINER (U+200C) not preceded by a Virama", - "data": "exam‌ple.测试", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/40.json b/node_modules/idn-hostname/#/tests/0/40.json deleted file mode 100644 index c2ff2e6e..00000000 --- a/node_modules/idn-hostname/#/tests/0/40.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Greek KERAIA not followed by anything", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", - "data": "α͵", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/41.json b/node_modules/idn-hostname/#/tests/0/41.json deleted file mode 100644 index 09e8d145..00000000 --- a/node_modules/idn-hostname/#/tests/0/41.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Greek KERAIA followed by Greek", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", - "data": "α͵β", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/42.json b/node_modules/idn-hostname/#/tests/0/42.json deleted file mode 100644 index f0953aac..00000000 --- a/node_modules/idn-hostname/#/tests/0/42.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERESH not preceded by Hebrew", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", - "data": "A׳ב", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/43.json b/node_modules/idn-hostname/#/tests/0/43.json deleted file mode 100644 index 9c56dea4..00000000 --- a/node_modules/idn-hostname/#/tests/0/43.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERESH not preceded by anything", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", - "data": "׳ב", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/44.json b/node_modules/idn-hostname/#/tests/0/44.json deleted file mode 100644 index 104be9f6..00000000 --- a/node_modules/idn-hostname/#/tests/0/44.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERESH preceded by Hebrew", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", - "data": "א׳ב", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/45.json b/node_modules/idn-hostname/#/tests/0/45.json deleted file mode 100644 index f24c59ee..00000000 --- a/node_modules/idn-hostname/#/tests/0/45.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERSHAYIM not preceded by Hebrew", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", - "data": "A״ב", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/46.json b/node_modules/idn-hostname/#/tests/0/46.json deleted file mode 100644 index 94e004a0..00000000 --- a/node_modules/idn-hostname/#/tests/0/46.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERSHAYIM not preceded by anything", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", - "data": "״ב", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/47.json b/node_modules/idn-hostname/#/tests/0/47.json deleted file mode 100644 index faf362d6..00000000 --- a/node_modules/idn-hostname/#/tests/0/47.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Hebrew GERSHAYIM preceded by Hebrew", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", - "data": "א״ב", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/48.json b/node_modules/idn-hostname/#/tests/0/48.json deleted file mode 100644 index 184db77b..00000000 --- a/node_modules/idn-hostname/#/tests/0/48.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "def・abc", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/49.json b/node_modules/idn-hostname/#/tests/0/49.json deleted file mode 100644 index 443d6870..00000000 --- a/node_modules/idn-hostname/#/tests/0/49.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with no other characters", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "・", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/5.json b/node_modules/idn-hostname/#/tests/0/5.json deleted file mode 100644 index 1b2f583f..00000000 --- a/node_modules/idn-hostname/#/tests/0/5.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname with space", - "data": "ex ample.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/50.json b/node_modules/idn-hostname/#/tests/0/50.json deleted file mode 100644 index 08dd95c9..00000000 --- a/node_modules/idn-hostname/#/tests/0/50.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with Hiragana", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "・ぁ", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/51.json b/node_modules/idn-hostname/#/tests/0/51.json deleted file mode 100644 index 34da1179..00000000 --- a/node_modules/idn-hostname/#/tests/0/51.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with Katakana", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "・ァ", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/52.json b/node_modules/idn-hostname/#/tests/0/52.json deleted file mode 100644 index fa79802b..00000000 --- a/node_modules/idn-hostname/#/tests/0/52.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "KATAKANA MIDDLE DOT with Han", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", - "data": "・丈", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/53.json b/node_modules/idn-hostname/#/tests/0/53.json deleted file mode 100644 index ba5614e5..00000000 --- a/node_modules/idn-hostname/#/tests/0/53.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", - "data": "٠۰", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/54.json b/node_modules/idn-hostname/#/tests/0/54.json deleted file mode 100644 index 81386902..00000000 --- a/node_modules/idn-hostname/#/tests/0/54.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", - "data": "ب٠ب", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/55.json b/node_modules/idn-hostname/#/tests/0/55.json deleted file mode 100644 index 81c3dd69..00000000 --- a/node_modules/idn-hostname/#/tests/0/55.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Extended Arabic-Indic digits mixed with ASCII digits", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", - "data": "۰0", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/56.json b/node_modules/idn-hostname/#/tests/0/56.json deleted file mode 100644 index 22bc8471..00000000 --- a/node_modules/idn-hostname/#/tests/0/56.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH JOINER not preceded by Virama", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", - "data": "क‍ष", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/57.json b/node_modules/idn-hostname/#/tests/0/57.json deleted file mode 100644 index 22728cc5..00000000 --- a/node_modules/idn-hostname/#/tests/0/57.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH JOINER not preceded by anything", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", - "data": "‍ष", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/58.json b/node_modules/idn-hostname/#/tests/0/58.json deleted file mode 100644 index 49187f3e..00000000 --- a/node_modules/idn-hostname/#/tests/0/58.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH JOINER preceded by Virama", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", - "data": "क्‍ष", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/59.json b/node_modules/idn-hostname/#/tests/0/59.json deleted file mode 100644 index 01d03a3e..00000000 --- a/node_modules/idn-hostname/#/tests/0/59.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH NON-JOINER preceded by Virama", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", - "data": "क्‌ष", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/6.json b/node_modules/idn-hostname/#/tests/0/6.json deleted file mode 100644 index 21d8c4be..00000000 --- a/node_modules/idn-hostname/#/tests/0/6.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname starting with hyphen", - "data": "-example.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/60.json b/node_modules/idn-hostname/#/tests/0/60.json deleted file mode 100644 index 8a924362..00000000 --- a/node_modules/idn-hostname/#/tests/0/60.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches context joining rule", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", - "data": "بي‌بي", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/61.json b/node_modules/idn-hostname/#/tests/0/61.json deleted file mode 100644 index 7ee18591..00000000 --- a/node_modules/idn-hostname/#/tests/0/61.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Labels with \"--\" in the third and fourth positions are ACE labels and must start with \"xn\" (RFC 5891 §4.2.1).", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.1", - "data": "ab--cd", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/62.json b/node_modules/idn-hostname/#/tests/0/62.json deleted file mode 100644 index 96f8516a..00000000 --- a/node_modules/idn-hostname/#/tests/0/62.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Labels with \"--\" in the third and fourth positions are ACE labels and must start with \"xn\" (RFC 5891 §4.2.1).", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.1", - "data": "xn--cd.ef--gh", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/63.json b/node_modules/idn-hostname/#/tests/0/63.json deleted file mode 100644 index 01ca77ad..00000000 --- a/node_modules/idn-hostname/#/tests/0/63.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 1 — L-branch pass: label starts with L and contains L", - "data": "gk", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/64.json b/node_modules/idn-hostname/#/tests/0/64.json deleted file mode 100644 index 2f1262ca..00000000 --- a/node_modules/idn-hostname/#/tests/0/64.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 1 — R-branch pass: label starts with R and contains R", - "data": "אב", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/65.json b/node_modules/idn-hostname/#/tests/0/65.json deleted file mode 100644 index 93583c70..00000000 --- a/node_modules/idn-hostname/#/tests/0/65.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 1 — R-branch fail: contains R but doesn't start with R", - "data": "gא", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/66.json b/node_modules/idn-hostname/#/tests/0/66.json deleted file mode 100644 index aa44b499..00000000 --- a/node_modules/idn-hostname/#/tests/0/66.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "BiDi rules not affecting label that does not contain RTL chars", - "data": "1host", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/67.json b/node_modules/idn-hostname/#/tests/0/67.json deleted file mode 100644 index c7f30f14..00000000 --- a/node_modules/idn-hostname/#/tests/0/67.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 2 — pass: starts R and uses allowed classes (R, EN)", - "data": "א1", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/68.json b/node_modules/idn-hostname/#/tests/0/68.json deleted file mode 100644 index 9b832ab3..00000000 --- a/node_modules/idn-hostname/#/tests/0/68.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 2 — pass: starts AL and uses allowed classes (AL, AN)", - "data": "ا١", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/69.json b/node_modules/idn-hostname/#/tests/0/69.json deleted file mode 100644 index b562344d..00000000 --- a/node_modules/idn-hostname/#/tests/0/69.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 2 — fail: starts R but contains L (disallowed)", - "data": "אg", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/7.json b/node_modules/idn-hostname/#/tests/0/7.json deleted file mode 100644 index 2597c58d..00000000 --- a/node_modules/idn-hostname/#/tests/0/7.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid hostname ending with hyphen", - "data": "example-.com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/70.json b/node_modules/idn-hostname/#/tests/0/70.json deleted file mode 100644 index 1edde449..00000000 --- a/node_modules/idn-hostname/#/tests/0/70.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 2 — fail: starts AL but contains L (disallowed)", - "data": "اG", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/71.json b/node_modules/idn-hostname/#/tests/0/71.json deleted file mode 100644 index 1ccd8aac..00000000 --- a/node_modules/idn-hostname/#/tests/0/71.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 3 — pass: starts R and last strong is EN", - "data": "א1", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/72.json b/node_modules/idn-hostname/#/tests/0/72.json deleted file mode 100644 index 73146711..00000000 --- a/node_modules/idn-hostname/#/tests/0/72.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 3 — pass: starts AL and last strong is AN", - "data": "ا١", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/73.json b/node_modules/idn-hostname/#/tests/0/73.json deleted file mode 100644 index bb52198a..00000000 --- a/node_modules/idn-hostname/#/tests/0/73.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 3 — fail: starts R but last strong is ES (not allowed)", - "data": "א-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/74.json b/node_modules/idn-hostname/#/tests/0/74.json deleted file mode 100644 index a0e22808..00000000 --- a/node_modules/idn-hostname/#/tests/0/74.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 3 — fail: starts AL but last strong is ES (not allowed)", - "data": "ا-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/75.json b/node_modules/idn-hostname/#/tests/0/75.json deleted file mode 100644 index 5e02851a..00000000 --- a/node_modules/idn-hostname/#/tests/0/75.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 4 violation: mixed AN with EN", - "data": "ثال١234ثال", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/76.json b/node_modules/idn-hostname/#/tests/0/76.json deleted file mode 100644 index 91f812a9..00000000 --- a/node_modules/idn-hostname/#/tests/0/76.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "AN only in label not affected by BiDi rules (no R or AL char present)", - "data": "١٢", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/77.json b/node_modules/idn-hostname/#/tests/0/77.json deleted file mode 100644 index 97337bec..00000000 --- a/node_modules/idn-hostname/#/tests/0/77.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "mixed EN and AN not affected by BiDi rules (no R or AL char present)", - "data": "1١", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/78.json b/node_modules/idn-hostname/#/tests/0/78.json deleted file mode 100644 index 3c478f2b..00000000 --- a/node_modules/idn-hostname/#/tests/0/78.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "mixed AN and EN not affected by BiDi rules (no R or AL char present)", - "data": "١2", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/79.json b/node_modules/idn-hostname/#/tests/0/79.json deleted file mode 100644 index 09ad123f..00000000 --- a/node_modules/idn-hostname/#/tests/0/79.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 5 — pass: starts L and contains EN (allowed)", - "data": "g1", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/8.json b/node_modules/idn-hostname/#/tests/0/8.json deleted file mode 100644 index ad99f4c1..00000000 --- a/node_modules/idn-hostname/#/tests/0/8.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid tld starting with hyphen", - "data": "example.-com", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/80.json b/node_modules/idn-hostname/#/tests/0/80.json deleted file mode 100644 index d010e22e..00000000 --- a/node_modules/idn-hostname/#/tests/0/80.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 5 — pass: starts L and contains ES (allowed)", - "data": "a-b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/81.json b/node_modules/idn-hostname/#/tests/0/81.json deleted file mode 100644 index 6f5574cd..00000000 --- a/node_modules/idn-hostname/#/tests/0/81.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 5 — fail: starts L but contains R (disallowed)", - "data": "gא", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/82.json b/node_modules/idn-hostname/#/tests/0/82.json deleted file mode 100644 index 94c29690..00000000 --- a/node_modules/idn-hostname/#/tests/0/82.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "mixed L with AN not affected by BiDi rules (no R or AL char present)", - "data": "g١", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/83.json b/node_modules/idn-hostname/#/tests/0/83.json deleted file mode 100644 index ec5ac2c4..00000000 --- a/node_modules/idn-hostname/#/tests/0/83.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 6 — pass: starts L and ends with L", - "data": "gk", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/84.json b/node_modules/idn-hostname/#/tests/0/84.json deleted file mode 100644 index bd4a1c9e..00000000 --- a/node_modules/idn-hostname/#/tests/0/84.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 6 — pass: starts L and ends with EN", - "data": "g1", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/85.json b/node_modules/idn-hostname/#/tests/0/85.json deleted file mode 100644 index 6aa832a5..00000000 --- a/node_modules/idn-hostname/#/tests/0/85.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 6 — fail: starts L and ends with ET (not L or EN)", - "data": "g#", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/86.json b/node_modules/idn-hostname/#/tests/0/86.json deleted file mode 100644 index c0388bb3..00000000 --- a/node_modules/idn-hostname/#/tests/0/86.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Bidi Rule 6 — fail: starts L and ends with ET (not L or EN)", - "data": "g%", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/87.json b/node_modules/idn-hostname/#/tests/0/87.json deleted file mode 100644 index 1dce58d4..00000000 --- a/node_modules/idn-hostname/#/tests/0/87.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "single dot", - "data": ".", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/88.json b/node_modules/idn-hostname/#/tests/0/88.json deleted file mode 100644 index 6d1f4659..00000000 --- a/node_modules/idn-hostname/#/tests/0/88.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "single ideographic full stop", - "data": "。", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/89.json b/node_modules/idn-hostname/#/tests/0/89.json deleted file mode 100644 index 11f8e66a..00000000 --- a/node_modules/idn-hostname/#/tests/0/89.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "single fullwidth full stop", - "data": ".", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/9.json b/node_modules/idn-hostname/#/tests/0/9.json deleted file mode 100644 index 979d1c53..00000000 --- a/node_modules/idn-hostname/#/tests/0/9.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "invalid tld ending with hyphen", - "data": "example.com-", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/90.json b/node_modules/idn-hostname/#/tests/0/90.json deleted file mode 100644 index c501b98b..00000000 --- a/node_modules/idn-hostname/#/tests/0/90.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "single halfwidth ideographic full stop", - "data": "。", - "valid": false -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/91.json b/node_modules/idn-hostname/#/tests/0/91.json deleted file mode 100644 index 324c76d1..00000000 --- a/node_modules/idn-hostname/#/tests/0/91.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "dot as label separator", - "data": "a.b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/92.json b/node_modules/idn-hostname/#/tests/0/92.json deleted file mode 100644 index 1068e4cc..00000000 --- a/node_modules/idn-hostname/#/tests/0/92.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "ideographic full stop as label separator", - "data": "a。b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/93.json b/node_modules/idn-hostname/#/tests/0/93.json deleted file mode 100644 index 9c3421f6..00000000 --- a/node_modules/idn-hostname/#/tests/0/93.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "fullwidth full stop as label separator", - "data": "a.b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/94.json b/node_modules/idn-hostname/#/tests/0/94.json deleted file mode 100644 index 175759f8..00000000 --- a/node_modules/idn-hostname/#/tests/0/94.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "halfwidth ideographic full stop as label separator", - "data": "a。b", - "valid": true -} \ No newline at end of file diff --git a/node_modules/idn-hostname/#/tests/0/95.json b/node_modules/idn-hostname/#/tests/0/95.json deleted file mode 100644 index 349f57f4..00000000 --- a/node_modules/idn-hostname/#/tests/0/95.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "MIDDLE DOT with surrounding 'l's as A-Label", - "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", - "data": "xn--ll-0ea", - "valid": true -} diff --git a/node_modules/idn-hostname/#/tests/0/schema.json b/node_modules/idn-hostname/#/tests/0/schema.json deleted file mode 100644 index c21edcbc..00000000 --- a/node_modules/idn-hostname/#/tests/0/schema.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "An internationalized hostname as defined by RFC5890, RFC5891, RFC5892, RFC5893, RFC3492 and UTS#46", - "$ref": "#/#/#/#/idn-hostname" -} diff --git a/node_modules/idn-hostname/LICENSE b/node_modules/idn-hostname/LICENSE deleted file mode 100644 index 5446d3a8..00000000 --- a/node_modules/idn-hostname/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 SorinGFS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/idn-hostname/idnaMappingTableCompact.json b/node_modules/idn-hostname/idnaMappingTableCompact.json deleted file mode 100644 index a90116ea..00000000 --- a/node_modules/idn-hostname/idnaMappingTableCompact.json +++ /dev/null @@ -1 +0,0 @@ -{"props":["valid","mapped","deviation","ignored","disallowed"],"viramas":[2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5909,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,68159,69702,69744,69759,69817,69939,69940,70080,70197,70378,70477,70722,70850,71103,71231,71350,71467,71737,71997,71998,72160,72244,72263,72345,72767,73028,73029,73111,73537,73538],"ranges":[[45,45,0],[48,57,0],[65,90,1],[97,122,0],[170,170,1],[173,173,3],[178,179,1],[181,181,1],[183,183,0],[185,186,1],[188,190,1],[192,214,1],[216,222,1],[223,223,2],[224,246,0],[248,255,0],[256,256,1],[257,257,0],[258,258,1],[259,259,0],[260,260,1],[261,261,0],[262,262,1],[263,263,0],[264,264,1],[265,265,0],[266,266,1],[267,267,0],[268,268,1],[269,269,0],[270,270,1],[271,271,0],[272,272,1],[273,273,0],[274,274,1],[275,275,0],[276,276,1],[277,277,0],[278,278,1],[279,279,0],[280,280,1],[281,281,0],[282,282,1],[283,283,0],[284,284,1],[285,285,0],[286,286,1],[287,287,0],[288,288,1],[289,289,0],[290,290,1],[291,291,0],[292,292,1],[293,293,0],[294,294,1],[295,295,0],[296,296,1],[297,297,0],[298,298,1],[299,299,0],[300,300,1],[301,301,0],[302,302,1],[303,303,0],[304,304,1],[305,305,0],[306,306,1],[308,308,1],[309,309,0],[310,310,1],[311,312,0],[313,313,1],[314,314,0],[315,315,1],[316,316,0],[317,317,1],[318,318,0],[319,319,1],[321,321,1],[322,322,0],[323,323,1],[324,324,0],[325,325,1],[326,326,0],[327,327,1],[328,328,0],[329,330,1],[331,331,0],[332,332,1],[333,333,0],[334,334,1],[335,335,0],[336,336,1],[337,337,0],[338,338,1],[339,339,0],[340,340,1],[341,341,0],[342,342,1],[343,343,0],[344,344,1],[345,345,0],[346,346,1],[347,347,0],[348,348,1],[349,349,0],[350,350,1],[351,351,0],[352,352,1],[353,353,0],[354,354,1],[355,355,0],[356,356,1],[357,357,0],[358,358,1],[359,359,0],[360,360,1],[361,361,0],[362,362,1],[363,363,0],[364,364,1],[365,365,0],[366,366,1],[367,367,0],[368,368,1],[369,369,0],[370,370,1],[371,371,0],[372,372,1],[373,373,0],[374,374,1],[375,375,0],[376,377,1],[378,378,0],[379,379,1],[380,380,0],[381,381,1],[382,382,0],[383,383,1],[384,384,0],[385,386,1],[387,387,0],[388,388,1],[389,389,0],[390,391,1],[392,392,0],[393,395,1],[396,397,0],[398,401,1],[402,402,0],[403,404,1],[405,405,0],[406,408,1],[409,411,0],[412,413,1],[414,414,0],[415,416,1],[417,417,0],[418,418,1],[419,419,0],[420,420,1],[421,421,0],[422,423,1],[424,424,0],[425,425,1],[426,427,0],[428,428,1],[429,429,0],[430,431,1],[432,432,0],[433,435,1],[436,436,0],[437,437,1],[438,438,0],[439,440,1],[441,443,0],[444,444,1],[445,451,0],[452,452,1],[455,455,1],[458,458,1],[461,461,1],[462,462,0],[463,463,1],[464,464,0],[465,465,1],[466,466,0],[467,467,1],[468,468,0],[469,469,1],[470,470,0],[471,471,1],[472,472,0],[473,473,1],[474,474,0],[475,475,1],[476,477,0],[478,478,1],[479,479,0],[480,480,1],[481,481,0],[482,482,1],[483,483,0],[484,484,1],[485,485,0],[486,486,1],[487,487,0],[488,488,1],[489,489,0],[490,490,1],[491,491,0],[492,492,1],[493,493,0],[494,494,1],[495,496,0],[497,497,1],[500,500,1],[501,501,0],[502,504,1],[505,505,0],[506,506,1],[507,507,0],[508,508,1],[509,509,0],[510,510,1],[511,511,0],[512,512,1],[513,513,0],[514,514,1],[515,515,0],[516,516,1],[517,517,0],[518,518,1],[519,519,0],[520,520,1],[521,521,0],[522,522,1],[523,523,0],[524,524,1],[525,525,0],[526,526,1],[527,527,0],[528,528,1],[529,529,0],[530,530,1],[531,531,0],[532,532,1],[533,533,0],[534,534,1],[535,535,0],[536,536,1],[537,537,0],[538,538,1],[539,539,0],[540,540,1],[541,541,0],[542,542,1],[543,543,0],[544,544,1],[545,545,0],[546,546,1],[547,547,0],[548,548,1],[549,549,0],[550,550,1],[551,551,0],[552,552,1],[553,553,0],[554,554,1],[555,555,0],[556,556,1],[557,557,0],[558,558,1],[559,559,0],[560,560,1],[561,561,0],[562,562,1],[563,569,0],[570,571,1],[572,572,0],[573,574,1],[575,576,0],[577,577,1],[578,578,0],[579,582,1],[583,583,0],[584,584,1],[585,585,0],[586,586,1],[587,587,0],[588,588,1],[589,589,0],[590,590,1],[591,687,0],[688,696,1],[697,705,0],[710,721,0],[736,740,1],[748,748,0],[750,750,0],[768,831,0],[832,833,1],[834,834,0],[835,837,1],[838,846,0],[847,847,3],[848,879,0],[880,880,1],[881,881,0],[882,882,1],[883,883,0],[884,884,1],[885,885,0],[886,886,1],[887,887,0],[891,893,0],[895,895,1],[902,906,1],[908,908,1],[910,911,1],[912,912,0],[913,929,1],[931,939,1],[940,961,0],[962,962,2],[963,974,0],[975,982,1],[983,983,0],[984,984,1],[985,985,0],[986,986,1],[987,987,0],[988,988,1],[989,989,0],[990,990,1],[991,991,0],[992,992,1],[993,993,0],[994,994,1],[995,995,0],[996,996,1],[997,997,0],[998,998,1],[999,999,0],[1000,1000,1],[1001,1001,0],[1002,1002,1],[1003,1003,0],[1004,1004,1],[1005,1005,0],[1006,1006,1],[1007,1007,0],[1008,1010,1],[1011,1011,0],[1012,1013,1],[1015,1015,1],[1016,1016,0],[1017,1018,1],[1019,1020,0],[1021,1071,1],[1072,1119,0],[1120,1120,1],[1121,1121,0],[1122,1122,1],[1123,1123,0],[1124,1124,1],[1125,1125,0],[1126,1126,1],[1127,1127,0],[1128,1128,1],[1129,1129,0],[1130,1130,1],[1131,1131,0],[1132,1132,1],[1133,1133,0],[1134,1134,1],[1135,1135,0],[1136,1136,1],[1137,1137,0],[1138,1138,1],[1139,1139,0],[1140,1140,1],[1141,1141,0],[1142,1142,1],[1143,1143,0],[1144,1144,1],[1145,1145,0],[1146,1146,1],[1147,1147,0],[1148,1148,1],[1149,1149,0],[1150,1150,1],[1151,1151,0],[1152,1152,1],[1153,1153,0],[1155,1159,0],[1162,1162,1],[1163,1163,0],[1164,1164,1],[1165,1165,0],[1166,1166,1],[1167,1167,0],[1168,1168,1],[1169,1169,0],[1170,1170,1],[1171,1171,0],[1172,1172,1],[1173,1173,0],[1174,1174,1],[1175,1175,0],[1176,1176,1],[1177,1177,0],[1178,1178,1],[1179,1179,0],[1180,1180,1],[1181,1181,0],[1182,1182,1],[1183,1183,0],[1184,1184,1],[1185,1185,0],[1186,1186,1],[1187,1187,0],[1188,1188,1],[1189,1189,0],[1190,1190,1],[1191,1191,0],[1192,1192,1],[1193,1193,0],[1194,1194,1],[1195,1195,0],[1196,1196,1],[1197,1197,0],[1198,1198,1],[1199,1199,0],[1200,1200,1],[1201,1201,0],[1202,1202,1],[1203,1203,0],[1204,1204,1],[1205,1205,0],[1206,1206,1],[1207,1207,0],[1208,1208,1],[1209,1209,0],[1210,1210,1],[1211,1211,0],[1212,1212,1],[1213,1213,0],[1214,1214,1],[1215,1215,0],[1217,1217,1],[1218,1218,0],[1219,1219,1],[1220,1220,0],[1221,1221,1],[1222,1222,0],[1223,1223,1],[1224,1224,0],[1225,1225,1],[1226,1226,0],[1227,1227,1],[1228,1228,0],[1229,1229,1],[1230,1231,0],[1232,1232,1],[1233,1233,0],[1234,1234,1],[1235,1235,0],[1236,1236,1],[1237,1237,0],[1238,1238,1],[1239,1239,0],[1240,1240,1],[1241,1241,0],[1242,1242,1],[1243,1243,0],[1244,1244,1],[1245,1245,0],[1246,1246,1],[1247,1247,0],[1248,1248,1],[1249,1249,0],[1250,1250,1],[1251,1251,0],[1252,1252,1],[1253,1253,0],[1254,1254,1],[1255,1255,0],[1256,1256,1],[1257,1257,0],[1258,1258,1],[1259,1259,0],[1260,1260,1],[1261,1261,0],[1262,1262,1],[1263,1263,0],[1264,1264,1],[1265,1265,0],[1266,1266,1],[1267,1267,0],[1268,1268,1],[1269,1269,0],[1270,1270,1],[1271,1271,0],[1272,1272,1],[1273,1273,0],[1274,1274,1],[1275,1275,0],[1276,1276,1],[1277,1277,0],[1278,1278,1],[1279,1279,0],[1280,1280,1],[1281,1281,0],[1282,1282,1],[1283,1283,0],[1284,1284,1],[1285,1285,0],[1286,1286,1],[1287,1287,0],[1288,1288,1],[1289,1289,0],[1290,1290,1],[1291,1291,0],[1292,1292,1],[1293,1293,0],[1294,1294,1],[1295,1295,0],[1296,1296,1],[1297,1297,0],[1298,1298,1],[1299,1299,0],[1300,1300,1],[1301,1301,0],[1302,1302,1],[1303,1303,0],[1304,1304,1],[1305,1305,0],[1306,1306,1],[1307,1307,0],[1308,1308,1],[1309,1309,0],[1310,1310,1],[1311,1311,0],[1312,1312,1],[1313,1313,0],[1314,1314,1],[1315,1315,0],[1316,1316,1],[1317,1317,0],[1318,1318,1],[1319,1319,0],[1320,1320,1],[1321,1321,0],[1322,1322,1],[1323,1323,0],[1324,1324,1],[1325,1325,0],[1326,1326,1],[1327,1327,0],[1329,1366,1],[1369,1369,0],[1376,1414,0],[1415,1415,1],[1416,1416,0],[1425,1469,0],[1471,1471,0],[1473,1474,0],[1476,1477,0],[1479,1479,0],[1488,1514,0],[1519,1524,0],[1552,1562,0],[1568,1599,0],[1601,1641,0],[1646,1652,0],[1653,1656,1],[1657,1747,0],[1749,1756,0],[1759,1768,0],[1770,1791,0],[1808,1866,0],[1869,1969,0],[1984,2037,0],[2045,2045,0],[2048,2093,0],[2112,2139,0],[2144,2154,0],[2160,2183,0],[2185,2190,0],[2200,2273,0],[2275,2391,0],[2392,2399,1],[2400,2403,0],[2406,2415,0],[2417,2435,0],[2437,2444,0],[2447,2448,0],[2451,2472,0],[2474,2480,0],[2482,2482,0],[2486,2489,0],[2492,2500,0],[2503,2504,0],[2507,2510,0],[2519,2519,0],[2524,2525,1],[2527,2527,1],[2528,2531,0],[2534,2545,0],[2556,2556,0],[2558,2558,0],[2561,2563,0],[2565,2570,0],[2575,2576,0],[2579,2600,0],[2602,2608,0],[2610,2610,0],[2611,2611,1],[2613,2613,0],[2614,2614,1],[2616,2617,0],[2620,2620,0],[2622,2626,0],[2631,2632,0],[2635,2637,0],[2641,2641,0],[2649,2651,1],[2652,2652,0],[2654,2654,1],[2662,2677,0],[2689,2691,0],[2693,2701,0],[2703,2705,0],[2707,2728,0],[2730,2736,0],[2738,2739,0],[2741,2745,0],[2748,2757,0],[2759,2761,0],[2763,2765,0],[2768,2768,0],[2784,2787,0],[2790,2799,0],[2809,2815,0],[2817,2819,0],[2821,2828,0],[2831,2832,0],[2835,2856,0],[2858,2864,0],[2866,2867,0],[2869,2873,0],[2876,2884,0],[2887,2888,0],[2891,2893,0],[2901,2903,0],[2908,2909,1],[2911,2915,0],[2918,2927,0],[2929,2929,0],[2946,2947,0],[2949,2954,0],[2958,2960,0],[2962,2965,0],[2969,2970,0],[2972,2972,0],[2974,2975,0],[2979,2980,0],[2984,2986,0],[2990,3001,0],[3006,3010,0],[3014,3016,0],[3018,3021,0],[3024,3024,0],[3031,3031,0],[3046,3055,0],[3072,3084,0],[3086,3088,0],[3090,3112,0],[3114,3129,0],[3132,3140,0],[3142,3144,0],[3146,3149,0],[3157,3158,0],[3160,3162,0],[3165,3165,0],[3168,3171,0],[3174,3183,0],[3200,3203,0],[3205,3212,0],[3214,3216,0],[3218,3240,0],[3242,3251,0],[3253,3257,0],[3260,3268,0],[3270,3272,0],[3274,3277,0],[3285,3286,0],[3293,3294,0],[3296,3299,0],[3302,3311,0],[3313,3315,0],[3328,3340,0],[3342,3344,0],[3346,3396,0],[3398,3400,0],[3402,3406,0],[3412,3415,0],[3423,3427,0],[3430,3439,0],[3450,3455,0],[3457,3459,0],[3461,3478,0],[3482,3505,0],[3507,3515,0],[3517,3517,0],[3520,3526,0],[3530,3530,0],[3535,3540,0],[3542,3542,0],[3544,3551,0],[3558,3567,0],[3570,3571,0],[3585,3634,0],[3635,3635,1],[3636,3642,0],[3648,3662,0],[3664,3673,0],[3713,3714,0],[3716,3716,0],[3718,3722,0],[3724,3747,0],[3749,3749,0],[3751,3762,0],[3763,3763,1],[3764,3773,0],[3776,3780,0],[3782,3782,0],[3784,3790,0],[3792,3801,0],[3804,3805,1],[3806,3807,0],[3840,3840,0],[3851,3851,0],[3852,3852,1],[3864,3865,0],[3872,3881,0],[3893,3893,0],[3895,3895,0],[3897,3897,0],[3902,3906,0],[3907,3907,1],[3908,3911,0],[3913,3916,0],[3917,3917,1],[3918,3921,0],[3922,3922,1],[3923,3926,0],[3927,3927,1],[3928,3931,0],[3932,3932,1],[3933,3944,0],[3945,3945,1],[3946,3948,0],[3953,3954,0],[3955,3955,1],[3956,3956,0],[3957,3961,1],[3962,3968,0],[3969,3969,1],[3970,3972,0],[3974,3986,0],[3987,3987,1],[3988,3991,0],[3993,3996,0],[3997,3997,1],[3998,4001,0],[4002,4002,1],[4003,4006,0],[4007,4007,1],[4008,4011,0],[4012,4012,1],[4013,4024,0],[4025,4025,1],[4026,4028,0],[4038,4038,0],[4096,4169,0],[4176,4253,0],[4295,4295,1],[4301,4301,1],[4304,4346,0],[4348,4348,1],[4349,4351,0],[4608,4680,0],[4682,4685,0],[4688,4694,0],[4696,4696,0],[4698,4701,0],[4704,4744,0],[4746,4749,0],[4752,4784,0],[4786,4789,0],[4792,4798,0],[4800,4800,0],[4802,4805,0],[4808,4822,0],[4824,4880,0],[4882,4885,0],[4888,4954,0],[4957,4959,0],[4992,5007,0],[5024,5109,0],[5112,5117,1],[5121,5740,0],[5743,5759,0],[5761,5786,0],[5792,5866,0],[5873,5880,0],[5888,5909,0],[5919,5940,0],[5952,5971,0],[5984,5996,0],[5998,6000,0],[6002,6003,0],[6016,6067,0],[6070,6099,0],[6103,6103,0],[6108,6109,0],[6112,6121,0],[6155,6155,3],[6159,6159,3],[6160,6169,0],[6176,6264,0],[6272,6314,0],[6320,6389,0],[6400,6430,0],[6432,6443,0],[6448,6459,0],[6470,6509,0],[6512,6516,0],[6528,6571,0],[6576,6601,0],[6608,6617,0],[6656,6683,0],[6688,6750,0],[6752,6780,0],[6783,6793,0],[6800,6809,0],[6823,6823,0],[6832,6845,0],[6847,6862,0],[6912,6988,0],[6992,7001,0],[7019,7027,0],[7040,7155,0],[7168,7223,0],[7232,7241,0],[7245,7293,0],[7296,7300,1],[7302,7304,1],[7312,7354,1],[7357,7359,1],[7376,7378,0],[7380,7418,0],[7424,7467,0],[7468,7470,1],[7471,7471,0],[7472,7482,1],[7483,7483,0],[7484,7501,1],[7502,7502,0],[7503,7530,1],[7531,7543,0],[7544,7544,1],[7545,7578,0],[7579,7615,1],[7616,7679,0],[7680,7680,1],[7681,7681,0],[7682,7682,1],[7683,7683,0],[7684,7684,1],[7685,7685,0],[7686,7686,1],[7687,7687,0],[7688,7688,1],[7689,7689,0],[7690,7690,1],[7691,7691,0],[7692,7692,1],[7693,7693,0],[7694,7694,1],[7695,7695,0],[7696,7696,1],[7697,7697,0],[7698,7698,1],[7699,7699,0],[7700,7700,1],[7701,7701,0],[7702,7702,1],[7703,7703,0],[7704,7704,1],[7705,7705,0],[7706,7706,1],[7707,7707,0],[7708,7708,1],[7709,7709,0],[7710,7710,1],[7711,7711,0],[7712,7712,1],[7713,7713,0],[7714,7714,1],[7715,7715,0],[7716,7716,1],[7717,7717,0],[7718,7718,1],[7719,7719,0],[7720,7720,1],[7721,7721,0],[7722,7722,1],[7723,7723,0],[7724,7724,1],[7725,7725,0],[7726,7726,1],[7727,7727,0],[7728,7728,1],[7729,7729,0],[7730,7730,1],[7731,7731,0],[7732,7732,1],[7733,7733,0],[7734,7734,1],[7735,7735,0],[7736,7736,1],[7737,7737,0],[7738,7738,1],[7739,7739,0],[7740,7740,1],[7741,7741,0],[7742,7742,1],[7743,7743,0],[7744,7744,1],[7745,7745,0],[7746,7746,1],[7747,7747,0],[7748,7748,1],[7749,7749,0],[7750,7750,1],[7751,7751,0],[7752,7752,1],[7753,7753,0],[7754,7754,1],[7755,7755,0],[7756,7756,1],[7757,7757,0],[7758,7758,1],[7759,7759,0],[7760,7760,1],[7761,7761,0],[7762,7762,1],[7763,7763,0],[7764,7764,1],[7765,7765,0],[7766,7766,1],[7767,7767,0],[7768,7768,1],[7769,7769,0],[7770,7770,1],[7771,7771,0],[7772,7772,1],[7773,7773,0],[7774,7774,1],[7775,7775,0],[7776,7776,1],[7777,7777,0],[7778,7778,1],[7779,7779,0],[7780,7780,1],[7781,7781,0],[7782,7782,1],[7783,7783,0],[7784,7784,1],[7785,7785,0],[7786,7786,1],[7787,7787,0],[7788,7788,1],[7789,7789,0],[7790,7790,1],[7791,7791,0],[7792,7792,1],[7793,7793,0],[7794,7794,1],[7795,7795,0],[7796,7796,1],[7797,7797,0],[7798,7798,1],[7799,7799,0],[7800,7800,1],[7801,7801,0],[7802,7802,1],[7803,7803,0],[7804,7804,1],[7805,7805,0],[7806,7806,1],[7807,7807,0],[7808,7808,1],[7809,7809,0],[7810,7810,1],[7811,7811,0],[7812,7812,1],[7813,7813,0],[7814,7814,1],[7815,7815,0],[7816,7816,1],[7817,7817,0],[7818,7818,1],[7819,7819,0],[7820,7820,1],[7821,7821,0],[7822,7822,1],[7823,7823,0],[7824,7824,1],[7825,7825,0],[7826,7826,1],[7827,7827,0],[7828,7828,1],[7829,7833,0],[7834,7835,1],[7836,7837,0],[7838,7838,1],[7839,7839,0],[7840,7840,1],[7841,7841,0],[7842,7842,1],[7843,7843,0],[7844,7844,1],[7845,7845,0],[7846,7846,1],[7847,7847,0],[7848,7848,1],[7849,7849,0],[7850,7850,1],[7851,7851,0],[7852,7852,1],[7853,7853,0],[7854,7854,1],[7855,7855,0],[7856,7856,1],[7857,7857,0],[7858,7858,1],[7859,7859,0],[7860,7860,1],[7861,7861,0],[7862,7862,1],[7863,7863,0],[7864,7864,1],[7865,7865,0],[7866,7866,1],[7867,7867,0],[7868,7868,1],[7869,7869,0],[7870,7870,1],[7871,7871,0],[7872,7872,1],[7873,7873,0],[7874,7874,1],[7875,7875,0],[7876,7876,1],[7877,7877,0],[7878,7878,1],[7879,7879,0],[7880,7880,1],[7881,7881,0],[7882,7882,1],[7883,7883,0],[7884,7884,1],[7885,7885,0],[7886,7886,1],[7887,7887,0],[7888,7888,1],[7889,7889,0],[7890,7890,1],[7891,7891,0],[7892,7892,1],[7893,7893,0],[7894,7894,1],[7895,7895,0],[7896,7896,1],[7897,7897,0],[7898,7898,1],[7899,7899,0],[7900,7900,1],[7901,7901,0],[7902,7902,1],[7903,7903,0],[7904,7904,1],[7905,7905,0],[7906,7906,1],[7907,7907,0],[7908,7908,1],[7909,7909,0],[7910,7910,1],[7911,7911,0],[7912,7912,1],[7913,7913,0],[7914,7914,1],[7915,7915,0],[7916,7916,1],[7917,7917,0],[7918,7918,1],[7919,7919,0],[7920,7920,1],[7921,7921,0],[7922,7922,1],[7923,7923,0],[7924,7924,1],[7925,7925,0],[7926,7926,1],[7927,7927,0],[7928,7928,1],[7929,7929,0],[7930,7930,1],[7931,7931,0],[7932,7932,1],[7933,7933,0],[7934,7934,1],[7935,7943,0],[7944,7951,1],[7952,7957,0],[7960,7965,1],[7968,7975,0],[7976,7983,1],[7984,7991,0],[7992,7999,1],[8000,8005,0],[8008,8013,1],[8016,8023,0],[8025,8025,1],[8027,8027,1],[8029,8029,1],[8031,8031,1],[8032,8039,0],[8040,8047,1],[8048,8048,0],[8049,8049,1],[8050,8050,0],[8051,8051,1],[8052,8052,0],[8053,8053,1],[8054,8054,0],[8055,8055,1],[8056,8056,0],[8057,8057,1],[8058,8058,0],[8059,8059,1],[8060,8060,0],[8061,8061,1],[8064,8111,1],[8112,8113,0],[8114,8116,1],[8118,8118,0],[8119,8124,1],[8126,8126,1],[8130,8132,1],[8134,8134,0],[8135,8140,1],[8144,8146,0],[8147,8147,1],[8150,8151,0],[8152,8155,1],[8160,8162,0],[8163,8163,1],[8164,8167,0],[8168,8172,1],[8178,8180,1],[8182,8182,0],[8183,8188,1],[8203,8203,3],[8204,8204,2],[8205,8205,0],[8209,8209,1],[8243,8244,1],[8246,8247,1],[8279,8279,1],[8288,8288,3],[8292,8292,3],[8304,8305,1],[8308,8313,1],[8315,8315,1],[8319,8329,1],[8331,8331,1],[8336,8348,1],[8360,8360,1],[8450,8451,1],[8455,8455,1],[8457,8459,1],[8463,8464,1],[8466,8466,1],[8469,8470,1],[8473,8475,1],[8480,8482,1],[8484,8484,1],[8486,8486,1],[8488,8488,1],[8490,8493,1],[8495,8495,1],[8497,8497,1],[8499,8505,1],[8507,8509,1],[8511,8512,1],[8517,8517,1],[8519,8521,1],[8526,8526,0],[8528,8575,1],[8580,8580,0],[8585,8585,1],[8748,8749,1],[8751,8752,1],[9001,9002,1],[9312,9331,1],[9398,9450,1],[10764,10764,1],[10972,10972,1],[11264,11311,1],[11312,11359,0],[11360,11360,1],[11361,11361,0],[11362,11364,1],[11365,11366,0],[11367,11367,1],[11368,11368,0],[11369,11369,1],[11370,11370,0],[11371,11371,1],[11372,11372,0],[11373,11376,1],[11377,11377,0],[11378,11378,1],[11379,11380,0],[11381,11381,1],[11382,11387,0],[11388,11392,1],[11393,11393,0],[11394,11394,1],[11395,11395,0],[11396,11396,1],[11397,11397,0],[11398,11398,1],[11399,11399,0],[11400,11400,1],[11401,11401,0],[11402,11402,1],[11403,11403,0],[11404,11404,1],[11405,11405,0],[11406,11406,1],[11407,11407,0],[11408,11408,1],[11409,11409,0],[11410,11410,1],[11411,11411,0],[11412,11412,1],[11413,11413,0],[11414,11414,1],[11415,11415,0],[11416,11416,1],[11417,11417,0],[11418,11418,1],[11419,11419,0],[11420,11420,1],[11421,11421,0],[11422,11422,1],[11423,11423,0],[11424,11424,1],[11425,11425,0],[11426,11426,1],[11427,11427,0],[11428,11428,1],[11429,11429,0],[11430,11430,1],[11431,11431,0],[11432,11432,1],[11433,11433,0],[11434,11434,1],[11435,11435,0],[11436,11436,1],[11437,11437,0],[11438,11438,1],[11439,11439,0],[11440,11440,1],[11441,11441,0],[11442,11442,1],[11443,11443,0],[11444,11444,1],[11445,11445,0],[11446,11446,1],[11447,11447,0],[11448,11448,1],[11449,11449,0],[11450,11450,1],[11451,11451,0],[11452,11452,1],[11453,11453,0],[11454,11454,1],[11455,11455,0],[11456,11456,1],[11457,11457,0],[11458,11458,1],[11459,11459,0],[11460,11460,1],[11461,11461,0],[11462,11462,1],[11463,11463,0],[11464,11464,1],[11465,11465,0],[11466,11466,1],[11467,11467,0],[11468,11468,1],[11469,11469,0],[11470,11470,1],[11471,11471,0],[11472,11472,1],[11473,11473,0],[11474,11474,1],[11475,11475,0],[11476,11476,1],[11477,11477,0],[11478,11478,1],[11479,11479,0],[11480,11480,1],[11481,11481,0],[11482,11482,1],[11483,11483,0],[11484,11484,1],[11485,11485,0],[11486,11486,1],[11487,11487,0],[11488,11488,1],[11489,11489,0],[11490,11490,1],[11491,11492,0],[11499,11499,1],[11500,11500,0],[11501,11501,1],[11502,11505,0],[11506,11506,1],[11507,11507,0],[11520,11557,0],[11559,11559,0],[11565,11565,0],[11568,11623,0],[11631,11631,1],[11647,11670,0],[11680,11686,0],[11688,11694,0],[11696,11702,0],[11704,11710,0],[11712,11718,0],[11720,11726,0],[11728,11734,0],[11736,11742,0],[11744,11775,0],[11823,11823,0],[11935,11935,1],[12019,12019,1],[12032,12245,1],[12290,12290,1],[12293,12295,0],[12330,12333,0],[12342,12342,1],[12344,12346,1],[12348,12348,0],[12353,12438,0],[12441,12442,0],[12445,12446,0],[12447,12447,1],[12449,12542,0],[12543,12543,1],[12549,12591,0],[12593,12643,1],[12645,12686,1],[12690,12703,1],[12704,12735,0],[12784,12799,0],[12868,12871,1],[12880,12926,1],[12928,13249,1],[13251,13254,1],[13256,13271,1],[13273,13311,1],[13312,19903,0],[19968,42124,0],[42192,42237,0],[42240,42508,0],[42512,42539,0],[42560,42560,1],[42561,42561,0],[42562,42562,1],[42563,42563,0],[42564,42564,1],[42565,42565,0],[42566,42566,1],[42567,42567,0],[42568,42568,1],[42569,42569,0],[42570,42570,1],[42571,42571,0],[42572,42572,1],[42573,42573,0],[42574,42574,1],[42575,42575,0],[42576,42576,1],[42577,42577,0],[42578,42578,1],[42579,42579,0],[42580,42580,1],[42581,42581,0],[42582,42582,1],[42583,42583,0],[42584,42584,1],[42585,42585,0],[42586,42586,1],[42587,42587,0],[42588,42588,1],[42589,42589,0],[42590,42590,1],[42591,42591,0],[42592,42592,1],[42593,42593,0],[42594,42594,1],[42595,42595,0],[42596,42596,1],[42597,42597,0],[42598,42598,1],[42599,42599,0],[42600,42600,1],[42601,42601,0],[42602,42602,1],[42603,42603,0],[42604,42604,1],[42605,42607,0],[42612,42621,0],[42623,42623,0],[42624,42624,1],[42625,42625,0],[42626,42626,1],[42627,42627,0],[42628,42628,1],[42629,42629,0],[42630,42630,1],[42631,42631,0],[42632,42632,1],[42633,42633,0],[42634,42634,1],[42635,42635,0],[42636,42636,1],[42637,42637,0],[42638,42638,1],[42639,42639,0],[42640,42640,1],[42641,42641,0],[42642,42642,1],[42643,42643,0],[42644,42644,1],[42645,42645,0],[42646,42646,1],[42647,42647,0],[42648,42648,1],[42649,42649,0],[42650,42650,1],[42651,42651,0],[42652,42653,1],[42654,42725,0],[42736,42737,0],[42775,42783,0],[42786,42786,1],[42787,42787,0],[42788,42788,1],[42789,42789,0],[42790,42790,1],[42791,42791,0],[42792,42792,1],[42793,42793,0],[42794,42794,1],[42795,42795,0],[42796,42796,1],[42797,42797,0],[42798,42798,1],[42799,42801,0],[42802,42802,1],[42803,42803,0],[42804,42804,1],[42805,42805,0],[42806,42806,1],[42807,42807,0],[42808,42808,1],[42809,42809,0],[42810,42810,1],[42811,42811,0],[42812,42812,1],[42813,42813,0],[42814,42814,1],[42815,42815,0],[42816,42816,1],[42817,42817,0],[42818,42818,1],[42819,42819,0],[42820,42820,1],[42821,42821,0],[42822,42822,1],[42823,42823,0],[42824,42824,1],[42825,42825,0],[42826,42826,1],[42827,42827,0],[42828,42828,1],[42829,42829,0],[42830,42830,1],[42831,42831,0],[42832,42832,1],[42833,42833,0],[42834,42834,1],[42835,42835,0],[42836,42836,1],[42837,42837,0],[42838,42838,1],[42839,42839,0],[42840,42840,1],[42841,42841,0],[42842,42842,1],[42843,42843,0],[42844,42844,1],[42845,42845,0],[42846,42846,1],[42847,42847,0],[42848,42848,1],[42849,42849,0],[42850,42850,1],[42851,42851,0],[42852,42852,1],[42853,42853,0],[42854,42854,1],[42855,42855,0],[42856,42856,1],[42857,42857,0],[42858,42858,1],[42859,42859,0],[42860,42860,1],[42861,42861,0],[42862,42862,1],[42863,42863,0],[42864,42864,1],[42865,42872,0],[42873,42873,1],[42874,42874,0],[42875,42875,1],[42876,42876,0],[42877,42878,1],[42879,42879,0],[42880,42880,1],[42881,42881,0],[42882,42882,1],[42883,42883,0],[42884,42884,1],[42885,42885,0],[42886,42886,1],[42887,42888,0],[42891,42891,1],[42892,42892,0],[42893,42893,1],[42894,42895,0],[42896,42896,1],[42897,42897,0],[42898,42898,1],[42899,42901,0],[42902,42902,1],[42903,42903,0],[42904,42904,1],[42905,42905,0],[42906,42906,1],[42907,42907,0],[42908,42908,1],[42909,42909,0],[42910,42910,1],[42911,42911,0],[42912,42912,1],[42913,42913,0],[42914,42914,1],[42915,42915,0],[42916,42916,1],[42917,42917,0],[42918,42918,1],[42919,42919,0],[42920,42920,1],[42921,42921,0],[42922,42926,1],[42927,42927,0],[42928,42932,1],[42933,42933,0],[42934,42934,1],[42935,42935,0],[42936,42936,1],[42937,42937,0],[42938,42938,1],[42939,42939,0],[42940,42940,1],[42941,42941,0],[42942,42942,1],[42943,42943,0],[42944,42944,1],[42945,42945,0],[42946,42946,1],[42947,42947,0],[42948,42951,1],[42952,42952,0],[42953,42953,1],[42954,42954,0],[42960,42960,1],[42961,42961,0],[42963,42963,0],[42965,42965,0],[42966,42966,1],[42967,42967,0],[42968,42968,1],[42969,42969,0],[42994,42997,1],[42998,42999,0],[43000,43001,1],[43002,43047,0],[43052,43052,0],[43072,43123,0],[43136,43205,0],[43216,43225,0],[43232,43255,0],[43259,43259,0],[43261,43309,0],[43312,43347,0],[43392,43456,0],[43471,43481,0],[43488,43518,0],[43520,43574,0],[43584,43597,0],[43600,43609,0],[43616,43638,0],[43642,43714,0],[43739,43741,0],[43744,43759,0],[43762,43766,0],[43777,43782,0],[43785,43790,0],[43793,43798,0],[43808,43814,0],[43816,43822,0],[43824,43866,0],[43868,43871,1],[43872,43880,0],[43881,43881,1],[43888,43967,1],[43968,44010,0],[44012,44013,0],[44016,44025,0],[44032,55203,0],[63744,63751,1],[63753,64013,1],[64014,64015,0],[64016,64016,1],[64017,64017,0],[64018,64018,1],[64019,64020,0],[64021,64030,1],[64031,64031,0],[64032,64032,1],[64033,64033,0],[64034,64034,1],[64035,64036,0],[64037,64038,1],[64039,64041,0],[64042,64093,1],[64095,64109,1],[64112,64217,1],[64256,64261,1],[64275,64279,1],[64285,64285,1],[64286,64286,0],[64287,64296,1],[64298,64310,1],[64312,64316,1],[64318,64318,1],[64320,64321,1],[64323,64324,1],[64326,64336,1],[64338,64338,1],[64342,64342,1],[64346,64346,1],[64350,64350,1],[64354,64354,1],[64358,64358,1],[64362,64362,1],[64366,64366,1],[64370,64370,1],[64374,64374,1],[64378,64378,1],[64382,64382,1],[64386,64386,1],[64388,64388,1],[64390,64390,1],[64392,64392,1],[64394,64394,1],[64396,64396,1],[64398,64398,1],[64402,64402,1],[64406,64406,1],[64410,64410,1],[64414,64414,1],[64416,64416,1],[64420,64420,1],[64422,64422,1],[64426,64426,1],[64430,64430,1],[64432,64432,1],[64467,64467,1],[64471,64471,1],[64473,64473,1],[64475,64475,1],[64477,64478,1],[64480,64480,1],[64482,64482,1],[64484,64484,1],[64488,64488,1],[64490,64490,1],[64492,64492,1],[64494,64494,1],[64496,64496,1],[64498,64498,1],[64500,64500,1],[64502,64502,1],[64505,64505,1],[64508,64508,1],[64512,64605,1],[64612,64828,1],[64848,64849,1],[64851,64856,1],[64858,64863,1],[64865,64866,1],[64868,64868,1],[64870,64871,1],[64873,64874,1],[64876,64876,1],[64878,64879,1],[64881,64881,1],[64883,64886,1],[64888,64892,1],[64894,64899,1],[64901,64901,1],[64903,64903,1],[64905,64911,1],[64914,64919,1],[64921,64924,1],[64926,64967,1],[65008,65017,1],[65020,65020,1],[65024,65024,3],[65041,65041,1],[65047,65048,1],[65056,65071,0],[65073,65074,1],[65081,65092,1],[65105,65105,1],[65112,65112,1],[65117,65118,1],[65123,65123,1],[65137,65137,1],[65139,65139,0],[65143,65143,1],[65145,65145,1],[65147,65147,1],[65149,65149,1],[65151,65153,1],[65155,65155,1],[65157,65157,1],[65159,65159,1],[65161,65161,1],[65165,65165,1],[65167,65167,1],[65171,65171,1],[65173,65173,1],[65177,65177,1],[65181,65181,1],[65185,65185,1],[65189,65189,1],[65193,65193,1],[65195,65195,1],[65197,65197,1],[65199,65199,1],[65201,65201,1],[65205,65205,1],[65209,65209,1],[65213,65213,1],[65217,65217,1],[65221,65221,1],[65225,65225,1],[65229,65229,1],[65233,65233,1],[65237,65237,1],[65241,65241,1],[65245,65245,1],[65249,65249,1],[65253,65253,1],[65257,65257,1],[65261,65261,1],[65263,65263,1],[65265,65265,1],[65269,65269,1],[65271,65271,1],[65273,65273,1],[65275,65275,1],[65279,65279,3],[65293,65294,1],[65296,65305,1],[65313,65338,1],[65345,65370,1],[65375,65439,1],[65441,65470,1],[65474,65479,1],[65482,65487,1],[65490,65495,1],[65498,65500,1],[65504,65506,1],[65508,65510,1],[65512,65518,1],[65536,65547,0],[65549,65574,0],[65576,65594,0],[65596,65597,0],[65599,65613,0],[65616,65629,0],[65664,65786,0],[66045,66045,0],[66176,66204,0],[66208,66256,0],[66272,66272,0],[66304,66335,0],[66349,66368,0],[66370,66377,0],[66384,66426,0],[66432,66461,0],[66464,66499,0],[66504,66511,0],[66560,66599,1],[66600,66717,0],[66720,66729,0],[66736,66771,1],[66776,66811,0],[66816,66855,0],[66864,66915,0],[66928,66938,1],[66940,66954,1],[66956,66962,1],[66964,66965,1],[66967,66977,0],[66979,66993,0],[66995,67001,0],[67003,67004,0],[67072,67382,0],[67392,67413,0],[67424,67431,0],[67456,67456,0],[67457,67461,1],[67463,67504,1],[67506,67514,1],[67584,67589,0],[67592,67592,0],[67594,67637,0],[67639,67640,0],[67644,67644,0],[67647,67669,0],[67680,67702,0],[67712,67742,0],[67808,67826,0],[67828,67829,0],[67840,67861,0],[67872,67897,0],[67968,68023,0],[68030,68031,0],[68096,68099,0],[68101,68102,0],[68108,68115,0],[68117,68119,0],[68121,68149,0],[68152,68154,0],[68159,68159,0],[68192,68220,0],[68224,68252,0],[68288,68295,0],[68297,68326,0],[68352,68405,0],[68416,68437,0],[68448,68466,0],[68480,68497,0],[68608,68680,0],[68736,68786,1],[68800,68850,0],[68864,68903,0],[68912,68921,0],[69248,69289,0],[69291,69292,0],[69296,69297,0],[69373,69404,0],[69415,69415,0],[69424,69456,0],[69488,69509,0],[69552,69572,0],[69600,69622,0],[69632,69702,0],[69734,69749,0],[69759,69818,0],[69826,69826,0],[69840,69864,0],[69872,69881,0],[69888,69940,0],[69942,69951,0],[69956,69959,0],[69968,70003,0],[70006,70006,0],[70016,70084,0],[70089,70092,0],[70094,70106,0],[70108,70108,0],[70144,70161,0],[70163,70199,0],[70206,70209,0],[70272,70278,0],[70280,70280,0],[70282,70285,0],[70287,70301,0],[70303,70312,0],[70320,70378,0],[70384,70393,0],[70400,70403,0],[70405,70412,0],[70415,70416,0],[70419,70440,0],[70442,70448,0],[70450,70451,0],[70453,70457,0],[70459,70468,0],[70471,70472,0],[70475,70477,0],[70480,70480,0],[70487,70487,0],[70493,70499,0],[70502,70508,0],[70512,70516,0],[70656,70730,0],[70736,70745,0],[70750,70753,0],[70784,70853,0],[70855,70855,0],[70864,70873,0],[71040,71093,0],[71096,71104,0],[71128,71133,0],[71168,71232,0],[71236,71236,0],[71248,71257,0],[71296,71352,0],[71360,71369,0],[71424,71450,0],[71453,71467,0],[71472,71481,0],[71488,71494,0],[71680,71738,0],[71840,71871,1],[71872,71913,0],[71935,71942,0],[71945,71945,0],[71948,71955,0],[71957,71958,0],[71960,71989,0],[71991,71992,0],[71995,72003,0],[72016,72025,0],[72096,72103,0],[72106,72151,0],[72154,72161,0],[72163,72164,0],[72192,72254,0],[72263,72263,0],[72272,72345,0],[72349,72349,0],[72368,72440,0],[72704,72712,0],[72714,72758,0],[72760,72768,0],[72784,72793,0],[72818,72847,0],[72850,72871,0],[72873,72886,0],[72960,72966,0],[72968,72969,0],[72971,73014,0],[73018,73018,0],[73020,73021,0],[73023,73031,0],[73040,73049,0],[73056,73061,0],[73063,73064,0],[73066,73102,0],[73104,73105,0],[73107,73112,0],[73120,73129,0],[73440,73462,0],[73472,73488,0],[73490,73530,0],[73534,73538,0],[73552,73561,0],[73648,73648,0],[73728,74649,0],[74880,75075,0],[77712,77808,0],[77824,78895,0],[78912,78933,0],[82944,83526,0],[92160,92728,0],[92736,92766,0],[92768,92777,0],[92784,92862,0],[92864,92873,0],[92880,92909,0],[92912,92916,0],[92928,92982,0],[92992,92995,0],[93008,93017,0],[93027,93047,0],[93053,93071,0],[93760,93791,1],[93792,93823,0],[93952,94026,0],[94031,94087,0],[94095,94111,0],[94176,94177,0],[94179,94180,0],[94192,94193,0],[94208,100343,0],[100352,101589,0],[101632,101640,0],[110576,110579,0],[110581,110587,0],[110589,110590,0],[110592,110882,0],[110898,110898,0],[110928,110930,0],[110933,110933,0],[110948,110951,0],[110960,111355,0],[113664,113770,0],[113776,113788,0],[113792,113800,0],[113808,113817,0],[113821,113822,0],[113824,113824,3],[118528,118573,0],[118576,118598,0],[119134,119140,1],[119227,119232,1],[119808,119892,1],[119894,119964,1],[119966,119967,1],[119970,119970,1],[119973,119974,1],[119977,119980,1],[119982,119993,1],[119995,119995,1],[119997,120003,1],[120005,120069,1],[120071,120074,1],[120077,120084,1],[120086,120092,1],[120094,120121,1],[120123,120126,1],[120128,120132,1],[120134,120134,1],[120138,120144,1],[120146,120485,1],[120488,120531,1],[120533,120589,1],[120591,120647,1],[120649,120705,1],[120707,120763,1],[120765,120778,1],[120782,120831,1],[121344,121398,0],[121403,121452,0],[121461,121461,0],[121476,121476,0],[121499,121503,0],[121505,121519,0],[122624,122654,0],[122661,122666,0],[122880,122886,0],[122888,122904,0],[122907,122913,0],[122915,122916,0],[122918,122922,0],[122928,122989,1],[123023,123023,0],[123136,123180,0],[123184,123197,0],[123200,123209,0],[123214,123214,0],[123536,123566,0],[123584,123641,0],[124112,124153,0],[124896,124902,0],[124904,124907,0],[124909,124910,0],[124912,124926,0],[124928,125124,0],[125136,125142,0],[125184,125217,1],[125218,125259,0],[125264,125273,0],[126464,126467,1],[126469,126495,1],[126497,126498,1],[126500,126500,1],[126503,126503,1],[126505,126514,1],[126516,126519,1],[126521,126521,1],[126523,126523,1],[126530,126530,1],[126535,126535,1],[126537,126537,1],[126539,126539,1],[126541,126543,1],[126545,126546,1],[126548,126548,1],[126551,126551,1],[126553,126553,1],[126555,126555,1],[126557,126557,1],[126559,126559,1],[126561,126562,1],[126564,126564,1],[126567,126570,1],[126572,126578,1],[126580,126583,1],[126585,126588,1],[126590,126590,1],[126592,126601,1],[126603,126619,1],[126625,126627,1],[126629,126633,1],[126635,126651,1],[127274,127278,1],[127280,127311,1],[127338,127340,1],[127376,127376,1],[127488,127490,1],[127504,127547,1],[127552,127560,1],[127568,127569,1],[130032,130041,1],[131072,173791,0],[173824,177977,0],[177984,178205,0],[178208,183969,0],[183984,191456,0],[191472,192093,0],[194560,194609,1],[194612,194629,1],[194631,194663,1],[194665,194666,1],[194668,194675,1],[194677,194705,1],[194707,194708,1],[194710,194846,1],[194848,194860,1],[194862,194886,1],[194888,194909,1],[194912,195006,1],[195008,195070,1],[195072,195101,1],[196608,201546,0],[201552,205743,0],[917760,917760,3]],"mappings":{"65":[97],"66":[98],"67":[99],"68":[100],"69":[101],"70":[102],"71":[103],"72":[104],"73":[105],"74":[106],"75":[107],"76":[108],"77":[109],"78":[110],"79":[111],"80":[112],"81":[113],"82":[114],"83":[115],"84":[116],"85":[117],"86":[118],"87":[119],"88":[120],"89":[121],"90":[122],"160":[32],"168":[32,776],"170":[97],"175":[32,772],"178":[50],"179":[51],"180":[32,769],"181":[956],"184":[32,807],"185":[49],"186":[111],"188":[49,8260,52],"189":[49,8260,50],"190":[51,8260,52],"192":[224],"193":[225],"194":[226],"195":[227],"196":[228],"197":[229],"198":[230],"199":[231],"200":[232],"201":[233],"202":[234],"203":[235],"204":[236],"205":[237],"206":[238],"207":[239],"208":[240],"209":[241],"210":[242],"211":[243],"212":[244],"213":[245],"214":[246],"216":[248],"217":[249],"218":[250],"219":[251],"220":[252],"221":[253],"222":[254],"223":[115,115],"256":[257],"258":[259],"260":[261],"262":[263],"264":[265],"266":[267],"268":[269],"270":[271],"272":[273],"274":[275],"276":[277],"278":[279],"280":[281],"282":[283],"284":[285],"286":[287],"288":[289],"290":[291],"292":[293],"294":[295],"296":[297],"298":[299],"300":[301],"302":[303],"304":[105,775],"306":[105,106],"308":[309],"310":[311],"313":[314],"315":[316],"317":[318],"319":[108,183],"321":[322],"323":[324],"325":[326],"327":[328],"329":[700,110],"330":[331],"332":[333],"334":[335],"336":[337],"338":[339],"340":[341],"342":[343],"344":[345],"346":[347],"348":[349],"350":[351],"352":[353],"354":[355],"356":[357],"358":[359],"360":[361],"362":[363],"364":[365],"366":[367],"368":[369],"370":[371],"372":[373],"374":[375],"376":[255],"377":[378],"379":[380],"381":[382],"383":[115],"385":[595],"386":[387],"388":[389],"390":[596],"391":[392],"393":[598],"394":[599],"395":[396],"398":[477],"399":[601],"400":[603],"401":[402],"403":[608],"404":[611],"406":[617],"407":[616],"408":[409],"412":[623],"413":[626],"415":[629],"416":[417],"418":[419],"420":[421],"422":[640],"423":[424],"425":[643],"428":[429],"430":[648],"431":[432],"433":[650],"434":[651],"435":[436],"437":[438],"439":[658],"440":[441],"444":[445],"452":[100,382],"455":[108,106],"458":[110,106],"461":[462],"463":[464],"465":[466],"467":[468],"469":[470],"471":[472],"473":[474],"475":[476],"478":[479],"480":[481],"482":[483],"484":[485],"486":[487],"488":[489],"490":[491],"492":[493],"494":[495],"497":[100,122],"500":[501],"502":[405],"503":[447],"504":[505],"506":[507],"508":[509],"510":[511],"512":[513],"514":[515],"516":[517],"518":[519],"520":[521],"522":[523],"524":[525],"526":[527],"528":[529],"530":[531],"532":[533],"534":[535],"536":[537],"538":[539],"540":[541],"542":[543],"544":[414],"546":[547],"548":[549],"550":[551],"552":[553],"554":[555],"556":[557],"558":[559],"560":[561],"562":[563],"570":[11365],"571":[572],"573":[410],"574":[11366],"577":[578],"579":[384],"580":[649],"581":[652],"582":[583],"584":[585],"586":[587],"588":[589],"590":[591],"688":[104],"689":[614],"690":[106],"691":[114],"692":[633],"693":[635],"694":[641],"695":[119],"696":[121],"728":[32,774],"729":[32,775],"730":[32,778],"731":[32,808],"732":[32,771],"733":[32,779],"736":[611],"737":[108],"738":[115],"739":[120],"740":[661],"832":[768],"833":[769],"835":[787],"836":[776,769],"837":[953],"880":[881],"882":[883],"884":[697],"886":[887],"890":[32,953],"894":[59],"895":[1011],"900":[32,769],"901":[32,776,769],"902":[940],"903":[183],"904":[941],"905":[942],"906":[943],"908":[972],"910":[973],"911":[974],"913":[945],"914":[946],"915":[947],"916":[948],"917":[949],"918":[950],"919":[951],"920":[952],"921":[953],"922":[954],"923":[955],"924":[956],"925":[957],"926":[958],"927":[959],"928":[960],"929":[961],"931":[963],"932":[964],"933":[965],"934":[966],"935":[967],"936":[968],"937":[969],"938":[970],"939":[971],"962":[963],"975":[983],"976":[946],"977":[952],"978":[965],"979":[973],"980":[971],"981":[966],"982":[960],"984":[985],"986":[987],"988":[989],"990":[991],"992":[993],"994":[995],"996":[997],"998":[999],"1000":[1001],"1002":[1003],"1004":[1005],"1006":[1007],"1008":[954],"1009":[961],"1010":[963],"1012":[952],"1013":[949],"1015":[1016],"1017":[963],"1018":[1019],"1021":[891],"1022":[892],"1023":[893],"1024":[1104],"1025":[1105],"1026":[1106],"1027":[1107],"1028":[1108],"1029":[1109],"1030":[1110],"1031":[1111],"1032":[1112],"1033":[1113],"1034":[1114],"1035":[1115],"1036":[1116],"1037":[1117],"1038":[1118],"1039":[1119],"1040":[1072],"1041":[1073],"1042":[1074],"1043":[1075],"1044":[1076],"1045":[1077],"1046":[1078],"1047":[1079],"1048":[1080],"1049":[1081],"1050":[1082],"1051":[1083],"1052":[1084],"1053":[1085],"1054":[1086],"1055":[1087],"1056":[1088],"1057":[1089],"1058":[1090],"1059":[1091],"1060":[1092],"1061":[1093],"1062":[1094],"1063":[1095],"1064":[1096],"1065":[1097],"1066":[1098],"1067":[1099],"1068":[1100],"1069":[1101],"1070":[1102],"1071":[1103],"1120":[1121],"1122":[1123],"1124":[1125],"1126":[1127],"1128":[1129],"1130":[1131],"1132":[1133],"1134":[1135],"1136":[1137],"1138":[1139],"1140":[1141],"1142":[1143],"1144":[1145],"1146":[1147],"1148":[1149],"1150":[1151],"1152":[1153],"1162":[1163],"1164":[1165],"1166":[1167],"1168":[1169],"1170":[1171],"1172":[1173],"1174":[1175],"1176":[1177],"1178":[1179],"1180":[1181],"1182":[1183],"1184":[1185],"1186":[1187],"1188":[1189],"1190":[1191],"1192":[1193],"1194":[1195],"1196":[1197],"1198":[1199],"1200":[1201],"1202":[1203],"1204":[1205],"1206":[1207],"1208":[1209],"1210":[1211],"1212":[1213],"1214":[1215],"1217":[1218],"1219":[1220],"1221":[1222],"1223":[1224],"1225":[1226],"1227":[1228],"1229":[1230],"1232":[1233],"1234":[1235],"1236":[1237],"1238":[1239],"1240":[1241],"1242":[1243],"1244":[1245],"1246":[1247],"1248":[1249],"1250":[1251],"1252":[1253],"1254":[1255],"1256":[1257],"1258":[1259],"1260":[1261],"1262":[1263],"1264":[1265],"1266":[1267],"1268":[1269],"1270":[1271],"1272":[1273],"1274":[1275],"1276":[1277],"1278":[1279],"1280":[1281],"1282":[1283],"1284":[1285],"1286":[1287],"1288":[1289],"1290":[1291],"1292":[1293],"1294":[1295],"1296":[1297],"1298":[1299],"1300":[1301],"1302":[1303],"1304":[1305],"1306":[1307],"1308":[1309],"1310":[1311],"1312":[1313],"1314":[1315],"1316":[1317],"1318":[1319],"1320":[1321],"1322":[1323],"1324":[1325],"1326":[1327],"1329":[1377],"1330":[1378],"1331":[1379],"1332":[1380],"1333":[1381],"1334":[1382],"1335":[1383],"1336":[1384],"1337":[1385],"1338":[1386],"1339":[1387],"1340":[1388],"1341":[1389],"1342":[1390],"1343":[1391],"1344":[1392],"1345":[1393],"1346":[1394],"1347":[1395],"1348":[1396],"1349":[1397],"1350":[1398],"1351":[1399],"1352":[1400],"1353":[1401],"1354":[1402],"1355":[1403],"1356":[1404],"1357":[1405],"1358":[1406],"1359":[1407],"1360":[1408],"1361":[1409],"1362":[1410],"1363":[1411],"1364":[1412],"1365":[1413],"1366":[1414],"1415":[1381,1410],"1653":[1575,1652],"1654":[1608,1652],"1655":[1735,1652],"1656":[1610,1652],"2392":[2325,2364],"2393":[2326,2364],"2394":[2327,2364],"2395":[2332,2364],"2396":[2337,2364],"2397":[2338,2364],"2398":[2347,2364],"2399":[2351,2364],"2524":[2465,2492],"2525":[2466,2492],"2527":[2479,2492],"2611":[2610,2620],"2614":[2616,2620],"2649":[2582,2620],"2650":[2583,2620],"2651":[2588,2620],"2654":[2603,2620],"2908":[2849,2876],"2909":[2850,2876],"3635":[3661,3634],"3763":[3789,3762],"3804":[3755,3737],"3805":[3755,3745],"3852":[3851],"3907":[3906,4023],"3917":[3916,4023],"3922":[3921,4023],"3927":[3926,4023],"3932":[3931,4023],"3945":[3904,4021],"3955":[3953,3954],"3957":[3953,3956],"3958":[4018,3968],"3959":[4018,3953,3968],"3960":[4019,3968],"3961":[4019,3953,3968],"3969":[3953,3968],"3987":[3986,4023],"3997":[3996,4023],"4002":[4001,4023],"4007":[4006,4023],"4012":[4011,4023],"4025":[3984,4021],"4295":[11559],"4301":[11565],"4348":[4316],"5112":[5104],"5113":[5105],"5114":[5106],"5115":[5107],"5116":[5108],"5117":[5109],"7296":[1074],"7297":[1076],"7298":[1086],"7299":[1089],"7300":[1090],"7302":[1098],"7303":[1123],"7304":[42571],"7312":[4304],"7313":[4305],"7314":[4306],"7315":[4307],"7316":[4308],"7317":[4309],"7318":[4310],"7319":[4311],"7320":[4312],"7321":[4313],"7322":[4314],"7323":[4315],"7324":[4316],"7325":[4317],"7326":[4318],"7327":[4319],"7328":[4320],"7329":[4321],"7330":[4322],"7331":[4323],"7332":[4324],"7333":[4325],"7334":[4326],"7335":[4327],"7336":[4328],"7337":[4329],"7338":[4330],"7339":[4331],"7340":[4332],"7341":[4333],"7342":[4334],"7343":[4335],"7344":[4336],"7345":[4337],"7346":[4338],"7347":[4339],"7348":[4340],"7349":[4341],"7350":[4342],"7351":[4343],"7352":[4344],"7353":[4345],"7354":[4346],"7357":[4349],"7358":[4350],"7359":[4351],"7468":[97],"7469":[230],"7470":[98],"7472":[100],"7473":[101],"7474":[477],"7475":[103],"7476":[104],"7477":[105],"7478":[106],"7479":[107],"7480":[108],"7481":[109],"7482":[110],"7484":[111],"7485":[547],"7486":[112],"7487":[114],"7488":[116],"7489":[117],"7490":[119],"7491":[97],"7492":[592],"7493":[593],"7494":[7426],"7495":[98],"7496":[100],"7497":[101],"7498":[601],"7499":[603],"7500":[604],"7501":[103],"7503":[107],"7504":[109],"7505":[331],"7506":[111],"7507":[596],"7508":[7446],"7509":[7447],"7510":[112],"7511":[116],"7512":[117],"7513":[7453],"7514":[623],"7515":[118],"7516":[7461],"7517":[946],"7518":[947],"7519":[948],"7520":[966],"7521":[967],"7522":[105],"7523":[114],"7524":[117],"7525":[118],"7526":[946],"7527":[947],"7528":[961],"7529":[966],"7530":[967],"7544":[1085],"7579":[594],"7580":[99],"7581":[597],"7582":[240],"7583":[604],"7584":[102],"7585":[607],"7586":[609],"7587":[613],"7588":[616],"7589":[617],"7590":[618],"7591":[7547],"7592":[669],"7593":[621],"7594":[7557],"7595":[671],"7596":[625],"7597":[624],"7598":[626],"7599":[627],"7600":[628],"7601":[629],"7602":[632],"7603":[642],"7604":[643],"7605":[427],"7606":[649],"7607":[650],"7608":[7452],"7609":[651],"7610":[652],"7611":[122],"7612":[656],"7613":[657],"7614":[658],"7615":[952],"7680":[7681],"7682":[7683],"7684":[7685],"7686":[7687],"7688":[7689],"7690":[7691],"7692":[7693],"7694":[7695],"7696":[7697],"7698":[7699],"7700":[7701],"7702":[7703],"7704":[7705],"7706":[7707],"7708":[7709],"7710":[7711],"7712":[7713],"7714":[7715],"7716":[7717],"7718":[7719],"7720":[7721],"7722":[7723],"7724":[7725],"7726":[7727],"7728":[7729],"7730":[7731],"7732":[7733],"7734":[7735],"7736":[7737],"7738":[7739],"7740":[7741],"7742":[7743],"7744":[7745],"7746":[7747],"7748":[7749],"7750":[7751],"7752":[7753],"7754":[7755],"7756":[7757],"7758":[7759],"7760":[7761],"7762":[7763],"7764":[7765],"7766":[7767],"7768":[7769],"7770":[7771],"7772":[7773],"7774":[7775],"7776":[7777],"7778":[7779],"7780":[7781],"7782":[7783],"7784":[7785],"7786":[7787],"7788":[7789],"7790":[7791],"7792":[7793],"7794":[7795],"7796":[7797],"7798":[7799],"7800":[7801],"7802":[7803],"7804":[7805],"7806":[7807],"7808":[7809],"7810":[7811],"7812":[7813],"7814":[7815],"7816":[7817],"7818":[7819],"7820":[7821],"7822":[7823],"7824":[7825],"7826":[7827],"7828":[7829],"7834":[97,702],"7835":[7777],"7838":[223],"7840":[7841],"7842":[7843],"7844":[7845],"7846":[7847],"7848":[7849],"7850":[7851],"7852":[7853],"7854":[7855],"7856":[7857],"7858":[7859],"7860":[7861],"7862":[7863],"7864":[7865],"7866":[7867],"7868":[7869],"7870":[7871],"7872":[7873],"7874":[7875],"7876":[7877],"7878":[7879],"7880":[7881],"7882":[7883],"7884":[7885],"7886":[7887],"7888":[7889],"7890":[7891],"7892":[7893],"7894":[7895],"7896":[7897],"7898":[7899],"7900":[7901],"7902":[7903],"7904":[7905],"7906":[7907],"7908":[7909],"7910":[7911],"7912":[7913],"7914":[7915],"7916":[7917],"7918":[7919],"7920":[7921],"7922":[7923],"7924":[7925],"7926":[7927],"7928":[7929],"7930":[7931],"7932":[7933],"7934":[7935],"7944":[7936],"7945":[7937],"7946":[7938],"7947":[7939],"7948":[7940],"7949":[7941],"7950":[7942],"7951":[7943],"7960":[7952],"7961":[7953],"7962":[7954],"7963":[7955],"7964":[7956],"7965":[7957],"7976":[7968],"7977":[7969],"7978":[7970],"7979":[7971],"7980":[7972],"7981":[7973],"7982":[7974],"7983":[7975],"7992":[7984],"7993":[7985],"7994":[7986],"7995":[7987],"7996":[7988],"7997":[7989],"7998":[7990],"7999":[7991],"8008":[8000],"8009":[8001],"8010":[8002],"8011":[8003],"8012":[8004],"8013":[8005],"8025":[8017],"8027":[8019],"8029":[8021],"8031":[8023],"8040":[8032],"8041":[8033],"8042":[8034],"8043":[8035],"8044":[8036],"8045":[8037],"8046":[8038],"8047":[8039],"8049":[940],"8051":[941],"8053":[942],"8055":[943],"8057":[972],"8059":[973],"8061":[974],"8064":[7936,953],"8065":[7937,953],"8066":[7938,953],"8067":[7939,953],"8068":[7940,953],"8069":[7941,953],"8070":[7942,953],"8071":[7943,953],"8072":[7936,953],"8073":[7937,953],"8074":[7938,953],"8075":[7939,953],"8076":[7940,953],"8077":[7941,953],"8078":[7942,953],"8079":[7943,953],"8080":[7968,953],"8081":[7969,953],"8082":[7970,953],"8083":[7971,953],"8084":[7972,953],"8085":[7973,953],"8086":[7974,953],"8087":[7975,953],"8088":[7968,953],"8089":[7969,953],"8090":[7970,953],"8091":[7971,953],"8092":[7972,953],"8093":[7973,953],"8094":[7974,953],"8095":[7975,953],"8096":[8032,953],"8097":[8033,953],"8098":[8034,953],"8099":[8035,953],"8100":[8036,953],"8101":[8037,953],"8102":[8038,953],"8103":[8039,953],"8104":[8032,953],"8105":[8033,953],"8106":[8034,953],"8107":[8035,953],"8108":[8036,953],"8109":[8037,953],"8110":[8038,953],"8111":[8039,953],"8114":[8048,953],"8115":[945,953],"8116":[940,953],"8119":[8118,953],"8120":[8112],"8121":[8113],"8122":[8048],"8123":[940],"8124":[945,953],"8125":[32,787],"8126":[953],"8127":[32,787],"8128":[32,834],"8129":[32,776,834],"8130":[8052,953],"8131":[951,953],"8132":[942,953],"8135":[8134,953],"8136":[8050],"8137":[941],"8138":[8052],"8139":[942],"8140":[951,953],"8141":[32,787,768],"8142":[32,787,769],"8143":[32,787,834],"8147":[912],"8152":[8144],"8153":[8145],"8154":[8054],"8155":[943],"8157":[32,788,768],"8158":[32,788,769],"8159":[32,788,834],"8163":[944],"8168":[8160],"8169":[8161],"8170":[8058],"8171":[973],"8172":[8165],"8173":[32,776,768],"8174":[32,776,769],"8175":[96],"8178":[8060,953],"8179":[969,953],"8180":[974,953],"8183":[8182,953],"8184":[8056],"8185":[972],"8186":[8060],"8187":[974],"8188":[969,953],"8189":[32,769],"8190":[32,788],"8192":[32],"8204":[],"8209":[8208],"8215":[32,819],"8239":[32],"8243":[8242,8242],"8244":[8242,8242,8242],"8246":[8245,8245],"8247":[8245,8245,8245],"8252":[33,33],"8254":[32,773],"8263":[63,63],"8264":[63,33],"8265":[33,63],"8279":[8242,8242,8242,8242],"8287":[32],"8304":[48],"8305":[105],"8308":[52],"8309":[53],"8310":[54],"8311":[55],"8312":[56],"8313":[57],"8314":[43],"8315":[8722],"8316":[61],"8317":[40],"8318":[41],"8319":[110],"8320":[48],"8321":[49],"8322":[50],"8323":[51],"8324":[52],"8325":[53],"8326":[54],"8327":[55],"8328":[56],"8329":[57],"8330":[43],"8331":[8722],"8332":[61],"8333":[40],"8334":[41],"8336":[97],"8337":[101],"8338":[111],"8339":[120],"8340":[601],"8341":[104],"8342":[107],"8343":[108],"8344":[109],"8345":[110],"8346":[112],"8347":[115],"8348":[116],"8360":[114,115],"8448":[97,47,99],"8449":[97,47,115],"8450":[99],"8451":[176,99],"8453":[99,47,111],"8454":[99,47,117],"8455":[603],"8457":[176,102],"8458":[103],"8459":[104],"8463":[295],"8464":[105],"8466":[108],"8469":[110],"8470":[110,111],"8473":[112],"8474":[113],"8475":[114],"8480":[115,109],"8481":[116,101,108],"8482":[116,109],"8484":[122],"8486":[969],"8488":[122],"8490":[107],"8491":[229],"8492":[98],"8493":[99],"8495":[101],"8497":[102],"8499":[109],"8500":[111],"8501":[1488],"8502":[1489],"8503":[1490],"8504":[1491],"8505":[105],"8507":[102,97,120],"8508":[960],"8509":[947],"8511":[960],"8512":[8721],"8517":[100],"8519":[101],"8520":[105],"8521":[106],"8528":[49,8260,55],"8529":[49,8260,57],"8530":[49,8260,49,48],"8531":[49,8260,51],"8532":[50,8260,51],"8533":[49,8260,53],"8534":[50,8260,53],"8535":[51,8260,53],"8536":[52,8260,53],"8537":[49,8260,54],"8538":[53,8260,54],"8539":[49,8260,56],"8540":[51,8260,56],"8541":[53,8260,56],"8542":[55,8260,56],"8543":[49,8260],"8544":[105],"8545":[105,105],"8546":[105,105,105],"8547":[105,118],"8548":[118],"8549":[118,105],"8550":[118,105,105],"8551":[118,105,105,105],"8552":[105,120],"8553":[120],"8554":[120,105],"8555":[120,105,105],"8556":[108],"8557":[99],"8558":[100],"8559":[109],"8560":[105],"8561":[105,105],"8562":[105,105,105],"8563":[105,118],"8564":[118],"8565":[118,105],"8566":[118,105,105],"8567":[118,105,105,105],"8568":[105,120],"8569":[120],"8570":[120,105],"8571":[120,105,105],"8572":[108],"8573":[99],"8574":[100],"8575":[109],"8585":[48,8260,51],"8748":[8747,8747],"8749":[8747,8747,8747],"8751":[8750,8750],"8752":[8750,8750,8750],"9001":[12296],"9002":[12297],"9312":[49],"9313":[50],"9314":[51],"9315":[52],"9316":[53],"9317":[54],"9318":[55],"9319":[56],"9320":[57],"9321":[49,48],"9322":[49,49],"9323":[49,50],"9324":[49,51],"9325":[49,52],"9326":[49,53],"9327":[49,54],"9328":[49,55],"9329":[49,56],"9330":[49,57],"9331":[50,48],"9332":[40,49,41],"9333":[40,50,41],"9334":[40,51,41],"9335":[40,52,41],"9336":[40,53,41],"9337":[40,54,41],"9338":[40,55,41],"9339":[40,56,41],"9340":[40,57,41],"9341":[40,49,48,41],"9342":[40,49,49,41],"9343":[40,49,50,41],"9344":[40,49,51,41],"9345":[40,49,52,41],"9346":[40,49,53,41],"9347":[40,49,54,41],"9348":[40,49,55,41],"9349":[40,49,56,41],"9350":[40,49,57,41],"9351":[40,50,48,41],"9372":[40,97,41],"9373":[40,98,41],"9374":[40,99,41],"9375":[40,100,41],"9376":[40,101,41],"9377":[40,102,41],"9378":[40,103,41],"9379":[40,104,41],"9380":[40,105,41],"9381":[40,106,41],"9382":[40,107,41],"9383":[40,108,41],"9384":[40,109,41],"9385":[40,110,41],"9386":[40,111,41],"9387":[40,112,41],"9388":[40,113,41],"9389":[40,114,41],"9390":[40,115,41],"9391":[40,116,41],"9392":[40,117,41],"9393":[40,118,41],"9394":[40,119,41],"9395":[40,120,41],"9396":[40,121,41],"9397":[40,122,41],"9398":[97],"9399":[98],"9400":[99],"9401":[100],"9402":[101],"9403":[102],"9404":[103],"9405":[104],"9406":[105],"9407":[106],"9408":[107],"9409":[108],"9410":[109],"9411":[110],"9412":[111],"9413":[112],"9414":[113],"9415":[114],"9416":[115],"9417":[116],"9418":[117],"9419":[118],"9420":[119],"9421":[120],"9422":[121],"9423":[122],"9424":[97],"9425":[98],"9426":[99],"9427":[100],"9428":[101],"9429":[102],"9430":[103],"9431":[104],"9432":[105],"9433":[106],"9434":[107],"9435":[108],"9436":[109],"9437":[110],"9438":[111],"9439":[112],"9440":[113],"9441":[114],"9442":[115],"9443":[116],"9444":[117],"9445":[118],"9446":[119],"9447":[120],"9448":[121],"9449":[122],"9450":[48],"10764":[8747,8747,8747,8747],"10868":[58,58,61],"10869":[61,61],"10870":[61,61,61],"10972":[10973,824],"11264":[11312],"11265":[11313],"11266":[11314],"11267":[11315],"11268":[11316],"11269":[11317],"11270":[11318],"11271":[11319],"11272":[11320],"11273":[11321],"11274":[11322],"11275":[11323],"11276":[11324],"11277":[11325],"11278":[11326],"11279":[11327],"11280":[11328],"11281":[11329],"11282":[11330],"11283":[11331],"11284":[11332],"11285":[11333],"11286":[11334],"11287":[11335],"11288":[11336],"11289":[11337],"11290":[11338],"11291":[11339],"11292":[11340],"11293":[11341],"11294":[11342],"11295":[11343],"11296":[11344],"11297":[11345],"11298":[11346],"11299":[11347],"11300":[11348],"11301":[11349],"11302":[11350],"11303":[11351],"11304":[11352],"11305":[11353],"11306":[11354],"11307":[11355],"11308":[11356],"11309":[11357],"11310":[11358],"11311":[11359],"11360":[11361],"11362":[619],"11363":[7549],"11364":[637],"11367":[11368],"11369":[11370],"11371":[11372],"11373":[593],"11374":[625],"11375":[592],"11376":[594],"11378":[11379],"11381":[11382],"11388":[106],"11389":[118],"11390":[575],"11391":[576],"11392":[11393],"11394":[11395],"11396":[11397],"11398":[11399],"11400":[11401],"11402":[11403],"11404":[11405],"11406":[11407],"11408":[11409],"11410":[11411],"11412":[11413],"11414":[11415],"11416":[11417],"11418":[11419],"11420":[11421],"11422":[11423],"11424":[11425],"11426":[11427],"11428":[11429],"11430":[11431],"11432":[11433],"11434":[11435],"11436":[11437],"11438":[11439],"11440":[11441],"11442":[11443],"11444":[11445],"11446":[11447],"11448":[11449],"11450":[11451],"11452":[11453],"11454":[11455],"11456":[11457],"11458":[11459],"11460":[11461],"11462":[11463],"11464":[11465],"11466":[11467],"11468":[11469],"11470":[11471],"11472":[11473],"11474":[11475],"11476":[11477],"11478":[11479],"11480":[11481],"11482":[11483],"11484":[11485],"11486":[11487],"11488":[11489],"11490":[11491],"11499":[11500],"11501":[11502],"11506":[11507],"11631":[11617],"11935":[27597],"12019":[40863],"12032":[19968],"12033":[20008],"12034":[20022],"12035":[20031],"12036":[20057],"12037":[20101],"12038":[20108],"12039":[20128],"12040":[20154],"12041":[20799],"12042":[20837],"12043":[20843],"12044":[20866],"12045":[20886],"12046":[20907],"12047":[20960],"12048":[20981],"12049":[20992],"12050":[21147],"12051":[21241],"12052":[21269],"12053":[21274],"12054":[21304],"12055":[21313],"12056":[21340],"12057":[21353],"12058":[21378],"12059":[21430],"12060":[21448],"12061":[21475],"12062":[22231],"12063":[22303],"12064":[22763],"12065":[22786],"12066":[22794],"12067":[22805],"12068":[22823],"12069":[22899],"12070":[23376],"12071":[23424],"12072":[23544],"12073":[23567],"12074":[23586],"12075":[23608],"12076":[23662],"12077":[23665],"12078":[24027],"12079":[24037],"12080":[24049],"12081":[24062],"12082":[24178],"12083":[24186],"12084":[24191],"12085":[24308],"12086":[24318],"12087":[24331],"12088":[24339],"12089":[24400],"12090":[24417],"12091":[24435],"12092":[24515],"12093":[25096],"12094":[25142],"12095":[25163],"12096":[25903],"12097":[25908],"12098":[25991],"12099":[26007],"12100":[26020],"12101":[26041],"12102":[26080],"12103":[26085],"12104":[26352],"12105":[26376],"12106":[26408],"12107":[27424],"12108":[27490],"12109":[27513],"12110":[27571],"12111":[27595],"12112":[27604],"12113":[27611],"12114":[27663],"12115":[27668],"12116":[27700],"12117":[28779],"12118":[29226],"12119":[29238],"12120":[29243],"12121":[29247],"12122":[29255],"12123":[29273],"12124":[29275],"12125":[29356],"12126":[29572],"12127":[29577],"12128":[29916],"12129":[29926],"12130":[29976],"12131":[29983],"12132":[29992],"12133":[30000],"12134":[30091],"12135":[30098],"12136":[30326],"12137":[30333],"12138":[30382],"12139":[30399],"12140":[30446],"12141":[30683],"12142":[30690],"12143":[30707],"12144":[31034],"12145":[31160],"12146":[31166],"12147":[31348],"12148":[31435],"12149":[31481],"12150":[31859],"12151":[31992],"12152":[32566],"12153":[32593],"12154":[32650],"12155":[32701],"12156":[32769],"12157":[32780],"12158":[32786],"12159":[32819],"12160":[32895],"12161":[32905],"12162":[33251],"12163":[33258],"12164":[33267],"12165":[33276],"12166":[33292],"12167":[33307],"12168":[33311],"12169":[33390],"12170":[33394],"12171":[33400],"12172":[34381],"12173":[34411],"12174":[34880],"12175":[34892],"12176":[34915],"12177":[35198],"12178":[35211],"12179":[35282],"12180":[35328],"12181":[35895],"12182":[35910],"12183":[35925],"12184":[35960],"12185":[35997],"12186":[36196],"12187":[36208],"12188":[36275],"12189":[36523],"12190":[36554],"12191":[36763],"12192":[36784],"12193":[36789],"12194":[37009],"12195":[37193],"12196":[37318],"12197":[37324],"12198":[37329],"12199":[38263],"12200":[38272],"12201":[38428],"12202":[38582],"12203":[38585],"12204":[38632],"12205":[38737],"12206":[38750],"12207":[38754],"12208":[38761],"12209":[38859],"12210":[38893],"12211":[38899],"12212":[38913],"12213":[39080],"12214":[39131],"12215":[39135],"12216":[39318],"12217":[39321],"12218":[39340],"12219":[39592],"12220":[39640],"12221":[39647],"12222":[39717],"12223":[39727],"12224":[39730],"12225":[39740],"12226":[39770],"12227":[40165],"12228":[40565],"12229":[40575],"12230":[40613],"12231":[40635],"12232":[40643],"12233":[40653],"12234":[40657],"12235":[40697],"12236":[40701],"12237":[40718],"12238":[40723],"12239":[40736],"12240":[40763],"12241":[40778],"12242":[40786],"12243":[40845],"12244":[40860],"12245":[40864],"12288":[32],"12290":[46],"12342":[12306],"12344":[21313],"12345":[21316],"12346":[21317],"12443":[32,12441],"12444":[32,12442],"12447":[12424,12426],"12543":[12467,12488],"12593":[4352],"12594":[4353],"12595":[4522],"12596":[4354],"12597":[4524],"12598":[4525],"12599":[4355],"12600":[4356],"12601":[4357],"12602":[4528],"12603":[4529],"12604":[4530],"12605":[4531],"12606":[4532],"12607":[4533],"12608":[4378],"12609":[4358],"12610":[4359],"12611":[4360],"12612":[4385],"12613":[4361],"12614":[4362],"12615":[4363],"12616":[4364],"12617":[4365],"12618":[4366],"12619":[4367],"12620":[4368],"12621":[4369],"12622":[4370],"12623":[4449],"12624":[4450],"12625":[4451],"12626":[4452],"12627":[4453],"12628":[4454],"12629":[4455],"12630":[4456],"12631":[4457],"12632":[4458],"12633":[4459],"12634":[4460],"12635":[4461],"12636":[4462],"12637":[4463],"12638":[4464],"12639":[4465],"12640":[4466],"12641":[4467],"12642":[4468],"12643":[4469],"12645":[4372],"12646":[4373],"12647":[4551],"12648":[4552],"12649":[4556],"12650":[4558],"12651":[4563],"12652":[4567],"12653":[4569],"12654":[4380],"12655":[4573],"12656":[4575],"12657":[4381],"12658":[4382],"12659":[4384],"12660":[4386],"12661":[4387],"12662":[4391],"12663":[4393],"12664":[4395],"12665":[4396],"12666":[4397],"12667":[4398],"12668":[4399],"12669":[4402],"12670":[4406],"12671":[4416],"12672":[4423],"12673":[4428],"12674":[4593],"12675":[4594],"12676":[4439],"12677":[4440],"12678":[4441],"12679":[4484],"12680":[4485],"12681":[4488],"12682":[4497],"12683":[4498],"12684":[4500],"12685":[4510],"12686":[4513],"12690":[19968],"12691":[20108],"12692":[19977],"12693":[22235],"12694":[19978],"12695":[20013],"12696":[19979],"12697":[30002],"12698":[20057],"12699":[19993],"12700":[19969],"12701":[22825],"12702":[22320],"12703":[20154],"12800":[40,4352,41],"12801":[40,4354,41],"12802":[40,4355,41],"12803":[40,4357,41],"12804":[40,4358,41],"12805":[40,4359,41],"12806":[40,4361,41],"12807":[40,4363,41],"12808":[40,4364,41],"12809":[40,4366,41],"12810":[40,4367,41],"12811":[40,4368,41],"12812":[40,4369,41],"12813":[40,4370,41],"12814":[40,44032,41],"12815":[40,45208,41],"12816":[40,45796,41],"12817":[40,46972,41],"12818":[40,47560,41],"12819":[40,48148,41],"12820":[40,49324,41],"12821":[40,50500,41],"12822":[40,51088,41],"12823":[40,52264,41],"12824":[40,52852,41],"12825":[40,53440,41],"12826":[40,54028,41],"12827":[40,54616,41],"12828":[40,51452,41],"12829":[40,50724,51204,41],"12830":[40,50724,54980,41],"12832":[40,19968,41],"12833":[40,20108,41],"12834":[40,19977,41],"12835":[40,22235,41],"12836":[40,20116,41],"12837":[40,20845,41],"12838":[40,19971,41],"12839":[40,20843,41],"12840":[40,20061,41],"12841":[40,21313,41],"12842":[40,26376,41],"12843":[40,28779,41],"12844":[40,27700,41],"12845":[40,26408,41],"12846":[40,37329,41],"12847":[40,22303,41],"12848":[40,26085,41],"12849":[40,26666,41],"12850":[40,26377,41],"12851":[40,31038,41],"12852":[40,21517,41],"12853":[40,29305,41],"12854":[40,36001,41],"12855":[40,31069,41],"12856":[40,21172,41],"12857":[40,20195,41],"12858":[40,21628,41],"12859":[40,23398,41],"12860":[40,30435,41],"12861":[40,20225,41],"12862":[40,36039,41],"12863":[40,21332,41],"12864":[40,31085,41],"12865":[40,20241,41],"12866":[40,33258,41],"12867":[40,33267,41],"12868":[21839],"12869":[24188],"12870":[25991],"12871":[31631],"12880":[112,116,101],"12881":[50,49],"12882":[50,50],"12883":[50,51],"12884":[50,52],"12885":[50,53],"12886":[50,54],"12887":[50,55],"12888":[50,56],"12889":[50,57],"12890":[51,48],"12891":[51,49],"12892":[51,50],"12893":[51,51],"12894":[51,52],"12895":[51,53],"12896":[4352],"12897":[4354],"12898":[4355],"12899":[4357],"12900":[4358],"12901":[4359],"12902":[4361],"12903":[4363],"12904":[4364],"12905":[4366],"12906":[4367],"12907":[4368],"12908":[4369],"12909":[4370],"12910":[44032],"12911":[45208],"12912":[45796],"12913":[46972],"12914":[47560],"12915":[48148],"12916":[49324],"12917":[50500],"12918":[51088],"12919":[52264],"12920":[52852],"12921":[53440],"12922":[54028],"12923":[54616],"12924":[52280,44256],"12925":[51452,51032],"12926":[50864],"12928":[19968],"12929":[20108],"12930":[19977],"12931":[22235],"12932":[20116],"12933":[20845],"12934":[19971],"12935":[20843],"12936":[20061],"12937":[21313],"12938":[26376],"12939":[28779],"12940":[27700],"12941":[26408],"12942":[37329],"12943":[22303],"12944":[26085],"12945":[26666],"12946":[26377],"12947":[31038],"12948":[21517],"12949":[29305],"12950":[36001],"12951":[31069],"12952":[21172],"12953":[31192],"12954":[30007],"12955":[22899],"12956":[36969],"12957":[20778],"12958":[21360],"12959":[27880],"12960":[38917],"12961":[20241],"12962":[20889],"12963":[27491],"12964":[19978],"12965":[20013],"12966":[19979],"12967":[24038],"12968":[21491],"12969":[21307],"12970":[23447],"12971":[23398],"12972":[30435],"12973":[20225],"12974":[36039],"12975":[21332],"12976":[22812],"12977":[51,54],"12978":[51,55],"12979":[51,56],"12980":[51,57],"12981":[52,48],"12982":[52,49],"12983":[52,50],"12984":[52,51],"12985":[52,52],"12986":[52,53],"12987":[52,54],"12988":[52,55],"12989":[52,56],"12990":[52,57],"12991":[53,48],"12992":[49,26376],"12993":[50,26376],"12994":[51,26376],"12995":[52,26376],"12996":[53,26376],"12997":[54,26376],"12998":[55,26376],"12999":[56,26376],"13000":[57,26376],"13001":[49,48,26376],"13002":[49,49,26376],"13003":[49,50,26376],"13004":[104,103],"13005":[101,114,103],"13006":[101,118],"13007":[108,116,100],"13008":[12450],"13009":[12452],"13010":[12454],"13011":[12456],"13012":[12458],"13013":[12459],"13014":[12461],"13015":[12463],"13016":[12465],"13017":[12467],"13018":[12469],"13019":[12471],"13020":[12473],"13021":[12475],"13022":[12477],"13023":[12479],"13024":[12481],"13025":[12484],"13026":[12486],"13027":[12488],"13028":[12490],"13029":[12491],"13030":[12492],"13031":[12493],"13032":[12494],"13033":[12495],"13034":[12498],"13035":[12501],"13036":[12504],"13037":[12507],"13038":[12510],"13039":[12511],"13040":[12512],"13041":[12513],"13042":[12514],"13043":[12516],"13044":[12518],"13045":[12520],"13046":[12521],"13047":[12522],"13048":[12523],"13049":[12524],"13050":[12525],"13051":[12527],"13052":[12528],"13053":[12529],"13054":[12530],"13055":[20196,21644],"13056":[12450,12497,12540,12488],"13057":[12450,12523,12501,12449],"13058":[12450,12531,12506,12450],"13059":[12450,12540,12523],"13060":[12452,12491,12531,12464],"13061":[12452,12531,12481],"13062":[12454,12457,12531],"13063":[12456,12473,12463,12540,12489],"13064":[12456,12540,12459,12540],"13065":[12458,12531,12473],"13066":[12458,12540,12512],"13067":[12459,12452,12522],"13068":[12459,12521,12483,12488],"13069":[12459,12525,12522,12540],"13070":[12460,12525,12531],"13071":[12460,12531,12510],"13072":[12462,12460],"13073":[12462,12491,12540],"13074":[12461,12517,12522,12540],"13075":[12462,12523,12480,12540],"13076":[12461,12525],"13077":[12461,12525,12464,12521,12512],"13078":[12461,12525,12513,12540,12488,12523],"13079":[12461,12525,12527,12483,12488],"13080":[12464,12521,12512],"13081":[12464,12521,12512,12488,12531],"13082":[12463,12523,12476,12452,12525],"13083":[12463,12525,12540,12493],"13084":[12465,12540,12473],"13085":[12467,12523,12490],"13086":[12467,12540,12509],"13087":[12469,12452,12463,12523],"13088":[12469,12531,12481,12540,12512],"13089":[12471,12522,12531,12464],"13090":[12475,12531,12481],"13091":[12475,12531,12488],"13092":[12480,12540,12473],"13093":[12487,12471],"13094":[12489,12523],"13095":[12488,12531],"13096":[12490,12494],"13097":[12494,12483,12488],"13098":[12495,12452,12484],"13099":[12497,12540,12475,12531,12488],"13100":[12497,12540,12484],"13101":[12496,12540,12524,12523],"13102":[12500,12450,12473,12488,12523],"13103":[12500,12463,12523],"13104":[12500,12467],"13105":[12499,12523],"13106":[12501,12449,12521,12483,12489],"13107":[12501,12451,12540,12488],"13108":[12502,12483,12471,12455,12523],"13109":[12501,12521,12531],"13110":[12504,12463,12479,12540,12523],"13111":[12506,12477],"13112":[12506,12491,12498],"13113":[12504,12523,12484],"13114":[12506,12531,12473],"13115":[12506,12540,12472],"13116":[12505,12540,12479],"13117":[12509,12452,12531,12488],"13118":[12508,12523,12488],"13119":[12507,12531],"13120":[12509,12531,12489],"13121":[12507,12540,12523],"13122":[12507,12540,12531],"13123":[12510,12452,12463,12525],"13124":[12510,12452,12523],"13125":[12510,12483,12495],"13126":[12510,12523,12463],"13127":[12510,12531,12471,12519,12531],"13128":[12511,12463,12525,12531],"13129":[12511,12522],"13130":[12511,12522,12496,12540,12523],"13131":[12513,12460],"13132":[12513,12460,12488,12531],"13133":[12513,12540,12488,12523],"13134":[12516,12540,12489],"13135":[12516,12540,12523],"13136":[12518,12450,12531],"13137":[12522,12483,12488,12523],"13138":[12522,12521],"13139":[12523,12500,12540],"13140":[12523,12540,12502,12523],"13141":[12524,12512],"13142":[12524,12531,12488,12466,12531],"13143":[12527,12483,12488],"13144":[48,28857],"13145":[49,28857],"13146":[50,28857],"13147":[51,28857],"13148":[52,28857],"13149":[53,28857],"13150":[54,28857],"13151":[55,28857],"13152":[56,28857],"13153":[57,28857],"13154":[49,48,28857],"13155":[49,49,28857],"13156":[49,50,28857],"13157":[49,51,28857],"13158":[49,52,28857],"13159":[49,53,28857],"13160":[49,54,28857],"13161":[49,55,28857],"13162":[49,56,28857],"13163":[49,57,28857],"13164":[50,48,28857],"13165":[50,49,28857],"13166":[50,50,28857],"13167":[50,51,28857],"13168":[50,52,28857],"13169":[104,112,97],"13170":[100,97],"13171":[97,117],"13172":[98,97,114],"13173":[111,118],"13174":[112,99],"13175":[100,109],"13176":[100,109,50],"13177":[100,109,51],"13178":[105,117],"13179":[24179,25104],"13180":[26157,21644],"13181":[22823,27491],"13182":[26126,27835],"13183":[26666,24335,20250,31038],"13184":[112,97],"13185":[110,97],"13186":[956,97],"13187":[109,97],"13188":[107,97],"13189":[107,98],"13190":[109,98],"13191":[103,98],"13192":[99,97,108],"13193":[107,99,97,108],"13194":[112,102],"13195":[110,102],"13196":[956,102],"13197":[956,103],"13198":[109,103],"13199":[107,103],"13200":[104,122],"13201":[107,104,122],"13202":[109,104,122],"13203":[103,104,122],"13204":[116,104,122],"13205":[956,108],"13206":[109,108],"13207":[100,108],"13208":[107,108],"13209":[102,109],"13210":[110,109],"13211":[956,109],"13212":[109,109],"13213":[99,109],"13214":[107,109],"13215":[109,109,50],"13216":[99,109,50],"13217":[109,50],"13218":[107,109,50],"13219":[109,109,51],"13220":[99,109,51],"13221":[109,51],"13222":[107,109,51],"13223":[109,8725,115],"13224":[109,8725,115,50],"13225":[112,97],"13226":[107,112,97],"13227":[109,112,97],"13228":[103,112,97],"13229":[114,97,100],"13230":[114,97,100,8725,115],"13231":[114,97,100,8725,115,50],"13232":[112,115],"13233":[110,115],"13234":[956,115],"13235":[109,115],"13236":[112,118],"13237":[110,118],"13238":[956,118],"13239":[109,118],"13240":[107,118],"13241":[109,118],"13242":[112,119],"13243":[110,119],"13244":[956,119],"13245":[109,119],"13246":[107,119],"13247":[109,119],"13248":[107,969],"13249":[109,969],"13251":[98,113],"13252":[99,99],"13253":[99,100],"13254":[99,8725,107,103],"13256":[100,98],"13257":[103,121],"13258":[104,97],"13259":[104,112],"13260":[105,110],"13261":[107,107],"13262":[107,109],"13263":[107,116],"13264":[108,109],"13265":[108,110],"13266":[108,111,103],"13267":[108,120],"13268":[109,98],"13269":[109,105,108],"13270":[109,111,108],"13271":[112,104],"13273":[112,112,109],"13274":[112,114],"13275":[115,114],"13276":[115,118],"13277":[119,98],"13278":[118,8725,109],"13279":[97,8725,109],"13280":[49,26085],"13281":[50,26085],"13282":[51,26085],"13283":[52,26085],"13284":[53,26085],"13285":[54,26085],"13286":[55,26085],"13287":[56,26085],"13288":[57,26085],"13289":[49,48,26085],"13290":[49,49,26085],"13291":[49,50,26085],"13292":[49,51,26085],"13293":[49,52,26085],"13294":[49,53,26085],"13295":[49,54,26085],"13296":[49,55,26085],"13297":[49,56,26085],"13298":[49,57,26085],"13299":[50,48,26085],"13300":[50,49,26085],"13301":[50,50,26085],"13302":[50,51,26085],"13303":[50,52,26085],"13304":[50,53,26085],"13305":[50,54,26085],"13306":[50,55,26085],"13307":[50,56,26085],"13308":[50,57,26085],"13309":[51,48,26085],"13310":[51,49,26085],"13311":[103,97,108],"42560":[42561],"42562":[42563],"42564":[42565],"42566":[42567],"42568":[42569],"42570":[42571],"42572":[42573],"42574":[42575],"42576":[42577],"42578":[42579],"42580":[42581],"42582":[42583],"42584":[42585],"42586":[42587],"42588":[42589],"42590":[42591],"42592":[42593],"42594":[42595],"42596":[42597],"42598":[42599],"42600":[42601],"42602":[42603],"42604":[42605],"42624":[42625],"42626":[42627],"42628":[42629],"42630":[42631],"42632":[42633],"42634":[42635],"42636":[42637],"42638":[42639],"42640":[42641],"42642":[42643],"42644":[42645],"42646":[42647],"42648":[42649],"42650":[42651],"42652":[1098],"42653":[1100],"42786":[42787],"42788":[42789],"42790":[42791],"42792":[42793],"42794":[42795],"42796":[42797],"42798":[42799],"42802":[42803],"42804":[42805],"42806":[42807],"42808":[42809],"42810":[42811],"42812":[42813],"42814":[42815],"42816":[42817],"42818":[42819],"42820":[42821],"42822":[42823],"42824":[42825],"42826":[42827],"42828":[42829],"42830":[42831],"42832":[42833],"42834":[42835],"42836":[42837],"42838":[42839],"42840":[42841],"42842":[42843],"42844":[42845],"42846":[42847],"42848":[42849],"42850":[42851],"42852":[42853],"42854":[42855],"42856":[42857],"42858":[42859],"42860":[42861],"42862":[42863],"42864":[42863],"42873":[42874],"42875":[42876],"42877":[7545],"42878":[42879],"42880":[42881],"42882":[42883],"42884":[42885],"42886":[42887],"42891":[42892],"42893":[613],"42896":[42897],"42898":[42899],"42902":[42903],"42904":[42905],"42906":[42907],"42908":[42909],"42910":[42911],"42912":[42913],"42914":[42915],"42916":[42917],"42918":[42919],"42920":[42921],"42922":[614],"42923":[604],"42924":[609],"42925":[620],"42926":[618],"42928":[670],"42929":[647],"42930":[669],"42931":[43859],"42932":[42933],"42934":[42935],"42936":[42937],"42938":[42939],"42940":[42941],"42942":[42943],"42944":[42945],"42946":[42947],"42948":[42900],"42949":[642],"42950":[7566],"42951":[42952],"42953":[42954],"42960":[42961],"42966":[42967],"42968":[42969],"42994":[99],"42995":[102],"42996":[113],"42997":[42998],"43000":[295],"43001":[339],"43868":[42791],"43869":[43831],"43870":[619],"43871":[43858],"43881":[653],"43888":[5024],"43889":[5025],"43890":[5026],"43891":[5027],"43892":[5028],"43893":[5029],"43894":[5030],"43895":[5031],"43896":[5032],"43897":[5033],"43898":[5034],"43899":[5035],"43900":[5036],"43901":[5037],"43902":[5038],"43903":[5039],"43904":[5040],"43905":[5041],"43906":[5042],"43907":[5043],"43908":[5044],"43909":[5045],"43910":[5046],"43911":[5047],"43912":[5048],"43913":[5049],"43914":[5050],"43915":[5051],"43916":[5052],"43917":[5053],"43918":[5054],"43919":[5055],"43920":[5056],"43921":[5057],"43922":[5058],"43923":[5059],"43924":[5060],"43925":[5061],"43926":[5062],"43927":[5063],"43928":[5064],"43929":[5065],"43930":[5066],"43931":[5067],"43932":[5068],"43933":[5069],"43934":[5070],"43935":[5071],"43936":[5072],"43937":[5073],"43938":[5074],"43939":[5075],"43940":[5076],"43941":[5077],"43942":[5078],"43943":[5079],"43944":[5080],"43945":[5081],"43946":[5082],"43947":[5083],"43948":[5084],"43949":[5085],"43950":[5086],"43951":[5087],"43952":[5088],"43953":[5089],"43954":[5090],"43955":[5091],"43956":[5092],"43957":[5093],"43958":[5094],"43959":[5095],"43960":[5096],"43961":[5097],"43962":[5098],"43963":[5099],"43964":[5100],"43965":[5101],"43966":[5102],"43967":[5103],"63744":[35912],"63745":[26356],"63746":[36554],"63747":[36040],"63748":[28369],"63749":[20018],"63750":[21477],"63751":[40860],"63753":[22865],"63754":[37329],"63755":[21895],"63756":[22856],"63757":[25078],"63758":[30313],"63759":[32645],"63760":[34367],"63761":[34746],"63762":[35064],"63763":[37007],"63764":[27138],"63765":[27931],"63766":[28889],"63767":[29662],"63768":[33853],"63769":[37226],"63770":[39409],"63771":[20098],"63772":[21365],"63773":[27396],"63774":[29211],"63775":[34349],"63776":[40478],"63777":[23888],"63778":[28651],"63779":[34253],"63780":[35172],"63781":[25289],"63782":[33240],"63783":[34847],"63784":[24266],"63785":[26391],"63786":[28010],"63787":[29436],"63788":[37070],"63789":[20358],"63790":[20919],"63791":[21214],"63792":[25796],"63793":[27347],"63794":[29200],"63795":[30439],"63796":[32769],"63797":[34310],"63798":[34396],"63799":[36335],"63800":[38706],"63801":[39791],"63802":[40442],"63803":[30860],"63804":[31103],"63805":[32160],"63806":[33737],"63807":[37636],"63808":[40575],"63809":[35542],"63810":[22751],"63811":[24324],"63812":[31840],"63813":[32894],"63814":[29282],"63815":[30922],"63816":[36034],"63817":[38647],"63818":[22744],"63819":[23650],"63820":[27155],"63821":[28122],"63822":[28431],"63823":[32047],"63824":[32311],"63825":[38475],"63826":[21202],"63827":[32907],"63828":[20956],"63829":[20940],"63830":[31260],"63831":[32190],"63832":[33777],"63833":[38517],"63834":[35712],"63835":[25295],"63836":[27138],"63837":[35582],"63838":[20025],"63839":[23527],"63840":[24594],"63841":[29575],"63842":[30064],"63843":[21271],"63844":[30971],"63845":[20415],"63846":[24489],"63847":[19981],"63848":[27852],"63849":[25976],"63850":[32034],"63851":[21443],"63852":[22622],"63853":[30465],"63854":[33865],"63855":[35498],"63856":[27578],"63857":[36784],"63858":[27784],"63859":[25342],"63860":[33509],"63861":[25504],"63862":[30053],"63863":[20142],"63864":[20841],"63865":[20937],"63866":[26753],"63867":[31975],"63868":[33391],"63869":[35538],"63870":[37327],"63871":[21237],"63872":[21570],"63873":[22899],"63874":[24300],"63875":[26053],"63876":[28670],"63877":[31018],"63878":[38317],"63879":[39530],"63880":[40599],"63881":[40654],"63882":[21147],"63883":[26310],"63884":[27511],"63885":[36706],"63886":[24180],"63887":[24976],"63888":[25088],"63889":[25754],"63890":[28451],"63891":[29001],"63892":[29833],"63893":[31178],"63894":[32244],"63895":[32879],"63896":[36646],"63897":[34030],"63898":[36899],"63899":[37706],"63900":[21015],"63901":[21155],"63902":[21693],"63903":[28872],"63904":[35010],"63905":[35498],"63906":[24265],"63907":[24565],"63908":[25467],"63909":[27566],"63910":[31806],"63911":[29557],"63912":[20196],"63913":[22265],"63914":[23527],"63915":[23994],"63916":[24604],"63917":[29618],"63918":[29801],"63919":[32666],"63920":[32838],"63921":[37428],"63922":[38646],"63923":[38728],"63924":[38936],"63925":[20363],"63926":[31150],"63927":[37300],"63928":[38584],"63929":[24801],"63930":[20102],"63931":[20698],"63932":[23534],"63933":[23615],"63934":[26009],"63935":[27138],"63936":[29134],"63937":[30274],"63938":[34044],"63939":[36988],"63940":[40845],"63941":[26248],"63942":[38446],"63943":[21129],"63944":[26491],"63945":[26611],"63946":[27969],"63947":[28316],"63948":[29705],"63949":[30041],"63950":[30827],"63951":[32016],"63952":[39006],"63953":[20845],"63954":[25134],"63955":[38520],"63956":[20523],"63957":[23833],"63958":[28138],"63959":[36650],"63960":[24459],"63961":[24900],"63962":[26647],"63963":[29575],"63964":[38534],"63965":[21033],"63966":[21519],"63967":[23653],"63968":[26131],"63969":[26446],"63970":[26792],"63971":[27877],"63972":[29702],"63973":[30178],"63974":[32633],"63975":[35023],"63976":[35041],"63977":[37324],"63978":[38626],"63979":[21311],"63980":[28346],"63981":[21533],"63982":[29136],"63983":[29848],"63984":[34298],"63985":[38563],"63986":[40023],"63987":[40607],"63988":[26519],"63989":[28107],"63990":[33256],"63991":[31435],"63992":[31520],"63993":[31890],"63994":[29376],"63995":[28825],"63996":[35672],"63997":[20160],"63998":[33590],"63999":[21050],"64000":[20999],"64001":[24230],"64002":[25299],"64003":[31958],"64004":[23429],"64005":[27934],"64006":[26292],"64007":[36667],"64008":[34892],"64009":[38477],"64010":[35211],"64011":[24275],"64012":[20800],"64013":[21952],"64016":[22618],"64018":[26228],"64021":[20958],"64022":[29482],"64023":[30410],"64024":[31036],"64025":[31070],"64026":[31077],"64027":[31119],"64028":[38742],"64029":[31934],"64030":[32701],"64032":[34322],"64034":[35576],"64037":[36920],"64038":[37117],"64042":[39151],"64043":[39164],"64044":[39208],"64045":[40372],"64046":[37086],"64047":[38583],"64048":[20398],"64049":[20711],"64050":[20813],"64051":[21193],"64052":[21220],"64053":[21329],"64054":[21917],"64055":[22022],"64056":[22120],"64057":[22592],"64058":[22696],"64059":[23652],"64060":[23662],"64061":[24724],"64062":[24936],"64063":[24974],"64064":[25074],"64065":[25935],"64066":[26082],"64067":[26257],"64068":[26757],"64069":[28023],"64070":[28186],"64071":[28450],"64072":[29038],"64073":[29227],"64074":[29730],"64075":[30865],"64076":[31038],"64077":[31049],"64078":[31048],"64079":[31056],"64080":[31062],"64081":[31069],"64082":[31117],"64083":[31118],"64084":[31296],"64085":[31361],"64086":[31680],"64087":[32244],"64088":[32265],"64089":[32321],"64090":[32626],"64091":[32773],"64092":[33261],"64093":[33401],"64095":[33879],"64096":[35088],"64097":[35222],"64098":[35585],"64099":[35641],"64100":[36051],"64101":[36104],"64102":[36790],"64103":[36920],"64104":[38627],"64105":[38911],"64106":[38971],"64107":[24693],"64108":[148206],"64109":[33304],"64112":[20006],"64113":[20917],"64114":[20840],"64115":[20352],"64116":[20805],"64117":[20864],"64118":[21191],"64119":[21242],"64120":[21917],"64121":[21845],"64122":[21913],"64123":[21986],"64124":[22618],"64125":[22707],"64126":[22852],"64127":[22868],"64128":[23138],"64129":[23336],"64130":[24274],"64131":[24281],"64132":[24425],"64133":[24493],"64134":[24792],"64135":[24910],"64136":[24840],"64137":[24974],"64138":[24928],"64139":[25074],"64140":[25140],"64141":[25540],"64142":[25628],"64143":[25682],"64144":[25942],"64145":[26228],"64146":[26391],"64147":[26395],"64148":[26454],"64149":[27513],"64150":[27578],"64151":[27969],"64152":[28379],"64153":[28363],"64154":[28450],"64155":[28702],"64156":[29038],"64157":[30631],"64158":[29237],"64159":[29359],"64160":[29482],"64161":[29809],"64162":[29958],"64163":[30011],"64164":[30237],"64165":[30239],"64166":[30410],"64167":[30427],"64168":[30452],"64169":[30538],"64170":[30528],"64171":[30924],"64172":[31409],"64173":[31680],"64174":[31867],"64175":[32091],"64176":[32244],"64177":[32574],"64178":[32773],"64179":[33618],"64180":[33775],"64181":[34681],"64182":[35137],"64183":[35206],"64184":[35222],"64185":[35519],"64186":[35576],"64187":[35531],"64188":[35585],"64189":[35582],"64190":[35565],"64191":[35641],"64192":[35722],"64193":[36104],"64194":[36664],"64195":[36978],"64196":[37273],"64197":[37494],"64198":[38524],"64199":[38627],"64200":[38742],"64201":[38875],"64202":[38911],"64203":[38923],"64204":[38971],"64205":[39698],"64206":[40860],"64207":[141386],"64208":[141380],"64209":[144341],"64210":[15261],"64211":[16408],"64212":[16441],"64213":[152137],"64214":[154832],"64215":[163539],"64216":[40771],"64217":[40846],"64256":[102,102],"64257":[102,105],"64258":[102,108],"64259":[102,102,105],"64260":[102,102,108],"64261":[115,116],"64275":[1396,1398],"64276":[1396,1381],"64277":[1396,1387],"64278":[1406,1398],"64279":[1396,1389],"64285":[1497,1460],"64287":[1522,1463],"64288":[1506],"64289":[1488],"64290":[1491],"64291":[1492],"64292":[1499],"64293":[1500],"64294":[1501],"64295":[1512],"64296":[1514],"64297":[43],"64298":[1513,1473],"64299":[1513,1474],"64300":[1513,1468,1473],"64301":[1513,1468,1474],"64302":[1488,1463],"64303":[1488,1464],"64304":[1488,1468],"64305":[1489,1468],"64306":[1490,1468],"64307":[1491,1468],"64308":[1492,1468],"64309":[1493,1468],"64310":[1494,1468],"64312":[1496,1468],"64313":[1497,1468],"64314":[1498,1468],"64315":[1499,1468],"64316":[1500,1468],"64318":[1502,1468],"64320":[1504,1468],"64321":[1505,1468],"64323":[1507,1468],"64324":[1508,1468],"64326":[1510,1468],"64327":[1511,1468],"64328":[1512,1468],"64329":[1513,1468],"64330":[1514,1468],"64331":[1493,1465],"64332":[1489,1471],"64333":[1499,1471],"64334":[1508,1471],"64335":[1488,1500],"64336":[1649],"64338":[1659],"64342":[1662],"64346":[1664],"64350":[1658],"64354":[1663],"64358":[1657],"64362":[1700],"64366":[1702],"64370":[1668],"64374":[1667],"64378":[1670],"64382":[1671],"64386":[1677],"64388":[1676],"64390":[1678],"64392":[1672],"64394":[1688],"64396":[1681],"64398":[1705],"64402":[1711],"64406":[1715],"64410":[1713],"64414":[1722],"64416":[1723],"64420":[1728],"64422":[1729],"64426":[1726],"64430":[1746],"64432":[1747],"64467":[1709],"64471":[1735],"64473":[1734],"64475":[1736],"64477":[1735,1652],"64478":[1739],"64480":[1733],"64482":[1737],"64484":[1744],"64488":[1609],"64490":[1574,1575],"64492":[1574,1749],"64494":[1574,1608],"64496":[1574,1735],"64498":[1574,1734],"64500":[1574,1736],"64502":[1574,1744],"64505":[1574,1609],"64508":[1740],"64512":[1574,1580],"64513":[1574,1581],"64514":[1574,1605],"64515":[1574,1609],"64516":[1574,1610],"64517":[1576,1580],"64518":[1576,1581],"64519":[1576,1582],"64520":[1576,1605],"64521":[1576,1609],"64522":[1576,1610],"64523":[1578,1580],"64524":[1578,1581],"64525":[1578,1582],"64526":[1578,1605],"64527":[1578,1609],"64528":[1578,1610],"64529":[1579,1580],"64530":[1579,1605],"64531":[1579,1609],"64532":[1579,1610],"64533":[1580,1581],"64534":[1580,1605],"64535":[1581,1580],"64536":[1581,1605],"64537":[1582,1580],"64538":[1582,1581],"64539":[1582,1605],"64540":[1587,1580],"64541":[1587,1581],"64542":[1587,1582],"64543":[1587,1605],"64544":[1589,1581],"64545":[1589,1605],"64546":[1590,1580],"64547":[1590,1581],"64548":[1590,1582],"64549":[1590,1605],"64550":[1591,1581],"64551":[1591,1605],"64552":[1592,1605],"64553":[1593,1580],"64554":[1593,1605],"64555":[1594,1580],"64556":[1594,1605],"64557":[1601,1580],"64558":[1601,1581],"64559":[1601,1582],"64560":[1601,1605],"64561":[1601,1609],"64562":[1601,1610],"64563":[1602,1581],"64564":[1602,1605],"64565":[1602,1609],"64566":[1602,1610],"64567":[1603,1575],"64568":[1603,1580],"64569":[1603,1581],"64570":[1603,1582],"64571":[1603,1604],"64572":[1603,1605],"64573":[1603,1609],"64574":[1603,1610],"64575":[1604,1580],"64576":[1604,1581],"64577":[1604,1582],"64578":[1604,1605],"64579":[1604,1609],"64580":[1604,1610],"64581":[1605,1580],"64582":[1605,1581],"64583":[1605,1582],"64584":[1605,1605],"64585":[1605,1609],"64586":[1605,1610],"64587":[1606,1580],"64588":[1606,1581],"64589":[1606,1582],"64590":[1606,1605],"64591":[1606,1609],"64592":[1606,1610],"64593":[1607,1580],"64594":[1607,1605],"64595":[1607,1609],"64596":[1607,1610],"64597":[1610,1580],"64598":[1610,1581],"64599":[1610,1582],"64600":[1610,1605],"64601":[1610,1609],"64602":[1610,1610],"64603":[1584,1648],"64604":[1585,1648],"64605":[1609,1648],"64606":[32,1612,1617],"64607":[32,1613,1617],"64608":[32,1614,1617],"64609":[32,1615,1617],"64610":[32,1616,1617],"64611":[32,1617,1648],"64612":[1574,1585],"64613":[1574,1586],"64614":[1574,1605],"64615":[1574,1606],"64616":[1574,1609],"64617":[1574,1610],"64618":[1576,1585],"64619":[1576,1586],"64620":[1576,1605],"64621":[1576,1606],"64622":[1576,1609],"64623":[1576,1610],"64624":[1578,1585],"64625":[1578,1586],"64626":[1578,1605],"64627":[1578,1606],"64628":[1578,1609],"64629":[1578,1610],"64630":[1579,1585],"64631":[1579,1586],"64632":[1579,1605],"64633":[1579,1606],"64634":[1579,1609],"64635":[1579,1610],"64636":[1601,1609],"64637":[1601,1610],"64638":[1602,1609],"64639":[1602,1610],"64640":[1603,1575],"64641":[1603,1604],"64642":[1603,1605],"64643":[1603,1609],"64644":[1603,1610],"64645":[1604,1605],"64646":[1604,1609],"64647":[1604,1610],"64648":[1605,1575],"64649":[1605,1605],"64650":[1606,1585],"64651":[1606,1586],"64652":[1606,1605],"64653":[1606,1606],"64654":[1606,1609],"64655":[1606,1610],"64656":[1609,1648],"64657":[1610,1585],"64658":[1610,1586],"64659":[1610,1605],"64660":[1610,1606],"64661":[1610,1609],"64662":[1610,1610],"64663":[1574,1580],"64664":[1574,1581],"64665":[1574,1582],"64666":[1574,1605],"64667":[1574,1607],"64668":[1576,1580],"64669":[1576,1581],"64670":[1576,1582],"64671":[1576,1605],"64672":[1576,1607],"64673":[1578,1580],"64674":[1578,1581],"64675":[1578,1582],"64676":[1578,1605],"64677":[1578,1607],"64678":[1579,1605],"64679":[1580,1581],"64680":[1580,1605],"64681":[1581,1580],"64682":[1581,1605],"64683":[1582,1580],"64684":[1582,1605],"64685":[1587,1580],"64686":[1587,1581],"64687":[1587,1582],"64688":[1587,1605],"64689":[1589,1581],"64690":[1589,1582],"64691":[1589,1605],"64692":[1590,1580],"64693":[1590,1581],"64694":[1590,1582],"64695":[1590,1605],"64696":[1591,1581],"64697":[1592,1605],"64698":[1593,1580],"64699":[1593,1605],"64700":[1594,1580],"64701":[1594,1605],"64702":[1601,1580],"64703":[1601,1581],"64704":[1601,1582],"64705":[1601,1605],"64706":[1602,1581],"64707":[1602,1605],"64708":[1603,1580],"64709":[1603,1581],"64710":[1603,1582],"64711":[1603,1604],"64712":[1603,1605],"64713":[1604,1580],"64714":[1604,1581],"64715":[1604,1582],"64716":[1604,1605],"64717":[1604,1607],"64718":[1605,1580],"64719":[1605,1581],"64720":[1605,1582],"64721":[1605,1605],"64722":[1606,1580],"64723":[1606,1581],"64724":[1606,1582],"64725":[1606,1605],"64726":[1606,1607],"64727":[1607,1580],"64728":[1607,1605],"64729":[1607,1648],"64730":[1610,1580],"64731":[1610,1581],"64732":[1610,1582],"64733":[1610,1605],"64734":[1610,1607],"64735":[1574,1605],"64736":[1574,1607],"64737":[1576,1605],"64738":[1576,1607],"64739":[1578,1605],"64740":[1578,1607],"64741":[1579,1605],"64742":[1579,1607],"64743":[1587,1605],"64744":[1587,1607],"64745":[1588,1605],"64746":[1588,1607],"64747":[1603,1604],"64748":[1603,1605],"64749":[1604,1605],"64750":[1606,1605],"64751":[1606,1607],"64752":[1610,1605],"64753":[1610,1607],"64754":[1600,1614,1617],"64755":[1600,1615,1617],"64756":[1600,1616,1617],"64757":[1591,1609],"64758":[1591,1610],"64759":[1593,1609],"64760":[1593,1610],"64761":[1594,1609],"64762":[1594,1610],"64763":[1587,1609],"64764":[1587,1610],"64765":[1588,1609],"64766":[1588,1610],"64767":[1581,1609],"64768":[1581,1610],"64769":[1580,1609],"64770":[1580,1610],"64771":[1582,1609],"64772":[1582,1610],"64773":[1589,1609],"64774":[1589,1610],"64775":[1590,1609],"64776":[1590,1610],"64777":[1588,1580],"64778":[1588,1581],"64779":[1588,1582],"64780":[1588,1605],"64781":[1588,1585],"64782":[1587,1585],"64783":[1589,1585],"64784":[1590,1585],"64785":[1591,1609],"64786":[1591,1610],"64787":[1593,1609],"64788":[1593,1610],"64789":[1594,1609],"64790":[1594,1610],"64791":[1587,1609],"64792":[1587,1610],"64793":[1588,1609],"64794":[1588,1610],"64795":[1581,1609],"64796":[1581,1610],"64797":[1580,1609],"64798":[1580,1610],"64799":[1582,1609],"64800":[1582,1610],"64801":[1589,1609],"64802":[1589,1610],"64803":[1590,1609],"64804":[1590,1610],"64805":[1588,1580],"64806":[1588,1581],"64807":[1588,1582],"64808":[1588,1605],"64809":[1588,1585],"64810":[1587,1585],"64811":[1589,1585],"64812":[1590,1585],"64813":[1588,1580],"64814":[1588,1581],"64815":[1588,1582],"64816":[1588,1605],"64817":[1587,1607],"64818":[1588,1607],"64819":[1591,1605],"64820":[1587,1580],"64821":[1587,1581],"64822":[1587,1582],"64823":[1588,1580],"64824":[1588,1581],"64825":[1588,1582],"64826":[1591,1605],"64827":[1592,1605],"64828":[1575,1611],"64848":[1578,1580,1605],"64849":[1578,1581,1580],"64851":[1578,1581,1605],"64852":[1578,1582,1605],"64853":[1578,1605,1580],"64854":[1578,1605,1581],"64855":[1578,1605,1582],"64856":[1580,1605,1581],"64858":[1581,1605,1610],"64859":[1581,1605,1609],"64860":[1587,1581,1580],"64861":[1587,1580,1581],"64862":[1587,1580,1609],"64863":[1587,1605,1581],"64865":[1587,1605,1580],"64866":[1587,1605,1605],"64868":[1589,1581,1581],"64870":[1589,1605,1605],"64871":[1588,1581,1605],"64873":[1588,1580,1610],"64874":[1588,1605,1582],"64876":[1588,1605,1605],"64878":[1590,1581,1609],"64879":[1590,1582,1605],"64881":[1591,1605,1581],"64883":[1591,1605,1605],"64884":[1591,1605,1610],"64885":[1593,1580,1605],"64886":[1593,1605,1605],"64888":[1593,1605,1609],"64889":[1594,1605,1605],"64890":[1594,1605,1610],"64891":[1594,1605,1609],"64892":[1601,1582,1605],"64894":[1602,1605,1581],"64895":[1602,1605,1605],"64896":[1604,1581,1605],"64897":[1604,1581,1610],"64898":[1604,1581,1609],"64899":[1604,1580,1580],"64901":[1604,1582,1605],"64903":[1604,1605,1581],"64905":[1605,1581,1580],"64906":[1605,1581,1605],"64907":[1605,1581,1610],"64908":[1605,1580,1581],"64909":[1605,1580,1605],"64910":[1605,1582,1580],"64911":[1605,1582,1605],"64914":[1605,1580,1582],"64915":[1607,1605,1580],"64916":[1607,1605,1605],"64917":[1606,1581,1605],"64918":[1606,1581,1609],"64919":[1606,1580,1605],"64921":[1606,1580,1609],"64922":[1606,1605,1610],"64923":[1606,1605,1609],"64924":[1610,1605,1605],"64926":[1576,1582,1610],"64927":[1578,1580,1610],"64928":[1578,1580,1609],"64929":[1578,1582,1610],"64930":[1578,1582,1609],"64931":[1578,1605,1610],"64932":[1578,1605,1609],"64933":[1580,1605,1610],"64934":[1580,1581,1609],"64935":[1580,1605,1609],"64936":[1587,1582,1609],"64937":[1589,1581,1610],"64938":[1588,1581,1610],"64939":[1590,1581,1610],"64940":[1604,1580,1610],"64941":[1604,1605,1610],"64942":[1610,1581,1610],"64943":[1610,1580,1610],"64944":[1610,1605,1610],"64945":[1605,1605,1610],"64946":[1602,1605,1610],"64947":[1606,1581,1610],"64948":[1602,1605,1581],"64949":[1604,1581,1605],"64950":[1593,1605,1610],"64951":[1603,1605,1610],"64952":[1606,1580,1581],"64953":[1605,1582,1610],"64954":[1604,1580,1605],"64955":[1603,1605,1605],"64956":[1604,1580,1605],"64957":[1606,1580,1581],"64958":[1580,1581,1610],"64959":[1581,1580,1610],"64960":[1605,1580,1610],"64961":[1601,1605,1610],"64962":[1576,1581,1610],"64963":[1603,1605,1605],"64964":[1593,1580,1605],"64965":[1589,1605,1605],"64966":[1587,1582,1610],"64967":[1606,1580,1610],"65008":[1589,1604,1746],"65009":[1602,1604,1746],"65010":[1575,1604,1604,1607],"65011":[1575,1603,1576,1585],"65012":[1605,1581,1605,1583],"65013":[1589,1604,1593,1605],"65014":[1585,1587,1608,1604],"65015":[1593,1604,1610,1607],"65016":[1608,1587,1604,1605],"65017":[1589,1604,1609],"65018":[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],"65019":[1580,1604,32,1580,1604,1575,1604,1607],"65020":[1585,1740,1575,1604],"65040":[44],"65041":[12289],"65043":[58],"65044":[59],"65045":[33],"65046":[63],"65047":[12310],"65048":[12311],"65073":[8212],"65074":[8211],"65075":[95],"65077":[40],"65078":[41],"65079":[123],"65080":[125],"65081":[12308],"65082":[12309],"65083":[12304],"65084":[12305],"65085":[12298],"65086":[12299],"65087":[12296],"65088":[12297],"65089":[12300],"65090":[12301],"65091":[12302],"65092":[12303],"65095":[91],"65096":[93],"65097":[32,773],"65101":[95],"65104":[44],"65105":[12289],"65108":[59],"65109":[58],"65110":[63],"65111":[33],"65112":[8212],"65113":[40],"65114":[41],"65115":[123],"65116":[125],"65117":[12308],"65118":[12309],"65119":[35],"65120":[38],"65121":[42],"65122":[43],"65123":[45],"65124":[60],"65125":[62],"65126":[61],"65128":[92],"65129":[36],"65130":[37],"65131":[64],"65136":[32,1611],"65137":[1600,1611],"65138":[32,1612],"65140":[32,1613],"65142":[32,1614],"65143":[1600,1614],"65144":[32,1615],"65145":[1600,1615],"65146":[32,1616],"65147":[1600,1616],"65148":[32,1617],"65149":[1600,1617],"65150":[32,1618],"65151":[1600,1618],"65152":[1569],"65153":[1570],"65155":[1571],"65157":[1572],"65159":[1573],"65161":[1574],"65165":[1575],"65167":[1576],"65171":[1577],"65173":[1578],"65177":[1579],"65181":[1580],"65185":[1581],"65189":[1582],"65193":[1583],"65195":[1584],"65197":[1585],"65199":[1586],"65201":[1587],"65205":[1588],"65209":[1589],"65213":[1590],"65217":[1591],"65221":[1592],"65225":[1593],"65229":[1594],"65233":[1601],"65237":[1602],"65241":[1603],"65245":[1604],"65249":[1605],"65253":[1606],"65257":[1607],"65261":[1608],"65263":[1609],"65265":[1610],"65269":[1604,1570],"65271":[1604,1571],"65273":[1604,1573],"65275":[1604,1575],"65281":[33],"65282":[34],"65283":[35],"65284":[36],"65285":[37],"65286":[38],"65287":[39],"65288":[40],"65289":[41],"65290":[42],"65291":[43],"65292":[44],"65293":[45],"65294":[46],"65295":[47],"65296":[48],"65297":[49],"65298":[50],"65299":[51],"65300":[52],"65301":[53],"65302":[54],"65303":[55],"65304":[56],"65305":[57],"65306":[58],"65307":[59],"65308":[60],"65309":[61],"65310":[62],"65311":[63],"65312":[64],"65313":[97],"65314":[98],"65315":[99],"65316":[100],"65317":[101],"65318":[102],"65319":[103],"65320":[104],"65321":[105],"65322":[106],"65323":[107],"65324":[108],"65325":[109],"65326":[110],"65327":[111],"65328":[112],"65329":[113],"65330":[114],"65331":[115],"65332":[116],"65333":[117],"65334":[118],"65335":[119],"65336":[120],"65337":[121],"65338":[122],"65339":[91],"65340":[92],"65341":[93],"65342":[94],"65343":[95],"65344":[96],"65345":[97],"65346":[98],"65347":[99],"65348":[100],"65349":[101],"65350":[102],"65351":[103],"65352":[104],"65353":[105],"65354":[106],"65355":[107],"65356":[108],"65357":[109],"65358":[110],"65359":[111],"65360":[112],"65361":[113],"65362":[114],"65363":[115],"65364":[116],"65365":[117],"65366":[118],"65367":[119],"65368":[120],"65369":[121],"65370":[122],"65371":[123],"65372":[124],"65373":[125],"65374":[126],"65375":[10629],"65376":[10630],"65377":[46],"65378":[12300],"65379":[12301],"65380":[12289],"65381":[12539],"65382":[12530],"65383":[12449],"65384":[12451],"65385":[12453],"65386":[12455],"65387":[12457],"65388":[12515],"65389":[12517],"65390":[12519],"65391":[12483],"65392":[12540],"65393":[12450],"65394":[12452],"65395":[12454],"65396":[12456],"65397":[12458],"65398":[12459],"65399":[12461],"65400":[12463],"65401":[12465],"65402":[12467],"65403":[12469],"65404":[12471],"65405":[12473],"65406":[12475],"65407":[12477],"65408":[12479],"65409":[12481],"65410":[12484],"65411":[12486],"65412":[12488],"65413":[12490],"65414":[12491],"65415":[12492],"65416":[12493],"65417":[12494],"65418":[12495],"65419":[12498],"65420":[12501],"65421":[12504],"65422":[12507],"65423":[12510],"65424":[12511],"65425":[12512],"65426":[12513],"65427":[12514],"65428":[12516],"65429":[12518],"65430":[12520],"65431":[12521],"65432":[12522],"65433":[12523],"65434":[12524],"65435":[12525],"65436":[12527],"65437":[12531],"65438":[12441],"65439":[12442],"65441":[4352],"65442":[4353],"65443":[4522],"65444":[4354],"65445":[4524],"65446":[4525],"65447":[4355],"65448":[4356],"65449":[4357],"65450":[4528],"65451":[4529],"65452":[4530],"65453":[4531],"65454":[4532],"65455":[4533],"65456":[4378],"65457":[4358],"65458":[4359],"65459":[4360],"65460":[4385],"65461":[4361],"65462":[4362],"65463":[4363],"65464":[4364],"65465":[4365],"65466":[4366],"65467":[4367],"65468":[4368],"65469":[4369],"65470":[4370],"65474":[4449],"65475":[4450],"65476":[4451],"65477":[4452],"65478":[4453],"65479":[4454],"65482":[4455],"65483":[4456],"65484":[4457],"65485":[4458],"65486":[4459],"65487":[4460],"65490":[4461],"65491":[4462],"65492":[4463],"65493":[4464],"65494":[4465],"65495":[4466],"65498":[4467],"65499":[4468],"65500":[4469],"65504":[162],"65505":[163],"65506":[172],"65507":[32,772],"65508":[166],"65509":[165],"65510":[8361],"65512":[9474],"65513":[8592],"65514":[8593],"65515":[8594],"65516":[8595],"65517":[9632],"65518":[9675],"66560":[66600],"66561":[66601],"66562":[66602],"66563":[66603],"66564":[66604],"66565":[66605],"66566":[66606],"66567":[66607],"66568":[66608],"66569":[66609],"66570":[66610],"66571":[66611],"66572":[66612],"66573":[66613],"66574":[66614],"66575":[66615],"66576":[66616],"66577":[66617],"66578":[66618],"66579":[66619],"66580":[66620],"66581":[66621],"66582":[66622],"66583":[66623],"66584":[66624],"66585":[66625],"66586":[66626],"66587":[66627],"66588":[66628],"66589":[66629],"66590":[66630],"66591":[66631],"66592":[66632],"66593":[66633],"66594":[66634],"66595":[66635],"66596":[66636],"66597":[66637],"66598":[66638],"66599":[66639],"66736":[66776],"66737":[66777],"66738":[66778],"66739":[66779],"66740":[66780],"66741":[66781],"66742":[66782],"66743":[66783],"66744":[66784],"66745":[66785],"66746":[66786],"66747":[66787],"66748":[66788],"66749":[66789],"66750":[66790],"66751":[66791],"66752":[66792],"66753":[66793],"66754":[66794],"66755":[66795],"66756":[66796],"66757":[66797],"66758":[66798],"66759":[66799],"66760":[66800],"66761":[66801],"66762":[66802],"66763":[66803],"66764":[66804],"66765":[66805],"66766":[66806],"66767":[66807],"66768":[66808],"66769":[66809],"66770":[66810],"66771":[66811],"66928":[66967],"66929":[66968],"66930":[66969],"66931":[66970],"66932":[66971],"66933":[66972],"66934":[66973],"66935":[66974],"66936":[66975],"66937":[66976],"66938":[66977],"66940":[66979],"66941":[66980],"66942":[66981],"66943":[66982],"66944":[66983],"66945":[66984],"66946":[66985],"66947":[66986],"66948":[66987],"66949":[66988],"66950":[66989],"66951":[66990],"66952":[66991],"66953":[66992],"66954":[66993],"66956":[66995],"66957":[66996],"66958":[66997],"66959":[66998],"66960":[66999],"66961":[67000],"66962":[67001],"66964":[67003],"66965":[67004],"67457":[720],"67458":[721],"67459":[230],"67460":[665],"67461":[595],"67463":[675],"67464":[43878],"67465":[677],"67466":[676],"67467":[598],"67468":[599],"67469":[7569],"67470":[600],"67471":[606],"67472":[681],"67473":[612],"67474":[610],"67475":[608],"67476":[667],"67477":[295],"67478":[668],"67479":[615],"67480":[644],"67481":[682],"67482":[683],"67483":[620],"67484":[122628],"67485":[42894],"67486":[622],"67487":[122629],"67488":[654],"67489":[122630],"67490":[248],"67491":[630],"67492":[631],"67493":[113],"67494":[634],"67495":[122632],"67496":[637],"67497":[638],"67498":[640],"67499":[680],"67500":[678],"67501":[43879],"67502":[679],"67503":[648],"67504":[11377],"67506":[655],"67507":[673],"67508":[674],"67509":[664],"67510":[448],"67511":[449],"67512":[450],"67513":[122634],"67514":[122654],"68736":[68800],"68737":[68801],"68738":[68802],"68739":[68803],"68740":[68804],"68741":[68805],"68742":[68806],"68743":[68807],"68744":[68808],"68745":[68809],"68746":[68810],"68747":[68811],"68748":[68812],"68749":[68813],"68750":[68814],"68751":[68815],"68752":[68816],"68753":[68817],"68754":[68818],"68755":[68819],"68756":[68820],"68757":[68821],"68758":[68822],"68759":[68823],"68760":[68824],"68761":[68825],"68762":[68826],"68763":[68827],"68764":[68828],"68765":[68829],"68766":[68830],"68767":[68831],"68768":[68832],"68769":[68833],"68770":[68834],"68771":[68835],"68772":[68836],"68773":[68837],"68774":[68838],"68775":[68839],"68776":[68840],"68777":[68841],"68778":[68842],"68779":[68843],"68780":[68844],"68781":[68845],"68782":[68846],"68783":[68847],"68784":[68848],"68785":[68849],"68786":[68850],"71840":[71872],"71841":[71873],"71842":[71874],"71843":[71875],"71844":[71876],"71845":[71877],"71846":[71878],"71847":[71879],"71848":[71880],"71849":[71881],"71850":[71882],"71851":[71883],"71852":[71884],"71853":[71885],"71854":[71886],"71855":[71887],"71856":[71888],"71857":[71889],"71858":[71890],"71859":[71891],"71860":[71892],"71861":[71893],"71862":[71894],"71863":[71895],"71864":[71896],"71865":[71897],"71866":[71898],"71867":[71899],"71868":[71900],"71869":[71901],"71870":[71902],"71871":[71903],"93760":[93792],"93761":[93793],"93762":[93794],"93763":[93795],"93764":[93796],"93765":[93797],"93766":[93798],"93767":[93799],"93768":[93800],"93769":[93801],"93770":[93802],"93771":[93803],"93772":[93804],"93773":[93805],"93774":[93806],"93775":[93807],"93776":[93808],"93777":[93809],"93778":[93810],"93779":[93811],"93780":[93812],"93781":[93813],"93782":[93814],"93783":[93815],"93784":[93816],"93785":[93817],"93786":[93818],"93787":[93819],"93788":[93820],"93789":[93821],"93790":[93822],"93791":[93823],"119134":[119127,119141],"119135":[119128,119141],"119136":[119128,119141,119150],"119137":[119128,119141,119151],"119138":[119128,119141,119152],"119139":[119128,119141,119153],"119140":[119128,119141,119154],"119227":[119225,119141],"119228":[119226,119141],"119229":[119225,119141,119150],"119230":[119226,119141,119150],"119231":[119225,119141,119151],"119232":[119226,119141,119151],"119808":[97],"119809":[98],"119810":[99],"119811":[100],"119812":[101],"119813":[102],"119814":[103],"119815":[104],"119816":[105],"119817":[106],"119818":[107],"119819":[108],"119820":[109],"119821":[110],"119822":[111],"119823":[112],"119824":[113],"119825":[114],"119826":[115],"119827":[116],"119828":[117],"119829":[118],"119830":[119],"119831":[120],"119832":[121],"119833":[122],"119834":[97],"119835":[98],"119836":[99],"119837":[100],"119838":[101],"119839":[102],"119840":[103],"119841":[104],"119842":[105],"119843":[106],"119844":[107],"119845":[108],"119846":[109],"119847":[110],"119848":[111],"119849":[112],"119850":[113],"119851":[114],"119852":[115],"119853":[116],"119854":[117],"119855":[118],"119856":[119],"119857":[120],"119858":[121],"119859":[122],"119860":[97],"119861":[98],"119862":[99],"119863":[100],"119864":[101],"119865":[102],"119866":[103],"119867":[104],"119868":[105],"119869":[106],"119870":[107],"119871":[108],"119872":[109],"119873":[110],"119874":[111],"119875":[112],"119876":[113],"119877":[114],"119878":[115],"119879":[116],"119880":[117],"119881":[118],"119882":[119],"119883":[120],"119884":[121],"119885":[122],"119886":[97],"119887":[98],"119888":[99],"119889":[100],"119890":[101],"119891":[102],"119892":[103],"119894":[105],"119895":[106],"119896":[107],"119897":[108],"119898":[109],"119899":[110],"119900":[111],"119901":[112],"119902":[113],"119903":[114],"119904":[115],"119905":[116],"119906":[117],"119907":[118],"119908":[119],"119909":[120],"119910":[121],"119911":[122],"119912":[97],"119913":[98],"119914":[99],"119915":[100],"119916":[101],"119917":[102],"119918":[103],"119919":[104],"119920":[105],"119921":[106],"119922":[107],"119923":[108],"119924":[109],"119925":[110],"119926":[111],"119927":[112],"119928":[113],"119929":[114],"119930":[115],"119931":[116],"119932":[117],"119933":[118],"119934":[119],"119935":[120],"119936":[121],"119937":[122],"119938":[97],"119939":[98],"119940":[99],"119941":[100],"119942":[101],"119943":[102],"119944":[103],"119945":[104],"119946":[105],"119947":[106],"119948":[107],"119949":[108],"119950":[109],"119951":[110],"119952":[111],"119953":[112],"119954":[113],"119955":[114],"119956":[115],"119957":[116],"119958":[117],"119959":[118],"119960":[119],"119961":[120],"119962":[121],"119963":[122],"119964":[97],"119966":[99],"119967":[100],"119970":[103],"119973":[106],"119974":[107],"119977":[110],"119978":[111],"119979":[112],"119980":[113],"119982":[115],"119983":[116],"119984":[117],"119985":[118],"119986":[119],"119987":[120],"119988":[121],"119989":[122],"119990":[97],"119991":[98],"119992":[99],"119993":[100],"119995":[102],"119997":[104],"119998":[105],"119999":[106],"120000":[107],"120001":[108],"120002":[109],"120003":[110],"120005":[112],"120006":[113],"120007":[114],"120008":[115],"120009":[116],"120010":[117],"120011":[118],"120012":[119],"120013":[120],"120014":[121],"120015":[122],"120016":[97],"120017":[98],"120018":[99],"120019":[100],"120020":[101],"120021":[102],"120022":[103],"120023":[104],"120024":[105],"120025":[106],"120026":[107],"120027":[108],"120028":[109],"120029":[110],"120030":[111],"120031":[112],"120032":[113],"120033":[114],"120034":[115],"120035":[116],"120036":[117],"120037":[118],"120038":[119],"120039":[120],"120040":[121],"120041":[122],"120042":[97],"120043":[98],"120044":[99],"120045":[100],"120046":[101],"120047":[102],"120048":[103],"120049":[104],"120050":[105],"120051":[106],"120052":[107],"120053":[108],"120054":[109],"120055":[110],"120056":[111],"120057":[112],"120058":[113],"120059":[114],"120060":[115],"120061":[116],"120062":[117],"120063":[118],"120064":[119],"120065":[120],"120066":[121],"120067":[122],"120068":[97],"120069":[98],"120071":[100],"120072":[101],"120073":[102],"120074":[103],"120077":[106],"120078":[107],"120079":[108],"120080":[109],"120081":[110],"120082":[111],"120083":[112],"120084":[113],"120086":[115],"120087":[116],"120088":[117],"120089":[118],"120090":[119],"120091":[120],"120092":[121],"120094":[97],"120095":[98],"120096":[99],"120097":[100],"120098":[101],"120099":[102],"120100":[103],"120101":[104],"120102":[105],"120103":[106],"120104":[107],"120105":[108],"120106":[109],"120107":[110],"120108":[111],"120109":[112],"120110":[113],"120111":[114],"120112":[115],"120113":[116],"120114":[117],"120115":[118],"120116":[119],"120117":[120],"120118":[121],"120119":[122],"120120":[97],"120121":[98],"120123":[100],"120124":[101],"120125":[102],"120126":[103],"120128":[105],"120129":[106],"120130":[107],"120131":[108],"120132":[109],"120134":[111],"120138":[115],"120139":[116],"120140":[117],"120141":[118],"120142":[119],"120143":[120],"120144":[121],"120146":[97],"120147":[98],"120148":[99],"120149":[100],"120150":[101],"120151":[102],"120152":[103],"120153":[104],"120154":[105],"120155":[106],"120156":[107],"120157":[108],"120158":[109],"120159":[110],"120160":[111],"120161":[112],"120162":[113],"120163":[114],"120164":[115],"120165":[116],"120166":[117],"120167":[118],"120168":[119],"120169":[120],"120170":[121],"120171":[122],"120172":[97],"120173":[98],"120174":[99],"120175":[100],"120176":[101],"120177":[102],"120178":[103],"120179":[104],"120180":[105],"120181":[106],"120182":[107],"120183":[108],"120184":[109],"120185":[110],"120186":[111],"120187":[112],"120188":[113],"120189":[114],"120190":[115],"120191":[116],"120192":[117],"120193":[118],"120194":[119],"120195":[120],"120196":[121],"120197":[122],"120198":[97],"120199":[98],"120200":[99],"120201":[100],"120202":[101],"120203":[102],"120204":[103],"120205":[104],"120206":[105],"120207":[106],"120208":[107],"120209":[108],"120210":[109],"120211":[110],"120212":[111],"120213":[112],"120214":[113],"120215":[114],"120216":[115],"120217":[116],"120218":[117],"120219":[118],"120220":[119],"120221":[120],"120222":[121],"120223":[122],"120224":[97],"120225":[98],"120226":[99],"120227":[100],"120228":[101],"120229":[102],"120230":[103],"120231":[104],"120232":[105],"120233":[106],"120234":[107],"120235":[108],"120236":[109],"120237":[110],"120238":[111],"120239":[112],"120240":[113],"120241":[114],"120242":[115],"120243":[116],"120244":[117],"120245":[118],"120246":[119],"120247":[120],"120248":[121],"120249":[122],"120250":[97],"120251":[98],"120252":[99],"120253":[100],"120254":[101],"120255":[102],"120256":[103],"120257":[104],"120258":[105],"120259":[106],"120260":[107],"120261":[108],"120262":[109],"120263":[110],"120264":[111],"120265":[112],"120266":[113],"120267":[114],"120268":[115],"120269":[116],"120270":[117],"120271":[118],"120272":[119],"120273":[120],"120274":[121],"120275":[122],"120276":[97],"120277":[98],"120278":[99],"120279":[100],"120280":[101],"120281":[102],"120282":[103],"120283":[104],"120284":[105],"120285":[106],"120286":[107],"120287":[108],"120288":[109],"120289":[110],"120290":[111],"120291":[112],"120292":[113],"120293":[114],"120294":[115],"120295":[116],"120296":[117],"120297":[118],"120298":[119],"120299":[120],"120300":[121],"120301":[122],"120302":[97],"120303":[98],"120304":[99],"120305":[100],"120306":[101],"120307":[102],"120308":[103],"120309":[104],"120310":[105],"120311":[106],"120312":[107],"120313":[108],"120314":[109],"120315":[110],"120316":[111],"120317":[112],"120318":[113],"120319":[114],"120320":[115],"120321":[116],"120322":[117],"120323":[118],"120324":[119],"120325":[120],"120326":[121],"120327":[122],"120328":[97],"120329":[98],"120330":[99],"120331":[100],"120332":[101],"120333":[102],"120334":[103],"120335":[104],"120336":[105],"120337":[106],"120338":[107],"120339":[108],"120340":[109],"120341":[110],"120342":[111],"120343":[112],"120344":[113],"120345":[114],"120346":[115],"120347":[116],"120348":[117],"120349":[118],"120350":[119],"120351":[120],"120352":[121],"120353":[122],"120354":[97],"120355":[98],"120356":[99],"120357":[100],"120358":[101],"120359":[102],"120360":[103],"120361":[104],"120362":[105],"120363":[106],"120364":[107],"120365":[108],"120366":[109],"120367":[110],"120368":[111],"120369":[112],"120370":[113],"120371":[114],"120372":[115],"120373":[116],"120374":[117],"120375":[118],"120376":[119],"120377":[120],"120378":[121],"120379":[122],"120380":[97],"120381":[98],"120382":[99],"120383":[100],"120384":[101],"120385":[102],"120386":[103],"120387":[104],"120388":[105],"120389":[106],"120390":[107],"120391":[108],"120392":[109],"120393":[110],"120394":[111],"120395":[112],"120396":[113],"120397":[114],"120398":[115],"120399":[116],"120400":[117],"120401":[118],"120402":[119],"120403":[120],"120404":[121],"120405":[122],"120406":[97],"120407":[98],"120408":[99],"120409":[100],"120410":[101],"120411":[102],"120412":[103],"120413":[104],"120414":[105],"120415":[106],"120416":[107],"120417":[108],"120418":[109],"120419":[110],"120420":[111],"120421":[112],"120422":[113],"120423":[114],"120424":[115],"120425":[116],"120426":[117],"120427":[118],"120428":[119],"120429":[120],"120430":[121],"120431":[122],"120432":[97],"120433":[98],"120434":[99],"120435":[100],"120436":[101],"120437":[102],"120438":[103],"120439":[104],"120440":[105],"120441":[106],"120442":[107],"120443":[108],"120444":[109],"120445":[110],"120446":[111],"120447":[112],"120448":[113],"120449":[114],"120450":[115],"120451":[116],"120452":[117],"120453":[118],"120454":[119],"120455":[120],"120456":[121],"120457":[122],"120458":[97],"120459":[98],"120460":[99],"120461":[100],"120462":[101],"120463":[102],"120464":[103],"120465":[104],"120466":[105],"120467":[106],"120468":[107],"120469":[108],"120470":[109],"120471":[110],"120472":[111],"120473":[112],"120474":[113],"120475":[114],"120476":[115],"120477":[116],"120478":[117],"120479":[118],"120480":[119],"120481":[120],"120482":[121],"120483":[122],"120484":[305],"120485":[567],"120488":[945],"120489":[946],"120490":[947],"120491":[948],"120492":[949],"120493":[950],"120494":[951],"120495":[952],"120496":[953],"120497":[954],"120498":[955],"120499":[956],"120500":[957],"120501":[958],"120502":[959],"120503":[960],"120504":[961],"120505":[952],"120506":[963],"120507":[964],"120508":[965],"120509":[966],"120510":[967],"120511":[968],"120512":[969],"120513":[8711],"120514":[945],"120515":[946],"120516":[947],"120517":[948],"120518":[949],"120519":[950],"120520":[951],"120521":[952],"120522":[953],"120523":[954],"120524":[955],"120525":[956],"120526":[957],"120527":[958],"120528":[959],"120529":[960],"120530":[961],"120531":[963],"120533":[964],"120534":[965],"120535":[966],"120536":[967],"120537":[968],"120538":[969],"120539":[8706],"120540":[949],"120541":[952],"120542":[954],"120543":[966],"120544":[961],"120545":[960],"120546":[945],"120547":[946],"120548":[947],"120549":[948],"120550":[949],"120551":[950],"120552":[951],"120553":[952],"120554":[953],"120555":[954],"120556":[955],"120557":[956],"120558":[957],"120559":[958],"120560":[959],"120561":[960],"120562":[961],"120563":[952],"120564":[963],"120565":[964],"120566":[965],"120567":[966],"120568":[967],"120569":[968],"120570":[969],"120571":[8711],"120572":[945],"120573":[946],"120574":[947],"120575":[948],"120576":[949],"120577":[950],"120578":[951],"120579":[952],"120580":[953],"120581":[954],"120582":[955],"120583":[956],"120584":[957],"120585":[958],"120586":[959],"120587":[960],"120588":[961],"120589":[963],"120591":[964],"120592":[965],"120593":[966],"120594":[967],"120595":[968],"120596":[969],"120597":[8706],"120598":[949],"120599":[952],"120600":[954],"120601":[966],"120602":[961],"120603":[960],"120604":[945],"120605":[946],"120606":[947],"120607":[948],"120608":[949],"120609":[950],"120610":[951],"120611":[952],"120612":[953],"120613":[954],"120614":[955],"120615":[956],"120616":[957],"120617":[958],"120618":[959],"120619":[960],"120620":[961],"120621":[952],"120622":[963],"120623":[964],"120624":[965],"120625":[966],"120626":[967],"120627":[968],"120628":[969],"120629":[8711],"120630":[945],"120631":[946],"120632":[947],"120633":[948],"120634":[949],"120635":[950],"120636":[951],"120637":[952],"120638":[953],"120639":[954],"120640":[955],"120641":[956],"120642":[957],"120643":[958],"120644":[959],"120645":[960],"120646":[961],"120647":[963],"120649":[964],"120650":[965],"120651":[966],"120652":[967],"120653":[968],"120654":[969],"120655":[8706],"120656":[949],"120657":[952],"120658":[954],"120659":[966],"120660":[961],"120661":[960],"120662":[945],"120663":[946],"120664":[947],"120665":[948],"120666":[949],"120667":[950],"120668":[951],"120669":[952],"120670":[953],"120671":[954],"120672":[955],"120673":[956],"120674":[957],"120675":[958],"120676":[959],"120677":[960],"120678":[961],"120679":[952],"120680":[963],"120681":[964],"120682":[965],"120683":[966],"120684":[967],"120685":[968],"120686":[969],"120687":[8711],"120688":[945],"120689":[946],"120690":[947],"120691":[948],"120692":[949],"120693":[950],"120694":[951],"120695":[952],"120696":[953],"120697":[954],"120698":[955],"120699":[956],"120700":[957],"120701":[958],"120702":[959],"120703":[960],"120704":[961],"120705":[963],"120707":[964],"120708":[965],"120709":[966],"120710":[967],"120711":[968],"120712":[969],"120713":[8706],"120714":[949],"120715":[952],"120716":[954],"120717":[966],"120718":[961],"120719":[960],"120720":[945],"120721":[946],"120722":[947],"120723":[948],"120724":[949],"120725":[950],"120726":[951],"120727":[952],"120728":[953],"120729":[954],"120730":[955],"120731":[956],"120732":[957],"120733":[958],"120734":[959],"120735":[960],"120736":[961],"120737":[952],"120738":[963],"120739":[964],"120740":[965],"120741":[966],"120742":[967],"120743":[968],"120744":[969],"120745":[8711],"120746":[945],"120747":[946],"120748":[947],"120749":[948],"120750":[949],"120751":[950],"120752":[951],"120753":[952],"120754":[953],"120755":[954],"120756":[955],"120757":[956],"120758":[957],"120759":[958],"120760":[959],"120761":[960],"120762":[961],"120763":[963],"120765":[964],"120766":[965],"120767":[966],"120768":[967],"120769":[968],"120770":[969],"120771":[8706],"120772":[949],"120773":[952],"120774":[954],"120775":[966],"120776":[961],"120777":[960],"120778":[989],"120782":[48],"120783":[49],"120784":[50],"120785":[51],"120786":[52],"120787":[53],"120788":[54],"120789":[55],"120790":[56],"120791":[57],"120792":[48],"120793":[49],"120794":[50],"120795":[51],"120796":[52],"120797":[53],"120798":[54],"120799":[55],"120800":[56],"120801":[57],"120802":[48],"120803":[49],"120804":[50],"120805":[51],"120806":[52],"120807":[53],"120808":[54],"120809":[55],"120810":[56],"120811":[57],"120812":[48],"120813":[49],"120814":[50],"120815":[51],"120816":[52],"120817":[53],"120818":[54],"120819":[55],"120820":[56],"120821":[57],"120822":[48],"120823":[49],"120824":[50],"120825":[51],"120826":[52],"120827":[53],"120828":[54],"120829":[55],"120830":[56],"120831":[57],"122928":[1072],"122929":[1073],"122930":[1074],"122931":[1075],"122932":[1076],"122933":[1077],"122934":[1078],"122935":[1079],"122936":[1080],"122937":[1082],"122938":[1083],"122939":[1084],"122940":[1086],"122941":[1087],"122942":[1088],"122943":[1089],"122944":[1090],"122945":[1091],"122946":[1092],"122947":[1093],"122948":[1094],"122949":[1095],"122950":[1096],"122951":[1099],"122952":[1101],"122953":[1102],"122954":[42633],"122955":[1241],"122956":[1110],"122957":[1112],"122958":[1257],"122959":[1199],"122960":[1231],"122961":[1072],"122962":[1073],"122963":[1074],"122964":[1075],"122965":[1076],"122966":[1077],"122967":[1078],"122968":[1079],"122969":[1080],"122970":[1082],"122971":[1083],"122972":[1086],"122973":[1087],"122974":[1089],"122975":[1091],"122976":[1092],"122977":[1093],"122978":[1094],"122979":[1095],"122980":[1096],"122981":[1098],"122982":[1099],"122983":[1169],"122984":[1110],"122985":[1109],"122986":[1119],"122987":[1195],"122988":[42577],"122989":[1201],"125184":[125218],"125185":[125219],"125186":[125220],"125187":[125221],"125188":[125222],"125189":[125223],"125190":[125224],"125191":[125225],"125192":[125226],"125193":[125227],"125194":[125228],"125195":[125229],"125196":[125230],"125197":[125231],"125198":[125232],"125199":[125233],"125200":[125234],"125201":[125235],"125202":[125236],"125203":[125237],"125204":[125238],"125205":[125239],"125206":[125240],"125207":[125241],"125208":[125242],"125209":[125243],"125210":[125244],"125211":[125245],"125212":[125246],"125213":[125247],"125214":[125248],"125215":[125249],"125216":[125250],"125217":[125251],"126464":[1575],"126465":[1576],"126466":[1580],"126467":[1583],"126469":[1608],"126470":[1586],"126471":[1581],"126472":[1591],"126473":[1610],"126474":[1603],"126475":[1604],"126476":[1605],"126477":[1606],"126478":[1587],"126479":[1593],"126480":[1601],"126481":[1589],"126482":[1602],"126483":[1585],"126484":[1588],"126485":[1578],"126486":[1579],"126487":[1582],"126488":[1584],"126489":[1590],"126490":[1592],"126491":[1594],"126492":[1646],"126493":[1722],"126494":[1697],"126495":[1647],"126497":[1576],"126498":[1580],"126500":[1607],"126503":[1581],"126505":[1610],"126506":[1603],"126507":[1604],"126508":[1605],"126509":[1606],"126510":[1587],"126511":[1593],"126512":[1601],"126513":[1589],"126514":[1602],"126516":[1588],"126517":[1578],"126518":[1579],"126519":[1582],"126521":[1590],"126523":[1594],"126530":[1580],"126535":[1581],"126537":[1610],"126539":[1604],"126541":[1606],"126542":[1587],"126543":[1593],"126545":[1589],"126546":[1602],"126548":[1588],"126551":[1582],"126553":[1590],"126555":[1594],"126557":[1722],"126559":[1647],"126561":[1576],"126562":[1580],"126564":[1607],"126567":[1581],"126568":[1591],"126569":[1610],"126570":[1603],"126572":[1605],"126573":[1606],"126574":[1587],"126575":[1593],"126576":[1601],"126577":[1589],"126578":[1602],"126580":[1588],"126581":[1578],"126582":[1579],"126583":[1582],"126585":[1590],"126586":[1592],"126587":[1594],"126588":[1646],"126590":[1697],"126592":[1575],"126593":[1576],"126594":[1580],"126595":[1583],"126596":[1607],"126597":[1608],"126598":[1586],"126599":[1581],"126600":[1591],"126601":[1610],"126603":[1604],"126604":[1605],"126605":[1606],"126606":[1587],"126607":[1593],"126608":[1601],"126609":[1589],"126610":[1602],"126611":[1585],"126612":[1588],"126613":[1578],"126614":[1579],"126615":[1582],"126616":[1584],"126617":[1590],"126618":[1592],"126619":[1594],"126625":[1576],"126626":[1580],"126627":[1583],"126629":[1608],"126630":[1586],"126631":[1581],"126632":[1591],"126633":[1610],"126635":[1604],"126636":[1605],"126637":[1606],"126638":[1587],"126639":[1593],"126640":[1601],"126641":[1589],"126642":[1602],"126643":[1585],"126644":[1588],"126645":[1578],"126646":[1579],"126647":[1582],"126648":[1584],"126649":[1590],"126650":[1592],"126651":[1594],"127233":[48,44],"127234":[49,44],"127235":[50,44],"127236":[51,44],"127237":[52,44],"127238":[53,44],"127239":[54,44],"127240":[55,44],"127241":[56,44],"127242":[57,44],"127248":[40,97,41],"127249":[40,98,41],"127250":[40,99,41],"127251":[40,100,41],"127252":[40,101,41],"127253":[40,102,41],"127254":[40,103,41],"127255":[40,104,41],"127256":[40,105,41],"127257":[40,106,41],"127258":[40,107,41],"127259":[40,108,41],"127260":[40,109,41],"127261":[40,110,41],"127262":[40,111,41],"127263":[40,112,41],"127264":[40,113,41],"127265":[40,114,41],"127266":[40,115,41],"127267":[40,116,41],"127268":[40,117,41],"127269":[40,118,41],"127270":[40,119,41],"127271":[40,120,41],"127272":[40,121,41],"127273":[40,122,41],"127274":[12308,115,12309],"127275":[99],"127276":[114],"127277":[99,100],"127278":[119,122],"127280":[97],"127281":[98],"127282":[99],"127283":[100],"127284":[101],"127285":[102],"127286":[103],"127287":[104],"127288":[105],"127289":[106],"127290":[107],"127291":[108],"127292":[109],"127293":[110],"127294":[111],"127295":[112],"127296":[113],"127297":[114],"127298":[115],"127299":[116],"127300":[117],"127301":[118],"127302":[119],"127303":[120],"127304":[121],"127305":[122],"127306":[104,118],"127307":[109,118],"127308":[115,100],"127309":[115,115],"127310":[112,112,118],"127311":[119,99],"127338":[109,99],"127339":[109,100],"127340":[109,114],"127376":[100,106],"127488":[12411,12363],"127489":[12467,12467],"127490":[12469],"127504":[25163],"127505":[23383],"127506":[21452],"127507":[12487],"127508":[20108],"127509":[22810],"127510":[35299],"127511":[22825],"127512":[20132],"127513":[26144],"127514":[28961],"127515":[26009],"127516":[21069],"127517":[24460],"127518":[20877],"127519":[26032],"127520":[21021],"127521":[32066],"127522":[29983],"127523":[36009],"127524":[22768],"127525":[21561],"127526":[28436],"127527":[25237],"127528":[25429],"127529":[19968],"127530":[19977],"127531":[36938],"127532":[24038],"127533":[20013],"127534":[21491],"127535":[25351],"127536":[36208],"127537":[25171],"127538":[31105],"127539":[31354],"127540":[21512],"127541":[28288],"127542":[26377],"127543":[26376],"127544":[30003],"127545":[21106],"127546":[21942],"127547":[37197],"127552":[12308,26412,12309],"127553":[12308,19977,12309],"127554":[12308,20108,12309],"127555":[12308,23433,12309],"127556":[12308,28857,12309],"127557":[12308,25171,12309],"127558":[12308,30423,12309],"127559":[12308,21213,12309],"127560":[12308,25943,12309],"127568":[24471],"127569":[21487],"130032":[48],"130033":[49],"130034":[50],"130035":[51],"130036":[52],"130037":[53],"130038":[54],"130039":[55],"130040":[56],"130041":[57],"194560":[20029],"194561":[20024],"194562":[20033],"194563":[131362],"194564":[20320],"194565":[20398],"194566":[20411],"194567":[20482],"194568":[20602],"194569":[20633],"194570":[20711],"194571":[20687],"194572":[13470],"194573":[132666],"194574":[20813],"194575":[20820],"194576":[20836],"194577":[20855],"194578":[132380],"194579":[13497],"194580":[20839],"194581":[20877],"194582":[132427],"194583":[20887],"194584":[20900],"194585":[20172],"194586":[20908],"194587":[20917],"194588":[168415],"194589":[20981],"194590":[20995],"194591":[13535],"194592":[21051],"194593":[21062],"194594":[21106],"194595":[21111],"194596":[13589],"194597":[21191],"194598":[21193],"194599":[21220],"194600":[21242],"194601":[21253],"194602":[21254],"194603":[21271],"194604":[21321],"194605":[21329],"194606":[21338],"194607":[21363],"194608":[21373],"194609":[21375],"194612":[133676],"194613":[28784],"194614":[21450],"194615":[21471],"194616":[133987],"194617":[21483],"194618":[21489],"194619":[21510],"194620":[21662],"194621":[21560],"194622":[21576],"194623":[21608],"194624":[21666],"194625":[21750],"194626":[21776],"194627":[21843],"194628":[21859],"194629":[21892],"194631":[21913],"194632":[21931],"194633":[21939],"194634":[21954],"194635":[22294],"194636":[22022],"194637":[22295],"194638":[22097],"194639":[22132],"194640":[20999],"194641":[22766],"194642":[22478],"194643":[22516],"194644":[22541],"194645":[22411],"194646":[22578],"194647":[22577],"194648":[22700],"194649":[136420],"194650":[22770],"194651":[22775],"194652":[22790],"194653":[22810],"194654":[22818],"194655":[22882],"194656":[136872],"194657":[136938],"194658":[23020],"194659":[23067],"194660":[23079],"194661":[23000],"194662":[23142],"194663":[14062],"194665":[23304],"194666":[23358],"194668":[137672],"194669":[23491],"194670":[23512],"194671":[23527],"194672":[23539],"194673":[138008],"194674":[23551],"194675":[23558],"194677":[23586],"194678":[14209],"194679":[23648],"194680":[23662],"194681":[23744],"194682":[23693],"194683":[138724],"194684":[23875],"194685":[138726],"194686":[23918],"194687":[23915],"194688":[23932],"194689":[24033],"194690":[24034],"194691":[14383],"194692":[24061],"194693":[24104],"194694":[24125],"194695":[24169],"194696":[14434],"194697":[139651],"194698":[14460],"194699":[24240],"194700":[24243],"194701":[24246],"194702":[24266],"194703":[172946],"194704":[24318],"194705":[140081],"194707":[33281],"194708":[24354],"194710":[14535],"194711":[144056],"194712":[156122],"194713":[24418],"194714":[24427],"194715":[14563],"194716":[24474],"194717":[24525],"194718":[24535],"194719":[24569],"194720":[24705],"194721":[14650],"194722":[14620],"194723":[24724],"194724":[141012],"194725":[24775],"194726":[24904],"194727":[24908],"194728":[24910],"194729":[24908],"194730":[24954],"194731":[24974],"194732":[25010],"194733":[24996],"194734":[25007],"194735":[25054],"194736":[25074],"194737":[25078],"194738":[25104],"194739":[25115],"194740":[25181],"194741":[25265],"194742":[25300],"194743":[25424],"194744":[142092],"194745":[25405],"194746":[25340],"194747":[25448],"194748":[25475],"194749":[25572],"194750":[142321],"194751":[25634],"194752":[25541],"194753":[25513],"194754":[14894],"194755":[25705],"194756":[25726],"194757":[25757],"194758":[25719],"194759":[14956],"194760":[25935],"194761":[25964],"194762":[143370],"194763":[26083],"194764":[26360],"194765":[26185],"194766":[15129],"194767":[26257],"194768":[15112],"194769":[15076],"194770":[20882],"194771":[20885],"194772":[26368],"194773":[26268],"194774":[32941],"194775":[17369],"194776":[26391],"194777":[26395],"194778":[26401],"194779":[26462],"194780":[26451],"194781":[144323],"194782":[15177],"194783":[26618],"194784":[26501],"194785":[26706],"194786":[26757],"194787":[144493],"194788":[26766],"194789":[26655],"194790":[26900],"194791":[15261],"194792":[26946],"194793":[27043],"194794":[27114],"194795":[27304],"194796":[145059],"194797":[27355],"194798":[15384],"194799":[27425],"194800":[145575],"194801":[27476],"194802":[15438],"194803":[27506],"194804":[27551],"194805":[27578],"194806":[27579],"194807":[146061],"194808":[138507],"194809":[146170],"194810":[27726],"194811":[146620],"194812":[27839],"194813":[27853],"194814":[27751],"194815":[27926],"194816":[27966],"194817":[28023],"194818":[27969],"194819":[28009],"194820":[28024],"194821":[28037],"194822":[146718],"194823":[27956],"194824":[28207],"194825":[28270],"194826":[15667],"194827":[28363],"194828":[28359],"194829":[147153],"194830":[28153],"194831":[28526],"194832":[147294],"194833":[147342],"194834":[28614],"194835":[28729],"194836":[28702],"194837":[28699],"194838":[15766],"194839":[28746],"194840":[28797],"194841":[28791],"194842":[28845],"194843":[132389],"194844":[28997],"194845":[148067],"194846":[29084],"194848":[29224],"194849":[29237],"194850":[29264],"194851":[149000],"194852":[29312],"194853":[29333],"194854":[149301],"194855":[149524],"194856":[29562],"194857":[29579],"194858":[16044],"194859":[29605],"194860":[16056],"194862":[29767],"194863":[29788],"194864":[29809],"194865":[29829],"194866":[29898],"194867":[16155],"194868":[29988],"194869":[150582],"194870":[30014],"194871":[150674],"194872":[30064],"194873":[139679],"194874":[30224],"194875":[151457],"194876":[151480],"194877":[151620],"194878":[16380],"194879":[16392],"194880":[30452],"194881":[151795],"194882":[151794],"194883":[151833],"194884":[151859],"194885":[30494],"194886":[30495],"194888":[30538],"194889":[16441],"194890":[30603],"194891":[16454],"194892":[16534],"194893":[152605],"194894":[30798],"194895":[30860],"194896":[30924],"194897":[16611],"194898":[153126],"194899":[31062],"194900":[153242],"194901":[153285],"194902":[31119],"194903":[31211],"194904":[16687],"194905":[31296],"194906":[31306],"194907":[31311],"194908":[153980],"194909":[154279],"194912":[16898],"194913":[154539],"194914":[31686],"194915":[31689],"194916":[16935],"194917":[154752],"194918":[31954],"194919":[17056],"194920":[31976],"194921":[31971],"194922":[32000],"194923":[155526],"194924":[32099],"194925":[17153],"194926":[32199],"194927":[32258],"194928":[32325],"194929":[17204],"194930":[156200],"194931":[156231],"194932":[17241],"194933":[156377],"194934":[32634],"194935":[156478],"194936":[32661],"194937":[32762],"194938":[32773],"194939":[156890],"194940":[156963],"194941":[32864],"194942":[157096],"194943":[32880],"194944":[144223],"194945":[17365],"194946":[32946],"194947":[33027],"194948":[17419],"194949":[33086],"194950":[23221],"194951":[157607],"194952":[157621],"194953":[144275],"194954":[144284],"194955":[33281],"194956":[33284],"194957":[36766],"194958":[17515],"194959":[33425],"194960":[33419],"194961":[33437],"194962":[21171],"194963":[33457],"194964":[33459],"194965":[33469],"194966":[33510],"194967":[158524],"194968":[33509],"194969":[33565],"194970":[33635],"194971":[33709],"194972":[33571],"194973":[33725],"194974":[33767],"194975":[33879],"194976":[33619],"194977":[33738],"194978":[33740],"194979":[33756],"194980":[158774],"194981":[159083],"194982":[158933],"194983":[17707],"194984":[34033],"194985":[34035],"194986":[34070],"194987":[160714],"194988":[34148],"194989":[159532],"194990":[17757],"194991":[17761],"194992":[159665],"194993":[159954],"194994":[17771],"194995":[34384],"194996":[34396],"194997":[34407],"194998":[34409],"194999":[34473],"195000":[34440],"195001":[34574],"195002":[34530],"195003":[34681],"195004":[34600],"195005":[34667],"195006":[34694],"195008":[34785],"195009":[34817],"195010":[17913],"195011":[34912],"195012":[34915],"195013":[161383],"195014":[35031],"195015":[35038],"195016":[17973],"195017":[35066],"195018":[13499],"195019":[161966],"195020":[162150],"195021":[18110],"195022":[18119],"195023":[35488],"195024":[35565],"195025":[35722],"195026":[35925],"195027":[162984],"195028":[36011],"195029":[36033],"195030":[36123],"195031":[36215],"195032":[163631],"195033":[133124],"195034":[36299],"195035":[36284],"195036":[36336],"195037":[133342],"195038":[36564],"195039":[36664],"195040":[165330],"195041":[165357],"195042":[37012],"195043":[37105],"195044":[37137],"195045":[165678],"195046":[37147],"195047":[37432],"195048":[37591],"195049":[37592],"195050":[37500],"195051":[37881],"195052":[37909],"195053":[166906],"195054":[38283],"195055":[18837],"195056":[38327],"195057":[167287],"195058":[18918],"195059":[38595],"195060":[23986],"195061":[38691],"195062":[168261],"195063":[168474],"195064":[19054],"195065":[19062],"195066":[38880],"195067":[168970],"195068":[19122],"195069":[169110],"195070":[38923],"195072":[38953],"195073":[169398],"195074":[39138],"195075":[19251],"195076":[39209],"195077":[39335],"195078":[39362],"195079":[39422],"195080":[19406],"195081":[170800],"195082":[39698],"195083":[40000],"195084":[40189],"195085":[19662],"195086":[19693],"195087":[40295],"195088":[172238],"195089":[19704],"195090":[172293],"195091":[172558],"195092":[172689],"195093":[40635],"195094":[19798],"195095":[40697],"195096":[40702],"195097":[40709],"195098":[40719],"195099":[40726],"195100":[40763],"195101":[173568]},"bidi_ranges":[[0,8,"BN"],[9,9,"S"],[10,10,"B"],[11,11,"S"],[12,12,"WS"],[13,13,"B"],[14,27,"BN"],[28,30,"B"],[31,31,"S"],[32,32,"WS"],[33,34,"ON"],[35,37,"ET"],[38,42,"ON"],[43,43,"ES"],[44,44,"CS"],[45,45,"ES"],[46,47,"CS"],[48,57,"EN"],[58,58,"CS"],[59,64,"ON"],[65,90,"L"],[91,96,"ON"],[97,122,"L"],[123,126,"ON"],[127,132,"BN"],[133,133,"B"],[134,159,"BN"],[160,160,"CS"],[161,161,"ON"],[162,165,"ET"],[166,169,"ON"],[170,170,"L"],[171,172,"ON"],[173,173,"BN"],[174,175,"ON"],[176,177,"ET"],[178,179,"EN"],[180,180,"ON"],[181,181,"L"],[182,184,"ON"],[185,185,"EN"],[186,186,"L"],[187,191,"ON"],[192,214,"L"],[215,215,"ON"],[216,246,"L"],[247,247,"ON"],[248,696,"L"],[697,698,"ON"],[699,705,"L"],[706,719,"ON"],[720,721,"L"],[722,735,"ON"],[736,740,"L"],[741,749,"ON"],[750,750,"L"],[751,767,"ON"],[768,879,"NSM"],[880,883,"L"],[884,885,"ON"],[886,887,"L"],[890,893,"L"],[894,894,"ON"],[895,895,"L"],[900,901,"ON"],[902,902,"L"],[903,903,"ON"],[904,906,"L"],[908,908,"L"],[910,929,"L"],[931,1013,"L"],[1014,1014,"ON"],[1015,1154,"L"],[1155,1161,"NSM"],[1162,1327,"L"],[1329,1366,"L"],[1369,1417,"L"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1488,1514,"R"],[1519,1524,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1805,"AL"],[1807,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1869,1957,"AL"],[1958,1968,"NSM"],[1969,1969,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2042,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2096,2110,"R"],[2112,2136,"R"],[2137,2139,"NSM"],[2142,2142,"R"],[2144,2154,"AL"],[2160,2190,"AL"],[2192,2193,"AN"],[2200,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2307,2361,"L"],[2362,2362,"NSM"],[2363,2363,"L"],[2364,2364,"NSM"],[2365,2368,"L"],[2369,2376,"NSM"],[2377,2380,"L"],[2381,2381,"NSM"],[2382,2384,"L"],[2385,2391,"NSM"],[2392,2401,"L"],[2402,2403,"NSM"],[2404,2432,"L"],[2433,2433,"NSM"],[2434,2435,"L"],[2437,2444,"L"],[2447,2448,"L"],[2451,2472,"L"],[2474,2480,"L"],[2482,2482,"L"],[2486,2489,"L"],[2492,2492,"NSM"],[2493,2496,"L"],[2497,2500,"NSM"],[2503,2504,"L"],[2507,2508,"L"],[2509,2509,"NSM"],[2510,2510,"L"],[2519,2519,"L"],[2524,2525,"L"],[2527,2529,"L"],[2530,2531,"NSM"],[2534,2545,"L"],[2546,2547,"ET"],[2548,2554,"L"],[2555,2555,"ET"],[2556,2557,"L"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2563,2563,"L"],[2565,2570,"L"],[2575,2576,"L"],[2579,2600,"L"],[2602,2608,"L"],[2610,2611,"L"],[2613,2614,"L"],[2616,2617,"L"],[2620,2620,"NSM"],[2622,2624,"L"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2649,2652,"L"],[2654,2654,"L"],[2662,2671,"L"],[2672,2673,"NSM"],[2674,2676,"L"],[2677,2677,"NSM"],[2678,2678,"L"],[2689,2690,"NSM"],[2691,2691,"L"],[2693,2701,"L"],[2703,2705,"L"],[2707,2728,"L"],[2730,2736,"L"],[2738,2739,"L"],[2741,2745,"L"],[2748,2748,"NSM"],[2749,2752,"L"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2761,2761,"L"],[2763,2764,"L"],[2765,2765,"NSM"],[2768,2768,"L"],[2784,2785,"L"],[2786,2787,"NSM"],[2790,2800,"L"],[2801,2801,"ET"],[2809,2809,"L"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2818,2819,"L"],[2821,2828,"L"],[2831,2832,"L"],[2835,2856,"L"],[2858,2864,"L"],[2866,2867,"L"],[2869,2873,"L"],[2876,2876,"NSM"],[2877,2878,"L"],[2879,2879,"NSM"],[2880,2880,"L"],[2881,2884,"NSM"],[2887,2888,"L"],[2891,2892,"L"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2903,2903,"L"],[2908,2909,"L"],[2911,2913,"L"],[2914,2915,"NSM"],[2918,2935,"L"],[2946,2946,"NSM"],[2947,2947,"L"],[2949,2954,"L"],[2958,2960,"L"],[2962,2965,"L"],[2969,2970,"L"],[2972,2972,"L"],[2974,2975,"L"],[2979,2980,"L"],[2984,2986,"L"],[2990,3001,"L"],[3006,3007,"L"],[3008,3008,"NSM"],[3009,3010,"L"],[3014,3016,"L"],[3018,3020,"L"],[3021,3021,"NSM"],[3024,3024,"L"],[3031,3031,"L"],[3046,3058,"L"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3073,3075,"L"],[3076,3076,"NSM"],[3077,3084,"L"],[3086,3088,"L"],[3090,3112,"L"],[3114,3129,"L"],[3132,3132,"NSM"],[3133,3133,"L"],[3134,3136,"NSM"],[3137,3140,"L"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3160,3162,"L"],[3165,3165,"L"],[3168,3169,"L"],[3170,3171,"NSM"],[3174,3183,"L"],[3191,3191,"L"],[3192,3198,"ON"],[3199,3200,"L"],[3201,3201,"NSM"],[3202,3212,"L"],[3214,3216,"L"],[3218,3240,"L"],[3242,3251,"L"],[3253,3257,"L"],[3260,3260,"NSM"],[3261,3268,"L"],[3270,3272,"L"],[3274,3275,"L"],[3276,3277,"NSM"],[3285,3286,"L"],[3293,3294,"L"],[3296,3297,"L"],[3298,3299,"NSM"],[3302,3311,"L"],[3313,3315,"L"],[3328,3329,"NSM"],[3330,3340,"L"],[3342,3344,"L"],[3346,3386,"L"],[3387,3388,"NSM"],[3389,3392,"L"],[3393,3396,"NSM"],[3398,3400,"L"],[3402,3404,"L"],[3405,3405,"NSM"],[3406,3407,"L"],[3412,3425,"L"],[3426,3427,"NSM"],[3430,3455,"L"],[3457,3457,"NSM"],[3458,3459,"L"],[3461,3478,"L"],[3482,3505,"L"],[3507,3515,"L"],[3517,3517,"L"],[3520,3526,"L"],[3530,3530,"NSM"],[3535,3537,"L"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3544,3551,"L"],[3558,3567,"L"],[3570,3572,"L"],[3585,3632,"L"],[3633,3633,"NSM"],[3634,3635,"L"],[3636,3642,"NSM"],[3647,3647,"ET"],[3648,3654,"L"],[3655,3662,"NSM"],[3663,3675,"L"],[3713,3714,"L"],[3716,3716,"L"],[3718,3722,"L"],[3724,3747,"L"],[3749,3749,"L"],[3751,3760,"L"],[3761,3761,"NSM"],[3762,3763,"L"],[3764,3772,"NSM"],[3773,3773,"L"],[3776,3780,"L"],[3782,3782,"L"],[3784,3790,"NSM"],[3792,3801,"L"],[3804,3807,"L"],[3840,3863,"L"],[3864,3865,"NSM"],[3866,3892,"L"],[3893,3893,"NSM"],[3894,3894,"L"],[3895,3895,"NSM"],[3896,3896,"L"],[3897,3897,"NSM"],[3898,3901,"ON"],[3902,3911,"L"],[3913,3948,"L"],[3953,3966,"NSM"],[3967,3967,"L"],[3968,3972,"NSM"],[3973,3973,"L"],[3974,3975,"NSM"],[3976,3980,"L"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4030,4037,"L"],[4038,4038,"NSM"],[4039,4044,"L"],[4046,4058,"L"],[4096,4140,"L"],[4141,4144,"NSM"],[4145,4145,"L"],[4146,4151,"NSM"],[4152,4152,"L"],[4153,4154,"NSM"],[4155,4156,"L"],[4157,4158,"NSM"],[4159,4183,"L"],[4184,4185,"NSM"],[4186,4189,"L"],[4190,4192,"NSM"],[4193,4208,"L"],[4209,4212,"NSM"],[4213,4225,"L"],[4226,4226,"NSM"],[4227,4228,"L"],[4229,4230,"NSM"],[4231,4236,"L"],[4237,4237,"NSM"],[4238,4252,"L"],[4253,4253,"NSM"],[4254,4293,"L"],[4295,4295,"L"],[4301,4301,"L"],[4304,4680,"L"],[4682,4685,"L"],[4688,4694,"L"],[4696,4696,"L"],[4698,4701,"L"],[4704,4744,"L"],[4746,4749,"L"],[4752,4784,"L"],[4786,4789,"L"],[4792,4798,"L"],[4800,4800,"L"],[4802,4805,"L"],[4808,4822,"L"],[4824,4880,"L"],[4882,4885,"L"],[4888,4954,"L"],[4957,4959,"NSM"],[4960,4988,"L"],[4992,5007,"L"],[5008,5017,"ON"],[5024,5109,"L"],[5112,5117,"L"],[5120,5120,"ON"],[5121,5759,"L"],[5760,5760,"WS"],[5761,5786,"L"],[5787,5788,"ON"],[5792,5880,"L"],[5888,5905,"L"],[5906,5908,"NSM"],[5909,5909,"L"],[5919,5937,"L"],[5938,5939,"NSM"],[5940,5942,"L"],[5952,5969,"L"],[5970,5971,"NSM"],[5984,5996,"L"],[5998,6000,"L"],[6002,6003,"NSM"],[6016,6067,"L"],[6068,6069,"NSM"],[6070,6070,"L"],[6071,6077,"NSM"],[6078,6085,"L"],[6086,6086,"NSM"],[6087,6088,"L"],[6089,6099,"NSM"],[6100,6106,"L"],[6107,6107,"ET"],[6108,6108,"L"],[6109,6109,"NSM"],[6112,6121,"L"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6160,6169,"L"],[6176,6264,"L"],[6272,6276,"L"],[6277,6278,"NSM"],[6279,6312,"L"],[6313,6313,"NSM"],[6314,6314,"L"],[6320,6389,"L"],[6400,6430,"L"],[6432,6434,"NSM"],[6435,6438,"L"],[6439,6440,"NSM"],[6441,6443,"L"],[6448,6449,"L"],[6450,6450,"NSM"],[6451,6456,"L"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6470,6509,"L"],[6512,6516,"L"],[6528,6571,"L"],[6576,6601,"L"],[6608,6618,"L"],[6622,6655,"ON"],[6656,6678,"L"],[6679,6680,"NSM"],[6681,6682,"L"],[6683,6683,"NSM"],[6686,6741,"L"],[6742,6742,"NSM"],[6743,6743,"L"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6753,6753,"L"],[6754,6754,"NSM"],[6755,6756,"L"],[6757,6764,"NSM"],[6765,6770,"L"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6784,6793,"L"],[6800,6809,"L"],[6816,6829,"L"],[6832,6862,"NSM"],[6912,6915,"NSM"],[6916,6963,"L"],[6964,6964,"NSM"],[6965,6965,"L"],[6966,6970,"NSM"],[6971,6971,"L"],[6972,6972,"NSM"],[6973,6977,"L"],[6978,6978,"NSM"],[6979,6988,"L"],[6992,7018,"L"],[7019,7027,"NSM"],[7028,7038,"L"],[7040,7041,"NSM"],[7042,7073,"L"],[7074,7077,"NSM"],[7078,7079,"L"],[7080,7081,"NSM"],[7082,7082,"L"],[7083,7085,"NSM"],[7086,7141,"L"],[7142,7142,"NSM"],[7143,7143,"L"],[7144,7145,"NSM"],[7146,7148,"L"],[7149,7149,"NSM"],[7150,7150,"L"],[7151,7153,"NSM"],[7154,7155,"L"],[7164,7211,"L"],[7212,7219,"NSM"],[7220,7221,"L"],[7222,7223,"NSM"],[7227,7241,"L"],[7245,7304,"L"],[7312,7354,"L"],[7357,7367,"L"],[7376,7378,"NSM"],[7379,7379,"L"],[7380,7392,"NSM"],[7393,7393,"L"],[7394,7400,"NSM"],[7401,7404,"L"],[7405,7405,"NSM"],[7406,7411,"L"],[7412,7412,"NSM"],[7413,7415,"L"],[7416,7417,"NSM"],[7418,7418,"L"],[7424,7615,"L"],[7616,7679,"NSM"],[7680,7957,"L"],[7960,7965,"L"],[7968,8005,"L"],[8008,8013,"L"],[8016,8023,"L"],[8025,8025,"L"],[8027,8027,"L"],[8029,8029,"L"],[8031,8061,"L"],[8064,8116,"L"],[8118,8124,"L"],[8125,8125,"ON"],[8126,8126,"L"],[8127,8129,"ON"],[8130,8132,"L"],[8134,8140,"L"],[8141,8143,"ON"],[8144,8147,"L"],[8150,8155,"L"],[8157,8159,"ON"],[8160,8172,"L"],[8173,8175,"ON"],[8178,8180,"L"],[8182,8188,"L"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8206,8206,"L"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8234,"LRE"],[8235,8235,"RLE"],[8236,8236,"PDF"],[8237,8237,"LRO"],[8238,8238,"RLO"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8293,"BN"],[8294,8294,"LRI"],[8295,8295,"RLI"],[8296,8296,"FSI"],[8297,8297,"PDI"],[8298,8303,"BN"],[8304,8304,"EN"],[8305,8305,"L"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8319,8319,"L"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8336,8348,"L"],[8352,8384,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8450,8450,"L"],[8451,8454,"ON"],[8455,8455,"L"],[8456,8457,"ON"],[8458,8467,"L"],[8468,8468,"ON"],[8469,8469,"L"],[8470,8472,"ON"],[8473,8477,"L"],[8478,8483,"ON"],[8484,8484,"L"],[8485,8485,"ON"],[8486,8486,"L"],[8487,8487,"ON"],[8488,8488,"L"],[8489,8489,"ON"],[8490,8493,"L"],[8494,8494,"ET"],[8495,8505,"L"],[8506,8507,"ON"],[8508,8511,"L"],[8512,8516,"ON"],[8517,8521,"L"],[8522,8525,"ON"],[8526,8527,"L"],[8528,8543,"ON"],[8544,8584,"L"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9014,9082,"L"],[9083,9108,"ON"],[9109,9109,"L"],[9110,9254,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9372,9449,"L"],[9450,9899,"ON"],[9900,9900,"L"],[9901,10239,"ON"],[10240,10495,"L"],[10496,11123,"ON"],[11126,11157,"ON"],[11159,11263,"ON"],[11264,11492,"L"],[11493,11498,"ON"],[11499,11502,"L"],[11503,11505,"NSM"],[11506,11507,"L"],[11513,11519,"ON"],[11520,11557,"L"],[11559,11559,"L"],[11565,11565,"L"],[11568,11623,"L"],[11631,11632,"L"],[11647,11647,"NSM"],[11648,11670,"L"],[11680,11686,"L"],[11688,11694,"L"],[11696,11702,"L"],[11704,11710,"L"],[11712,11718,"L"],[11720,11726,"L"],[11728,11734,"L"],[11736,11742,"L"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12293,12295,"L"],[12296,12320,"ON"],[12321,12329,"L"],[12330,12333,"NSM"],[12334,12335,"L"],[12336,12336,"ON"],[12337,12341,"L"],[12342,12343,"ON"],[12344,12348,"L"],[12349,12351,"ON"],[12353,12438,"L"],[12441,12442,"NSM"],[12443,12444,"ON"],[12445,12447,"L"],[12448,12448,"ON"],[12449,12538,"L"],[12539,12539,"ON"],[12540,12543,"L"],[12549,12591,"L"],[12593,12686,"L"],[12688,12735,"L"],[12736,12771,"ON"],[12783,12783,"ON"],[12784,12828,"L"],[12829,12830,"ON"],[12832,12879,"L"],[12880,12895,"ON"],[12896,12923,"L"],[12924,12926,"ON"],[12927,12976,"L"],[12977,12991,"ON"],[12992,13003,"L"],[13004,13007,"ON"],[13008,13174,"L"],[13175,13178,"ON"],[13179,13277,"L"],[13278,13279,"ON"],[13280,13310,"L"],[13311,13311,"ON"],[13312,19903,"L"],[19904,19967,"ON"],[19968,42124,"L"],[42128,42182,"ON"],[42192,42508,"L"],[42509,42511,"ON"],[42512,42539,"L"],[42560,42606,"L"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42624,42653,"L"],[42654,42655,"NSM"],[42656,42735,"L"],[42736,42737,"NSM"],[42738,42743,"L"],[42752,42785,"ON"],[42786,42887,"L"],[42888,42888,"ON"],[42889,42954,"L"],[42960,42961,"L"],[42963,42963,"L"],[42965,42969,"L"],[42994,43009,"L"],[43010,43010,"NSM"],[43011,43013,"L"],[43014,43014,"NSM"],[43015,43018,"L"],[43019,43019,"NSM"],[43020,43044,"L"],[43045,43046,"NSM"],[43047,43047,"L"],[43048,43051,"ON"],[43052,43052,"NSM"],[43056,43063,"L"],[43064,43065,"ET"],[43072,43123,"L"],[43124,43127,"ON"],[43136,43203,"L"],[43204,43205,"NSM"],[43214,43225,"L"],[43232,43249,"NSM"],[43250,43262,"L"],[43263,43263,"NSM"],[43264,43301,"L"],[43302,43309,"NSM"],[43310,43334,"L"],[43335,43345,"NSM"],[43346,43347,"L"],[43359,43388,"L"],[43392,43394,"NSM"],[43395,43442,"L"],[43443,43443,"NSM"],[43444,43445,"L"],[43446,43449,"NSM"],[43450,43451,"L"],[43452,43453,"NSM"],[43454,43469,"L"],[43471,43481,"L"],[43486,43492,"L"],[43493,43493,"NSM"],[43494,43518,"L"],[43520,43560,"L"],[43561,43566,"NSM"],[43567,43568,"L"],[43569,43570,"NSM"],[43571,43572,"L"],[43573,43574,"NSM"],[43584,43586,"L"],[43587,43587,"NSM"],[43588,43595,"L"],[43596,43596,"NSM"],[43597,43597,"L"],[43600,43609,"L"],[43612,43643,"L"],[43644,43644,"NSM"],[43645,43695,"L"],[43696,43696,"NSM"],[43697,43697,"L"],[43698,43700,"NSM"],[43701,43702,"L"],[43703,43704,"NSM"],[43705,43709,"L"],[43710,43711,"NSM"],[43712,43712,"L"],[43713,43713,"NSM"],[43714,43714,"L"],[43739,43755,"L"],[43756,43757,"NSM"],[43758,43765,"L"],[43766,43766,"NSM"],[43777,43782,"L"],[43785,43790,"L"],[43793,43798,"L"],[43808,43814,"L"],[43816,43822,"L"],[43824,43881,"L"],[43882,43883,"ON"],[43888,44004,"L"],[44005,44005,"NSM"],[44006,44007,"L"],[44008,44008,"NSM"],[44009,44012,"L"],[44013,44013,"NSM"],[44016,44025,"L"],[44032,55203,"L"],[55216,55238,"L"],[55243,55291,"L"],[57344,64109,"L"],[64112,64217,"L"],[64256,64262,"L"],[64275,64279,"L"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64310,"R"],[64312,64316,"R"],[64318,64318,"R"],[64320,64321,"R"],[64323,64324,"R"],[64326,64335,"R"],[64336,64450,"AL"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64914,64967,"AL"],[64975,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65140,"AL"],[65142,65276,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65313,65338,"L"],[65339,65344,"ON"],[65345,65370,"L"],[65371,65381,"ON"],[65382,65470,"L"],[65474,65479,"L"],[65482,65487,"L"],[65490,65495,"L"],[65498,65500,"L"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65536,65547,"L"],[65549,65574,"L"],[65576,65594,"L"],[65596,65597,"L"],[65599,65613,"L"],[65616,65629,"L"],[65664,65786,"L"],[65792,65792,"L"],[65793,65793,"ON"],[65794,65794,"L"],[65799,65843,"L"],[65847,65855,"L"],[65856,65932,"ON"],[65933,65934,"L"],[65936,65948,"ON"],[65952,65952,"ON"],[66000,66044,"L"],[66045,66045,"NSM"],[66176,66204,"L"],[66208,66256,"L"],[66272,66272,"NSM"],[66273,66299,"EN"],[66304,66339,"L"],[66349,66378,"L"],[66384,66421,"L"],[66422,66426,"NSM"],[66432,66461,"L"],[66463,66499,"L"],[66504,66517,"L"],[66560,66717,"L"],[66720,66729,"L"],[66736,66771,"L"],[66776,66811,"L"],[66816,66855,"L"],[66864,66915,"L"],[66927,66938,"L"],[66940,66954,"L"],[66956,66962,"L"],[66964,66965,"L"],[66967,66977,"L"],[66979,66993,"L"],[66995,67001,"L"],[67003,67004,"L"],[67072,67382,"L"],[67392,67413,"L"],[67424,67431,"L"],[67456,67461,"L"],[67463,67504,"L"],[67506,67514,"L"],[67584,67589,"R"],[67592,67592,"R"],[67594,67637,"R"],[67639,67640,"R"],[67644,67644,"R"],[67647,67669,"R"],[67671,67742,"R"],[67751,67759,"R"],[67808,67826,"R"],[67828,67829,"R"],[67835,67867,"R"],[67871,67871,"ON"],[67872,67897,"R"],[67903,67903,"R"],[67968,68023,"R"],[68028,68047,"R"],[68050,68096,"R"],[68097,68099,"NSM"],[68101,68102,"NSM"],[68108,68111,"NSM"],[68112,68115,"R"],[68117,68119,"R"],[68121,68149,"R"],[68152,68154,"NSM"],[68159,68159,"NSM"],[68160,68168,"R"],[68176,68184,"R"],[68192,68255,"R"],[68288,68324,"R"],[68325,68326,"NSM"],[68331,68342,"R"],[68352,68405,"R"],[68409,68415,"ON"],[68416,68437,"R"],[68440,68466,"R"],[68472,68497,"R"],[68505,68508,"R"],[68521,68527,"R"],[68608,68680,"R"],[68736,68786,"R"],[68800,68850,"R"],[68858,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68912,68921,"AN"],[69216,69246,"AN"],[69248,69289,"R"],[69291,69292,"NSM"],[69293,69293,"R"],[69296,69297,"R"],[69373,69375,"NSM"],[69376,69415,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69465,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69513,"R"],[69552,69579,"R"],[69600,69622,"R"],[69632,69632,"L"],[69633,69633,"NSM"],[69634,69687,"L"],[69688,69702,"NSM"],[69703,69709,"L"],[69714,69733,"ON"],[69734,69743,"L"],[69744,69744,"NSM"],[69745,69746,"L"],[69747,69748,"NSM"],[69749,69749,"L"],[69759,69761,"NSM"],[69762,69810,"L"],[69811,69814,"NSM"],[69815,69816,"L"],[69817,69818,"NSM"],[69819,69825,"L"],[69826,69826,"NSM"],[69837,69837,"L"],[69840,69864,"L"],[69872,69881,"L"],[69888,69890,"NSM"],[69891,69926,"L"],[69927,69931,"NSM"],[69932,69932,"L"],[69933,69940,"NSM"],[69942,69959,"L"],[69968,70002,"L"],[70003,70003,"NSM"],[70004,70006,"L"],[70016,70017,"NSM"],[70018,70069,"L"],[70070,70078,"NSM"],[70079,70088,"L"],[70089,70092,"NSM"],[70093,70094,"L"],[70095,70095,"NSM"],[70096,70111,"L"],[70113,70132,"L"],[70144,70161,"L"],[70163,70190,"L"],[70191,70193,"NSM"],[70194,70195,"L"],[70196,70196,"NSM"],[70197,70197,"L"],[70198,70199,"NSM"],[70200,70205,"L"],[70206,70206,"NSM"],[70207,70208,"L"],[70209,70209,"NSM"],[70272,70278,"L"],[70280,70280,"L"],[70282,70285,"L"],[70287,70301,"L"],[70303,70313,"L"],[70320,70366,"L"],[70367,70367,"NSM"],[70368,70370,"L"],[70371,70378,"NSM"],[70384,70393,"L"],[70400,70401,"NSM"],[70402,70403,"L"],[70405,70412,"L"],[70415,70416,"L"],[70419,70440,"L"],[70442,70448,"L"],[70450,70451,"L"],[70453,70457,"L"],[70459,70460,"NSM"],[70461,70463,"L"],[70464,70464,"NSM"],[70465,70468,"L"],[70471,70472,"L"],[70475,70477,"L"],[70480,70480,"L"],[70487,70487,"L"],[70493,70499,"L"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70656,70711,"L"],[70712,70719,"NSM"],[70720,70721,"L"],[70722,70724,"NSM"],[70725,70725,"L"],[70726,70726,"NSM"],[70727,70747,"L"],[70749,70749,"L"],[70750,70750,"NSM"],[70751,70753,"L"],[70784,70834,"L"],[70835,70840,"NSM"],[70841,70841,"L"],[70842,70842,"NSM"],[70843,70846,"L"],[70847,70848,"NSM"],[70849,70849,"L"],[70850,70851,"NSM"],[70852,70855,"L"],[70864,70873,"L"],[71040,71089,"L"],[71090,71093,"NSM"],[71096,71099,"L"],[71100,71101,"NSM"],[71102,71102,"L"],[71103,71104,"NSM"],[71105,71131,"L"],[71132,71133,"NSM"],[71168,71218,"L"],[71219,71226,"NSM"],[71227,71228,"L"],[71229,71229,"NSM"],[71230,71230,"L"],[71231,71232,"NSM"],[71233,71236,"L"],[71248,71257,"L"],[71264,71276,"ON"],[71296,71338,"L"],[71339,71339,"NSM"],[71340,71340,"L"],[71341,71341,"NSM"],[71342,71343,"L"],[71344,71349,"NSM"],[71350,71350,"L"],[71351,71351,"NSM"],[71352,71353,"L"],[71360,71369,"L"],[71424,71450,"L"],[71453,71455,"NSM"],[71456,71457,"L"],[71458,71461,"NSM"],[71462,71462,"L"],[71463,71467,"NSM"],[71472,71494,"L"],[71680,71726,"L"],[71727,71735,"NSM"],[71736,71736,"L"],[71737,71738,"NSM"],[71739,71739,"L"],[71840,71922,"L"],[71935,71942,"L"],[71945,71945,"L"],[71948,71955,"L"],[71957,71958,"L"],[71960,71989,"L"],[71991,71992,"L"],[71995,71996,"NSM"],[71997,71997,"L"],[71998,71998,"NSM"],[71999,72002,"L"],[72003,72003,"NSM"],[72004,72006,"L"],[72016,72025,"L"],[72096,72103,"L"],[72106,72147,"L"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72156,72159,"L"],[72160,72160,"NSM"],[72161,72164,"L"],[72192,72192,"L"],[72193,72198,"NSM"],[72199,72200,"L"],[72201,72202,"NSM"],[72203,72242,"L"],[72243,72248,"NSM"],[72249,72250,"L"],[72251,72254,"NSM"],[72255,72262,"L"],[72263,72263,"NSM"],[72272,72272,"L"],[72273,72278,"NSM"],[72279,72280,"L"],[72281,72283,"NSM"],[72284,72329,"L"],[72330,72342,"NSM"],[72343,72343,"L"],[72344,72345,"NSM"],[72346,72354,"L"],[72368,72440,"L"],[72448,72457,"L"],[72704,72712,"L"],[72714,72751,"L"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72766,72773,"L"],[72784,72812,"L"],[72816,72847,"L"],[72850,72871,"NSM"],[72873,72873,"L"],[72874,72880,"NSM"],[72881,72881,"L"],[72882,72883,"NSM"],[72884,72884,"L"],[72885,72886,"NSM"],[72960,72966,"L"],[72968,72969,"L"],[72971,73008,"L"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73030,73030,"L"],[73031,73031,"NSM"],[73040,73049,"L"],[73056,73061,"L"],[73063,73064,"L"],[73066,73102,"L"],[73104,73105,"NSM"],[73107,73108,"L"],[73109,73109,"NSM"],[73110,73110,"L"],[73111,73111,"NSM"],[73112,73112,"L"],[73120,73129,"L"],[73440,73458,"L"],[73459,73460,"NSM"],[73461,73464,"L"],[73472,73473,"NSM"],[73474,73488,"L"],[73490,73525,"L"],[73526,73530,"NSM"],[73534,73535,"L"],[73536,73536,"NSM"],[73537,73537,"L"],[73538,73538,"NSM"],[73539,73561,"L"],[73648,73648,"L"],[73664,73684,"L"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[73727,74649,"L"],[74752,74862,"L"],[74864,74868,"L"],[74880,75075,"L"],[77712,77810,"L"],[77824,78911,"L"],[78912,78912,"NSM"],[78913,78918,"L"],[78919,78933,"NSM"],[82944,83526,"L"],[92160,92728,"L"],[92736,92766,"L"],[92768,92777,"L"],[92782,92862,"L"],[92864,92873,"L"],[92880,92909,"L"],[92912,92916,"NSM"],[92917,92917,"L"],[92928,92975,"L"],[92976,92982,"NSM"],[92983,92997,"L"],[93008,93017,"L"],[93019,93025,"L"],[93027,93047,"L"],[93053,93071,"L"],[93760,93850,"L"],[93952,94026,"L"],[94031,94031,"NSM"],[94032,94087,"L"],[94095,94098,"NSM"],[94099,94111,"L"],[94176,94177,"L"],[94178,94178,"ON"],[94179,94179,"L"],[94180,94180,"NSM"],[94192,94193,"L"],[94208,100343,"L"],[100352,101589,"L"],[101632,101640,"L"],[110576,110579,"L"],[110581,110587,"L"],[110589,110590,"L"],[110592,110882,"L"],[110898,110898,"L"],[110928,110930,"L"],[110933,110933,"L"],[110948,110951,"L"],[110960,111355,"L"],[113664,113770,"L"],[113776,113788,"L"],[113792,113800,"L"],[113808,113817,"L"],[113820,113820,"L"],[113821,113822,"NSM"],[113823,113823,"L"],[113824,113827,"BN"],[118528,118573,"NSM"],[118576,118598,"NSM"],[118608,118723,"L"],[118784,119029,"L"],[119040,119078,"L"],[119081,119142,"L"],[119143,119145,"NSM"],[119146,119154,"L"],[119155,119162,"BN"],[119163,119170,"NSM"],[119171,119172,"L"],[119173,119179,"NSM"],[119180,119209,"L"],[119210,119213,"NSM"],[119214,119272,"L"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119488,119507,"L"],[119520,119539,"L"],[119552,119638,"ON"],[119648,119672,"L"],[119808,119892,"L"],[119894,119964,"L"],[119966,119967,"L"],[119970,119970,"L"],[119973,119974,"L"],[119977,119980,"L"],[119982,119993,"L"],[119995,119995,"L"],[119997,120003,"L"],[120005,120069,"L"],[120071,120074,"L"],[120077,120084,"L"],[120086,120092,"L"],[120094,120121,"L"],[120123,120126,"L"],[120128,120132,"L"],[120134,120134,"L"],[120138,120144,"L"],[120146,120485,"L"],[120488,120538,"L"],[120539,120539,"ON"],[120540,120596,"L"],[120597,120597,"ON"],[120598,120654,"L"],[120655,120655,"ON"],[120656,120712,"L"],[120713,120713,"ON"],[120714,120770,"L"],[120771,120771,"ON"],[120772,120779,"L"],[120782,120831,"EN"],[120832,121343,"L"],[121344,121398,"NSM"],[121399,121402,"L"],[121403,121452,"NSM"],[121453,121460,"L"],[121461,121461,"NSM"],[121462,121475,"L"],[121476,121476,"NSM"],[121477,121483,"L"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122624,122654,"L"],[122661,122666,"L"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[122928,122989,"L"],[123023,123023,"NSM"],[123136,123180,"L"],[123184,123190,"NSM"],[123191,123197,"L"],[123200,123209,"L"],[123214,123215,"L"],[123536,123565,"L"],[123566,123566,"NSM"],[123584,123627,"L"],[123628,123631,"NSM"],[123632,123641,"L"],[123647,123647,"ET"],[124112,124139,"L"],[124140,124143,"NSM"],[124144,124153,"L"],[124896,124902,"L"],[124904,124907,"L"],[124909,124910,"L"],[124912,124926,"L"],[124928,125124,"R"],[125127,125135,"R"],[125136,125142,"NSM"],[125184,125251,"R"],[125252,125258,"NSM"],[125259,125259,"R"],[125264,125273,"R"],[125278,125279,"R"],[126065,126132,"AL"],[126209,126269,"AL"],[126464,126467,"AL"],[126469,126495,"AL"],[126497,126498,"AL"],[126500,126500,"AL"],[126503,126503,"AL"],[126505,126514,"AL"],[126516,126519,"AL"],[126521,126521,"AL"],[126523,126523,"AL"],[126530,126530,"AL"],[126535,126535,"AL"],[126537,126537,"AL"],[126539,126539,"AL"],[126541,126543,"AL"],[126545,126546,"AL"],[126548,126548,"AL"],[126551,126551,"AL"],[126553,126553,"AL"],[126555,126555,"AL"],[126557,126557,"AL"],[126559,126559,"AL"],[126561,126562,"AL"],[126564,126564,"AL"],[126567,126570,"AL"],[126572,126578,"AL"],[126580,126583,"AL"],[126585,126588,"AL"],[126590,126590,"AL"],[126592,126601,"AL"],[126603,126619,"AL"],[126625,126627,"AL"],[126629,126633,"AL"],[126635,126651,"AL"],[126704,126705,"ON"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127248,127278,"L"],[127279,127279,"ON"],[127280,127337,"L"],[127338,127343,"ON"],[127344,127404,"L"],[127405,127405,"ON"],[127462,127490,"L"],[127504,127547,"L"],[127552,127560,"L"],[127568,127569,"L"],[127584,127589,"ON"],[127744,128727,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128886,"ON"],[128891,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129201,"ON"],[129280,129619,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129672,"ON"],[129680,129725,"ON"],[129727,129733,"ON"],[129742,129755,"ON"],[129760,129768,"ON"],[129776,129784,"ON"],[129792,129938,"ON"],[129940,129994,"ON"],[130032,130041,"EN"],[131070,131071,"BN"],[131072,173791,"L"],[173824,177977,"L"],[177984,178205,"L"],[178208,183969,"L"],[183984,191456,"L"],[191472,192093,"L"],[194560,195101,"L"],[196606,196607,"BN"],[196608,201546,"L"],[201552,205743,"L"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918000,921599,"BN"],[983038,983039,"BN"],[983040,1048573,"L"],[1048574,1048575,"BN"],[1048576,1114109,"L"],[1114110,1114111,"BN"]],"joining_type_ranges":[[173,173,"T"],[768,879,"T"],[1155,1161,"T"],[1425,1469,"T"],[1471,1471,"T"],[1473,1474,"T"],[1476,1477,"T"],[1479,1479,"T"],[1552,1562,"T"],[1564,1564,"T"],[1568,1568,"D"],[1570,1573,"R"],[1574,1574,"D"],[1575,1575,"R"],[1576,1576,"D"],[1577,1577,"R"],[1578,1582,"D"],[1583,1586,"R"],[1587,1599,"D"],[1600,1600,"C"],[1601,1607,"D"],[1608,1608,"R"],[1609,1610,"D"],[1611,1631,"T"],[1646,1647,"D"],[1648,1648,"T"],[1649,1651,"R"],[1653,1655,"R"],[1656,1671,"D"],[1672,1689,"R"],[1690,1727,"D"],[1728,1728,"R"],[1729,1730,"D"],[1731,1739,"R"],[1740,1740,"D"],[1741,1741,"R"],[1742,1742,"D"],[1743,1743,"R"],[1744,1745,"D"],[1746,1747,"R"],[1749,1749,"R"],[1750,1756,"T"],[1759,1764,"T"],[1767,1768,"T"],[1770,1773,"T"],[1774,1775,"R"],[1786,1788,"D"],[1791,1791,"D"],[1807,1807,"T"],[1808,1808,"R"],[1809,1809,"T"],[1810,1812,"D"],[1813,1817,"R"],[1818,1821,"D"],[1822,1822,"R"],[1823,1831,"D"],[1832,1832,"R"],[1833,1833,"D"],[1834,1834,"R"],[1835,1835,"D"],[1836,1836,"R"],[1837,1838,"D"],[1839,1839,"R"],[1840,1866,"T"],[1869,1869,"R"],[1870,1880,"D"],[1881,1883,"R"],[1884,1898,"D"],[1899,1900,"R"],[1901,1904,"D"],[1905,1905,"R"],[1906,1906,"D"],[1907,1908,"R"],[1909,1911,"D"],[1912,1913,"R"],[1914,1919,"D"],[1958,1968,"T"],[1994,2026,"D"],[2027,2035,"T"],[2042,2042,"C"],[2045,2045,"T"],[2070,2073,"T"],[2075,2083,"T"],[2085,2087,"T"],[2089,2093,"T"],[2112,2112,"R"],[2113,2117,"D"],[2118,2119,"R"],[2120,2120,"D"],[2121,2121,"R"],[2122,2131,"D"],[2132,2132,"R"],[2133,2133,"D"],[2134,2136,"R"],[2137,2139,"T"],[2144,2144,"D"],[2146,2149,"D"],[2151,2151,"R"],[2152,2152,"D"],[2153,2154,"R"],[2160,2178,"R"],[2179,2181,"C"],[2182,2182,"D"],[2185,2189,"D"],[2190,2190,"R"],[2200,2207,"T"],[2208,2217,"D"],[2218,2220,"R"],[2222,2222,"R"],[2223,2224,"D"],[2225,2226,"R"],[2227,2232,"D"],[2233,2233,"R"],[2234,2248,"D"],[2250,2273,"T"],[2275,2306,"T"],[2362,2362,"T"],[2364,2364,"T"],[2369,2376,"T"],[2381,2381,"T"],[2385,2391,"T"],[2402,2403,"T"],[2433,2433,"T"],[2492,2492,"T"],[2497,2500,"T"],[2509,2509,"T"],[2530,2531,"T"],[2558,2558,"T"],[2561,2562,"T"],[2620,2620,"T"],[2625,2626,"T"],[2631,2632,"T"],[2635,2637,"T"],[2641,2641,"T"],[2672,2673,"T"],[2677,2677,"T"],[2689,2690,"T"],[2748,2748,"T"],[2753,2757,"T"],[2759,2760,"T"],[2765,2765,"T"],[2786,2787,"T"],[2810,2815,"T"],[2817,2817,"T"],[2876,2876,"T"],[2879,2879,"T"],[2881,2884,"T"],[2893,2893,"T"],[2901,2902,"T"],[2914,2915,"T"],[2946,2946,"T"],[3008,3008,"T"],[3021,3021,"T"],[3072,3072,"T"],[3076,3076,"T"],[3132,3132,"T"],[3134,3136,"T"],[3142,3144,"T"],[3146,3149,"T"],[3157,3158,"T"],[3170,3171,"T"],[3201,3201,"T"],[3260,3260,"T"],[3263,3263,"T"],[3270,3270,"T"],[3276,3277,"T"],[3298,3299,"T"],[3328,3329,"T"],[3387,3388,"T"],[3393,3396,"T"],[3405,3405,"T"],[3426,3427,"T"],[3457,3457,"T"],[3530,3530,"T"],[3538,3540,"T"],[3542,3542,"T"],[3633,3633,"T"],[3636,3642,"T"],[3655,3662,"T"],[3761,3761,"T"],[3764,3772,"T"],[3784,3790,"T"],[3864,3865,"T"],[3893,3893,"T"],[3895,3895,"T"],[3897,3897,"T"],[3953,3966,"T"],[3968,3972,"T"],[3974,3975,"T"],[3981,3991,"T"],[3993,4028,"T"],[4038,4038,"T"],[4141,4144,"T"],[4146,4151,"T"],[4153,4154,"T"],[4157,4158,"T"],[4184,4185,"T"],[4190,4192,"T"],[4209,4212,"T"],[4226,4226,"T"],[4229,4230,"T"],[4237,4237,"T"],[4253,4253,"T"],[4957,4959,"T"],[5906,5908,"T"],[5938,5939,"T"],[5970,5971,"T"],[6002,6003,"T"],[6068,6069,"T"],[6071,6077,"T"],[6086,6086,"T"],[6089,6099,"T"],[6109,6109,"T"],[6151,6151,"D"],[6154,6154,"C"],[6155,6157,"T"],[6159,6159,"T"],[6176,6264,"D"],[6277,6278,"T"],[6279,6312,"D"],[6313,6313,"T"],[6314,6314,"D"],[6432,6434,"T"],[6439,6440,"T"],[6450,6450,"T"],[6457,6459,"T"],[6679,6680,"T"],[6683,6683,"T"],[6742,6742,"T"],[6744,6750,"T"],[6752,6752,"T"],[6754,6754,"T"],[6757,6764,"T"],[6771,6780,"T"],[6783,6783,"T"],[6832,6862,"T"],[6912,6915,"T"],[6964,6964,"T"],[6966,6970,"T"],[6972,6972,"T"],[6978,6978,"T"],[7019,7027,"T"],[7040,7041,"T"],[7074,7077,"T"],[7080,7081,"T"],[7083,7085,"T"],[7142,7142,"T"],[7144,7145,"T"],[7149,7149,"T"],[7151,7153,"T"],[7212,7219,"T"],[7222,7223,"T"],[7376,7378,"T"],[7380,7392,"T"],[7394,7400,"T"],[7405,7405,"T"],[7412,7412,"T"],[7416,7417,"T"],[7616,7679,"T"],[8203,8203,"T"],[8205,8205,"C"],[8206,8207,"T"],[8234,8238,"T"],[8288,8292,"T"],[8298,8303,"T"],[8400,8432,"T"],[11503,11505,"T"],[11647,11647,"T"],[11744,11775,"T"],[12330,12333,"T"],[12441,12442,"T"],[42607,42610,"T"],[42612,42621,"T"],[42654,42655,"T"],[42736,42737,"T"],[43010,43010,"T"],[43014,43014,"T"],[43019,43019,"T"],[43045,43046,"T"],[43052,43052,"T"],[43072,43121,"D"],[43122,43122,"L"],[43204,43205,"T"],[43232,43249,"T"],[43263,43263,"T"],[43302,43309,"T"],[43335,43345,"T"],[43392,43394,"T"],[43443,43443,"T"],[43446,43449,"T"],[43452,43453,"T"],[43493,43493,"T"],[43561,43566,"T"],[43569,43570,"T"],[43573,43574,"T"],[43587,43587,"T"],[43596,43596,"T"],[43644,43644,"T"],[43696,43696,"T"],[43698,43700,"T"],[43703,43704,"T"],[43710,43711,"T"],[43713,43713,"T"],[43756,43757,"T"],[43766,43766,"T"],[44005,44005,"T"],[44008,44008,"T"],[44013,44013,"T"],[64286,64286,"T"],[65024,65039,"T"],[65056,65071,"T"],[65279,65279,"T"],[65529,65531,"T"],[66045,66045,"T"],[66272,66272,"T"],[66422,66426,"T"],[68097,68099,"T"],[68101,68102,"T"],[68108,68111,"T"],[68152,68154,"T"],[68159,68159,"T"],[68288,68292,"D"],[68293,68293,"R"],[68295,68295,"R"],[68297,68298,"R"],[68301,68301,"L"],[68302,68306,"R"],[68307,68310,"D"],[68311,68311,"L"],[68312,68316,"D"],[68317,68317,"R"],[68318,68320,"D"],[68321,68321,"R"],[68324,68324,"R"],[68325,68326,"T"],[68331,68334,"D"],[68335,68335,"R"],[68480,68480,"D"],[68481,68481,"R"],[68482,68482,"D"],[68483,68485,"R"],[68486,68488,"D"],[68489,68489,"R"],[68490,68491,"D"],[68492,68492,"R"],[68493,68493,"D"],[68494,68495,"R"],[68496,68496,"D"],[68497,68497,"R"],[68521,68524,"R"],[68525,68526,"D"],[68864,68864,"L"],[68865,68897,"D"],[68898,68898,"R"],[68899,68899,"D"],[68900,68903,"T"],[69291,69292,"T"],[69373,69375,"T"],[69424,69426,"D"],[69427,69427,"R"],[69428,69444,"D"],[69446,69456,"T"],[69457,69459,"D"],[69460,69460,"R"],[69488,69491,"D"],[69492,69493,"R"],[69494,69505,"D"],[69506,69509,"T"],[69552,69552,"D"],[69554,69555,"D"],[69556,69558,"R"],[69560,69560,"D"],[69561,69562,"R"],[69563,69564,"D"],[69565,69565,"R"],[69566,69567,"D"],[69569,69569,"D"],[69570,69571,"R"],[69572,69572,"D"],[69577,69577,"R"],[69578,69578,"D"],[69579,69579,"L"],[69633,69633,"T"],[69688,69702,"T"],[69744,69744,"T"],[69747,69748,"T"],[69759,69761,"T"],[69811,69814,"T"],[69817,69818,"T"],[69826,69826,"T"],[69888,69890,"T"],[69927,69931,"T"],[69933,69940,"T"],[70003,70003,"T"],[70016,70017,"T"],[70070,70078,"T"],[70089,70092,"T"],[70095,70095,"T"],[70191,70193,"T"],[70196,70196,"T"],[70198,70199,"T"],[70206,70206,"T"],[70209,70209,"T"],[70367,70367,"T"],[70371,70378,"T"],[70400,70401,"T"],[70459,70460,"T"],[70464,70464,"T"],[70502,70508,"T"],[70512,70516,"T"],[70712,70719,"T"],[70722,70724,"T"],[70726,70726,"T"],[70750,70750,"T"],[70835,70840,"T"],[70842,70842,"T"],[70847,70848,"T"],[70850,70851,"T"],[71090,71093,"T"],[71100,71101,"T"],[71103,71104,"T"],[71132,71133,"T"],[71219,71226,"T"],[71229,71229,"T"],[71231,71232,"T"],[71339,71339,"T"],[71341,71341,"T"],[71344,71349,"T"],[71351,71351,"T"],[71453,71455,"T"],[71458,71461,"T"],[71463,71467,"T"],[71727,71735,"T"],[71737,71738,"T"],[71995,71996,"T"],[71998,71998,"T"],[72003,72003,"T"],[72148,72151,"T"],[72154,72155,"T"],[72160,72160,"T"],[72193,72202,"T"],[72243,72248,"T"],[72251,72254,"T"],[72263,72263,"T"],[72273,72278,"T"],[72281,72283,"T"],[72330,72342,"T"],[72344,72345,"T"],[72752,72758,"T"],[72760,72765,"T"],[72767,72767,"T"],[72850,72871,"T"],[72874,72880,"T"],[72882,72883,"T"],[72885,72886,"T"],[73009,73014,"T"],[73018,73018,"T"],[73020,73021,"T"],[73023,73029,"T"],[73031,73031,"T"],[73104,73105,"T"],[73109,73109,"T"],[73111,73111,"T"],[73459,73460,"T"],[73472,73473,"T"],[73526,73530,"T"],[73536,73536,"T"],[73538,73538,"T"],[78896,78912,"T"],[78919,78933,"T"],[92912,92916,"T"],[92976,92982,"T"],[94031,94031,"T"],[94095,94098,"T"],[94180,94180,"T"],[113821,113822,"T"],[113824,113827,"T"],[118528,118573,"T"],[118576,118598,"T"],[119143,119145,"T"],[119155,119170,"T"],[119173,119179,"T"],[119210,119213,"T"],[119362,119364,"T"],[121344,121398,"T"],[121403,121452,"T"],[121461,121461,"T"],[121476,121476,"T"],[121499,121503,"T"],[121505,121519,"T"],[122880,122886,"T"],[122888,122904,"T"],[122907,122913,"T"],[122915,122916,"T"],[122918,122922,"T"],[123023,123023,"T"],[123184,123190,"T"],[123566,123566,"T"],[123628,123631,"T"],[124140,124143,"T"],[125136,125142,"T"],[125184,125251,"D"],[125252,125259,"T"],[917505,917505,"T"],[917536,917631,"T"],[917760,917999,"T"]]} \ No newline at end of file diff --git a/node_modules/idn-hostname/index.d.ts b/node_modules/idn-hostname/index.d.ts deleted file mode 100644 index 40a73f57..00000000 --- a/node_modules/idn-hostname/index.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import punycode = require('punycode/'); - -/** - * Validate a hostname. Returns true or throws a detailed error. - * - * @throws {SyntaxError} - */ -declare function isIdnHostname(hostname: string): true; - -/** - * Returns the ACE hostname or throws a detailed error (it also validates the input) - * - * @throws {SyntaxError} - */ -declare function idnHostname(hostname: string): string; - -/** - * Returns the uts46 mapped label (not hostname) or throws an error if the label - * has dissallowed or unassigned chars. - * - * @throws {SyntaxError} - */ -declare function uts46map(label: string): string; - -declare const IdnHostname: { - isIdnHostname: typeof isIdnHostname; - idnHostname: typeof idnHostname; - uts46map: typeof uts46map; - punycode: typeof punycode; -}; - -export = IdnHostname; diff --git a/node_modules/idn-hostname/index.js b/node_modules/idn-hostname/index.js deleted file mode 100644 index fbedd84e..00000000 --- a/node_modules/idn-hostname/index.js +++ /dev/null @@ -1,172 +0,0 @@ -'use strict'; -// IDNA2008 validator using idnaMappingTableCompact.json -const punycode = require('punycode/'); -const { props, viramas, ranges, mappings, bidi_ranges, joining_type_ranges } = require('./idnaMappingTableCompact.json'); -// --- Error classes (short messages; RFC refs included in message) --- -const throwIdnaContextJError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaContextJError" }); }; -const throwIdnaContextOError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaContextOError" }); }; -const throwIdnaUnicodeError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaUnicodeError" }); }; -const throwIdnaLengthError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaLengthError" }); }; -const throwIdnaSyntaxError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaSyntaxError" }); }; -const throwPunycodeError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "PunycodeError" }); }; -const throwIdnaBidiError = (msg) => { throw Object.assign(new SyntaxError(msg), { name: "IdnaBidiError" }); }; -// --- constants --- -const ZWNJ = 0x200c; -const ZWJ = 0x200d; -const MIDDLE_DOT = 0x00b7; -const GREEK_KERAIA = 0x0375; -const KATAKANA_MIDDLE_DOT = 0x30fb; -const HEBREW_GERESH = 0x05f3; -const HEBREW_GERSHAYIM = 0x05f4; -// Viramas (used for special ZWJ/ZWNJ acceptance) -const VIRAMAS = new Set(viramas); -// binary range lookup -function getRange(range, key) { - if (!Array.isArray(range) || range.length === 0) return null; - let lb = 0; - let ub = range.length - 1; - while (lb <= ub) { - const mid = (lb + ub) >> 1; - const r = range[mid]; - if (key < r[0]) ub = mid - 1; - else if (key > r[1]) lb = mid + 1; - else return r[2]; - } - return null; -} -// mapping label (disallowed chars were removed from ranges, so undefined means disallowed or unassigned) -function uts46map(label) { - const mappedCps = []; - for (let i = 0; i < label.length; ) { - const cp = label.codePointAt(i); - const prop = props[getRange(ranges, cp)]; - const maps = mappings[String(cp)]; - // mapping cases - if (prop === 'mapped' && Array.isArray(maps) && maps.length) { - for (const mcp of maps) mappedCps.push(mcp); - } else if (prop === 'valid' || prop === 'deviation') { - mappedCps.push(cp); - } else if (prop === 'ignored') { - // drop - } else { - throwIdnaUnicodeError(`${cpHex(cp)} is disallowed in hostname (RFC 5892, UTS #46).`); - } - i += cp > 0xffff ? 2 : 1; - } - // mapped → label - return String.fromCodePoint(...mappedCps); -} -// --- helpers --- -function cpHex(cp) { - return `char '${String.fromCodePoint(cp)}' ` + JSON.stringify('(U+' + cp.toString(16).toUpperCase().padStart(4, '0') + ')'); -} -// main validator -function isIdnHostname(hostname) { - // basic hostname checks - if (typeof hostname !== 'string') throwIdnaSyntaxError('Label must be a string (RFC 5890 §2.3.2.3).'); - // split hostname in labels by the separators defined in uts#46 §2.3 - const rawLabels = hostname.split(/[\x2E\uFF0E\u3002\uFF61]/); - if (rawLabels.some((label) => label.length === 0)) throwIdnaLengthError('Label cannot be empty (consecutive or leading/trailing dot) (RFC 5890 §2.3.2.3).'); - // checks per label (IDNA is defined for labels, not for parts of them and not for complete domain names. RFC 5890 §2.3.2.1) - let aceHostnameLength = 0; - for (const rawLabel of rawLabels) { - // ACE label (xn--) validation: decode and re-encode must match - let label = rawLabel; - if (/^xn--/i.test(rawLabel)) { - if (/[^\p{ASCII}]/u.test(rawLabel)) throwIdnaSyntaxError(`A-label '${rawLabel}' cannot contain non-ASCII character(s) (RFC 5890 §2.3.2.1).`); - const aceBody = rawLabel.slice(4); - try { - label = punycode.decode(aceBody); - } catch (e) { - throwPunycodeError(`Invalid ASCII Compatible Encoding (ACE) of label '${rawLabel}' (RFC 5891 §4.4 → RFC 3492).`); - } - if (!/[^\p{ASCII}]/u.test(label)) throwIdnaSyntaxError(`decoded A-label '${rawLabel}' result U-label '${label}' cannot be empty or all-ASCII character(s) (RFC 5890 §2.3.2.1).`); - if (punycode.encode(label) !== aceBody) throwPunycodeError(`Re-encode mismatch for ASCII Compatible Encoding (ACE) label '${rawLabel}' (RFC 5891 §4.4 → RFC 3492).`); - } - // mapping phase (here because decoded A-label may contain disallowed chars) - label = uts46map(label).normalize('NFC'); - // final ACE label lenght accounting - let aceLabel; - try { - aceLabel = /[^\p{ASCII}]/u.test(label) ? punycode.toASCII(label) : label; - } catch (e) { - throwPunycodeError(`ASCII conversion failed for '${label}' (RFC 3492).`); - } - if (aceLabel.length > 63) throwIdnaLengthError('Final ASCII Compatible Encoding (ACE) label cannot exceed 63 bytes (RFC 5890 §2.3.2.1).'); - aceHostnameLength += aceLabel.length + 1; - // hyphen rules (the other one is covered by bidi) - if (/^-|-$/.test(label)) throwIdnaSyntaxError('Label cannot begin or end with hyphen-minus (RFC 5891 §4.2.3.1).'); - if (label.indexOf('--') === 2) throwIdnaSyntaxError('Label cannot contain consecutive hyphen-minus in the 3rd and 4th positions (RFC 5891 §4.2.3.1).'); - // leading combining marks check (some are not covered by bidi) - if (/^\p{M}$/u.test(String.fromCodePoint(label.codePointAt(0)))) throwIdnaSyntaxError(`Label cannot begin with combining/enclosing mark ${cpHex(label.codePointAt(0))} (RFC 5891 §4.2.3.2).`); - // spread cps for context and bidi checks - const cps = Array.from(label).map((char) => char.codePointAt(0)); - let joinTypes = ''; - let digits = ''; - let bidiClasses = []; - // per-codepoint contextual checks - for (let j = 0; j < cps.length; j++) { - const cp = cps[j]; - // check ContextJ ZWNJ (uses joining types and virama rule) - if (cps.includes(ZWNJ)) { - joinTypes += VIRAMAS.has(cp) ? 'V' : cp === ZWNJ ? 'Z' : getRange(joining_type_ranges, cp) || 'U'; - if (j === cps.length - 1 && /(?![LD][T]*)(?= 0x0660 && cp <= 0x0669) || (cp >= 0x06f0 && cp <= 0x06f9)) digits += (cp < 0x06f0 ? 'a' : 'e' ); - if (j === cps.length - 1 && /^(?=.*a)(?=.*e).*$/.test(digits)) throwIdnaContextOError('Arabic-Indic digits cannot be mixed with Extended Arabic-Indic digits (RFC 5892 Appendix A.8/A.9).'); - // validate bidi - bidiClasses.push(getRange(bidi_ranges, cp)); - if (j === cps.length - 1 && (bidiClasses.includes('R') || bidiClasses.includes('AL'))) { - // order of chars in label (RFC 5890 §2.3.3) - if (bidiClasses[0] === 'R' || bidiClasses[0] === 'AL') { - for (let cls of bidiClasses) if (!['R', 'AL', 'AN', 'EN', 'ET', 'ES', 'CS', 'ON', 'BN', 'NSM'].includes(cls)) throwIdnaBidiError(`'${label}' breaks rule #2: Only R, AL, AN, EN, ET, ES, CS, ON, BN, NSM allowed in label (RFC 5893 §2.2)`); - if (!/(R|AL|EN|AN)(NSM)*$/.test(bidiClasses.join(''))) throwIdnaBidiError(`'${label}' breaks rule #3: label must end with R, AL, EN, or AN, followed by zero or more NSM (RFC 5893 §2.3)`); - if (bidiClasses.includes('EN') && bidiClasses.includes('AN')) throwIdnaBidiError(`'${label}' breaks rule #4: EN and AN cannot be mixed in the same label (RFC 5893 §2.4)`); - } else if (bidiClasses[0] === 'L') { - for (let cls of bidiClasses) if (!['L', 'EN', 'ET', 'ES', 'CS', 'ON', 'BN', 'NSM'].includes(cls)) throwIdnaBidiError(`'${label}' breaks rule #5: Only L, EN, ET, ES, CS, ON, BN, NSM allowed in label (RFC 5893 §2.5)`); - if (!/(L|EN)(NSM)*$/.test(bidiClasses.join(''))) throwIdnaBidiError(`'${label}' breaks rule #6: label must end with L or EN, followed by zero or more NSM (RFC 5893 §2.6)`); - } else { - throwIdnaBidiError(`'${label}' breaks rule #1: label must start with L or R or AL (RFC 5893 §2.1)`); - } - } - } - } - if (aceHostnameLength - 1 > 253) throwIdnaLengthError('Final ASCII Compatible Encoding (ACE) hostname cannot exceed 253 bytes (RFC 5890 → RFC 1034 §3.1).'); - return true; -} -// return ACE hostname if valid -const idnHostname = (string) => - isIdnHostname(string) && - punycode.toASCII( - string - .split('.') - .map((label) => uts46map(label).normalize('NFC')) - .join('.') - ); -// export -module.exports = { isIdnHostname, idnHostname, uts46map, punycode }; diff --git a/node_modules/idn-hostname/package.json b/node_modules/idn-hostname/package.json deleted file mode 100644 index 6d55ee34..00000000 --- a/node_modules/idn-hostname/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "idn-hostname", - "version": "15.1.8", - "description": "An internationalized hostname validator as defined by RFC5890, RFC5891, RFC5892, RFC5893, RFC3492 and UTS#46", - "keywords": [ - "idn-hostname", - "idna", - "validation", - "unicode", - "mapping" - ], - "homepage": "https://github.com/SorinGFS/idn-hostname#readme", - "bugs": { - "url": "https://github.com/SorinGFS/idn-hostname/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/SorinGFS/idn-hostname.git" - }, - "license": "MIT", - "author": "SorinGFS", - "type": "commonjs", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "dependencies": { - "punycode": "^2.3.1" - }, - "devDependencies": { - "@types/punycode": "^2.1.4" - } -} diff --git a/node_modules/idn-hostname/readme.md b/node_modules/idn-hostname/readme.md deleted file mode 100644 index 7634e087..00000000 --- a/node_modules/idn-hostname/readme.md +++ /dev/null @@ -1,302 +0,0 @@ ---- - -title: IDN Hostname - -description: A validator for Internationalized Domain Names (`IDNA`) in conformance with the current standards. - ---- - -## Overview - -This is a validator for Internationalized Domain Names (`IDNA`) in conformance with the current standards (`RFC 5890 - 5891 - 5892 - 5893 - 3492`) and the current adoption level of Unicode (`UTS#46`) in javascript (`15.1.0`). - -**Browser/Engine Support:** Modern browsers (Chrome, Firefox, Safari, Edge) and Node.js (v18+). - -This document explains, in plain terms, what this validator does, which RFC/UTS rules it enforces, what it intentionally **does not** check, and gives some relevant examples so you can see how hostnames are classified. - -The data source for the validator is a `json` constructed as follows: - -- Baseline = Unicode `IdnaMappingTable` with allowed chars (based on props: valid/mapped/deviation/ignored/disallowed). -- Viramas = Unicode `DerivedCombiningClass` with `viramas`(Canonical_Combining_Class=Virama). -- Overlay 1 = Unicode `IdnaMappingTable` for mappings applied on top of the baseline. -- Overlay 2 = Unicode `DerivedJoinTypes` for join types (D,L,R,T,U) applied on top of the baseline. -- Overlay 3 = Unicode `DerivedBidiClass` for bidi classes (L,R,AL,NSM,EN,ES,ET,AN,CS,BN,B,S,WS,ON) applied on top of the baseline. - -## Usage - -**Install:** -```js title="js" -npm i idn-hostname -``` - -**Import the idn-hostname validator:** -```js title="js" -const { isIdnHostname } = require('idn-hostname'); -// the validator is returning true or detailed error -try { - if ( isIdnHostname('abc')) console.log(true); -} catch (error) { - console.log(error.message); -} -``` - -**Import the idn-hostname ACE converter:** -```js title="js" -const { idnHostname } = require('idn-hostname'); -// the idnHostname is returning the ACE hostname or detailed error (it also validates the input) -try { - const idna = idnHostname('abc'); -} catch (error) { - console.log(error.message); -} -``` - -**Import the punycode converter (convenient exposure of punycode functions):** -```js title="js" -const { idnHostname, punycode } = require('idn-hostname'); -// get the unicode version of an ACE hostname or detailed error -try { - const uLabel = punycode.toUnicode(idnHostname('abc')); - // or simply use the punycode API for some needs -} catch (error) { - console.log(error.message); -} -``` - -**Import the UTS46 mapping function:** -```js title="js" -const { uts46map } = require('idn-hostname'); -// the uts46map is returning the uts46 mapped label (not hostname) or an error if label has dissallowed or unassigned chars -try { - const label = uts46map('abc').normalize('NFC'); -} catch (error) { - console.log(error.message); -} -``` - -## Versioning - -Each release will have its `major` and `minor` version identical with the related `unicode` version, and the `minor` version variable. No `major` or `minor` (structural) changes are expected other than a `unicode` version based updated `json` data source. - -## What does (point-by-point) - -1. **Baseline data**: uses the Unicode `IdnaMappingTable` (RFC 5892 / Unicode UCD) decoded into per-code-point classes (PVALID, DISALLOWED, CONTEXTJ, CONTEXTO, UNASSIGNED). - - - Reference: RFC 5892 (IDNA Mapping Table derived from Unicode). - -2. **UTS#46 overlay**: applies UTS#46 statuses/mappings on top of the baseline. Where `UTS#46` marks a code point as `valid`, `mapped`, `deviation`, `ignored` or `disallowed`, those override the baseline for that codepoint. Mappings from `UTS#46` are stored in the `mappings` layer. - - - Reference: `UTS#46` (Unicode IDNA Compatibility Processing). - -3. **Join Types overlay**: uses the Unicode `DerivedJoinTypes` to apply char join types on top of the baseline. Mappings from Join Types are stored in the `joining_type_ranges` layer. - - - Reference: `RFC 5892` (The Unicode Code Points and IDNA). - -4. **BIDI overlay**: uses the Unicode `DerivedBidiClass` to apply BIDI derived classes on top of the baseline. Mappings from BIDI are stored in the `bidi_ranges` layer. - - - Reference: `RFC 5893` (Right-to-Left Scripts for IDNA). - -5. **Compact four-layer data source**: the script uses a compact JSON (`idnaMappingTableCompact.json`) merged from three data sources with: - - - `props` — list of property names (`valid`,`mapped`,`deviation`,`ignored`,`disallowed`), - - `viramas` — list of `virama` codepoints (Canonical_Combining_Class=Virama), - - `ranges` — merged contiguous ranges with a property index, - - `mappings` — map from code point → sequence of code points (for `mapped`/`deviation`), - - `joining_type_ranges` — merged contiguous ranges with a property index. - - `bidi_ranges` — merged contiguous ranges with a property index. - -6. **Mapping phase (at validation time)**: - - - For each input label the validator: - 1. Splits the hostname into labels (by `.` or alternate label separators). Empty labels are rejected. - 2. For each label, maps codepoints according to `mappings` (`valid` and `deviation` are passed as they are, `mapped` are replaced with the corresponding codepoints, `ignored` are ignored, any other chars are triggering `IdnaUnicodeError`). - 3. Normalizes the resulting mapped label with NFC. - 4. Checks length limits (label ≤ 63, full name ≤ 253 octets after ASCII punycode conversion). - 5. Validates label-level rules (leading combining/enclosing marks forbidden, hyphen rules, ACE/punycode re-encode correctness). - 6. Spreads each label into code points for contextual and bidi checks. - 7. Performs contextual checks (CONTEXTJ, CONTEXTO) using the `joining_type_ranges` from compact table (e.g. virama handling for ZWJ/ZWNJ, Catalan middle dot rule, Hebrew geresh/gershayim rule, Katakana middle dot contextual rule, Arabic digit mixing rule). - 8. Checks Bidi rules using the `bidi_ranges` from compact table. - - See the sections below for exact checks and RFC references. - -7. **Punycode / ACE checking**: - - - If a label starts with the ACE prefix `xn--`, the validator will decode the ACE part (using punycode), verify decoding succeeds, and re-encode to verify idempotency (the encoded value must match the original ACE, case-insensitive). - - If punycode decode or re-encode fails, the label is rejected. - - Reference: RFC 5890 §2.3.2.1, RFC 3492 (Punycode). - -8. **Leading/trailing/compressed-hyphens**: - - - Labels cannot start or end with `-` (LDH rule). - - ACE/punycode special rule: labels containing `--` at positions 3–4 (that’s the ACE indicator) and not starting with `xn` are invalid (RFC 5891 §4.2) - -9. **Combining/enclosing marks**: - - - A label may not start with General Category `M` — i.e. combining or enclosing mark at the start of a label is rejected. (RFC 5891 §4.2.3.2) - -10. **Contextual checks (exhaustive requirements from RFC 5892 A.1-A.9 appendices)**: - - - ZWNJ / ZWJ: allowed in context only (CONTEXTJ) (Appendix A.1/A.2, RFC 5892 and PR-37). Implemented checks: - - ZWJ/ZWNJ allowed without other contextual condition if preceded by a virama (a diacritic mark used in many Indic scripts to suppress the inherent vowel that normally follows a consonant). - - ZWNJ (if not preceded by virama) allowed only if joining context matches the RFC rules. - - Middle dot (U+00B7): allowed only between two `l` / `L` (Catalan rule). (RFC 5891 §4.2.3.3; RFC 5892 Appendix A.3) - - Greek keraia (U+0375): must be followed by a Greek letter. (RFC 5892 Appendix A.4) - - Hebrew geresh/gershayim (U+05F3 / U+05F4): must follow a Hebrew letter. (RFC 5892 Appendix A.5/A.6) - - Katakana middle dot (U+30FB): allowed if the label contains at least one character in Hiragana/Katakana/Han. (RFC 5892 Appendix A.7) - - Arabic/Extended Arabic digits: the mix of Arabic-Indic digits (U+0660–U+0669) with Extended Arabic-Indic digits (U+06F0–U+06F9) within the same label is not allowed. (RFC 5892 Appendix A.8/A.9) - -11. **Bidi enforcement**: - - - In the Unicode Bidirectional Algorithm (BiDi), characters are assigned to bidirectional classes that determine their behavior in mixed-direction text. These classes are used by the algorithm to resolve the order of characters. If given input is breaking one of the six Bidi rules the label is rejected. (RFC 5893) - -12. **Total and per-label length**: - - - Total ASCII length (after ASCII conversion of non-ASCII labels) must be ≤ 253 octets. (RFC 5890, RFC 3492) - -13. **Failure handling**: - - - The validator throws short errors (single-line, named exceptions) at the first fatal violation encountered (the smallest error ends the function). Each thrown error includes the RFC/UTS rule reference in its message. - -## What does _not_ do - -- This validator does not support `context` or `locale` specific [Special Casing](https://www.unicode.org/Public/16.0.0/ucd/SpecialCasing.txt) mappings. For such needs some sort of `mapping` must be done before using this validator. -- This validator does not support `UTS#46 useTransitional` backward compatibility flag. -- This validator does not support `UTS#46 STD3 ASCII rules`, when required they can be enforced on separate layer. -- This validator does not attempt to resolve or query DNS — it only validates label syntax/mapping/contextual/bidi rules. - -## Examples - -### PASS examples - -```yaml title="yaml" - - hostname: "a" # single char label - - hostname: "a⁠b" # contains WORD JOINER (U+2060), ignored in IDNA table - - hostname: "example" # multi char label - - hostname: "host123" # label with digits - - hostname: "test-domain" # label with hyphen-minus - - hostname: "my-site123" # label with hyphen-minus and digits - - hostname: "sub.domain" # multi-label - - hostname: "mañana" # contains U+00F1 - - hostname: "xn--maana-pta" # ACE for mañana - - hostname: "bücher" # contains U+00FC - - hostname: "xn--bcher-kva" # ACE for bücher - - hostname: "café" # contains U+00E9 - - hostname: "xn--caf-dma" # ACE for café - - hostname: "straße" # German sharp s; allowed via exceptions - - hostname: "façade" # French ç - - hostname: "élève" # French é and è - - hostname: "Γειά" # Greek - - hostname: "åland" # Swedish å - - hostname: "naïve" # Swedish ï - - hostname: "smörgåsbord" # Swedish ö - - hostname: "пример" # Cyrillic - - hostname: "пример.рф" # multi-label Cyrillic - - hostname: "xn--d1acpjx3f.xn--p1ai" # ACE for Cyrillic - - hostname: "مثال" # Arabic - - hostname: "דוגמה" # Hebrew - - hostname: "예시" # Korean Hangul - - hostname: "ひらがな" # Japanese Hiragana - - hostname: "カタカナ" # Japanese Katakana - - hostname: "例.例" # multi-label Japanese Katakana - - hostname: "例子" # Chinese Han - - hostname: "สาธิต" # Thai - - hostname: "ຕົວຢ່າງ" # Lao - - hostname: "उदाहरण" # Devanagari - - hostname: "क्‍ष" # Devanagari with Virama + ZWJ - - hostname: "क्‌ष" # Devanagari with Virama + ZWNJ - - hostname: "l·l" # Catalan middle dot between 'l' (U+00B7) - - hostname: "L·l" # Catalan middle dot between mixed case 'l' chars - - hostname: "L·L" # Catalan middle dot between 'L' (U+004C) - - hostname: "( "a".repeat(63) ) " # 63 'a's (label length OK) -``` - -### FAIL examples - -```yaml title="yaml" - - hostname: "" # empty hostname - - hostname: "-abc" # leading hyphen forbidden (LDH) - - hostname: "abc-" # trailing hyphen forbidden (LDH) - - hostname: "a b" # contains space - - hostname: "a b" # contains control/tab - - hostname: "a@b" # '@' - - hostname: ".abc" # leading dot → empty label - - hostname: "abc." # trailing dot → empty label (unless FQDN handling expects trailing dot) - - hostname: "a..b" # empty label between dots - - hostname: "a.b..c" # empty label between dots - - hostname: "a#b" # illegal char '#' - - hostname: "a$b" # illegal char '$' - - hostname: "abc/def" # contains slash - - hostname: "a\b" # contains backslash - - hostname: "a%b" # contains percent sign - - hostname: "a^b" # contains caret - - hostname: "a*b" # contains asterisk - - hostname: "a(b)c" # contains parentheses - - hostname: "a=b" # contains equal sign - - hostname: "a+b" # contains plus sign - - hostname: "a,b" # contains comma - - hostname: "a@b" # contains '@' - - hostname: "a;b" # contains semicolon - - hostname: "\n" # contains newline - - hostname: "·" # middle-dot without neighbors - - hostname: "a·" # middle-dot at end - - hostname: "·a" # middle-dot at start - - hostname: "a·l" # middle dot not between two 'l' (Catalan rule) - - hostname: "l·a" # middle dot not between two 'l' - - hostname: "α͵" # Greek keraia not followed by Greek - - hostname: "α͵S" # Greek keraia followed by non-Greek - - hostname: "٠۰" # Arabic-Indic & Extended Arabic-Indic digits mixed - - hostname: ( "a".repeat(64) ) # label length > 63 - - hostname: "￿" # noncharacter (U+FFFF) disallowed in IDNA table - - hostname: "a‌" # contains ZWNJ (U+200C) at end (contextual rules fail) - - hostname: "a‍" # contains ZWJ (U+200D) at end (contextual rules fail) - - hostname: "̀hello" # begins with combining mark (U+0300) - - hostname: "҈hello" # begins with enclosing mark (U+0488) - - hostname: "실〮례" # contains HANGUL SINGLE DOT TONE MARK (U+302E) - - hostname: "control\x01char" # contains control character - - hostname: "abc\u202Edef" # bidi formatting codepoint, disallowed in IDNA table - - hostname: "́" # contains combining mark (U+0301) - - hostname: "؜" # contains Arabic control (control U+061C) - - hostname: "۝" # Arabic end of ayah (control U+06DD) - - hostname: "〯" # Hangul double-dot (U+302F), disallowed in IDNA table - - hostname: "a￰b" # contains noncharacter (U+FFF0) in the middle - - hostname: "emoji😀" # emoji (U+1F600), disallowed in IDNA table - - hostname: "label\uD800" # contains high surrogate on its own - - hostname: "\uDC00label" # contains low surrogate on its own - - hostname: "a‎" # contains left-to-right mark (control formatting) - - hostname: "a‏" # contains right-to-left mark (control formatting) - - hostname: "xn--" # ACE prefix without payload - - hostname: "xn---" # triple hyphen-minus (extra '-') in ACE - - hostname: "xn---abc" # triple hyphen-minus followed by chars - - hostname: "xn--aa--bb" # ACE payload having hyphen-minus in the third and fourth position - - hostname: "xn--xn--double" # ACE payload that is also ACE - - hostname: "xn--X" # invalid punycode (decode fails) - - hostname: "xn--abcナ" # ACE containing non-ASCII char - - hostname: "xn--abc\x00" # ACE containing control/NUL - - hostname: "xn--abc\uFFFF" # ACE containing noncharacter -``` - -:::note - -Far from being exhaustive, the examples are illustrative and chosen to demonstrate rule coverage. Also: -- some of the characters are invisible, -- some unicode codepoints that cannot be represented in `yaml` (those having `\uXXXX`) should be considered as `json`. - -::: - -**References (specs)** - -- `RFC 5890` — Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework. -- `RFC 5891` — IDNA2008: Protocol and Implementation (label rules, contextual rules, ACE considerations). -- `RFC 5892` — IDNA Mapping Table (derived from Unicode). -- `RFC 5893` — Right-to-left Scripts: Bidirectional text handling for domain names. -- `RFC 3492` — Punycode (ACE / punycode algorithm). -- `UTS #46` — Unicode IDNA Compatibility Processing (mappings / deviations / transitional handling). - -:::info - -Links are intentionally not embedded here — use the RFC/UTS numbers to fetch authoritative copies on ietf.org and unicode.org. - -::: - -## Disclaimer - -Some hostnames above are language or script-specific examples — they are provided to exercise the mapping/context rules, not to endorse any particular registration practice. Also, there should be no expectation that results validated by this validator will be automatically accepted by registrants, they may apply their own additional rules on top of those defined by IDNA. diff --git a/node_modules/json-stringify-deterministic/LICENSE.md b/node_modules/json-stringify-deterministic/LICENSE.md deleted file mode 100644 index 6fdd0d27..00000000 --- a/node_modules/json-stringify-deterministic/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright © 2016 Kiko Beats (https://github.com/Kikobeats) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/json-stringify-deterministic/README.md b/node_modules/json-stringify-deterministic/README.md deleted file mode 100644 index aca277dc..00000000 --- a/node_modules/json-stringify-deterministic/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# json-stringify-deterministic - -![Last version](https://img.shields.io/github/tag/Kikobeats/json-stringify-deterministic.svg?style=flat-square) -[![Coverage Status](https://img.shields.io/coveralls/Kikobeats/json-stringify-deterministic.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/json-stringify-deterministic) -[![NPM Status](https://img.shields.io/npm/dm/json-stringify-deterministic.svg?style=flat-square)](https://www.npmjs.org/package/json-stringify-deterministic) - -> Deterministic version of `JSON.stringify()`, so you can get a consistent hash from stringified results. - -Similar to [json-stable-stringify](https://github.com/substack/json-stable-stringify) *but*: - -- No Dependencies. Minimal as possible. -- Better cycles detection. -- Support serialization for object without `.toJSON` (such as `RegExp`). -- Provides built-in TypeScript declarations. - -## Install - -```bash -npm install json-stringify-deterministic --save -``` - -## Usage - -```js -const stringify = require('json-stringify-deterministic') -const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 } - -console.log(stringify(obj)) -// => {"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} -``` - -## API - -### stringify(<obj>, [opts]) - -#### obj - -*Required*
-Type: `object` - -The input `object` to be serialized. - -#### opts - -##### opts.stringify - -Type: `function` -Default: `JSON.stringify` - -Determinate how to stringify primitives values. - -##### opts.cycles - -Type: `boolean` -Default: `false` - -Determinate how to resolve cycles. - -Under `true`, when a cycle is detected, `[Circular]` will be inserted in the node. - -##### opts.compare - -Type: `function` - -Custom comparison function for object keys. - -Your function `opts.compare` is called with these parameters: - -``` js -opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) -``` - -For example, to sort on the object key names in reverse order you could write: - -``` js -const stringify = require('json-stringify-deterministic') - -const obj = { c: 8, b: [{z: 6,y: 5,x: 4}, 7], a: 3 } -const objSerializer = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1 -}) - -console.log(objSerializer) -// => {"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} -``` - -Or if you wanted to sort on the object values in reverse order, you could write: - -```js -const stringify = require('json-stringify-deterministic') - -const obj = { d: 6, c: 5, b: [{ z: 3, y: 2, x: 1 }, 9], a: 10 } -const objtSerializer = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1 -}) - -console.log(objtSerializer) -// => {"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} -``` - -##### opts.space - -Type: `string`
-Default: `''` - -If you specify `opts.space`, it will indent the output for pretty-printing. - -Valid values are strings (e.g. `{space: \t}`). For example: - -```js -const stringify = require('json-stringify-deterministic') - -const obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } } -const objSerializer = stringify(obj, { space: ' ' }) -console.log(objSerializer) -// => { -// "a": { -// "and": [ -// 1, -// 2, -// 3 -// ], -// "foo": "bar" -// }, -// "b": 1 -// } -``` - -##### opts.replacer - -Type: `function`
- -The replacer parameter is a function `opts.replacer(key, value)` that behaves -the same as the replacer -[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter). - -## Related - -- [sort-keys-recursive](https://github.com/Kikobeats/sort-keys-recursive): Sort the keys of an array/object recursively. - -## License - -MIT © [Kiko Beats](https://github.com/Kikobeats). diff --git a/node_modules/json-stringify-deterministic/package.json b/node_modules/json-stringify-deterministic/package.json deleted file mode 100644 index 76ab7a65..00000000 --- a/node_modules/json-stringify-deterministic/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "name": "json-stringify-deterministic", - "description": "deterministic version of JSON.stringify() so you can get a consistent hash from stringified results.", - "homepage": "https://github.com/Kikobeats/json-stringify-deterministic", - "version": "1.0.12", - "types": "./lib/index.d.ts", - "main": "lib", - "author": { - "email": "josefrancisco.verdu@gmail.com", - "name": "Kiko Beats", - "url": "https://github.com/Kikobeats" - }, - "contributors": [ - { - "name": "Junxiao Shi", - "email": "sunnylandh@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/kikobeats/json-stringify-deterministic.git" - }, - "bugs": { - "url": "https://github.com/Kikobeats/json-stringify-deterministic/issues" - }, - "keywords": [ - "deterministic", - "hash", - "json", - "sort", - "stable", - "stringify" - ], - "devDependencies": { - "@commitlint/cli": "latest", - "@commitlint/config-conventional": "latest", - "@ksmithut/prettier-standard": "latest", - "c8": "latest", - "ci-publish": "latest", - "conventional-github-releaser": "latest", - "finepack": "latest", - "git-authors-cli": "latest", - "mocha": "latest", - "nano-staged": "latest", - "npm-check-updates": "latest", - "should": "latest", - "simple-git-hooks": "latest", - "standard": "latest", - "standard-markdown": "latest", - "standard-version": "latest" - }, - "engines": { - "node": ">= 4" - }, - "files": [ - "index.js", - "lib" - ], - "scripts": { - "clean": "rm -rf node_modules", - "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "lint": "standard && standard-markdown", - "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)", - "prerelease": "npm run update:check && npm run contributors", - "pretest": "npm run lint", - "release": "standard-version -a", - "release:github": "conventional-github-releaser -p angular", - "release:tags": "git push --follow-tags origin HEAD:master", - "test": "c8 mocha --require should", - "update": "ncu -u", - "update:check": "ncu -- --error-level 2" - }, - "license": "MIT", - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "nano-staged": { - "*.js": [ - "prettier-standard" - ], - "*.md": [ - "standard-markdown" - ], - "package.json": [ - "finepack" - ] - }, - "simple-git-hooks": { - "commit-msg": "npx commitlint --edit", - "pre-commit": "npx nano-staged" - }, - "standard": { - "globals": [ - "describe", - "it" - ] - } -} diff --git a/node_modules/jsonc-parser/CHANGELOG.md b/node_modules/jsonc-parser/CHANGELOG.md deleted file mode 100644 index 3414a3f1..00000000 --- a/node_modules/jsonc-parser/CHANGELOG.md +++ /dev/null @@ -1,76 +0,0 @@ -3.3.0 2022-06-24 -================= -- `JSONVisitor.onObjectBegin` and `JSONVisitor.onArrayBegin` can now return `false` to instruct the visitor that no children should be visited. - - -3.2.0 2022-08-30 -================= -- update the version of the bundled Javascript files to `es2020`. -- include all `const enum` values in the bundled JavaScript files (`ScanError`, `SyntaxKind`, `ParseErrorCode`). - -3.1.0 2022-07-07 -================== - * added new API `FormattingOptions.keepLines` : It leaves the initial line positions in the formatting. - -3.0.0 2020-11-13 -================== - * fixed API spec for `parseTree`. Can return `undefine` for empty input. - * added new API `FormattingOptions.insertFinalNewline`. - - -2.3.0 2020-07-03 -================== - * new API `ModificationOptions.isArrayInsertion`: If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then `modify` will insert a new item at that location instead of overwriting its contents. - * `ModificationOptions.formattingOptions` is now optional. If not set, newly inserted content will not be formatted. - - -2.2.0 2019-10-25 -================== - * added `ParseOptions.allowEmptyContent`. Default is `false`. - * new API `getNodeType`: Returns the type of a value returned by parse. - * `parse`: Fix issue with empty property name - -2.1.0 2019-03-29 -================== - * `JSONScanner` and `JSONVisitor` return lineNumber / character. - -2.0.0 2018-04-12 -================== - * renamed `Node.columnOffset` to `Node.colonOffset` - * new API `getNodePath`: Gets the JSON path of the given JSON DOM node - * new API `findNodeAtOffset`: Finds the most inner node at the given offset. If `includeRightBound` is set, also finds nodes that end at the given offset. - -1.0.3 2018-03-07 -================== - * provide ems modules - -1.0.2 2018-03-05 -================== - * added the `visit.onComment` API, reported when comments are allowed. - * added the `ParseErrorCode.InvalidCommentToken` enum value, reported when comments are disallowed. - -1.0.1 -================== - * added the `format` API: computes edits to format a JSON document. - * added the `modify` API: computes edits to insert, remove or replace a property or value in a JSON document. - * added the `allyEdits` API: applies edits to a document - -1.0.0 -================== - * remove nls dependency (remove `getParseErrorMessage`) - -0.4.2 / 2017-05-05 -================== - * added `ParseError.offset` & `ParseError.length` - -0.4.1 / 2017-04-02 -================== - * added `ParseOptions.allowTrailingComma` - -0.4.0 / 2017-02-23 -================== - * fix for `getLocation`. Now `getLocation` inside an object will always return a property from inside that property. Can be empty string if the object has no properties or if the offset is before a actual property `{ "a": { | }} will return location ['a', ' ']` - -0.3.0 / 2017-01-17 -================== - * Updating to typescript 2.0 \ No newline at end of file diff --git a/node_modules/jsonc-parser/LICENSE.md b/node_modules/jsonc-parser/LICENSE.md deleted file mode 100644 index f54f08dc..00000000 --- a/node_modules/jsonc-parser/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jsonc-parser/README.md b/node_modules/jsonc-parser/README.md deleted file mode 100644 index d569b706..00000000 --- a/node_modules/jsonc-parser/README.md +++ /dev/null @@ -1,364 +0,0 @@ -# jsonc-parser -Scanner and parser for JSON with comments. - -[![npm Package](https://img.shields.io/npm/v/jsonc-parser.svg?style=flat-square)](https://www.npmjs.org/package/jsonc-parser) -[![NPM Downloads](https://img.shields.io/npm/dm/jsonc-parser.svg)](https://npmjs.org/package/jsonc-parser) -[![Build Status](https://github.com/microsoft/node-jsonc-parser/workflows/Tests/badge.svg)](https://github.com/microsoft/node-jsonc-parser/workflows/Tests) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) - -Why? ----- -JSONC is JSON with JavaScript style comments. This node module provides a scanner and fault tolerant parser that can process JSONC but is also useful for standard JSON. - - the *scanner* tokenizes the input string into tokens and token offsets - - the *visit* function implements a 'SAX' style parser with callbacks for the encountered properties and values. - - the *parseTree* function computes a hierarchical DOM with offsets representing the encountered properties and values. - - the *parse* function evaluates the JavaScript object represented by JSON string in a fault tolerant fashion. - - the *getLocation* API returns a location object that describes the property or value located at a given offset in a JSON document. - - the *findNodeAtLocation* API finds the node at a given location path in a JSON DOM. - - the *format* API computes edits to format a JSON document. - - the *modify* API computes edits to insert, remove or replace a property or value in a JSON document. - - the *applyEdits* API applies edits to a document. - -Installation ------------- - -``` -npm install --save jsonc-parser -``` - -API ---- - -### Scanner: -```typescript - -/** - * Creates a JSON scanner on the given text. - * If ignoreTrivia is set, whitespaces or comments are ignored. - */ -export function createScanner(text: string, ignoreTrivia: boolean = false): JSONScanner; - -/** - * The scanner object, representing a JSON scanner at a position in the input string. - */ -export interface JSONScanner { - /** - * Sets the scan position to a new offset. A call to 'scan' is needed to get the first token. - */ - setPosition(pos: number): any; - /** - * Read the next token. Returns the token code. - */ - scan(): SyntaxKind; - /** - * Returns the zero-based current scan position, which is after the last read token. - */ - getPosition(): number; - /** - * Returns the last read token. - */ - getToken(): SyntaxKind; - /** - * Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false. - */ - getTokenValue(): string; - /** - * The zero-based start offset of the last read token. - */ - getTokenOffset(): number; - /** - * The length of the last read token. - */ - getTokenLength(): number; - /** - * The zero-based start line number of the last read token. - */ - getTokenStartLine(): number; - /** - * The zero-based start character (column) of the last read token. - */ - getTokenStartCharacter(): number; - /** - * An error code of the last scan. - */ - getTokenError(): ScanError; -} -``` - -### Parser: -```typescript - -export interface ParseOptions { - disallowComments?: boolean; - allowTrailingComma?: boolean; - allowEmptyContent?: boolean; -} -/** - * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. - * Therefore always check the errors list to find out if the input was valid. - */ -export declare function parse(text: string, errors?: {error: ParseErrorCode;}[], options?: ParseOptions): any; - -/** - * Parses the given text and invokes the visitor functions for each object, array and literal reached. - */ -export declare function visit(text: string, visitor: JSONVisitor, options?: ParseOptions): any; - -/** - * Visitor called by {@linkcode visit} when parsing JSON. - * - * The visitor functions have the following common parameters: - * - `offset`: Global offset within the JSON document, starting at 0 - * - `startLine`: Line number, starting at 0 - * - `startCharacter`: Start character (column) within the current line, starting at 0 - * - * Additionally some functions have a `pathSupplier` parameter which can be used to obtain the - * current `JSONPath` within the document. - */ -export interface JSONVisitor { - /** - * Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace. - * When `false` is returned, the array items will not be visited. - */ - onObjectBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void | boolean; - - /** - * Invoked when a property is encountered. The offset and length represent the location of the property name. - * The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the - * property name yet. - */ - onObjectProperty?: (property: string, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; - /** - * Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace. - */ - onObjectEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; - /** - * Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket. - * When `false` is returned, the array items will not be visited.* - */ - onArrayBegin?: (offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void | boolean; - /** - * Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket. - */ - onArrayEnd?: (offset: number, length: number, startLine: number, startCharacter: number) => void; - /** - * Invoked when a literal value is encountered. The offset and length represent the location of the literal value. - */ - onLiteralValue?: (value: any, offset: number, length: number, startLine: number, startCharacter: number, pathSupplier: () => JSONPath) => void; - /** - * Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator. - */ - onSeparator?: (character: string, offset: number, length: number, startLine: number, startCharacter: number) => void; - /** - * When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment. - */ - onComment?: (offset: number, length: number, startLine: number, startCharacter: number) => void; - /** - * Invoked on an error. - */ - onError?: (error: ParseErrorCode, offset: number, length: number, startLine: number, startCharacter: number) => void; -} - -/** - * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. - */ -export declare function parseTree(text: string, errors?: ParseError[], options?: ParseOptions): Node | undefined; - -export declare type NodeType = "object" | "array" | "property" | "string" | "number" | "boolean" | "null"; -export interface Node { - type: NodeType; - value?: any; - offset: number; - length: number; - colonOffset?: number; - parent?: Node; - children?: Node[]; -} - -``` - -### Utilities: -```typescript -/** - * Takes JSON with JavaScript-style comments and remove - * them. Optionally replaces every none-newline character - * of comments with a replaceCharacter - */ -export declare function stripComments(text: string, replaceCh?: string): string; - -/** - * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index. - */ -export declare function getLocation(text: string, position: number): Location; - -/** - * A {@linkcode JSONPath} segment. Either a string representing an object property name - * or a number (starting at 0) for array indices. - */ -export declare type Segment = string | number; -export declare type JSONPath = Segment[]; -export interface Location { - /** - * The previous property key or literal value (string, number, boolean or null) or undefined. - */ - previousNode?: Node; - /** - * The path describing the location in the JSON document. The path consists of a sequence strings - * representing an object property or numbers for array indices. - */ - path: JSONPath; - /** - * Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices). - * '*' will match a single segment, of any property name or index. - * '**' will match a sequence of segments or no segment, of any property name or index. - */ - matches: (patterns: JSONPath) => boolean; - /** - * If set, the location's offset is at a property key. - */ - isAtPropertyKey: boolean; -} - -/** - * Finds the node at the given path in a JSON DOM. - */ -export function findNodeAtLocation(root: Node, path: JSONPath): Node | undefined; - -/** - * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset. - */ -export function findNodeAtOffset(root: Node, offset: number, includeRightBound?: boolean) : Node | undefined; - -/** - * Gets the JSON path of the given JSON DOM node - */ -export function getNodePath(node: Node): JSONPath; - -/** - * Evaluates the JavaScript object of the given JSON DOM node - */ -export function getNodeValue(node: Node): any; - -/** - * Computes the edit operations needed to format a JSON document. - * - * @param documentText The input text - * @param range The range to format or `undefined` to format the full content - * @param options The formatting options - * @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}. - * To apply the edit operations to the input, use {@linkcode applyEdits}. - */ -export function format(documentText: string, range: Range, options: FormattingOptions): EditResult; - -/** - * Computes the edit operations needed to modify a value in the JSON document. - * - * @param documentText The input text - * @param path The path of the value to change. The path represents either to the document root, a property or an array item. - * If the path points to an non-existing property or item, it will be created. - * @param value The new value for the specified property or item. If the value is undefined, - * the property or item will be removed. - * @param options Options - * @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}. - * To apply the edit operations to the input, use {@linkcode applyEdits}. - */ -export function modify(text: string, path: JSONPath, value: any, options: ModificationOptions): EditResult; - -/** - * Applies edits to an input string. - * @param text The input text - * @param edits Edit operations following the format described in {@linkcode EditResult}. - * @returns The text with the applied edits. - * @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}. - */ -export function applyEdits(text: string, edits: EditResult): string; - -/** - * An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation. - * It consist of one or more edits describing insertions, replacements or removals of text segments. - * * The offsets of the edits refer to the original state of the document. - * * No two edits change or remove the same range of text in the original document. - * * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace. - * * The order in the array defines which edit is applied first. - * To apply an edit result use {@linkcode applyEdits}. - * In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data. - */ -export type EditResult = Edit[]; - -/** - * Represents a text modification - */ -export interface Edit { - /** - * The start offset of the modification. - */ - offset: number; - /** - * The length of the modification. Must not be negative. Empty length represents an *insert*. - */ - length: number; - /** - * The new content. Empty content represents a *remove*. - */ - content: string; -} - -/** - * A text range in the document -*/ -export interface Range { - /** - * The start offset of the range. - */ - offset: number; - /** - * The length of the range. Must not be negative. - */ - length: number; -} - -/** - * Options used by {@linkcode format} when computing the formatting edit operations - */ -export interface FormattingOptions { - /** - * If indentation is based on spaces (`insertSpaces` = true), then what is the number of spaces that make an indent? - */ - tabSize: number; - /** - * Is indentation based on spaces? - */ - insertSpaces: boolean; - /** - * The default 'end of line' character - */ - eol: string; -} - -/** - * Options used by {@linkcode modify} when computing the modification edit operations - */ -export interface ModificationOptions { - /** - * Formatting options. If undefined, the newly inserted code will be inserted unformatted. - */ - formattingOptions?: FormattingOptions; - /** - * Default false. If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then - * {@linkcode modify} will insert a new item at that location instead of overwriting its contents. - */ - isArrayInsertion?: boolean; - /** - * Optional function to define the insertion index given an existing list of properties. - */ - getInsertionIndex?: (properties: string[]) => number; -} -``` - - -License -------- - -(MIT License) - -Copyright 2018, Microsoft diff --git a/node_modules/jsonc-parser/SECURITY.md b/node_modules/jsonc-parser/SECURITY.md deleted file mode 100644 index f7b89984..00000000 --- a/node_modules/jsonc-parser/SECURITY.md +++ /dev/null @@ -1,41 +0,0 @@ - - -## Security - -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. - -## Reporting Security Issues - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. - -## Preferred Languages - -We prefer all communications to be in English. - -## Policy - -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). - - \ No newline at end of file diff --git a/node_modules/jsonc-parser/package.json b/node_modules/jsonc-parser/package.json deleted file mode 100644 index 6536a20b..00000000 --- a/node_modules/jsonc-parser/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "jsonc-parser", - "version": "3.3.1", - "description": "Scanner and parser for JSON with comments.", - "main": "./lib/umd/main.js", - "typings": "./lib/umd/main.d.ts", - "module": "./lib/esm/main.js", - "author": "Microsoft Corporation", - "repository": { - "type": "git", - "url": "https://github.com/microsoft/node-jsonc-parser" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/microsoft/node-jsonc-parser/issues" - }, - "devDependencies": { - "@types/mocha": "^10.0.7", - "@types/node": "^18.x", - "@typescript-eslint/eslint-plugin": "^7.13.1", - "@typescript-eslint/parser": "^7.13.1", - "eslint": "^8.57.0", - "mocha": "^10.4.0", - "rimraf": "^5.0.7", - "typescript": "^5.4.2" - }, - "scripts": { - "prepack": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs", - "compile": "tsc -p ./src && npm run lint", - "compile-esm": "tsc -p ./src/tsconfig.esm.json", - "remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js", - "clean": "rimraf lib", - "watch": "tsc -w -p ./src", - "test": "npm run compile && mocha ./lib/umd/test", - "lint": "eslint src/**/*.ts" - } -} diff --git a/node_modules/just-curry-it/CHANGELOG.md b/node_modules/just-curry-it/CHANGELOG.md deleted file mode 100644 index f05ab7b7..00000000 --- a/node_modules/just-curry-it/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -# just-curry-it - -## 5.3.0 - -### Minor Changes - -- Rename node module .js -> .cjs - -## 5.2.1 - -### Patch Changes - -- fix: reorder exports to set default last #488 - -## 5.2.0 - -### Minor Changes - -- package.json updates to fix #467 and #483 - -## 5.1.0 - -### Minor Changes - -- Enhanced Type Defintions diff --git a/node_modules/just-curry-it/LICENSE b/node_modules/just-curry-it/LICENSE deleted file mode 100644 index 5d2c6e57..00000000 --- a/node_modules/just-curry-it/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 angus croll - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/just-curry-it/README.md b/node_modules/just-curry-it/README.md deleted file mode 100644 index 83f07a29..00000000 --- a/node_modules/just-curry-it/README.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -## just-curry-it - -Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing. -Guilt-free utilities for every occasion. - -[`🍦 Try it`](https://anguscroll.com/just/just-curry-it) - -```shell -npm install just-curry-it -``` -```shell -yarn add just-curry-it -``` - -Return a curried function - -```js -import curry from 'just-curry-it'; - -function add(a, b, c) { - return a + b + c; -} -curry(add)(1)(2)(3); // 6 -curry(add)(1)(2)(2); // 5 -curry(add)(2)(4, 3); // 9 - -function add(...args) { - return args.reduce((sum, n) => sum + n, 0) -} -var curryAdd4 = curry(add, 4) -curryAdd4(1)(2, 3)(4); // 10 - -function converter(ratio, input) { - return (input*ratio).toFixed(1); -} -const curriedConverter = curry(converter) -const milesToKm = curriedConverter(1.62); -milesToKm(35); // 56.7 -milesToKm(10); // 16.2 -``` diff --git a/node_modules/just-curry-it/index.cjs b/node_modules/just-curry-it/index.cjs deleted file mode 100644 index 8917dec9..00000000 --- a/node_modules/just-curry-it/index.cjs +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = curry; - -/* - function add(a, b, c) { - return a + b + c; - } - curry(add)(1)(2)(3); // 6 - curry(add)(1)(2)(2); // 5 - curry(add)(2)(4, 3); // 9 - - function add(...args) { - return args.reduce((sum, n) => sum + n, 0) - } - var curryAdd4 = curry(add, 4) - curryAdd4(1)(2, 3)(4); // 10 - - function converter(ratio, input) { - return (input*ratio).toFixed(1); - } - const curriedConverter = curry(converter) - const milesToKm = curriedConverter(1.62); - milesToKm(35); // 56.7 - milesToKm(10); // 16.2 -*/ - -function curry(fn, arity) { - return function curried() { - if (arity == null) { - arity = fn.length; - } - var args = [].slice.call(arguments); - if (args.length >= arity) { - return fn.apply(this, args); - } else { - return function() { - return curried.apply(this, args.concat([].slice.call(arguments))); - }; - } - }; -} diff --git a/node_modules/just-curry-it/index.d.ts b/node_modules/just-curry-it/index.d.ts deleted file mode 100644 index ab9e7b3a..00000000 --- a/node_modules/just-curry-it/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default curry; - -type MakeTuple = C['length'] extends LEN ? C : MakeTuple -type CurryOverload any, N extends unknown[], P extends unknown[]> = - N extends [infer L, ...infer R] - ? ((...args: [...P, L]) => CurryInternal) & CurryOverload - : () => CurryInternal -type CurryInternal any, N extends unknown[]> = - 0 extends N['length'] ? ReturnType : CurryOverload -type Curry any, LEN extends number | undefined = undefined, I extends any = any> = - 0 extends (LEN extends undefined ? Parameters['length'] : LEN) - ? () => ReturnType - : CurryInternal : MakeTuple> - -declare function curry any, L extends number>( - fn: F, - arity?: L | undefined, -) : Curry[number]>; diff --git a/node_modules/just-curry-it/index.mjs b/node_modules/just-curry-it/index.mjs deleted file mode 100644 index c4c185b2..00000000 --- a/node_modules/just-curry-it/index.mjs +++ /dev/null @@ -1,42 +0,0 @@ -var functionCurry = curry; - -/* - function add(a, b, c) { - return a + b + c; - } - curry(add)(1)(2)(3); // 6 - curry(add)(1)(2)(2); // 5 - curry(add)(2)(4, 3); // 9 - - function add(...args) { - return args.reduce((sum, n) => sum + n, 0) - } - var curryAdd4 = curry(add, 4) - curryAdd4(1)(2, 3)(4); // 10 - - function converter(ratio, input) { - return (input*ratio).toFixed(1); - } - const curriedConverter = curry(converter) - const milesToKm = curriedConverter(1.62); - milesToKm(35); // 56.7 - milesToKm(10); // 16.2 -*/ - -function curry(fn, arity) { - return function curried() { - if (arity == null) { - arity = fn.length; - } - var args = [].slice.call(arguments); - if (args.length >= arity) { - return fn.apply(this, args); - } else { - return function() { - return curried.apply(this, args.concat([].slice.call(arguments))); - }; - } - }; -} - -export {functionCurry as default}; diff --git a/node_modules/just-curry-it/index.tests.ts b/node_modules/just-curry-it/index.tests.ts deleted file mode 100644 index 5bb51f16..00000000 --- a/node_modules/just-curry-it/index.tests.ts +++ /dev/null @@ -1,72 +0,0 @@ -import curry from './index' - -function add(a: number, b: number, c: number) { - return a + b + c; -} - -// OK -curry(add); -curry(add)(1); -curry(add)(1)(2); -curry(add)(1)(2)(3); - -curry(add, 1); -curry(add, 1)(1); - -function many(a: string, b: number, c: boolean, d: bigint, e: number[], f: string | undefined, g: Record): boolean { - return true -} -const return1 = curry(many)('')(123)(false)(BigInt(2))([1])(undefined)({}) -const return2 = curry(many)('', 123)(false, BigInt(2))([1], '123')({}) -const return3 = curry(many)('', 123, false)(BigInt(2), [1], undefined)({}) -const return4 = curry(many)('', 123, false, BigInt(2))([1], undefined, {}) -const return5 = curry(many)('', 123, false, BigInt(2), [1])(undefined, {}) -const return6 = curry(many)('', 123, false, BigInt(2), [1], undefined)({}) -const return7 = curry(many)('', 123, false)(BigInt(2), [1])(undefined)({}) -const returns: boolean[] = [return1, return2, return3, return4, return5, return6, return7] - -function dynamic(...args: string[]): number { - return args.length -} -const dy1 = curry(dynamic, 1)('') -const dy2 = curry(dynamic, 2)('')('') -const dy3 = curry(dynamic, 3)('')('')('') -const dys: number[] = [dy1, dy2, dy3] - -// not OK -// @ts-expect-error -curry(add, 1)(1)(2); -// @ts-expect-error -curry(add, 1)(1)(2)(3); -// @ts-expect-error -curry(add, 4)(''); - -// @ts-expect-error -curry(many)(123) -// @ts-expect-error -curry(many)('', 123)(123) -// @ts-expect-error -curry(many)('', 123, true)('') -// @ts-expect-error -curry(many)('', 123, true, BigInt(2))('') -// @ts-expect-error -curry(many)('', 123, true, BigInt(2), [1])(123) -// @ts-expect-error -curry(many)('', 123, true, BigInt(2), [1,1], '')('') -// @ts-expect-error -curry(dynamic)(123) - -// @ts-expect-error -curry(); -// @ts-expect-error -curry(add, {}); -// @ts-expect-error -curry(add, 'abc')(1); -// @ts-expect-error -curry(1); -// @ts-expect-error -curry('hello'); -// @ts-expect-error -curry({}); -// @ts-expect-error -curry().a(); diff --git a/node_modules/just-curry-it/package.json b/node_modules/just-curry-it/package.json deleted file mode 100644 index b735efff..00000000 --- a/node_modules/just-curry-it/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "just-curry-it", - "version": "5.3.0", - "description": "return a curried function", - "type": "module", - "exports": { - ".": { - "types": "./index.d.ts", - "require": "./index.cjs", - "import": "./index.mjs" - }, - "./package.json": "./package.json" - }, - "main": "index.cjs", - "types": "index.d.ts", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "build": "rollup -c" - }, - "repository": "https://github.com/angus-c/just", - "keywords": [ - "function", - "curry", - "no-dependencies", - "just" - ], - "author": "Angus Croll", - "license": "MIT", - "bugs": { - "url": "https://github.com/angus-c/just/issues" - } -} \ No newline at end of file diff --git a/node_modules/just-curry-it/rollup.config.js b/node_modules/just-curry-it/rollup.config.js deleted file mode 100644 index fb9d24a3..00000000 --- a/node_modules/just-curry-it/rollup.config.js +++ /dev/null @@ -1,3 +0,0 @@ -const createRollupConfig = require('../../config/createRollupConfig'); - -module.exports = createRollupConfig(__dirname); diff --git a/node_modules/punycode/LICENSE-MIT.txt b/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/punycode/README.md b/node_modules/punycode/README.md deleted file mode 100644 index f611016b..00000000 --- a/node_modules/punycode/README.md +++ /dev/null @@ -1,148 +0,0 @@ -# Punycode.js [![punycode on npm](https://img.shields.io/npm/v/punycode)](https://www.npmjs.com/package/punycode) [![](https://data.jsdelivr.com/v1/package/npm/punycode/badge)](https://www.jsdelivr.com/package/npm/punycode) - -Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891). - -This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: - -* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) -* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) -* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) -* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) -* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) - -This project was [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with Node.js from [v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) until [v7](https://github.com/nodejs/node/pull/7941) (soft-deprecated). - -This project provides a CommonJS module that uses ES2015+ features and JavaScript module, which work in modern Node.js versions and browsers. For the old Punycode.js version that offers the same functionality in a UMD build with support for older pre-ES2015 runtimes, including Rhino, Ringo, and Narwhal, see [v1.4.1](https://github.com/mathiasbynens/punycode.js/releases/tag/v1.4.1). - -## Installation - -Via [npm](https://www.npmjs.com/): - -```bash -npm install punycode --save -``` - -In [Node.js](https://nodejs.org/): - -> ⚠️ Note that userland modules don't hide core modules. -> For example, `require('punycode')` still imports the deprecated core module even if you executed `npm install punycode`. -> Use `require('punycode/')` to import userland modules rather than core modules. - -```js -const punycode = require('punycode/'); -``` - -## API - -### `punycode.decode(string)` - -Converts a Punycode string of ASCII symbols to a string of Unicode symbols. - -```js -// decode domain name parts -punycode.decode('maana-pta'); // 'mañana' -punycode.decode('--dqo34k'); // '☃-⌘' -``` - -### `punycode.encode(string)` - -Converts a string of Unicode symbols to a Punycode string of ASCII symbols. - -```js -// encode domain name parts -punycode.encode('mañana'); // 'maana-pta' -punycode.encode('☃-⌘'); // '--dqo34k' -``` - -### `punycode.toUnicode(input)` - -Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. - -```js -// decode domain names -punycode.toUnicode('xn--maana-pta.com'); -// → 'mañana.com' -punycode.toUnicode('xn----dqo34k.com'); -// → '☃-⌘.com' - -// decode email addresses -punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); -// → 'джумла@джpумлатест.bрфa' -``` - -### `punycode.toASCII(input)` - -Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. - -```js -// encode domain names -punycode.toASCII('mañana.com'); -// → 'xn--maana-pta.com' -punycode.toASCII('☃-⌘.com'); -// → 'xn----dqo34k.com' - -// encode email addresses -punycode.toASCII('джумла@джpумлатест.bрфa'); -// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' -``` - -### `punycode.ucs2` - -#### `punycode.ucs2.decode(string)` - -Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. - -```js -punycode.ucs2.decode('abc'); -// → [0x61, 0x62, 0x63] -// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: -punycode.ucs2.decode('\uD834\uDF06'); -// → [0x1D306] -``` - -#### `punycode.ucs2.encode(codePoints)` - -Creates a string based on an array of numeric code point values. - -```js -punycode.ucs2.encode([0x61, 0x62, 0x63]); -// → 'abc' -punycode.ucs2.encode([0x1D306]); -// → '\uD834\uDF06' -``` - -### `punycode.version` - -A string representing the current Punycode.js version number. - -## For maintainers - -### How to publish a new release - -1. On the `main` branch, bump the version number in `package.json`: - - ```sh - npm version patch -m 'Release v%s' - ``` - - Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). - - Note that this produces a Git commit + tag. - -1. Push the release commit and tag: - - ```sh - git push && git push --tags - ``` - - Our CI then automatically publishes the new release to npm, under both the [`punycode`](https://www.npmjs.com/package/punycode) and [`punycode.js`](https://www.npmjs.com/package/punycode.js) names. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/punycode/package.json b/node_modules/punycode/package.json deleted file mode 100644 index b8b76fc7..00000000 --- a/node_modules/punycode/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "punycode", - "version": "2.3.1", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "https://mths.be/punycode", - "main": "punycode.js", - "jsnext:main": "punycode.es6.js", - "module": "punycode.es6.js", - "engines": { - "node": ">=6" - }, - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/punycode.js.git" - }, - "bugs": "https://github.com/mathiasbynens/punycode.js/issues", - "files": [ - "LICENSE-MIT.txt", - "punycode.js", - "punycode.es6.js" - ], - "scripts": { - "test": "mocha tests", - "build": "node scripts/prepublish.js" - }, - "devDependencies": { - "codecov": "^3.8.3", - "nyc": "^15.1.0", - "mocha": "^10.2.0" - }, - "jspm": { - "map": { - "./punycode.js": { - "node": "@node/punycode" - } - } - } -} diff --git a/node_modules/punycode/punycode.es6.js b/node_modules/punycode/punycode.es6.js deleted file mode 100644 index dadece25..00000000 --- a/node_modules/punycode/punycode.es6.js +++ /dev/null @@ -1,444 +0,0 @@ -'use strict'; - -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function(codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function(delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function(input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for (let w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - const digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - - } - - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function(input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for (let k = base; /* no condition */; k += base) { - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -export { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode }; -export default punycode; diff --git a/node_modules/punycode/punycode.js b/node_modules/punycode/punycode.js deleted file mode 100644 index a1ef2519..00000000 --- a/node_modules/punycode/punycode.js +++ /dev/null @@ -1,443 +0,0 @@ -'use strict'; - -/** Highest positive signed 32-bit float value */ -const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -const base = 36; -const tMin = 1; -const tMax = 26; -const skew = 38; -const damp = 700; -const initialBias = 72; -const initialN = 128; // 0x80 -const delimiter = '-'; // '\x2D' - -/** Regular expressions */ -const regexPunycode = /^xn--/; -const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too. -const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -const errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -const baseMinusTMin = base - tMin; -const floor = Math.floor; -const stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, callback) { - const result = []; - let length = array.length; - while (length--) { - result[length] = callback(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {String} A new string of characters returned by the callback - * function. - */ -function mapDomain(domain, callback) { - const parts = domain.split('@'); - let result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - domain = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - domain = domain.replace(regexSeparators, '\x2E'); - const labels = domain.split('.'); - const encoded = map(labels, callback).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - const output = []; - let counter = 0; - const length = string.length; - while (counter < length) { - const value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - const extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -const ucs2encode = codePoints => String.fromCodePoint(...codePoints); - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -const basicToDigit = function(codePoint) { - if (codePoint >= 0x30 && codePoint < 0x3A) { - return 26 + (codePoint - 0x30); - } - if (codePoint >= 0x41 && codePoint < 0x5B) { - return codePoint - 0x41; - } - if (codePoint >= 0x61 && codePoint < 0x7B) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -const digitToBasic = function(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -const adapt = function(delta, numPoints, firstTime) { - let k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -const decode = function(input) { - // Don't use UCS-2. - const output = []; - const inputLength = input.length; - let i = 0; - let n = initialN; - let bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - let basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (let j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - const oldi = i; - for (let w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - const digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base) { - error('invalid-input'); - } - if (digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - const baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - const out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - - } - - return String.fromCodePoint(...output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -const encode = function(input) { - const output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - const inputLength = input.length; - - // Initialize the state. - let n = initialN; - let delta = 0; - let bias = initialBias; - - // Handle the basic code points. - for (const currentValue of input) { - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - const basicLength = output.length; - let handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - let m = maxInt; - for (const currentValue of input) { - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - const handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (const currentValue of input) { - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - if (currentValue === n) { - // Represent delta as a generalized variable-length integer. - let q = delta; - for (let k = base; /* no condition */; k += base) { - const t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - const qMinusT = q - t; - const baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -const toUnicode = function(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -const toASCII = function(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -const punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.3.1', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -module.exports = punycode; diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md deleted file mode 100644 index 0412ad8a..00000000 --- a/node_modules/uuid/CHANGELOG.md +++ /dev/null @@ -1,274 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [9.0.1](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1) (2023-09-12) - -### build - -- Fix CI to work with Node.js 20.x - -## [9.0.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05) - -### ⚠ BREAKING CHANGES - -- Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022. - -- Remove the minified UMD build from the package. - - Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays. - - For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished. - -- Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015. - - This also removes the fallback on msCrypto instead of the crypto API. - - Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack. - -### Features - -- optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#597](https://github.com/uuidjs/uuid/issues/597)) ([3a033f6](https://github.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc)) -- remove UMD build ([#645](https://github.com/uuidjs/uuid/issues/645)) ([e948a0f](https://github.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#620](https://github.com/uuidjs/uuid/issues/620) -- use native crypto.randomUUID when available ([#600](https://github.com/uuidjs/uuid/issues/600)) ([c9e076c](https://github.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4)) - -### Bug Fixes - -- add Jest/jsdom compatibility ([#642](https://github.com/uuidjs/uuid/issues/642)) ([16f9c46](https://github.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd)) -- change default export to named function ([#545](https://github.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://github.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a)) -- handle error when parameter is not set in v3 and v5 ([#622](https://github.com/uuidjs/uuid/issues/622)) ([fcd7388](https://github.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091)) -- run npm audit fix ([#644](https://github.com/uuidjs/uuid/issues/644)) ([04686f5](https://github.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353)) -- upgrading from uuid3 broken link ([#568](https://github.com/uuidjs/uuid/issues/568)) ([1c849da](https://github.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6)) - -### build - -- drop Node.js 8.x from babel transpile target ([#603](https://github.com/uuidjs/uuid/issues/603)) ([aa11485](https://github.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5)) -- drop support for legacy browsers (IE11, Safari 10) ([#604](https://github.com/uuidjs/uuid/issues/604)) ([0f433e5](https://github.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148)) - -- drop node 10.x to upgrade dev dependencies ([#653](https://github.com/uuidjs/uuid/issues/653)) ([28a5712](https://github.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#643](https://github.com/uuidjs/uuid/issues/643) - -### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) - -### Bug Fixes - -- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536) - -### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) - -### Bug Fixes - -- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375) - -## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27) - -### Features - -- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180) - -## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23) - -### Features - -- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) -- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437) -- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659)) - -### Bug Fixes - -- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8)) - -## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20) - -### Features - -- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d)) -- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2)) - -### Bug Fixes - -- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444) - -## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29) - -### ⚠ BREAKING CHANGES - -- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. - - ```diff - -import uuid from 'uuid'; - -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' - +import { v4 as uuidv4 } from 'uuid'; - +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' - ``` - -- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. - - Instead use the named exports that this module exports. - - For ECMAScript Modules (ESM): - - ```diff - -import uuidv4 from 'uuid/v4'; - +import { v4 as uuidv4 } from 'uuid'; - uuidv4(); - ``` - - For CommonJS: - - ```diff - -const uuidv4 = require('uuid/v4'); - +const { v4: uuidv4 } = require('uuid'); - uuidv4(); - ``` - -### Features - -- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342) -- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) - -### Bug Fixes - -- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) - -### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) - -### Bug Fixes - -- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408) - -### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) - -### Bug Fixes - -- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) -- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) -- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) - -### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) - -### Bug Fixes - -- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) -- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378) - -## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24) - -### ⚠ BREAKING CHANGES - -- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. -- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. -- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. -- Remove support for generating v3 and v5 UUIDs in Node.js<4.x -- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. - -### Features - -- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345) -- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) -- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) -- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) -- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173) -- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) -- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338) - -### Bug Fixes - -- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) -- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370) -- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23)) - -## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) - -### Features - -- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) - -## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) - -### Bug Fixes - -- no longer run ci tests on node v4 -- upgrade dependencies - -## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) - -### Bug Fixes - -- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) - -## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) - -### Bug Fixes - -- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) - -# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) - -### Bug Fixes - -- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) -- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) -- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) -- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) - -### Features - -- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) - -## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) - -### Bug Fixes - -- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - -# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) - -### Bug Fixes - -- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) -- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) - -### Features - -- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) - -# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) - -### Bug Fixes - -- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) -- Fix typo (#178) -- Simple typo fix (#165) - -### Features - -- v5 support in CLI (#197) -- V5 support (#188) - -# 3.0.1 (2016-11-28) - -- split uuid versions into separate files - -# 3.0.0 (2016-11-17) - -- remove .parse and .unparse - -# 2.0.0 - -- Removed uuid.BufferClass - -# 1.4.0 - -- Improved module context detection -- Removed public RNG functions - -# 1.3.2 - -- Improve tests and handling of v1() options (Issue #24) -- Expose RNG option to allow for perf testing with different generators - -# 1.3.0 - -- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -- Support for node.js crypto API -- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/uuid/CONTRIBUTING.md b/node_modules/uuid/CONTRIBUTING.md deleted file mode 100644 index 4a4503d0..00000000 --- a/node_modules/uuid/CONTRIBUTING.md +++ /dev/null @@ -1,18 +0,0 @@ -# Contributing - -Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! - -## Testing - -```shell -npm test -``` - -## Releasing - -Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): - -```shell -npm run release -- --dry-run # verify output manually -npm run release # follow the instructions from the output of this command -``` diff --git a/node_modules/uuid/LICENSE.md b/node_modules/uuid/LICENSE.md deleted file mode 100644 index 39341683..00000000 --- a/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2020 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md deleted file mode 100644 index 4f51e098..00000000 --- a/node_modules/uuid/README.md +++ /dev/null @@ -1,466 +0,0 @@ - - - -# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser) - -For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs - -- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs -- **Cross-platform** - Support for ... - - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) - - NodeJS 12+ ([LTS releases](https://github.com/nodejs/Release)) - - Chrome, Safari, Firefox, Edge browsers - - Webpack and rollup.js module bundlers - - [React Native / Expo](#react-native--expo) -- **Secure** - Cryptographically-strong random values -- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers -- **CLI** - Includes the [`uuid` command line](#command-line) utility - -> **Note** Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details. - -> **Note** Only interested in creating a version 4 UUID? You might be able to use [`crypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library. - -## Quickstart - -To create a random UUID... - -**1. Install** - -```shell -npm install uuid -``` - -**2. Create a UUID** (ES6 module syntax) - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' -``` - -... or using CommonJS syntax: - -```javascript -const { v4: uuidv4 } = require('uuid'); -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -For timestamp UUIDs, namespace UUIDs, and other options read on ... - -## API Summary - -| | | | -| --- | --- | --- | -| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | -| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | -| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | -| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | -| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | -| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | -| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | -| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | -| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | - -## API - -### uuid.NIL - -The nil UUID string (all zeros). - -Example: - -```javascript -import { NIL as NIL_UUID } from 'uuid'; - -NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' -``` - -### uuid.parse(str) - -Convert UUID string to array of bytes - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Uint8Array[16]` | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { parse as uuidParse } from 'uuid'; - -// Parse a UUID -const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); - -// Convert to hex strings to show byte order (for documentation purposes) -[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ - // [ - // '6e', 'c0', 'bd', '7f', - // '11', 'c0', '43', 'da', - // '97', '5e', '2a', '8a', - // 'd9', 'eb', 'ae', '0b' - // ] -``` - -### uuid.stringify(arr[, offset]) - -Convert array of bytes to UUID string - -| | | -| -------------- | ---------------------------------------------------------------------------- | -| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | -| [`offset` = 0] | `Number` Starting index in the Array | -| _returns_ | `String` | -| _throws_ | `TypeError` if a valid UUID string cannot be generated | - -Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. - -Example: - -```javascript -import { stringify as uuidStringify } from 'uuid'; - -const uuidBytes = [ - 0x6e, 0xc0, 0xbd, 0x7f, 0x11, 0xc0, 0x43, 0xda, 0x97, 0x5e, 0x2a, 0x8a, 0xd9, 0xeb, 0xae, 0x0b, -]; - -uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' -``` - -### uuid.v1([options[, buffer[, offset]]]) - -Create an RFC version 1 (timestamp) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | -| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | -| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | -| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | -| _throws_ | `Error` if more than 10M UUIDs/sec are requested | - -Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. - -Note: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields. - -Example: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' -``` - -Example using `options`: - -```javascript -import { v1 as uuidv1 } from 'uuid'; - -const v1options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678, -}; -uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' -``` - -### uuid.v3(name, namespace[, buffer[, offset]]) - -Create an RFC version 3 (namespace w/ MD5) UUID - -API is identical to `v5()`, but uses "v3" instead. - -⚠️ Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." - -### uuid.v4([options[, buffer[, offset]]]) - -Create an RFC version 4 (random) UUID - -| | | -| --- | --- | -| [`options`] | `Object` with one or more of the following properties: | -| [`options.random`] | `Array` of 16 random bytes (0-255) | -| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Example: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -Example using predefined `random` values: - -```javascript -import { v4 as uuidv4 } from 'uuid'; - -const v4options = { - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36, - ], -}; -uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' -``` - -### uuid.v5(name, namespace[, buffer[, offset]]) - -Create an RFC version 5 (namespace w/ SHA-1) UUID - -| | | -| --- | --- | -| `name` | `String \| Array` | -| `namespace` | `String \| Array[16]` Namespace UUID | -| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | -| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | -| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | - -Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. - -Example with custom namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -// Define a custom namespace. Readers, create your own using something like -// https://www.uuidgenerator.net/ -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; - -uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' -``` - -Example with RFC `URL` namespace: - -```javascript -import { v5 as uuidv5 } from 'uuid'; - -uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' -``` - -### uuid.validate(str) - -Test a string to see if it is a valid UUID - -| | | -| --------- | --------------------------------------------------- | -| `str` | `String` to validate | -| _returns_ | `true` if string is a valid UUID, `false` otherwise | - -Example: - -```javascript -import { validate as uuidValidate } from 'uuid'; - -uuidValidate('not a UUID'); // ⇨ false -uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true -``` - -Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. - -```javascript -import { version as uuidVersion } from 'uuid'; -import { validate as uuidValidate } from 'uuid'; - -function uuidValidateV4(uuid) { - return uuidValidate(uuid) && uuidVersion(uuid) === 4; -} - -const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; -const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; - -uuidValidateV4(v4Uuid); // ⇨ true -uuidValidateV4(v1Uuid); // ⇨ false -``` - -### uuid.version(str) - -Detect RFC version of a UUID - -| | | -| --------- | ---------------------------------------- | -| `str` | A valid UUID `String` | -| _returns_ | `Number` The RFC version of the UUID | -| _throws_ | `TypeError` if `str` is not a valid UUID | - -Example: - -```javascript -import { version as uuidVersion } from 'uuid'; - -uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 -uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 -``` - -## Command Line - -UUIDs can be generated from the command line using `uuid`. - -```shell -$ npx uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 -``` - -The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: - -```shell -$ npx uuid --help - -Usage: - uuid - uuid v1 - uuid v3 - uuid v4 - uuid v5 - uuid --help - -Note: may be "URL" or "DNS" to use the corresponding UUIDs -defined by RFC4122 -``` - -## ECMAScript Modules - -This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments). - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' -``` - -To run the examples you must first create a dist build of this library in the module root: - -```shell -npm run build -``` - -## CDN Builds - -### ECMAScript Modules - -To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/): - -```html - -``` - -### UMD - -As of `uuid@9` [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds are no longer shipped with this library. - -If you need a UMD build of this library, use a bundler like Webpack or Rollup. Alternatively, refer to the documentation of [`uuid@8.3.2`](https://github.com/uuidjs/uuid/blob/v8.3.2/README.md#umd) which was the last version that shipped UMD builds. - -## Known issues - -### Duplicate UUIDs (Googlebot) - -This module may generate duplicate UUIDs when run in clients with _deterministic_ random number generators, such as [Googlebot crawlers](https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers). This can cause problems for apps that expect client-generated UUIDs to always be unique. Developers should be prepared for this and have a strategy for dealing with possible collisions, such as: - -- Check for duplicate UUIDs, fail gracefully -- Disable write operations for Googlebot clients - -### "getRandomValues() not supported" - -This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: - -### React Native / Expo - -1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) -1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: - -```javascript -import 'react-native-get-random-values'; -import { v4 as uuidv4 } from 'uuid'; -``` - -Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`. - -### Web Workers / Service Workers (Edge <= 18) - -[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). - -### IE 11 (Internet Explorer) - -Support for IE11 and other legacy browsers has been dropped as of `uuid@9`. If you need to support legacy browsers, you can always transpile the uuid module source yourself (e.g. using [Babel](https://babeljs.io/)). - -## Upgrading From `uuid@7` - -### Only Named Exports Supported When Using with Node.js ESM - -`uuid@7` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports. - -Instead of doing: - -```javascript -import uuid from 'uuid'; -uuid.v4(); -``` - -you will now have to use the named exports: - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); -``` - -### Deep Requires No Longer Supported - -Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7`](#deep-requires-now-deprecated) are no longer supported. - -## Upgrading From `uuid@3` - -"_Wait... what happened to `uuid@4` thru `uuid@6`?!?_" - -In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped. - -### Deep Requires Now Deprecated - -`uuid@3` encouraged the use of deep requires to minimize the bundle size of browser builds: - -```javascript -const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED! -uuidv4(); -``` - -As of `uuid@7` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax: - -```javascript -import { v4 as uuidv4 } from 'uuid'; -uuidv4(); -``` - -... or for CommonJS: - -```javascript -const { v4: uuidv4 } = require('uuid'); -uuidv4(); -``` - -### Default Export Removed - -`uuid@3` was exporting the Version 4 UUID method as a default export: - -```javascript -const uuid = require('uuid'); // <== REMOVED! -``` - -This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`. - ---- - -Markdown generated from [README_js.md](README_js.md) by
diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json deleted file mode 100644 index 6cc33618..00000000 --- a/node_modules/uuid/package.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "name": "uuid", - "version": "9.0.1", - "description": "RFC4122 (v1, v4, and v5) UUIDs", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "license": "MIT", - "bin": { - "uuid": "./dist/bin/uuid" - }, - "sideEffects": false, - "main": "./dist/index.js", - "exports": { - ".": { - "node": { - "module": "./dist/esm-node/index.js", - "require": "./dist/index.js", - "import": "./wrapper.mjs" - }, - "browser": { - "import": "./dist/esm-browser/index.js", - "require": "./dist/commonjs-browser/index.js" - }, - "default": "./dist/esm-browser/index.js" - }, - "./package.json": "./package.json" - }, - "module": "./dist/esm-node/index.js", - "browser": { - "./dist/md5.js": "./dist/md5-browser.js", - "./dist/native.js": "./dist/native-browser.js", - "./dist/rng.js": "./dist/rng-browser.js", - "./dist/sha1.js": "./dist/sha1-browser.js", - "./dist/esm-node/index.js": "./dist/esm-browser/index.js" - }, - "files": [ - "CHANGELOG.md", - "CONTRIBUTING.md", - "LICENSE.md", - "README.md", - "dist", - "wrapper.mjs" - ], - "devDependencies": { - "@babel/cli": "7.18.10", - "@babel/core": "7.18.10", - "@babel/eslint-parser": "7.18.9", - "@babel/preset-env": "7.18.10", - "@commitlint/cli": "17.0.3", - "@commitlint/config-conventional": "17.0.3", - "bundlewatch": "0.3.3", - "eslint": "8.21.0", - "eslint-config-prettier": "8.5.0", - "eslint-config-standard": "17.0.0", - "eslint-plugin-import": "2.26.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-promise": "6.0.0", - "husky": "8.0.1", - "jest": "28.1.3", - "lint-staged": "13.0.3", - "npm-run-all": "4.1.5", - "optional-dev-dependency": "2.0.1", - "prettier": "2.7.1", - "random-seed": "0.3.0", - "runmd": "1.3.9", - "standard-version": "9.5.0" - }, - "optionalDevDependencies": { - "@wdio/browserstack-service": "7.16.10", - "@wdio/cli": "7.16.10", - "@wdio/jasmine-framework": "7.16.6", - "@wdio/local-runner": "7.16.10", - "@wdio/spec-reporter": "7.16.9", - "@wdio/static-server-service": "7.16.6" - }, - "scripts": { - "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build", - "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build", - "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test", - "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test", - "examples:node:jest:test": "cd examples/node-jest && npm install && npm test", - "prepare": "cd $( git rev-parse --show-toplevel ) && husky install", - "lint": "npm run eslint:check && npm run prettier:check", - "eslint:check": "eslint src/ test/ examples/ *.js", - "eslint:fix": "eslint --fix src/ test/ examples/ *.js", - "pretest": "[ -n $CI ] || npm run build", - "test": "BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/", - "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**", - "test:browser": "wdio run ./wdio.conf.js", - "pretest:node": "npm run build", - "test:node": "npm-run-all --parallel examples:node:**", - "test:pack": "./scripts/testpack.sh", - "pretest:benchmark": "npm run build", - "test:benchmark": "cd examples/benchmark && npm install && npm test", - "prettier:check": "prettier --check '**/*.{js,jsx,json,md}'", - "prettier:fix": "prettier --write '**/*.{js,jsx,json,md}'", - "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", - "md": "runmd --watch --output=README.md README_js.md", - "docs": "( node --version | grep -q 'v18' ) && ( npm run build && npx runmd --output=README.md README_js.md )", - "docs:diff": "npm run docs && git diff --quiet README.md", - "build": "./scripts/build.sh", - "prepack": "npm run build", - "release": "standard-version --no-verify" - }, - "repository": { - "type": "git", - "url": "https://github.com/uuidjs/uuid.git" - }, - "lint-staged": { - "*.{js,jsx,json,md}": [ - "prettier --write" - ], - "*.{js,jsx}": [ - "eslint --fix" - ] - }, - "standard-version": { - "scripts": { - "postchangelog": "prettier --write CHANGELOG.md" - } - } -} diff --git a/node_modules/uuid/wrapper.mjs b/node_modules/uuid/wrapper.mjs deleted file mode 100644 index c31e9cef..00000000 --- a/node_modules/uuid/wrapper.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import uuid from './dist/index.js'; -export const v1 = uuid.v1; -export const v3 = uuid.v3; -export const v4 = uuid.v4; -export const v5 = uuid.v5; -export const NIL = uuid.NIL; -export const version = uuid.version; -export const validate = uuid.validate; -export const stringify = uuid.stringify; -export const parse = uuid.parse; From 343d4effe02005b606751a9fe881d23050ab4648 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Tue, 3 Mar 2026 19:06:31 +0530 Subject: [PATCH 15/25] added a github action for automating addition of test-ids --- .github/workflows/apply-test-ids.yml | 149 +++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 .github/workflows/apply-test-ids.yml diff --git a/.github/workflows/apply-test-ids.yml b/.github/workflows/apply-test-ids.yml new file mode 100644 index 00000000..df17a245 --- /dev/null +++ b/.github/workflows/apply-test-ids.yml @@ -0,0 +1,149 @@ +name: apply-test-ids + +on: + pull_request_target: + types: [opened, synchronize] + +permissions: + contents: write + pull-requests: write + +jobs: + apply: + runs-on: ubuntu-latest + + steps: + # 1. Checkout base branch (trusted code ) + - name: Checkout base branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.base.ref }} + fetch-depth: 0 + + # 2. Save trusted scripts before checking out PR code + - name: Save base automation scripts + run: | + mkdir -p /tmp/base-scripts/scripts/utils + cp scripts/add-test-ids.js /tmp/base-scripts/scripts/add-test-ids.js + cp scripts/normalize.js /tmp/base-scripts/scripts/normalize.js + cp scripts/load-remotes.js /tmp/base-scripts/scripts/load-remotes.js + cp scripts/utils/generateTestIds.js /tmp/base-scripts/scripts/utils/generateTestIds.js + cp scripts/utils/jsonfiles.js /tmp/base-scripts/scripts/utils/jsonfiles.js + + # 3. Checkout PR branch (contributor test files) + - name: Checkout PR branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + # 4. Restore trusted scripts over PR code (prevents script injection) + - name: Restore trusted scripts + run: | + cp /tmp/base-scripts/scripts/add-test-ids.js scripts/add-test-ids.js + cp /tmp/base-scripts/scripts/normalize.js scripts/normalize.js + cp /tmp/base-scripts/scripts/load-remotes.js scripts/load-remotes.js + cp /tmp/base-scripts/scripts/utils/generateTestIds.js scripts/utils/generateTestIds.js + cp /tmp/base-scripts/scripts/utils/jsonfiles.js scripts/utils/jsonfiles.js + + # 5. Setup Node.js + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + # 6. Install dependencies + - name: Install dependencies + run: npm ci + + # 7. Fetch list of files changed in this PR + - name: Get changed test files + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + curl -s \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + "${{ github.event.pull_request.url }}/files?per_page=100" \ + | jq -r ".[].filename" \ + > changed-files.txt + + grep -E "^tests/(draft[^/]+)/.*\.json$" changed-files.txt \ + | sed -E "s|^tests/([^/]+)/.*|\1|" \ + | sort -u \ + > affected-drafts.txt + + # 8. Run add-test-ids.js for each changed file + - name: Apply missing test IDs + env: + CI: "false" + run: | + if [ ! -s affected-drafts.txt ]; then + echo "No test JSON files changed - nothing to do." + exit 0 + fi + + while IFS= read -r draft; do + echo "Processing dialect: $draft" + grep -E "^tests/${draft}/.*\.json$" changed-files.txt | while IFS= read -r file; do + if [ -f "$file" ]; then + echo " -> $file" + node scripts/add-test-ids.js "$draft" "$file" + fi + done + done < affected-drafts.txt + + # 9. Commit and push back to the PR branch + - name: Commit and push changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config user.name "test-id-bot" + git config user.email "test-id-bot@users.noreply.github.com" + + git add "tests/**/*.json" + + if git diff --cached --quiet; then + echo "No test ID changes needed - nothing to commit." + echo "CHANGES_MADE=false" >> $GITHUB_ENV + else + SUMMARY="" + TOTAL=0 + while IFS= read -r file; do + COUNT=$(git diff --cached -- "$file" | grep "^+" | grep '"id":' | wc -l | tr -d " ") + if [ "$COUNT" -gt 0 ]; then + SUMMARY="${SUMMARY}\n- \`${file}\` - **${COUNT}** ID(s) added" + TOTAL=$((TOTAL + COUNT)) + fi + done < <(git diff --cached --name-only) + + printf "%b" "$SUMMARY" > /tmp/summary.txt + echo "TOTAL_IDS=${TOTAL}" >> $GITHUB_ENV + + git commit -m "chore: auto-add missing test IDs" + + COMMIT_SHA=$(git rev-parse HEAD) + echo "COMMIT_SHA=${COMMIT_SHA}" >> $GITHUB_ENV + + git push \ + https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git \ + HEAD:refs/heads/${{ github.event.pull_request.head.ref }} + + echo "CHANGES_MADE=true" >> $GITHUB_ENV + fi + + # 10. Post a summary comment on the PR + - name: Post PR comment + if: env.CHANGES_MADE == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + SUMMARY=$(cat /tmp/summary.txt) + COMMIT_URL="https://github.com/${{ github.event.pull_request.head.repo.full_name }}/commit/${COMMIT_SHA}" + + BODY="### test-id-bot added ${TOTAL_IDS} missing test ID(s)\n\n${SUMMARY}\n\nView the full diff of added IDs: ${COMMIT_URL}\n\n> IDs are deterministic hashes based on the schema, test data, and expected result." + + curl -s -X POST \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "Content-Type: application/json" \ + "${{ github.event.pull_request.comments_url }}" \ + --data "$(jq -n --arg body "$(printf '%b' "$BODY")" '{body: $body}')" \ No newline at end of file From ac90ab42181e04c4ce5b842eb10a4c4ab19635a2 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Fri, 6 Mar 2026 10:30:39 +0530 Subject: [PATCH 16/25] changed the script restore method to the path filtring --- .github/workflows/apply-test-ids.yml | 67 +++++++++++++++------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/.github/workflows/apply-test-ids.yml b/.github/workflows/apply-test-ids.yml index df17a245..2155bb55 100644 --- a/.github/workflows/apply-test-ids.yml +++ b/.github/workflows/apply-test-ids.yml @@ -3,6 +3,8 @@ name: apply-test-ids on: pull_request_target: types: [opened, synchronize] + paths: + - 'tests/**/*.json' permissions: contents: write @@ -13,51 +15,50 @@ jobs: runs-on: ubuntu-latest steps: - # 1. Checkout base branch (trusted code ) - - name: Checkout base branch - uses: actions/checkout@v4 + # 1. Detect what changed in this PR + - name: Check changed paths + uses: dorny/paths-filter@v3 + id: filter with: - ref: ${{ github.event.pull_request.base.ref }} - fetch-depth: 0 - - # 2. Save trusted scripts before checking out PR code - - name: Save base automation scripts + filters: | + tests: + - 'tests/**/*.json' + scripts: + - 'scripts/**' + - 'package.json' + - 'package-lock.json' + + # 2. Fail if both tests AND scripts changed together + - name: Block mixed changes + if: steps.filter.outputs.tests == 'true' && steps.filter.outputs.scripts == 'true' run: | - mkdir -p /tmp/base-scripts/scripts/utils - cp scripts/add-test-ids.js /tmp/base-scripts/scripts/add-test-ids.js - cp scripts/normalize.js /tmp/base-scripts/scripts/normalize.js - cp scripts/load-remotes.js /tmp/base-scripts/scripts/load-remotes.js - cp scripts/utils/generateTestIds.js /tmp/base-scripts/scripts/utils/generateTestIds.js - cp scripts/utils/jsonfiles.js /tmp/base-scripts/scripts/utils/jsonfiles.js - - # 3. Checkout PR branch (contributor test files) - - name: Checkout PR branch + echo "This PR changes both test files and scripts at the same time." + echo "Please split them into separate PRs." + exit 1 + + # 3. Checkout repo + - name: Checkout + if: steps.filter.outputs.tests == 'true' uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - # 4. Restore trusted scripts over PR code (prevents script injection) - - name: Restore trusted scripts - run: | - cp /tmp/base-scripts/scripts/add-test-ids.js scripts/add-test-ids.js - cp /tmp/base-scripts/scripts/normalize.js scripts/normalize.js - cp /tmp/base-scripts/scripts/load-remotes.js scripts/load-remotes.js - cp /tmp/base-scripts/scripts/utils/generateTestIds.js scripts/utils/generateTestIds.js - cp /tmp/base-scripts/scripts/utils/jsonfiles.js scripts/utils/jsonfiles.js - - # 5. Setup Node.js + # 4. Setup Node.js - name: Setup Node.js + if: steps.filter.outputs.tests == 'true' uses: actions/setup-node@v4 with: node-version: 18 - # 6. Install dependencies + # 5. Install dependencies - name: Install dependencies + if: steps.filter.outputs.tests == 'true' run: npm ci - # 7. Fetch list of files changed in this PR + # 6. Fetch list of files changed in this PR - name: Get changed test files + if: steps.filter.outputs.tests == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -72,8 +73,9 @@ jobs: | sort -u \ > affected-drafts.txt - # 8. Run add-test-ids.js for each changed file + # 7. Run add-test-ids.js for each changed file - name: Apply missing test IDs + if: steps.filter.outputs.tests == 'true' env: CI: "false" run: | @@ -92,8 +94,9 @@ jobs: done done < affected-drafts.txt - # 9. Commit and push back to the PR branch + # 8. Commit and push back to the PR branch - name: Commit and push changes + if: steps.filter.outputs.tests == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -131,7 +134,7 @@ jobs: echo "CHANGES_MADE=true" >> $GITHUB_ENV fi - # 10. Post a summary comment on the PR + # 9. Post a summary comment on the PR - name: Post PR comment if: env.CHANGES_MADE == 'true' env: From ef1c568a1a035201599dba62f729c3cdb9f58eba Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Tue, 10 Mar 2026 12:15:34 -0700 Subject: [PATCH 17/25] Fix some remote categorization for easier dialect-specific loading --- .../{draft7 => draft2019-09}/ignore-dependentRequired.json | 4 ++-- remotes/{draft2020-12 => draft2019-09}/prefixItems.json | 0 .../{draft2019-09 => draft2020-12}/ignore-prefixItems.json | 2 +- remotes/{draft2019-09 => draft7}/dependentRequired.json | 2 +- tests/draft2019-09/optional/cross-draft.json | 4 ++-- tests/draft2020-12/optional/cross-draft.json | 2 +- tests/draft7/optional/cross-draft.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename remotes/{draft7 => draft2019-09}/ignore-dependentRequired.json (64%) rename remotes/{draft2020-12 => draft2019-09}/prefixItems.json (100%) rename remotes/{draft2019-09 => draft2020-12}/ignore-prefixItems.json (67%) rename remotes/{draft2019-09 => draft7}/dependentRequired.json (63%) diff --git a/remotes/draft7/ignore-dependentRequired.json b/remotes/draft2019-09/ignore-dependentRequired.json similarity index 64% rename from remotes/draft7/ignore-dependentRequired.json rename to remotes/draft2019-09/ignore-dependentRequired.json index 0ea927b5..f2eb5048 100644 --- a/remotes/draft7/ignore-dependentRequired.json +++ b/remotes/draft2019-09/ignore-dependentRequired.json @@ -1,7 +1,7 @@ { - "$id": "http://localhost:1234/draft7/integer.json", + "$id": "http://localhost:1234/draft2019-09/integer.json", "$schema": "http://json-schema.org/draft-07/schema#", "dependentRequired": { "foo": ["bar"] } -} \ No newline at end of file +} diff --git a/remotes/draft2020-12/prefixItems.json b/remotes/draft2019-09/prefixItems.json similarity index 100% rename from remotes/draft2020-12/prefixItems.json rename to remotes/draft2019-09/prefixItems.json diff --git a/remotes/draft2019-09/ignore-prefixItems.json b/remotes/draft2020-12/ignore-prefixItems.json similarity index 67% rename from remotes/draft2019-09/ignore-prefixItems.json rename to remotes/draft2020-12/ignore-prefixItems.json index b5ef3928..0ef44663 100644 --- a/remotes/draft2019-09/ignore-prefixItems.json +++ b/remotes/draft2020-12/ignore-prefixItems.json @@ -1,5 +1,5 @@ { - "$id": "http://localhost:1234/draft2019-09/ignore-prefixItems.json", + "$id": "http://localhost:1234/draft2020-12/ignore-prefixItems.json", "$schema": "https://json-schema.org/draft/2019-09/schema", "prefixItems": [ {"type": "string"} diff --git a/remotes/draft2019-09/dependentRequired.json b/remotes/draft7/dependentRequired.json similarity index 63% rename from remotes/draft2019-09/dependentRequired.json rename to remotes/draft7/dependentRequired.json index 0d691d96..f16a3450 100644 --- a/remotes/draft2019-09/dependentRequired.json +++ b/remotes/draft7/dependentRequired.json @@ -1,5 +1,5 @@ { - "$id": "http://localhost:1234/draft2019-09/dependentRequired.json", + "$id": "http://localhost:1234/draft7/dependentRequired.json", "$schema": "https://json-schema.org/draft/2019-09/schema", "dependentRequired": { "foo": ["bar"] diff --git a/tests/draft2019-09/optional/cross-draft.json b/tests/draft2019-09/optional/cross-draft.json index efd3f87d..a96ae506 100644 --- a/tests/draft2019-09/optional/cross-draft.json +++ b/tests/draft2019-09/optional/cross-draft.json @@ -4,7 +4,7 @@ "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "array", - "$ref": "http://localhost:1234/draft2020-12/prefixItems.json" + "$ref": "http://localhost:1234/draft2019-09/prefixItems.json" }, "tests": [ { @@ -26,7 +26,7 @@ "type": "object", "allOf": [ { "properties": { "foo": true } }, - { "$ref": "http://localhost:1234/draft7/ignore-dependentRequired.json" } + { "$ref": "http://localhost:1234/draft2019-09/ignore-dependentRequired.json" } ] }, "tests": [ diff --git a/tests/draft2020-12/optional/cross-draft.json b/tests/draft2020-12/optional/cross-draft.json index 5113bd64..c21b218c 100644 --- a/tests/draft2020-12/optional/cross-draft.json +++ b/tests/draft2020-12/optional/cross-draft.json @@ -4,7 +4,7 @@ "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "array", - "$ref": "http://localhost:1234/draft2019-09/ignore-prefixItems.json" + "$ref": "http://localhost:1234/draft2020-12/ignore-prefixItems.json" }, "tests": [ { diff --git a/tests/draft7/optional/cross-draft.json b/tests/draft7/optional/cross-draft.json index 8ff53736..026919fc 100644 --- a/tests/draft7/optional/cross-draft.json +++ b/tests/draft7/optional/cross-draft.json @@ -5,7 +5,7 @@ "type": "object", "allOf": [ { "properties": { "foo": true } }, - { "$ref": "http://localhost:1234/draft2019-09/dependentRequired.json" } + { "$ref": "http://localhost:1234/draft7/dependentRequired.json" } ] }, "tests": [ From 9cb5e897f32a2680c5767d46e4f7ef3359b082dd Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Tue, 10 Mar 2026 12:17:43 -0700 Subject: [PATCH 18/25] All dependencies should be devDependencies --- package-lock.json | 38 ++++++++++++++++++++++++-------------- package.json | 8 +++----- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ce6b91d..022321b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,15 +8,13 @@ "name": "json-schema-test-suite", "version": "0.1.0", "license": "MIT", - "dependencies": { + "devDependencies": { "@hyperjump/browser": "^1.3.1", "@hyperjump/json-pointer": "^1.1.1", - "@hyperjump/json-schema": "^1.17.2", + "@hyperjump/json-schema": "^1.17.4", "@hyperjump/pact": "^1.4.0", "@hyperjump/uri": "^1.3.2", - "json-stringify-deterministic": "^1.0.12" - }, - "devDependencies": { + "json-stringify-deterministic": "^1.0.12", "jsonc-parser": "^3.3.1" } }, @@ -24,6 +22,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.1.tgz", "integrity": "sha512-Le5XZUjnVqVjkgLYv6yyWgALat/0HpB1XaCPuCZ+GCFki9NvXloSZITIJ0H+wRW7mb9At1SxvohKBbNQbrr/cw==", + "dev": true, "license": "MIT", "dependencies": { "@hyperjump/json-pointer": "^1.1.0", @@ -40,9 +39,10 @@ } }, "node_modules/@hyperjump/json-pointer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.1.tgz", - "integrity": "sha512-M0T3s7TC2JepoWPMZQn1W6eYhFh06OXwpMqL+8c5wMVpvnCKNsPgpu9u7WyCI03xVQti8JAeAy4RzUa6SYlJLA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.2.tgz", + "integrity": "sha512-zPNgu1zdhtjQHFNLGzvEsLDsLOEvhRj6u6ktIQmlz7YPESv5uF8SnAe3Dq0oL6gZ6OGWSLq2n7pphRNF6Hpg6w==", + "dev": true, "license": "MIT", "funding": { "type": "github", @@ -50,9 +50,10 @@ } }, "node_modules/@hyperjump/json-schema": { - "version": "1.17.2", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.2.tgz", - "integrity": "sha512-pCysQu2kPZFcqyJmiU5JauzPHQIQa9i9F7+S5ui8OiwcdsBZUOjdY1rfSnqgaM5sNeR3akNVXKB/WgxNEnJrWw==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.4.tgz", + "integrity": "sha512-5J1onqwejDS4Uytzu+qKh09szi3PIinkSjsjpXFtXrVU+Jkzii+sgKcKnFLaAhF7f0gUfPqhB2GtLdRdP9pIhg==", + "dev": true, "license": "MIT", "dependencies": { "@hyperjump/json-pointer": "^1.1.0", @@ -76,6 +77,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-formats/-/json-schema-formats-1.0.1.tgz", "integrity": "sha512-qvcIxysnMfcPxyPSFFzzo28o2BN1CNT5b0tQXNUP0kaFpvptQNDg8SCLvlnMg2sYxuiuqna8+azGBaBthiskAw==", + "dev": true, "license": "MIT", "dependencies": { "@hyperjump/uri": "^1.3.2", @@ -90,6 +92,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.4.0.tgz", "integrity": "sha512-01Q7VY6BcAkp9W31Fv+ciiZycxZHGlR2N6ba9BifgyclHYHdbaZgITo0U6QMhYRlem4k8pf8J31/tApxvqAz8A==", + "dev": true, "license": "MIT", "funding": { "type": "github", @@ -97,9 +100,10 @@ } }, "node_modules/@hyperjump/uri": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.2.tgz", - "integrity": "sha512-OFo5oxuSEz1ktF/LDdBTptlnPyZ66jywLO4fJRuAhnr7NGnsiL2CPoj1JRVaDqVy0nXvWNsC8O8Muw9DR++eEg==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.3.tgz", + "integrity": "sha512-rUqeUdL2aW7lzvSnCL6yUetXYzqxhsBEw9Z7Y1bEhgiRzcfO3kjY0UdD6c4H/bzxe0fXIjYuocjWQzinio8JTQ==", + "dev": true, "license": "MIT", "funding": { "type": "github", @@ -110,6 +114,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -119,6 +124,7 @@ "version": "15.1.8", "resolved": "https://registry.npmjs.org/idn-hostname/-/idn-hostname-15.1.8.tgz", "integrity": "sha512-MmLwddtSVyMtzYxx+xs2IFEbfyg/facubL/mEaAoJX/XIfjt1ly5QhPByihf4yrxZYbkQfRZVEnBgISv/e2ZWw==", + "dev": true, "license": "MIT", "dependencies": { "punycode": "^2.3.1" @@ -128,6 +134,7 @@ "version": "1.0.12", "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==", + "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -144,12 +151,14 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==", + "dev": true, "license": "MIT" }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -159,6 +168,7 @@ "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" diff --git a/package.json b/package.json index 14a9dc12..5c0c5167 100644 --- a/package.json +++ b/package.json @@ -10,15 +10,13 @@ ], "author": "http://json-schema.org", "license": "MIT", - "dependencies": { + "devDependencies": { "@hyperjump/browser": "^1.3.1", "@hyperjump/json-pointer": "^1.1.1", - "@hyperjump/json-schema": "^1.17.2", + "@hyperjump/json-schema": "^1.17.4", "@hyperjump/pact": "^1.4.0", "@hyperjump/uri": "^1.3.2", - "json-stringify-deterministic": "^1.0.12" - }, - "devDependencies": { + "json-stringify-deterministic": "^1.0.12", "jsonc-parser": "^3.3.1" } } From 61f1940c04c132efb9a79c9d44ef21258133bfa8 Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Tue, 10 Mar 2026 13:21:03 -0700 Subject: [PATCH 19/25] Fix issues with v1 tests --- remotes/v1/meta-schema.json | 204 ++++++++++++++++++++++++++++++++++++ tests/v1/defs.json | 2 +- tests/v1/ref.json | 4 +- 3 files changed, 207 insertions(+), 3 deletions(-) create mode 100644 remotes/v1/meta-schema.json diff --git a/remotes/v1/meta-schema.json b/remotes/v1/meta-schema.json new file mode 100644 index 00000000..e7eb6ba9 --- /dev/null +++ b/remotes/v1/meta-schema.json @@ -0,0 +1,204 @@ +{ + "$schema": "https://json-schema.org/v1", + "$id": "https://json-schema.org/v1/2026", + "$dynamicAnchor": "meta", + + "title": "JSON Schema Core and Validation specification meta-schema", + "type": ["object", "boolean"], + "properties": { + "$id": { + "$ref": "#/$defs/iriReferenceString", + "$comment": "Fragments not allowed.", + "pattern": "^[^#]*$" + }, + "$schema": { "$ref": "#/$defs/iriString" }, + "$ref": { "$ref": "#/$defs/iriReferenceString" }, + "$anchor": { "$ref": "#/$defs/anchorString" }, + "$dynamicRef": { "$ref": "#/$defs/anchorString" }, + "$dynamicAnchor": { "$ref": "#/$defs/anchorString" }, + "$comment": { + "type": "string" + }, + "$defs": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" } + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "deprecated": { + "type": "boolean", + "default": false + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + }, + "prefixItems": { "$ref": "#/$defs/schemaArray" }, + "items": { "$dynamicRef": "meta" }, + "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, + "minContains": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 1 + }, + "contains": { "$dynamicRef": "meta" }, + "additionalProperties": { "$dynamicRef": "meta" }, + "properties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" }, + "propertyNames": { "format": "regex" }, + "default": {} + }, + "dependentSchemas": { + "type": "object", + "additionalProperties": { "$dynamicRef": "meta" }, + "default": {} + }, + "propertyNames": { "$dynamicRef": "meta" }, + "if": { "$dynamicRef": "meta" }, + "then": { "$dynamicRef": "meta" }, + "else": { "$dynamicRef": "meta" }, + "allOf": { "$ref": "#/$defs/schemaArray" }, + "anyOf": { "$ref": "#/$defs/schemaArray" }, + "oneOf": { "$ref": "#/$defs/schemaArray" }, + "not": { "$dynamicRef": "meta" }, + "unevaluatedItems": { "$dynamicRef": "meta" }, + "unevaluatedProperties": { "$dynamicRef": "meta" }, + "type": { + "anyOf": [ + { "$ref": "#/$defs/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/$defs/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "const": true, + "enum": { + "type": "array", + "items": true + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, + "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, + "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, + "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/$defs/stringArray" }, + "dependentRequired": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/stringArray" + } + }, + "format": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "contentMediaType": { "type": "string" }, + "contentSchema": { "$dynamicRef": "meta" }, + + "$vocabulary": { + "$comment": "Proposed keyword: https://github.com/json-schema-org/json-schema-spec/blob/main/specs/proposals/vocabularies.md" + }, + "propertyDependencies": { + "$comment": "Proposed keyword: https://github.com/json-schema-org/json-schema-spec/blob/main/specs/proposals/propertyDependencies.md" + } + }, + "patternProperties": { + "^x-": true + }, + "propertyNames": { + "pattern": "^[^$]|^\\$(id|schema|ref|anchor|dynamicRef|dynamicAnchor|comment|defs)$" + }, + "$dynamicRef": "extension", + "unevaluatedProperties": false, + "$defs": { + "extension": { + "$dynamicAnchor": "extension" + }, + "anchorString": { + "type": "string", + "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" + }, + "iriString": { + "type": "string", + "format": "iri" + }, + "iriReferenceString": { + "type": "string", + "format": "iri-reference" + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 0 + }, + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$dynamicRef": "meta" } + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + } +} diff --git a/tests/v1/defs.json b/tests/v1/defs.json index 8e167655..f7434598 100644 --- a/tests/v1/defs.json +++ b/tests/v1/defs.json @@ -3,7 +3,7 @@ "description": "validate definition against metaschema", "schema": { "$schema": "https://json-schema.org/v1", - "$ref": "https://json-schema.org/v1" + "$ref": "http://localhost:1234/v1/meta-schema.json" }, "tests": [ { diff --git a/tests/v1/ref.json b/tests/v1/ref.json index e7a36f68..4c395ce0 100644 --- a/tests/v1/ref.json +++ b/tests/v1/ref.json @@ -185,7 +185,7 @@ "description": "remote ref, containing refs itself", "schema": { "$schema": "https://json-schema.org/v1", - "$ref": "https://json-schema.org/v1" + "$ref": "http://localhost:1234/v1/meta-schema.json" }, "tests": [ { @@ -829,7 +829,7 @@ "schema": { "$schema": "https://json-schema.org/v1", "$comment": "RFC 8141 §2.3.3, but we don't allow fragments", - "$ref": "https://json-schema.org/v1" + "$ref": "http://localhost:1234/v1/meta-schema.json" }, "tests": [ { From ed50aefadce01a0426dc7f0a9e75437f27002d41 Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Tue, 10 Mar 2026 12:19:21 -0700 Subject: [PATCH 20/25] Add alternate version of script and action --- .github/workflows/generate-test-ids.yml | 50 +++++++ scripts/add-test-ids.js | 6 +- scripts/check-test-ids.js | 6 +- scripts/generate-ids-for.js | 9 ++ scripts/load-remotes.js | 35 ----- scripts/utils/generateTestIds.js | 13 -- scripts/{normalize.js => utils/test-ids.js} | 146 +++++++++++++++++--- 7 files changed, 187 insertions(+), 78 deletions(-) create mode 100644 .github/workflows/generate-test-ids.yml create mode 100644 scripts/generate-ids-for.js delete mode 100644 scripts/load-remotes.js delete mode 100644 scripts/utils/generateTestIds.js rename scripts/{normalize.js => utils/test-ids.js} (62%) diff --git a/.github/workflows/generate-test-ids.yml b/.github/workflows/generate-test-ids.yml new file mode 100644 index 00000000..647acea1 --- /dev/null +++ b/.github/workflows/generate-test-ids.yml @@ -0,0 +1,50 @@ +name: Test IDs + +on: [pull_request] + +jobs: + generate: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} # Check out the PR branch, not the merge commit + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: latest + + - name: Install dependencies + run: npm ci + + - name: Generate test IDs for v1 + run: node scripts/generate-ids-for.js v1 + + - name: Generate test IDs for draft2020-12 + run: node scripts/generate-ids-for.js draft2020-12 + + - name: Generate test IDs for draft2019-09 + run: node scripts/generate-ids-for.js draft2019-09 + + - name: Generate test IDs for draft7 + run: node scripts/generate-ids-for.js draft7 + + - name: Generate test IDs for draft6 + run: node scripts/generate-ids-for.js draft6 + + - name: Generate test IDs for draft4 + run: node scripts/generate-ids-for.js draft4 + + - name: Commit and push changes + run: | + git config user.name "test-id-action" + git config user.email "test-id-action@users.noreply.github.com" + git add "tests/**/*.json" + git commit -m "Update test IDs based on the schema, test data, and expected result." || echo "No changes to commit" + git push diff --git a/scripts/add-test-ids.js b/scripts/add-test-ids.js index 420fa5a8..422d2415 100644 --- a/scripts/add-test-ids.js +++ b/scripts/add-test-ids.js @@ -1,9 +1,7 @@ import * as fs from "node:fs"; import { parse, modify, applyEdits } from "jsonc-parser"; -import { normalize } from "./normalize.js"; -import { loadRemotes } from "./load-remotes.js"; -import generateTestId from "./utils/generateTestIds.js"; +import { loadRemotes, generateTestId, normalizeSchema } from "./utils/test-ids.js"; const DIALECT_MAP = { @@ -27,7 +25,7 @@ async function addIdsToFile(filePath, dialectUri) { for (let i = 0; i < tests.length; i++) { const testCase = tests[i]; - const normalizedSchema = await normalize(testCase.schema, dialectUri); + const normalizedSchema = await normalizeSchema(testCase.schema, dialectUri); for (let j = 0; j < testCase.tests.length; j++) { const test = testCase.tests[j]; diff --git a/scripts/check-test-ids.js b/scripts/check-test-ids.js index 1d1d9baf..7f7db311 100644 --- a/scripts/check-test-ids.js +++ b/scripts/check-test-ids.js @@ -1,8 +1,6 @@ import * as fs from "node:fs"; import * as path from "node:path"; -import { normalize } from "./normalize.js"; -import { loadRemotes } from "./load-remotes.js"; -import generateTestId from "./utils/generateTestIds.js"; +import { loadRemotes, generateTestId, normalizeSchema } from "./utils/test-ids.js"; import jsonFiles from "./utils/jsonfiles.js"; @@ -47,7 +45,7 @@ async function checkVersion(dir) { const testCases = JSON.parse(fs.readFileSync(file, "utf8")); for (const testCase of testCases) { - const normalizedSchema = await normalize(testCase.schema, dialectUri); + const normalizedSchema = await normalizeSchema(testCase.schema, dialectUri); for (const test of testCase.tests) { if (!test.id) { diff --git a/scripts/generate-ids-for.js b/scripts/generate-ids-for.js new file mode 100644 index 00000000..9ce59b33 --- /dev/null +++ b/scripts/generate-ids-for.js @@ -0,0 +1,9 @@ +import { generateIdsFor } from "./utils/test-ids.js"; + +const version = process.argv[2]; +if (!version) { + console.error("Usage: node scripts/generate-ids-for.js "); + process.exit(1); +} + +await generateIdsFor(version); diff --git a/scripts/load-remotes.js b/scripts/load-remotes.js deleted file mode 100644 index eec8ba77..00000000 --- a/scripts/load-remotes.js +++ /dev/null @@ -1,35 +0,0 @@ -import * as fs from "node:fs"; -import { toAbsoluteIri } from "@hyperjump/uri"; -import { registerSchema } from "@hyperjump/json-schema/draft-2020-12"; - -// Keep track of which remote URLs we've already registered -const loadedRemotes = new Set(); - -export const loadRemotes = (dialectId, filePath, url = "") => { - if (!fs.existsSync(filePath)) { - console.warn(`Warning: Remotes path not found: ${filePath}`); - return; - } - - fs.readdirSync(filePath, { withFileTypes: true }).forEach((entry) => { - if (entry.isFile() && entry.name.endsWith(".json")) { - const remotePath = `${filePath}/${entry.name}`; - const remoteUrl = `http://localhost:1234${url}/${entry.name}`; - - // If we've already registered this URL once, skip it - if (loadedRemotes.has(remoteUrl)) { - return; - } - - const remote = JSON.parse(fs.readFileSync(remotePath, "utf8")); - - // Only register if $schema matches dialect OR there's no $schema - if (!remote.$schema || toAbsoluteIri(remote.$schema) === dialectId) { - registerSchema(remote, remoteUrl, dialectId); - loadedRemotes.add(remoteUrl); // Remember we've registered it - } - } else if (entry.isDirectory()) { - loadRemotes(dialectId, `${filePath}/${entry.name}`, `${url}/${entry.name}`); - } - }); -}; \ No newline at end of file diff --git a/scripts/utils/generateTestIds.js b/scripts/utils/generateTestIds.js deleted file mode 100644 index 45a3dbb7..00000000 --- a/scripts/utils/generateTestIds.js +++ /dev/null @@ -1,13 +0,0 @@ -import * as crypto from "node:crypto"; -import jsonStringify from "json-stringify-deterministic"; - -export default function generateTestId(normalizedSchema, testData, testValid) { - return crypto - .createHash("md5") - .update( - jsonStringify(normalizedSchema) + - jsonStringify(testData) + - testValid - ) - .digest("hex"); -} \ No newline at end of file diff --git a/scripts/normalize.js b/scripts/utils/test-ids.js similarity index 62% rename from scripts/normalize.js rename to scripts/utils/test-ids.js index 94ffeb91..ca5beec9 100644 --- a/scripts/normalize.js +++ b/scripts/utils/test-ids.js @@ -1,34 +1,108 @@ -import * as Schema from "@hyperjump/browser"; +import * as crypto from "node:crypto"; +import * as fs from "node:fs/promises"; +import * as path from "node:path"; +import jsonStringify from "json-stringify-deterministic"; +import { applyEdits, modify } from "jsonc-parser"; + import * as Pact from "@hyperjump/pact"; import * as JsonPointer from "@hyperjump/json-pointer"; -import { toAbsoluteIri } from "@hyperjump/uri"; -import { registerSchema, unregisterSchema } from "@hyperjump/json-schema/draft-2020-12"; -import { getSchema, getKeywordId } from "@hyperjump/json-schema/experimental"; +import * as Schema from "@hyperjump/browser"; +import { registerSchema, unregisterSchema } from "@hyperjump/json-schema"; +import { getSchema, getKeywordId, getKeywordName } from "@hyperjump/json-schema/experimental"; +import "@hyperjump/json-schema/draft-2020-12"; import "@hyperjump/json-schema/draft-2019-09"; import "@hyperjump/json-schema/draft-07"; import "@hyperjump/json-schema/draft-06"; import "@hyperjump/json-schema/draft-04"; +const DIALECT_MAP = { + "v1": "https://json-schema.org/v1", + "draft2020-12": "https://json-schema.org/draft/2020-12/schema", + "draft2019-09": "https://json-schema.org/draft/2019-09/schema", + "draft7": "http://json-schema.org/draft-07/schema", + "draft6": "http://json-schema.org/draft-06/schema", + "draft4": "http://json-schema.org/draft-04/schema", + "draft3": "http://json-schema.org/draft-03/schema" +}; + +export const generateIdsFor = async (version) => { + const dialectUri = DIALECT_MAP[version]; + + const registeredSchemas = await loadRemotes(version); + + for (const entry of await fs.readdir(`./tests/${version}`, { recursive: true, withFileTypes: true })) { + if (!entry.isFile() || path.extname(entry.name) !== ".json") { + continue; + } + + const edits = []; + const filePath = path.resolve(entry.parentPath, entry.name); + const json = await fs.readFile(filePath, "utf8") + const suite = JSON.parse(json); + + for (let testCaseIndex = 0; testCaseIndex < suite.length; testCaseIndex++) { + const testCase = suite[testCaseIndex]; + + try { + const normalizedSchema = await normalizeSchema(testCase.schema, dialectUri); + + for (let testIndex = 0; testIndex < testCase.tests.length; testIndex++) { + const test = testCase.tests[testIndex]; + const id = generateTestId(normalizedSchema, test.data, test.valid); + + edits.push(...modify(json, [testCaseIndex, "tests", testIndex, "id"], id, { + formattingOptions: { + insertSpaces: true, + tabSize: 4 + } + })); + } + } catch (error) { + console.log(`Failed to generate an ID for ${version} ${entry.name}: ${testCase.description}`); + // console.log(error); + } + } + + if (edits.length > 0) { + const updatedJson = applyEdits(json, edits); + await fs.writeFile(filePath, updatedJson); + } + } + + for (const remoteUri of registeredSchemas) { + unregisterSchema(remoteUri); + } +}; + +export const loadRemotes = async (version, filePath = `./remotes`, url = "") => { + const registeredSchemas = []; -const sanitizeTopLevelId = (schema) => { - if (typeof schema !== "object" || schema === null) return schema; - const copy = { ...schema }; - if (typeof copy.$id === "string" && copy.$id.startsWith("file:")) { - copy.$id = copy.$id.replace(/^file:/, "x-file:"); + for (const entry of await fs.readdir(filePath, { withFileTypes: true })) { + if (entry.isFile() && path.extname(entry.name) === ".json") { + const remote = JSON.parse(await fs.readFile(`${filePath}/${entry.name}`, "utf8")); + const schemaUri = `http://localhost:1234${url}/${entry.name}`; + registerSchema(remote, schemaUri, DIALECT_MAP[version]); + registeredSchemas.push(schemaUri); + } else if (entry.isDirectory() && entry.name === version || !(entry.name in DIALECT_MAP)) { + registeredSchemas.push(...await loadRemotes(version, `${filePath}/${entry.name}`, `${url}/${entry.name}`)); + } } - return copy; + + return registeredSchemas; }; -// =========================================== +export const generateTestId = (normalizedSchema, testData, testValid) => { + return crypto + .createHash("md5") + .update(jsonStringify(normalizedSchema) + jsonStringify(testData) + testValid) + .digest("hex"); +}; -export const normalize = async (rawSchema, dialectUri) => { +export const normalizeSchema = async (rawSchema, dialectUri) => { const schemaUri = "https://test-suite.json-schema.org/main"; - - const safeSchema = sanitizeTopLevelId(rawSchema); - try { - + const safeSchema = sanitizeTopLevelId(rawSchema, dialectUri); registerSchema(safeSchema, schemaUri, dialectUri); const schema = await getSchema(schemaUri); @@ -40,6 +114,20 @@ export const normalize = async (rawSchema, dialectUri) => { } }; +const sanitizeTopLevelId = (schema, dialectUri) => { + if (typeof schema !== "object") { + return schema; + } + + const idToken = getKeywordName(dialectUri, "https://json-schema.org/keyword/id") + ?? getKeywordName(dialectUri, "https://json-schema.org/keyword/draft-04/id"); + if (idToken in schema) { + schema[idToken] = schema[idToken].replace(/^file:/, "x-file:"); + } + + return schema; +}; + const compile = async (schema, ast) => { if (!(schema.document.baseUri in ast.metaData)) { ast.metaData[schema.document.baseUri] = { @@ -124,16 +212,13 @@ const keywordHandlers = { "https://json-schema.org/keyword/dependentSchemas": objectApplicator, "https://json-schema.org/keyword/deprecated": simpleValue, "https://json-schema.org/keyword/description": simpleValue, - "https://json-schema.org/keyword/dynamicRef": simpleValue, // base dynamicRef - - "https://json-schema.org/keyword/draft-2020-12/dynamicRef": simpleValue, - - + "https://json-schema.org/keyword/dynamicRef": simpleValue, "https://json-schema.org/keyword/else": simpleApplicator, "https://json-schema.org/keyword/enum": simpleValue, "https://json-schema.org/keyword/examples": simpleValue, "https://json-schema.org/keyword/exclusiveMaximum": simpleValue, "https://json-schema.org/keyword/exclusiveMinimum": simpleValue, + "https://json-schema.org/keyword/format": simpleValue, "https://json-schema.org/keyword/if": simpleApplicator, "https://json-schema.org/keyword/items": simpleApplicator, "https://json-schema.org/keyword/maxContains": simpleValue, @@ -153,6 +238,22 @@ const keywordHandlers = { "https://json-schema.org/keyword/patternProperties": objectApplicator, "https://json-schema.org/keyword/prefixItems": arrayApplicator, "https://json-schema.org/keyword/properties": objectApplicator, + "https://json-schema.org/keyword/propertyDependencies": (keyword, ast) => { + return Pact.pipe( + Schema.entries(keyword), + Pact.asyncMap(async ([propertyName, valueSchemaMap]) => { + return [ + propertyName, + await Pact.pipe( + Schema.entries(valueSchemaMap), + Pact.asyncMap(async ([propertyValue, schema]) => [propertyValue, await compile(schema, ast)]), + Pact.asyncCollectObject + ) + ]; + }), + Pact.asyncCollectObject + ); + }, "https://json-schema.org/keyword/propertyNames": simpleApplicator, "https://json-schema.org/keyword/readOnly": simpleValue, "https://json-schema.org/keyword/ref": compile, @@ -166,6 +267,7 @@ const keywordHandlers = { "https://json-schema.org/keyword/unknown": simpleValue, "https://json-schema.org/keyword/writeOnly": simpleValue, + "https://json-schema.org/keyword/draft-2020-12/dynamicRef": simpleValue, "https://json-schema.org/keyword/draft-2020-12/format": simpleValue, "https://json-schema.org/keyword/draft-2020-12/format-assertion": simpleValue, @@ -200,4 +302,4 @@ const keywordHandlers = { }, "https://json-schema.org/keyword/draft-04/maximum": simpleValue, "https://json-schema.org/keyword/draft-04/minimum": simpleValue -}; \ No newline at end of file +}; From 4d986341893e18ed2335acf08fbf23652c07a073 Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Tue, 10 Mar 2026 15:51:52 -0700 Subject: [PATCH 21/25] Disable generating test ids for now --- .github/workflows/generate-test-ids.yml | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/generate-test-ids.yml b/.github/workflows/generate-test-ids.yml index 647acea1..1a06e53c 100644 --- a/.github/workflows/generate-test-ids.yml +++ b/.github/workflows/generate-test-ids.yml @@ -23,23 +23,23 @@ jobs: - name: Install dependencies run: npm ci - - name: Generate test IDs for v1 - run: node scripts/generate-ids-for.js v1 - - - name: Generate test IDs for draft2020-12 - run: node scripts/generate-ids-for.js draft2020-12 - - - name: Generate test IDs for draft2019-09 - run: node scripts/generate-ids-for.js draft2019-09 - - - name: Generate test IDs for draft7 - run: node scripts/generate-ids-for.js draft7 - - - name: Generate test IDs for draft6 - run: node scripts/generate-ids-for.js draft6 - - - name: Generate test IDs for draft4 - run: node scripts/generate-ids-for.js draft4 + # - name: Generate test IDs for v1 + # run: node scripts/generate-ids-for.js v1 + # + # - name: Generate test IDs for draft2020-12 + # run: node scripts/generate-ids-for.js draft2020-12 + # + # - name: Generate test IDs for draft2019-09 + # run: node scripts/generate-ids-for.js draft2019-09 + # + # - name: Generate test IDs for draft7 + # run: node scripts/generate-ids-for.js draft7 + # + # - name: Generate test IDs for draft6 + # run: node scripts/generate-ids-for.js draft6 + # + # - name: Generate test IDs for draft4 + # run: node scripts/generate-ids-for.js draft4 - name: Commit and push changes run: | From 470010d59ba1c4714cfcdf056d60818f2a782309 Mon Sep 17 00:00:00 2001 From: Jason Desrosiers Date: Tue, 10 Mar 2026 16:20:20 -0700 Subject: [PATCH 22/25] Try to fix action checkout bug --- .github/workflows/generate-test-ids.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-test-ids.yml b/.github/workflows/generate-test-ids.yml index 1a06e53c..3f6d40e2 100644 --- a/.github/workflows/generate-test-ids.yml +++ b/.github/workflows/generate-test-ids.yml @@ -13,7 +13,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} # Check out the PR branch, not the merge commit + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} # Check out the PR branch, not the merge commit + fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v4 @@ -47,4 +49,4 @@ jobs: git config user.email "test-id-action@users.noreply.github.com" git add "tests/**/*.json" git commit -m "Update test IDs based on the schema, test data, and expected result." || echo "No changes to commit" - git push + git push origin ${{ github.event.pull_request.head.ref }} From 323a738ad3790f272cda23bcc89e29b8e6d54ba9 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Sat, 14 Mar 2026 15:43:46 +0530 Subject: [PATCH 23/25] fix: accept incoming changes for package files --- package-lock.json | 57 ----------------------------------------------- package.json | 12 ---------- 2 files changed, 69 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2cd110a..022321b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,17 +8,6 @@ "name": "json-schema-test-suite", "version": "0.1.0", "license": "MIT", -<<<<<<< HEAD - "dependencies": { - "@hyperjump/browser": "^1.3.1", - "@hyperjump/json-pointer": "^1.1.1", - "@hyperjump/json-schema": "^1.17.2", - "@hyperjump/pact": "^1.4.0", - "@hyperjump/uri": "^1.3.2", - "json-stringify-deterministic": "^1.0.12" - }, - "devDependencies": { -======= "devDependencies": { "@hyperjump/browser": "^1.3.1", "@hyperjump/json-pointer": "^1.1.1", @@ -26,7 +15,6 @@ "@hyperjump/pact": "^1.4.0", "@hyperjump/uri": "^1.3.2", "json-stringify-deterministic": "^1.0.12", ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "jsonc-parser": "^3.3.1" } }, @@ -34,10 +22,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.3.1.tgz", "integrity": "sha512-Le5XZUjnVqVjkgLYv6yyWgALat/0HpB1XaCPuCZ+GCFki9NvXloSZITIJ0H+wRW7mb9At1SxvohKBbNQbrr/cw==", -<<<<<<< HEAD -======= "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "dependencies": { "@hyperjump/json-pointer": "^1.1.0", @@ -54,16 +39,10 @@ } }, "node_modules/@hyperjump/json-pointer": { -<<<<<<< HEAD - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.1.tgz", - "integrity": "sha512-M0T3s7TC2JepoWPMZQn1W6eYhFh06OXwpMqL+8c5wMVpvnCKNsPgpu9u7WyCI03xVQti8JAeAy4RzUa6SYlJLA==", -======= "version": "1.1.2", "resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.2.tgz", "integrity": "sha512-zPNgu1zdhtjQHFNLGzvEsLDsLOEvhRj6u6ktIQmlz7YPESv5uF8SnAe3Dq0oL6gZ6OGWSLq2n7pphRNF6Hpg6w==", "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "funding": { "type": "github", @@ -71,16 +50,10 @@ } }, "node_modules/@hyperjump/json-schema": { -<<<<<<< HEAD - "version": "1.17.2", - "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.2.tgz", - "integrity": "sha512-pCysQu2kPZFcqyJmiU5JauzPHQIQa9i9F7+S5ui8OiwcdsBZUOjdY1rfSnqgaM5sNeR3akNVXKB/WgxNEnJrWw==", -======= "version": "1.17.4", "resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.17.4.tgz", "integrity": "sha512-5J1onqwejDS4Uytzu+qKh09szi3PIinkSjsjpXFtXrVU+Jkzii+sgKcKnFLaAhF7f0gUfPqhB2GtLdRdP9pIhg==", "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "dependencies": { "@hyperjump/json-pointer": "^1.1.0", @@ -104,10 +77,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@hyperjump/json-schema-formats/-/json-schema-formats-1.0.1.tgz", "integrity": "sha512-qvcIxysnMfcPxyPSFFzzo28o2BN1CNT5b0tQXNUP0kaFpvptQNDg8SCLvlnMg2sYxuiuqna8+azGBaBthiskAw==", -<<<<<<< HEAD -======= "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "dependencies": { "@hyperjump/uri": "^1.3.2", @@ -122,10 +92,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.4.0.tgz", "integrity": "sha512-01Q7VY6BcAkp9W31Fv+ciiZycxZHGlR2N6ba9BifgyclHYHdbaZgITo0U6QMhYRlem4k8pf8J31/tApxvqAz8A==", -<<<<<<< HEAD -======= "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "funding": { "type": "github", @@ -133,16 +100,10 @@ } }, "node_modules/@hyperjump/uri": { -<<<<<<< HEAD - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.2.tgz", - "integrity": "sha512-OFo5oxuSEz1ktF/LDdBTptlnPyZ66jywLO4fJRuAhnr7NGnsiL2CPoj1JRVaDqVy0nXvWNsC8O8Muw9DR++eEg==", -======= "version": "1.3.3", "resolved": "https://registry.npmjs.org/@hyperjump/uri/-/uri-1.3.3.tgz", "integrity": "sha512-rUqeUdL2aW7lzvSnCL6yUetXYzqxhsBEw9Z7Y1bEhgiRzcfO3kjY0UdD6c4H/bzxe0fXIjYuocjWQzinio8JTQ==", "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "funding": { "type": "github", @@ -153,10 +114,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", -<<<<<<< HEAD -======= "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "engines": { "node": ">= 0.6" @@ -166,10 +124,7 @@ "version": "15.1.8", "resolved": "https://registry.npmjs.org/idn-hostname/-/idn-hostname-15.1.8.tgz", "integrity": "sha512-MmLwddtSVyMtzYxx+xs2IFEbfyg/facubL/mEaAoJX/XIfjt1ly5QhPByihf4yrxZYbkQfRZVEnBgISv/e2ZWw==", -<<<<<<< HEAD -======= "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "dependencies": { "punycode": "^2.3.1" @@ -179,10 +134,7 @@ "version": "1.0.12", "resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz", "integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==", -<<<<<<< HEAD -======= "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "engines": { "node": ">= 4" @@ -199,20 +151,14 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/just-curry-it/-/just-curry-it-5.3.0.tgz", "integrity": "sha512-silMIRiFjUWlfaDhkgSzpuAyQ6EX/o09Eu8ZBfmFwQMbax7+LQzeIU2CBrICT6Ne4l86ITCGvUCBpCubWYy0Yw==", -<<<<<<< HEAD -======= "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT" }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", -<<<<<<< HEAD -======= "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "license": "MIT", "engines": { "node": ">=6" @@ -222,10 +168,7 @@ "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", -<<<<<<< HEAD -======= "dev": true, ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" diff --git a/package.json b/package.json index 66de9afd..5c0c5167 100644 --- a/package.json +++ b/package.json @@ -10,17 +10,6 @@ ], "author": "http://json-schema.org", "license": "MIT", -<<<<<<< HEAD - "dependencies": { - "@hyperjump/browser": "^1.3.1", - "@hyperjump/json-pointer": "^1.1.1", - "@hyperjump/json-schema": "^1.17.2", - "@hyperjump/pact": "^1.4.0", - "@hyperjump/uri": "^1.3.2", - "json-stringify-deterministic": "^1.0.12" - }, - "devDependencies": { -======= "devDependencies": { "@hyperjump/browser": "^1.3.1", "@hyperjump/json-pointer": "^1.1.1", @@ -28,7 +17,6 @@ "@hyperjump/pact": "^1.4.0", "@hyperjump/uri": "^1.3.2", "json-stringify-deterministic": "^1.0.12", ->>>>>>> 470010d59ba1c4714cfcdf056d60818f2a782309 "jsonc-parser": "^3.3.1" } } From db70c2cf2fd4f6183b013eeea4b611188227e3f6 Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Sat, 14 Mar 2026 16:05:25 +0530 Subject: [PATCH 24/25] removed the not needed second test file filter --- .github/workflows/apply-test-ids.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/apply-test-ids.yml b/.github/workflows/apply-test-ids.yml index ed900467..b6b3ce9b 100644 --- a/.github/workflows/apply-test-ids.yml +++ b/.github/workflows/apply-test-ids.yml @@ -19,36 +19,34 @@ jobs: id: changes with: filters: | - tests: - - 'tests/**/*.json' other: - '!tests/**/*.json' - name: Block mixed changes - if: steps.changes.outputs.tests == 'true' && steps.changes.outputs.other == 'true' + if: steps.changes.outputs.other == 'true' run: | echo "Tests and other files were changed together." echo "Please submit test JSON changes separately." exit 1 - name: Checkout PR branch - if: steps.changes.outputs.tests == 'true' + if: steps.changes.outputs.other != 'true' uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Setup Node.js - if: steps.changes.outputs.tests == 'true' + if: steps.changes.outputs.other != 'true' uses: actions/setup-node@v4 with: node-version: 20 - name: Install dependencies - if: steps.changes.outputs.tests == 'true' + if: steps.changes.outputs.other != 'true' run: npm ci - name: Generate test IDs - if: steps.changes.outputs.tests == 'true' + if: steps.changes.outputs.other != 'true' run: | node scripts/generate-ids-for.js draft2020-12 node scripts/generate-ids-for.js draft2019-09 @@ -58,7 +56,7 @@ jobs: node scripts/generate-ids-for.js v1 - name: Commit and push - if: steps.changes.outputs.tests == 'true' + if: steps.changes.outputs.other != 'true' run: | git config user.name "test-id-bot" git config user.email "test-id-bot@users.noreply.github.com" From bbb9c2468403dc8e1e591adde4c5c437c5ce986a Mon Sep 17 00:00:00 2001 From: Anirudh Jindal Date: Sat, 14 Mar 2026 16:11:03 +0530 Subject: [PATCH 25/25] changed the node version to latest --- .github/workflows/apply-test-ids.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/apply-test-ids.yml b/.github/workflows/apply-test-ids.yml index b6b3ce9b..22495a44 100644 --- a/.github/workflows/apply-test-ids.yml +++ b/.github/workflows/apply-test-ids.yml @@ -39,7 +39,7 @@ jobs: if: steps.changes.outputs.other != 'true' uses: actions/setup-node@v4 with: - node-version: 20 + node-version: latest - name: Install dependencies if: steps.changes.outputs.other != 'true'