From 0fb1712d8d5533410c7b8066f8faa79ae643985e Mon Sep 17 00:00:00 2001 From: jkomyno <12381818+jkomyno@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:08:24 +0100 Subject: [PATCH] chore: fix conflicts --- .../executor/src/schema-engine-wasm.ts | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/libs/driver-adapters/executor/src/schema-engine-wasm.ts b/libs/driver-adapters/executor/src/schema-engine-wasm.ts index 143435fa9ee..572eaaf85d3 100644 --- a/libs/driver-adapters/executor/src/schema-engine-wasm.ts +++ b/libs/driver-adapters/executor/src/schema-engine-wasm.ts @@ -1,4 +1,3 @@ -<<<<<<< HEAD:libs/driver-adapters/executor/src/schema-engine-wasm.ts import fs from 'node:fs/promises' import path from 'node:path' import { __dirname, normaliseProvider } from './utils.js' @@ -22,30 +21,6 @@ export async function getSchemaEngineForProvider(provider: Queryable['provider'] ), ) -======= -import * as wasmPostgres from '../../../../schema-engine/schema-engine-wasm/pkg/postgresql/schema_engine_bg.js' -import * as wasmMysql from '../../../../schema-engine/schema-engine-wasm/pkg/mysql/schema_engine_bg.js' -import * as wasmSqlite from '../../../../schema-engine/schema-engine-wasm/pkg/sqlite/schema_engine_bg.js' -import fs from 'node:fs/promises' -import path from 'node:path' -import { __dirname } from './utils.js' - -const wasm = { - postgres: wasmPostgres, - mysql: wasmMysql, - sqlite: wasmSqlite -} - -type EngineName = keyof typeof wasm - -const initializedModules = new Set() - -export async function getSchemaEngineForProvider(provider: EngineName) { - const engine = wasm[provider] - if (!initializedModules.has(provider)) { - const subDir = provider === 'postgres' ? 'postgresql' : provider - const bytes = await fs.readFile(path.resolve(__dirname, '..', '..', '..', '..', 'schema-engine', 'schema-engine-wasm', 'pkg', subDir, 'schema_engine_bg.wasm')) ->>>>>>> main:query-engine/driver-adapters/executor/src/schema-engine-wasm.ts const module = new WebAssembly.Module(bytes) const instance = new WebAssembly.Instance(module, { './schema_engine_bg.js': engine }) engine.__wbg_set_wasm(instance.exports)