2017-02-20 18:32:27 +00:00
|
|
|
let v1Counter = 0;
|
2021-05-12 06:35:00 +00:00
|
|
|
|
2017-02-20 18:32:27 +00:00
|
|
|
let v4Counter = 0;
|
2016-11-10 17:33:28 +00:00
|
|
|
|
2017-02-20 18:32:27 +00:00
|
|
|
const v1UUIDs = [
|
|
|
|
'f7272c80-f493-11e6-bc64-92361f002671',
|
|
|
|
'f7272f0a-f493-11e6-bc64-92361f002671',
|
|
|
|
'f72733a6-f493-11e6-bc64-92361f002671',
|
|
|
|
'f72735c2-f493-11e6-bc64-92361f002671',
|
|
|
|
'f7273798-f493-11e6-bc64-92361f002671',
|
|
|
|
'f7273c3e-f493-11e6-bc64-92361f002671',
|
|
|
|
'f7273dba-f493-11e6-bc64-92361f002671',
|
|
|
|
'f7273eaa-f493-11e6-bc64-92361f002671',
|
|
|
|
'f7273f7c-f493-11e6-bc64-92361f002671',
|
2018-12-12 17:36:11 +00:00
|
|
|
'f7274300-f493-11e6-bc64-92361f002671',
|
2017-02-20 18:32:27 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
const v4UUIDs = [
|
2017-07-20 01:55:40 +00:00
|
|
|
'cc1dd2ca-4275-747a-a881-99e8efd42403',
|
2016-11-10 17:33:28 +00:00
|
|
|
'dd2ccc1a-2745-477a-881a-9e8ef9d42403',
|
|
|
|
'e3e96e5f-dd68-4229-8b66-dee1f0940f3d',
|
|
|
|
'a262d22b-5fa8-491c-9bd9-58fba03e301e',
|
|
|
|
'2e7c2688-09ee-44b8-900d-5cbbaa7d3a19',
|
|
|
|
'e7d698c4-c7d2-409c-90c6-22bcc94ba4ab',
|
|
|
|
'fcef5ff8-4f78-4f16-bad4-9bdddc1c3daf',
|
|
|
|
'7cc5b3e1-3333-4419-b370-6fcaa05c15ab',
|
|
|
|
'd911be1d-69f6-4cb1-8312-2c3b7f0c647c',
|
|
|
|
'ac47b0b9-aded-4968-b569-239598b7d7d1',
|
|
|
|
'4093d252-02b6-464f-a723-494a35a7b862',
|
|
|
|
'6d233089-e303-450b-9f1a-f6f6e6869e27',
|
|
|
|
'874d55b5-2526-4476-8964-85f7cd685705',
|
|
|
|
'e2a5848c-f908-4a0e-8b0a-727edbcafe89',
|
|
|
|
'67884e55-155e-43fc-a7ad-97d23e853241',
|
|
|
|
'130929e6-4953-45a5-9a25-b3df6fa8dca8',
|
|
|
|
'd854aa77-5389-4690-be5e-52fd3c5c0551',
|
|
|
|
'a5218a75-61c1-4f86-8f09-09c5c1831e7b',
|
|
|
|
'5fd86b39-825e-4b12-a163-6dd5592b8172',
|
|
|
|
'8c4b90c5-1cf7-4c28-a60b-ec156be97a7f',
|
|
|
|
'3f913e38-c08e-4839-95f6-32788141951f',
|
|
|
|
'884b5a86-5e6d-49ef-8bea-b5dcb7564cdc',
|
|
|
|
'2fea36e5-4e92-4da6-8088-2821f580cf20',
|
|
|
|
'1e310193-7209-430d-9ed2-f8d73ec932b5',
|
2017-01-09 21:59:52 +00:00
|
|
|
'9996a7f7-ff6a-414e-9a75-2adadbde88a9',
|
|
|
|
'562f0a86-0d2a-4137-b9c7-ff92b70939b4',
|
|
|
|
'c62e98f8-def0-4560-bcb6-59ac1d64ac61',
|
|
|
|
'548b6bbb-b224-408f-9f38-215b0c40bd71',
|
|
|
|
'e2ee0259-98ca-4c0e-a7c4-3b29beae901c',
|
|
|
|
'782c08cd-e725-4089-8023-ffce72d1c853',
|
|
|
|
'9b176a7f-1e50-4ebd-8758-2d4c3197fb24',
|
|
|
|
'e29ffcfc-d277-4302-92bf-d279e4b8d03f',
|
|
|
|
'f6b81add-3e80-49dc-86ef-f2f43ad13f9d',
|
|
|
|
'a5a9bb1e-67f4-4cfe-a3cd-cdf802378eb9',
|
|
|
|
'95b2f335-87f7-4257-b069-197242408660',
|
|
|
|
'9b5ad4fc-0b14-4d13-8d01-7e6fde1b48b7',
|
|
|
|
'a37d9af3-1f60-47c0-a114-4ae345d3005c',
|
|
|
|
'e5540caa-f250-42f7-b5a5-c4d60963569f',
|
|
|
|
'7ea6be14-582f-4105-9905-a30f2be72ad8',
|
|
|
|
'9fc10ee2-6135-454d-9aa8-b2a82b766c03',
|
|
|
|
'40492eb7-a9c1-4d67-b49b-c7c6be8d9ccd',
|
|
|
|
'c939099b-6b8c-4acd-9738-883c409b713c',
|
|
|
|
'ed9adb1e-e27f-484c-9d32-3f351759c757',
|
|
|
|
'73781cfd-6d55-47b2-8735-8e90ee8d8320',
|
|
|
|
'd983abdb-ab5a-44f8-888a-2d98c123db54',
|
|
|
|
'8acca410-43ec-4d75-b553-97ea0de8735f',
|
|
|
|
'8a5a2550-1289-4bef-903c-9ce3c9c9d5c5',
|
|
|
|
'041462ba-dbfc-4381-b34b-1d03c043f10e',
|
|
|
|
'f7dd76f2-efd8-439b-a2d3-89f09570bea8',
|
|
|
|
'9e4ccefd-5968-4dc2-83e3-b9a8e1815a1b',
|
|
|
|
'9654696e-747c-4116-b197-94e31d2daaff',
|
|
|
|
'eba603bc-a93c-4fa6-86d0-01a6dfccb3bd',
|
|
|
|
'9d1b76df-8a02-4d86-ae0c-0423cf41e097',
|
|
|
|
'38511ada-296b-4353-8fca-131b67283016',
|
|
|
|
'f1a6d808-8b2b-4502-b42a-5ca4fcfa5b51',
|
|
|
|
'a6d670f1-bbbd-45fa-8834-ffccb4292ee1',
|
|
|
|
'c8a35834-c4a3-4950-915b-8ec0af8a957a',
|
|
|
|
'23fcf651-d24e-4a5d-8631-f5f7d54143c5',
|
|
|
|
'5d0dc5e0-a827-4b1a-b787-4050ab15deba',
|
|
|
|
'32a1b905-15c5-48b3-b9a3-59c9f4f14b27',
|
|
|
|
'97a340b2-91e3-4c9e-9040-e751291e533e',
|
|
|
|
'c352d95b-c77a-4192-9e52-2b43e5d45c75',
|
|
|
|
'65c46c7b-d7f9-4367-84af-51018a68beec',
|
|
|
|
'304a7d57-9d08-4b8f-983f-14d69c49f8fe',
|
|
|
|
'817124d8-e40b-400e-8165-ee6cb4459ffe',
|
|
|
|
'033caad7-5765-426a-ac55-7d95f63550b6',
|
|
|
|
'395177a1-b026-49c1-abf0-e95bcde88c3b',
|
|
|
|
'af8642aa-ff28-4aca-b32e-02e6772d0399',
|
|
|
|
'719fd155-a11b-415f-a042-6293c143793f',
|
|
|
|
'46409dfc-a668-4922-8a6b-245588a363c6',
|
|
|
|
'ff89d2bc-6781-4a09-a2fa-4c9fc9d8f539',
|
|
|
|
'6d6e6070-c192-46dc-ae1a-4b819828fbae',
|
|
|
|
'650345e6-73c5-49f1-92cc-b16f70dfabf0',
|
|
|
|
'8d85d153-da68-4123-a3f8-03753be9c7e8',
|
2017-08-23 03:42:44 +00:00
|
|
|
'185dc090-3fcc-44e3-8a17-4e2fa792f91a',
|
|
|
|
'f8e9aae9-1e6f-45c3-923a-74af73f4091e',
|
|
|
|
'73415a9e-2f83-48c6-814a-7aed39e54247',
|
|
|
|
'f2e38b71-2a4a-41e2-bc90-162b0e2cc64f',
|
|
|
|
'f8db47d9-cfac-4fd9-8ed0-f510ff0005d0',
|
|
|
|
'aabeb013-7093-4d32-ba97-e4e281a7dffd',
|
|
|
|
'57b034dd-7ac9-4e40-a5ff-9833c1d516fc',
|
|
|
|
'93375f26-ada3-4490-af12-91f6858b64fc',
|
|
|
|
'4e819358-b61e-42fa-aa05-286de238f2f6',
|
|
|
|
'b61fe05c-a8c3-439e-8c78-7ee52e223e8a',
|
|
|
|
'e558ea51-6f7f-4b0e-99d3-46df7ae61a84',
|
|
|
|
'acd531c1-9f6c-44ff-ba1b-95f71a37e06b',
|
|
|
|
'0b3c8769-6048-4dfd-9372-c96da8d10193',
|
|
|
|
'2fe19a46-e764-4529-9ac4-e37c6b396e1e',
|
|
|
|
'819a28c7-f967-45b8-b94f-59726d425270',
|
|
|
|
'f0135da4-9d86-4eb8-8292-0405fa8cd2c4',
|
|
|
|
'd72ac779-4874-48ec-af86-b409a0f8ef31',
|
|
|
|
'108077e9-7b41-4169-aeed-34b145202efe',
|
|
|
|
'7aa43e17-9a14-48dc-8c96-c4281abbb332',
|
|
|
|
'1a509a8f-c213-484a-a85b-389ccb1be529',
|
|
|
|
'5798513c-be4c-4deb-be4c-9cafa30f4ff8',
|
|
|
|
'fac20481-0235-4af5-b2ae-fed135a5e1e2',
|
|
|
|
'86ef9755-a5bb-4068-9273-a5ca4cef6912',
|
|
|
|
'850bbe11-da72-407c-ac75-37ba7b9597e3',
|
|
|
|
'433d68f7-c02f-49b1-9faa-6f40520b9dfe',
|
|
|
|
'd14e8023-1bab-49be-b9fe-8b8987f7b489',
|
|
|
|
'f78feb38-4aa3-4801-b56d-0e43a9361bfc',
|
|
|
|
'd4a187c0-a41a-4ed6-8206-1982c85131d3',
|
|
|
|
'0baf29de-0f22-47c3-8640-031411ac3acc',
|
|
|
|
'7881ddc2-c254-4f42-8d8a-3ba546a725b2',
|
|
|
|
'f52cb36f-36d2-4b7c-860a-8e8b2b8b1b2d',
|
|
|
|
'618f9080-765e-44e4-8688-551e57335834',
|
|
|
|
'a92a4561-55e7-4cae-b0ad-cfd88c3b8549',
|
|
|
|
'5d7b9373-8fbf-427c-988b-ab70216eb1a3',
|
|
|
|
'f2b2eb42-98fc-4d0c-b76c-82453e7a7ad4',
|
|
|
|
'ae9ee599-0361-4a6c-9e28-33769683b91d',
|
|
|
|
'eaeb7546-83f4-4364-8775-c5f8c925d152',
|
|
|
|
'60546de5-bce0-4f1f-9572-3d5a24488126',
|
|
|
|
'496b2a9b-8082-4a31-829b-9ddaea1b8d72',
|
|
|
|
'e86f7fd3-5e55-476e-9d54-88999db045f1',
|
|
|
|
'b4df19ab-cee5-400f-a9e1-3d9a1ca60ab4',
|
|
|
|
'286c5332-3abe-49b4-a94a-b3f74c99a1aa',
|
|
|
|
'81115d6d-643c-466a-b602-6b6a9e2af463',
|
|
|
|
'b9c0d5cd-7b23-4a0f-910f-2d74cdccc46b',
|
|
|
|
'088c5dc0-5d4c-4a90-840a-f1109013625d',
|
|
|
|
'46cf7b21-b0f2-483a-a816-d88699f15724',
|
|
|
|
'ac7c54c5-4f41-4878-957f-8f5680302ee5',
|
|
|
|
'de61c088-b9e3-4975-a3bd-61401d0f34ea',
|
|
|
|
'c898f4c8-3611-447f-a59d-c6dc57b20c6f',
|
|
|
|
'054f8331-8e90-402f-b321-cd9817c9b872',
|
|
|
|
'd1f97e08-e66d-4738-a549-7e5ce5684b89',
|
|
|
|
'c43a794a-26c4-4de9-96bd-6570ae8901f2',
|
|
|
|
'8d979e7a-5bb8-4daa-92c0-530c575592e8',
|
|
|
|
'5ec098a9-b638-4f91-a69c-4c877801df45',
|
|
|
|
'a4bdd1cf-9b8c-4914-a728-57a1f5245b2a',
|
|
|
|
'dfd687ff-6bdf-4ae2-a364-8f1a8abd29d4',
|
|
|
|
'b6324133-b493-45f4-8598-c8c70b0df90e',
|
|
|
|
'057b64e9-3457-48d7-8368-d58760b6fc92',
|
|
|
|
'1351c083-0b5a-4fe6-87d3-801239ac42a6',
|
|
|
|
'c0292658-18b4-4273-aae3-5af6b523fc65',
|
|
|
|
'3616f400-4431-423d-b905-1a70904be63d',
|
|
|
|
'ae735815-4a74-4af4-bc82-045f43f3d1ca',
|
|
|
|
'1fd9e4bb-f592-4e5d-829e-2910222ec8c9',
|
|
|
|
'30f4e69c-40d3-4402-8075-c85a3a801a6a',
|
|
|
|
'9f3ddbf3-168a-483a-bd9d-1ffade99e816',
|
|
|
|
'c777722e-5e72-41bb-a7a5-bbbdfe67e630',
|
|
|
|
'72a7b8c8-c342-4dd2-b413-1a09f24e70a8',
|
|
|
|
'd09c92df-e933-4016-af2f-89a99ce314ac',
|
|
|
|
'22789e02-6e3e-490b-9c41-5e8a9d161ebc',
|
|
|
|
'8374dcad-f51d-4c3c-b6ec-04b32644379b',
|
|
|
|
'a34c9403-ee6f-4251-a8d3-838df56c33c5',
|
|
|
|
'1b5165df-40c0-4832-8f9e-b5bc2df40c37',
|
|
|
|
'2594664b-0eb9-43a1-859f-2726f763b76d',
|
|
|
|
'86b94bd5-920e-468b-81c8-90bf502b39bb',
|
|
|
|
'b394e352-e825-4dd1-b8e4-f03db6f5178d',
|
|
|
|
'7d7b18f0-279f-4fc6-8fdc-3636d1bb76c8',
|
|
|
|
'7fe9cc76-513b-4272-b54c-bfd91710b92a',
|
|
|
|
'0b3cd1d8-994b-4e17-9a0d-2d01462b7bac',
|
|
|
|
'131123b5-6290-45cb-b0dc-f96d82031f2c',
|
|
|
|
'20c61fcd-17a4-409e-b53c-d19053b7657c',
|
|
|
|
'fe57563b-2817-45a0-a5a6-d6d852824341',
|
|
|
|
'724cce37-0290-4bb4-a385-e97af88ff308',
|
|
|
|
'9ed98b9a-4d51-49d2-bdd9-ff983a664bd8',
|
|
|
|
'321ad5af-fa69-46ca-a1e6-38c43df6c4d1',
|
|
|
|
'a7eced90-a8ce-4891-bb4d-6931d2e63c42',
|
|
|
|
'002f4512-6ab4-4a67-afde-120263f719bf',
|
|
|
|
'3d888a45-c790-443a-b299-79bdbf180ea9',
|
|
|
|
'166028e4-4cfd-4749-a898-c452cb4e5e3c',
|
|
|
|
'596dc54c-34cd-4474-85ca-50c7b2bb4dec',
|
|
|
|
'837b2e19-2258-47b6-9dd5-44f1729b916b',
|
|
|
|
'5f5407de-f1bf-4fcc-a8c4-cd48920c5aef',
|
|
|
|
'b6f634ea-ffcd-4de1-9669-0031dc689d61',
|
|
|
|
'4d7494dd-90b6-45e7-8412-2dd554e20ce7',
|
|
|
|
'aabf6703-5cb1-4f6c-bda2-bbf9f2137628',
|
|
|
|
'7d6664fc-cb45-49be-95c9-4642d9fd8e1b',
|
|
|
|
'3b47c3fb-a0f4-4dbc-8f99-19ed905cadf3',
|
|
|
|
'2d31a2db-7791-4270-94c6-1653a3775c1a',
|
|
|
|
'90160273-9bef-442b-aa36-393bdb3fcf38',
|
|
|
|
'4d02d9bc-d81b-41da-b1e0-2d1ffde96103',
|
|
|
|
'f8be054e-651d-4542-a3e4-681a4a2ec9d0',
|
2018-12-12 17:36:11 +00:00
|
|
|
'966e9995-938a-4a5e-813c-de3691dddb3a',
|
2016-11-10 17:33:28 +00:00
|
|
|
];
|
|
|
|
|
2018-06-25 17:42:50 +00:00
|
|
|
function v1() {
|
2017-02-20 18:32:27 +00:00
|
|
|
const uuid = v1UUIDs[v1Counter++];
|
|
|
|
if (!uuid) {
|
|
|
|
throw new Error('Not enough mocked v1 UUIDs to go around');
|
|
|
|
}
|
|
|
|
|
|
|
|
return uuid;
|
|
|
|
}
|
|
|
|
|
2018-06-25 17:42:50 +00:00
|
|
|
function v4() {
|
2017-02-20 18:32:27 +00:00
|
|
|
const uuid = v4UUIDs[v4Counter++];
|
2016-11-10 17:33:28 +00:00
|
|
|
if (!uuid) {
|
2017-02-20 18:32:27 +00:00
|
|
|
throw new Error('Not enough mocked v4 UUIDs to go around');
|
2016-11-10 17:33:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return uuid;
|
|
|
|
}
|
|
|
|
|
2021-05-12 06:35:00 +00:00
|
|
|
// WARNING: changing this to `export default` will break the mock and be incredibly hard to debug. Ask me how I know.
|
2016-11-10 17:33:28 +00:00
|
|
|
module.exports = () => v4();
|
|
|
|
module.exports.v4 = () => v4();
|
2017-02-20 18:32:27 +00:00
|
|
|
module.exports.v1 = () => v1();
|