Merge pull request #29919 from overleaf/revert-29795-ar-last-infrastructure-conversions
Revert "[web] last infrastructure conversions" GitOrigin-RevId: 48dc64553012afb5d2db4b2eb9c9898489b7e5ef
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
import minimist from 'minimist'
|
||||
|
||||
import fs from 'node:fs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import pLimit from 'p-limit'
|
||||
import FeaturesUpdater from '../app/src/Features/Subscription/FeaturesUpdater.mjs'
|
||||
import FeaturesHelper from '../app/src/Features/Subscription/FeaturesHelper.mjs'
|
||||
|
||||
@@ -2,7 +2,7 @@ import fs from 'node:fs'
|
||||
import minimist from 'minimist'
|
||||
import { parse } from 'csv'
|
||||
import Stream from 'node:stream/promises'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import { Subscription } from '../app/src/models/Subscription.mjs'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import fs from 'node:fs'
|
||||
import * as csv from 'csv/sync'
|
||||
import minimist from 'minimist'
|
||||
import UserGetter from '../app/src/Features/User/UserGetter.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import _ from 'lodash'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ import logger from '@overleaf/logger'
|
||||
import minimist from 'minimist'
|
||||
import { z } from 'zod'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import AccountMappingHelper from '../../app/src/Features/Analytics/AccountMappingHelper.mjs'
|
||||
import { registerAccountMapping } from '../../app/src/Features/Analytics/AnalyticsManager.mjs'
|
||||
import { triggerGracefulShutdown } from '../../app/src/infrastructure/GracefulShutdown.mjs'
|
||||
import { triggerGracefulShutdown } from '../../app/src/infrastructure/GracefulShutdown.js'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
|
||||
const paramsSchema = z.object({
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
import logger from '@overleaf/logger'
|
||||
import minimist from 'minimist'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import AccountMappingHelper from '../../app/src/Features/Analytics/AccountMappingHelper.mjs'
|
||||
import { registerAccountMapping } from '../../app/src/Features/Analytics/AnalyticsManager.mjs'
|
||||
import { gracefulShutdown } from '../../app/src/infrastructure/GracefulShutdown.mjs'
|
||||
import Validation from '../../app/src/infrastructure/Validation.mjs'
|
||||
import { gracefulShutdown } from '../../app/src/infrastructure/GracefulShutdown.js'
|
||||
import Validation from '../../app/src/infrastructure/Validation.js'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
|
||||
const paramsSchema = Validation.z.object({
|
||||
|
||||
@@ -6,7 +6,7 @@ import ChatApiHandler from '../app/src/Features/Chat/ChatApiHandler.mjs'
|
||||
import DocumentUpdaterHandler from '../app/src/Features/DocumentUpdater/DocumentUpdaterHandler.mjs'
|
||||
import DocstoreManager from '../app/src/Features/Docstore/DocstoreManager.mjs'
|
||||
import HistoryManager from '../app/src/Features/History/HistoryManager.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const OPTS = parseArgs()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import UserSessionsManager from '../app/src/Features/User/UserSessionsManager.mjs'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import NotificationsBuilder from '../app/src/Features/Notifications/NotificationsBuilder.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import Queues from '../app/src/infrastructure/Queues.mjs'
|
||||
import SubscriptionLocator from '../app/src/Features/Subscription/SubscriptionLocator.mjs'
|
||||
import PlansLocator from '../app/src/Features/Subscription/PlansLocator.mjs'
|
||||
import FeaturesHelper from '../app/src/Features/Subscription/FeaturesHelper.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const { getQueue } = Queues
|
||||
const WRITE_CONCURRENCY = parseInt(process.env.WRITE_CONCURRENCY || '10', 10)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @ts-check
|
||||
import minimist from 'minimist'
|
||||
import { batchedUpdateWithResultHandling } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const argv = minimist(process.argv.slice(2))
|
||||
const commit = argv.commit !== undefined
|
||||
|
||||
@@ -4,7 +4,7 @@ import SubscriptionLocator from '../app/src/Features/Subscription/SubscriptionLo
|
||||
import PlansLocator from '../app/src/Features/Subscription/PlansLocator.mjs'
|
||||
import FeaturesHelper from '../app/src/Features/Subscription/FeaturesHelper.mjs'
|
||||
import AnalyticsManager from '../app/src/Features/Analytics/AnalyticsManager.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const WRITE_CONCURRENCY = parseInt(process.env.WRITE_CONCURRENCY, 10) || 10
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
db,
|
||||
ObjectId,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import DocstoreManager from '../app/src/Features/Docstore/DocstoreManager.mjs'
|
||||
import { NotFoundError } from '../app/src/Features/Errors/Errors.js'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
batchedUpdate,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import minimist from 'minimist'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import DocstoreManager from '../app/src/Features/Docstore/DocstoreManager.mjs'
|
||||
import DocumentUpdaterHandler from '../app/src/Features/DocumentUpdater/DocumentUpdaterHandler.mjs'
|
||||
import ProjectGetter from '../app/src/Features/Project/ProjectGetter.mjs'
|
||||
import ProjectEntityMongoUpdateHandler from '../app/src/Features/Project/ProjectEntityMongoUpdateHandler.mjs'
|
||||
import { waitForDb, db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { waitForDb, db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import HistoryManager from '../app/src/Features/History/HistoryManager.mjs'
|
||||
import logger from '@overleaf/logger'
|
||||
import minimist from 'minimist'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import UserSessionsManager from '../app/src/Features/User/UserSessionsManager.mjs'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* DRY_RUN=false node scripts/clear_feedback_collection.mjs 2022-11-01 # deletion mode
|
||||
*/
|
||||
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const runScript = async (timestamp, dryRun) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import fs from 'node:fs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import UserUpdater from '../app/src/Features/User/UserUpdater.mjs'
|
||||
import UserSessionsManager from '../app/src/Features/User/UserSessionsManager.mjs'
|
||||
import UserAuditLogHandler from '../app/src/Features/User/UserAuditLogHandler.mjs'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import minimist from 'minimist'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import ProjectEntityUpdateHandler from '../app/src/Features/Project/ProjectEntityUpdateHandler.mjs'
|
||||
import Errors from '../app/src/Features/Errors/Errors.js'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @ts-check
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
import CollaboratorsHandler from '../app/src/Features/Collaborators/CollaboratorsHandler.mjs'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import _ from 'lodash'
|
||||
import { formatTokenUsageStats } from '@overleaf/access-token-encryptor/scripts/helpers/format-usage-stats.js'
|
||||
import { ensureMongoTimeout } from './helpers/env_variable_helper.mjs'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import { extname } from 'node:path'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import readline from 'node:readline'
|
||||
import { ObjectId, db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { ObjectId, db } from '../app/src/infrastructure/mongodb.js'
|
||||
import ProjectEntityHandler from '../app/src/Features/Project/ProjectEntityHandler.mjs'
|
||||
import ProjectGetter from '../app/src/Features/Project/ProjectGetter.mjs'
|
||||
import Errors from '../app/src/Features/Errors/Errors.js'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import minimist from 'minimist'
|
||||
import PQueue from 'p-queue'
|
||||
import InactiveProjectManager from '../app/src/Features/InactiveData/InactiveProjectManager.mjs'
|
||||
import { gracefulShutdown } from '../app/src/infrastructure/GracefulShutdown.mjs'
|
||||
import { gracefulShutdown } from '../app/src/infrastructure/GracefulShutdown.js'
|
||||
import logger from '@overleaf/logger'
|
||||
|
||||
// Global variables for tracking job and error counts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import minimist from 'minimist'
|
||||
|
||||
const argv = minimist(process.argv.slice(2))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from 'node:fs'
|
||||
import minimist from 'minimist'
|
||||
import readline from 'node:readline'
|
||||
import { db, ObjectId } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../../app/src/infrastructure/mongodb.js'
|
||||
import DocstoreManagerModule from '../../app/src/Features/Docstore/DocstoreManager.mjs'
|
||||
|
||||
const { promises: DocstoreManager } = DocstoreManagerModule
|
||||
|
||||
@@ -5,7 +5,7 @@ import ChatApiHandler from '../app/src/Features/Chat/ChatApiHandler.mjs'
|
||||
import DocumentUpdaterHandler from '../app/src/Features/DocumentUpdater/DocumentUpdaterHandler.mjs'
|
||||
import DocstoreManager from '../app/src/Features/Docstore/DocstoreManager.mjs'
|
||||
import HistoryManager from '../app/src/Features/History/HistoryManager.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const OPTS = parseArgs()
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import minimist from 'minimist'
|
||||
|
||||
import mongodb from 'mongodb-legacy'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import Errors from '../app/src/Features/Errors/Errors.js'
|
||||
import ProjectEntityMongoUpdateHandler from '../app/src/Features/Project/ProjectEntityMongoUpdateHandler.mjs'
|
||||
import { iterablePaths } from '../app/src/Features/Project/IterablePath.mjs'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import minimist from 'minimist'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const argv = minimist(process.argv.slice(2))
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import ChatApiHandler from '../app/src/Features/Chat/ChatApiHandler.mjs'
|
||||
import DeleteOrphanedDataHelper from './delete_orphaned_data_helper.mjs'
|
||||
import { ensureMongoTimeout } from './helpers/env_variable_helper.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const { ObjectId } = mongodb
|
||||
const { getHardDeletedProjectIds } = DeleteOrphanedDataHelper
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
db,
|
||||
READ_PREFERENCE_PRIMARY,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import { promiseMapWithLimit } from '@overleaf/promise-utils'
|
||||
|
||||
async function getDeletedProject(projectId, readPreference) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
db,
|
||||
READ_PREFERENCE_PRIMARY,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import { promiseMapWithLimit } from '@overleaf/promise-utils'
|
||||
import DeleteOrphanedDataHelper from './delete_orphaned_data_helper.mjs'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
@@ -3,8 +3,8 @@ import Path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { promiseMapWithLimit } from '@overleaf/promise-utils'
|
||||
import Settings from '@overleaf/settings'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import GracefulShutdown from '../app/src/infrastructure/GracefulShutdown.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import GracefulShutdown from '../app/src/infrastructure/GracefulShutdown.js'
|
||||
import ProjectDeleter from '../app/src/Features/Project/ProjectDeleter.mjs'
|
||||
import SplitTestManager from '../app/src/Features/SplitTests/SplitTestManager.mjs'
|
||||
import UserDeleter from '../app/src/Features/User/UserDeleter.mjs'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @ts-check
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
db,
|
||||
ObjectId,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import lodash from 'lodash'
|
||||
|
||||
const args = minimist(process.argv.slice(2), {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import minimist from 'minimist'
|
||||
import DocstoreManager from '../app/src/Features/Docstore/DocstoreManager.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const OPTS = parseArgs()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Alternatively, use an adhoc file: --logs=<(echo '{"projectId":"...","path":"..."}')
|
||||
*/
|
||||
import mongodb from 'mongodb-legacy'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import ProjectLocator from '../app/src/Features/Project/ProjectLocator.mjs'
|
||||
import minimist from 'minimist'
|
||||
import readline from 'node:readline'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'node:fs'
|
||||
import minimist from 'minimist'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import DocstoreManager from '../app/src/Features/Docstore/DocstoreManager.mjs'
|
||||
import FileStoreHandler from '../app/src/Features/FileStore/FileStoreHandler.mjs'
|
||||
import FileWriter from '../app/src/infrastructure/FileWriter.mjs'
|
||||
import FileWriter from '../app/src/infrastructure/FileWriter.js'
|
||||
import ProjectEntityMongoUpdateHandler from '../app/src/Features/Project/ProjectEntityMongoUpdateHandler.mjs'
|
||||
import ProjectLocator from '../app/src/Features/Project/ProjectLocator.mjs'
|
||||
import RedisWrapper from '@overleaf/redis-wrapper'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import mongodb from 'mongodb-legacy'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import DocumentUpdaterHandler from '../app/src/Features/DocumentUpdater/DocumentUpdaterHandler.mjs'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
db,
|
||||
ObjectId,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
/**
|
||||
* This script extracts user emails given a list of newline separated IDs
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
db,
|
||||
getCollectionInternal,
|
||||
} from '../../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../../app/src/infrastructure/mongodb.js'
|
||||
import { ensureMongoTimeout } from '../helpers/env_variable_helper.mjs'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
// Ensure default mongo query timeout has been increased 1h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import minimist from 'minimist'
|
||||
const argv = minimist(process.argv.slice(2))
|
||||
const commit = argv.commit !== undefined
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import minimist from 'minimist'
|
||||
import UserGetter from '../app/src/Features/User/UserGetter.mjs'
|
||||
import fs from 'node:fs'
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// node scripts/merge_group_subscription_members \
|
||||
// --target [targetSubscriptionId] --source [sourceSubscriptionId] --commit
|
||||
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
import SubscriptionUpdater from '../app/src/Features/Subscription/SubscriptionUpdater.mjs'
|
||||
import minimist from 'minimist'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../../app/src/infrastructure/mongodb.js'
|
||||
import { hashSecret } from '../../modules/oauth2-server/app/src/SecretsHelper.mjs'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import minimist from 'minimist'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import { hashSecret } from '../../modules/oauth2-server/app/src/SecretsHelper.mjs'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import minimist from 'minimist'
|
||||
import mongodb from 'mongodb-legacy'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import { hashSecret } from '../../modules/oauth2-server/app/src/SecretsHelper.mjs'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import minimist from 'minimist'
|
||||
import {
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../../app/src/infrastructure/mongodb.js'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
|
||||
async function main() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import minimist from 'minimist'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const OPTS = parseArgs()
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import minimist from 'minimist'
|
||||
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db, ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import ProjectEntityUpdateHandler from '../app/src/Features/Project/ProjectEntityUpdateHandler.mjs'
|
||||
import ProjectEntityRestoreHandler from '../app/src/Features/Project/ProjectEntityRestoreHandler.mjs'
|
||||
import RedisWrapper from '@overleaf/redis-wrapper'
|
||||
|
||||
@@ -5,7 +5,7 @@ import minimist from 'minimist'
|
||||
import {
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../../app/src/infrastructure/mongodb.js'
|
||||
|
||||
/**
|
||||
* @import { ObjectId } from 'mongodb-legacy'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import minimist from 'minimist'
|
||||
import _ from 'lodash'
|
||||
import async from 'async'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import { promiseMapWithLimit } from '@overleaf/promise-utils'
|
||||
import TokenGenerator from '../app/src/Features/TokenGenerator/TokenGenerator.mjs'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import UserUpdater from '../app/src/Features/User/UserUpdater.mjs'
|
||||
import UserGetter from '../app/src/Features/User/UserGetter.mjs'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
db,
|
||||
READ_PREFERENCE_SECONDARY,
|
||||
} from '../app/src/infrastructure/mongodb.mjs'
|
||||
} from '../app/src/infrastructure/mongodb.js'
|
||||
import parseArgs from 'minimist'
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// $ node scripts/remove_user_enrollment.mjs --id USER_ID --commit
|
||||
|
||||
import minimist from 'minimist'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import { User } from '../app/src/models/User.mjs'
|
||||
import { Subscription } from '../app/src/models/Subscription.mjs'
|
||||
import UserAuditLogHandler from '../app/src/Features/User/UserAuditLogHandler.mjs'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { scriptRunner } from './lib/ScriptRunner.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import minimist from 'minimist'
|
||||
const argv = minimist(process.argv.slice(2))
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import minimist from 'minimist'
|
||||
import settings from '@overleaf/settings'
|
||||
import ProjectDetailsHandler from '../app/src/Features/Project/ProjectDetailsHandler.mjs'
|
||||
import mongodb from '../app/src/infrastructure/mongodb.mjs'
|
||||
import mongoose from '../app/src/infrastructure/Mongoose.mjs'
|
||||
import mongodb from '../app/src/infrastructure/mongodb.js'
|
||||
import mongoose from '../app/src/infrastructure/Mongoose.js'
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import crypto from 'node:crypto'
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
import minimist from 'minimist'
|
||||
import { z } from '../../app/src/infrastructure/Validation.mjs'
|
||||
import { z } from '../../app/src/infrastructure/Validation.js'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
import {
|
||||
getRegionClient,
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
import minimist from 'minimist'
|
||||
import { z } from '../../app/src/infrastructure/Validation.mjs'
|
||||
import { z } from '../../app/src/infrastructure/Validation.js'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
import { getRegionClient } from '../../modules/subscriptions/app/src/StripeClient.mjs'
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Usage: node scripts/suspend_users.mjs <filename>
|
||||
*/
|
||||
import fs from 'node:fs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { ObjectId } from '../app/src/infrastructure/mongodb.js'
|
||||
import UserUpdater from '../app/src/Features/User/UserUpdater.mjs'
|
||||
import { promiseMapWithLimit } from '@overleaf/promise-utils'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const oldImage = process.argv[2]
|
||||
const newImage = process.argv[3]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { batchedUpdateWithResultHandling } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { db } from '../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
|
||||
const MODEL_NAME = process.argv.pop()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import mongodb from 'mongodb-legacy'
|
||||
import fs from 'node:fs'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import mongodb from 'mongodb-legacy'
|
||||
import fs from 'node:fs'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from '../../app/src/infrastructure/mongodb.mjs'
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
import mongodb from 'mongodb-legacy'
|
||||
import fs from 'node:fs'
|
||||
|
||||
Reference in New Issue
Block a user