Upgrade/remove outdated dependencies
This commit is contained in:
parent
0bc6368c64
commit
b347a628b3
21 changed files with 3511 additions and 8360 deletions
|
@ -5,31 +5,31 @@
|
|||
/* eslint-disable more/no-then */
|
||||
/* eslint-disable no-console */
|
||||
|
||||
import { join } from 'path';
|
||||
import split2 from 'split2';
|
||||
import {
|
||||
mkdirSync,
|
||||
readdirSync,
|
||||
createReadStream,
|
||||
unlinkSync,
|
||||
writeFileSync,
|
||||
} from 'fs';
|
||||
import { CircularBuffer } from 'cirbuf';
|
||||
import type { BrowserWindow } from 'electron';
|
||||
import { app, ipcMain as ipc } from 'electron';
|
||||
import pino from 'pino';
|
||||
import type { StreamEntry } from 'pino';
|
||||
import { filter, flatten, map, pick, sortBy } from 'lodash';
|
||||
import readFirstLine from 'firstline';
|
||||
import { filter, flatten, map, pick, sortBy } from 'lodash';
|
||||
import {
|
||||
createReadStream,
|
||||
mkdirSync,
|
||||
readdirSync,
|
||||
unlinkSync,
|
||||
writeFileSync,
|
||||
} from 'node:fs';
|
||||
import { rm } from 'node:fs/promises';
|
||||
import { join } from 'path';
|
||||
import type { StreamEntry } from 'pino';
|
||||
import pino from 'pino';
|
||||
import { read as readLastLines } from 'read-last-lines';
|
||||
import rimraf from 'rimraf';
|
||||
import { CircularBuffer } from 'cirbuf';
|
||||
import split2 from 'split2';
|
||||
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
import * as Errors from '../types/errors';
|
||||
import { createRotatingPinoDest } from '../util/rotatingPinoDest';
|
||||
|
||||
import * as log from './log';
|
||||
import { Environment, getEnvironment } from '../environment';
|
||||
import * as log from './log';
|
||||
|
||||
import type { FetchLogIpcData, LogEntryType } from './shared';
|
||||
import { LogLevel, cleanArgs, getLogLevelString, isLogEntry } from './shared';
|
||||
|
@ -161,21 +161,7 @@ export async function initialize(
|
|||
}
|
||||
|
||||
async function deleteAllLogs(logPath: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
rimraf(
|
||||
logPath,
|
||||
{
|
||||
disableGlob: true,
|
||||
},
|
||||
error => {
|
||||
if (error) {
|
||||
return reject(error);
|
||||
}
|
||||
|
||||
return resolve();
|
||||
}
|
||||
);
|
||||
});
|
||||
await rm(logPath, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
async function cleanupLogs(logPath: string) {
|
||||
|
|
336
ts/scripts/check-upgradeable-deps.ts
Normal file
336
ts/scripts/check-upgradeable-deps.ts
Normal file
|
@ -0,0 +1,336 @@
|
|||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
/* eslint-disable no-await-in-loop */
|
||||
|
||||
import { join } from 'path';
|
||||
import { readFile } from 'fs/promises';
|
||||
import chalk from 'chalk';
|
||||
import semver from 'semver';
|
||||
import got from 'got';
|
||||
import enquirer from 'enquirer';
|
||||
import execa from 'execa';
|
||||
|
||||
const rootDir = join(__dirname, '..', '..');
|
||||
|
||||
function assert(condition: unknown, message: string): asserts condition {
|
||||
if (!condition) {
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
async function readJsonFile(path: string): Promise<any> {
|
||||
return JSON.parse(await readFile(path, 'utf-8'));
|
||||
}
|
||||
|
||||
function parseNumberField(value: string | number | null | void): number | null {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
if (typeof value === 'number') {
|
||||
return value;
|
||||
}
|
||||
const trimmed = value.trim();
|
||||
if (trimmed === '') {
|
||||
return null;
|
||||
}
|
||||
const parsed = Number(value);
|
||||
if (!Number.isFinite(parsed)) {
|
||||
return null;
|
||||
}
|
||||
return parsed;
|
||||
}
|
||||
|
||||
const npm = got.extend({
|
||||
prefixUrl: 'https://registry.npmjs.org/',
|
||||
responseType: 'json',
|
||||
retry: {
|
||||
calculateDelay: retry => {
|
||||
if (
|
||||
retry.error instanceof got.HTTPError &&
|
||||
retry.error.response.statusCode === 429
|
||||
) {
|
||||
const retryAfter = parseNumberField(
|
||||
retry.error.response.headers['retry-after']
|
||||
);
|
||||
if (retryAfter != null) {
|
||||
console.log(
|
||||
chalk.gray(`Rate limited, retrying after ${retryAfter} seconds`)
|
||||
);
|
||||
return retryAfter * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
return retry.computedValue;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const DependencyTypes = [
|
||||
'dependencies',
|
||||
'devDependencies',
|
||||
'optionalDependencies',
|
||||
'peerDependencies',
|
||||
] as const;
|
||||
|
||||
type LocalDependency = Readonly<{
|
||||
name: string;
|
||||
depType: (typeof DependencyTypes)[number];
|
||||
requestedVersion: string;
|
||||
resolvedVersion: string;
|
||||
}>;
|
||||
|
||||
type FetchedDependency = LocalDependency &
|
||||
Readonly<{
|
||||
latestVersion: string;
|
||||
moduleType: 'commonjs' | 'esm';
|
||||
diff: semver.ReleaseType | null;
|
||||
}>;
|
||||
|
||||
async function main() {
|
||||
const packageJson = await readJsonFile(join(rootDir, 'package.json'));
|
||||
const packageLock = await readJsonFile(join(rootDir, 'package-lock.json'));
|
||||
|
||||
const localDeps: ReadonlyArray<LocalDependency> = DependencyTypes.flatMap(
|
||||
depType => {
|
||||
return Object.keys(packageJson[depType] ?? {}).map(name => {
|
||||
const requestedVersion = packageJson[depType][name];
|
||||
const resolvedVersion =
|
||||
packageLock.packages[`node_modules/${name}`]?.version;
|
||||
assert(resolvedVersion, `Could not find resolved version for ${name}`);
|
||||
|
||||
return { name, depType, requestedVersion, resolvedVersion };
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
console.log(chalk`Found {cyan ${localDeps.length}} local dependencies`);
|
||||
|
||||
const fetchedDeps: ReadonlyArray<FetchedDependency> = await Promise.all(
|
||||
localDeps.map(async dep => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const info: any = await npm(`${dep.name}/latest`).json();
|
||||
const latestVersion = info.version;
|
||||
const moduleType = info.type ?? 'commonjs';
|
||||
assert(
|
||||
moduleType === 'commonjs' || moduleType === 'module',
|
||||
`Unexpected module type for ${dep.name}: ${moduleType}`
|
||||
);
|
||||
const diff = semver.lt(dep.resolvedVersion, latestVersion)
|
||||
? semver.diff(dep.resolvedVersion, latestVersion)
|
||||
: null;
|
||||
return { ...dep, latestVersion, moduleType, diff };
|
||||
})
|
||||
);
|
||||
|
||||
const outdatedDeps = fetchedDeps.filter(dep => dep.diff != null);
|
||||
console.log(chalk`Found {cyan ${outdatedDeps.length}} outdated dependencies`);
|
||||
|
||||
const upgradeableDeps = outdatedDeps.filter(dep => {
|
||||
return dep.moduleType === 'commonjs';
|
||||
});
|
||||
|
||||
console.log(
|
||||
chalk`Found {cyan ${upgradeableDeps.length}} upgradeable dependencies`
|
||||
);
|
||||
|
||||
const upgradeableDepsByDiff = new Map<string, Set<string>>();
|
||||
|
||||
for (const dep of upgradeableDeps) {
|
||||
assert(dep.diff != null, 'Expected diff to be non-null');
|
||||
|
||||
let group = upgradeableDepsByDiff.get(dep.diff);
|
||||
if (group == null) {
|
||||
group = new Set();
|
||||
upgradeableDepsByDiff.set(dep.diff, group);
|
||||
}
|
||||
|
||||
group.add(dep.name);
|
||||
}
|
||||
|
||||
for (const [diff, deps] of upgradeableDepsByDiff) {
|
||||
console.log(chalk` - ${diff}: {cyan ${deps.size}}`);
|
||||
}
|
||||
|
||||
let longestNameLength = 0;
|
||||
for (const dep of upgradeableDeps) {
|
||||
longestNameLength = Math.max(longestNameLength, dep.name.length);
|
||||
}
|
||||
|
||||
const { approvedDeps } = await enquirer.prompt<{
|
||||
approvedDeps: ReadonlyArray<string>;
|
||||
}>({
|
||||
type: 'multiselect',
|
||||
name: 'approvedDeps',
|
||||
message: 'Select which dependencies to upgrade',
|
||||
choices: upgradeableDeps.map(deps => {
|
||||
let color = chalk.red;
|
||||
if (deps.diff === 'patch') {
|
||||
color = chalk.green;
|
||||
} else if (deps.diff === 'minor') {
|
||||
color = chalk.yellow;
|
||||
}
|
||||
|
||||
return {
|
||||
name: deps.name,
|
||||
message: `${deps.name.padEnd(longestNameLength)}`,
|
||||
hint: `(${color(deps.diff)}: ${deps.resolvedVersion} -> ${color(deps.latestVersion)})`,
|
||||
};
|
||||
}),
|
||||
});
|
||||
|
||||
console.log(
|
||||
chalk`Starting upgrade of {cyan ${approvedDeps.length}} dependencies`
|
||||
);
|
||||
|
||||
// eslint-disable no-await-in-loop
|
||||
for (const dep of upgradeableDeps) {
|
||||
try {
|
||||
if (!approvedDeps.includes(dep.name)) {
|
||||
console.log(chalk`Skipping ${dep.name}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const gitStatusBefore = await execa('git', ['status', '--porcelain']);
|
||||
if (gitStatusBefore.stdout.trim() !== '') {
|
||||
console.error(chalk`{red Found uncommitted changes, exiting}`);
|
||||
console.error(chalk.red(gitStatusBefore.stdout));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(
|
||||
chalk`Upgrading {cyan ${dep.name}} from {yellow ${dep.resolvedVersion}} to {magenta ${dep.latestVersion}}`
|
||||
);
|
||||
await execa(
|
||||
'npm',
|
||||
['install', '--save-exact', `${dep.name}@${dep.latestVersion}`],
|
||||
{ stdio: 'inherit' }
|
||||
);
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
try {
|
||||
await execa(
|
||||
'npx',
|
||||
['patch-package', '--error-on-fail', '--error-on-warn'],
|
||||
{ stdio: 'inherit' }
|
||||
);
|
||||
break;
|
||||
} catch {
|
||||
const { retry } = await enquirer.prompt<{ retry: boolean }>({
|
||||
type: 'confirm',
|
||||
name: 'retry',
|
||||
message: 'Retry patch-package?',
|
||||
initial: true,
|
||||
});
|
||||
|
||||
if (!retry) {
|
||||
throw new Error('Failed to apply patch-package');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const { npmScriptsToRun } = await enquirer.prompt<{
|
||||
npmScriptsToRun: Array<string>;
|
||||
}>({
|
||||
type: 'multiselect',
|
||||
name: 'npmScriptsToRun',
|
||||
message: 'Select which scripts to run',
|
||||
choices: [
|
||||
// Fast and common
|
||||
{ name: 'eslint' },
|
||||
{ name: 'test-node' },
|
||||
{ name: 'test-electron' },
|
||||
// Long
|
||||
{ name: 'test-mock' },
|
||||
// Uncommon
|
||||
{ name: 'test-eslint' },
|
||||
{ name: 'test-lint-intl' },
|
||||
],
|
||||
});
|
||||
|
||||
const allNpmScriptToRun = [
|
||||
// Mandatory
|
||||
'generate',
|
||||
'check:types',
|
||||
'lint-deps',
|
||||
// Optional
|
||||
...npmScriptsToRun,
|
||||
];
|
||||
|
||||
for (const script of allNpmScriptToRun) {
|
||||
console.log(chalk`Running {cyan npm run ${script}}`);
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
try {
|
||||
await execa('npm', ['run', script], { stdio: 'inherit' });
|
||||
break;
|
||||
} catch (error) {
|
||||
console.log(
|
||||
chalk.red(
|
||||
`Failed to run ${script}, you could go make changes and try again`
|
||||
)
|
||||
);
|
||||
|
||||
const { retry } = await enquirer.prompt<{
|
||||
retry: boolean;
|
||||
}>({
|
||||
type: 'confirm',
|
||||
name: 'retry',
|
||||
message: 'Retry running script?',
|
||||
initial: true,
|
||||
});
|
||||
|
||||
if (!retry) {
|
||||
throw error;
|
||||
} else {
|
||||
console.log(chalk`Retrying {cyan npm run ${script}}`);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Changes after upgrade:');
|
||||
await execa('git', ['status', '--porcelain'], { stdio: 'inherit' });
|
||||
|
||||
const { commitChanges } = await enquirer.prompt<{
|
||||
commitChanges: boolean;
|
||||
}>({
|
||||
type: 'select',
|
||||
name: 'commitChanges',
|
||||
message: 'Commit these changes?',
|
||||
choices: [
|
||||
{ name: 'commit', message: 'Commit and continue', value: true },
|
||||
{ name: 'revert', message: 'Revert and skip', value: false },
|
||||
],
|
||||
});
|
||||
|
||||
if (!commitChanges) {
|
||||
console.log('Reverting changes, and skipping');
|
||||
await execa('git', ['checkout', '.']);
|
||||
continue;
|
||||
}
|
||||
|
||||
console.log('Committing changes');
|
||||
await execa('git', ['add', '.']);
|
||||
await execa('git', [
|
||||
'commit',
|
||||
'-m',
|
||||
`Upgrade ${dep.name} ${dep.depType} from ${dep.requestedVersion} to ${dep.latestVersion}`,
|
||||
]);
|
||||
} catch (error) {
|
||||
console.error(chalk.red(error));
|
||||
console.log(
|
||||
chalk.red(`Failed to upgrade ${dep.name}, reverting and skipping`)
|
||||
);
|
||||
await execa('git', ['checkout', '.']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(error => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
|
@ -1,11 +1,20 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import fs from 'fs/promises';
|
||||
import { pathExists } from 'fs-extra';
|
||||
import path from 'path';
|
||||
import rimraf from 'rimraf';
|
||||
import type { AfterPackContext } from 'electron-builder';
|
||||
import fs, { readdir, rm } from 'node:fs/promises';
|
||||
import path from 'path';
|
||||
|
||||
async function safeReaddir(dir: string): Promise<Array<string> | null> {
|
||||
try {
|
||||
return await readdir(dir);
|
||||
} catch (error) {
|
||||
if (error.code === 'ENOENT') {
|
||||
return null;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function afterPack({
|
||||
appOutDir,
|
||||
|
@ -29,10 +38,8 @@ export async function afterPack({
|
|||
const versionsDir = path.join(frameworkDir, 'Versions');
|
||||
const currentVersion = path.join(versionsDir, 'Current');
|
||||
|
||||
let subFolders: Array<string>;
|
||||
if (await pathExists(currentVersion)) {
|
||||
subFolders = await fs.readdir(currentVersion);
|
||||
} else {
|
||||
let subFolders = await safeReaddir(currentVersion);
|
||||
if (subFolders == null) {
|
||||
console.error(`${currentVersion} not found`);
|
||||
subFolders = [];
|
||||
}
|
||||
|
@ -44,12 +51,13 @@ export async function afterPack({
|
|||
'Replacing electron framework symlink with real folder',
|
||||
sourcePath
|
||||
);
|
||||
rimraf.sync(targetPath);
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await rm(targetPath, { recursive: true, force: true });
|
||||
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await fs.rename(sourcePath, targetPath);
|
||||
}
|
||||
|
||||
console.log('Removing duplicate electron framework', versionsDir);
|
||||
rimraf.sync(versionsDir);
|
||||
await rm(versionsDir, { recursive: true, force: true });
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import asar from 'asar';
|
||||
import asar from '@electron/asar';
|
||||
import assert from 'assert';
|
||||
import { join } from 'path';
|
||||
import { _electron as electron } from 'playwright';
|
||||
|
|
199
ts/sql/Server.ts
199
ts/sql/Server.ts
|
@ -3,14 +3,13 @@
|
|||
|
||||
/* eslint-disable camelcase */
|
||||
|
||||
import { mkdirSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
import rimraf from 'rimraf';
|
||||
import { randomBytes } from 'crypto';
|
||||
import type { Database, Statement } from '@signalapp/better-sqlite3';
|
||||
import SQL from '@signalapp/better-sqlite3';
|
||||
import { z } from 'zod';
|
||||
import { randomBytes } from 'crypto';
|
||||
import { mkdirSync, rmSync } from 'node:fs';
|
||||
import { join } from 'path';
|
||||
import type { ReadonlyDeep } from 'type-fest';
|
||||
import { z } from 'zod';
|
||||
|
||||
import type { Dictionary } from 'lodash';
|
||||
import {
|
||||
|
@ -30,64 +29,101 @@ import {
|
|||
pick,
|
||||
} from 'lodash';
|
||||
|
||||
import * as Errors from '../types/errors';
|
||||
import { parseBadgeCategory } from '../badges/BadgeCategory';
|
||||
import { parseBadgeImageTheme } from '../badges/BadgeImageTheme';
|
||||
import type { BadgeImageType, BadgeType } from '../badges/types';
|
||||
import type { StoredJob } from '../jobs/types';
|
||||
import { formatCountForLogging } from '../logging/formatCountForLogging';
|
||||
import { ReadStatus } from '../messages/MessageReadStatus';
|
||||
import type { GroupV2MemberType } from '../model-types.d';
|
||||
import type { ConversationColorType, CustomColorType } from '../types/Colors';
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
import type { ReactionType } from '../types/Reactions';
|
||||
import { ReactionReadStatus } from '../types/Reactions';
|
||||
import type { AciString, ServiceIdString } from '../types/ServiceId';
|
||||
import { isServiceIdString } from '../types/ServiceId';
|
||||
import { STORAGE_UI_KEYS } from '../types/StorageUIKeys';
|
||||
import type { StoryDistributionIdString } from '../types/StoryDistributionId';
|
||||
import type { ServiceIdString, AciString } from '../types/ServiceId';
|
||||
import { isServiceIdString } from '../types/ServiceId';
|
||||
import type { StoredJob } from '../jobs/types';
|
||||
import * as Errors from '../types/errors';
|
||||
import { assertDev, strictAssert } from '../util/assert';
|
||||
import { combineNames } from '../util/combineNames';
|
||||
import { consoleLogger } from '../util/consoleLogger';
|
||||
import { dropNull } from '../util/dropNull';
|
||||
import * as durations from '../util/durations';
|
||||
import { generateMessageId } from '../util/generateMessageId';
|
||||
import { isNormalNumber } from '../util/isNormalNumber';
|
||||
import { isNotNil } from '../util/isNotNil';
|
||||
import { parseIntOrThrow } from '../util/parseIntOrThrow';
|
||||
import * as durations from '../util/durations';
|
||||
import { generateMessageId } from '../util/generateMessageId';
|
||||
import { formatCountForLogging } from '../logging/formatCountForLogging';
|
||||
import type { ConversationColorType, CustomColorType } from '../types/Colors';
|
||||
import type { BadgeType, BadgeImageType } from '../badges/types';
|
||||
import { parseBadgeCategory } from '../badges/BadgeCategory';
|
||||
import { parseBadgeImageTheme } from '../badges/BadgeImageTheme';
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
import { updateSchema } from './migrations';
|
||||
import type {
|
||||
EmptyQuery,
|
||||
ArrayQuery,
|
||||
Query,
|
||||
EmptyQuery,
|
||||
JSONRows,
|
||||
Query,
|
||||
QueryFragment,
|
||||
} from './util';
|
||||
import {
|
||||
sqlConstant,
|
||||
sqlJoin,
|
||||
sqlFragment,
|
||||
sql,
|
||||
jsonToObject,
|
||||
objectToJSON,
|
||||
batchMultiVarQuery,
|
||||
getCountFromTable,
|
||||
removeById,
|
||||
removeAllFromTable,
|
||||
getAllFromTable,
|
||||
getById,
|
||||
bulkAdd,
|
||||
createOrUpdate,
|
||||
setUserVersion,
|
||||
getUserVersion,
|
||||
getAllFromTable,
|
||||
getById,
|
||||
getCountFromTable,
|
||||
getSchemaVersion,
|
||||
getUserVersion,
|
||||
jsonToObject,
|
||||
objectToJSON,
|
||||
removeAllFromTable,
|
||||
removeById,
|
||||
setUserVersion,
|
||||
sql,
|
||||
sqlConstant,
|
||||
sqlFragment,
|
||||
sqlJoin,
|
||||
} from './util';
|
||||
import { updateSchema } from './migrations';
|
||||
|
||||
import { getAttachmentCiphertextLength } from '../AttachmentCrypto';
|
||||
import { SeenStatus } from '../MessageSeenStatus';
|
||||
import {
|
||||
attachmentBackupJobSchema,
|
||||
type AttachmentBackupJobType,
|
||||
} from '../types/AttachmentBackup';
|
||||
import {
|
||||
attachmentDownloadJobSchema,
|
||||
type AttachmentDownloadJobType,
|
||||
} from '../types/AttachmentDownload';
|
||||
import type {
|
||||
CallHistoryDetails,
|
||||
CallHistoryFilter,
|
||||
CallHistoryGroup,
|
||||
CallHistoryPagination,
|
||||
CallLogEventTarget,
|
||||
} from '../types/CallDisposition';
|
||||
import {
|
||||
CallDirection,
|
||||
CallHistoryFilterStatus,
|
||||
CallMode,
|
||||
CallStatusValue,
|
||||
CallType,
|
||||
DirectCallStatus,
|
||||
GroupCallStatus,
|
||||
callHistoryDetailsSchema,
|
||||
callHistoryGroupSchema,
|
||||
} from '../types/CallDisposition';
|
||||
import { redactGenericText } from '../util/privacy';
|
||||
import { parseStrict, parseUnknown, safeParseUnknown } from '../util/schemas';
|
||||
import {
|
||||
SNIPPET_LEFT_PLACEHOLDER,
|
||||
SNIPPET_RIGHT_PLACEHOLDER,
|
||||
SNIPPET_TRUNCATION_PLACEHOLDER,
|
||||
} from '../util/search';
|
||||
import type { SyncTaskType } from '../util/syncTasks';
|
||||
import { MAX_SYNC_TASK_ATTEMPTS } from '../util/syncTasks.types';
|
||||
import { isMoreRecentThan } from '../util/timestamp';
|
||||
import type {
|
||||
ReadableDB,
|
||||
WritableDB,
|
||||
AdjacentMessagesByConversationOptionsType,
|
||||
StoredAllItemsType,
|
||||
BackupCdnMediaObjectType,
|
||||
ConversationMessageStatsType,
|
||||
ConversationMetricsType,
|
||||
ConversationType,
|
||||
DeleteSentProtoRecipientOptionsType,
|
||||
|
@ -97,14 +133,12 @@ import type {
|
|||
GetAllStoriesResultType,
|
||||
GetConversationRangeCenteredOnMessageResultType,
|
||||
GetKnownMessageAttachmentsResultType,
|
||||
GetNearbyMessageFromDeletedSetOptionsType,
|
||||
GetRecentStoryRepliesOptionsType,
|
||||
GetUnreadByConversationAndMarkReadResultType,
|
||||
IdentityKeyIdType,
|
||||
StoredIdentityKeyType,
|
||||
InstalledStickerPackType,
|
||||
ItemKeyType,
|
||||
StoredItemType,
|
||||
ConversationMessageStatsType,
|
||||
MessageAttachmentsCursorType,
|
||||
MessageCursorType,
|
||||
MessageMetricsType,
|
||||
|
@ -114,8 +148,7 @@ import type {
|
|||
PageMessagesResultType,
|
||||
PreKeyIdType,
|
||||
ReactionResultType,
|
||||
StoredPreKeyType,
|
||||
ServerSearchResultMessageType,
|
||||
ReadableDB,
|
||||
SenderKeyIdType,
|
||||
SenderKeyType,
|
||||
SentMessageDBType,
|
||||
|
@ -125,15 +158,21 @@ import type {
|
|||
SentRecipientsDBType,
|
||||
SentRecipientsType,
|
||||
ServerReadableInterface,
|
||||
ServerSearchResultMessageType,
|
||||
ServerWritableInterface,
|
||||
SessionIdType,
|
||||
SessionType,
|
||||
SignedPreKeyIdType,
|
||||
StoredSignedPreKeyType,
|
||||
StickerPackInfoType,
|
||||
StickerPackStatusType,
|
||||
StickerPackType,
|
||||
StickerType,
|
||||
StoredAllItemsType,
|
||||
StoredIdentityKeyType,
|
||||
StoredItemType,
|
||||
StoredKyberPreKeyType,
|
||||
StoredPreKeyType,
|
||||
StoredSignedPreKeyType,
|
||||
StoryDistributionMemberType,
|
||||
StoryDistributionType,
|
||||
StoryDistributionWithMembersType,
|
||||
|
@ -141,80 +180,40 @@ import type {
|
|||
UninstalledStickerPackType,
|
||||
UnprocessedType,
|
||||
UnprocessedUpdateType,
|
||||
GetNearbyMessageFromDeletedSetOptionsType,
|
||||
StoredKyberPreKeyType,
|
||||
BackupCdnMediaObjectType,
|
||||
WritableDB,
|
||||
} from './Interface';
|
||||
import { AttachmentDownloadSource } from './Interface';
|
||||
import { SeenStatus } from '../MessageSeenStatus';
|
||||
import {
|
||||
SNIPPET_LEFT_PLACEHOLDER,
|
||||
SNIPPET_RIGHT_PLACEHOLDER,
|
||||
SNIPPET_TRUNCATION_PLACEHOLDER,
|
||||
} from '../util/search';
|
||||
import type {
|
||||
CallHistoryDetails,
|
||||
CallHistoryFilter,
|
||||
CallHistoryGroup,
|
||||
CallHistoryPagination,
|
||||
CallLogEventTarget,
|
||||
} from '../types/CallDisposition';
|
||||
import {
|
||||
DirectCallStatus,
|
||||
callHistoryGroupSchema,
|
||||
CallHistoryFilterStatus,
|
||||
callHistoryDetailsSchema,
|
||||
CallDirection,
|
||||
GroupCallStatus,
|
||||
CallType,
|
||||
CallStatusValue,
|
||||
CallMode,
|
||||
} from '../types/CallDisposition';
|
||||
import {
|
||||
_removeAllCallLinks,
|
||||
beginDeleteAllCallLinks,
|
||||
beginDeleteCallLink,
|
||||
callLinkExists,
|
||||
defunctCallLinkExists,
|
||||
deleteCallHistoryByRoomId,
|
||||
deleteCallLinkAndHistory,
|
||||
deleteCallLinkFromSync,
|
||||
finalizeDeleteCallLink,
|
||||
getAllAdminCallLinks,
|
||||
getAllCallLinkRecordsWithAdminKey,
|
||||
getAllCallLinks,
|
||||
getAllDefunctCallLinksWithAdminKey,
|
||||
getAllMarkedDeletedCallLinkRoomIds,
|
||||
getCallLinkByRoomId,
|
||||
getCallLinkRecordByRoomId,
|
||||
insertCallLink,
|
||||
insertDefunctCallLink,
|
||||
updateCallLink,
|
||||
updateCallLinkAdminKeyByRoomId,
|
||||
updateCallLinkState,
|
||||
beginDeleteAllCallLinks,
|
||||
deleteCallHistoryByRoomId,
|
||||
deleteCallLinkAndHistory,
|
||||
getAllAdminCallLinks,
|
||||
getAllCallLinkRecordsWithAdminKey,
|
||||
getAllDefunctCallLinksWithAdminKey,
|
||||
getAllMarkedDeletedCallLinkRoomIds,
|
||||
finalizeDeleteCallLink,
|
||||
beginDeleteCallLink,
|
||||
deleteCallLinkFromSync,
|
||||
_removeAllCallLinks,
|
||||
insertDefunctCallLink,
|
||||
updateDefunctCallLink,
|
||||
} from './server/callLinks';
|
||||
import {
|
||||
replaceAllEndorsementsForGroup,
|
||||
deleteAllEndorsementsForGroup,
|
||||
getGroupSendCombinedEndorsementExpiration,
|
||||
getGroupSendEndorsementsData,
|
||||
getGroupSendMemberEndorsement,
|
||||
replaceAllEndorsementsForGroup,
|
||||
} from './server/groupSendEndorsements';
|
||||
import {
|
||||
attachmentDownloadJobSchema,
|
||||
type AttachmentDownloadJobType,
|
||||
} from '../types/AttachmentDownload';
|
||||
import { MAX_SYNC_TASK_ATTEMPTS } from '../util/syncTasks.types';
|
||||
import type { SyncTaskType } from '../util/syncTasks';
|
||||
import { isMoreRecentThan } from '../util/timestamp';
|
||||
import {
|
||||
type AttachmentBackupJobType,
|
||||
attachmentBackupJobSchema,
|
||||
} from '../types/AttachmentBackup';
|
||||
import { redactGenericText } from '../util/privacy';
|
||||
import { getAttachmentCiphertextLength } from '../AttachmentCrypto';
|
||||
import { parseStrict, parseUnknown, safeParseUnknown } from '../util/schemas';
|
||||
|
||||
type ConversationRow = Readonly<{
|
||||
json: string;
|
||||
|
@ -825,9 +824,9 @@ export function removeDB(): void {
|
|||
}
|
||||
|
||||
logger.warn('removeDB: Removing all database files');
|
||||
rimraf.sync(databaseFilePath);
|
||||
rimraf.sync(`${databaseFilePath}-shm`);
|
||||
rimraf.sync(`${databaseFilePath}-wal`);
|
||||
rmSync(databaseFilePath, { recursive: true, force: true });
|
||||
rmSync(`${databaseFilePath}-shm`, { recursive: true, force: true });
|
||||
rmSync(`${databaseFilePath}-wal`, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
function removeIndexedDBFiles(_db: WritableDB): void {
|
||||
|
@ -838,7 +837,7 @@ function removeIndexedDBFiles(_db: WritableDB): void {
|
|||
}
|
||||
|
||||
const pattern = join(indexedDBPath, '*.leveldb');
|
||||
rimraf.sync(pattern);
|
||||
rmSync(pattern, { recursive: true, force: true });
|
||||
indexedDBPath = undefined;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,50 +4,50 @@
|
|||
/* eslint-disable no-console */
|
||||
import { createWriteStream } from 'fs';
|
||||
import { pathExists } from 'fs-extra';
|
||||
import { readdir, stat, writeFile, mkdir } from 'fs/promises';
|
||||
import { join, normalize, extname } from 'path';
|
||||
import { tmpdir, release as osRelease } from 'os';
|
||||
import { mkdir, readdir, stat, writeFile } from 'fs/promises';
|
||||
import { throttle } from 'lodash';
|
||||
import { release as osRelease, tmpdir } from 'os';
|
||||
import { extname, join, normalize } from 'path';
|
||||
|
||||
import config from 'config';
|
||||
import type { ParserConfiguration } from 'dashdash';
|
||||
import { createParser } from 'dashdash';
|
||||
import { FAILSAFE_SCHEMA, safeLoad } from 'js-yaml';
|
||||
import { gt, gte, lt } from 'semver';
|
||||
import config from 'config';
|
||||
import got from 'got';
|
||||
import { v4 as getGuid } from 'uuid';
|
||||
import type { BrowserWindow } from 'electron';
|
||||
import { app, ipcMain } from 'electron';
|
||||
|
||||
import * as durations from '../util/durations';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { getTempPath, getUpdateCachePath } from '../../app/attachments';
|
||||
import { markShouldNotQuit, markShouldQuit } from '../../app/window_state';
|
||||
import { DialogType } from '../types/Dialogs';
|
||||
import * as Errors from '../types/errors';
|
||||
import { isAlpha, isBeta, isStaging } from '../util/version';
|
||||
import { strictAssert } from '../util/assert';
|
||||
import { drop } from '../util/drop';
|
||||
import * as durations from '../util/durations';
|
||||
import { isAlpha, isBeta, isStaging } from '../util/version';
|
||||
|
||||
import * as packageJson from '../../package.json';
|
||||
import type { SettingsChannel } from '../main/settingsChannel';
|
||||
import { isPathInside } from '../util/isPathInside';
|
||||
import {
|
||||
getSignatureFileName,
|
||||
hexToBinary,
|
||||
verifySignature,
|
||||
getSignatureFileName,
|
||||
} from './signature';
|
||||
import { isPathInside } from '../util/isPathInside';
|
||||
import type { SettingsChannel } from '../main/settingsChannel';
|
||||
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
import { getGotOptions } from './got';
|
||||
import { checkIntegrity, gracefulRename, gracefulRimraf } from './util';
|
||||
import type { PrepareDownloadResultType as DifferentialDownloadDataType } from './differential';
|
||||
import {
|
||||
prepareDownload as prepareDifferentialDownload,
|
||||
download as downloadDifferentialData,
|
||||
getBlockMapFileName,
|
||||
isValidPreparedData as isValidDifferentialData,
|
||||
prepareDownload as prepareDifferentialDownload,
|
||||
} from './differential';
|
||||
import { getGotOptions } from './got';
|
||||
import { checkIntegrity, gracefulRename, gracefulRmRecursive } from './util';
|
||||
|
||||
const POLL_INTERVAL = 30 * durations.MINUTE;
|
||||
|
||||
|
@ -732,7 +732,7 @@ export abstract class Updater {
|
|||
// We could have failed to update differentially due to low free disk
|
||||
// space. Remove all cached updates since we are doing a full download
|
||||
// anyway.
|
||||
await gracefulRimraf(this.logger, cacheDir);
|
||||
await gracefulRmRecursive(this.logger, cacheDir);
|
||||
cacheDir = await createUpdateCacheDirIfNeeded();
|
||||
|
||||
await this.downloadAndReport(
|
||||
|
@ -1067,7 +1067,7 @@ export async function deleteTempDir(
|
|||
);
|
||||
}
|
||||
|
||||
await gracefulRimraf(logger, targetDir);
|
||||
await gracefulRmRecursive(logger, targetDir);
|
||||
}
|
||||
|
||||
export function getCliOptions<T>(options: ParserConfiguration['options']): T {
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
// Copyright 2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { createReadStream } from 'fs';
|
||||
import { rename } from 'fs/promises';
|
||||
import { pipeline } from 'stream/promises';
|
||||
import { createHash } from 'crypto';
|
||||
import rimraf from 'rimraf';
|
||||
import { promisify } from 'util';
|
||||
import { createReadStream } from 'fs';
|
||||
import { rename, rm } from 'fs/promises';
|
||||
import { pipeline } from 'stream/promises';
|
||||
|
||||
import * as Errors from '../types/errors';
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
import * as Errors from '../types/errors';
|
||||
import * as durations from '../util/durations';
|
||||
import { isOlderThan } from '../util/timestamp';
|
||||
import { sleep } from '../util/sleep';
|
||||
|
||||
const rimrafPromise = promisify(rimraf);
|
||||
import { isOlderThan } from '../util/timestamp';
|
||||
|
||||
export type CheckIntegrityResultType = Readonly<
|
||||
| {
|
||||
|
@ -125,13 +121,17 @@ export async function gracefulRename(
|
|||
});
|
||||
}
|
||||
|
||||
export async function gracefulRimraf(
|
||||
function rmRecursive(path: string): Promise<void> {
|
||||
return rm(path, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
export async function gracefulRmRecursive(
|
||||
logger: LoggerType,
|
||||
path: string
|
||||
): Promise<void> {
|
||||
return doGracefulFSOperation({
|
||||
name: 'rimraf',
|
||||
operation: rimrafPromise,
|
||||
name: 'rmRecursive',
|
||||
operation: rmRecursive,
|
||||
args: [path],
|
||||
logger,
|
||||
startedAt: Date.now(),
|
||||
|
|
|
@ -51,11 +51,11 @@
|
|||
"updated": "2024-06-25T17:33:38.376Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@ndelangen/get-tarball/dist/index.js",
|
||||
"line": " \"innerHTML\",",
|
||||
"rule": "eval",
|
||||
"path": "node_modules/@jsonjoy.com/util/lib/codegen/compile.js",
|
||||
"line": "const compile = (js) => eval(js);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
"updated": "2024-11-13T23:42:33.044Z"
|
||||
},
|
||||
{
|
||||
"rule": "eval",
|
||||
|
@ -65,125 +65,6 @@
|
|||
"updated": "2018-09-18T19:19:27.699Z",
|
||||
"reasonDetail": "What's being eval'd is a static string"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dialog/dist/index.js",
|
||||
"line": " const triggerRef = React.useRef(null);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dialog/dist/index.js",
|
||||
"line": " const contentRef = React.useRef(null);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dialog/dist/index.js",
|
||||
"line": " const contentRef = React.useRef(null);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dialog/dist/index.js",
|
||||
"line": " const hasInteractedOutsideRef = React.useRef(false);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dialog/dist/index.js",
|
||||
"line": " const hasPointerDownOutsideRef = React.useRef(false);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dialog/dist/index.js",
|
||||
"line": " const contentRef = React.useRef(null);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dismissable-layer/dist/index.js",
|
||||
"line": " const ref = React.useRef(null);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dismissable-layer/dist/index.js",
|
||||
"line": " const isPointerInsideReactTreeRef = React.useRef(false);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dismissable-layer/dist/index.js",
|
||||
"line": " const handleClickRef = React.useRef(() => {",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-dismissable-layer/dist/index.js",
|
||||
"line": " const isFocusInsideReactTreeRef = React.useRef(false);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-focus-scope/dist/index.js",
|
||||
"line": " const lastFocusedElementRef = React.useRef(null);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-focus-scope/dist/index.js",
|
||||
"line": " const focusScope = React.useRef({",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-presence/dist/index.js",
|
||||
"line": " const stylesRef = React2.useRef({});",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-presence/dist/index.js",
|
||||
"line": " const prevPresentRef = React2.useRef(present);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-presence/dist/index.js",
|
||||
"line": " const prevAnimationNameRef = React2.useRef(\"none\");",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-use-callback-ref/dist/index.js",
|
||||
"line": " const callbackRef = React.useRef(callback);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@radix-ui/react-use-controllable-state/dist/index.js",
|
||||
"line": " const prevValueRef = React.useRef(value);",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/@react-spring/animated/dist/react-spring-animated.cjs.dev.js",
|
||||
|
@ -410,45 +291,225 @@
|
|||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-342a062d.js",
|
||||
"line": " pass: element.innerHTML === '',",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.cjs.js",
|
||||
"line": " if (!element || !('innerHTML' in element)) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-342a062d.js",
|
||||
"line": " ` ${this.utils.printReceived(element.innerHTML)}`,",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.cjs.js",
|
||||
"line": " if (!element.innerHTML) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-342a062d.js",
|
||||
"line": " ` ${this.utils.printReceived(element.innerHTML)}`,",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-342a062d.js",
|
||||
"line": " div.innerHTML = htmlText;",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-342a062d.js",
|
||||
"line": " return div.innerHTML",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.cjs.js",
|
||||
"line": " const playgroundUrl = getPlaygroundUrl(element.innerHTML);",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-342a062d.js",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.cjs.js",
|
||||
"line": " if (!('outerHTML' in dom)) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.cjs.js",
|
||||
"line": " return maxLength !== undefined && dom.outerHTML.length > maxLength ? debugContent.slice(0, maxLength) + \"...\" : debugContent;",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js",
|
||||
"line": " if (!element || !('innerHTML' in element)) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js",
|
||||
"line": " if (!element.innerHTML) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js",
|
||||
"line": " const playgroundUrl = getPlaygroundUrl(element.innerHTML);",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js",
|
||||
"line": " if (!('outerHTML' in dom)) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js",
|
||||
"line": " return maxLength !== undefined && dom.outerHTML.length > maxLength ? debugContent.slice(0, maxLength) + \"...\" : debugContent;",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js",
|
||||
"line": "\t if (!element || !('innerHTML' in element)) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js",
|
||||
"line": "\t if (!element.innerHTML) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js",
|
||||
"line": "\t const playgroundUrl = getPlaygroundUrl(element.innerHTML);",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js",
|
||||
"line": "\t if (!('outerHTML' in dom)) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js",
|
||||
"line": "\t return maxLength !== undefined && dom.outerHTML.length > maxLength ? debugContent.slice(0, maxLength) + \"...\" : debugContent;",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.umd.min.js",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/@testing-library/dom.umd.min.js",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/pretty-dom.js",
|
||||
"line": " if (!('outerHTML' in dom)) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/pretty-dom.js",
|
||||
"line": " return maxLength !== undefined && dom.outerHTML.length > maxLength ? `${debugContent.slice(0, maxLength)}...` : debugContent;",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/screen.js",
|
||||
"line": " if (!element || !('innerHTML' in element)) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/screen.js",
|
||||
"line": " if (!element.innerHTML) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/dom/dist/screen.js",
|
||||
"line": " const playgroundUrl = getPlaygroundUrl(element.innerHTML);",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-4fe91ec3.js",
|
||||
"line": " pass: element.innerHTML === '',",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-4fe91ec3.js",
|
||||
"line": " ` ${this.utils.printReceived(element.innerHTML)}`,",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-4fe91ec3.js",
|
||||
"line": " ` ${this.utils.printReceived(element.innerHTML)}`,",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-4fe91ec3.js",
|
||||
"line": " div.innerHTML = htmlText;",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-4fe91ec3.js",
|
||||
"line": " return div.innerHTML",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/@testing-library/jest-dom/dist/matchers-4fe91ec3.js",
|
||||
"line": " pass: container.outerHTML.includes(getNormalizedHtml(container, htmlText)),",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:31:32.324Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
|
@ -478,6 +539,30 @@
|
|||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-04-13T00:52:21.453Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/axe-core/axe.js",
|
||||
"line": " if (!(element !== null && element !== void 0 && element.outerHTML)) {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:33:49.776Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/axe-core/axe.js",
|
||||
"line": " var outerHTML = node.outerHTML;",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:33:49.776Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/axe-core/axe.js",
|
||||
"line": " node = cache_default.get(outerHTML, function() {",
|
||||
"reasonCategory": "falseMatch|testCode|exampleCode|otherUtilityCode|regexMatchedSafeCode|notExercisedByOurApp|ruleNeeded|usageTrusted",
|
||||
"updated": "2024-11-13T23:33:49.776Z",
|
||||
"reasonDetail": "<optional>"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/axe-core/axe.js",
|
||||
|
@ -497,41 +582,6 @@
|
|||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-04-13T17:31:15.352Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/axe-core/doc/examples/jest_react/test-helpers.js",
|
||||
"line": "\twrapper.innerHTML = '';",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-06-24T19:19:28.335Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/axe-core/lib/core/utils/dq-element.js",
|
||||
"line": "\tvar source = element.outerHTML;",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-04-13T00:52:21.453Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/axe-core/lib/core/utils/dq-element.js",
|
||||
"line": " * grab the source (outerHTML) and offer an array for storing frame paths",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-04-13T00:52:21.453Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/axe-core/lib/core/utils/pollyfills.js",
|
||||
"line": "\tstyle.innerHTML = usePointer",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-04-13T17:31:15.352Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/axe-core/lib/core/utils/valid-langs.js",
|
||||
"line": "const str = document.querySelector('pre').innerHTML;",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2021-04-13T17:31:15.352Z"
|
||||
},
|
||||
{
|
||||
"rule": "eval",
|
||||
"path": "node_modules/config/lib/config.js",
|
||||
|
@ -553,34 +603,6 @@
|
|||
"reasonCategory": "falseMatch",
|
||||
"updated": "2023-01-11T23:51:00.603Z"
|
||||
},
|
||||
{
|
||||
"rule": "eval",
|
||||
"path": "node_modules/es5-ext/node_modules/type/test/_lib/arrow-function-if-supported.js",
|
||||
"line": "try { module.exports = eval(\"(() => {})\"); }",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-06-24T19:19:28.335Z"
|
||||
},
|
||||
{
|
||||
"rule": "eval",
|
||||
"path": "node_modules/es5-ext/node_modules/type/test/_lib/class-if-supported.js",
|
||||
"line": "try { module.exports = eval(\"(class {})\"); }",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-06-24T19:19:28.335Z"
|
||||
},
|
||||
{
|
||||
"rule": "eval",
|
||||
"path": "node_modules/esniff/node_modules/d/node_modules/type/test/_lib/arrow-function-if-supported.js",
|
||||
"line": "try { module.exports = eval(\"(() => {})\"); }",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-06-24T19:19:28.335Z"
|
||||
},
|
||||
{
|
||||
"rule": "eval",
|
||||
"path": "node_modules/esniff/node_modules/d/node_modules/type/test/_lib/class-if-supported.js",
|
||||
"line": "try { module.exports = eval(\"(class {})\"); }",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-06-24T19:19:28.335Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-ref",
|
||||
"path": "node_modules/esquery/dist/esquery.esm.min.js",
|
||||
|
@ -666,36 +688,6 @@
|
|||
"updated": "2021-02-16T19:08:17.452Z",
|
||||
"reasonDetail": "Hard-coded string used for testing capabilities."
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/html-minifier-terser/node_modules/terser/dist/bundle.min.js",
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2022-07-26T23:41:36.800Z",
|
||||
"reasonDetail": "Part of keyword list for preservation in final minified build"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/html-minifier-terser/node_modules/terser/dist/bundle.min.js",
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2022-07-26T23:41:36.800Z",
|
||||
"reasonDetail": "Part of keyword list for preservation in final minified build"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/html-minifier-terser/node_modules/terser/tools/domprops.js",
|
||||
"line": " \"innerHTML\",",
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2022-07-26T23:41:36.800Z",
|
||||
"reasonDetail": "Part of keyword list for preservation in final minified build"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-outerHTML",
|
||||
"path": "node_modules/html-minifier-terser/node_modules/terser/tools/domprops.js",
|
||||
"line": " \"outerHTML\",",
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2022-07-26T23:41:36.800Z",
|
||||
"reasonDetail": "Part of keyword list for preservation in final minified build"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/intl-tel-input/build/js/intlTelInput-jquery.js",
|
||||
|
@ -1379,42 +1371,6 @@
|
|||
"reasonCategory": "notExercisedByOurApp",
|
||||
"updated": "2022-06-04T00:50:49.405Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/react-colorful/dist/index.esmodule.js",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2022-06-04T00:50:49.405Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/react-colorful/dist/index.js",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2022-06-04T00:50:49.405Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-colorful/dist/index.js",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2022-06-04T00:50:49.405Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/react-colorful/dist/index.module.js",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2022-06-04T00:50:49.405Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/react-colorful/dist/index.umd.js",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2022-06-04T00:50:49.405Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-colorful/dist/index.umd.js",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2022-06-04T00:50:49.405Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/react-quill/dist/react-quill.js",
|
||||
|
@ -1460,118 +1416,6 @@
|
|||
"updated": "2020-10-13T18:36:57.012Z",
|
||||
"reasonDetail": "necessary for react-quill"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2015/SideEffect.js",
|
||||
"line": " var shouldPreventQueue = React.useRef([]);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2015/SideEffect.js",
|
||||
"line": " var touchStartRef = React.useRef([0, 0]);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2015/SideEffect.js",
|
||||
"line": " var activeAxis = React.useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2015/SideEffect.js",
|
||||
"line": " var lastProps = React.useRef(props);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2015/UI.js",
|
||||
"line": " var ref = React.useRef(null);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2019/SideEffect.js",
|
||||
"line": " const shouldPreventQueue = React.useRef([]);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2019/SideEffect.js",
|
||||
"line": " const touchStartRef = React.useRef([0, 0]);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2019/SideEffect.js",
|
||||
"line": " const activeAxis = React.useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2019/SideEffect.js",
|
||||
"line": " const lastProps = React.useRef(props);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es2019/UI.js",
|
||||
"line": " const ref = React.useRef(null);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es5/SideEffect.js",
|
||||
"line": " var shouldPreventQueue = React.useRef([]);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es5/SideEffect.js",
|
||||
"line": " var touchStartRef = React.useRef([0, 0]);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es5/SideEffect.js",
|
||||
"line": " var activeAxis = React.useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es5/SideEffect.js",
|
||||
"line": " var lastProps = React.useRef(props);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/es5/UI.js",
|
||||
"line": " var ref = React.useRef(null);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-remove-scroll/dist/index.js",
|
||||
"line": " var t = n.useRef(null), c = n.useState({onScrollCapture: l, onWheelCapture: l, onTouchMoveCapture: l}), u = c[0],",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/react-textarea-autosize/dist/react-textarea-autosize.browser.cjs.js",
|
||||
|
@ -1705,117 +1549,6 @@
|
|||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-04-30T22:35:27.860Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/tocbot/dist/tocbot.js",
|
||||
"line": " tocElement.innerHTML = ''",
|
||||
"reasonCategory": "notExercisedByOurApp",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/tocbot/dist/tocbot.min.js",
|
||||
"reasonCategory": "notExercisedByOurApp",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/tocbot/src/js/index-esm.js",
|
||||
"line": " tocElement.innerHTML = ''",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "DOM-innerHTML",
|
||||
"path": "node_modules/tocbot/src/js/server-render.js",
|
||||
"line": " return toc && toc.innerHTML",
|
||||
"reasonCategory": "testCode",
|
||||
"updated": "2024-07-03T21:07:45.309Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es2015/assignRef.js",
|
||||
"line": " * const refObject = useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es2015/mergeRef.js",
|
||||
"line": " * const ownRef = useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es2015/refToCallback.js",
|
||||
"line": " * const ref = useRef(0);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es2015/useMergeRef.js",
|
||||
"line": " * const ownRef = useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es2019/assignRef.js",
|
||||
"line": " * const refObject = useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es2019/mergeRef.js",
|
||||
"line": " * const ownRef = useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es2019/refToCallback.js",
|
||||
"line": " * const ref = useRef(0);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es2019/useMergeRef.js",
|
||||
"line": " * const ownRef = useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es5/assignRef.js",
|
||||
"line": " * const refObject = useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es5/mergeRef.js",
|
||||
"line": " * const ownRef = useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es5/refToCallback.js",
|
||||
"line": " * const ref = useRef(0);",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-callback-ref/dist/es5/useMergeRef.js",
|
||||
"line": " * const ownRef = useRef();",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-composed-ref/dist/use-composed-ref.cjs.js",
|
||||
|
@ -1851,48 +1584,6 @@
|
|||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2022-06-16T23:23:32.306Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-sidecar/dist/es2015/renderProp.js",
|
||||
"line": " var defaultState = React.useRef(defaults(props));",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-sidecar/dist/es2015/renderProp.js",
|
||||
"line": " var ref = React.useRef(function (state) { return (defaultState.current = state); });",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-sidecar/dist/es2019/renderProp.js",
|
||||
"line": " const defaultState = React.useRef(defaults(props));",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-sidecar/dist/es2019/renderProp.js",
|
||||
"line": " const ref = React.useRef((state) => (defaultState.current = state));",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-sidecar/dist/es5/renderProp.js",
|
||||
"line": " var defaultState = React.useRef(defaults(props));",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "React-useRef",
|
||||
"path": "node_modules/use-sidecar/dist/es5/renderProp.js",
|
||||
"line": " var ref = React.useRef(function (state) { return (defaultState.current = state); });",
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2023-10-03T18:55:06.301Z"
|
||||
},
|
||||
{
|
||||
"rule": "eval",
|
||||
"path": "node_modules/workerpool/dist/worker.js",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue