From 7c0bf9c86b451304ceb2d714affdd1ce0325ba94 Mon Sep 17 00:00:00 2001 From: Leo Singer Date: Sun, 26 Nov 2023 20:12:41 -0500 Subject: [PATCH] Rename class LocalOpenSearch to LocalSearch We're going to support either Elasticsearch or OpenSearch in sandbox mode. Rename the class to reflect that. --- index.ts | 4 ++-- run.ts | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/index.ts b/index.ts index 21e6043..ef4e0e9 100644 --- a/index.ts +++ b/index.ts @@ -7,7 +7,7 @@ */ import { launch } from './run.js' -import type { LocalOpenSearch } from './run.js' +import type { LocalSearch } from './run.js' import { populate } from './data.js' import { cloudformationResources as serverlessCloudformationResources, @@ -58,7 +58,7 @@ export const deploy = { }, } -let local: LocalOpenSearch +let local: LocalSearch export const sandbox = { async start({ diff --git a/run.ts b/run.ts index dec69e2..075e233 100644 --- a/run.ts +++ b/run.ts @@ -21,7 +21,7 @@ import { import { pipeline } from 'stream/promises' import { createReadStream } from 'fs' -export class LocalOpenSearch { +export class LocalSearch { private readonly child!: ChildProcess private readonly tempDir!: string readonly port!: number @@ -93,8 +93,6 @@ export class LocalOpenSearch { } } -export async function launch( - ...args: Parameters -) { - return await LocalOpenSearch.launch(...args) +export async function launch(...args: Parameters) { + return await LocalSearch.launch(...args) }