|
| 1 | +import * as fs from 'node:fs'; |
| 2 | +import * as path from 'node:path'; |
| 3 | + |
| 4 | +// eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 5 | +function printExports() { |
| 6 | + function* walk(root: string): Generator<string> { |
| 7 | + const directoryContents = fs.readdirSync(root); |
| 8 | + for (const filepath of directoryContents) { |
| 9 | + const fullPath = path.join(root, filepath); |
| 10 | + const stat = fs.statSync(fullPath); |
| 11 | + if (stat.isDirectory()) { |
| 12 | + yield* walk(fullPath); |
| 13 | + } else if (stat.isFile()) { |
| 14 | + yield fullPath; |
| 15 | + } |
| 16 | + } |
| 17 | + } |
| 18 | + const driverSourceFiles = Array.from(walk(path.resolve(__dirname, '..', 'src'))); |
| 19 | + |
| 20 | + for (const srcFile of driverSourceFiles) { |
| 21 | + console.log(`export * from '${path.relative(__dirname, srcFile)}';`); |
| 22 | + } |
| 23 | +} |
| 24 | + |
| 25 | +export * from '../src/admin'; |
| 26 | +export * from '../src/bson'; |
| 27 | +export * from '../src/bulk/common'; |
| 28 | +export * from '../src/bulk/ordered'; |
| 29 | +export * from '../src/bulk/unordered'; |
| 30 | +export * from '../src/change_stream'; |
| 31 | +export * from '../src/client-side-encryption/auto_encrypter'; |
| 32 | +export * from '../src/client-side-encryption/client_encryption'; |
| 33 | +export * from '../src/client-side-encryption/errors'; |
| 34 | +export * from '../src/client-side-encryption/mongocryptd_manager'; |
| 35 | +export * from '../src/client-side-encryption/providers/aws'; |
| 36 | +export * from '../src/client-side-encryption/providers/azure'; |
| 37 | +export * from '../src/client-side-encryption/providers/gcp'; |
| 38 | +export * from '../src/client-side-encryption/providers/index'; |
| 39 | +export * from '../src/client-side-encryption/state_machine'; |
| 40 | +export * from '../src/cmap/auth/auth_provider'; |
| 41 | +export * from '../src/cmap/auth/aws_temporary_credentials'; |
| 42 | +export * from '../src/cmap/auth/gssapi'; |
| 43 | +export * from '../src/cmap/auth/mongo_credentials'; |
| 44 | +export * from '../src/cmap/auth/mongodb_aws'; |
| 45 | +export * from '../src/cmap/auth/mongodb_oidc'; |
| 46 | +export * from '../src/cmap/auth/mongodb_oidc/automated_callback_workflow'; |
| 47 | +export * from '../src/cmap/auth/mongodb_oidc/azure_machine_workflow'; |
| 48 | +export * from '../src/cmap/auth/mongodb_oidc/callback_workflow'; |
| 49 | +export * from '../src/cmap/auth/plain'; |
| 50 | +export * from '../src/cmap/auth/providers'; |
| 51 | +export * from '../src/cmap/auth/scram'; |
| 52 | +export * from '../src/cmap/auth/x509'; |
| 53 | +export * from '../src/cmap/command_monitoring_events'; |
| 54 | +export * from '../src/cmap/commands'; |
| 55 | +export * from '../src/cmap/connect'; |
| 56 | +export * from '../src/cmap/connection'; |
| 57 | +export * from '../src/cmap/connection_pool'; |
| 58 | +export * from '../src/cmap/connection_pool_events'; |
| 59 | +export * from '../src/cmap/errors'; |
| 60 | +export * from '../src/cmap/handshake/client_metadata'; |
| 61 | +export * from '../src/cmap/metrics'; |
| 62 | +export * from '../src/cmap/stream_description'; |
| 63 | +export * from '../src/cmap/wire_protocol/compression'; |
| 64 | +export * from '../src/cmap/wire_protocol/constants'; |
| 65 | +export * from '../src/cmap/wire_protocol/on_demand/document'; |
| 66 | +export * from '../src/cmap/wire_protocol/responses'; |
| 67 | +export * from '../src/cmap/wire_protocol/shared'; |
| 68 | +export * from '../src/collection'; |
| 69 | +export * from '../src/connection_string'; |
| 70 | +export * from '../src/constants'; |
| 71 | +export * from '../src/cursor/abstract_cursor'; |
| 72 | +export * from '../src/cursor/aggregation_cursor'; |
| 73 | +export * from '../src/cursor/change_stream_cursor'; |
| 74 | +export * from '../src/cursor/find_cursor'; |
| 75 | +export * from '../src/cursor/list_collections_cursor'; |
| 76 | +export * from '../src/cursor/list_indexes_cursor'; |
| 77 | +export * from '../src/cursor/run_command_cursor'; |
| 78 | +export * from '../src/db'; |
| 79 | +export * from '../src/deps'; |
| 80 | +export * from '../src/encrypter'; |
| 81 | +export * from '../src/error'; |
| 82 | +export * from '../src/explain'; |
| 83 | +export * from '../src/gridfs/download'; |
| 84 | +export * from '../src/gridfs/index'; |
| 85 | +export * from '../src/gridfs/upload'; |
| 86 | +export * from '../src/mongo_client'; |
| 87 | +export * from '../src/mongo_logger'; |
| 88 | +export * from '../src/mongo_types'; |
| 89 | +export * from '../src/operations/aggregate'; |
| 90 | +export * from '../src/operations/client_bulk_write/command_builder'; |
| 91 | +export * from '../src/operations/client_bulk_write/common'; |
| 92 | +export * from '../src/operations/client_bulk_write/results_merger'; |
| 93 | +export * from '../src/operations/command'; |
| 94 | +export * from '../src/operations/count'; |
| 95 | +export * from '../src/operations/create_collection'; |
| 96 | +export * from '../src/operations/delete'; |
| 97 | +export * from '../src/operations/distinct'; |
| 98 | +export * from '../src/operations/drop'; |
| 99 | +export * from '../src/operations/estimated_document_count'; |
| 100 | +export * from '../src/operations/execute_operation'; |
| 101 | +export * from '../src/operations/find'; |
| 102 | +export * from '../src/operations/find_and_modify'; |
| 103 | +export * from '../src/operations/get_more'; |
| 104 | +export * from '../src/operations/indexes'; |
| 105 | +export * from '../src/operations/insert'; |
| 106 | +export * from '../src/operations/kill_cursors'; |
| 107 | +export * from '../src/operations/list_collections'; |
| 108 | +export * from '../src/operations/list_databases'; |
| 109 | +export * from '../src/operations/operation'; |
| 110 | +export * from '../src/operations/profiling_level'; |
| 111 | +export * from '../src/operations/remove_user'; |
| 112 | +export * from '../src/operations/rename'; |
| 113 | +export * from '../src/operations/run_command'; |
| 114 | +export * from '../src/operations/search_indexes/create'; |
| 115 | +export * from '../src/operations/search_indexes/drop'; |
| 116 | +export * from '../src/operations/search_indexes/update'; |
| 117 | +export * from '../src/operations/set_profiling_level'; |
| 118 | +export * from '../src/operations/stats'; |
| 119 | +export * from '../src/operations/update'; |
| 120 | +export * from '../src/operations/validate_collection'; |
| 121 | +export * from '../src/read_concern'; |
| 122 | +export * from '../src/read_preference'; |
| 123 | +export * from '../src/sdam/common'; |
| 124 | +export * from '../src/sdam/events'; |
| 125 | +export * from '../src/sdam/monitor'; |
| 126 | +export * from '../src/sdam/server'; |
| 127 | +export * from '../src/sdam/server_description'; |
| 128 | +export * from '../src/sdam/server_selection'; |
| 129 | +export * from '../src/sdam/srv_polling'; |
| 130 | +export * from '../src/sdam/topology'; |
| 131 | +export * from '../src/sdam/topology_description'; |
| 132 | +export * from '../src/sessions'; |
| 133 | +export * from '../src/sort'; |
| 134 | +export * from '../src/timeout'; |
| 135 | +export * from '../src/transactions'; |
| 136 | +export * from '../src/utils'; |
| 137 | +export * from '../src/write_concern'; |
| 138 | + |
| 139 | +// Must be last for precedence |
| 140 | +export * from '../src/index'; |
0 commit comments