@databricks-solutions/lakebase-scm-utils 0.3.1 → 0.3.3
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/scripts/index.cjs +26 -9
- package/dist/scripts/index.js +27 -10
- package/dist/scripts/lakebase/ci-resolve-branch.cli.cjs +26 -9
- package/dist/scripts/lakebase/ci-resolve-branch.cli.js +27 -10
- package/dist/scripts/lakebase/collapse-heads.cli.cjs +26 -9
- package/dist/scripts/lakebase/collapse-heads.cli.js +27 -10
- package/dist/scripts/lakebase/detect-language.cli.cjs +26 -9
- package/dist/scripts/lakebase/detect-language.cli.js +27 -10
- package/dist/scripts/lakebase/doctor.cli.cjs +26 -9
- package/dist/scripts/lakebase/doctor.cli.js +27 -10
- package/dist/scripts/lakebase/get-connection.cli.cjs +2 -2
- package/dist/scripts/lakebase/get-connection.cli.js +2 -2
- package/dist/scripts/lakebase/index.cjs +26 -9
- package/dist/scripts/lakebase/index.js +27 -10
- package/dist/scripts/lakebase/infra-runner.cli.cjs +26 -9
- package/dist/scripts/lakebase/infra-runner.cli.js +27 -10
- package/dist/scripts/lakebase/new-migration.cli.cjs +26 -9
- package/dist/scripts/lakebase/new-migration.cli.js +27 -10
- package/dist/scripts/lakebase/schema-diff.cli.cjs +2 -2
- package/dist/scripts/lakebase/schema-diff.cli.js +2 -2
- package/dist/scripts/lakebase/schema-migrate.cli.cjs +26 -9
- package/dist/scripts/lakebase/schema-migrate.cli.js +27 -10
- package/dist/scripts/lakebase/scm-claim-feature.cli.cjs +26 -9
- package/dist/scripts/lakebase/scm-claim-feature.cli.js +27 -10
- package/dist/scripts/lakebase/scm-doctor.cli.cjs +26 -9
- package/dist/scripts/lakebase/scm-doctor.cli.js +27 -10
- package/dist/scripts/lakebase/scm-merge.cli.cjs +26 -9
- package/dist/scripts/lakebase/scm-merge.cli.js +27 -10
- package/dist/scripts/lakebase/scm-reconcile-tier.cli.cjs +26 -9
- package/dist/scripts/lakebase/scm-reconcile-tier.cli.js +28 -11
- package/dist/scripts/util/index.cjs +2 -2
- package/dist/scripts/util/index.js +2 -2
- package/package.json +1 -1
- package/scripts/lakebase/schema-migrate-runners/alembic.ts +58 -14
- package/templates/project/client/playwright.config.ts +45 -10
- package/templates/project/python/app/database.py +6 -6
- package/templates/project/python/app/repositories/__init__.py +8 -0
- package/templates/project/python/app/repositories/session.py +28 -0
|
@@ -81604,8 +81604,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
81604
81604
|
var cached;
|
|
81605
81605
|
function substrateSelfVersion() {
|
|
81606
81606
|
if (cached !== void 0) return cached;
|
|
81607
|
-
if ("0.3.
|
|
81608
|
-
cached = "0.3.
|
|
81607
|
+
if ("0.3.3".length > 0) {
|
|
81608
|
+
cached = "0.3.3";
|
|
81609
81609
|
return cached;
|
|
81610
81610
|
}
|
|
81611
81611
|
cached = "unknown";
|
|
@@ -93467,26 +93467,43 @@ init_cjs_shims();
|
|
|
93467
93467
|
var import_node_child_process10 = require("child_process");
|
|
93468
93468
|
var fs24 = __toESM(require("fs"), 1);
|
|
93469
93469
|
var path22 = __toESM(require("path"), 1);
|
|
93470
|
-
|
|
93471
|
-
|
|
93470
|
+
var uvOnPath;
|
|
93471
|
+
function hasUv() {
|
|
93472
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
93473
|
+
try {
|
|
93474
|
+
(0, import_node_child_process10.execFileSync)("uv", ["--version"], { stdio: "ignore" });
|
|
93475
|
+
uvOnPath = true;
|
|
93476
|
+
} catch {
|
|
93477
|
+
uvOnPath = false;
|
|
93478
|
+
}
|
|
93479
|
+
return uvOnPath;
|
|
93480
|
+
}
|
|
93481
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
93482
|
+
const venvCandidates = [
|
|
93472
93483
|
path22.join(projectDir, ".venv", "bin", "alembic"),
|
|
93473
93484
|
path22.join(projectDir, "venv", "bin", "alembic")
|
|
93474
93485
|
];
|
|
93475
|
-
for (const candidate of
|
|
93486
|
+
for (const candidate of venvCandidates) {
|
|
93476
93487
|
try {
|
|
93477
|
-
if (fs24.existsSync(candidate)) return candidate;
|
|
93488
|
+
if (fs24.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
93478
93489
|
} catch {
|
|
93479
93490
|
}
|
|
93480
93491
|
}
|
|
93481
|
-
|
|
93492
|
+
try {
|
|
93493
|
+
if (uvAvailable && fs24.existsSync(path22.join(projectDir, "pyproject.toml"))) {
|
|
93494
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
93495
|
+
}
|
|
93496
|
+
} catch {
|
|
93497
|
+
}
|
|
93498
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
93482
93499
|
}
|
|
93483
93500
|
function spawnAlembic(projectDir, args, dsn) {
|
|
93484
93501
|
return new Promise((resolve2, reject) => {
|
|
93485
|
-
const bin =
|
|
93502
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
93486
93503
|
const env = { ...process.env };
|
|
93487
93504
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path22.delimiter);
|
|
93488
93505
|
if (dsn) env.DATABASE_URL = dsn;
|
|
93489
|
-
const child = (0, import_node_child_process10.spawn)(bin, args, {
|
|
93506
|
+
const child = (0, import_node_child_process10.spawn)(bin, [...prefixArgs, ...args], {
|
|
93490
93507
|
cwd: projectDir,
|
|
93491
93508
|
env,
|
|
93492
93509
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -2521,8 +2521,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
2521
2521
|
var cached;
|
|
2522
2522
|
function substrateSelfVersion() {
|
|
2523
2523
|
if (cached !== void 0) return cached;
|
|
2524
|
-
if ("0.3.
|
|
2525
|
-
cached = "0.3.
|
|
2524
|
+
if ("0.3.3".length > 0) {
|
|
2525
|
+
cached = "0.3.3";
|
|
2526
2526
|
return cached;
|
|
2527
2527
|
}
|
|
2528
2528
|
cached = "unknown";
|
|
@@ -14381,29 +14381,46 @@ import * as path24 from "path";
|
|
|
14381
14381
|
|
|
14382
14382
|
// scripts/lakebase/schema-migrate-runners/alembic.ts
|
|
14383
14383
|
init_esm_shims();
|
|
14384
|
-
import { spawn as spawn5 } from "child_process";
|
|
14384
|
+
import { spawn as spawn5, execFileSync as execFileSync7 } from "child_process";
|
|
14385
14385
|
import * as fs23 from "fs";
|
|
14386
14386
|
import * as path23 from "path";
|
|
14387
|
-
|
|
14388
|
-
|
|
14387
|
+
var uvOnPath;
|
|
14388
|
+
function hasUv() {
|
|
14389
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
14390
|
+
try {
|
|
14391
|
+
execFileSync7("uv", ["--version"], { stdio: "ignore" });
|
|
14392
|
+
uvOnPath = true;
|
|
14393
|
+
} catch {
|
|
14394
|
+
uvOnPath = false;
|
|
14395
|
+
}
|
|
14396
|
+
return uvOnPath;
|
|
14397
|
+
}
|
|
14398
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
14399
|
+
const venvCandidates = [
|
|
14389
14400
|
path23.join(projectDir, ".venv", "bin", "alembic"),
|
|
14390
14401
|
path23.join(projectDir, "venv", "bin", "alembic")
|
|
14391
14402
|
];
|
|
14392
|
-
for (const candidate of
|
|
14403
|
+
for (const candidate of venvCandidates) {
|
|
14393
14404
|
try {
|
|
14394
|
-
if (fs23.existsSync(candidate)) return candidate;
|
|
14405
|
+
if (fs23.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
14395
14406
|
} catch {
|
|
14396
14407
|
}
|
|
14397
14408
|
}
|
|
14398
|
-
|
|
14409
|
+
try {
|
|
14410
|
+
if (uvAvailable && fs23.existsSync(path23.join(projectDir, "pyproject.toml"))) {
|
|
14411
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
14412
|
+
}
|
|
14413
|
+
} catch {
|
|
14414
|
+
}
|
|
14415
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
14399
14416
|
}
|
|
14400
14417
|
function spawnAlembic(projectDir, args, dsn) {
|
|
14401
14418
|
return new Promise((resolve2, reject) => {
|
|
14402
|
-
const bin =
|
|
14419
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
14403
14420
|
const env = { ...process.env };
|
|
14404
14421
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path23.delimiter);
|
|
14405
14422
|
if (dsn) env.DATABASE_URL = dsn;
|
|
14406
|
-
const child = spawn5(bin, args, {
|
|
14423
|
+
const child = spawn5(bin, [...prefixArgs, ...args], {
|
|
14407
14424
|
cwd: projectDir,
|
|
14408
14425
|
env,
|
|
14409
14426
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -79290,8 +79290,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79290
79290
|
var cached;
|
|
79291
79291
|
function substrateSelfVersion() {
|
|
79292
79292
|
if (cached !== void 0) return cached;
|
|
79293
|
-
if ("0.3.
|
|
79294
|
-
cached = "0.3.
|
|
79293
|
+
if ("0.3.3".length > 0) {
|
|
79294
|
+
cached = "0.3.3";
|
|
79295
79295
|
return cached;
|
|
79296
79296
|
}
|
|
79297
79297
|
cached = "unknown";
|
|
@@ -79670,26 +79670,43 @@ init_cjs_shims();
|
|
|
79670
79670
|
var import_node_child_process3 = require("child_process");
|
|
79671
79671
|
var fs6 = __toESM(require("fs"), 1);
|
|
79672
79672
|
var path4 = __toESM(require("path"), 1);
|
|
79673
|
-
|
|
79674
|
-
|
|
79673
|
+
var uvOnPath;
|
|
79674
|
+
function hasUv() {
|
|
79675
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
79676
|
+
try {
|
|
79677
|
+
(0, import_node_child_process3.execFileSync)("uv", ["--version"], { stdio: "ignore" });
|
|
79678
|
+
uvOnPath = true;
|
|
79679
|
+
} catch {
|
|
79680
|
+
uvOnPath = false;
|
|
79681
|
+
}
|
|
79682
|
+
return uvOnPath;
|
|
79683
|
+
}
|
|
79684
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
79685
|
+
const venvCandidates = [
|
|
79675
79686
|
path4.join(projectDir, ".venv", "bin", "alembic"),
|
|
79676
79687
|
path4.join(projectDir, "venv", "bin", "alembic")
|
|
79677
79688
|
];
|
|
79678
|
-
for (const candidate of
|
|
79689
|
+
for (const candidate of venvCandidates) {
|
|
79679
79690
|
try {
|
|
79680
|
-
if (fs6.existsSync(candidate)) return candidate;
|
|
79691
|
+
if (fs6.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
79681
79692
|
} catch {
|
|
79682
79693
|
}
|
|
79683
79694
|
}
|
|
79684
|
-
|
|
79695
|
+
try {
|
|
79696
|
+
if (uvAvailable && fs6.existsSync(path4.join(projectDir, "pyproject.toml"))) {
|
|
79697
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
79698
|
+
}
|
|
79699
|
+
} catch {
|
|
79700
|
+
}
|
|
79701
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
79685
79702
|
}
|
|
79686
79703
|
function spawnAlembic(projectDir, args, dsn) {
|
|
79687
79704
|
return new Promise((resolve, reject) => {
|
|
79688
|
-
const bin =
|
|
79705
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
79689
79706
|
const env = { ...process.env };
|
|
79690
79707
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path4.delimiter);
|
|
79691
79708
|
if (dsn) env.DATABASE_URL = dsn;
|
|
79692
|
-
const child = (0, import_node_child_process3.spawn)(bin, args, {
|
|
79709
|
+
const child = (0, import_node_child_process3.spawn)(bin, [...prefixArgs, ...args], {
|
|
79693
79710
|
cwd: projectDir,
|
|
79694
79711
|
env,
|
|
79695
79712
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -393,8 +393,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
393
393
|
var cached;
|
|
394
394
|
function substrateSelfVersion() {
|
|
395
395
|
if (cached !== void 0) return cached;
|
|
396
|
-
if ("0.3.
|
|
397
|
-
cached = "0.3.
|
|
396
|
+
if ("0.3.3".length > 0) {
|
|
397
|
+
cached = "0.3.3";
|
|
398
398
|
return cached;
|
|
399
399
|
}
|
|
400
400
|
cached = "unknown";
|
|
@@ -754,29 +754,46 @@ import * as fs6 from "fs";
|
|
|
754
754
|
import * as path5 from "path";
|
|
755
755
|
|
|
756
756
|
// scripts/lakebase/schema-migrate-runners/alembic.ts
|
|
757
|
-
import { spawn } from "child_process";
|
|
757
|
+
import { spawn, execFileSync as execFileSync3 } from "child_process";
|
|
758
758
|
import * as fs5 from "fs";
|
|
759
759
|
import * as path4 from "path";
|
|
760
|
-
|
|
761
|
-
|
|
760
|
+
var uvOnPath;
|
|
761
|
+
function hasUv() {
|
|
762
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
763
|
+
try {
|
|
764
|
+
execFileSync3("uv", ["--version"], { stdio: "ignore" });
|
|
765
|
+
uvOnPath = true;
|
|
766
|
+
} catch {
|
|
767
|
+
uvOnPath = false;
|
|
768
|
+
}
|
|
769
|
+
return uvOnPath;
|
|
770
|
+
}
|
|
771
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
772
|
+
const venvCandidates = [
|
|
762
773
|
path4.join(projectDir, ".venv", "bin", "alembic"),
|
|
763
774
|
path4.join(projectDir, "venv", "bin", "alembic")
|
|
764
775
|
];
|
|
765
|
-
for (const candidate of
|
|
776
|
+
for (const candidate of venvCandidates) {
|
|
766
777
|
try {
|
|
767
|
-
if (fs5.existsSync(candidate)) return candidate;
|
|
778
|
+
if (fs5.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
768
779
|
} catch {
|
|
769
780
|
}
|
|
770
781
|
}
|
|
771
|
-
|
|
782
|
+
try {
|
|
783
|
+
if (uvAvailable && fs5.existsSync(path4.join(projectDir, "pyproject.toml"))) {
|
|
784
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
785
|
+
}
|
|
786
|
+
} catch {
|
|
787
|
+
}
|
|
788
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
772
789
|
}
|
|
773
790
|
function spawnAlembic(projectDir, args, dsn) {
|
|
774
791
|
return new Promise((resolve, reject) => {
|
|
775
|
-
const bin =
|
|
792
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
776
793
|
const env = { ...process.env };
|
|
777
794
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path4.delimiter);
|
|
778
795
|
if (dsn) env.DATABASE_URL = dsn;
|
|
779
|
-
const child = spawn(bin, args, {
|
|
796
|
+
const child = spawn(bin, [...prefixArgs, ...args], {
|
|
780
797
|
cwd: projectDir,
|
|
781
798
|
env,
|
|
782
799
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -79290,8 +79290,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79290
79290
|
var cached;
|
|
79291
79291
|
function substrateSelfVersion() {
|
|
79292
79292
|
if (cached !== void 0) return cached;
|
|
79293
|
-
if ("0.3.
|
|
79294
|
-
cached = "0.3.
|
|
79293
|
+
if ("0.3.3".length > 0) {
|
|
79294
|
+
cached = "0.3.3";
|
|
79295
79295
|
return cached;
|
|
79296
79296
|
}
|
|
79297
79297
|
cached = "unknown";
|
|
@@ -79475,26 +79475,43 @@ init_cjs_shims();
|
|
|
79475
79475
|
var import_node_child_process3 = require("child_process");
|
|
79476
79476
|
var fs6 = __toESM(require("fs"), 1);
|
|
79477
79477
|
var path4 = __toESM(require("path"), 1);
|
|
79478
|
-
|
|
79479
|
-
|
|
79478
|
+
var uvOnPath;
|
|
79479
|
+
function hasUv() {
|
|
79480
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
79481
|
+
try {
|
|
79482
|
+
(0, import_node_child_process3.execFileSync)("uv", ["--version"], { stdio: "ignore" });
|
|
79483
|
+
uvOnPath = true;
|
|
79484
|
+
} catch {
|
|
79485
|
+
uvOnPath = false;
|
|
79486
|
+
}
|
|
79487
|
+
return uvOnPath;
|
|
79488
|
+
}
|
|
79489
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
79490
|
+
const venvCandidates = [
|
|
79480
79491
|
path4.join(projectDir, ".venv", "bin", "alembic"),
|
|
79481
79492
|
path4.join(projectDir, "venv", "bin", "alembic")
|
|
79482
79493
|
];
|
|
79483
|
-
for (const candidate of
|
|
79494
|
+
for (const candidate of venvCandidates) {
|
|
79484
79495
|
try {
|
|
79485
|
-
if (fs6.existsSync(candidate)) return candidate;
|
|
79496
|
+
if (fs6.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
79486
79497
|
} catch {
|
|
79487
79498
|
}
|
|
79488
79499
|
}
|
|
79489
|
-
|
|
79500
|
+
try {
|
|
79501
|
+
if (uvAvailable && fs6.existsSync(path4.join(projectDir, "pyproject.toml"))) {
|
|
79502
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
79503
|
+
}
|
|
79504
|
+
} catch {
|
|
79505
|
+
}
|
|
79506
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
79490
79507
|
}
|
|
79491
79508
|
function spawnAlembic(projectDir, args, dsn) {
|
|
79492
79509
|
return new Promise((resolve, reject) => {
|
|
79493
|
-
const bin =
|
|
79510
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
79494
79511
|
const env = { ...process.env };
|
|
79495
79512
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path4.delimiter);
|
|
79496
79513
|
if (dsn) env.DATABASE_URL = dsn;
|
|
79497
|
-
const child = (0, import_node_child_process3.spawn)(bin, args, {
|
|
79514
|
+
const child = (0, import_node_child_process3.spawn)(bin, [...prefixArgs, ...args], {
|
|
79498
79515
|
cwd: projectDir,
|
|
79499
79516
|
env,
|
|
79500
79517
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -393,8 +393,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
393
393
|
var cached;
|
|
394
394
|
function substrateSelfVersion() {
|
|
395
395
|
if (cached !== void 0) return cached;
|
|
396
|
-
if ("0.3.
|
|
397
|
-
cached = "0.3.
|
|
396
|
+
if ("0.3.3".length > 0) {
|
|
397
|
+
cached = "0.3.3";
|
|
398
398
|
return cached;
|
|
399
399
|
}
|
|
400
400
|
cached = "unknown";
|
|
@@ -569,29 +569,46 @@ import * as fs6 from "fs";
|
|
|
569
569
|
import * as path5 from "path";
|
|
570
570
|
|
|
571
571
|
// scripts/lakebase/schema-migrate-runners/alembic.ts
|
|
572
|
-
import { spawn } from "child_process";
|
|
572
|
+
import { spawn, execFileSync as execFileSync3 } from "child_process";
|
|
573
573
|
import * as fs5 from "fs";
|
|
574
574
|
import * as path4 from "path";
|
|
575
|
-
|
|
576
|
-
|
|
575
|
+
var uvOnPath;
|
|
576
|
+
function hasUv() {
|
|
577
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
578
|
+
try {
|
|
579
|
+
execFileSync3("uv", ["--version"], { stdio: "ignore" });
|
|
580
|
+
uvOnPath = true;
|
|
581
|
+
} catch {
|
|
582
|
+
uvOnPath = false;
|
|
583
|
+
}
|
|
584
|
+
return uvOnPath;
|
|
585
|
+
}
|
|
586
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
587
|
+
const venvCandidates = [
|
|
577
588
|
path4.join(projectDir, ".venv", "bin", "alembic"),
|
|
578
589
|
path4.join(projectDir, "venv", "bin", "alembic")
|
|
579
590
|
];
|
|
580
|
-
for (const candidate of
|
|
591
|
+
for (const candidate of venvCandidates) {
|
|
581
592
|
try {
|
|
582
|
-
if (fs5.existsSync(candidate)) return candidate;
|
|
593
|
+
if (fs5.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
583
594
|
} catch {
|
|
584
595
|
}
|
|
585
596
|
}
|
|
586
|
-
|
|
597
|
+
try {
|
|
598
|
+
if (uvAvailable && fs5.existsSync(path4.join(projectDir, "pyproject.toml"))) {
|
|
599
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
600
|
+
}
|
|
601
|
+
} catch {
|
|
602
|
+
}
|
|
603
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
587
604
|
}
|
|
588
605
|
function spawnAlembic(projectDir, args, dsn) {
|
|
589
606
|
return new Promise((resolve, reject) => {
|
|
590
|
-
const bin =
|
|
607
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
591
608
|
const env = { ...process.env };
|
|
592
609
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path4.delimiter);
|
|
593
610
|
if (dsn) env.DATABASE_URL = dsn;
|
|
594
|
-
const child = spawn(bin, args, {
|
|
611
|
+
const child = spawn(bin, [...prefixArgs, ...args], {
|
|
595
612
|
cwd: projectDir,
|
|
596
613
|
env,
|
|
597
614
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -79288,8 +79288,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79288
79288
|
var cached;
|
|
79289
79289
|
function substrateSelfVersion() {
|
|
79290
79290
|
if (cached !== void 0) return cached;
|
|
79291
|
-
if ("0.3.
|
|
79292
|
-
cached = "0.3.
|
|
79291
|
+
if ("0.3.3".length > 0) {
|
|
79292
|
+
cached = "0.3.3";
|
|
79293
79293
|
return cached;
|
|
79294
79294
|
}
|
|
79295
79295
|
cached = "unknown";
|
|
@@ -389,8 +389,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
389
389
|
var cached;
|
|
390
390
|
function substrateSelfVersion() {
|
|
391
391
|
if (cached !== void 0) return cached;
|
|
392
|
-
if ("0.3.
|
|
393
|
-
cached = "0.3.
|
|
392
|
+
if ("0.3.3".length > 0) {
|
|
393
|
+
cached = "0.3.3";
|
|
394
394
|
return cached;
|
|
395
395
|
}
|
|
396
396
|
cached = "unknown";
|
|
@@ -79324,8 +79324,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79324
79324
|
var cached;
|
|
79325
79325
|
function substrateSelfVersion() {
|
|
79326
79326
|
if (cached !== void 0) return cached;
|
|
79327
|
-
if ("0.3.
|
|
79328
|
-
cached = "0.3.
|
|
79327
|
+
if ("0.3.3".length > 0) {
|
|
79328
|
+
cached = "0.3.3";
|
|
79329
79329
|
return cached;
|
|
79330
79330
|
}
|
|
79331
79331
|
cached = "unknown";
|
|
@@ -79578,26 +79578,43 @@ init_cjs_shims();
|
|
|
79578
79578
|
var import_node_child_process3 = require("child_process");
|
|
79579
79579
|
var fs7 = __toESM(require("fs"), 1);
|
|
79580
79580
|
var path5 = __toESM(require("path"), 1);
|
|
79581
|
-
|
|
79582
|
-
|
|
79581
|
+
var uvOnPath;
|
|
79582
|
+
function hasUv() {
|
|
79583
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
79584
|
+
try {
|
|
79585
|
+
(0, import_node_child_process3.execFileSync)("uv", ["--version"], { stdio: "ignore" });
|
|
79586
|
+
uvOnPath = true;
|
|
79587
|
+
} catch {
|
|
79588
|
+
uvOnPath = false;
|
|
79589
|
+
}
|
|
79590
|
+
return uvOnPath;
|
|
79591
|
+
}
|
|
79592
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
79593
|
+
const venvCandidates = [
|
|
79583
79594
|
path5.join(projectDir, ".venv", "bin", "alembic"),
|
|
79584
79595
|
path5.join(projectDir, "venv", "bin", "alembic")
|
|
79585
79596
|
];
|
|
79586
|
-
for (const candidate of
|
|
79597
|
+
for (const candidate of venvCandidates) {
|
|
79587
79598
|
try {
|
|
79588
|
-
if (fs7.existsSync(candidate)) return candidate;
|
|
79599
|
+
if (fs7.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
79589
79600
|
} catch {
|
|
79590
79601
|
}
|
|
79591
79602
|
}
|
|
79592
|
-
|
|
79603
|
+
try {
|
|
79604
|
+
if (uvAvailable && fs7.existsSync(path5.join(projectDir, "pyproject.toml"))) {
|
|
79605
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
79606
|
+
}
|
|
79607
|
+
} catch {
|
|
79608
|
+
}
|
|
79609
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
79593
79610
|
}
|
|
79594
79611
|
function spawnAlembic(projectDir, args, dsn) {
|
|
79595
79612
|
return new Promise((resolve2, reject) => {
|
|
79596
|
-
const bin =
|
|
79613
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
79597
79614
|
const env = { ...process.env };
|
|
79598
79615
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path5.delimiter);
|
|
79599
79616
|
if (dsn) env.DATABASE_URL = dsn;
|
|
79600
|
-
const child = (0, import_node_child_process3.spawn)(bin, args, {
|
|
79617
|
+
const child = (0, import_node_child_process3.spawn)(bin, [...prefixArgs, ...args], {
|
|
79601
79618
|
cwd: projectDir,
|
|
79602
79619
|
env,
|
|
79603
79620
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -427,8 +427,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
427
427
|
var cached;
|
|
428
428
|
function substrateSelfVersion() {
|
|
429
429
|
if (cached !== void 0) return cached;
|
|
430
|
-
if ("0.3.
|
|
431
|
-
cached = "0.3.
|
|
430
|
+
if ("0.3.3".length > 0) {
|
|
431
|
+
cached = "0.3.3";
|
|
432
432
|
return cached;
|
|
433
433
|
}
|
|
434
434
|
cached = "unknown";
|
|
@@ -674,29 +674,46 @@ import * as fs7 from "fs";
|
|
|
674
674
|
import * as path6 from "path";
|
|
675
675
|
|
|
676
676
|
// scripts/lakebase/schema-migrate-runners/alembic.ts
|
|
677
|
-
import { spawn } from "child_process";
|
|
677
|
+
import { spawn, execFileSync as execFileSync3 } from "child_process";
|
|
678
678
|
import * as fs6 from "fs";
|
|
679
679
|
import * as path5 from "path";
|
|
680
|
-
|
|
681
|
-
|
|
680
|
+
var uvOnPath;
|
|
681
|
+
function hasUv() {
|
|
682
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
683
|
+
try {
|
|
684
|
+
execFileSync3("uv", ["--version"], { stdio: "ignore" });
|
|
685
|
+
uvOnPath = true;
|
|
686
|
+
} catch {
|
|
687
|
+
uvOnPath = false;
|
|
688
|
+
}
|
|
689
|
+
return uvOnPath;
|
|
690
|
+
}
|
|
691
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
692
|
+
const venvCandidates = [
|
|
682
693
|
path5.join(projectDir, ".venv", "bin", "alembic"),
|
|
683
694
|
path5.join(projectDir, "venv", "bin", "alembic")
|
|
684
695
|
];
|
|
685
|
-
for (const candidate of
|
|
696
|
+
for (const candidate of venvCandidates) {
|
|
686
697
|
try {
|
|
687
|
-
if (fs6.existsSync(candidate)) return candidate;
|
|
698
|
+
if (fs6.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
688
699
|
} catch {
|
|
689
700
|
}
|
|
690
701
|
}
|
|
691
|
-
|
|
702
|
+
try {
|
|
703
|
+
if (uvAvailable && fs6.existsSync(path5.join(projectDir, "pyproject.toml"))) {
|
|
704
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
705
|
+
}
|
|
706
|
+
} catch {
|
|
707
|
+
}
|
|
708
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
692
709
|
}
|
|
693
710
|
function spawnAlembic(projectDir, args, dsn) {
|
|
694
711
|
return new Promise((resolve2, reject) => {
|
|
695
|
-
const bin =
|
|
712
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
696
713
|
const env = { ...process.env };
|
|
697
714
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path5.delimiter);
|
|
698
715
|
if (dsn) env.DATABASE_URL = dsn;
|
|
699
|
-
const child = spawn(bin, args, {
|
|
716
|
+
const child = spawn(bin, [...prefixArgs, ...args], {
|
|
700
717
|
cwd: projectDir,
|
|
701
718
|
env,
|
|
702
719
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -79783,8 +79783,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79783
79783
|
var cached;
|
|
79784
79784
|
function substrateSelfVersion() {
|
|
79785
79785
|
if (cached !== void 0) return cached;
|
|
79786
|
-
if ("0.3.
|
|
79787
|
-
cached = "0.3.
|
|
79786
|
+
if ("0.3.3".length > 0) {
|
|
79787
|
+
cached = "0.3.3";
|
|
79788
79788
|
return cached;
|
|
79789
79789
|
}
|
|
79790
79790
|
cached = "unknown";
|
|
@@ -80815,26 +80815,43 @@ init_cjs_shims();
|
|
|
80815
80815
|
var import_node_child_process5 = require("child_process");
|
|
80816
80816
|
var fs10 = __toESM(require("fs"), 1);
|
|
80817
80817
|
var path8 = __toESM(require("path"), 1);
|
|
80818
|
-
|
|
80819
|
-
|
|
80818
|
+
var uvOnPath;
|
|
80819
|
+
function hasUv() {
|
|
80820
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
80821
|
+
try {
|
|
80822
|
+
(0, import_node_child_process5.execFileSync)("uv", ["--version"], { stdio: "ignore" });
|
|
80823
|
+
uvOnPath = true;
|
|
80824
|
+
} catch {
|
|
80825
|
+
uvOnPath = false;
|
|
80826
|
+
}
|
|
80827
|
+
return uvOnPath;
|
|
80828
|
+
}
|
|
80829
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
80830
|
+
const venvCandidates = [
|
|
80820
80831
|
path8.join(projectDir, ".venv", "bin", "alembic"),
|
|
80821
80832
|
path8.join(projectDir, "venv", "bin", "alembic")
|
|
80822
80833
|
];
|
|
80823
|
-
for (const candidate of
|
|
80834
|
+
for (const candidate of venvCandidates) {
|
|
80824
80835
|
try {
|
|
80825
|
-
if (fs10.existsSync(candidate)) return candidate;
|
|
80836
|
+
if (fs10.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
80826
80837
|
} catch {
|
|
80827
80838
|
}
|
|
80828
80839
|
}
|
|
80829
|
-
|
|
80840
|
+
try {
|
|
80841
|
+
if (uvAvailable && fs10.existsSync(path8.join(projectDir, "pyproject.toml"))) {
|
|
80842
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
80843
|
+
}
|
|
80844
|
+
} catch {
|
|
80845
|
+
}
|
|
80846
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
80830
80847
|
}
|
|
80831
80848
|
function spawnAlembic(projectDir, args, dsn) {
|
|
80832
80849
|
return new Promise((resolve3, reject) => {
|
|
80833
|
-
const bin =
|
|
80850
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
80834
80851
|
const env = { ...process.env };
|
|
80835
80852
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path8.delimiter);
|
|
80836
80853
|
if (dsn) env.DATABASE_URL = dsn;
|
|
80837
|
-
const child = (0, import_node_child_process5.spawn)(bin, args, {
|
|
80854
|
+
const child = (0, import_node_child_process5.spawn)(bin, [...prefixArgs, ...args], {
|
|
80838
80855
|
cwd: projectDir,
|
|
80839
80856
|
env,
|
|
80840
80857
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -864,8 +864,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
864
864
|
var cached;
|
|
865
865
|
function substrateSelfVersion() {
|
|
866
866
|
if (cached !== void 0) return cached;
|
|
867
|
-
if ("0.3.
|
|
868
|
-
cached = "0.3.
|
|
867
|
+
if ("0.3.3".length > 0) {
|
|
868
|
+
cached = "0.3.3";
|
|
869
869
|
return cached;
|
|
870
870
|
}
|
|
871
871
|
cached = "unknown";
|
|
@@ -1886,29 +1886,46 @@ import * as fs10 from "fs";
|
|
|
1886
1886
|
import * as path9 from "path";
|
|
1887
1887
|
|
|
1888
1888
|
// scripts/lakebase/schema-migrate-runners/alembic.ts
|
|
1889
|
-
import { spawn } from "child_process";
|
|
1889
|
+
import { spawn, execFileSync as execFileSync5 } from "child_process";
|
|
1890
1890
|
import * as fs9 from "fs";
|
|
1891
1891
|
import * as path8 from "path";
|
|
1892
|
-
|
|
1893
|
-
|
|
1892
|
+
var uvOnPath;
|
|
1893
|
+
function hasUv() {
|
|
1894
|
+
if (uvOnPath !== void 0) return uvOnPath;
|
|
1895
|
+
try {
|
|
1896
|
+
execFileSync5("uv", ["--version"], { stdio: "ignore" });
|
|
1897
|
+
uvOnPath = true;
|
|
1898
|
+
} catch {
|
|
1899
|
+
uvOnPath = false;
|
|
1900
|
+
}
|
|
1901
|
+
return uvOnPath;
|
|
1902
|
+
}
|
|
1903
|
+
function resolveAlembicInvocation(projectDir, uvAvailable = hasUv()) {
|
|
1904
|
+
const venvCandidates = [
|
|
1894
1905
|
path8.join(projectDir, ".venv", "bin", "alembic"),
|
|
1895
1906
|
path8.join(projectDir, "venv", "bin", "alembic")
|
|
1896
1907
|
];
|
|
1897
|
-
for (const candidate of
|
|
1908
|
+
for (const candidate of venvCandidates) {
|
|
1898
1909
|
try {
|
|
1899
|
-
if (fs9.existsSync(candidate)) return candidate;
|
|
1910
|
+
if (fs9.existsSync(candidate)) return { bin: candidate, prefixArgs: [] };
|
|
1900
1911
|
} catch {
|
|
1901
1912
|
}
|
|
1902
1913
|
}
|
|
1903
|
-
|
|
1914
|
+
try {
|
|
1915
|
+
if (uvAvailable && fs9.existsSync(path8.join(projectDir, "pyproject.toml"))) {
|
|
1916
|
+
return { bin: "uv", prefixArgs: ["run", "alembic"] };
|
|
1917
|
+
}
|
|
1918
|
+
} catch {
|
|
1919
|
+
}
|
|
1920
|
+
return { bin: "alembic", prefixArgs: [] };
|
|
1904
1921
|
}
|
|
1905
1922
|
function spawnAlembic(projectDir, args, dsn) {
|
|
1906
1923
|
return new Promise((resolve3, reject) => {
|
|
1907
|
-
const bin =
|
|
1924
|
+
const { bin, prefixArgs } = resolveAlembicInvocation(projectDir);
|
|
1908
1925
|
const env = { ...process.env };
|
|
1909
1926
|
env.PYTHONPATH = [projectDir, process.env.PYTHONPATH].filter(Boolean).join(path8.delimiter);
|
|
1910
1927
|
if (dsn) env.DATABASE_URL = dsn;
|
|
1911
|
-
const child = spawn(bin, args, {
|
|
1928
|
+
const child = spawn(bin, [...prefixArgs, ...args], {
|
|
1912
1929
|
cwd: projectDir,
|
|
1913
1930
|
env,
|
|
1914
1931
|
stdio: ["ignore", "pipe", "pipe"]
|