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

appc-connector-utils

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appc-connector-utils - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

lib/utils/test/arrow.js

12

lib/index.js

@@ -6,6 +6,6 @@ const metadataValidator = require('./utils/metadataValidator')

options = options || {}
const arrowUtils = require('./utils/arrow')(Arrow)
const arrowTestUtils = require('./utils/test/arrow')(Arrow)
const modelAPI = require('./model/api')(Arrow)
const endpointAPI = require('./endpoint/api')(Arrow)
const connector = arrowUtils.getConnectorStatic(conn).connector
const connector = arrowTestUtils.getConnectorStatic(conn).connector

@@ -30,6 +30,6 @@ return {

test: {
getConnectorStatic: arrowUtils.getConnectorStatic,
getConnectorDynamic: arrowUtils.getConnectorDynamic,
startArrowHttp: arrowUtils.startArrowHttp,
stopArrowHttp: arrowUtils.stopArrowHttp
getConnectorStatic: arrowTestUtils.getConnectorStatic,
getConnectorDynamic: arrowTestUtils.getConnectorDynamic,
startArrowHttp: arrowTestUtils.startArrowHttp,
stopArrowHttp: arrowTestUtils.stopArrowHttp
},

@@ -36,0 +36,0 @@ getRootModelName: modelAPI.getRootModelName,

@@ -42,2 +42,3 @@ const pluralize = require('pluralize')

metadata.connector = connector.name
metadata.name = modelName

@@ -44,0 +45,0 @@ dataValidator.validate(metadata, metadataSchema)

{
"name": "appc-connector-utils",
"version": "0.4.0",
"version": "0.4.1",
"description": "Utilities for Arrow Connectors",

@@ -11,4 +11,4 @@ "main": "./lib/index.js",

"test": "npm run lint-fix && npm run test:all",
"test:all": "tap test/unit/*.js test/integration/*.js --color --bail --cov",
"test:unit": "tap test/unit/*.js --color --bail --cov",
"test:all": "tap test/unit/* test/integration/*.js --color --bail --cov",
"test:unit": "tap test/unit/* --color --bail --cov",
"test:integration": "tap test/integration/*.js --color --bail --cov",

@@ -46,3 +46,4 @@ "lint": "standard | snazzy",

"standard": "^8.6.0",
"tap": "^10.3.0"
"tap": "^10.3.0",
"sinon": "^2.1.0"
},

@@ -49,0 +50,0 @@ "standard": {

@@ -6,3 +6,8 @@ module.exports = {

modelNamespace: '',
logLevel: 'error'
logLevel: 'error',
generateModels: [
'Airlines',
'Call',
'People'
]
}

@@ -33,3 +33,3 @@ const Arrow = require('arrow')

t.notOk(connector.models)
const models = library.load.models(modelMetadata2, {delayModelsAttachment: true})
const models = library.load.models(modelMetadata2, { delayModelsAttachment: true })
t.notOk(connector.models)

@@ -43,2 +43,16 @@ t.equal(Object.keys(models).length, 3)

test('createModels persist models', t => {
t.notOk(connector.models)
connector.config.persistModels = true
const models = library.load.models(modelMetadata2, { delayModelsAttachment: true })
connector.config.persistModels = false
container.models = {}
t.notOk(connector.models)
t.equal(Object.keys(models).length, 3)
t.ok(models['appc.test/People'])
t.ok(models['appc.test/Airlines'])
t.ok(models['appc.test/Call'])
t.end()
})
test('createModels - missing metadata', t => {

@@ -79,7 +93,7 @@ t.throws(library.load.models)

const modelWithNamespace = {name: name1}
const modelWithoutNamespace = {name: name2}
const modelWithParent = {_parent: {name: name3}}
const modelWithParentNamespaced = {_parent: {name: name4}}
const modelWithParentNoName = {name: name5, _parent: {}}
const modelWithNamespace = { name: name1 }
const modelWithoutNamespace = { name: name2 }
const modelWithParent = { _parent: { name: name3 } }
const modelWithParentNamespaced = { _parent: { name: name4 } }
const modelWithParentNoName = { name: name5, _parent: {} }
const wrongModel = {}

@@ -86,0 +100,0 @@

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