2021-09-06 08:25:23 +00:00
|
|
|
#!/usr/bin/env node
|
2022-11-08 16:33:36 +00:00
|
|
|
/* eslint-disable no-console */
|
2021-09-06 08:25:23 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const currentVersion = process.versions.node;
|
|
|
|
const requiredMajorVersion = parseInt(currentVersion.split('.')[0], 10);
|
2022-06-27 21:15:51 +00:00
|
|
|
const minimumMajorVersion = 14;
|
2021-09-06 08:25:23 +00:00
|
|
|
|
|
|
|
if (requiredMajorVersion < minimumMajorVersion) {
|
2021-12-22 21:11:05 +00:00
|
|
|
console.error(`Node.js v${currentVersion} is out of date and unsupported!`);
|
|
|
|
console.error(`Please use Node.js v${minimumMajorVersion} or higher.`);
|
|
|
|
process.exit(1);
|
2021-09-06 08:25:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
import('./dist/index.js').then(({ main }) => main());
|