-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set type to module * Add syncAllConversations * camelCase GroupMetadata fields * Add smart contract wallet support * Run cargo update * Prepare release * Add constructor for LogOptions * Add @sqlite.org/sqlite-wasm dependency * Add copy script * Update CHANGELOG
- Loading branch information
Showing
9 changed files
with
180 additions
and
44 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { readdirSync, existsSync, copyFileSync } from "node:fs"; | ||
import { dirname, join } from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)); | ||
const distDir = join(__dirname, "..", "dist"); | ||
|
||
const files = readdirSync(distDir, { recursive: true }); | ||
|
||
let targetDir = ""; | ||
files.some((file) => { | ||
if (file.endsWith("sqlite3-diesel.js")) { | ||
targetDir = join(distDir, dirname(file)); | ||
return true; | ||
} | ||
}); | ||
|
||
if (!targetDir) { | ||
console.error("Unable to find target directory for `sqlite3.wasm`"); | ||
process.exit(1); | ||
} | ||
|
||
const nodeModules = join(__dirname, "..", "node_modules"); | ||
const sourceFile = join( | ||
nodeModules, | ||
"@sqlite.org", | ||
"sqlite-wasm", | ||
"sqlite-wasm", | ||
"jswasm", | ||
"sqlite3.wasm" | ||
); | ||
|
||
if (!existsSync(sourceFile)) { | ||
console.error(`Unable to find "sqlite3.wasm" in "${dirname(sourceFile)}"`); | ||
process.exit(1); | ||
} | ||
|
||
console.log(`Copying "sqlite3.wasm" to "${targetDir}"`); | ||
copyFileSync(sourceFile, join(targetDir, "sqlite3.wasm")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.