mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #21202 from overleaf/ls-scripts-to-esm-2
Migrate scripts folder to esm 2/x GitOrigin-RevId: 1698bc4f13e026fa281d37a4914a2f997849c761
This commit is contained in:
+6
-3
@@ -1,6 +1,9 @@
|
||||
// Increase default mongo query timeout from 1min to 1h
|
||||
process.env.MONGO_SOCKET_TIMEOUT = process.env.MONGO_SOCKET_TIMEOUT || '360000'
|
||||
const { waitForDb, db } = require('../../app/src/infrastructure/mongodb')
|
||||
import { waitForDb, db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import { ensureMongoTimeout } from '../helpers/env_variable_helper.mjs'
|
||||
// Ensure default mongo query timeout has been increased 1h
|
||||
if (!process.env.MONGO_SOCKET_TIMEOUT) {
|
||||
ensureMongoTimeout(360000)
|
||||
}
|
||||
|
||||
async function main() {
|
||||
await checkAllProjectsAreMigrated()
|
||||
+11
-12
@@ -1,6 +1,6 @@
|
||||
const HistoryRangesSupportMigration = require('../../app/src/Features/History/HistoryRangesSupportMigration')
|
||||
const { waitForDb } = require('../../app/src/infrastructure/mongodb')
|
||||
const minimist = require('minimist')
|
||||
import HistoryRangesSupportMigration from '../../app/src/Features/History/HistoryRangesSupportMigration.mjs'
|
||||
import { waitForDb } from '../../app/src/infrastructure/mongodb.js'
|
||||
import minimist from 'minimist'
|
||||
|
||||
async function main() {
|
||||
await waitForDb()
|
||||
@@ -31,7 +31,7 @@ async function main() {
|
||||
}
|
||||
|
||||
function usage() {
|
||||
console.error(`Usage: migrate_ranges_support.js [OPTIONS]
|
||||
console.error(`Usage: migrate_ranges_support.mjs [OPTIONS]
|
||||
|
||||
Options:
|
||||
|
||||
@@ -112,11 +112,10 @@ function arrayOpt(value) {
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => {
|
||||
process.exit(0)
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err)
|
||||
process.exit(1)
|
||||
})
|
||||
try {
|
||||
await main()
|
||||
process.exit(0)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
}
|
||||
Reference in New Issue
Block a user