@sqlanvil/cli 1.27.1 → 1.27.2
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/bundle.js +10 -2
- package/package.json +1 -1
package/bundle.js
CHANGED
|
@@ -50646,7 +50646,7 @@ function collectEvaluationQueries(queryOrAction, concatenate, queryModifier = (q
|
|
|
50646
50646
|
.filter(validationQuery => !!validationQuery.query);
|
|
50647
50647
|
}
|
|
50648
50648
|
|
|
50649
|
-
const version = "1.27.
|
|
50649
|
+
const version = "1.27.2";
|
|
50650
50650
|
const dataformVersion = "3.0.61";
|
|
50651
50651
|
|
|
50652
50652
|
async function build(compiledGraph, runConfig, dbadapter) {
|
|
@@ -54280,12 +54280,18 @@ async function writeParquet(rows, outPath, columns) {
|
|
|
54280
54280
|
await fs__namespace.remove(tmp).catch(() => undefined);
|
|
54281
54281
|
}
|
|
54282
54282
|
}
|
|
54283
|
+
const normalizeValue = (v) => typeof v === "bigint"
|
|
54284
|
+
? v >= BigInt(Number.MIN_SAFE_INTEGER) && v <= BigInt(Number.MAX_SAFE_INTEGER)
|
|
54285
|
+
? Number(v)
|
|
54286
|
+
: v.toString()
|
|
54287
|
+
: v;
|
|
54283
54288
|
async function queryParquet(sql, views) {
|
|
54284
54289
|
return withDuckdb(async (conn) => {
|
|
54285
54290
|
for (const view of views) {
|
|
54286
54291
|
await runAsync(conn, `create view ${view.name} as select * from read_parquet('${view.glob}')`);
|
|
54287
54292
|
}
|
|
54288
|
-
|
|
54293
|
+
const rows = await allAsync(conn, sql);
|
|
54294
|
+
return rows.map((row) => Object.fromEntries(Object.entries(row).map(([k, v]) => [k, normalizeValue(v)])));
|
|
54289
54295
|
});
|
|
54290
54296
|
}
|
|
54291
54297
|
|
|
@@ -56606,6 +56612,8 @@ function createYargsCli(cli) {
|
|
|
56606
56612
|
for (const command of cli.commands) {
|
|
56607
56613
|
yargsChain = yargsChain.command(command.format, command.description, (yargsChainer) => createOptionsChain(yargsChainer, command), async (argv) => {
|
|
56608
56614
|
const exitCode = await command.processFn(argv);
|
|
56615
|
+
await new Promise(resolve => process.stdout.write("", () => resolve()));
|
|
56616
|
+
await new Promise(resolve => process.stderr.write("", () => resolve()));
|
|
56609
56617
|
process.exit(exitCode);
|
|
56610
56618
|
});
|
|
56611
56619
|
}
|