{"_id":"@assignar/mysqldump","_rev":"22-295940dbcc5dbdd983f175c3d7cef8ff","name":"@assignar/mysqldump","dist-tags":{"latest":"2.1.1","next":"2.1.1"},"versions":{"2.0.0-rc14":{"name":"@assignar/mysqldump","version":"2.0.0-rc14","description":"Create a DUMP from MySQL","main":"dist/cjs.js","module":"dist/es.js","typings":"dist/mysqldump.d.ts","scripts":{"test":"jest --verbose --config=./jest.json","test-prod":"JEST_USE_NPM_BUILD=true jest --verbose --config=./jest.json","view-coverage":"open ./coverage/index.html","build":"rollup -c && dts-bundle-generator -o dist/mysqldump.d.ts build-decl/main.d.ts --umd-module-name=mysqldump && rimraf build-decl","clean":"rimraf dist && rimraf build-decl","lint":"eslint src --ext \".ts\"","start":"ts-node -P ./tsconfig.run.json ./test/scripts/launch.ts"},"repository":{"type":"git","url":"git+https://github.com/assignar/mysqldump.git"},"keywords":["backup","mysql","mysql-dump","dump","restore","database","backup","database"],"author":{"name":"Brad Zacher"},"license":"MIT","bugs":{"url":"https://github.com/assignar/mysqldump/issues"},"homepage":"https://github.com/assignar/mysqldump","dependencies":{"deepmerge":"^2.0.1","mysql2":"^1.5.2","sql-formatter":"^2.1.2","sqlstring":"^2.3.1"},"devDependencies":{"@types/deepmerge":"^1.3.3","@types/extend":"^3.0.0","@types/invariant":"^2.2.29","@types/jest":"^22.1.4","@types/mysql":"^2.15.2","@types/sqlstring":"^2.2.0","babel":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0","dts-bundle-generator":"^0.6.0","eslint":"^4.18.1","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.9.0","eslint-plugin-typescript":"^0.9.0","eslint-restricted-globals":"^0.1.1","jest":"^22.4.2","rimraf":"^2.6.2","rollup":"^0.52.1","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-typescript2":"^0.9.0","ts-jest":"^22.4.0","ts-node":"^5.0.0","typescript":"^2.7.2","typescript-eslint-parser":"^14.0.0"},"gitHead":"cee82a34a6220c3d13eadcb0b5e3c18f6530c2f5","_id":"@assignar/mysqldump@2.0.0-rc14","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"bradzacher","email":"brad.zacher@gmail.com"},"dist":{"integrity":"sha512-nm6WROpgd8+2e0gZ4/M6EGLL8qk00/I8hS4HidDQ3cIkB4QL9JZsJ/7l3ipGqD317Zrggj43rxKdTHlYFBIIGQ==","shasum":"dddbabbac6422dadb36af924d654f0a028ae5b89","tarball":"https://registry.npmjs.org/@assignar/mysqldump/-/mysqldump-2.0.0-rc14.tgz","fileCount":6,"unpackedSize":80568,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHMHGwkc+3fD6s+x9TrqnU27GPNlhremRqdtLwcBvbHcAiAp0DlTdNpOsZ5HKeCaJosN1wCAsmKQ13TcHj/O1SXY6Q=="}]},"maintainers":[{"name":"adamhannigan","email":"adam@assignar.com"},{"name":"bradzacher","email":"brad.zacher@gmail.com"},{"name":"chappo","email":"chappo@assignar.com"},{"name":"dashmug","email":"noelmartin@gmail.com"},{"name":"mtomic","email":"marko@assignar.com"},{"name":"thimey","email":"simon@assignar.com"},{"name":"vinifala","email":"vini.df@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mysqldump_2.0.0-rc14_1520813982538_0.6279019603507983"},"_hasShrinkwrap":false},"2.0.0":{"name":"@assignar/mysqldump","version":"2.0.0","description":"Create a DUMP from MySQL","main":"dist/cjs.js","module":"dist/es.js","typings":"dist/mysqldump.d.ts","scripts":{"test":"jest --verbose --config=./jest.json","test-prod":"JEST_USE_NPM_BUILD=true jest --verbose --config=./jest.json","view-coverage":"open ./coverage/index.html","build":"rollup -c && dts-bundle-generator -o dist/mysqldump.d.ts build-decl/main.d.ts --umd-module-name=mysqldump && rimraf build-decl","clean":"rimraf dist && rimraf build-decl","lint":"eslint src --ext \".ts\"","start":"ts-node -P ./tsconfig.run.json ./test/scripts/launch.ts"},"repository":{"type":"git","url":"git+https://github.com/assignar/mysqldump.git"},"keywords":["backup","mysql","mysql-dump","dump","restore","database","backup","database"],"author":{"name":"Brad Zacher"},"license":"MIT","bugs":{"url":"https://github.com/assignar/mysqldump/issues"},"homepage":"https://github.com/assignar/mysqldump","dependencies":{"deepmerge":"^2.0.1","mysql2":"^1.5.2","sql-formatter":"^2.1.2","sqlstring":"^2.3.1"},"devDependencies":{"@types/deepmerge":"^1.3.3","@types/extend":"^3.0.0","@types/invariant":"^2.2.29","@types/jest":"^22.1.4","@types/mysql":"^2.15.2","@types/sqlstring":"^2.2.0","babel":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0","dts-bundle-generator":"^0.6.0","eslint":"^4.18.1","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.9.0","eslint-plugin-typescript":"^0.9.0","eslint-restricted-globals":"^0.1.1","jest":"^22.4.2","rimraf":"^2.6.2","rollup":"^0.52.1","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-typescript2":"^0.9.0","ts-jest":"^22.4.0","ts-node":"^5.0.0","typescript":"^2.7.2","typescript-eslint-parser":"^14.0.0"},"gitHead":"22da7e8da19cc9e391cf74cafb54cad633c20212","_id":"@assignar/mysqldump@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"bradzacher","email":"brad.zacher@gmail.com"},"dist":{"integrity":"sha512-x1bttG48tAv8HFeHN0dCN92V8N7ZExwSGLAouwCV0okMMT+dEdQ0gI6wfDUaW0UUBMbGHFc0wUUbDY/2pBjo4g==","shasum":"5a43078924b219b4065dc4d2fd83567f222ed6c4","tarball":"https://registry.npmjs.org/@assignar/mysqldump/-/mysqldump-2.0.0.tgz","fileCount":6,"unpackedSize":82322,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXHTD6mN3ijWCXBnsUuEyRlP1L7ofUtCtGGKsfBx7YOgIhAPwzU1FPcjRilzY4a+yUlGh0sZC5tmJv7LdOmZuezbk7"}]},"maintainers":[{"name":"adamhannigan","email":"adam@assignar.com"},{"name":"bradzacher","email":"brad.zacher@gmail.com"},{"name":"chappo","email":"chappo@assignar.com"},{"name":"dashmug","email":"noelmartin@gmail.com"},{"name":"mtomic","email":"marko@assignar.com"},{"name":"thimey","email":"simon@assignar.com"},{"name":"vinifala","email":"vini.df@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mysqldump_2.0.0_1520830076605_0.03061679403954498"},"_hasShrinkwrap":false,"deprecated":"This fork has been merged into the main package, install mysqldump instead"},"2.1.0":{"name":"@assignar/mysqldump","version":"2.1.0","description":"Create a DUMP from MySQL","main":"dist/cjs.js","module":"dist/es.js","typings":"dist/mysqldump.d.ts","scripts":{"pretest":"ts-node -P ./tsconfig.json --files ./test/scripts/initDb.ts","pretest-prod":"ts-node -P ./tsconfig.json --files ./test/scripts/initDb.ts","setup-travis":"node ./test/setupTravis.js","test":"jest --ci --config=./jest.json","test-prod":"JEST_USE_NPM_BUILD=true jest --ci --config=./test/jest-prod-config.js","view-coverage":"open ./coverage/index.html","build":"rollup -c && dts-bundle-generator -o dist/mysqldump.d.ts build-decl/main.d.ts --umd-module-name=mysqldump && rimraf build-decl","clean":"rimraf dist && rimraf build-decl","lint":"eslint src --ext \".ts\"","start":"ts-node -P ./tsconfig.json --files ./test/scripts/launch.ts"},"repository":{"type":"git","url":"git+https://github.com/assignar/mysqldump.git"},"keywords":["backup","mysql","mysql-dump","dump","restore","database","backup","database"],"author":{"name":"Brad Zacher"},"license":"MIT","bugs":{"url":"https://github.com/assignar/mysqldump/issues"},"homepage":"https://github.com/assignar/mysqldump","dependencies":{"deepmerge":"^2.1.1","mysql2":"^1.5.3","sql-formatter":"^2.3.1","sqlstring":"^2.3.1"},"devDependencies":{"@types/deepmerge":"^2.1.0","@types/extend":"^3.0.0","@types/invariant":"^2.2.29","@types/jest":"^23.1.2","@types/mysql":"^2.15.5","@types/sqlstring":"^2.2.0","@types/tmp":"^0.0.33","babel":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0","copyfiles":"^2.0.0","dts-bundle-generator":"^1.5.0","eslint":"^4.18.1","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.9.0","eslint-plugin-typescript":"^0.9.0","eslint-restricted-globals":"^0.1.1","jest":"^23.2.0","rimraf":"^2.6.2","rollup":"^0.52.1","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-typescript2":"^0.9.0","tmp":"^0.0.33","ts-jest":"^22.4.6","ts-node":"^7.0.0","typescript":"^2.9.2","typescript-eslint-parser":"^14.0.0"},"gitHead":"948caf3e7805bc3a304f3e261b0488171d481488","_id":"@assignar/mysqldump@2.1.0","_npmVersion":"6.0.1","_nodeVersion":"8.10.0","_npmUser":{"name":"bradzacher","email":"brad.zacher@gmail.com"},"dist":{"integrity":"sha512-Z/nQ+CHrfyDOJK5hzARQmverhT5N3gRiJhYF/r+WFKNk/Ir3KCJN4icAinOo363rVK6ClPLmJ7g/Uzdm/tsZiw==","shasum":"0a0c920eb61a13fc3fa4d498ebe75cfe34c79a7c","tarball":"https://registry.npmjs.org/@assignar/mysqldump/-/mysqldump-2.1.0.tgz","fileCount":6,"unpackedSize":84254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbMbP8CRA9TVsSAnZWagAAtc8P/3GPXAhF/Fg4Huc4gPqk\nDhplTTlA+1vy4uRMriAKwQIjC41Kq1q3O7DS3GaXZMK9Y9n0oL5Ih63f0Xx0\nmiYd1Q65OX3bL1cq/NzBW9mu48wcaX05Mdlzi+OOouM7BsA3aWximFy2n/Y4\nBBwVIDwthpuSIeVATr7N+OmT6utrPjo8lr8wkQrCDKKRMHoCj646AQDHMlHa\nYsdD86CCEaAj/o+KhnHSDm/vbXo/ejranY6PTlHmW7OlLO4nR2buR6vQfYJq\ne7Y1H9jZRnfqmJKCqu+UklTbJHd9V8hrFw0fAgIgWaa1ThrRgY9NCgquwlmM\njOxGCKvSyTUOfqyB6ds7qFjWpwoezC+SOZ0eBRshXVo50BB9jG8pr9REgoIn\n4Yttpqb3dIckLNiOs9HXdJ2CEsIMmJY6AedmF933LYXmxMiUvL5ojeZg3rGr\n3hcSSMJ5qum0pmq+R8V0KSLj8V36gR6tMTrW/HaD1aFq54Vl6am9xw6+Uxbc\nCZMqEv0rr8NZKHQdfFpGIuI2PWyC6oDQFwFgmW9cheg1ivVujKX+6SQi/1bt\nmbKZysYRwbGTZ6Ov/qoEk62WES+nbLozLxXfZzyfu3MIYn8NKD8eEcJxMSRS\n53MFCHvXhhQYfFBk2OUxWbaIVUEzrVjV7GLTtHROTye+x23Tc3ZH7N/b1kL7\nTN7F\r\n=CYhI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAR6CQdQ+ZYFHNyd1Ixsgo/yjqvtH1Iwg6Tn9rd2FebRAiBqQsPQ+N+wv41je+w8bkQ4EDzEXE2oKf1pEOfAdSVNFw=="}]},"maintainers":[{"email":"adam@assignar.com","name":"adamhannigan"},{"email":"eng.shared@assignar.com","name":"assignar-bot"},{"email":"brad.zacher@gmail.com","name":"bradzacher"},{"email":"chappo@assignar.com","name":"chappo"},{"email":"noelmartin@gmail.com","name":"dashmug"},{"email":"gongyuan1987@gmail.com","name":"emmag"},{"email":"hannahsiujadavji@gmail.com","name":"hannahjavs"},{"email":"marko@assignar.com","name":"mtomic"},{"email":"winston@sebesta.io","name":"stoepszli"},{"email":"simon@assignar.com","name":"thimey"},{"email":"vangelis@assignar.com","name":"vangelis_assignar"},{"email":"vini.df@gmail.com","name":"vinifala"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mysqldump_2.1.0_1529983996125_0.147472288314634"},"_hasShrinkwrap":false,"deprecated":"This fork has been merged into the main package, install mysqldump instead"},"2.1.1":{"name":"@assignar/mysqldump","version":"2.1.1","description":"Create a DUMP from MySQL","main":"dist/cjs.js","module":"dist/es.js","typings":"dist/mysqldump.d.ts","scripts":{"pretest":"ts-node -P ./tsconfig.json --files ./test/scripts/initDb.ts","pretest-prod":"ts-node -P ./tsconfig.json --files ./test/scripts/initDb.ts","setup-travis":"node ./test/setupTravis.js","test":"jest --ci --config=./jest.json","test-prod":"JEST_USE_NPM_BUILD=true jest --ci --config=./test/jest-prod-config.js","view-coverage":"open ./coverage/index.html","build":"rollup -c && dts-bundle-generator -o dist/mysqldump.d.ts build-decl/main.d.ts --umd-module-name=mysqldump && rimraf build-decl","clean":"rimraf dist && rimraf build-decl","lint":"eslint src --ext \".ts\"","start":"ts-node -P ./tsconfig.json --files ./test/scripts/launch.ts"},"repository":{"type":"git","url":"git+https://github.com/assignar/mysqldump.git"},"keywords":["backup","mysql","mysql-dump","dump","restore","database","backup","database"],"author":{"name":"Brad Zacher"},"license":"MIT","bugs":{"url":"https://github.com/assignar/mysqldump/issues"},"homepage":"https://github.com/assignar/mysqldump","dependencies":{"deepmerge":"^2.1.1","mysql2":"^1.5.3","sql-formatter":"^2.3.1","sqlstring":"^2.3.1"},"devDependencies":{"@types/deepmerge":"^2.1.0","@types/extend":"^3.0.0","@types/invariant":"^2.2.29","@types/jest":"^23.1.2","@types/mysql":"^2.15.5","@types/sqlstring":"^2.2.0","@types/tmp":"^0.0.33","babel":"^6.23.0","babel-plugin-transform-object-rest-spread":"^6.26.0","copyfiles":"^2.0.0","dts-bundle-generator":"^1.5.0","eslint":"^4.18.1","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.9.0","eslint-plugin-typescript":"^0.9.0","eslint-restricted-globals":"^0.1.1","jest":"^23.2.0","rimraf":"^2.6.2","rollup":"^0.52.1","rollup-plugin-commonjs":"^8.2.6","rollup-plugin-typescript2":"^0.9.0","tmp":"^0.0.33","ts-jest":"^22.4.6","ts-node":"^7.0.0","typescript":"^2.9.2","typescript-eslint-parser":"^14.0.0"},"gitHead":"9405bb3d1b88b8fe6e3385691e5b39a8a60e3e4d","_id":"@assignar/mysqldump@2.1.1","_npmVersion":"6.0.1","_nodeVersion":"8.10.0","_npmUser":{"name":"bradzacher","email":"brad.zacher@gmail.com"},"dist":{"integrity":"sha512-7RbNYRj496QGLPd6kdDSGtXLarS6M1o9UVAemsABXqRR2oL136pQmQBVuNy3jEkyHwoOrEOckti1hJu78yjUSg==","shasum":"92323f2ddd8510e1935c1a767ae3600190ec7c2f","tarball":"https://registry.npmjs.org/@assignar/mysqldump/-/mysqldump-2.1.1.tgz","fileCount":6,"unpackedSize":84548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNISnCRA9TVsSAnZWagAAYvQP/2FON3XupcovUW9E/bvn\ntJM3D95SBdKdrp1BZ0f7u7W6W47vH39okG9ZMD8s5rb9s1pzS5/u2v2IUyCP\nhlrEfpp/fF5F8rI+Zo9ZS53lYxj9SA297BkAIhxdJ7Acp2w6+yCKkrln7Tmt\nLdjhHbvbMIxrdU+zVd2+2kWb3hn9F/2G3lEEMlTIB3X70fMYRFQFmyFJ3zuf\nkkMMtmZsFOticKrBKZ4hGQE8LG14M99fEqIXRnIGu1dhXz/XtGYu/dRbajPb\nWnu5HJBku6DQuspPUvO53nJITO5FRSCYzwCyH0wX5h+QynJDlqwuGRHTs1tm\nr0EIqHFiE9dXke80i6AWfI/1BpZsZrK+UY9imLpycBU3SPjyy3/XcFLKRlUC\nRNnD0w5BNFmeRraUUxJ9+3r9ryXWwXmZ/IvNAOI7tFh1VpHOa3oj4MAdIiSO\nFz8IROA3lF6nGfbgA59KlQqBBAbJ3Gu+NOhI6W0ddUWllEuYVLGHeh7JfZqp\nZxgbUJT//b3jA+DATiOQkRyhvxNo1/fGJn+6GYoamf8uYCS3lqMp5gky4x1m\nVcHIPTeA5qvyLxEfZs8VSJlshyNpG62xVmP+Hs4LCBFZP6DtOlNT/06mjbif\n0FMGSJLbxJ5vFr1r5GHk49DMF+ny7dYaTLUSDAFsYFr0MMmWc+J+ByP4h9In\nyFmL\r\n=jx2n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZ94d0Qwzz7SVpvIC0RzXA0SGL7L1aSa+EdT/qUTLwSQIgLwwCupPlGYg2RSFDZHMWfWaL4UWSQkU6MVRYYFy7E3o="}]},"maintainers":[{"email":"adam@assignar.com","name":"adamhannigan"},{"email":"eng.shared@assignar.com","name":"assignar-bot"},{"email":"brad.zacher@gmail.com","name":"bradzacher"},{"email":"chappo@assignar.com","name":"chappo"},{"email":"noelmartin@gmail.com","name":"dashmug"},{"email":"gongyuan1987@gmail.com","name":"emmag"},{"email":"marko@assignar.com","name":"mtomic"},{"email":"winston@sebesta.io","name":"stoepszli"},{"email":"simon@assignar.com","name":"thimey"},{"email":"vangelis@assignar.com","name":"vangelis_assignar"},{"email":"vini.df@gmail.com","name":"vinifala"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mysqldump_2.1.1_1530168487355_0.10547308088119856"},"_hasShrinkwrap":false,"deprecated":"This fork has been merged into the main package, install mysqldump instead"}},"time":{"created":"2018-03-12T00:19:42.537Z","2.0.0-rc14":"2018-03-12T00:19:42.650Z","modified":"2022-04-04T15:51:39.165Z","2.0.0":"2018-03-12T04:47:56.658Z","2.1.0":"2018-06-26T03:33:16.197Z","2.1.1":"2018-06-28T06:48:07.451Z"},"maintainers":[],"description":"Create a DUMP from MySQL","homepage":"https://github.com/assignar/mysqldump","keywords":["backup","mysql","mysql-dump","dump","restore","database","backup","database"],"repository":{"type":"git","url":"git+https://github.com/assignar/mysqldump.git"},"author":{"name":"Brad Zacher"},"bugs":{"url":"https://github.com/assignar/mysqldump/issues"},"license":"MIT","readme":"# Mysql Dump\n\n[![npm version](https://badge.fury.io/js/%40assignar%2Fmysqldump.svg)](https://badge.fury.io/js/%40assignar%2Fmysqldump) [![Build Status](https://travis-ci.org/assignar/mysqldump.svg?branch=v2)](https://travis-ci.org/assignar/mysqldump)\n\n[![NPM](https://nodeico.herokuapp.com/@assignar/mysqldump.svg)](https://npmjs.com/package/@assignar/mysqldump)\n\nCreate a backup of a MySQL database.\n\n## Installation\n\n```\nyarn add @assignar/mysqldump\n// or\nnpm install @assignar/mysqldump\n```\n\n## Usage\n```typescript\nimport mysqldump from '@assignar/mysqldump'\n// or const mysqldump = require('@assignar/mysqldump')\n\n// dump the result straight to a file\nmysqldump({\n    connection: {\n        host: 'localhost',\n        user: 'root',\n        password: '123456',\n        database: 'my_database',\n    },\n    dumpToFile: './dump.sql',\n})\n\n// return the dump from the function and not to a file\nconst result = await mysqldump({\n    connection: {\n        host: 'localhost',\n        user: 'root',\n        password: '123456',\n        database: 'my_database',\n    },\n})\n```\n\n\n## Options\nAll the below options are documented in the [typescript declaration file](./dist/mysqldump.d.ts):\n```TS\nexport interface ConnectionOptions {\n\t/**\n\t * The database host to connect to.\n\t * Defaults to 'localhost'.\n\t */\n\thost?: string;\n\t/**\n\t * The port on the host to connect to.\n\t * Defaults to 3306.\n\t */\n\tport?: number;\n\t/**\n\t * The database to dump.\n\t */\n\tdatabase: string;\n\t/**\n\t * The DB username to use to connect.\n\t */\n\tuser: string;\n\t/**\n\t * The password to use to connect.\n\t */\n\tpassword: string;\n\t/**\n\t * The charset to use for the connection.\n\t * Defaults to 'UTF8_GENERAL_CI'.\n\t */\n\tcharset?: string;\n}\nexport interface SchemaDumpOptions {\n\t/**\n\t * True to include autoincrement values in schema, false otherwise.\n\t * Defaults to true.\n\t */\n\tautoIncrement?: boolean;\n\t/**\n\t * True to include engine values in schema, false otherwise.\n\t * Defaults to true.\n\t */\n\tengine?: boolean;\n\t/**\n\t * True to run a sql formatter over the output, false otherwise.\n\t * Defaults to true.\n\t */\n\tformat?: boolean;\n\t/**\n\t * Options for table dumps\n\t */\n\ttable?: {\n\t\t/**\n\t\t * Guard create table calls with an \"IF NOT EXIST\"\n\t\t * Defaults to true.\n\t\t */\n\t\tifNotExist?: boolean;\n\t\t/**\n\t\t * Drop tables before creation (overrides `ifNotExist`).\n\t\t * Defaults to false.\n\t\t */\n\t\tdropIfExist?: boolean;\n\t\t/**\n\t\t * Include the `DEFAULT CHARSET = x` at the end of the table definition\n\t\t * Set to true to include the value form the DB.\n\t\t * Set to false to exclude it altogether.\n\t\t * Set to a string to explicitly set the charset.\n\t\t * Defaults to true.\n\t\t */\n\t\tcharset?: boolean | string;\n\t};\n\tview?: {\n\t\t/**\n\t\t * Uses `CREATE OR REPLACE` to define views.\n\t\t * Defaults to true.\n\t\t */\n\t\tcreateOrReplace?: boolean;\n\t\t/**\n\t\t * Include the `DEFINER = {\\`user\\`@\\`host\\` | CURRENT_USER}` in the view definition or not\n\t\t * Defaults to false.\n\t\t */\n\t\tdefiner?: boolean;\n\t\t/**\n\t\t * Include the `ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}` in the view definition or not\n\t\t * Defaults to false.\n\t\t */\n\t\talgorithm?: boolean;\n\t\t/**\n\t\t * Incldue the `SQL SECURITY {DEFINER | INVOKER}` in the view definition or not\n\t\t * Defaults to false.\n\t\t */\n\t\tsqlSecurity?: boolean;\n\t};\n}\nexport interface TriggerDumpOptions {\n\t/**\n\t * The temporary delimiter to use between statements.\n\t * Set to false to not use delmiters\n\t * Defaults to ';;'.\n\t */\n\tdelimiter?: string | false;\n\t/**\n\t * Drop triggers before creation.\n\t * Defaults to false.\n\t */\n\tdropIfExist?: boolean;\n\t/**\n\t * Include the `DEFINER = {\\`user\\`@\\`host\\` | CURRENT_USER}` in the view definition or not\n\t * Defaults to false.\n\t */\n\tdefiner?: boolean;\n}\nexport interface DataDumpOptions {\n\t/**\n\t * True to run a sql formatter over the output, false otherwise.\n\t * Defaults to true.\n\t */\n\tformat?: boolean;\n\t/**\n\t * Dump data from views.\n\t * Defaults to false.\n\t */\n\tincludeViewData?: boolean;\n\t/**\n\t * Maximum number of rows to include in each multi-line insert statement\n\t * Defaults to 1 (i.e. new statement per row).\n\t */\n\tmaxRowsPerInsertStatement?: number;\n\t/**\n\t * True to return the data in a function, false to not.\n\t * This is useful in databases with a lot of data.\n\t *\n\t * We stream data from the DB to reduce the memory footprint.\n\t * However note that if you want the result returned from the function,\n\t * this will result in a larger memory footprint as the string has to be stored in memory.\n\t *\n\t * Defaults to false if dumpToFile is truthy, or true if not dumpToFile is falsey.\n\t */\n\treturnFromFunction?: boolean;\n\t/**\n\t * A map of tables to additional where strings to add.\n\t * Use this to limit the number of data that is dumped.\n\t * Defaults to no limits\n\t */\n\twhere?: {\n\t\t[k: string]: string;\n\t};\n}\nexport interface DumpOptions {\n\t/**\n\t * The list of tables that you want to dump.\n\t * Defaults to all tables (signalled by passing an empty array).\n\t */\n\ttables?: string[];\n\t/**\n\t * True to use the `tables` options as a blacklist, false to use it as a whitelist.\n\t * Defaults to false.\n\t */\n\texcludeTables?: boolean;\n\t/**\n\t * Explicitly set to false to not include the schema in the dump.\n\t * Defaults to including the schema.\n\t */\n\tschema?: false | SchemaDumpOptions;\n\t/**\n\t * Explicitly set to false to not include data in the dump.\n\t * Defaults to including the data.\n\t */\n\tdata?: false | DataDumpOptions;\n\t/**\n\t * Explicitly set to false to not include triggers in the dump.\n\t * Defaults to including the triggers.\n\t */\n\ttrigger?: false | TriggerDumpOptions;\n}\nexport interface Options {\n\t/**\n\t * Database connection options\n\t */\n\tconnection: ConnectionOptions;\n\t/**\n\t * Dump configuration options\n\t */\n\tdump?: DumpOptions;\n\t/**\n\t * Set to a path to dump to a file.\n\t * Exclude to just return the string.\n\t */\n\tdumpToFile?: string;\n}\nexport interface ColumnList {\n\t/**\n\t * Key is the name of the column\n\t */\n\t[k: string]: {\n\t\t/**\n\t\t * The type of the column as reported by the underlying DB.\n\t\t */\n\t\ttype: string;\n\t\t/**\n\t\t * True if the column is nullable, false otherwise.\n\t\t */\n\t\tnullable: boolean;\n\t};\n}\nexport interface Table {\n\t/**\n\t * The name of the table.\n\t */\n\tname: string;\n\t/**\n\t * The raw SQL schema dump for the table.\n\t * Null if configured to not dump.\n\t */\n\tschema: string | null;\n\t/**\n\t * The raw SQL data dump for the table.\n\t * Null if configured to not dump.\n\t */\n\tdata: string | null;\n\t/**\n\t * The list of column definitions for the table.\n\t */\n\tcolumns: ColumnList;\n\t/**\n\t * An ordered list of columns (for consistently outputing as per the DB definition)\n\t */\n\tcolumnsOrdered: string[];\n\t/**\n\t * True if the table is actually a view, false otherwise.\n\t */\n\tisView: boolean;\n\t/**\n\t * A list of triggers attached to the table\n\t */\n\ttriggers: string[];\n}\nexport interface DumpReturn {\n\t/**\n\t * The result of the dump\n\t */\n\tdump: {\n\t\t/**\n\t\t * The concatenated SQL schema dump for the entire database.\n\t\t * Null if configured not to dump.\n\t\t */\n\t\tschema: string | null;\n\t\t/**\n\t\t * The concatenated SQL data dump for the entire database.\n\t\t * Null if configured not to dump.\n\t\t */\n\t\tdata: string | null;\n\t\t/**\n\t\t * The concatenated SQL trigger dump for the entire database.\n\t\t * Null if configured not to dump.\n\t\t */\n\t\ttrigger: string | null;\n\t};\n\ttables: Table[];\n}\nexport default function main(inputOptions: Options): Promise<DumpReturn>;\n\nexport as namespace mysqldump;\n```\n\n---------------------------------\n\nThe MIT [License](./LICENSE.md)\n\n## Contributing\n\n### Installation\n\nMake sure to first install all the required development dependencies:\n```\nyarn\n// or\nnpm install .\n```\n\n### Linting\n\nWe use [eslint](https://www.npmjs.com/package/eslint) in conjunction with [typescript-eslint-parser](https://www.npmjs.com/package/typescript-eslint-parser) for code linting.\n\nPRs are required to pass the linting with no errors and preferrably no warnings.\n\n### Testing\n\nTests can be run via the `test` script - `yarn test` / `npm test`.\n\nAdditionally it's required that you do a build and run your test against the public package to ensure the build doesn't cause regressions - `yarn run test-prod` / `npm run test-prod`.\n\nPRs are required to maintain the 100% test coverage, and all tests must pass successfully.\n","readmeFilename":"README.md"}