Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ export async function createDB(opts?: ServerOptions) {
downloadRetries: 10,
initSQLString: ''
}

const suppliedOpts = opts || {};
const suppliedOptsKeys = Object.keys(suppliedOpts);
const internalOpts = ['_DO_NOT_USE_deleteDBAfterStopped', '_DO_NOT_USE_dbPath', '_DO_NOT_USE_binaryDirectoryPath'];

for (const opt of internalOpts) {
if (suppliedOptsKeys.includes(opt)) {
console.warn(`[ mysql-memory-server - Options WARN ]: Creating MySQL database with option ${opt}. This is considered unstable and should not be used externally. Please consider removing this option.`)
}
}

const options: InternalServerOptions = {...defaultOptions, ...opts}

Expand Down