mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +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:
+10
-13
@@ -1,11 +1,9 @@
|
||||
const {
|
||||
import {
|
||||
db,
|
||||
waitForDb,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} = require('../../app/src/infrastructure/mongodb')
|
||||
const {
|
||||
hashSecret,
|
||||
} = require('../../modules/oauth2-server/app/src/SecretsHelper')
|
||||
} from '../../app/src/infrastructure/mongodb.js'
|
||||
import { hashSecret } from '../../modules/oauth2-server/app/src/SecretsHelper.js'
|
||||
|
||||
async function main() {
|
||||
await waitForDb()
|
||||
@@ -38,11 +36,10 @@ async function hashSecrets(collection, field) {
|
||||
console.log(`${hashedCount} secrets hashed`)
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
+10
-13
@@ -1,8 +1,6 @@
|
||||
const minimist = require('minimist')
|
||||
const { waitForDb, db } = require('../../app/src/infrastructure/mongodb')
|
||||
const {
|
||||
hashSecret,
|
||||
} = require('../../modules/oauth2-server/app/src/SecretsHelper')
|
||||
import minimist from 'minimist'
|
||||
import { waitForDb, db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import { hashSecret } from '../../modules/oauth2-server/app/src/SecretsHelper.js'
|
||||
|
||||
async function main() {
|
||||
const opts = parseArgs()
|
||||
@@ -91,11 +89,10 @@ Options:
|
||||
`)
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
+13
-14
@@ -1,9 +1,9 @@
|
||||
const minimist = require('minimist')
|
||||
const { ObjectId } = require('mongodb-legacy')
|
||||
const { waitForDb, db } = require('../../app/src/infrastructure/mongodb')
|
||||
const {
|
||||
hashSecret,
|
||||
} = require('../../modules/oauth2-server/app/src/SecretsHelper')
|
||||
import minimist from 'minimist'
|
||||
import mongodb from 'mongodb-legacy'
|
||||
import { waitForDb, db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import { hashSecret } from '../../modules/oauth2-server/app/src/SecretsHelper.js'
|
||||
|
||||
const { ObjectId } = mongodb
|
||||
|
||||
async function main() {
|
||||
const opts = parseArgs()
|
||||
@@ -121,11 +121,10 @@ function toArray(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)
|
||||
}
|
||||
+10
-11
@@ -1,9 +1,9 @@
|
||||
const minimist = require('minimist')
|
||||
const {
|
||||
import minimist from 'minimist'
|
||||
import {
|
||||
waitForDb,
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} = require('../../app/src/infrastructure/mongodb')
|
||||
} from '../../app/src/infrastructure/mongodb.js'
|
||||
|
||||
async function main() {
|
||||
const opts = parseArgs()
|
||||
@@ -114,11 +114,10 @@ Options:
|
||||
`)
|
||||
}
|
||||
|
||||
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