127?b+=\"x\":b+=d[q];if(!b.match(hostnamePartPattern)){var j=y.slice(0,m),x=y.slice(m+1),U=d.match(hostnamePartStart);U&&(j.push(U[1]),x.unshift(U[2])),x.length&&(o=\"/\"+x.join(\".\")+o),this.hostname=j.join(\".\");break}}}this.hostname.length>hostnameMaxLen?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=punycode.toASCII(this.hostname));var C=this.port?\":\"+this.port:\"\",A=this.hostname||\"\";this.host=A+C,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==o[0]&&(o=\"/\"+o))}if(!unsafeProtocol[l])for(m=0,P=autoEscape.length;m0)&&e.host.split(\"@\"))&&(e.auth=U.shift(),e.host=e.hostname=U.shift());return e.search=t.search,e.query=t.query,util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:\"\")+(e.search?e.search:\"\")),e.href=e.format(),e}if(!d.length)return e.pathname=null,e.search?e.path=\"/\"+e.search:e.path=null,e.href=e.format(),e;for(var q=d.slice(-1)[0],O=(e.host||t.host||d.length>1)&&(\".\"===q||\"..\"===q)||\"\"===q,j=0,x=d.length;x>=0;x--)\".\"===(q=d[x])?d.splice(x,1):\"..\"===q?(d.splice(x,1),j++):j&&(d.splice(x,1),j--);if(!y&&!P)for(;j--;j)d.unshift(\"..\");!y||\"\"===d[0]||d[0]&&\"/\"===d[0].charAt(0)||d.unshift(\"\"),O&&\"/\"!==d.join(\"/\").substr(-1)&&d.push(\"\");var U,C=\"\"===d[0]||d[0]&&\"/\"===d[0].charAt(0);b&&(e.hostname=e.host=C?\"\":d.length?d.shift():\"\",(U=!!(e.host&&e.host.indexOf(\"@\")>0)&&e.host.split(\"@\"))&&(e.auth=U.shift(),e.host=e.hostname=U.shift()));return(y=y||e.host&&d.length)&&!C&&d.unshift(\"\"),d.length?e.pathname=d.join(\"/\"):(e.pathname=null,e.path=null),util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:\"\")+(e.search?e.search:\"\")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(\":\"!==(s=s[0])&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVybC5qcyJdLCJuYW1lcyI6WyJwdW55Y29kZSIsInJlcXVpcmUiLCJ1dGlsIiwiVXJsIiwidGhpcyIsInByb3RvY29sIiwic2xhc2hlcyIsImF1dGgiLCJob3N0IiwicG9ydCIsImhvc3RuYW1lIiwiaGFzaCIsInNlYXJjaCIsInF1ZXJ5IiwicGF0aG5hbWUiLCJwYXRoIiwiaHJlZiIsImV4cG9ydHMiLCJwYXJzZSIsInVybFBhcnNlIiwicmVzb2x2ZSIsInVybFJlc29sdmUiLCJyZXNvbHZlT2JqZWN0IiwidXJsUmVzb2x2ZU9iamVjdCIsImZvcm1hdCIsInVybEZvcm1hdCIsInByb3RvY29sUGF0dGVybiIsInBvcnRQYXR0ZXJuIiwic2ltcGxlUGF0aFBhdHRlcm4iLCJkZWxpbXMiLCJ1bndpc2UiLCJjb25jYXQiLCJhdXRvRXNjYXBlIiwibm9uSG9zdENoYXJzIiwiaG9zdEVuZGluZ0NoYXJzIiwiaG9zdG5hbWVNYXhMZW4iLCJob3N0bmFtZVBhcnRQYXR0ZXJuIiwiaG9zdG5hbWVQYXJ0U3RhcnQiLCJ1bnNhZmVQcm90b2NvbCIsImphdmFzY3JpcHQiLCJqYXZhc2NyaXB0OiIsImhvc3RsZXNzUHJvdG9jb2wiLCJzbGFzaGVkUHJvdG9jb2wiLCJodHRwIiwiaHR0cHMiLCJmdHAiLCJnb3BoZXIiLCJmaWxlIiwiaHR0cDoiLCJodHRwczoiLCJmdHA6IiwiZ29waGVyOiIsImZpbGU6IiwicXVlcnlzdHJpbmciLCJ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1SSxPQUFPbkIsRUFBTzFHLFVBQ3ZEMEcsRUFBT3ZHLE1BQVF1RyxFQUFPeEcsU0FBV3dHLEVBQU94RyxTQUFXLEtBQ3BDd0csRUFBTzFHLE9BQVMwRyxFQUFPMUcsT0FBUyxLQUVqRDBHLEVBQU8vRyxLQUFPeUQsRUFBU3pELE1BQVErRyxFQUFPL0csS0FDdEMrRyxFQUFPaEgsUUFBVWdILEVBQU9oSCxTQUFXMEQsRUFBUzFELFFBQzVDZ0gsRUFBT3RHLEtBQU9zRyxFQUFPOUYsU0FDZDhGLEdBR1RuSCxJQUFJMEQsVUFBVTZCLFVBQVksV0FDeEIsSUFBSWxGLEVBQU9KLEtBQUtJLEtBQ1pDLEVBQU9rQixZQUFZa0QsS0FBS3JFLEdBQ3hCQyxJQUVXLE9BRGJBLEVBQU9BLEVBQUssTUFFVkwsS0FBS0ssS0FBT0EsRUFBS3FFLE9BQU8sSUFFMUJ0RSxFQUFPQSxFQUFLc0UsT0FBTyxFQUFHdEUsRUFBS21FLE9BQVNsRSxFQUFLa0UsU0FFdkNuRSxJQUFNSixLQUFLTSxTQUFXRiIsImZpbGUiOiIvaG9tZS90cmF2aXMvYnVpbGQvQVBJRGV2VG9vbHMvanNvbi1zY2hlbWEtcmVmLXBhcnNlci9ub2RlX21vZHVsZXMvdXJsL3VybC5qcyJ9",
- "\"use strict\";module.exports={isString:function(n){return\"string\"==typeof n},isObject:function(n){return\"object\"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}};\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInV0aWwuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsImlzU3RyaW5nIiwiYXJnIiwiaXNPYmplY3QiLCJpc051bGwiLCJpc051bGxPclVuZGVmaW5lZCJdLCJtYXBwaW5ncyI6IkFBQUEsYUFFQUEsT0FBT0MsUUFBVSxDQUNmQyxTQUFVLFNBQVNDLEdBQ2pCLE1BQXVCLGlCQUFWLEdBRWZDLFNBQVUsU0FBU0QsR0FDakIsTUFBdUIsaUJBQVYsR0FBOEIsT0FBUkEsR0FFckNFLE9BQVEsU0FBU0YsR0FDZixPQUFlLE9BQVJBLEdBRVRHLGtCQUFtQixTQUFTSCxHQUMxQixPQUFjLE1BQVBBIiwiZmlsZSI6Ii9ob21lL3RyYXZpcy9idWlsZC9BUElEZXZUb29scy9qc29uLXNjaGVtYS1yZWYtcGFyc2VyL25vZGVfbW9kdWxlcy91cmwvdXRpbC5qcyJ9",
- "function deprecate(r,e){if(config(\"noDeprecation\"))return r;var o=!1;return function(){if(!o){if(config(\"throwDeprecation\"))throw new Error(e);config(\"traceDeprecation\")?console.trace(e):console.warn(e),o=!0}return r.apply(this,arguments)}}function config(r){try{if(!global.localStorage)return!1}catch(r){return!1}var e=global.localStorage[r];return null!=e&&\"true\"===String(e).toLowerCase()}module.exports=deprecate;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJyb3dzZXIuanMiXSwibmFtZXMiOlsiZGVwcmVjYXRlIiwiZm4iLCJtc2ciLCJjb25maWciLCJ3YXJuZWQiLCJFcnJvciIsImNvbnNvbGUiLCJ0cmFjZSIsIndhcm4iLCJhcHBseSIsInRoaXMiLCJhcmd1bWVudHMiLCJuYW1lIiwiZ2xvYmFsIiwibG9jYWxTdG9yYWdlIiwiXyIsInZhbCIsIlN0cmluZyIsInRvTG93ZXJDYXNlIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJtYXBwaW5ncyI6IkFBeUJBLFNBQVNBLFVBQVdDLEVBQUlDLEdBQ3RCLEdBQUlDLE9BQU8saUJBQ1QsT0FBT0YsRUFHVCxJQUFJRyxHQUFTLEVBZWIsT0FkQSxXQUNFLElBQUtBLEVBQVEsQ0FDWCxHQUFJRCxPQUFPLG9CQUNULE1BQU0sSUFBSUUsTUFBTUgsR0FDUEMsT0FBTyxvQkFDaEJHLFFBQVFDLE1BQU1MLEdBRWRJLFFBQVFFLEtBQUtOLEdBRWZFLEdBQVMsRUFFWCxPQUFPSCxFQUFHUSxNQUFNQyxLQUFNQyxZQWMxQixTQUFTUixPQUFRUyxHQUVmLElBQ0UsSUFBS0MsT0FBT0MsYUFBYyxPQUFPLEVBQ2pDLE1BQU9DLEdBQ1AsT0FBTyxFQUVULElBQUlDLEVBQU1ILE9BQU9DLGFBQWFGLEdBQzlCLE9BQUksTUFBUUksR0FDeUIsU0FBOUJDLE9BQU9ELEdBQUtFLGNBNURyQkMsT0FBT0MsUUFBVXBCIiwiZmlsZSI6Ii9ob21lL3RyYXZpcy9idWlsZC9BUElEZXZUb29scy9qc29uLXNjaGVtYS1yZWYtcGFyc2VyL25vZGVfbW9kdWxlcy91dGlsLWRlcHJlY2F0ZS9icm93c2VyLmpzIn0=",
- "module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){for(var r={},e=0;e {
// Most people will expect references to be bundled into the the "definitions" property,
// so we always crawl that property first, if it exists.
if (a === "definitions") {
@@ -64,10 +64,11 @@ function crawl (parent, key, path, pathFromRoot, indirections, inventory, $refs,
}
});
- keys.forEach(function (key) {
- var keyPath = Pointer.join(path, key);
- var keyPathFromRoot = Pointer.join(pathFromRoot, key);
- var value = obj[key];
+ // eslint-disable-next-line no-shadow
+ for (let key of keys) {
+ let keyPath = Pointer.join(path, key);
+ let keyPathFromRoot = Pointer.join(pathFromRoot, key);
+ let value = obj[key];
if ($Ref.isAllowed$Ref(value)) {
inventory$Ref(obj, key, path, keyPathFromRoot, indirections, inventory, $refs, options);
@@ -75,7 +76,7 @@ function crawl (parent, key, path, pathFromRoot, indirections, inventory, $refs,
else {
crawl(obj, key, keyPath, keyPathFromRoot, indirections, inventory, $refs, options);
}
- });
+ }
}
}
}
@@ -93,17 +94,17 @@ function crawl (parent, key, path, pathFromRoot, indirections, inventory, $refs,
* @param {$RefParserOptions} options
*/
function inventory$Ref ($refParent, $refKey, path, pathFromRoot, indirections, inventory, $refs, options) {
- var $ref = $refKey === null ? $refParent : $refParent[$refKey];
- var $refPath = url.resolve(path, $ref.$ref);
- var pointer = $refs._resolve($refPath, options);
- var depth = Pointer.parse(pathFromRoot).length;
- var file = url.stripHash(pointer.path);
- var hash = url.getHash(pointer.path);
- var external = file !== $refs._root$Ref.path;
- var extended = $Ref.isExtended$Ref($ref);
+ let $ref = $refKey === null ? $refParent : $refParent[$refKey];
+ let $refPath = url.resolve(path, $ref.$ref);
+ let pointer = $refs._resolve($refPath, options);
+ let depth = Pointer.parse(pathFromRoot).length;
+ let file = url.stripHash(pointer.path);
+ let hash = url.getHash(pointer.path);
+ let external = file !== $refs._root$Ref.path;
+ let extended = $Ref.isExtended$Ref($ref);
indirections += pointer.indirections;
- var existingEntry = findInInventory(inventory, $refParent, $refKey);
+ let existingEntry = findInInventory(inventory, $refParent, $refKey);
if (existingEntry) {
// This $Ref has already been inventoried, so we don't need to process it again
if (depth < existingEntry.depth || indirections < existingEntry.indirections) {
@@ -115,18 +116,18 @@ function inventory$Ref ($refParent, $refKey, path, pathFromRoot, indirections, i
}
inventory.push({
- $ref: $ref, // The JSON Reference (e.g. {$ref: string})
+ $ref, // The JSON Reference (e.g. {$ref: string})
parent: $refParent, // The object that contains this $ref pointer
key: $refKey, // The key in `parent` that is the $ref pointer
- pathFromRoot: pathFromRoot, // The path to the $ref pointer, from the JSON Schema root
- depth: depth, // How far from the JSON Schema root is this $ref pointer?
- file: file, // The file that the $ref pointer resolves to
- hash: hash, // The hash within `file` that the $ref pointer resolves to
+ pathFromRoot, // The path to the $ref pointer, from the JSON Schema root
+ depth, // How far from the JSON Schema root is this $ref pointer?
+ file, // The file that the $ref pointer resolves to
+ hash, // The hash within `file` that the $ref pointer resolves to
value: pointer.value, // The resolved value of the $ref pointer
circular: pointer.circular, // Is this $ref pointer DIRECTLY circular? (i.e. it references itself)
- extended: extended, // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref")
- external: external, // Does this $ref pointer point to a file other than the main JSON Schema file?
- indirections: indirections, // The number of indirect references that were traversed to resolve the value
+ extended, // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref")
+ external, // Does this $ref pointer point to a file other than the main JSON Schema file?
+ indirections, // The number of indirect references that were traversed to resolve the value
});
// Recursively crawl the resolved value
@@ -158,7 +159,7 @@ function inventory$Ref ($refParent, $refKey, path, pathFromRoot, indirections, i
*/
function remap (inventory) {
// Group & sort all the $ref pointers, so they're in the order that we need to dereference/remap them
- inventory.sort(function (a, b) {
+ inventory.sort((a, b) => {
if (a.file !== b.file) {
// Group all the $refs that point to the same file
return a.file < b.file ? -1 : +1;
@@ -186,8 +187,8 @@ function remap (inventory) {
else {
// Determine how far each $ref is from the "definitions" property.
// Most people will expect references to be bundled into the the "definitions" property if possible.
- var aDefinitionsIndex = a.pathFromRoot.lastIndexOf("/definitions");
- var bDefinitionsIndex = b.pathFromRoot.lastIndexOf("/definitions");
+ let aDefinitionsIndex = a.pathFromRoot.lastIndexOf("/definitions");
+ let bDefinitionsIndex = b.pathFromRoot.lastIndexOf("/definitions");
if (aDefinitionsIndex !== bDefinitionsIndex) {
// Give higher priority to the $ref that's closer to the "definitions" property
@@ -200,8 +201,8 @@ function remap (inventory) {
}
});
- var file, hash, pathFromRoot;
- inventory.forEach(function (entry) {
+ let file, hash, pathFromRoot;
+ for (let entry of inventory) {
// console.log('Re-mapping $ref pointer "%s" at %s', entry.$ref.$ref, entry.pathFromRoot);
if (!entry.external) {
@@ -233,15 +234,15 @@ function remap (inventory) {
}
// console.log(' new value: %s', (entry.$ref && entry.$ref.$ref) ? entry.$ref.$ref : '[object Object]');
- });
+ }
}
/**
* TODO
*/
function findInInventory (inventory, $refParent, $refKey) {
- for (var i = 0; i < inventory.length; i++) {
- var existingEntry = inventory[i];
+ for (let i = 0; i < inventory.length; i++) {
+ let existingEntry = inventory[i];
if (existingEntry.parent === $refParent && existingEntry.key === $refKey) {
return existingEntry;
}
@@ -249,6 +250,6 @@ function findInInventory (inventory, $refParent, $refKey) {
}
function removeFromInventory (inventory, entry) {
- var index = inventory.indexOf(entry);
+ let index = inventory.indexOf(entry);
inventory.splice(index, 1);
}
diff --git a/forward_engineering/node_modules/json-schema-ref-parser/lib/dereference.js b/forward_engineering/node_modules/json-schema-ref-parser/lib/dereference.js
index 65df740..5a97011 100644
--- a/forward_engineering/node_modules/json-schema-ref-parser/lib/dereference.js
+++ b/forward_engineering/node_modules/json-schema-ref-parser/lib/dereference.js
@@ -1,149 +1,149 @@
-"use strict";
-
-var $Ref = require("./ref"),
- Pointer = require("./pointer"),
- ono = require("ono"),
- url = require("./util/url");
-
-module.exports = dereference;
-
-/**
- * Crawls the JSON schema, finds all JSON references, and dereferences them.
- * This method mutates the JSON schema object, replacing JSON references with their resolved value.
- *
- * @param {$RefParser} parser
- * @param {$RefParserOptions} options
- */
-function dereference (parser, options) {
- // console.log('Dereferencing $ref pointers in %s', parser.$refs._root$Ref.path);
- var dereferenced = crawl(parser.schema, parser.$refs._root$Ref.path, "#", [], parser.$refs, options);
- parser.$refs.circular = dereferenced.circular;
- parser.schema = dereferenced.value;
-}
-
-/**
- * Recursively crawls the given value, and dereferences any JSON references.
- *
- * @param {*} obj - The value to crawl. If it's not an object or array, it will be ignored.
- * @param {string} path - The full path of `obj`, possibly with a JSON Pointer in the hash
- * @param {string} pathFromRoot - The path of `obj` from the schema root
- * @param {object[]} parents - An array of the parent objects that have already been dereferenced
- * @param {$Refs} $refs
- * @param {$RefParserOptions} options
- * @returns {{value: object, circular: boolean}}
- */
-function crawl (obj, path, pathFromRoot, parents, $refs, options) {
- var dereferenced;
- var result = {
- value: obj,
- circular: false
- };
-
- if (obj && typeof obj === "object") {
- parents.push(obj);
-
- if ($Ref.isAllowed$Ref(obj, options)) {
- dereferenced = dereference$Ref(obj, path, pathFromRoot, parents, $refs, options);
- result.circular = dereferenced.circular;
- result.value = dereferenced.value;
- }
- else {
- Object.keys(obj).forEach(function (key) {
- var keyPath = Pointer.join(path, key);
- var keyPathFromRoot = Pointer.join(pathFromRoot, key);
- var value = obj[key];
- var circular = false;
-
- if ($Ref.isAllowed$Ref(value, options)) {
- dereferenced = dereference$Ref(value, keyPath, keyPathFromRoot, parents, $refs, options);
- circular = dereferenced.circular;
- obj[key] = dereferenced.value;
- }
- else {
- if (parents.indexOf(value) === -1) {
- dereferenced = crawl(value, keyPath, keyPathFromRoot, parents, $refs, options);
- circular = dereferenced.circular;
- obj[key] = dereferenced.value;
- }
- else {
- circular = foundCircularReference(keyPath, $refs, options);
- }
- }
-
- // Set the "isCircular" flag if this or any other property is circular
- result.circular = result.circular || circular;
- });
- }
-
- parents.pop();
- }
-
- return result;
-}
-
-/**
- * Dereferences the given JSON Reference, and then crawls the resulting value.
- *
- * @param {{$ref: string}} $ref - The JSON Reference to resolve
- * @param {string} path - The full path of `$ref`, possibly with a JSON Pointer in the hash
- * @param {string} pathFromRoot - The path of `$ref` from the schema root
- * @param {object[]} parents - An array of the parent objects that have already been dereferenced
- * @param {$Refs} $refs
- * @param {$RefParserOptions} options
- * @returns {{value: object, circular: boolean}}
- */
-function dereference$Ref ($ref, path, pathFromRoot, parents, $refs, options) {
- // console.log('Dereferencing $ref pointer "%s" at %s', $ref.$ref, path);
-
- var $refPath = url.resolve(path, $ref.$ref);
- var pointer = $refs._resolve($refPath, options);
-
- // Check for circular references
- var directCircular = pointer.circular;
- var circular = directCircular || parents.indexOf(pointer.value) !== -1;
- circular && foundCircularReference(path, $refs, options);
-
- // Dereference the JSON reference
- var dereferencedValue = $Ref.dereference($ref, pointer.value);
-
- // Crawl the dereferenced value (unless it's circular)
- if (!circular) {
- // Determine if the dereferenced value is circular
- var dereferenced = crawl(dereferencedValue, pointer.path, pathFromRoot, parents, $refs, options);
- circular = dereferenced.circular;
- dereferencedValue = dereferenced.value;
- }
-
- if (circular && !directCircular && options.dereference.circular === "ignore") {
- // The user has chosen to "ignore" circular references, so don't change the value
- dereferencedValue = $ref;
- }
-
- if (directCircular) {
- // The pointer is a DIRECT circular reference (i.e. it references itself).
- // So replace the $ref path with the absolute path from the JSON Schema root
- dereferencedValue.$ref = pathFromRoot;
- }
-
- return {
- circular: circular,
- value: dereferencedValue
- };
-}
-
-/**
- * Called when a circular reference is found.
- * It sets the {@link $Refs#circular} flag, and throws an error if options.dereference.circular is false.
- *
- * @param {string} keyPath - The JSON Reference path of the circular reference
- * @param {$Refs} $refs
- * @param {$RefParserOptions} options
- * @returns {boolean} - always returns true, to indicate that a circular reference was found
- */
-function foundCircularReference (keyPath, $refs, options) {
- $refs.circular = true;
- if (!options.dereference.circular) {
- throw ono.reference("Circular $ref pointer found at %s", keyPath);
- }
- return true;
-}
+"use strict";
+
+const $Ref = require("./ref");
+const Pointer = require("./pointer");
+const { ono } = require("ono");
+const url = require("./util/url");
+
+module.exports = dereference;
+
+/**
+ * Crawls the JSON schema, finds all JSON references, and dereferences them.
+ * This method mutates the JSON schema object, replacing JSON references with their resolved value.
+ *
+ * @param {$RefParser} parser
+ * @param {$RefParserOptions} options
+ */
+function dereference (parser, options) {
+ // console.log('Dereferencing $ref pointers in %s', parser.$refs._root$Ref.path);
+ let dereferenced = crawl(parser.schema, parser.$refs._root$Ref.path, "#", [], parser.$refs, options);
+ parser.$refs.circular = dereferenced.circular;
+ parser.schema = dereferenced.value;
+}
+
+/**
+ * Recursively crawls the given value, and dereferences any JSON references.
+ *
+ * @param {*} obj - The value to crawl. If it's not an object or array, it will be ignored.
+ * @param {string} path - The full path of `obj`, possibly with a JSON Pointer in the hash
+ * @param {string} pathFromRoot - The path of `obj` from the schema root
+ * @param {object[]} parents - An array of the parent objects that have already been dereferenced
+ * @param {$Refs} $refs
+ * @param {$RefParserOptions} options
+ * @returns {{value: object, circular: boolean}}
+ */
+function crawl (obj, path, pathFromRoot, parents, $refs, options) {
+ let dereferenced;
+ let result = {
+ value: obj,
+ circular: false
+ };
+
+ if (obj && typeof obj === "object") {
+ parents.push(obj);
+
+ if ($Ref.isAllowed$Ref(obj, options)) {
+ dereferenced = dereference$Ref(obj, path, pathFromRoot, parents, $refs, options);
+ result.circular = dereferenced.circular;
+ result.value = dereferenced.value;
+ }
+ else {
+ for (let key of Object.keys(obj)) {
+ let keyPath = Pointer.join(path, key);
+ let keyPathFromRoot = Pointer.join(pathFromRoot, key);
+ let value = obj[key];
+ let circular = false;
+
+ if ($Ref.isAllowed$Ref(value, options)) {
+ dereferenced = dereference$Ref(value, keyPath, keyPathFromRoot, parents, $refs, options);
+ circular = dereferenced.circular;
+ obj[key] = dereferenced.value;
+ }
+ else {
+ if (parents.indexOf(value) === -1) {
+ dereferenced = crawl(value, keyPath, keyPathFromRoot, parents, $refs, options);
+ circular = dereferenced.circular;
+ obj[key] = dereferenced.value;
+ }
+ else {
+ circular = foundCircularReference(keyPath, $refs, options);
+ }
+ }
+
+ // Set the "isCircular" flag if this or any other property is circular
+ result.circular = result.circular || circular;
+ }
+ }
+
+ parents.pop();
+ }
+
+ return result;
+}
+
+/**
+ * Dereferences the given JSON Reference, and then crawls the resulting value.
+ *
+ * @param {{$ref: string}} $ref - The JSON Reference to resolve
+ * @param {string} path - The full path of `$ref`, possibly with a JSON Pointer in the hash
+ * @param {string} pathFromRoot - The path of `$ref` from the schema root
+ * @param {object[]} parents - An array of the parent objects that have already been dereferenced
+ * @param {$Refs} $refs
+ * @param {$RefParserOptions} options
+ * @returns {{value: object, circular: boolean}}
+ */
+function dereference$Ref ($ref, path, pathFromRoot, parents, $refs, options) {
+ // console.log('Dereferencing $ref pointer "%s" at %s', $ref.$ref, path);
+
+ let $refPath = url.resolve(path, $ref.$ref);
+ let pointer = $refs._resolve($refPath, options);
+
+ // Check for circular references
+ let directCircular = pointer.circular;
+ let circular = directCircular || parents.indexOf(pointer.value) !== -1;
+ circular && foundCircularReference(path, $refs, options);
+
+ // Dereference the JSON reference
+ let dereferencedValue = $Ref.dereference($ref, pointer.value);
+
+ // Crawl the dereferenced value (unless it's circular)
+ if (!circular) {
+ // Determine if the dereferenced value is circular
+ let dereferenced = crawl(dereferencedValue, pointer.path, pathFromRoot, parents, $refs, options);
+ circular = dereferenced.circular;
+ dereferencedValue = dereferenced.value;
+ }
+
+ if (circular && !directCircular && options.dereference.circular === "ignore") {
+ // The user has chosen to "ignore" circular references, so don't change the value
+ dereferencedValue = $ref;
+ }
+
+ if (directCircular) {
+ // The pointer is a DIRECT circular reference (i.e. it references itself).
+ // So replace the $ref path with the absolute path from the JSON Schema root
+ dereferencedValue.$ref = pathFromRoot;
+ }
+
+ return {
+ circular,
+ value: dereferencedValue
+ };
+}
+
+/**
+ * Called when a circular reference is found.
+ * It sets the {@link $Refs#circular} flag, and throws an error if options.dereference.circular is false.
+ *
+ * @param {string} keyPath - The JSON Reference path of the circular reference
+ * @param {$Refs} $refs
+ * @param {$RefParserOptions} options
+ * @returns {boolean} - always returns true, to indicate that a circular reference was found
+ */
+function foundCircularReference (keyPath, $refs, options) {
+ $refs.circular = true;
+ if (!options.dereference.circular) {
+ throw ono.reference(`Circular $ref pointer found at ${keyPath}`);
+ }
+ return true;
+}
diff --git a/forward_engineering/node_modules/json-schema-ref-parser/lib/index.d.ts b/forward_engineering/node_modules/json-schema-ref-parser/lib/index.d.ts
index e071da9..614abb4 100644
--- a/forward_engineering/node_modules/json-schema-ref-parser/lib/index.d.ts
+++ b/forward_engineering/node_modules/json-schema-ref-parser/lib/index.d.ts
@@ -1,389 +1,389 @@
-import { JSONSchema4, JSONSchema4Type, JSONSchema6, JSONSchema6Type } from 'json-schema';
-
-export = $RefParser
-
-/**
- * This is the default export of JSON Schema $Ref Parser. You can creates instances of this class using new $RefParser(), or you can just call its static methods.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md
- */
-declare class $RefParser {
-
- /**
- * The `schema` property is the parsed/bundled/dereferenced JSON Schema object. This is the same value that is passed to the callback function (or Promise) when calling the parse, bundle, or dereference methods.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#schema
- */
- schema: $RefParser.JSONSchema
-
- /**
- * The $refs property is a `$Refs` object, which lets you access all of the externally-referenced files in the schema, as well as easily get and set specific values in the schema using JSON pointers.
- *
- * This is the same value that is passed to the callback function (or Promise) when calling the `resolve` method.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#refs
- */
- $refs: $RefParser.$Refs
-
- /**
- * Dereferences all `$ref` pointers in the JSON Schema, replacing each reference with its resolved value. This results in a schema object that does not contain any `$ref` pointers. Instead, it's a normal JavaScript object tree that can easily be crawled and used just like any other JavaScript object. This is great for programmatic usage, especially when using tools that don't understand JSON references.
- *
- * The dereference method maintains object reference equality, meaning that all `$ref` pointers that point to the same object will be replaced with references to the same object. Again, this is great for programmatic usage, but it does introduce the risk of circular references, so be careful if you intend to serialize the schema using `JSON.stringify()`. Consider using the bundle method instead, which does not create circular references.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#dereferenceschema-options-callback
- *
- * @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
- * @param options (optional)
- * @param callback (optional) A callback that will receive the dereferenced schema object
- */
- dereference(schema: string | $RefParser.JSONSchema, callback: $RefParser.SchemaCallback): void;
- dereference(schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- dereference(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- dereference(schema: string | $RefParser.JSONSchema): Promise<$RefParser.JSONSchema>;
- dereference(schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
- dereference(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
-
- /**
- * Dereferences all `$ref` pointers in the JSON Schema, replacing each reference with its resolved value. This results in a schema object that does not contain any `$ref` pointers. Instead, it's a normal JavaScript object tree that can easily be crawled and used just like any other JavaScript object. This is great for programmatic usage, especially when using tools that don't understand JSON references.
- *
- * The dereference method maintains object reference equality, meaning that all `$ref` pointers that point to the same object will be replaced with references to the same object. Again, this is great for programmatic usage, but it does introduce the risk of circular references, so be careful if you intend to serialize the schema using `JSON.stringify()`. Consider using the bundle method instead, which does not create circular references.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#dereferenceschema-options-callback
- *
- * @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
- * @param options (optional)
- * @param callback (optional) A callback that will receive the dereferenced schema object
- */
- static dereference(schema: string | $RefParser.JSONSchema, callback: $RefParser.SchemaCallback): void;
- static dereference(schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- static dereference(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- static dereference(schema: string | $RefParser.JSONSchema): Promise<$RefParser.JSONSchema>;
- static dereference(schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
- static dereference(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
-
- /**
- * Bundles all referenced files/URLs into a single schema that only has internal `$ref` pointers. This lets you split-up your schema however you want while you're building it, but easily combine all those files together when it's time to package or distribute the schema to other people. The resulting schema size will be small, since it will still contain internal JSON references rather than being fully-dereferenced.
- *
- * This also eliminates the risk of circular references, so the schema can be safely serialized using `JSON.stringify()`.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#bundleschema-options-callback
- *
- * @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
- * @param options (optional)
- * @param callback (optional) A callback that will receive the bundled schema object
- */
- bundle(schema: string | $RefParser.JSONSchema, callback: $RefParser.SchemaCallback): void;
- bundle(schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- bundle(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- bundle(schema: string | $RefParser.JSONSchema): Promise<$RefParser.JSONSchema>;
- bundle(schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
- bundle(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
-
- /**
- * Bundles all referenced files/URLs into a single schema that only has internal `$ref` pointers. This lets you split-up your schema however you want while you're building it, but easily combine all those files together when it's time to package or distribute the schema to other people. The resulting schema size will be small, since it will still contain internal JSON references rather than being fully-dereferenced.
- *
- * This also eliminates the risk of circular references, so the schema can be safely serialized using `JSON.stringify()`.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#bundleschema-options-callback
- *
- * @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
- * @param options (optional)
- * @param callback (optional) A callback that will receive the bundled schema object
- */
- static bundle(schema: string | $RefParser.JSONSchema, callback: $RefParser.SchemaCallback): void;
- static bundle(schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- static bundle(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- static bundle(schema: string | $RefParser.JSONSchema): Promise<$RefParser.JSONSchema>;
- static bundle(schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
- static bundle(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
-
- /**
- * *This method is used internally by other methods, such as `bundle` and `dereference`. You probably won't need to call this method yourself.*
- *
- * Parses the given JSON Schema file (in JSON or YAML format), and returns it as a JavaScript object. This method `does not` resolve `$ref` pointers or dereference anything. It simply parses one file and returns it.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#parseschema-options-callback
- *
- * @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. The path can be absolute or relative. In Node, the path is relative to `process.cwd()`. In the browser, it's relative to the URL of the page.
- * @param options (optional)
- * @param callback (optional) A callback that will receive the parsed schema object, or an error
- */
- parse(schema: string | $RefParser.JSONSchema, callback: $RefParser.SchemaCallback): void;
- parse(schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- parse(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- parse(schema: string | $RefParser.JSONSchema): Promise<$RefParser.JSONSchema>;
- parse(schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
- parse(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
-
- /**
- * *This method is used internally by other methods, such as `bundle` and `dereference`. You probably won't need to call this method yourself.*
- *
- * Parses the given JSON Schema file (in JSON or YAML format), and returns it as a JavaScript object. This method `does not` resolve `$ref` pointers or dereference anything. It simply parses one file and returns it.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#parseschema-options-callback
- *
- * @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. The path can be absolute or relative. In Node, the path is relative to `process.cwd()`. In the browser, it's relative to the URL of the page.
- * @param options (optional)
- * @param callback (optional) A callback that will receive the parsed schema object, or an error
- */
- static parse(schema: string | $RefParser.JSONSchema, callback: $RefParser.SchemaCallback): void;
- static parse(schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- static parse(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.SchemaCallback): void;
- static parse(schema: string | $RefParser.JSONSchema): Promise<$RefParser.JSONSchema>;
- static parse(schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
- static parse(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.JSONSchema>;
-
- /**
- * *This method is used internally by other methods, such as `bundle` and `dereference`. You probably won't need to call this method yourself.*
- *
- * Resolves all JSON references (`$ref` pointers) in the given JSON Schema file. If it references any other files/URLs, then they will be downloaded and resolved as well. This method **does not** dereference anything. It simply gives you a `$Refs` object, which is a map of all the resolved references and their values.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#resolveschema-options-callback
- *
- * @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
- * @param options (optional)
- * @param callback (optional) A callback that will receive a `$Refs` object
- */
- resolve(schema: string | $RefParser.JSONSchema, callback: $RefParser.$RefsCallback): void;
- resolve(schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.$RefsCallback): void;
- resolve(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.$RefsCallback): void;
- resolve(schema: string | $RefParser.JSONSchema): Promise<$RefParser.$Refs>;
- resolve(schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.$Refs>;
- resolve(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.$Refs>;
-
- /**
- * *This method is used internally by other methods, such as `bundle` and `dereference`. You probably won't need to call this method yourself.*
- *
- * Resolves all JSON references (`$ref` pointers) in the given JSON Schema file. If it references any other files/URLs, then they will be downloaded and resolved as well. This method **does not** dereference anything. It simply gives you a `$Refs` object, which is a map of all the resolved references and their values.
- *
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/ref-parser.md#resolveschema-options-callback
- *
- * @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
- * @param options (optional)
- * @param callback (optional) A callback that will receive a `$Refs` object
- */
- static resolve(schema: string | $RefParser.JSONSchema, callback: $RefParser.$RefsCallback): void;
- static resolve(schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.$RefsCallback): void;
- static resolve(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options, callback: $RefParser.$RefsCallback): void;
- static resolve(schema: string | $RefParser.JSONSchema): Promise<$RefParser.$Refs>;
- static resolve(schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.$Refs>;
- static resolve(baseUrl: string, schema: string | $RefParser.JSONSchema, options: $RefParser.Options): Promise<$RefParser.$Refs>;
-}
-
-declare namespace $RefParser {
-
- export type JSONSchema = JSONSchema4 | JSONSchema6;
- export type SchemaCallback = (err: Error | null, schema?: JSONSchema) => any;
- export type $RefsCallback = (err: Error | null, $refs?: $Refs) => any;
-
- /**
- * See https://github.com/APIDevTools/json-schema-ref-parser/blob/master/docs/options.md
- */
- export type Options = {
-
- /**
- * The `parse` options determine how different types of files will be parsed.
- *
- * JSON Schema `$Ref` Parser comes with built-in JSON, YAML, plain-text, and binary parsers, any of which you can configure or disable. You can also add your own custom parsers if you want.
- */
- parse?: {
- json?: ParserOptions | boolean
- yaml?: ParserOptions | boolean
- text?: (ParserOptions & { encoding?: string }) | boolean
- [key: string]: ParserOptions | boolean | undefined
- }
-
- /**
- * The `resolve` options control how JSON Schema $Ref Parser will resolve file paths and URLs, and how those files will be read/downloaded.
- *
- * JSON Schema `$Ref` Parser comes with built-in support for HTTP and HTTPS, as well as support for local files (when running in Node.js). You can configure or disable either of these built-in resolvers. You can also add your own custom resolvers if you want.
- */
- resolve?: {
-
- /**
- * Determines whether external $ref pointers will be resolved. If this option is disabled, then external `$ref` pointers will simply be ignored.
- */
- external?: boolean
- file?: Partial