@sqlanvil/cli 1.20.0 → 1.20.1
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 +15 -3
- package/package.json +1 -1
package/bundle.js
CHANGED
|
@@ -50606,7 +50606,7 @@ function collectEvaluationQueries(queryOrAction, concatenate, queryModifier = (q
|
|
|
50606
50606
|
.filter(validationQuery => !!validationQuery.query);
|
|
50607
50607
|
}
|
|
50608
50608
|
|
|
50609
|
-
const version = "1.20.
|
|
50609
|
+
const version = "1.20.1";
|
|
50610
50610
|
const dataformVersion = "3.0.61";
|
|
50611
50611
|
|
|
50612
50612
|
async function build(compiledGraph, runConfig, dbadapter) {
|
|
@@ -52868,6 +52868,18 @@ function toCopyTarget(uri) {
|
|
|
52868
52868
|
}
|
|
52869
52869
|
return uri;
|
|
52870
52870
|
}
|
|
52871
|
+
function resolveLocalLocation(location, baseDir) {
|
|
52872
|
+
if (!location || !baseDir || schemeOf(location) !== "local") {
|
|
52873
|
+
return location;
|
|
52874
|
+
}
|
|
52875
|
+
const hasScheme = location.startsWith("local://");
|
|
52876
|
+
const bare = hasScheme ? location.slice("local://".length) : location;
|
|
52877
|
+
if (bare.startsWith("/") || /^[A-Za-z]:[\\/]/.test(bare)) {
|
|
52878
|
+
return location;
|
|
52879
|
+
}
|
|
52880
|
+
const joined = `${baseDir.replace(/\/+$/, "")}/${bare}`;
|
|
52881
|
+
return hasScheme ? `local://${joined}` : joined;
|
|
52882
|
+
}
|
|
52871
52883
|
function schemeOf(uri) {
|
|
52872
52884
|
if (uri.startsWith("s3://")) {
|
|
52873
52885
|
return "s3";
|
|
@@ -53431,7 +53443,7 @@ class Runner {
|
|
|
53431
53443
|
try {
|
|
53432
53444
|
const exporter = this.executionOptions.duckdbExport || runDuckdbExport;
|
|
53433
53445
|
await exporter({
|
|
53434
|
-
spec: action === null || action === void 0 ? void 0 : action.export,
|
|
53446
|
+
spec: (action === null || action === void 0 ? void 0 : action.export) && Object.assign(Object.assign({}, action.export), { location: resolveLocalLocation(action.export.location, this.executionOptions.projectDir) }),
|
|
53435
53447
|
selectSql: task.statement,
|
|
53436
53448
|
pg: this.executionOptions.warehouseConnection,
|
|
53437
53449
|
storage: this.executionOptions.storageCredentials,
|
|
@@ -53450,7 +53462,7 @@ class Runner {
|
|
|
53450
53462
|
try {
|
|
53451
53463
|
const importer = this.executionOptions.duckdbImport || runDuckdbImport;
|
|
53452
53464
|
await importer({
|
|
53453
|
-
spec: action === null || action === void 0 ? void 0 : action.import,
|
|
53465
|
+
spec: (action === null || action === void 0 ? void 0 : action.import) && Object.assign(Object.assign({}, action.import), { location: resolveLocalLocation(action.import.location, this.executionOptions.projectDir) }),
|
|
53454
53466
|
target: action === null || action === void 0 ? void 0 : action.target,
|
|
53455
53467
|
pg: this.executionOptions.warehouseConnection,
|
|
53456
53468
|
storage: this.executionOptions.storageCredentials
|