@sqlite.org/sqlite-wasm
Advanced tools
Comparing version 3.44.2-build2 to 3.44.2-build3
import fs from 'fs'; | ||
import fetch from 'node-fetch'; | ||
import * as cheerio from 'cheerio'; | ||
import decompress from 'decompress'; | ||
@@ -9,5 +8,12 @@ | ||
const html = await response.text(); | ||
const $ = cheerio.load(html); | ||
const fileName = $('a[name="wasm"]').closest('tr').next().find('a').text(); | ||
const sqliteWasmLink = `https://sqlite.org/${new Date().getFullYear()}/${fileName}`; | ||
const sqliteWasmLink = | ||
'https://sqlite.org/' + | ||
html | ||
.replace( | ||
/^.*?<!-- Download product data for scripts to read(.*?)-->.*?$/gms, | ||
'$1', | ||
) | ||
.split(/\n/) | ||
.filter((row) => /sqlite-wasm/.test(row))[0] | ||
.split(/,/)[2]; | ||
console.log(`Found SQLite Wasm download link: ${sqliteWasmLink}`); | ||
@@ -23,2 +29,7 @@ return sqliteWasmLink; | ||
const response = await fetch(sqliteWasmDownloadLink); | ||
if (!response.ok || response.status !== 200) { | ||
throw new Error( | ||
`Unable to download SQLite Wasm from ${sqliteWasmDownloadLink}`, | ||
); | ||
} | ||
const buffer = await response.arrayBuffer(); | ||
@@ -40,5 +51,5 @@ fs.writeFileSync('sqlite-wasm.zip', Buffer.from(buffer)); | ||
async function main() { | ||
const sqliteWasmLink = await getSqliteWasmDownloadLink(); | ||
await downloadAndUnzipSqliteWasm(sqliteWasmLink); | ||
try { | ||
const sqliteWasmLink = await getSqliteWasmDownloadLink(); | ||
await downloadAndUnzipSqliteWasm(sqliteWasmLink); | ||
fs.copyFileSync( | ||
@@ -45,0 +56,0 @@ './node_modules/module-workers-polyfill/module-workers-polyfill.min.js', |
{ | ||
"name": "@sqlite.org/sqlite-wasm", | ||
"version": "3.44.2-build2", | ||
"version": "3.44.2-build3", | ||
"description": "SQLite Wasm conveniently wrapped as an ES Module.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3113871
15
60316
7
28