New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

collimator

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collimator - npm Package Compare versions

Comparing version 4.2.1 to 5.0.0

docs/interfaces/_collimator_.extendedtabledescription.html

2

docs/assets/js/search.js

@@ -1,1 +0,1 @@

var typedoc = typedoc || {};typedoc.search = typedoc.search || {};typedoc.search.data = {"kinds":{"1":"External module","64":"Function","256":"Interface","1024":"Property"},"rows":[{"id":0,"kind":1,"name":"\"util/fileQuery\"","url":"modules/_util_filequery_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":64,"name":"fileQuery","url":"modules/_util_filequery_.html#filequery","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"util/fileQuery\""},{"id":2,"kind":1,"name":"\"inspectors/tables\"","url":"modules/_inspectors_tables_.html","classes":"tsd-kind-external-module"},{"id":3,"kind":256,"name":"TableDescription","url":"interfaces/_inspectors_tables_.tabledescription.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/tables\""},{"id":4,"kind":1024,"name":"name","url":"interfaces/_inspectors_tables_.tabledescription.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/tables\".TableDescription"},{"id":5,"kind":1024,"name":"primaryKeys","url":"interfaces/_inspectors_tables_.tabledescription.html#primarykeys","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/tables\".TableDescription"},{"id":6,"kind":64,"name":"tables","url":"modules/_inspectors_tables_.html#tables","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/tables\""},{"id":7,"kind":1,"name":"\"inspectors/schema\"","url":"modules/_inspectors_schema_.html","classes":"tsd-kind-external-module"},{"id":8,"kind":256,"name":"Column","url":"interfaces/_inspectors_schema_.column.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":9,"kind":1024,"name":"name","url":"interfaces/_inspectors_schema_.column.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".Column"},{"id":10,"kind":1024,"name":"type","url":"interfaces/_inspectors_schema_.column.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".Column"},{"id":11,"kind":1024,"name":"nullable","url":"interfaces/_inspectors_schema_.column.html#nullable","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".Column"},{"id":12,"kind":1024,"name":"default","url":"interfaces/_inspectors_schema_.column.html#default","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".Column"},{"id":13,"kind":256,"name":"SchemaDocument","url":"interfaces/_inspectors_schema_.schemadocument.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":14,"kind":1024,"name":"$schema","url":"interfaces/_inspectors_schema_.schemadocument.html#_schema","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":15,"kind":1024,"name":"title","url":"interfaces/_inspectors_schema_.schemadocument.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":16,"kind":1024,"name":"type","url":"interfaces/_inspectors_schema_.schemadocument.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":17,"kind":1024,"name":"properties","url":"interfaces/_inspectors_schema_.schemadocument.html#properties","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":18,"kind":1024,"name":"required","url":"interfaces/_inspectors_schema_.schemadocument.html#required","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":19,"kind":256,"name":"SchemaProperties","url":"interfaces/_inspectors_schema_.schemaproperties.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":20,"kind":64,"name":"schema","url":"modules/_inspectors_schema_.html#schema","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":21,"kind":64,"name":"table","url":"modules/_inspectors_schema_.html#table","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":22,"kind":64,"name":"properties","url":"modules/_inspectors_schema_.html#properties","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":23,"kind":64,"name":"property","url":"modules/_inspectors_schema_.html#property","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":24,"kind":64,"name":"required","url":"modules/_inspectors_schema_.html#required","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":25,"kind":1,"name":"\"inspectors/relationships\"","url":"modules/_inspectors_relationships_.html","classes":"tsd-kind-external-module"},{"id":26,"kind":256,"name":"Relationship","url":"interfaces/_inspectors_relationships_.relationship.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/relationships\""},{"id":27,"kind":1024,"name":"name","url":"interfaces/_inspectors_relationships_.relationship.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationship"},{"id":28,"kind":1024,"name":"from","url":"interfaces/_inspectors_relationships_.relationship.html#from","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationship"},{"id":29,"kind":1024,"name":"to","url":"interfaces/_inspectors_relationships_.relationship.html#to","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationship"},{"id":30,"kind":256,"name":"Relationships","url":"interfaces/_inspectors_relationships_.relationships.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/relationships\""},{"id":31,"kind":1024,"name":"belongsTo","url":"interfaces/_inspectors_relationships_.relationships.html#belongsto","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationships"},{"id":32,"kind":1024,"name":"has","url":"interfaces/_inspectors_relationships_.relationships.html#has","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationships"},{"id":33,"kind":64,"name":"relationships","url":"modules/_inspectors_relationships_.html#relationships-1","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/relationships\""},{"id":34,"kind":1,"name":"\"collimator\"","url":"modules/_collimator_.html","classes":"tsd-kind-external-module"},{"id":35,"kind":256,"name":"FullTableDescription","url":"interfaces/_collimator_.fulltabledescription.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"collimator\""},{"id":36,"kind":1024,"name":"schema","url":"interfaces/_collimator_.fulltabledescription.html#schema","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"collimator\".FullTableDescription"},{"id":37,"kind":1024,"name":"relationships","url":"interfaces/_collimator_.fulltabledescription.html#relationships","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"collimator\".FullTableDescription"},{"id":38,"kind":1024,"name":"name","url":"interfaces/_collimator_.fulltabledescription.html#name","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"\"collimator\".FullTableDescription"},{"id":39,"kind":1024,"name":"primaryKeys","url":"interfaces/_collimator_.fulltabledescription.html#primarykeys","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"\"collimator\".FullTableDescription"},{"id":40,"kind":64,"name":"inspect","url":"modules/_collimator_.html#inspect","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"collimator\""}]};
var typedoc = typedoc || {};typedoc.search = typedoc.search || {};typedoc.search.data = {"kinds":{"1":"External module","64":"Function","256":"Interface","1024":"Property"},"rows":[{"id":0,"kind":1,"name":"\"util/fileQuery\"","url":"modules/_util_filequery_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":64,"name":"fileQuery","url":"modules/_util_filequery_.html#filequery","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"util/fileQuery\""},{"id":2,"kind":1,"name":"\"inspectors/views\"","url":"modules/_inspectors_views_.html","classes":"tsd-kind-external-module"},{"id":3,"kind":256,"name":"ViewDescription","url":"interfaces/_inspectors_views_.viewdescription.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/views\""},{"id":4,"kind":1024,"name":"name","url":"interfaces/_inspectors_views_.viewdescription.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/views\".ViewDescription"},{"id":5,"kind":64,"name":"views","url":"modules/_inspectors_views_.html#views","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/views\""},{"id":6,"kind":1,"name":"\"inspectors/tables\"","url":"modules/_inspectors_tables_.html","classes":"tsd-kind-external-module"},{"id":7,"kind":256,"name":"TableDescription","url":"interfaces/_inspectors_tables_.tabledescription.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/tables\""},{"id":8,"kind":1024,"name":"name","url":"interfaces/_inspectors_tables_.tabledescription.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/tables\".TableDescription"},{"id":9,"kind":1024,"name":"primaryKeys","url":"interfaces/_inspectors_tables_.tabledescription.html#primarykeys","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/tables\".TableDescription"},{"id":10,"kind":64,"name":"tables","url":"modules/_inspectors_tables_.html#tables","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/tables\""},{"id":11,"kind":1,"name":"\"inspectors/schema\"","url":"modules/_inspectors_schema_.html","classes":"tsd-kind-external-module"},{"id":12,"kind":256,"name":"Column","url":"interfaces/_inspectors_schema_.column.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":13,"kind":1024,"name":"name","url":"interfaces/_inspectors_schema_.column.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".Column"},{"id":14,"kind":1024,"name":"type","url":"interfaces/_inspectors_schema_.column.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".Column"},{"id":15,"kind":1024,"name":"nullable","url":"interfaces/_inspectors_schema_.column.html#nullable","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".Column"},{"id":16,"kind":1024,"name":"default","url":"interfaces/_inspectors_schema_.column.html#default","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".Column"},{"id":17,"kind":256,"name":"SchemaDocument","url":"interfaces/_inspectors_schema_.schemadocument.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":18,"kind":1024,"name":"$schema","url":"interfaces/_inspectors_schema_.schemadocument.html#_schema","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":19,"kind":1024,"name":"title","url":"interfaces/_inspectors_schema_.schemadocument.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":20,"kind":1024,"name":"type","url":"interfaces/_inspectors_schema_.schemadocument.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":21,"kind":1024,"name":"properties","url":"interfaces/_inspectors_schema_.schemadocument.html#properties","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":22,"kind":1024,"name":"required","url":"interfaces/_inspectors_schema_.schemadocument.html#required","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/schema\".SchemaDocument"},{"id":23,"kind":256,"name":"SchemaProperties","url":"interfaces/_inspectors_schema_.schemaproperties.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":24,"kind":64,"name":"schema","url":"modules/_inspectors_schema_.html#schema","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":25,"kind":64,"name":"table","url":"modules/_inspectors_schema_.html#table","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":26,"kind":64,"name":"properties","url":"modules/_inspectors_schema_.html#properties","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":27,"kind":64,"name":"property","url":"modules/_inspectors_schema_.html#property","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":28,"kind":64,"name":"required","url":"modules/_inspectors_schema_.html#required","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/schema\""},{"id":29,"kind":1,"name":"\"inspectors/usedTables\"","url":"modules/_inspectors_usedtables_.html","classes":"tsd-kind-external-module"},{"id":30,"kind":256,"name":"UsedTable","url":"interfaces/_inspectors_usedtables_.usedtable.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/usedTables\""},{"id":31,"kind":1024,"name":"name","url":"interfaces/_inspectors_usedtables_.usedtable.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/usedTables\".UsedTable"},{"id":32,"kind":64,"name":"usedTables","url":"modules/_inspectors_usedtables_.html#usedtables","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/usedTables\""},{"id":33,"kind":1,"name":"\"inspectors/relationships\"","url":"modules/_inspectors_relationships_.html","classes":"tsd-kind-external-module"},{"id":34,"kind":256,"name":"Relationship","url":"interfaces/_inspectors_relationships_.relationship.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/relationships\""},{"id":35,"kind":1024,"name":"name","url":"interfaces/_inspectors_relationships_.relationship.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationship"},{"id":36,"kind":1024,"name":"from","url":"interfaces/_inspectors_relationships_.relationship.html#from","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationship"},{"id":37,"kind":1024,"name":"to","url":"interfaces/_inspectors_relationships_.relationship.html#to","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationship"},{"id":38,"kind":256,"name":"Relationships","url":"interfaces/_inspectors_relationships_.relationships.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"inspectors/relationships\""},{"id":39,"kind":1024,"name":"belongsTo","url":"interfaces/_inspectors_relationships_.relationships.html#belongsto","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationships"},{"id":40,"kind":1024,"name":"has","url":"interfaces/_inspectors_relationships_.relationships.html#has","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"inspectors/relationships\".Relationships"},{"id":41,"kind":64,"name":"relationships","url":"modules/_inspectors_relationships_.html#relationships-1","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"inspectors/relationships\""},{"id":42,"kind":1,"name":"\"collimator\"","url":"modules/_collimator_.html","classes":"tsd-kind-external-module"},{"id":43,"kind":256,"name":"ExtendedTableDescription","url":"interfaces/_collimator_.extendedtabledescription.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"collimator\""},{"id":44,"kind":1024,"name":"schema","url":"interfaces/_collimator_.extendedtabledescription.html#schema","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"collimator\".ExtendedTableDescription"},{"id":45,"kind":1024,"name":"relationships","url":"interfaces/_collimator_.extendedtabledescription.html#relationships","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"collimator\".ExtendedTableDescription"},{"id":46,"kind":256,"name":"ExtendedViewDescription","url":"interfaces/_collimator_.extendedviewdescription.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"collimator\""},{"id":47,"kind":1024,"name":"schema","url":"interfaces/_collimator_.extendedviewdescription.html#schema","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"collimator\".ExtendedViewDescription"},{"id":48,"kind":1024,"name":"uses","url":"interfaces/_collimator_.extendedviewdescription.html#uses","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"collimator\".ExtendedViewDescription"},{"id":49,"kind":256,"name":"InspectResult","url":"interfaces/_collimator_.inspectresult.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"collimator\""},{"id":50,"kind":1024,"name":"tables","url":"interfaces/_collimator_.inspectresult.html#tables","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"collimator\".InspectResult"},{"id":51,"kind":1024,"name":"views","url":"interfaces/_collimator_.inspectresult.html#views","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"collimator\".InspectResult"},{"id":52,"kind":64,"name":"inspect","url":"modules/_collimator_.html#inspect","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"collimator\""}]};

@@ -8,79 +8,108 @@ var pg = require('pg-promise')();

var expected = [{
name: 'users',
primaryKeys: ['id'],
var expected = {
tables: [{
name: 'users',
primaryKeys: ['id'],
schema: {
$schema: 'http://json-schema.org/draft-04/schema#',
title: 'users',
type: 'object',
schema: {
$schema: 'http://json-schema.org/draft-04/schema#',
title: 'users',
type: 'object',
properties: {
id: {type: 'integer'},
username: {type: 'string'},
password: {type: 'string'},
created_at: {
type: 'string',
format: 'date-time'
properties: {
id: {type: 'integer'},
username: {type: 'string'},
password: {type: 'string'},
created_at: {
type: 'string',
format: 'date-time'
},
updated_at: {
type: 'string',
format: 'date-time'
},
},
updated_at: {
type: 'string',
format: 'date-time'
required: ['username', 'password']
},
relationships: {
belongsTo: [],
has: [{
name: 'tasks',
from: 'id',
to: 'owner'
}]
}
},
{
name: 'tasks',
primaryKeys: ['id'],
schema: {
$schema: 'http://json-schema.org/draft-04/schema#',
title: 'tasks',
type: 'object',
properties: {
id: {
type: 'integer'
},
title: {
type: 'string'
},
description: {
type: 'string'
},
complete: {
type: 'boolean'
},
created_at: {
type: 'string',
format: 'date-time'
},
updated_at: {
type: 'string',
format: 'date-time'
},
owner: {
type: 'integer'
}
},
required: ['title', 'owner']
},
relationships: {
belongsTo: [{
name: 'users',
from: 'owner',
to: 'id'
}],
has: []
}
}],
views: [{
name: 'completed_tasks',
schema: {
$schema: 'http://json-schema.org/draft-04/schema#',
title: 'completed_tasks',
type: 'object',
required: ['username', 'password']
},
relationships: {
belongsTo: [],
has: [{
name: 'tasks',
from: 'id',
to: 'owner'
}]
}
},
{
name: 'tasks',
primaryKeys: ['id'],
schema: {
$schema: 'http://json-schema.org/draft-04/schema#',
title: 'tasks',
type: 'object',
properties: {
id: {
type: 'integer'
properties: {
id: {
type: 'integer'
},
username: {
type: 'string'
},
completed: {
type: 'integer'
}
},
title: {
type: 'string'
},
description: {
type: 'string'
},
complete: {
type: 'boolean'
},
created_at: {
type: 'string',
format: 'date-time'
},
updated_at: {
type: 'string',
format: 'date-time'
},
owner: {
type: 'integer'
}
required: []
},
required: ['title', 'owner']
},
relationships: {
belongsTo: [{
name: 'users',
from: 'owner',
to: 'id'
}],
has: []
}
}];
uses: [{
name: 'tasks'
}, {
name: 'users'
}]
}]
};

@@ -87,0 +116,0 @@ inspect(db)

import Promise from 'bluebird';
import { IDatabase } from 'pg-promise';
import { ViewDescription } from './inspectors/views';
import tables, { TableDescription } from './inspectors/tables';
import schema, { SchemaDocument } from './inspectors/schema';
import { UsedTable } from './inspectors/usedTables';
import relationships, { Relationships } from './inspectors/relationships';

@@ -10,3 +12,3 @@ /**

*/
export interface FullTableDescription extends TableDescription {
export interface ExtendedTableDescription {
schema: SchemaDocument;

@@ -16,2 +18,13 @@ relationships: Relationships;

/**
* Extended description of a View that includes information about the schema and used tables
*/
export interface ExtendedViewDescription {
schema: SchemaDocument;
uses: UsedTable[];
}
export interface InspectResult {
tables: Array<TableDescription & ExtendedTableDescription>;
views: Array<ViewDescription & ExtendedViewDescription>;
}
/**
* Inspect all enumerable table in a database, and return a promise that will

@@ -23,3 +36,3 @@ * resolve to information about each table.

*/
export declare function inspect(db: IDatabase<any>): Promise<FullTableDescription[]>;
export declare function inspect(db: IDatabase<any>): Promise<InspectResult>;
export { tables, schema, relationships };

@@ -13,2 +13,6 @@ 'use strict';

var _views = require('./inspectors/views');
var _views2 = _interopRequireDefault(_views);
var _tables = require('./inspectors/tables');

@@ -22,2 +26,6 @@

var _usedTables = require('./inspectors/usedTables');
var _usedTables2 = _interopRequireDefault(_usedTables);
var _relationships = require('./inspectors/relationships');

@@ -37,10 +45,18 @@

function inspect(db) {
function inspectors(table) {
var queries = {
var inspectTable = function inspectTable(table) {
return (0, _bluebird.props)({
schema: (0, _schema2.default)(db, table.name),
relationships: (0, _relationships2.default)(db, table.name)
};
return (0, _bluebird.props)(queries).then((0, _ramda.merge)(table));
}
return (0, _tables2.default)(db).map(inspectors);
}).then((0, _ramda.merge)(table));
};
var inspectView = function inspectView(view) {
return (0, _bluebird.props)({
schema: (0, _schema2.default)(db, view.name),
uses: (0, _usedTables2.default)(db, view.name)
}).then((0, _ramda.merge)(view));
};
return (0, _bluebird.props)({
tables: (0, _tables2.default)(db).map(inspectTable),
views: (0, _views2.default)(db).map(inspectView)
});
}

@@ -47,0 +63,0 @@ exports.tables = _tables2.default;

@@ -86,2 +86,17 @@ 'use strict';

text: { type: 'string' },
interval: {
type: 'object',
format: 'interval',
minProperties: 1,
additionalProperties: false,
properties: {
milliseconds: { type: 'integer' },
seconds: { type: 'integer' },
minutes: { type: 'integer' },
hours: { type: 'integer' },
days: { type: 'integer' },
months: { type: 'ingeger' },
years: { type: 'integer' }
}
},
'character varying': { type: 'string' },

@@ -88,0 +103,0 @@ 'double precision': { type: 'number' },

@@ -34,3 +34,3 @@ {

"typedoc": "github:sierrasoftworks/typedoc#v1.8.10",
"typings": "^0.8.1"
"typings": "^1.3.0"
},

@@ -91,3 +91,3 @@ "babel": {

},
"version": "4.2.1"
"version": "5.0.0"
}
<div id="badges" align="center"></div>
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

@@ -3,0 +4,0 @@ # Collimator

@@ -8,3 +8,3 @@ {

},
"ambientDependencies": {
"globalDependencies": {
"callsite": "registry:dt/callsite#1.0.0+20160316171810",

@@ -11,0 +11,0 @@ "ext-promise": "github:vitaly-t/pg-promise/typescript/ext-promise.d.ts#4764c45",

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

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

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

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