UNPKG

@dataunlocker/defender

Version:

DataUnlocker core module that protects your web app's analytics.

18 lines (17 loc) 540 B
#!/usr/bin/env node import { readFile } from 'fs/promises'; import { dirname, resolve } from 'path'; import { fileURLToPath } from 'url'; import { info } from './utils/index.js'; (async () => { const packageJsonPath = resolve(dirname(fileURLToPath(import.meta.url)), '../package.json'); const file = await readFile(packageJsonPath); info(`Defender v${JSON.parse(file.toString()).version}`); try { await import('./postinstall.js'); } catch (e) { console.error(e); process.exit(1); } })();