Bundle everything with rolldown

This commit is contained in:
Fedor Indutny
2026-03-30 12:42:37 -07:00
committed by GitHub
parent 8c06ad52ab
commit a27f0ad3e1
2317 changed files with 22723 additions and 63514 deletions

View File

@@ -4,7 +4,7 @@
import { assert } from 'chai';
import lodash from 'lodash';
import { cleanDataForIpc } from '../../sql/cleanDataForIpc.std.js';
import { cleanDataForIpc } from '../../sql/cleanDataForIpc.std.ts';
const { noop } = lodash;

View File

@@ -3,8 +3,8 @@
import { assert } from 'chai';
import { _cleanMessageData } from '../../sql/Client.preload.js';
import { IMAGE_GIF } from '../../types/MIME.std.js';
import { _cleanMessageData } from '../../sql/Client.preload.ts';
import { IMAGE_GIF } from '../../types/MIME.std.ts';
describe('_cleanMessageData', () => {
it('throws if message is missing received_at', () => {

View File

@@ -4,10 +4,10 @@
import lodash from 'lodash';
import SQL from '@signalapp/sqlcipher';
import type { ReadableDB, WritableDB } from '../../sql/Interface.std.js';
import type { QueryTemplate } from '../../sql/util.std.js';
import { SCHEMA_VERSIONS } from '../../sql/migrations/index.node.js';
import { consoleLogger } from '../../util/consoleLogger.std.js';
import type { ReadableDB, WritableDB } from '../../sql/Interface.std.ts';
import type { QueryTemplate } from '../../sql/util.std.ts';
import { SCHEMA_VERSIONS } from '../../sql/migrations/index.node.ts';
import { consoleLogger } from '../../util/consoleLogger.std.ts';
const { noop } = lodash;

View File

@@ -3,12 +3,12 @@
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
incrementMessagesMigrationAttempts,
setupTests,
} from '../../sql/Server.node.js';
import { createDB, insertData, getTableData } from './helpers.node.js';
} from '../../sql/Server.node.ts';
import { createDB, insertData, getTableData } from './helpers.node.ts';
describe('SQL/incrementMessagesMigrationAttempts', () => {
let db: WritableDB;

View File

@@ -3,12 +3,12 @@
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
migrateConversationMessages,
setupTests,
} from '../../sql/Server.node.js';
import { createDB, insertData, getTableData } from './helpers.node.js';
} from '../../sql/Server.node.ts';
import { createDB, insertData, getTableData } from './helpers.node.ts';
describe('SQL/migrateConversationMessages', () => {
let db: WritableDB;

View File

@@ -4,11 +4,11 @@
import { assert } from 'chai';
import { v4 as generateGuid } from 'uuid';
import { jsonToObject, sql } from '../../sql/util.std.js';
import { createDB, updateToVersion } from './helpers.node.js';
import type { WritableDB, MessageType } from '../../sql/Interface.std.js';
import { ReadStatus } from '../../messages/MessageReadStatus.std.js';
import { SeenStatus } from '../../MessageSeenStatus.std.js';
import { jsonToObject, sql } from '../../sql/util.std.ts';
import { createDB, updateToVersion } from './helpers.node.ts';
import type { WritableDB, MessageType } from '../../sql/Interface.std.ts';
import { ReadStatus } from '../../messages/MessageReadStatus.std.ts';
import { SeenStatus } from '../../MessageSeenStatus.std.ts';
describe('SQL/updateToSchemaVersion1000', () => {
let db: WritableDB;

View File

@@ -4,14 +4,14 @@
import { assert } from 'chai';
import { v4 as generateGuid } from 'uuid';
import { normalizeAci } from '../../util/normalizeAci.std.js';
import type { WritableDB } from '../../sql/Interface.std.js';
import { normalizeAci } from '../../util/normalizeAci.std.ts';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
insertData,
getTableData,
updateToVersion,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1020', () => {
let db: WritableDB;

View File

@@ -3,10 +3,10 @@
import { assert } from 'chai';
import { v4 as generateGuid } from 'uuid';
import { sql } from '../../sql/util.std.js';
import { createDB, updateToVersion } from './helpers.node.js';
import type { WritableDB, MessageType } from '../../sql/Interface.std.js';
import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.js';
import { sql } from '../../sql/util.std.ts';
import { createDB, updateToVersion } from './helpers.node.ts';
import type { WritableDB, MessageType } from '../../sql/Interface.std.ts';
import { MessageRequestResponseEvent } from '../../types/MessageRequestResponseEvent.std.ts';
describe('SQL/updateToSchemaVersion1030', () => {
let db: WritableDB;

View File

@@ -3,20 +3,20 @@
import lodash from 'lodash';
import { assert } from 'chai';
import type { ReadableDB, WritableDB } from '../../sql/Interface.std.js';
import type { ReadableDB, WritableDB } from '../../sql/Interface.std.ts';
import {
jsonToObject,
objectToJSON,
sql,
sqlJoin,
} from '../../sql/util.std.js';
import { createDB, updateToVersion, explain } from './helpers.node.js';
} from '../../sql/util.std.ts';
import { createDB, updateToVersion, explain } from './helpers.node.ts';
import type {
_AttachmentDownloadJobTypeV1030,
_AttachmentDownloadJobTypeV1040,
} from '../../sql/migrations/1040-undownloaded-backed-up-media.std.js';
import type { AttachmentType } from '../../types/Attachment.std.js';
import { IMAGE_JPEG } from '../../types/MIME.std.js';
} from '../../sql/migrations/1040-undownloaded-backed-up-media.std.ts';
import type { AttachmentType } from '../../types/Attachment.std.ts';
import { IMAGE_JPEG } from '../../types/MIME.std.ts';
const { omit } = lodash;

View File

@@ -8,24 +8,24 @@ import {
dequeueOldestSyncTasks,
removeSyncTaskById,
saveSyncTasks,
} from '../../sql/Server.node.js';
} from '../../sql/Server.node.ts';
import type {
WritableDB,
ReadableDB,
MessageType,
} from '../../sql/Interface.std.js';
import { sql, jsonToObject } from '../../sql/util.std.js';
} from '../../sql/Interface.std.ts';
import { sql, jsonToObject } from '../../sql/util.std.ts';
import {
insertData,
updateToVersion,
createDB,
explain,
} from './helpers.node.js';
import { MAX_SYNC_TASK_ATTEMPTS } from '../../util/syncTasks.types.std.js';
import { WEEK } from '../../util/durations/index.std.js';
} from './helpers.node.ts';
import { MAX_SYNC_TASK_ATTEMPTS } from '../../util/syncTasks.types.std.ts';
import { WEEK } from '../../util/durations/index.std.ts';
import type { MessageAttributesType } from '../../model-types.d.ts';
import type { SyncTaskType } from '../../util/syncTasks.preload.js';
import type { SyncTaskType } from '../../util/syncTasks.preload.ts';
// Snapshot before: 1270
export function getMostRecentAddressableMessages(

View File

@@ -8,17 +8,17 @@ import type {
WritableDB,
ReadableDB,
MessageType,
} from '../../sql/Interface.std.js';
import { sql, jsonToObject } from '../../sql/util.std.js';
} from '../../sql/Interface.std.ts';
import { sql, jsonToObject } from '../../sql/util.std.ts';
import {
createDB,
insertData,
updateToVersion,
explain,
} from './helpers.node.js';
} from './helpers.node.ts';
import type { MessageAttributesType } from '../../model-types.d.ts';
import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.js';
import { DurationInSeconds } from '../../util/durations/duration-in-seconds.std.ts';
function generateMessage(json: MessageAttributesType) {
const { conversationId, expireTimer, received_at, sent_at, type } = json;

View File

@@ -2,9 +2,9 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import { sql } from '../../sql/util.std.js';
import { createDB, updateToVersion, explain } from './helpers.node.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { sql } from '../../sql/util.std.ts';
import { createDB, updateToVersion, explain } from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1090', () => {
let db: WritableDB;

View File

@@ -3,17 +3,17 @@
import { assert } from 'chai';
import lodash from 'lodash';
import type { WritableDB } from '../../sql/Interface.std.js';
import { markAllCallHistoryRead } from '../../sql/Server.node.js';
import { SeenStatus } from '../../MessageSeenStatus.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { markAllCallHistoryRead } from '../../sql/Server.node.ts';
import { SeenStatus } from '../../MessageSeenStatus.std.ts';
import {
CallMode,
CallDirection,
CallType,
DirectCallStatus,
} from '../../types/CallDisposition.std.js';
import { strictAssert } from '../../util/assert.std.js';
import { createDB, insertData, updateToVersion } from './helpers.node.js';
} from '../../types/CallDisposition.std.ts';
import { strictAssert } from '../../util/assert.std.ts';
import { createDB, insertData, updateToVersion } from './helpers.node.ts';
const { findLast } = lodash;

View File

@@ -2,9 +2,9 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import { sql } from '../../sql/util.std.js';
import { createDB, updateToVersion, explain } from './helpers.node.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { sql } from '../../sql/util.std.ts';
import { createDB, updateToVersion, explain } from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1120', () => {
let db: WritableDB;

View File

@@ -2,9 +2,9 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import { sql } from '../../sql/util.std.js';
import { createDB, updateToVersion, explain } from './helpers.node.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { sql } from '../../sql/util.std.ts';
import { createDB, updateToVersion, explain } from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1130', () => {
let db: WritableDB;

View File

@@ -3,11 +3,11 @@
import { assert } from 'chai';
import lodash from 'lodash';
import type { WritableDB } from '../../sql/Interface.std.js';
import { createDB, updateToVersion, explain } from './helpers.node.js';
import { jsonToObject, objectToJSON, sql } from '../../sql/util.std.js';
import { IMAGE_BMP } from '../../types/MIME.std.js';
import type { _AttachmentDownloadJobTypeV1040 } from '../../sql/migrations/1040-undownloaded-backed-up-media.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { createDB, updateToVersion, explain } from './helpers.node.ts';
import { jsonToObject, objectToJSON, sql } from '../../sql/util.std.ts';
import { IMAGE_BMP } from '../../types/MIME.std.ts';
import type { _AttachmentDownloadJobTypeV1040 } from '../../sql/migrations/1040-undownloaded-backed-up-media.std.ts';
const { omit } = lodash;

View File

@@ -6,11 +6,11 @@ import { assert } from 'chai';
import {
AttachmentDownloadSource,
type WritableDB,
} from '../../sql/Interface.std.js';
import { objectToJSON, sql } from '../../sql/util.std.js';
import { createDB, updateToVersion, explain } from './helpers.node.js';
import { IMAGE_JPEG } from '../../types/MIME.std.js';
import type { _AttachmentDownloadJobTypeV1040 } from '../../sql/migrations/1040-undownloaded-backed-up-media.std.js';
} from '../../sql/Interface.std.ts';
import { objectToJSON, sql } from '../../sql/util.std.ts';
import { createDB, updateToVersion, explain } from './helpers.node.ts';
import { IMAGE_JPEG } from '../../types/MIME.std.ts';
import type { _AttachmentDownloadJobTypeV1040 } from '../../sql/migrations/1040-undownloaded-backed-up-media.std.ts';
type UnflattenedAttachmentDownloadJobType = Omit<
_AttachmentDownloadJobTypeV1040,

View File

@@ -3,18 +3,18 @@
import { assert } from 'chai';
import { type WritableDB } from '../../sql/Interface.std.js';
import { type WritableDB } from '../../sql/Interface.std.ts';
import {
sessionRecordToProtobuf,
sessionStructureToBytes,
} from '../../util/sessionTranslation.node.js';
} from '../../util/sessionTranslation.node.ts';
import {
createDB,
updateToVersion,
insertData,
getTableData,
} from './helpers.node.js';
import { SESSION_V1_RECORD } from '../util/sessionTranslation_test.node.js';
} from './helpers.node.ts';
import { SESSION_V1_RECORD } from '../util/sessionTranslation_test.node.ts';
const MAPS = [
{

View File

@@ -3,15 +3,15 @@
import { assert } from 'chai';
import { type WritableDB } from '../../sql/Interface.std.js';
import { Migrations as Proto } from '../../protobuf/index.std.js';
import { generateAci } from '../../types/ServiceId.std.js';
import { type WritableDB } from '../../sql/Interface.std.ts';
import { Migrations as Proto } from '../../protobuf/index.std.ts';
import { generateAci } from '../../types/ServiceId.std.ts';
import {
createDB,
updateToVersion,
insertData,
getTableData,
} from './helpers.node.js';
} from './helpers.node.ts';
const EMPTY_ENVELOPE: Proto.Envelope.Params = {
content: null,

View File

@@ -3,13 +3,13 @@
import { assert } from 'chai';
import { type WritableDB } from '../../sql/Interface.std.js';
import { type WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
updateToVersion,
insertData,
getTableData,
} from './helpers.node.js';
} from './helpers.node.ts';
const DEFAULTS = {
id: 'id',

View File

@@ -3,13 +3,13 @@
import { assert } from 'chai';
import { type WritableDB } from '../../sql/Interface.std.js';
import { type WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
updateToVersion,
insertData,
getTableData,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1310', () => {
let db: WritableDB;

View File

@@ -8,12 +8,12 @@ import {
dequeueOldestSyncTasks,
saveSyncTasks,
incrementAllSyncTaskAttempts,
} from '../../sql/Server.node.js';
import { sql } from '../../sql/util.std.js';
import type { WritableDB } from '../../sql/Interface.std.js';
import { updateToVersion, createDB, explain } from './helpers.node.js';
} from '../../sql/Server.node.ts';
import { sql } from '../../sql/util.std.ts';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { updateToVersion, createDB, explain } from './helpers.node.ts';
import type { SyncTaskType } from '../../util/syncTasks.preload.js';
import type { SyncTaskType } from '../../util/syncTasks.preload.ts';
describe('SQL/updateToSchemaVersion1330', () => {
let db: WritableDB;

View File

@@ -1,9 +1,9 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { sql } from '../../sql/util.std.js';
import type { WritableDB } from '../../sql/Interface.std.js';
import { updateToVersion, createDB } from './helpers.node.js';
import { sql } from '../../sql/util.std.ts';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { updateToVersion, createDB } from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1350', () => {
let db: WritableDB;

View File

@@ -3,9 +3,9 @@
import { assert } from 'chai';
import { sql } from '../../sql/util.std.js';
import { createDB, explain, updateToVersion } from './helpers.node.js';
import type { WritableDB } from '../../sql/Interface.std.js';
import { sql } from '../../sql/util.std.ts';
import { createDB, explain, updateToVersion } from './helpers.node.ts';
import type { WritableDB } from '../../sql/Interface.std.ts';
describe('SQL/updateToSchemaVersion1360', () => {
let db: WritableDB;

View File

@@ -4,16 +4,16 @@
import { assert } from 'chai';
import { v1 as getGuid } from 'uuid';
import { sql } from '../../sql/util.std.js';
import { sql } from '../../sql/util.std.ts';
import {
updateToVersion,
createDB,
explain,
insertData,
getTableData,
} from './helpers.node.js';
} from './helpers.node.ts';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
describe('SQL/updateToSchemaVersion1380', () => {
let db: WritableDB;

View File

@@ -3,14 +3,14 @@
import { assert } from 'chai';
import { type WritableDB } from '../../sql/Interface.std.js';
import { type WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
updateToVersion,
insertData,
getTableData,
} from './helpers.node.js';
import { createOrUpdate, getById } from '../../sql/util.std.js';
} from './helpers.node.ts';
import { createOrUpdate, getById } from '../../sql/util.std.ts';
describe('SQL/updateToSchemaVersion1410', () => {
let db: WritableDB;

View File

@@ -6,11 +6,11 @@ import { assert } from 'chai';
import {
AttachmentDownloadSource,
type WritableDB,
} from '../../sql/Interface.std.js';
import { objectToJSON, sql } from '../../sql/util.std.js';
import { createDB, updateToVersion } from './helpers.node.js';
import type { AttachmentDownloadJobType } from '../../types/AttachmentDownload.std.js';
import { createAttachmentDownloadJob } from '../../test-helpers/attachmentDownloads.std.js';
} from '../../sql/Interface.std.ts';
import { objectToJSON, sql } from '../../sql/util.std.ts';
import { createDB, updateToVersion } from './helpers.node.ts';
import type { AttachmentDownloadJobType } from '../../types/AttachmentDownload.std.ts';
import { createAttachmentDownloadJob } from '../../test-helpers/attachmentDownloads.std.ts';
function createJobAndEnsureMessage(
db: WritableDB,

View File

@@ -2,14 +2,14 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import { sql } from '../../sql/util.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { sql } from '../../sql/util.std.ts';
import {
createDB,
updateToVersion,
insertData,
explain,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1520', () => {
let db: WritableDB;

View File

@@ -2,9 +2,9 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import { type WritableDB } from '../../sql/Interface.std.js';
import { sql, sqlFragment } from '../../sql/util.std.js';
import { createDB, explain, updateToVersion } from './helpers.node.js';
import { type WritableDB } from '../../sql/Interface.std.ts';
import { sql, sqlFragment } from '../../sql/util.std.ts';
import { createDB, explain, updateToVersion } from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1540', () => {
let db: WritableDB;

View File

@@ -2,13 +2,13 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import { type WritableDB } from '../../sql/Interface.std.js';
import { type WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
getTableData,
insertData,
updateToVersion,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1561', () => {
let db: WritableDB;

View File

@@ -2,13 +2,13 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import { type WritableDB } from '../../sql/Interface.std.js';
import { type WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
getTableData,
insertData,
updateToVersion,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1580', () => {
let db: WritableDB;

View File

@@ -2,13 +2,13 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import { type WritableDB } from '../../sql/Interface.std.js';
import { type WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
getTableData,
insertData,
updateToVersion,
} from './helpers.node.js';
} from './helpers.node.ts';
type ConversationRow = {
id: string;

View File

@@ -3,13 +3,13 @@
import { assert } from 'chai';
import { v4 as generateUuid } from 'uuid';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
getTableData,
insertData,
updateToVersion,
} from './helpers.node.js';
} from './helpers.node.ts';
type MessageRow = Readonly<{
type: 'incoming' | 'pinned-message-notification';

View File

@@ -3,15 +3,15 @@
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
explain,
getTableData,
insertData,
updateToVersion,
} from './helpers.node.js';
import { sql } from '../../sql/util.std.js';
} from './helpers.node.ts';
import { sql } from '../../sql/util.std.ts';
describe('SQL/updateToSchemaVersion1650', () => {
let db: WritableDB;

View File

@@ -3,13 +3,13 @@
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
getTableData,
insertData,
updateToVersion,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1660', () => {
let db: WritableDB;

View File

@@ -3,13 +3,13 @@
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
getTableData,
insertData,
updateToVersion,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1680', () => {
let db: WritableDB;

View File

@@ -3,13 +3,13 @@
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
getTableData,
insertData,
updateToVersion,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion1690', () => {
let db: WritableDB;

View File

@@ -5,20 +5,20 @@ import { assert } from 'chai';
import { v4 as generateGuid } from 'uuid';
import lodash from 'lodash';
import { createDB, insertData, updateToVersion } from './helpers.node.js';
import { createDB, insertData, updateToVersion } from './helpers.node.ts';
import type {
AciString,
PniString,
ServiceIdString,
} from '../../types/ServiceId.std.js';
import { normalizePni } from '../../types/ServiceId.std.js';
import { normalizeAci } from '../../util/normalizeAci.std.js';
} from '../../types/ServiceId.std.ts';
import { normalizePni } from '../../types/ServiceId.std.ts';
import { normalizeAci } from '../../util/normalizeAci.std.ts';
import type {
WritableDB,
KyberPreKeyType,
PreKeyType,
SignedPreKeyType,
} from '../../sql/Interface.std.js';
} from '../../sql/Interface.std.ts';
const { range } = lodash;

View File

@@ -4,13 +4,13 @@
import { assert } from 'chai';
import { v4 as generateGuid } from 'uuid';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
updateToVersion,
insertData,
getTableData,
} from './helpers.node.js';
} from './helpers.node.ts';
const CONVO_ID = generateGuid();
const GROUP_ID = generateGuid();

View File

@@ -4,7 +4,7 @@
import { assert } from 'chai';
import { v4 as generateGuid } from 'uuid';
import { jsonToObject, sql } from '../../sql/util.std.js';
import { jsonToObject, sql } from '../../sql/util.std.ts';
import {
CallMode,
CallDirection,
@@ -12,17 +12,17 @@ import {
DirectCallStatus,
GroupCallStatus,
callHistoryDetailsSchema,
} from '../../types/CallDisposition.std.js';
import type { CallHistoryDetails } from '../../types/CallDisposition.std.js';
} from '../../types/CallDisposition.std.ts';
import type { CallHistoryDetails } from '../../types/CallDisposition.std.ts';
import type {
CallHistoryDetailsFromDiskType,
MessageWithCallHistoryDetails,
} from '../../sql/migrations/89-call-history.node.js';
import { getCallIdFromEra } from '../../util/callDisposition.preload.js';
import { isValidUuid } from '../../util/isValidUuid.std.js';
import { createDB, updateToVersion } from './helpers.node.js';
import type { WritableDB, MessageType } from '../../sql/Interface.std.js';
import { parsePartial } from '../../util/schemas.std.js';
} from '../../sql/migrations/89-call-history.node.ts';
import { getCallIdFromEra } from '../../util/callDisposition.preload.ts';
import { isValidUuid } from '../../util/isValidUuid.std.ts';
import { createDB, updateToVersion } from './helpers.node.ts';
import type { WritableDB, MessageType } from '../../sql/Interface.std.ts';
import { parsePartial } from '../../util/schemas.std.ts';
describe('SQL/updateToSchemaVersion89', () => {
let db: WritableDB;

View File

@@ -3,15 +3,15 @@
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import { sql } from '../../sql/util.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { sql } from '../../sql/util.std.ts';
import {
createDB,
updateToVersion,
insertData,
getTableData,
explain,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion90', () => {
let db: WritableDB;

View File

@@ -10,11 +10,11 @@ import {
getTableData,
insertData,
updateToVersion,
} from './helpers.node.js';
import type { ServiceIdString } from '../../types/ServiceId.std.js';
import { normalizePni } from '../../types/ServiceId.std.js';
import { normalizeAci } from '../../util/normalizeAci.std.js';
import type { WritableDB, PreKeyType } from '../../sql/Interface.std.js';
} from './helpers.node.ts';
import type { ServiceIdString } from '../../types/ServiceId.std.ts';
import { normalizePni } from '../../types/ServiceId.std.ts';
import { normalizeAci } from '../../util/normalizeAci.std.ts';
import type { WritableDB, PreKeyType } from '../../sql/Interface.std.ts';
const { range } = lodash;

View File

@@ -5,15 +5,15 @@ import { assert } from 'chai';
import { v4 as generateGuid } from 'uuid';
import lodash from 'lodash';
import { createDB, insertData, updateToVersion } from './helpers.node.js';
import type { ServiceIdString } from '../../types/ServiceId.std.js';
import { normalizePni } from '../../types/ServiceId.std.js';
import { normalizeAci } from '../../util/normalizeAci.std.js';
import { createDB, insertData, updateToVersion } from './helpers.node.ts';
import type { ServiceIdString } from '../../types/ServiceId.std.ts';
import { normalizePni } from '../../types/ServiceId.std.ts';
import { normalizeAci } from '../../util/normalizeAci.std.ts';
import type {
WritableDB,
KyberPreKeyType,
SignedPreKeyType,
} from '../../sql/Interface.std.js';
} from '../../sql/Interface.std.ts';
const { range } = lodash;

View File

@@ -4,13 +4,13 @@
import { assert } from 'chai';
import { v4 as generateGuid } from 'uuid';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
updateToVersion,
insertData,
getTableData,
} from './helpers.node.js';
} from './helpers.node.ts';
const CONVO_ID = generateGuid();
const OUR_ACI = generateGuid();

View File

@@ -3,13 +3,13 @@
import { assert } from 'chai';
import type { WritableDB } from '../../sql/Interface.std.js';
import type { WritableDB } from '../../sql/Interface.std.ts';
import {
createDB,
updateToVersion,
insertData,
getTableData,
} from './helpers.node.js';
} from './helpers.node.ts';
describe('SQL/updateToSchemaVersion990', () => {
let db: WritableDB;

View File

@@ -8,15 +8,15 @@ import {
_storyIdPredicate,
getJobsInQueue,
insertJob,
} from '../../sql/Server.node.js';
import type { WritableDB } from '../../sql/Interface.std.js';
import { ReadStatus } from '../../messages/MessageReadStatus.std.js';
import { SeenStatus } from '../../MessageSeenStatus.std.js';
import { objectToJSON, sql, sqlJoin } from '../../sql/util.std.js';
import { BodyRange } from '../../types/BodyRange.std.js';
import type { AciString } from '../../types/ServiceId.std.js';
import { generateAci } from '../../types/ServiceId.std.js';
import { createDB, updateToVersion, explain } from './helpers.node.js';
} from '../../sql/Server.node.ts';
import type { WritableDB } from '../../sql/Interface.std.ts';
import { ReadStatus } from '../../messages/MessageReadStatus.std.ts';
import { SeenStatus } from '../../MessageSeenStatus.std.ts';
import { objectToJSON, sql, sqlJoin } from '../../sql/util.std.ts';
import { BodyRange } from '../../types/BodyRange.std.ts';
import type { AciString } from '../../types/ServiceId.std.ts';
import { generateAci } from '../../types/ServiceId.std.ts';
import { createDB, updateToVersion, explain } from './helpers.node.ts';
const OUR_UUID = generateGuid();

View File

@@ -1,20 +1,20 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import assert from 'node:assert/strict';
import type { WritableDB } from '../../../sql/Interface.std.js';
import { setupTests } from '../../../sql/Server.node.js';
import type { WritableDB } from '../../../sql/Interface.std.ts';
import { setupTests } from '../../../sql/Server.node.ts';
import type { AppendPinnedMessageResult } from '../../../sql/server/pinnedMessages.std.ts';
import {
appendPinnedMessage,
deletePinnedMessageByMessageId,
getNextExpiringPinnedMessageAcrossConversations,
deleteAllExpiredPinnedMessagesBefore,
} from '../../../sql/server/pinnedMessages.std.js';
import { createDB, insertData } from '../helpers.node.js';
} from '../../../sql/server/pinnedMessages.std.ts';
import { createDB, insertData } from '../helpers.node.ts';
import type {
PinnedMessage,
PinnedMessageParams,
} from '../../../types/PinnedMessage.std.js';
} from '../../../types/PinnedMessage.std.ts';
function setupData(db: WritableDB) {
insertData(db, 'conversations', [{ id: 'c1' }, { id: 'c2' }]);