oleander-cli 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +38 -18
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -45423,29 +45423,24 @@ var import_node_crypto2 = require("crypto");
|
|
|
45423
45423
|
var import_node_fs3 = require("fs");
|
|
45424
45424
|
var import_node_path4 = require("path");
|
|
45425
45425
|
var import_node_zlib = require("zlib");
|
|
45426
|
-
var DUCKDB_VERSION = "
|
|
45426
|
+
var DUCKDB_VERSION = "v2.0.0";
|
|
45427
45427
|
var OLEANDER_EXTENSION_RELEASE = "v0.3.1";
|
|
45428
45428
|
var OLEANDER_EXTENSION_REPOSITORY = `https://oleander-cli-releases.s3.amazonaws.com/duckdb/${OLEANDER_EXTENSION_RELEASE}`;
|
|
45429
45429
|
var CLI_JOB_NAMESPACE = "oleander.cli";
|
|
45430
45430
|
var DUCKDB_BINARIES = {
|
|
45431
45431
|
"darwin-arm64": {
|
|
45432
|
-
asset: "
|
|
45433
|
-
sha256: "
|
|
45432
|
+
asset: "duckdb-cli-osx-arm64.tar.gz",
|
|
45433
|
+
sha256: "188a36fe8883ef52e69165a0cbb6031ef679c8e6c448a1ce22951964149b7f96",
|
|
45434
45434
|
extensionPlatform: "osx_arm64"
|
|
45435
45435
|
},
|
|
45436
|
-
"darwin-x64": {
|
|
45437
|
-
asset: "duckdb_cli-osx-amd64.gz",
|
|
45438
|
-
sha256: "e14bbce5356e5398d67155c4147cb7e85288c0308636d6e034215dcd74302ec3",
|
|
45439
|
-
extensionPlatform: "osx_amd64"
|
|
45440
|
-
},
|
|
45441
45436
|
"linux-x64": {
|
|
45442
|
-
asset: "
|
|
45443
|
-
sha256: "
|
|
45437
|
+
asset: "duckdb-cli-linux-amd64.tar.gz",
|
|
45438
|
+
sha256: "c6507206baf7793c6013dbd82368469a45f20dc0e17a6f92f204602f652ed2bc",
|
|
45444
45439
|
extensionPlatform: "linux_amd64"
|
|
45445
45440
|
},
|
|
45446
45441
|
"linux-arm64": {
|
|
45447
|
-
asset: "
|
|
45448
|
-
sha256: "
|
|
45442
|
+
asset: "duckdb-cli-linux-arm64.tar.gz",
|
|
45443
|
+
sha256: "859e1875d2a9515fbb4bf8871061437a14af82320da68c753f094c4b776348fe",
|
|
45449
45444
|
extensionPlatform: "linux_arm64"
|
|
45450
45445
|
}
|
|
45451
45446
|
};
|
|
@@ -45480,13 +45475,37 @@ async function ensureDuckdb(target) {
|
|
|
45480
45475
|
`DuckDB ${DUCKDB_VERSION} download did not match its checksum`
|
|
45481
45476
|
);
|
|
45482
45477
|
}
|
|
45478
|
+
const executable = tarEntry((0, import_node_zlib.gunzipSync)(archive), "duckdb");
|
|
45479
|
+
if (!executable) {
|
|
45480
|
+
throw new Error(`DuckDB ${DUCKDB_VERSION} download held no duckdb binary`);
|
|
45481
|
+
}
|
|
45483
45482
|
(0, import_node_fs3.mkdirSync)(runtimeDir(), { recursive: true });
|
|
45484
45483
|
const partial = `${binary}.partial`;
|
|
45485
|
-
(0, import_node_fs3.writeFileSync)(partial,
|
|
45484
|
+
(0, import_node_fs3.writeFileSync)(partial, executable, { mode: 493 });
|
|
45486
45485
|
(0, import_node_fs3.chmodSync)(partial, 493);
|
|
45487
45486
|
(0, import_node_fs3.renameSync)(partial, binary);
|
|
45488
45487
|
return binary;
|
|
45489
45488
|
}
|
|
45489
|
+
function tarEntry(archive, path2) {
|
|
45490
|
+
let offset = 0;
|
|
45491
|
+
while (offset + 512 <= archive.length) {
|
|
45492
|
+
const header = archive.subarray(offset, offset + 512);
|
|
45493
|
+
if (header.every((byte) => byte === 0)) return null;
|
|
45494
|
+
const field = (start2, length) => {
|
|
45495
|
+
const value = header.subarray(start2, start2 + length);
|
|
45496
|
+
const nul = value.indexOf(0);
|
|
45497
|
+
return value.toString("utf8", 0, nul === -1 ? length : nul);
|
|
45498
|
+
};
|
|
45499
|
+
const size = parseInt(field(124, 12).trim() || "0", 8);
|
|
45500
|
+
const type = field(156, 1);
|
|
45501
|
+
const start = offset + 512;
|
|
45502
|
+
if ((type === "0" || type === "") && field(0, 100).replace(/^\.\//, "") === path2) {
|
|
45503
|
+
return archive.subarray(start, start + size);
|
|
45504
|
+
}
|
|
45505
|
+
offset = start + Math.ceil(size / 512) * 512;
|
|
45506
|
+
}
|
|
45507
|
+
return null;
|
|
45508
|
+
}
|
|
45490
45509
|
function installedExtensionRelease(path2) {
|
|
45491
45510
|
if (!(0, import_node_fs3.existsSync)(path2)) return null;
|
|
45492
45511
|
const fd = (0, import_node_fs3.openSync)(path2, "r");
|
|
@@ -45646,11 +45665,11 @@ async function duckdbTerminal(options) {
|
|
|
45646
45665
|
}
|
|
45647
45666
|
} else if (lineage) {
|
|
45648
45667
|
notices.push(
|
|
45649
|
-
`Lineage needs DuckDB ${DUCKDB_VERSION} on macOS or glibc Linux; starting your own duckdb without it.`
|
|
45668
|
+
`Lineage needs DuckDB ${DUCKDB_VERSION} on Apple silicon macOS or glibc Linux; starting your own duckdb without it.`
|
|
45650
45669
|
);
|
|
45651
45670
|
lineage = false;
|
|
45652
45671
|
}
|
|
45653
|
-
let initSql = duckdb === "duckdb" ? "" : `SET
|
|
45672
|
+
let initSql = duckdb === "duckdb" ? "" : `SET extension_directories = [${sqlString(extensionDirectory())}];
|
|
45654
45673
|
`;
|
|
45655
45674
|
initSql += `
|
|
45656
45675
|
INSTALL httpfs; LOAD httpfs;
|
|
@@ -45742,7 +45761,7 @@ var import_fs7 = require("fs");
|
|
|
45742
45761
|
// package.json
|
|
45743
45762
|
var package_default = {
|
|
45744
45763
|
name: "oleander-cli",
|
|
45745
|
-
version: "0.
|
|
45764
|
+
version: "0.25.0",
|
|
45746
45765
|
description: "oleander CLI",
|
|
45747
45766
|
keywords: [
|
|
45748
45767
|
"cli",
|
|
@@ -47053,8 +47072,9 @@ program2.command("duckdb").description("Starts a local DuckDB shell").option("--
|
|
|
47053
47072
|
`
|
|
47054
47073
|
Runs DuckDB ${DUCKDB_VERSION}, downloaded to ~/.oleander on first use, with every catalog attached. Each
|
|
47055
47074
|
statement that reads or writes a table reports its lineage to oleander (the oleander DuckDB extension,
|
|
47056
|
-
which DuckDB loads as an unsigned extension). Where no build is published (Windows, musl
|
|
47057
|
-
own duckdb starts, without lineage. For one-shot SQL on DuckDB, use oleander query --engine
|
|
47075
|
+
which DuckDB loads as an unsigned extension). Where no build is published (Intel Macs, Windows, musl
|
|
47076
|
+
Linux) your own duckdb starts, without lineage. For one-shot SQL on DuckDB, use oleander query --engine
|
|
47077
|
+
duckdb.
|
|
47058
47078
|
`
|
|
47059
47079
|
).action(duckdbTerminal);
|
|
47060
47080
|
registerSparkCommands(program2);
|