Comparing version 0.0.62 to 0.0.63
@@ -91,3 +91,3 @@ "use strict"; | ||
fullName: 'mssql', | ||
npm: `"mssql": "",`, | ||
npm: `"tedious": "",`, | ||
quote: { prefix: '"', name: '"', value: "'" }, | ||
@@ -141,3 +141,3 @@ idDefaultType: 'cuid', | ||
let Db, db; | ||
Db = require(path_1.default.join(resolveAcaDir, app, 'node_modules/mssql')); | ||
Db = require(path_1.default.join(resolveAcaDir, app, 'node_modules/tedious')); | ||
const opts = { | ||
@@ -144,0 +144,0 @@ ...options, |
@@ -46,2 +46,3 @@ "use strict"; | ||
const trx = await this.knex.transaction() | ||
trx['$Driver'] = this.$Driver | ||
@@ -101,2 +102,3 @@ return { | ||
const trx = await this.knex.transaction() | ||
trx['$Driver'] = this.$Driver | ||
try { | ||
@@ -125,2 +127,3 @@ const rtn = await $Handle( trx )({ query: '${query}', table: '${tblName}', args }) | ||
const trx = await this.knex.transaction() | ||
trx['$Driver'] = this.$Driver | ||
try { | ||
@@ -148,16 +151,16 @@ const data = (await trx.raw(args)).rows | ||
return ` | ||
private knex: Knex < any, unknown[] > | ||
private $Driver = '${sqlDiff.keyword.fullName}' | ||
private knex: Knex < any, unknown[] > | ||
constructor() { | ||
const driver = '${sqlDiff.keyword.fullName}' | ||
let connection = process.env['${config.connectOption.envConnect || ''}'] || ${JSON.stringify(config.connectOption.connect, null, 2)} | ||
let connection = process.env['${config.connectOption.envConnect || ''}'] || ${JSON.stringify(config.connectOption.connect, null, 2)} | ||
try { | ||
if (typeof connection == 'string') connection = JSON.parse(connection) | ||
} catch (e) { } | ||
try { | ||
if (typeof connection == 'string') connection = JSON.parse(connection) | ||
} catch (e) { } | ||
this.knex = knex({ | ||
client: driver, | ||
${sqlDiff.keyword.stmt.additionalConnectOpts} | ||
connection: ${sqlDiff.keyword.stmt.connectionOpts} | ||
}) | ||
this.knex = knex({ | ||
client: this.$Driver, | ||
${sqlDiff.keyword.stmt.additionalConnectOpts} | ||
connection: ${sqlDiff.keyword.stmt.connectionOpts} | ||
}) | ||
} | ||
@@ -164,0 +167,0 @@ `; |
{ | ||
"name": "aca.ts", | ||
"version": "0.0.62", | ||
"version": "0.0.63", | ||
"description": "Aca.ts is a CLI based on Typescript and Knex.js. It can automatically sync database schema, automatically generate APIs for accessing the database, automatically create frontend APIs through backend functions (like RPC).", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
284948
4735