mirror of https://github.com/mongodb/mongo
SERVER-105599: Make session.js a module (#38531)
GitOrigin-RevId: b87eff51cd102ddc9ad4c8fcd0ad29dedea637cf
This commit is contained in:
parent
fe60c6300c
commit
3cf20e020e
|
|
@ -105,7 +105,7 @@ export default [
|
|||
testingReplication: true,
|
||||
uncheckedParallelShellPidsString: true,
|
||||
|
||||
// src/mongo/shell/session.d.ts
|
||||
// src/mongo/shell/session_global.js
|
||||
DriverSession: true,
|
||||
SessionOptions: true,
|
||||
_DelegatingDriverSession: true,
|
||||
|
|
|
|||
|
|
@ -366,6 +366,7 @@ extern const JSFile explainable_global;
|
|||
extern const JSFile mongo;
|
||||
extern const JSFile prelude;
|
||||
extern const JSFile session;
|
||||
extern const JSFile session_global;
|
||||
extern const JSFile query;
|
||||
extern const JSFile utils;
|
||||
extern const JSFile utils_sh;
|
||||
|
|
@ -380,6 +381,7 @@ void Scope::execCoreFiles() {
|
|||
execSetup(JSFiles::db);
|
||||
execSetup(JSFiles::explain_query);
|
||||
execSetup(JSFiles::explainable);
|
||||
execSetup(JSFiles::session);
|
||||
|
||||
// globals
|
||||
execSetup(JSFiles::bulk_api_global);
|
||||
|
|
@ -387,13 +389,13 @@ void Scope::execCoreFiles() {
|
|||
execSetup(JSFiles::db_global);
|
||||
execSetup(JSFiles::explain_query_global);
|
||||
execSetup(JSFiles::explainable_global);
|
||||
execSetup(JSFiles::session_global);
|
||||
|
||||
// scripts
|
||||
execSetup(JSFiles::utils);
|
||||
execSetup(JSFiles::utils_sh);
|
||||
execSetup(JSFiles::utils_auth);
|
||||
execSetup(JSFiles::mongo);
|
||||
execSetup(JSFiles::session);
|
||||
execSetup(JSFiles::query);
|
||||
execSetup(JSFiles::error_codes);
|
||||
execSetup(JSFiles::collection);
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ MONGOJS_CPP_JSFILES = [
|
|||
"prelude.js",
|
||||
"query.js",
|
||||
"session.js",
|
||||
"session_global.js",
|
||||
"types.js",
|
||||
"utils.js",
|
||||
"utils_auth.js",
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
// type declarations for session.js
|
||||
|
||||
declare class DriverSession {}
|
||||
declare class SessionOptions {}
|
||||
declare class _DelegatingDriverSession {}
|
||||
declare class _DummyDriverSession {}
|
||||
declare class _ServerSession {}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,15 @@
|
|||
// Populate global variables from modules for backwards compatibility
|
||||
|
||||
import {
|
||||
_DelegatingDriverSession,
|
||||
_DummyDriverSession,
|
||||
_ServerSession,
|
||||
DriverSession,
|
||||
SessionOptions
|
||||
} from "src/mongo/shell/session.js";
|
||||
|
||||
globalThis.DriverSession = DriverSession;
|
||||
globalThis.SessionOptions = SessionOptions;
|
||||
globalThis._DummyDriverSession = _DummyDriverSession;
|
||||
globalThis._DelegatingDriverSession = _DelegatingDriverSession;
|
||||
globalThis._ServerSession = _ServerSession;
|
||||
Loading…
Reference in New Issue