@aicore/cocodb
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@aicore/cocodb", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Simple json document database using mysql", | ||
@@ -25,3 +25,3 @@ "main": "src/server.js", | ||
"test:unit": "APP_CONFIG=./test/unit/utils/.app.json mocha test/unit/*.spec.js test/unit/**/*.spec.js test/unit/**/*.spec.js --timeout=3000", | ||
"test:integ": "mocha test/integration/*.spec.js test/integration/**/*.spec.js --timeout=3000", | ||
"test:integ": "mocha test/integration/*.spec.js test/integration/**/*.spec.js --timeout=30000", | ||
"printReportsLink": "echo Detailed unit test coverage report: file:///$(pwd)/coverage-unit/index.html && echo Detailed integration test coverage report: file:///$(pwd)/coverage-integration/index.html", | ||
@@ -36,4 +36,4 @@ "cover": "npm run cover:unit", | ||
"release": "npm run bumpPatchVersionWithGitTag", | ||
"serve": "node src/server.js", | ||
"serve:dev": "nodemon src/server.js" | ||
"serve": "node src/index.js", | ||
"serve:dev": "nodemon src/index.js" | ||
}, | ||
@@ -64,3 +64,5 @@ "files": [ | ||
"mocha": "10.0.0", | ||
"nodemon": "2.0.19" | ||
"nodemon": "2.0.19", | ||
"@aicore/libtestutils": "1.0.14", | ||
"@aicore/coco-db-client": "1.0.6" | ||
}, | ||
@@ -70,4 +72,5 @@ "dependencies": { | ||
"@aicore/libmysql": "1.0.22", | ||
"fastify": "4.5.3" | ||
"fastify": "4.5.3", | ||
"uuid": "9.0.0" | ||
} | ||
} |
@@ -26,3 +26,3 @@ import LibMySql from "@aicore/libmysql"; | ||
type: 'object', | ||
required: ['isSuccess', 'results'], | ||
required: ['isSuccess', 'documents'], | ||
properties: { | ||
@@ -33,3 +33,3 @@ isSuccess: { | ||
}, | ||
results: { | ||
documents: { | ||
type: 'array', | ||
@@ -73,6 +73,6 @@ contains: { | ||
try { | ||
const results = await LibMySql.getFromIndex(tableName, queryObject); | ||
const documents = await LibMySql.getFromIndex(tableName, queryObject); | ||
return { | ||
isSuccess: true, | ||
results: results | ||
documents: documents | ||
}; | ||
@@ -79,0 +79,0 @@ } catch (e) { |
@@ -25,3 +25,3 @@ import LibMySql from "@aicore/libmysql"; | ||
type: 'object', | ||
required: ['isSuccess', 'results'], | ||
required: ['isSuccess', 'documents'], | ||
properties: { | ||
@@ -32,3 +32,3 @@ isSuccess: { | ||
}, | ||
results: { | ||
documents: { | ||
type: 'array', | ||
@@ -72,6 +72,6 @@ contains: { | ||
try { | ||
const results = await LibMySql.getFromNonIndex(tableName, queryObject); | ||
const documents = await LibMySql.getFromNonIndex(tableName, queryObject); | ||
return { | ||
isSuccess: true, | ||
results: results | ||
documents: documents | ||
}; | ||
@@ -78,0 +78,0 @@ } catch (e) { |
@@ -36,4 +36,4 @@ /* | ||
const configs = getConfigs(); | ||
/* Adding an authentication hook to the server. A hook is a function that is called when a request is made to | ||
@@ -91,3 +91,3 @@ the server. */ | ||
*/ | ||
async function initMysql() { | ||
export async function initMysql(configs) { | ||
try { | ||
@@ -107,3 +107,3 @@ | ||
*/ | ||
async function startServer() { | ||
export async function startServer(configs) { | ||
try { | ||
@@ -117,4 +117,10 @@ init(configs.authKey); | ||
} | ||
startServer(); | ||
initMysql(); | ||
export async function close() { | ||
await server.close(); | ||
LibMySql.close(); | ||
} | ||
export function startDB(){ | ||
const serverConfigs = getConfigs(); | ||
startServer(serverConfigs); | ||
initMysql(serverConfigs); | ||
} |
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
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
71175
17
818
4
13
+ Addeduuid@9.0.0
+ Addeduuid@9.0.0(transitive)