update deps (MisskeyIO#978)
This commit is contained in:
parent
fb1f093ae5
commit
e0e4ea0c0c
13 changed files with 1484 additions and 1567 deletions
|
@ -56,7 +56,7 @@
|
||||||
"esbuild": "0.25.2",
|
"esbuild": "0.25.2",
|
||||||
"jpeg-js": "0.4.4",
|
"jpeg-js": "0.4.4",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"sharp": "0.33.5",
|
"sharp": "0.34.1",
|
||||||
"tough-cookie": "5.1.2",
|
"tough-cookie": "5.1.2",
|
||||||
"web-streams-polyfill": "4.1.0"
|
"web-streams-polyfill": "4.1.0"
|
||||||
},
|
},
|
||||||
|
@ -66,14 +66,14 @@
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"postcss": "8.5.3",
|
"postcss": "8.5.3",
|
||||||
"terser": "5.39.0",
|
"terser": "5.39.0",
|
||||||
"typescript": "5.8.2"
|
"typescript": "5.8.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "22.13.14",
|
"@types/node": "22.14.1",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "14.2.1",
|
"cypress": "14.3.1",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"ncp": "2.0.0",
|
"ncp": "2.0.0",
|
||||||
"start-server-and-test": "2.0.11"
|
"start-server-and-test": "2.0.11"
|
||||||
|
|
|
@ -33,16 +33,16 @@
|
||||||
"generate-api-json": "pnpm build && node ./scripts/generate_api_json.js"
|
"generate-api-json": "pnpm build && node ./scripts/generate_api_json.js"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@swc/core-darwin-arm64": "1.11.13",
|
"@swc/core-darwin-arm64": "1.11.21",
|
||||||
"@swc/core-darwin-x64": "1.11.13",
|
"@swc/core-darwin-x64": "1.11.21",
|
||||||
"@swc/core-linux-arm-gnueabihf": "1.11.13",
|
"@swc/core-linux-arm-gnueabihf": "1.11.21",
|
||||||
"@swc/core-linux-arm64-gnu": "1.11.13",
|
"@swc/core-linux-arm64-gnu": "1.11.21",
|
||||||
"@swc/core-linux-arm64-musl": "1.11.13",
|
"@swc/core-linux-arm64-musl": "1.11.21",
|
||||||
"@swc/core-linux-x64-gnu": "1.11.13",
|
"@swc/core-linux-x64-gnu": "1.11.21",
|
||||||
"@swc/core-linux-x64-musl": "1.11.13",
|
"@swc/core-linux-x64-musl": "1.11.21",
|
||||||
"@swc/core-win32-arm64-msvc": "1.11.13",
|
"@swc/core-win32-arm64-msvc": "1.11.21",
|
||||||
"@swc/core-win32-ia32-msvc": "1.11.13",
|
"@swc/core-win32-ia32-msvc": "1.11.21",
|
||||||
"@swc/core-win32-x64-msvc": "1.11.13",
|
"@swc/core-win32-x64-msvc": "1.11.21",
|
||||||
"@tensorflow/tfjs": "4.22.0",
|
"@tensorflow/tfjs": "4.22.0",
|
||||||
"@tensorflow/tfjs-node": "4.22.0",
|
"@tensorflow/tfjs-node": "4.22.0",
|
||||||
"bufferutil": "4.0.9",
|
"bufferutil": "4.0.9",
|
||||||
|
@ -63,13 +63,12 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@authenio/samlify-node-xmllint": "2.0.0",
|
"@authenio/samlify-node-xmllint": "2.0.0",
|
||||||
"@aws-sdk/client-s3": "3.779.0",
|
"@aws-sdk/client-s3": "3.787.0",
|
||||||
"@aws-sdk/lib-storage": "3.779.0",
|
"@aws-sdk/lib-storage": "3.787.0",
|
||||||
"@bull-board/api": "6.7.10",
|
"@bull-board/api": "6.9.2",
|
||||||
"@bull-board/fastify": "6.7.10",
|
"@bull-board/fastify": "6.9.2",
|
||||||
"@bull-board/ui": "6.7.10",
|
"@bull-board/ui": "6.9.2",
|
||||||
"@discordapp/twemoji": "15.1.0",
|
"@discordapp/twemoji": "15.1.0",
|
||||||
"@elastic/elasticsearch": "8.17.1",
|
|
||||||
"@fastify/accepts": "5.0.2",
|
"@fastify/accepts": "5.0.2",
|
||||||
"@fastify/cookie": "11.0.2",
|
"@fastify/cookie": "11.0.2",
|
||||||
"@fastify/cors": "11.0.1",
|
"@fastify/cors": "11.0.1",
|
||||||
|
@ -80,19 +79,20 @@
|
||||||
"@fastify/static": "8.1.1",
|
"@fastify/static": "8.1.1",
|
||||||
"@fastify/view": "11.0.0",
|
"@fastify/view": "11.0.0",
|
||||||
"@instana/collector": "4.10.0",
|
"@instana/collector": "4.10.0",
|
||||||
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
"@misskey-dev/sharp-read-bmp": "1.3.0",
|
||||||
"@misskey-dev/summaly": "github:MisskeyIO/summaly#5.1.3",
|
"@misskey-dev/summaly": "github:MisskeyIO/summaly#5.1.3",
|
||||||
"@napi-rs/canvas": "0.1.68",
|
"@napi-rs/canvas": "0.1.69",
|
||||||
"@nestjs/common": "11.0.12",
|
"@nestjs/common": "11.0.20",
|
||||||
"@nestjs/core": "11.0.12",
|
"@nestjs/core": "11.0.20",
|
||||||
"@nestjs/testing": "11.0.12",
|
"@nestjs/testing": "11.0.20",
|
||||||
|
"@opensearch-project/opensearch": "3.5.1",
|
||||||
"@peertube/http-signature": "1.7.0",
|
"@peertube/http-signature": "1.7.0",
|
||||||
"@simplewebauthn/server": "13.1.1",
|
"@simplewebauthn/server": "13.1.1",
|
||||||
"@sinonjs/fake-timers": "11.3.1",
|
"@sinonjs/fake-timers": "11.3.1",
|
||||||
"@smithy/node-http-handler": "4.0.4",
|
"@smithy/node-http-handler": "4.0.4",
|
||||||
"@swc/cli": "0.6.0",
|
"@swc/cli": "0.7.3",
|
||||||
"@swc/core": "1.11.13",
|
"@swc/core": "1.11.21",
|
||||||
"@twemoji/parser": "15.1.1",
|
"@twemoji/parser": "16.0.0",
|
||||||
"accepts": "1.3.8",
|
"accepts": "1.3.8",
|
||||||
"ajv": "8.17.1",
|
"ajv": "8.17.1",
|
||||||
"archiver": "7.0.1",
|
"archiver": "7.0.1",
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
"bcryptjs": "3.0.2",
|
"bcryptjs": "3.0.2",
|
||||||
"blurhash": "2.0.5",
|
"blurhash": "2.0.5",
|
||||||
"body-parser": "2.2.0",
|
"body-parser": "2.2.0",
|
||||||
"bullmq": "5.45.2",
|
"bullmq": "5.49.2",
|
||||||
"cacheable-lookup": "7.0.0",
|
"cacheable-lookup": "7.0.0",
|
||||||
"cbor": "10.0.3",
|
"cbor": "10.0.3",
|
||||||
"chalk": "5.4.1",
|
"chalk": "5.4.1",
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
"content-disposition": "0.5.4",
|
"content-disposition": "0.5.4",
|
||||||
"date-fns": "4.1.0",
|
"date-fns": "4.1.0",
|
||||||
"deep-email-validator": "0.1.21",
|
"deep-email-validator": "0.1.21",
|
||||||
"fastify": "5.2.2",
|
"fastify": "5.3.2",
|
||||||
"fastify-http-errors-enhanced": "6.0.1",
|
"fastify-http-errors-enhanced": "6.0.1",
|
||||||
"fastify-raw-body": "5.0.0",
|
"fastify-raw-body": "5.0.0",
|
||||||
"feed": "4.2.2",
|
"feed": "4.2.2",
|
||||||
|
@ -122,17 +122,17 @@
|
||||||
"hpagent": "1.2.0",
|
"hpagent": "1.2.0",
|
||||||
"htmlescape": "1.1.1",
|
"htmlescape": "1.1.1",
|
||||||
"http-link-header": "1.1.3",
|
"http-link-header": "1.1.3",
|
||||||
"ioredis": "5.6.0",
|
"ioredis": "5.6.1",
|
||||||
"ip-cidr": "4.0.2",
|
"ip-cidr": "4.0.2",
|
||||||
"ipaddr.js": "2.2.0",
|
"ipaddr.js": "2.2.0",
|
||||||
"is-svg": "5.1.0",
|
"is-svg": "5.1.0",
|
||||||
"jose": "6.0.10",
|
"jose": "6.0.10",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"jsdom": "26.0.0",
|
"jsdom": "26.1.0",
|
||||||
"json5": "2.2.3",
|
"json5": "2.2.3",
|
||||||
"jsonld": "8.3.3",
|
"jsonld": "8.3.3",
|
||||||
"jsrsasign": "11.1.0",
|
"jsrsasign": "11.1.0",
|
||||||
"meilisearch": "0.49.0",
|
"meilisearch": "0.50.0",
|
||||||
"mfm-js": "0.24.0",
|
"mfm-js": "0.24.0",
|
||||||
"microformats-parser": "2.0.2",
|
"microformats-parser": "2.0.2",
|
||||||
"mime-types": "3.0.1",
|
"mime-types": "3.0.1",
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
"nested-property": "4.0.0",
|
"nested-property": "4.0.0",
|
||||||
"node-fetch": "3.3.2",
|
"node-fetch": "3.3.2",
|
||||||
"node-forge": "1.3.1",
|
"node-forge": "1.3.1",
|
||||||
"nodemailer": "6.10.0",
|
"nodemailer": "6.10.1",
|
||||||
"nsfwjs": "4.2.0",
|
"nsfwjs": "4.2.0",
|
||||||
"oauth": "0.10.2",
|
"oauth": "0.10.2",
|
||||||
"oauth2orize": "1.12.0",
|
"oauth2orize": "1.12.0",
|
||||||
|
@ -169,19 +169,19 @@
|
||||||
"rss-parser": "3.13.0",
|
"rss-parser": "3.13.0",
|
||||||
"rxjs": "7.8.2",
|
"rxjs": "7.8.2",
|
||||||
"samlify": "2.9.1",
|
"samlify": "2.9.1",
|
||||||
"sanitize-html": "2.15.0",
|
"sanitize-html": "2.16.0",
|
||||||
"secure-json-parse": "4.0.0",
|
"secure-json-parse": "4.0.0",
|
||||||
"sharp": "0.33.5",
|
"sharp": "0.34.1",
|
||||||
"slacc": "0.0.10",
|
"slacc": "0.0.10",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
"stringz": "2.1.0",
|
"stringz": "2.1.0",
|
||||||
"systeminformation": "5.25.11",
|
"systeminformation": "5.25.11",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tmp": "0.2.3",
|
"tmp": "0.2.3",
|
||||||
"tsc-alias": "1.8.13",
|
"tsc-alias": "1.8.15",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"typeorm": "0.3.21",
|
"typeorm": "0.3.22",
|
||||||
"typescript": "5.8.2",
|
"typescript": "5.8.3",
|
||||||
"ulid": "3.0.0",
|
"ulid": "3.0.0",
|
||||||
"vary": "1.1.2",
|
"vary": "1.1.2",
|
||||||
"web-push": "3.6.7",
|
"web-push": "3.6.7",
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jest/globals": "29.7.0",
|
"@jest/globals": "29.7.0",
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@nestjs/platform-express": "11.0.12",
|
"@nestjs/platform-express": "11.0.20",
|
||||||
"@swc/jest": "0.2.37",
|
"@swc/jest": "0.2.37",
|
||||||
"@types/accepts": "1.3.7",
|
"@types/accepts": "1.3.7",
|
||||||
"@types/archiver": "6.0.3",
|
"@types/archiver": "6.0.3",
|
||||||
|
@ -209,13 +209,13 @@
|
||||||
"@types/jsrsasign": "10.5.15",
|
"@types/jsrsasign": "10.5.15",
|
||||||
"@types/mime-types": "2.1.4",
|
"@types/mime-types": "2.1.4",
|
||||||
"@types/ms": "2.1.0",
|
"@types/ms": "2.1.0",
|
||||||
"@types/node": "22.13.14",
|
"@types/node": "22.14.1",
|
||||||
"@types/node-forge": "1.3.11",
|
"@types/node-forge": "1.3.11",
|
||||||
"@types/nodemailer": "6.4.17",
|
"@types/nodemailer": "6.4.17",
|
||||||
"@types/oauth": "0.9.6",
|
"@types/oauth": "0.9.6",
|
||||||
"@types/oauth2orize": "1.11.5",
|
"@types/oauth2orize": "1.11.5",
|
||||||
"@types/oauth2orize-pkce": "0.1.2",
|
"@types/oauth2orize-pkce": "0.1.2",
|
||||||
"@types/pg": "8.11.11",
|
"@types/pg": "8.11.13",
|
||||||
"@types/psl": "1.1.3",
|
"@types/psl": "1.1.3",
|
||||||
"@types/pug": "2.0.10",
|
"@types/pug": "2.0.10",
|
||||||
"@types/punycode.js": "npm:@types/punycode@2.1.4",
|
"@types/punycode.js": "npm:@types/punycode@2.1.4",
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
"@types/tmp": "0.2.6",
|
"@types/tmp": "0.2.6",
|
||||||
"@types/vary": "1.1.3",
|
"@types/vary": "1.1.3",
|
||||||
"@types/web-push": "3.6.4",
|
"@types/web-push": "3.6.4",
|
||||||
"@types/ws": "8.18.0",
|
"@types/ws": "8.18.1",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"aws-sdk-client-mock": "4.1.0",
|
"aws-sdk-client-mock": "4.1.0",
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Global, Inject, Module } from '@nestjs/common';
|
||||||
import * as Redis from 'ioredis';
|
import * as Redis from 'ioredis';
|
||||||
import { DataSource } from 'typeorm';
|
import { DataSource } from 'typeorm';
|
||||||
import { MeiliSearch } from 'meilisearch';
|
import { MeiliSearch } from 'meilisearch';
|
||||||
import { Client as ElasticSearch } from '@elastic/elasticsearch';
|
import { Client as OpenSearch } from '@opensearch-project/opensearch';
|
||||||
import { DI } from './di-symbols.js';
|
import { DI } from './di-symbols.js';
|
||||||
import { Config, loadConfig } from './config.js';
|
import { Config, loadConfig } from './config.js';
|
||||||
import { createPostgresDataSource } from './postgres.js';
|
import { createPostgresDataSource } from './postgres.js';
|
||||||
|
@ -45,20 +45,20 @@ const $meilisearch: Provider = {
|
||||||
inject: [DI.config],
|
inject: [DI.config],
|
||||||
};
|
};
|
||||||
|
|
||||||
const $elasticsearch: Provider = {
|
const $opensearch: Provider = {
|
||||||
provide: DI.elasticsearch,
|
provide: DI.opensearch,
|
||||||
useFactory: (config: Config) => {
|
useFactory: (config: Config) => {
|
||||||
if (config.elasticsearch) {
|
if (config.opensearch) {
|
||||||
return new ElasticSearch({
|
return new OpenSearch({
|
||||||
nodes: {
|
nodes: {
|
||||||
url: new URL(`${config.elasticsearch.ssl ? 'https' : 'http'}://${config.elasticsearch.host}:${config.elasticsearch.port}`),
|
url: new URL(`${config.opensearch.ssl ? 'https' : 'http'}://${config.opensearch.host}:${config.opensearch.port}`),
|
||||||
ssl: {
|
ssl: {
|
||||||
rejectUnauthorized: config.elasticsearch.rejectUnauthorized,
|
rejectUnauthorized: config.opensearch.rejectUnauthorized,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
auth: (config.elasticsearch.user && config.elasticsearch.pass) ? {
|
auth: (config.opensearch.user && config.opensearch.pass) ? {
|
||||||
username: config.elasticsearch.user,
|
username: config.opensearch.user,
|
||||||
password: config.elasticsearch.pass,
|
password: config.opensearch.pass,
|
||||||
} : undefined,
|
} : undefined,
|
||||||
pingTimeout: 30000,
|
pingTimeout: 30000,
|
||||||
});
|
});
|
||||||
|
@ -185,8 +185,8 @@ const $redisForTimelines: Provider = {
|
||||||
@Global()
|
@Global()
|
||||||
@Module({
|
@Module({
|
||||||
imports: [RepositoryModule],
|
imports: [RepositoryModule],
|
||||||
providers: [$config, $db, $meilisearch, $elasticsearch, $redis, $redisForPub, $redisForSub, $redisForTimelines],
|
providers: [$config, $db, $meilisearch, $opensearch, $redis, $redisForPub, $redisForSub, $redisForTimelines],
|
||||||
exports: [$config, $db, $meilisearch, $elasticsearch, $redis, $redisForPub, $redisForSub, $redisForTimelines, RepositoryModule],
|
exports: [$config, $db, $meilisearch, $opensearch, $redis, $redisForPub, $redisForSub, $redisForTimelines, RepositoryModule],
|
||||||
})
|
})
|
||||||
export class GlobalModule implements OnApplicationShutdown {
|
export class GlobalModule implements OnApplicationShutdown {
|
||||||
constructor(
|
constructor(
|
||||||
|
|
|
@ -67,7 +67,7 @@ type Source = {
|
||||||
scope?: 'local' | 'global' | string[];
|
scope?: 'local' | 'global' | string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
elasticsearch?: {
|
opensearch?: {
|
||||||
host: string;
|
host: string;
|
||||||
port: string;
|
port: string;
|
||||||
user: string;
|
user: string;
|
||||||
|
@ -162,7 +162,7 @@ export type Config = {
|
||||||
index: string;
|
index: string;
|
||||||
scope?: 'local' | 'global' | string[];
|
scope?: 'local' | 'global' | string[];
|
||||||
} | undefined;
|
} | undefined;
|
||||||
elasticsearch: {
|
opensearch: {
|
||||||
host: string;
|
host: string;
|
||||||
port: string;
|
port: string;
|
||||||
user: string;
|
user: string;
|
||||||
|
@ -295,7 +295,7 @@ export function loadConfig(): Config {
|
||||||
dbReplications: config.dbReplications,
|
dbReplications: config.dbReplications,
|
||||||
dbSlaves: config.dbSlaves,
|
dbSlaves: config.dbSlaves,
|
||||||
meilisearch: config.meilisearch,
|
meilisearch: config.meilisearch,
|
||||||
elasticsearch: config.elasticsearch,
|
opensearch: config.opensearch,
|
||||||
redis,
|
redis,
|
||||||
redisForPubsub: config.redisForPubsub ? convertRedisOptions(config.redisForPubsub, host) : redis,
|
redisForPubsub: config.redisForPubsub ? convertRedisOptions(config.redisForPubsub, host) : redis,
|
||||||
redisForSystemQueue: config.redisForSystemQueue ? convertRedisOptions(config.redisForSystemQueue, host) : redisForJobQueue,
|
redisForSystemQueue: config.redisForSystemQueue ? convertRedisOptions(config.redisForSystemQueue, host) : redisForJobQueue,
|
||||||
|
|
|
@ -19,7 +19,7 @@ import { QueryService } from '@/core/QueryService.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
import type Logger from '@/logger.js';
|
import type Logger from '@/logger.js';
|
||||||
import type { Index, MeiliSearch } from 'meilisearch';
|
import type { Index, MeiliSearch } from 'meilisearch';
|
||||||
import type { Client as ElasticSearch } from '@elastic/elasticsearch';
|
import type { Client as OpenSearch } from '@opensearch-project/opensearch';
|
||||||
|
|
||||||
type K = string;
|
type K = string;
|
||||||
type V = string | number | boolean;
|
type V = string | number | boolean;
|
||||||
|
@ -68,8 +68,8 @@ function compileQuery(q: Q): string {
|
||||||
export class SearchService {
|
export class SearchService {
|
||||||
private readonly meilisearchIndexScope: 'local' | 'global' | string[] = 'local';
|
private readonly meilisearchIndexScope: 'local' | 'global' | string[] = 'local';
|
||||||
private meilisearchNoteIndex: Index | null = null;
|
private meilisearchNoteIndex: Index | null = null;
|
||||||
private readonly elasticsearchNoteIndex: string;
|
private readonly opensearchNoteIndex: string;
|
||||||
private readonly elasticsearchIdField: string;
|
private readonly opensearchIdField: string;
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -79,8 +79,8 @@ export class SearchService {
|
||||||
@Inject(DI.meilisearch)
|
@Inject(DI.meilisearch)
|
||||||
private meilisearch: MeiliSearch | null,
|
private meilisearch: MeiliSearch | null,
|
||||||
|
|
||||||
@Inject(DI.elasticsearch)
|
@Inject(DI.opensearch)
|
||||||
private elasticsearch: ElasticSearch | null,
|
private opensearch: OpenSearch | null,
|
||||||
|
|
||||||
@Inject(DI.notesRepository)
|
@Inject(DI.notesRepository)
|
||||||
private notesRepository: NotesRepository,
|
private notesRepository: NotesRepository,
|
||||||
|
@ -119,17 +119,17 @@ export class SearchService {
|
||||||
maxTotalHits: 10000,
|
maxTotalHits: 10000,
|
||||||
},
|
},
|
||||||
});*/
|
});*/
|
||||||
} else if (this.elasticsearch) {
|
} else if (this.opensearch) {
|
||||||
this.elasticsearchNoteIndex = `${config.elasticsearch!.index}`;
|
this.opensearchNoteIndex = `${config.opensearch!.index}`;
|
||||||
this.elasticsearchIdField = `${config.host}_id`;
|
this.opensearchIdField = `${config.host}_id`;
|
||||||
/* 外部からindexさせるのでこの処理は不要
|
/* 外部からindexさせるのでこの処理は不要
|
||||||
this.elasticsearch.indices.exists({
|
this.opensearch.indices.exists({
|
||||||
index: this.elasticsearchNoteIndex,
|
index: this.opensearchNoteIndex,
|
||||||
}).then((indexExists) => {
|
}).then((indexExists) => {
|
||||||
if (!indexExists) {
|
if (!indexExists) {
|
||||||
this.elasticsearch?.indices.create(
|
this.opensearch?.indices.create(
|
||||||
{
|
{
|
||||||
index: this.elasticsearchNoteIndex + `-${new Date().toISOString().slice(0, 7).replace(/-/g, '')}`,
|
index: this.opensearchNoteIndex + `-${new Date().toISOString().slice(0, 7).replace(/-/g, '')}`,
|
||||||
mappings: {
|
mappings: {
|
||||||
properties: {
|
properties: {
|
||||||
text: { type: 'text' },
|
text: { type: 'text' },
|
||||||
|
@ -205,7 +205,7 @@ export class SearchService {
|
||||||
}], {
|
}], {
|
||||||
primaryKey: 'id',
|
primaryKey: 'id',
|
||||||
});
|
});
|
||||||
} else if (this.elasticsearch) {
|
} else if (this.opensearch) {
|
||||||
/* 外部からindexさせるのでこの処理は不要
|
/* 外部からindexさせるのでこの処理は不要
|
||||||
const body = {
|
const body = {
|
||||||
createdAt: createdAt.getTime(),
|
createdAt: createdAt.getTime(),
|
||||||
|
@ -216,8 +216,8 @@ export class SearchService {
|
||||||
text: note.text,
|
text: note.text,
|
||||||
tags: note.tags,
|
tags: note.tags,
|
||||||
};
|
};
|
||||||
await this.elasticsearch.index({
|
await this.opensearch.index({
|
||||||
index: `${this.elasticsearchNoteIndex}-${createdAt.toISOString().slice(0, 7).replace(/-/g, '')}`,
|
index: `${this.opensearchNoteIndex}-${createdAt.toISOString().slice(0, 7).replace(/-/g, '')}`,
|
||||||
id: note.id,
|
id: note.id,
|
||||||
body: body,
|
body: body,
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
@ -233,10 +233,10 @@ export class SearchService {
|
||||||
|
|
||||||
if (this.meilisearch) {
|
if (this.meilisearch) {
|
||||||
this.meilisearchNoteIndex!.deleteDocument(note.id);
|
this.meilisearchNoteIndex!.deleteDocument(note.id);
|
||||||
} else if (this.elasticsearch) {
|
} else if (this.opensearch) {
|
||||||
/* 外部からindexさせるのでこの処理は不要
|
/* 外部からindexさせるのでこの処理は不要
|
||||||
await this.elasticsearch.delete({
|
await this.opensearch.delete({
|
||||||
index: `${this.elasticsearchNoteIndex}-${this.idService.parse(note.id).date.toISOString().slice(0, 7).replace(/-/g, '')}`,
|
index: `${this.opensearchNoteIndex}-${this.idService.parse(note.id).date.toISOString().slice(0, 7).replace(/-/g, '')}`,
|
||||||
id: note.id,
|
id: note.id,
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.logger.error(error);
|
this.logger.error(error);
|
||||||
|
@ -294,7 +294,7 @@ export class SearchService {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
return notes.sort((a, b) => a.id > b.id ? -1 : 1);
|
return notes.sort((a, b) => a.id > b.id ? -1 : 1);
|
||||||
} else if (this.elasticsearch) {
|
} else if (this.opensearch) {
|
||||||
const esFilter: any = {
|
const esFilter: any = {
|
||||||
bool: {
|
bool: {
|
||||||
must: [],
|
must: [],
|
||||||
|
@ -325,17 +325,19 @@ export class SearchService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await (this.elasticsearch.search)({
|
const res = await (this.opensearch.search)({
|
||||||
index: this.elasticsearchNoteIndex + '*' as string,
|
index: this.opensearchNoteIndex + '*' as string,
|
||||||
query: esFilter,
|
body: {
|
||||||
sort: [{ createdAt: { order: 'desc' } }],
|
query: esFilter,
|
||||||
_source: ['id', 'createdAt', this.elasticsearchIdField],
|
sort: [{ createdAt: { order: 'desc' } }],
|
||||||
size: pagination.limit,
|
_source: ['id', 'createdAt', this.opensearchIdField],
|
||||||
|
size: pagination.limit,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const noteIds = res.hits.hits.map((hit) => {
|
const noteIds = res.body.hits.hits.map((hit) => {
|
||||||
const source = hit._source as Record<string, unknown>;
|
const source = hit._source as Record<string, unknown>;
|
||||||
return (source[this.elasticsearchIdField] as string) || null;
|
return (source[this.opensearchIdField] as string) || null;
|
||||||
}).filter((id): id is string => id !== null);
|
}).filter((id): id is string => id !== null);
|
||||||
if (noteIds.length === 0) return [];
|
if (noteIds.length === 0) return [];
|
||||||
const [
|
const [
|
||||||
|
|
|
@ -7,7 +7,7 @@ export const DI = {
|
||||||
config: Symbol('config'),
|
config: Symbol('config'),
|
||||||
db: Symbol('db'),
|
db: Symbol('db'),
|
||||||
meilisearch: Symbol('meilisearch'),
|
meilisearch: Symbol('meilisearch'),
|
||||||
elasticsearch: Symbol('elasticsearch'),
|
opensearch: Symbol('opensearch'),
|
||||||
redis: Symbol('redis'),
|
redis: Symbol('redis'),
|
||||||
redisForPub: Symbol('redisForPub'),
|
redisForPub: Symbol('redisForPub'),
|
||||||
redisForSub: Symbol('redisForSub'),
|
redisForSub: Symbol('redisForSub'),
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"@rollup/pluginutils": "5.1.4",
|
"@rollup/pluginutils": "5.1.4",
|
||||||
"@syuilo/aiscript": "0.19.0",
|
"@syuilo/aiscript": "0.19.0",
|
||||||
"@tabler/icons-webfont": "3.31.0",
|
"@tabler/icons-webfont": "3.31.0",
|
||||||
"@twemoji/parser": "15.1.1",
|
"@twemoji/parser": "16.0.0",
|
||||||
"@vitejs/plugin-vue": "5.2.3",
|
"@vitejs/plugin-vue": "5.2.3",
|
||||||
"@vue/compiler-sfc": "3.5.13",
|
"@vue/compiler-sfc": "3.5.13",
|
||||||
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.15",
|
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.15",
|
||||||
|
@ -35,12 +35,12 @@
|
||||||
"broadcast-channel": "7.1.0",
|
"broadcast-channel": "7.1.0",
|
||||||
"buraha": "0.0.1",
|
"buraha": "0.0.1",
|
||||||
"canvas-confetti": "1.9.3",
|
"canvas-confetti": "1.9.3",
|
||||||
"chart.js": "4.4.8",
|
"chart.js": "4.4.9",
|
||||||
"chartjs-adapter-date-fns": "3.0.0",
|
"chartjs-adapter-date-fns": "3.0.0",
|
||||||
"chartjs-chart-matrix": "3.0.0",
|
"chartjs-chart-matrix": "3.0.0",
|
||||||
"chartjs-plugin-gradient": "0.6.1",
|
"chartjs-plugin-gradient": "0.6.1",
|
||||||
"chartjs-plugin-zoom": "2.2.0",
|
"chartjs-plugin-zoom": "2.2.0",
|
||||||
"chromatic": "11.27.0",
|
"chromatic": "11.28.2",
|
||||||
"compare-versions": "6.1.1",
|
"compare-versions": "6.1.1",
|
||||||
"cropperjs": "2.0.0",
|
"cropperjs": "2.0.0",
|
||||||
"date-fns": "4.1.0",
|
"date-fns": "4.1.0",
|
||||||
|
@ -58,66 +58,66 @@
|
||||||
"misskey-reversi": "workspace:*",
|
"misskey-reversi": "workspace:*",
|
||||||
"photoswipe": "5.4.4",
|
"photoswipe": "5.4.4",
|
||||||
"punycode.js": "2.3.1",
|
"punycode.js": "2.3.1",
|
||||||
"rollup": "4.38.0",
|
"rollup": "4.40.0",
|
||||||
"sanitize-html": "2.15.0",
|
"sanitize-html": "2.16.0",
|
||||||
"sass": "1.86.0",
|
"sass": "1.86.3",
|
||||||
"shiki": "3.2.1",
|
"shiki": "3.2.2",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
"textarea-caret": "3.1.0",
|
"textarea-caret": "3.1.0",
|
||||||
"three": "0.175.0",
|
"three": "0.175.0",
|
||||||
"throttle-debounce": "5.0.2",
|
"throttle-debounce": "5.0.2",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tsc-alias": "1.8.13",
|
"tsc-alias": "1.8.15",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"typescript": "5.8.2",
|
"typescript": "5.8.3",
|
||||||
"uuid": "11.1.0",
|
"uuid": "11.1.0",
|
||||||
"v-code-diff": "1.13.1",
|
"v-code-diff": "1.13.1",
|
||||||
"vite": "6.2.4",
|
"vite": "6.3.2",
|
||||||
"vue": "3.5.13",
|
"vue": "3.5.13",
|
||||||
"vue-gtag": "3.2.0",
|
"vue-gtag": "3.3.0",
|
||||||
"vuedraggable": "next",
|
"vuedraggable": "next",
|
||||||
"webgl-audiovisualizer": "github:tar-bin/webgl-audiovisualizer"
|
"webgl-audiovisualizer": "github:tar-bin/webgl-audiovisualizer"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@misskey-dev/summaly": "github:MisskeyIO/summaly#5.1.3",
|
"@misskey-dev/summaly": "github:MisskeyIO/summaly#5.1.3",
|
||||||
"@storybook/addon-actions": "8.6.11",
|
"@storybook/addon-actions": "8.6.12",
|
||||||
"@storybook/addon-essentials": "8.6.11",
|
"@storybook/addon-essentials": "8.6.12",
|
||||||
"@storybook/addon-interactions": "8.6.11",
|
"@storybook/addon-interactions": "8.6.12",
|
||||||
"@storybook/addon-links": "8.6.11",
|
"@storybook/addon-links": "8.6.12",
|
||||||
"@storybook/addon-mdx-gfm": "8.6.11",
|
"@storybook/addon-mdx-gfm": "8.6.12",
|
||||||
"@storybook/addon-storysource": "8.6.11",
|
"@storybook/addon-storysource": "8.6.12",
|
||||||
"@storybook/blocks": "8.6.11",
|
"@storybook/blocks": "8.6.12",
|
||||||
"@storybook/components": "8.6.11",
|
"@storybook/components": "8.6.12",
|
||||||
"@storybook/core-events": "8.6.11",
|
"@storybook/core-events": "8.6.12",
|
||||||
"@storybook/manager-api": "8.6.11",
|
"@storybook/manager-api": "8.6.12",
|
||||||
"@storybook/preview-api": "8.6.11",
|
"@storybook/preview-api": "8.6.12",
|
||||||
"@storybook/react": "8.6.11",
|
"@storybook/react": "8.6.12",
|
||||||
"@storybook/react-vite": "8.6.11",
|
"@storybook/react-vite": "8.6.12",
|
||||||
"@storybook/test": "8.6.11",
|
"@storybook/test": "8.6.12",
|
||||||
"@storybook/theming": "8.6.11",
|
"@storybook/theming": "8.6.12",
|
||||||
"@storybook/types": "8.6.11",
|
"@storybook/types": "8.6.12",
|
||||||
"@storybook/vue3": "8.6.11",
|
"@storybook/vue3": "8.6.12",
|
||||||
"@storybook/vue3-vite": "8.6.11",
|
"@storybook/vue3-vite": "8.6.12",
|
||||||
"@testing-library/vue": "8.1.0",
|
"@testing-library/vue": "8.1.0",
|
||||||
"@types/escape-regexp": "0.0.3",
|
"@types/escape-regexp": "0.0.3",
|
||||||
"@types/estree": "1.0.7",
|
"@types/estree": "1.0.7",
|
||||||
"@types/matter-js": "0.19.8",
|
"@types/matter-js": "0.19.8",
|
||||||
"@types/micromatch": "4.0.9",
|
"@types/micromatch": "4.0.9",
|
||||||
"@types/node": "22.13.14",
|
"@types/node": "22.14.1",
|
||||||
"@types/punycode.js": "npm:@types/punycode@2.1.4",
|
"@types/punycode.js": "npm:@types/punycode@2.1.4",
|
||||||
"@types/sanitize-html": "2.15.0",
|
"@types/sanitize-html": "2.15.0",
|
||||||
"@types/three": "0.175.0",
|
"@types/three": "0.175.0",
|
||||||
"@types/throttle-debounce": "5.0.2",
|
"@types/throttle-debounce": "5.0.2",
|
||||||
"@types/tinycolor2": "1.4.6",
|
"@types/tinycolor2": "1.4.6",
|
||||||
"@types/ws": "8.18.0",
|
"@types/ws": "8.18.1",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"@vitest/coverage-v8": "3.1.1",
|
"@vitest/coverage-v8": "3.1.2",
|
||||||
"@vue/runtime-core": "3.5.13",
|
"@vue/runtime-core": "3.5.13",
|
||||||
"acorn": "8.14.1",
|
"acorn": "8.14.1",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "14.2.1",
|
"cypress": "14.3.1",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"eslint-plugin-import": "2.31.0",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"eslint-plugin-vue": "9.32.0",
|
"eslint-plugin-vue": "9.32.0",
|
||||||
|
@ -125,17 +125,17 @@
|
||||||
"happy-dom": "17.4.4",
|
"happy-dom": "17.4.4",
|
||||||
"intersection-observer": "0.12.2",
|
"intersection-observer": "0.12.2",
|
||||||
"micromatch": "4.0.8",
|
"micromatch": "4.0.8",
|
||||||
"msw": "2.7.3",
|
"msw": "2.7.5",
|
||||||
"msw-storybook-addon": "2.0.4",
|
"msw-storybook-addon": "2.0.4",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"prettier": "3.5.3",
|
"prettier": "3.5.3",
|
||||||
"react": "19.1.0",
|
"react": "19.1.0",
|
||||||
"react-dom": "19.1.0",
|
"react-dom": "19.1.0",
|
||||||
"start-server-and-test": "2.0.11",
|
"start-server-and-test": "2.0.11",
|
||||||
"storybook": "8.6.11",
|
"storybook": "8.6.12",
|
||||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||||
"vite-plugin-turbosnap": "1.0.3",
|
"vite-plugin-turbosnap": "1.0.3",
|
||||||
"vitest": "3.1.1",
|
"vitest": "3.1.2",
|
||||||
"vitest-fetch-mock": "0.3.0",
|
"vitest-fetch-mock": "0.3.0",
|
||||||
"vue-component-type-helpers": "2.2.8",
|
"vue-component-type-helpers": "2.2.8",
|
||||||
"vue-eslint-parser": "9.4.3",
|
"vue-eslint-parser": "9.4.3",
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@types/matter-js": "0.19.8",
|
"@types/matter-js": "0.19.8",
|
||||||
"@types/node": "22.13.14",
|
"@types/node": "22.14.1",
|
||||||
"@types/seedrandom": "3.0.8",
|
"@types/seedrandom": "3.0.8",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"typescript": "5.8.2"
|
"typescript": "5.8.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"built"
|
"built"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@readme/openapi-parser": "3.0.1",
|
"@readme/openapi-parser": "3.0.1",
|
||||||
"@types/node": "22.13.14",
|
"@types/node": "22.14.1",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
"openapi-typescript": "6.7.6",
|
"openapi-typescript": "6.7.6",
|
||||||
"ts-case-convert": "2.1.0",
|
"ts-case-convert": "2.1.0",
|
||||||
"tsx": "4.19.3",
|
"tsx": "4.19.3",
|
||||||
"typescript": "5.8.2"
|
"typescript": "5.8.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"built"
|
"built"
|
||||||
|
|
|
@ -35,11 +35,11 @@
|
||||||
"url": "git+https://github.com/misskey-dev/misskey.js.git"
|
"url": "git+https://github.com/misskey-dev/misskey.js.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@microsoft/api-extractor": "7.52.2",
|
"@microsoft/api-extractor": "7.52.4",
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@swc/jest": "0.2.37",
|
"@swc/jest": "0.2.37",
|
||||||
"@types/jest": "29.5.14",
|
"@types/jest": "29.5.14",
|
||||||
"@types/node": "22.13.14",
|
"@types/node": "22.14.1",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
|
@ -49,8 +49,8 @@
|
||||||
"mock-socket": "9.3.1",
|
"mock-socket": "9.3.1",
|
||||||
"ncp": "2.0.0",
|
"ncp": "2.0.0",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"tsd": "0.31.2",
|
"tsd": "0.32.0",
|
||||||
"typescript": "5.8.2"
|
"typescript": "5.8.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"built",
|
"built",
|
||||||
|
@ -58,8 +58,8 @@
|
||||||
"built/dts"
|
"built/dts"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@swc/cli": "0.6.0",
|
"@swc/cli": "0.7.3",
|
||||||
"@swc/core": "1.11.13",
|
"@swc/core": "1.11.21",
|
||||||
"eventemitter3": "5.0.1",
|
"eventemitter3": "5.0.1",
|
||||||
"reconnecting-websocket": "4.4.0"
|
"reconnecting-websocket": "4.4.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,12 +25,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@types/node": "22.13.14",
|
"@types/node": "22.14.1",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"typescript": "5.8.2"
|
"typescript": "5.8.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"crc-32": "1.2.2",
|
"crc-32": "1.2.2",
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@types/serviceworker": "0.0.127",
|
"@types/serviceworker": "0.0.131",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"eslint-plugin-import": "2.31.0",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"nodemon": "3.1.9",
|
"nodemon": "3.1.9",
|
||||||
"typescript": "5.8.2"
|
"typescript": "5.8.3"
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
|
2777
pnpm-lock.yaml
generated
2777
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue