Skip to content

Commit

Permalink
Heroku Deploy fixes (#3969)
Browse files Browse the repository at this point in the history
* update yarn version

* fixed node version

* restore cleanup

* "bcrypt": "5.0.1"

* "bcrypt": "5.0.1"

* restore migrations

* remove migrations

* update yarn.lock
  • Loading branch information
minotogna authored Sep 25, 2024
1 parent 0447506 commit 5fae54e
Show file tree
Hide file tree
Showing 5 changed files with 4,328 additions and 4,127 deletions.
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"license": "UNLICENSED",
"name": "fra-platform",
"engines": {
"node": "^20.11.1",
"yarn": "^1.22.19"
"node": "20.11.1",
"yarn": "^1.22.22"
},
"scripts": {
"build": "run-s build:prod:client build:prod:server build:prod:server:resources",
Expand All @@ -13,7 +13,7 @@
"build:prod:report": "cross-env NODE_ENV=production BUILD_REPORT=true webpack --display-error-details -p --config webpack.config.babel.js",
"clean": "shx rm -rf dist/",
"heroku-prebuild": "echo \"//npm.pkg.github.com/:_authToken=${NPM_GITHUB_TOKEN}\" >> .npmrc",
"---heroku-cleanup": "cd node_modules/bcrypt && node-pre-gyp install --fallback-to-build",
"heroku-cleanup": "cd node_modules/bcrypt && node-pre-gyp install --fallback-to-build",
"migration-public:create": "src/tools/migrations/public/create-migration-step.sh",
"migration-public:run": "ts-node src/tools/migrations/public",
"migration-steps:create": "src/test/migrations/create-migration-step.sh",
Expand Down Expand Up @@ -166,7 +166,7 @@
"@reduxjs/toolkit": "^1.8.1",
"@socket.io/redis-streams-adapter": "^0.1.0",
"@types/multer": "^1.4.7",
"archiver": "^7.0.1",
"archiver": "^6.0.2",
"assert": "^2.0.0",
"axios": "^0.25.0",
"bcrypt": "^5.0.1",
Expand Down Expand Up @@ -270,6 +270,10 @@
"webpack-node-externals": "^3.0.0",
"winston": "^3.8.2"
},
"overrides": {
"bcrypt": "5.0.1",
"string-width": "4.2.3"
},
"browserslist": [
"last 2 versions"
],
Expand Down
1 change: 1 addition & 0 deletions src/server/api/admin/exportUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const exportUsers = async (req: UsersRequest, res: Response) => {
statuses: [UserStatus.active, UserStatus.disabled, UserStatus.invitationPending],
})

// @ts-ignore
await ExportService.queryToCsvResponseStream<User>({ fileName, query, queryParams, res, rowTransformer })
} catch (e) {
Requests.sendErr(res, e)
Expand Down
1 change: 1 addition & 0 deletions src/server/repository/adapter/tableSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { TableAdapter, TableDB } from 'server/repository/adapter/table'

export interface TableSectionDB {
id: number
// @ts-ignore
section_id: number
uuid: string
props: TableSectionProps & { cycles: Array<string> }
Expand Down
4 changes: 4 additions & 0 deletions src/server/repository/assessment/section/getManyMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const getManyMetadata = async (
const { cycle, sectionNames, assessment, showHidden = false } = props
const schemaName = Schemas.getName(assessment)

// @ts-ignore
return client.result<Record<string, Array<TableSection>>>(
`
with "row" as (select s.props ->> 'name' as section_name,
Expand Down Expand Up @@ -91,10 +92,13 @@ export const getManyMetadata = async (
`,
[sectionNames, cycle.uuid, showHidden],
// @ts-ignore
(result) => {
return result.rows.reduce((prev, current) => {
// @ts-ignore
return {
...prev,
// @ts-ignore
[current.section_name]: current.table_sections.map(TableSectionAdapter),
}
}, {})
Expand Down
Loading

0 comments on commit 5fae54e

Please sign in to comment.