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

@ronin/compiler

Package Overview
Dependencies
Maintainers
0
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ronin/compiler - npm Package Compare versions

Comparing version 0.8.8-leo-ron-1083-experimental-193 to 0.8.8-leo-ron-1083-experimental-194

23

dist/index.js

@@ -1356,3 +1356,3 @@ // src/utils/helpers.ts

statements;
models;
models = [];
queries;

@@ -1362,3 +1362,2 @@ constructor(queries, options) {

this.statements = this.compileQueries(queries, models, options);
this.models = models;
this.queries = queries;

@@ -1400,13 +1399,23 @@ }

}
this.models = modelListWithPresets;
return [...dependencyStatements, ...mainStatements];
};
formatRecord(model, record) {
const formattedRecord = { ...record };
for (const key in record) {
const { field } = getFieldFromModel(model, key, "to");
if (field.type === "json") {
formattedRecord[key] = JSON.parse(record[key]);
continue;
}
formattedRecord[key] = record[key];
}
return expand(formattedRecord);
}
formatOutput(results) {
return results.map((result, index) => {
const query = this.queries.at(-index);
const { queryType, queryModel } = splitQuery(query);
const { queryModel } = splitQuery(query);
const model = getModelBySlug(this.models, queryModel);
const single = queryModel !== model.pluralSlug;
if (single) return { record: result[0] };
if (queryType === "count") return { amount: result[0] };
return { records: result };
return { record: this.formatRecord(model, result[0]) };
});

@@ -1413,0 +1422,0 @@ }

{
"name": "@ronin/compiler",
"version": "0.8.8-leo-ron-1083-experimental-193",
"version": "0.8.8-leo-ron-1083-experimental-194",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Compiles RONIN queries to SQL statements.",

Sorry, the diff of this file is too big to display

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