2020-10-30 20:34:04 +00:00
|
|
|
// Copyright 2018-2020 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2018-09-20 22:24:52 +00:00
|
|
|
import { join } from 'path';
|
|
|
|
import { writeFileSync } from 'fs';
|
|
|
|
|
2021-10-26 19:15:33 +00:00
|
|
|
import type { ExceptionType } from './types';
|
2018-09-20 22:24:52 +00:00
|
|
|
import { loadJSON, sortExceptions } from './util';
|
|
|
|
|
|
|
|
const exceptionsPath = join(__dirname, 'exceptions.json');
|
|
|
|
const exceptions: Array<ExceptionType> = loadJSON(exceptionsPath);
|
|
|
|
|
|
|
|
const sorted = sortExceptions(exceptions);
|
|
|
|
|
|
|
|
writeFileSync(exceptionsPath, JSON.stringify(sorted, null, ' '));
|