Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

schema-manager

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schema-manager - npm Package Compare versions

Comparing version 0.0.12 to 0.1.0

10

manager/schemaCompleter.js

@@ -59,3 +59,3 @@ "use strict";

else if (id && parentId !== undefined) {
_id = _1.Helper.urlJoin(parentId, id);
_id = _1.Helper.http.urlJoin(parentId, id);
}

@@ -110,3 +110,3 @@ else {

if (pathById) {
const schema = pathById === '#' ? root : _1.Helper.jsonPath(root, pathById);
const schema = pathById === '#' ? root : _1.Helper.obj.jsonPath(root, pathById);
const pathByAnchor = this.findInternalRef(schema, schema, '', '#' + parts[1]);

@@ -131,3 +131,3 @@ if (pathByAnchor) {

if (parentId) {
const _ref = _1.Helper.urlJoin(parentId, current.$ref);
const _ref = _1.Helper.http.urlJoin(parentId, current.$ref);
const found = this.schemaPathById(root, _ref, '#');

@@ -149,3 +149,3 @@ if (found) {

if (parentId) {
const ref = _1.Helper.urlJoin(parentId, current.$ref);
const ref = _1.Helper.http.urlJoin(parentId, current.$ref);
// busca si el uri es un id dentro del current schema

@@ -261,3 +261,3 @@ let found = this.schemaPathById(current, ref, '#');

else if (ref.startsWith('#/')) {
return _1.Helper.jsonPath(source, ref.replace('#/', ''));
return _1.Helper.obj.jsonPath(source, ref.replace('#/', ''));
}

@@ -264,0 +264,0 @@ else {

@@ -30,3 +30,3 @@ "use strict";

// extend
_1.Helper.extends(def, base);
_1.Helper.obj.extends(def, base);
}

@@ -33,0 +33,0 @@ // remove since it was already extended

@@ -17,4 +17,4 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
const content = yield _1.Helper.get(uri);
return _1.Helper.tryParse(content);
const content = yield _1.Helper.http.get(uri);
return _1.Helper.utils.tryParse(content);
});

@@ -21,0 +21,0 @@ }

@@ -63,3 +63,3 @@ "use strict";

if (schema.$id === undefined || typeof schema.$id !== 'string') {
schema.$id = _1.Helper.createKey(schema);
schema.$id = _1.Helper.obj.createKey(schema);
}

@@ -90,3 +90,3 @@ this.schemas[schema.$id] = schema;

if (schema.$id === undefined || typeof schema.$id !== 'string') {
schema.$id = _1.Helper.createKey(schema);
schema.$id = _1.Helper.obj.createKey(schema);
}

@@ -109,3 +109,3 @@ this.schemas[schema.$id] = schema;

}
const schema = _1.Helper.clone(source);
const schema = _1.Helper.obj.clone(source);
this.extender.extend(schema);

@@ -151,3 +151,3 @@ this.completer.complete(schema);

const path = keys[1].startsWith('/') ? keys[1].replace('/', '') : keys[1];
const referenced = _1.Helper.jsonPath(externalSchema, path);
const referenced = _1.Helper.obj.jsonPath(externalSchema, path);
return { schema: externalSchema, referenced: referenced };

@@ -161,3 +161,3 @@ }

const path = ref.startsWith('#/') ? ref.replace('#/', '') : ref;
const referenced = _1.Helper.jsonPath(schema, path);
const referenced = _1.Helper.obj.jsonPath(schema, path);
return { schema: schema, referenced: referenced };

@@ -167,3 +167,3 @@ }

refs(schema) {
return _1.Helper.findAllInObject(schema, (value) => {
return _1.Helper.obj.findAllInObject(schema, (value) => {
return value.$ref !== undefined && typeof value.$ref === 'string';

@@ -173,6 +173,6 @@ }).map(p => p.$ref);

externalRefs(schema) {
const ids = _1.Helper.findAllInObject(schema, (value) => {
const ids = _1.Helper.obj.findAllInObject(schema, (value) => {
return value.$id !== undefined && typeof value.$id === 'string' && value.$id.startsWith('http');
}).map(p => p.$id);
const refs = _1.Helper.findAllInObject(schema, (value) => {
const refs = _1.Helper.obj.findAllInObject(schema, (value) => {
return value.$ref !== undefined && typeof value.$ref === 'string' && value.$ref.startsWith('http');

@@ -179,0 +179,0 @@ }).map(p => p.$ref);

{
"name": "schema-manager",
"version": "0.0.12",
"version": "0.1.0",
"description": "Schema Manager",

@@ -20,3 +20,3 @@ "author": "Flavio Lionel Rita <flaviolrita@hotmail.com>",

"dependencies": {
"h3lp": "^0.0.12"
"h3lp": "^0.1.8"
},

@@ -23,0 +23,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc