@duckdb/duckdb-wasm-shell
Advanced tools
Comparing version 1.13.1-dev20.0 to 1.13.1-dev24.0
@@ -1,1 +0,1 @@ | ||
export * from './types/shell'; | ||
export * from './types/src/index'; |
@@ -10,2 +10,103 @@ (() => { | ||
// package.json | ||
var name = "@duckdb/duckdb-wasm-shell"; | ||
var version = "1.13.1-dev24.0"; | ||
var description = ""; | ||
var author = "Andre Kohn <kohn.a@outlook.com>"; | ||
var license = "MPL-2.0"; | ||
var repository = { | ||
type: "git", | ||
url: "https://github.com/duckdb/duckdb-wasm.git" | ||
}; | ||
var keywords = [ | ||
"sql", | ||
"duckdb", | ||
"relational", | ||
"database", | ||
"data", | ||
"query", | ||
"wasm", | ||
"analytics", | ||
"olap", | ||
"arrow", | ||
"parquet", | ||
"json", | ||
"csv" | ||
]; | ||
var dependencies = { | ||
"@duckdb/duckdb-wasm": "^1.13.1-dev24.0", | ||
xterm: "^4.16.0", | ||
"xterm-addon-fit": "^0.5.0", | ||
"xterm-addon-web-links": "^0.5.0", | ||
"xterm-addon-webgl": "^0.11.4" | ||
}; | ||
var devDependencies = { | ||
esbuild: "^0.14.11", | ||
eslint: "^8.6.0", | ||
"eslint-plugin-jasmine": "^4.1.3", | ||
"eslint-plugin-react": "^7.28.0", | ||
jasmine: "^4.0.2", | ||
"jasmine-core": "^4.0.0", | ||
"jasmine-spec-reporter": "^7.0.0", | ||
"make-dir": "^3.1.0", | ||
prettier: "^2.5.1", | ||
rimraf: "^3.0.2", | ||
"wasm-pack": "^0.10.2" | ||
}; | ||
var scripts = { | ||
"build:debug": "node bundle.mjs debug && tsc --emitDeclarationOnly", | ||
"build:release": "node bundle.mjs release && tsc --emitDeclarationOnly", | ||
lint: "eslint src" | ||
}; | ||
var files = [ | ||
"dist", | ||
"!dist/types/test" | ||
]; | ||
var main = "dist/shell.cjs"; | ||
var module = "dist/shell.mjs"; | ||
var types = "dist/shell.d.ts"; | ||
var jsdelivr = "dist/shell.cjs"; | ||
var unpkg = "dist/shell.mjs"; | ||
var sideEffects = false; | ||
var exports = { | ||
"./dist/shell_bg.wasm": "./dist/shell_bg.wasm", | ||
"./dist/shell.js": "./dist/shell_bg.js", | ||
"./dist/shell.cjs": "./dist/shell_bg.cjs", | ||
"./dist/shell.mjs": "./dist/shell_bg.mjs", | ||
"./dist/shell": "./dist/shell_bg.mjs", | ||
".": { | ||
types: "./dist/shell.d.ts", | ||
import: "./dist/shell.mjs", | ||
require: "./dist/shell.cjs" | ||
} | ||
}; | ||
var package_default = { | ||
name, | ||
version, | ||
description, | ||
author, | ||
license, | ||
repository, | ||
keywords, | ||
dependencies, | ||
devDependencies, | ||
scripts, | ||
files, | ||
main, | ||
module, | ||
types, | ||
jsdelivr, | ||
unpkg, | ||
sideEffects, | ||
exports | ||
}; | ||
// src/version.ts | ||
var PACKAGE_NAME = package_default.name; | ||
var PACKAGE_VERSION = package_default.version; | ||
var VERSION_PARTS = package_default.version.split("."); | ||
var PACKAGE_VERSION_MAJOR = VERSION_PARTS[0]; | ||
var PACKAGE_VERSION_MINOR = VERSION_PARTS[1]; | ||
var PACKAGE_VERSION_PATCH = VERSION_PARTS[2]; | ||
// crate/pkg/shell.js | ||
@@ -119,13 +220,13 @@ var import_duckdb_wasm = __require("@duckdb/duckdb-wasm"); | ||
if (type == "symbol") { | ||
const description = val.description; | ||
if (description == null) { | ||
const description2 = val.description; | ||
if (description2 == null) { | ||
return "Symbol"; | ||
} else { | ||
return `Symbol(${description})`; | ||
return `Symbol(${description2})`; | ||
} | ||
} | ||
if (type == "function") { | ||
const name = val.name; | ||
if (typeof name == "string" && name.length > 0) { | ||
return `Function(${name})`; | ||
const name2 = val.name; | ||
if (typeof name2 == "string" && name2.length > 0) { | ||
return `Function(${name2})`; | ||
} else { | ||
@@ -258,9 +359,9 @@ return "Function"; | ||
var WcWidth = Object.freeze({ Width0: 0, "0": "Width0", Width1: 1, "1": "Width1", Width2: 2, "2": "Width2" }); | ||
async function load(module, imports) { | ||
if (typeof Response === "function" && module instanceof Response) { | ||
async function load(module2, imports) { | ||
if (typeof Response === "function" && module2 instanceof Response) { | ||
if (typeof WebAssembly.instantiateStreaming === "function") { | ||
try { | ||
return await WebAssembly.instantiateStreaming(module, imports); | ||
return await WebAssembly.instantiateStreaming(module2, imports); | ||
} catch (e) { | ||
if (module.headers.get("Content-Type") != "application/wasm") { | ||
if (module2.headers.get("Content-Type") != "application/wasm") { | ||
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); | ||
@@ -272,8 +373,8 @@ } else { | ||
} | ||
const bytes = await module.arrayBuffer(); | ||
const bytes = await module2.arrayBuffer(); | ||
return await WebAssembly.instantiate(bytes, imports); | ||
} else { | ||
const instance = await WebAssembly.instantiate(module, imports); | ||
const instance = await WebAssembly.instantiate(module2, imports); | ||
if (instance instanceof WebAssembly.Instance) { | ||
return { instance, module }; | ||
return { instance, module: module2 }; | ||
} else { | ||
@@ -782,5 +883,5 @@ return instance; | ||
} | ||
const { instance, module } = await load(await input, imports); | ||
const { instance, module: module2 } = await load(await input, imports); | ||
wasm = instance.exports; | ||
init.__wbindgen_wasm_module = module; | ||
init.__wbindgen_wasm_module = module2; | ||
wasm.__wbindgen_start(); | ||
@@ -907,3 +1008,3 @@ return wasm; | ||
// src/utils/platform.ts | ||
// src/platform.ts | ||
var isNode = typeof navigator === "undefined" ? true : false; | ||
@@ -913,2 +1014,6 @@ var userAgent = isNode ? "node" : navigator.userAgent; | ||
var isSafari = /^((?!chrome|android).)*safari/i.test(userAgent); | ||
function getJsDelivrModule() { | ||
const jsdelivr_dist_url = `https://cdn.jsdelivr.net/npm/${PACKAGE_NAME}@${PACKAGE_VERSION}/dist/`; | ||
return new URL(`${jsdelivr_dist_url}dist/shell_bg.wasm`); | ||
} | ||
@@ -924,9 +1029,9 @@ // src/utils/files.ts | ||
closed = true; | ||
const files = input.files; | ||
for (let i = 0; i < files.length; ++i) { | ||
const file = files.item(i); | ||
const files2 = input.files; | ||
for (let i = 0; i < files2.length; ++i) { | ||
const file = files2.item(i); | ||
await db.dropFile(file.name); | ||
await db.registerFileHandle(file.name, file); | ||
} | ||
resolve(files.length); | ||
resolve(files2.length); | ||
}; | ||
@@ -933,0 +1038,0 @@ const deferredFinish = async () => { |
{ | ||
"name": "@duckdb/duckdb-wasm-shell", | ||
"version": "1.13.1-dev20.0", | ||
"version": "1.13.1-dev24.0", | ||
"description": "", | ||
@@ -27,3 +27,3 @@ "author": "Andre Kohn <kohn.a@outlook.com>", | ||
"dependencies": { | ||
"@duckdb/duckdb-wasm": "^1.13.1-dev20.0", | ||
"@duckdb/duckdb-wasm": "^1.13.1-dev24.0", | ||
"xterm": "^4.16.0", | ||
@@ -30,0 +30,0 @@ "xterm-addon-fit": "^0.5.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
2317785
837
19
3398
9