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

@balena/odata-to-abstract-sql

Package Overview
Dependencies
Maintainers
3
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@balena/odata-to-abstract-sql - npm Package Compare versions

Comparing version 5.4.3 to 5.4.4-js-tests-14b390a85c75abf10d84a964d8f603a9d044fac3

test/chai-sql.js

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # Change Log

## 5.4.4 - 2021-09-07
* Convert tests to type checked javascript [Pagan Gazzard]
## 5.4.3 - 2021-08-24

@@ -9,0 +13,0 @@

22

out/odata-to-abstract-sql.js

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

if (path.link.key != null) {
if (exports.isBindReference(path.link.key)) {
if ((0, exports.isBindReference)(path.link.key)) {
query.where.push([

@@ -429,3 +429,3 @@ comparison.eq,

if (method === 'PUT' || method === 'PUT-INSERT' || method === 'POST') {
if (exports.isBindReference(key)) {
if ((0, exports.isBindReference)(key)) {
addBodyKey(resource.resourceName, resource.idField, key, bodyKeys, this.extraBodyVars);

@@ -439,3 +439,3 @@ }

}
if (exports.isBindReference(key)) {
if ((0, exports.isBindReference)(key)) {
const bind = this.Bind(key);

@@ -479,3 +479,3 @@ const referencedField = [

Bind(bind, optional = false) {
if (exports.isBindReference(bind)) {
if ((0, exports.isBindReference)(bind)) {
return ['Bind', bind.bind];

@@ -530,3 +530,3 @@ }

else {
let sqlName = exports.odataNameToSqlName(resourceName);
let sqlName = (0, exports.odataNameToSqlName)(resourceName);
sqlName = this.Synonym(sqlName);

@@ -542,3 +542,3 @@ resource = this.clientModel.tables[sqlName];

if (resourceName.includes('__') && !resource.name.includes('-')) {
const verb = exports.odataNameToSqlName(resourceName).split('-')[0];
const verb = (0, exports.odataNameToSqlName)(resourceName).split('-')[0];
resourceAlias2 = verb + '-' + resource.name;

@@ -577,3 +577,3 @@ }

for (const { fieldName } of resource.fields) {
resourceMappings[exports.sqlNameToODataName(fieldName)] = [tableAlias, fieldName];
resourceMappings[(0, exports.sqlNameToODataName)(fieldName)] = [tableAlias, fieldName];
}

@@ -622,3 +622,3 @@ return resourceMappings;

const field = this.Property(prop);
const sqlName = exports.odataNameToSqlName(field.name);
const sqlName = (0, exports.odataNameToSqlName)(field.name);
const resourceField = field.resource.fields.find(({ fieldName }) => fieldName === sqlName);

@@ -631,3 +631,3 @@ return [field.resource, field.name, resourceField === null || resourceField === void 0 ? void 0 : resourceField.computed];

resource,
exports.sqlNameToODataName(field.fieldName),
(0, exports.sqlNameToODataName)(field.fieldName),
field.computed,

@@ -1168,3 +1168,3 @@ ]);

const rewrittenDefinition = _.cloneDeep(convertToModernDefinition(definition));
exports.rewriteBinds(rewrittenDefinition, extraBindVars, bindVarsLength);
(0, exports.rewriteBinds)(rewrittenDefinition, extraBindVars, bindVarsLength);
modifyAbstractSql('Resource', rewrittenDefinition.abstractSql, (resource) => {

@@ -1182,3 +1182,3 @@ const resourceName = resource[1];

const computedFieldQuery = new Query();
computedFieldQuery.select = referencedResource.fields.map((field) => this.AliasSelectField(referencedResource, exports.sqlNameToODataName(field.fieldName), field.computed, field.fieldName));
computedFieldQuery.select = referencedResource.fields.map((field) => this.AliasSelectField(referencedResource, (0, exports.sqlNameToODataName)(field.fieldName), field.computed, field.fieldName));
computedFieldQuery.fromResource(this, {

@@ -1185,0 +1185,0 @@ ...referencedResource,

{
"name": "@balena/odata-to-abstract-sql",
"version": "5.4.3",
"version": "5.4.4-js-tests-14b390a85c75abf10d84a964d8f603a9d044fac3",
"description": "A consumer of the OData parser, written in OMeta",
"main": "out/odata-to-abstract-sql.js",
"scripts": {
"lint:coffee": "balena-lint test/",
"lint:typescript": "balena-lint --typescript src && tsc --noEmit",
"lint": "npm run lint:coffee && npm run lint:typescript",
"prettify": "balena-lint --typescript --fix src",
"lint": "balena-lint -e js -e ts --typescript src test && tsc --noEmit && tsc --noEmit --project tsconfig.js.json",
"prettify": "balena-lint -e js -e ts --typescript --fix src test",
"pretest": "npm run prepare",

@@ -21,23 +19,26 @@ "test": "mocha && npm run lint",

"@balena/abstract-sql-compiler": "^7.13.4",
"@balena/odata-parser": "^2.2.1",
"@types/lodash": "^4.14.165",
"@types/memoizee": "^0.4.5",
"@types/randomstring": "^1.1.6",
"lodash": "^4.17.20",
"memoizee": "^0.4.14",
"randomstring": "^1.1.5"
"@balena/odata-parser": "^2.2.7",
"@types/lodash": "^4.14.172",
"@types/memoizee": "^0.4.6",
"@types/randomstring": "^1.1.7",
"lodash": "^4.17.21",
"memoizee": "^0.4.15",
"randomstring": "^1.2.1"
},
"devDependencies": {
"@balena/lf-to-abstract-sql": "^4.1.1",
"@balena/lint": "^5.3.0",
"@balena/sbvr-parser": "^1.1.1",
"@balena/lf-to-abstract-sql": "^4.3.0",
"@balena/lint": "^6.1.1",
"@balena/sbvr-parser": "^1.2.5",
"@balena/sbvr-types": "^3.1.3",
"chai": "^4.2.0",
"@types/chai": "^4.2.21",
"@types/chai-things": "0.0.35",
"@types/mocha": "^9.0.0",
"chai": "^4.3.4",
"chai-things": "~0.2.0",
"coffeescript": "^1.12.7",
"husky": "^4.3.6",
"lint-staged": "^10.5.3",
"mocha": "^8.2.1",
"husky": "^4.3.8",
"lint-staged": "^11.1.2",
"mocha": "^9.1.1",
"require-npm4-to-publish": "^1.0.0",
"typescript": "^4.1.3"
"ts-node": "^10.2.1",
"typescript": "^4.4.2"
},

@@ -52,9 +53,9 @@ "husky": {

"recursive": true,
"require": "coffeescript/register",
"require": "ts-node/register/transpile-only",
"bail": true,
"_": "test/*.coffee"
"_": "test/*.js"
},
"versionist": {
"publishedAt": "2021-08-24T21:03:49.876Z"
"publishedAt": "2021-09-07T14:05:10.980Z"
}
}

@@ -5,2 +5,3 @@ {

"target": "es2018",
"strict": true,
"noImplicitAny": true,

@@ -12,10 +13,13 @@ "noUnusedParameters": true,

"sourceMap": true,
"strict": true,
"declaration": true,
"skipLibCheck": true,
"outDir": "out"
"outDir": "out",
"allowJs": true
},
"include": [
"src/*.ts"
],
"exclude": [
"node_modules"
]
}

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