Skip to content

Commit

Permalink
Merge branch 'develop' into feature/web-ui-for-lookup-records
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro-bulgaris-qcif committed Jun 24, 2024
2 parents 290704b + b82dfaf commit 82cf890
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 52 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.13.1-buster
FROM node:20.14.0-buster
ENV node_env production
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=$PATH:/home/node/.npm-global/bin
Expand Down
12 changes: 6 additions & 6 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions core/src/decorator/PopulateExportedMethods.decorator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function PopulateExportedMethods <T extends { new (...args: any[]): {} }>(constructor: T) {
return class extends constructor {
_exportedMethods: any =Object.getOwnPropertyNames(constructor.prototype)
.filter(prop => prop !== 'constructor' && typeof this[prop] === 'function');
};
}
3 changes: 3 additions & 0 deletions core/src/decorator/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export {
PopulateExportedMethods
} from './PopulateExportedMethods.decorator';
3 changes: 2 additions & 1 deletion core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ export {
}
from "./RecordAuditParams";

export * from './model'
export * from './model'
export * from './decorator'
64 changes: 38 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"mongodb": "^6.3.0",
"node-cache": "^5.1.2",
"node-schedule": "^2.1.1",
"nodemailer": "^6.9.13",
"nodemailer": "^6.9.14",
"numeral": "^2.0.6",
"openid-client": "^5.6.5",
"passport": "^0.7.0",
Expand All @@ -64,7 +64,7 @@
"sails-hook-orm": "^4.0.3",
"sails-hook-sockets": "^3.0.0",
"sails-mongo": "^2.1.1",
"sass": "^1.77.4",
"sass": "^1.77.6",
"sass-loader": "^14.2.1",
"skipper": "^0.9.4",
"skipper-gridfs": "^1.0.2",
Expand All @@ -74,11 +74,11 @@
"ts-node": "^10.9.2",
"tus-node-server": "^0.9.0",
"typescript": "5.4",
"typescript-json-schema": "^0.63.0",
"typescript-json-schema": "^0.64.0",
"typescript-require": "~0.3.0",
"url-pattern": "^1.0.3",
"webpack": "^5.91.0",
"zone.js": "^0.14.6"
"webpack": "^5.92.0",
"zone.js": "^0.14.7"
},
"scripts": {
"debug": "node debug app.js",
Expand Down
6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"outDir": "./",
"rootDir": "./typescript",
"strict": false,
"inlineSourceMap": true
"inlineSourceMap": true,
"experimentalDecorators": true
},
"exclude": [
"node_modules/**",
Expand All @@ -20,5 +21,6 @@
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
}
},

}
17 changes: 7 additions & 10 deletions typescript/api/controllers/RenderViewController.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
//<reference path='./../../typings/loader.d.ts'/>

import { Controllers as controllers} from '@researchdatabox/redbox-core-types';

import { Controllers as controllers,PopulateExportedMethods} from '@researchdatabox/redbox-core-types';
/**
* Package that contains all Controllers.
*/
export module Controllers {

export class RenderView extends controllers.Core.Controller {

/**
* Exported methods, accessible from internet.
*/
protected _exportedMethods: any = [
'render'
];


export module Controllers {

@PopulateExportedMethods
export class RenderView extends controllers.Core.Controller {

/**
**************************************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion typescript/api/controllers/VocabController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export module Controllers {
const flattened_prefix = "flattened_";
try {
let mintResponse = await VocabService.findInMint(mintSourceType, searchString);
let response_docs = mintResponse.docs;
let response_docs = mintResponse.response.docs;
if (unflatten == "true") {
_.forEach(response_docs, (doc: any) => {
_.forOwn(doc, (val: any, key: any) => {
Expand Down

0 comments on commit 82cf890

Please sign in to comment.