tango-app-api-audit 3.5.35 → 3.5.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.js +25 -0
- package/config.zip +0 -0
- package/package.json +45 -42
- package/src/controllers/eyeTestAudit.controllers.js +2 -1
package/build.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// build.js
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
|
|
4
|
+
const type = process.argv[2] || 'patch'; // default to patch
|
|
5
|
+
const file = 'package.json';
|
|
6
|
+
|
|
7
|
+
// Read and parse package.json
|
|
8
|
+
const pkg = JSON.parse( fs.readFileSync( file, 'utf8' ) );
|
|
9
|
+
|
|
10
|
+
// Force "main" to be "index.js"
|
|
11
|
+
pkg.main = 'index.js';
|
|
12
|
+
|
|
13
|
+
// Bump version
|
|
14
|
+
const [ major, minor, patch ] = pkg.version.split( '.' ).map( Number );
|
|
15
|
+
|
|
16
|
+
if ( type === 'patch' ) pkg.version = `${major}.${minor}.${patch + 1}`;
|
|
17
|
+
else if ( type === 'minor' ) pkg.version = `${major}.${minor + 1}.0`;
|
|
18
|
+
else if ( type === 'major' ) pkg.version = `${major + 1}.0.0`;
|
|
19
|
+
else throw new Error( 'Invalid version type. Use patch, minor, or major.' );
|
|
20
|
+
|
|
21
|
+
// Write back to package.json
|
|
22
|
+
fs.writeFileSync( file, JSON.stringify( pkg, null, 2 ) );
|
|
23
|
+
|
|
24
|
+
// console.log( `🔧 Updated version to ${pkg.version} and set "main": "index.js"` );
|
|
25
|
+
|
package/config.zip
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,42 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "tango-app-api-audit",
|
|
3
|
+
"version": "3.5.36",
|
|
4
|
+
"description": "audit & audit metrics apis",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "nodemon --exec \"eslint --fix . && node app.js\"",
|
|
9
|
+
"build:patch": "node build.js patch && npm publish",
|
|
10
|
+
"build:minor": "node build.js minor && npm publish",
|
|
11
|
+
"build:major": "node build.js major && npm publish"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18.10.0"
|
|
15
|
+
},
|
|
16
|
+
"author": "praveenraj",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"adm-zip": "^0.5.15",
|
|
20
|
+
"aws-sdk": "^2.1643.0",
|
|
21
|
+
"axios": "^1.7.9",
|
|
22
|
+
"dayjs": "^1.11.11",
|
|
23
|
+
"dotenv": "^16.4.5",
|
|
24
|
+
"express": "^4.19.2",
|
|
25
|
+
"form-data": "^4.0.1",
|
|
26
|
+
"handlebars": "^4.7.8",
|
|
27
|
+
"joi-to-swagger": "^6.2.0",
|
|
28
|
+
"lodash": "^4.17.21",
|
|
29
|
+
"mongodb": "^6.7.0",
|
|
30
|
+
"nodemon": "^3.1.3",
|
|
31
|
+
"swagger-ui-express": "^5.0.1",
|
|
32
|
+
"tango-api-schema": "^2.3.28",
|
|
33
|
+
"tango-app-api-middleware": "^3.4.4",
|
|
34
|
+
"winston": "^3.13.0",
|
|
35
|
+
"winston-daily-rotate-file": "^5.0.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"eslint": "^8.57.0",
|
|
39
|
+
"eslint-config-google": "^0.14.0",
|
|
40
|
+
"eslint-config-semistandard": "^17.0.0",
|
|
41
|
+
"eslint-config-standard": "^17.1.0",
|
|
42
|
+
"eslint-plugin-import": "^2.29.1",
|
|
43
|
+
"eslint-plugin-promise": "^6.2.0"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1635,6 +1635,7 @@ export async function summaryList( req, res ) {
|
|
|
1635
1635
|
temp[i].date = dayjs( item?._source?.date ).format( 'D MMM, YYYY' );
|
|
1636
1636
|
temp[i].RMName = RMName;
|
|
1637
1637
|
temp[i].clusterName =clusterName;
|
|
1638
|
+
temp[i]._id = item?._id;
|
|
1638
1639
|
}
|
|
1639
1640
|
logger.info( { temp: temp } );
|
|
1640
1641
|
}
|
|
@@ -1993,7 +1994,7 @@ export async function emailAlertLog( req, res ) {
|
|
|
1993
1994
|
|
|
1994
1995
|
|
|
1995
1996
|
logger.info( { inputData: inputData, getData: response } );
|
|
1996
|
-
return res.sendSuccess( { result: response } );
|
|
1997
|
+
return res.sendSuccess( { result: response, count: response.length } );
|
|
1997
1998
|
} catch ( error ) {
|
|
1998
1999
|
const err = error.message || 'Internal Server Error';
|
|
1999
2000
|
logger.error( { message: error, data: req.body, function: 'eyetestAudit-controller-emailAlertLog' } );
|