@databricks-solutions/lakebase-scm-utils 0.3.9 → 0.3.11

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.
Files changed (69) hide show
  1. package/dist/{pr-e-E4aP4j.d.cts → pr-D-eayWyJ.d.cts} +59 -1
  2. package/dist/{pr-e-E4aP4j.d.ts → pr-D-eayWyJ.d.ts} +59 -1
  3. package/dist/scripts/git/index.cjs +30 -14
  4. package/dist/scripts/git/index.d.cts +32 -1
  5. package/dist/scripts/git/index.d.ts +32 -1
  6. package/dist/scripts/git/index.js +28 -14
  7. package/dist/scripts/github/index.d.cts +2 -60
  8. package/dist/scripts/github/index.d.ts +2 -60
  9. package/dist/scripts/index.cjs +301 -98
  10. package/dist/scripts/index.d.cts +4 -4
  11. package/dist/scripts/index.d.ts +4 -4
  12. package/dist/scripts/index.js +296 -98
  13. package/dist/scripts/lakebase/branch.cli.cjs +55 -10
  14. package/dist/scripts/lakebase/branch.cli.js +55 -10
  15. package/dist/scripts/lakebase/ci-resolve-branch.cli.cjs +59 -24
  16. package/dist/scripts/lakebase/ci-resolve-branch.cli.js +59 -24
  17. package/dist/scripts/lakebase/collapse-heads.cli.cjs +16 -14
  18. package/dist/scripts/lakebase/collapse-heads.cli.js +16 -14
  19. package/dist/scripts/lakebase/cut-backup.cli.cjs +43 -10
  20. package/dist/scripts/lakebase/cut-backup.cli.js +43 -10
  21. package/dist/scripts/lakebase/cut-tier.cli.cjs +43 -10
  22. package/dist/scripts/lakebase/cut-tier.cli.js +43 -10
  23. package/dist/scripts/lakebase/detect-language.cli.cjs +16 -14
  24. package/dist/scripts/lakebase/detect-language.cli.js +16 -14
  25. package/dist/scripts/lakebase/doctor.cli.cjs +16 -14
  26. package/dist/scripts/lakebase/doctor.cli.js +16 -14
  27. package/dist/scripts/lakebase/get-connection.cli.cjs +16 -14
  28. package/dist/scripts/lakebase/get-connection.cli.js +16 -14
  29. package/dist/scripts/lakebase/index.cjs +313 -99
  30. package/dist/scripts/lakebase/index.d.cts +97 -2
  31. package/dist/scripts/lakebase/index.d.ts +97 -2
  32. package/dist/scripts/lakebase/index.js +310 -99
  33. package/dist/scripts/lakebase/infra-runner.cli.cjs +16 -14
  34. package/dist/scripts/lakebase/infra-runner.cli.js +16 -14
  35. package/dist/scripts/lakebase/new-migration.cli.cjs +16 -14
  36. package/dist/scripts/lakebase/new-migration.cli.js +16 -14
  37. package/dist/scripts/lakebase/schema-diff.cli.cjs +16 -14
  38. package/dist/scripts/lakebase/schema-diff.cli.js +16 -14
  39. package/dist/scripts/lakebase/schema-migrate.cli.cjs +16 -14
  40. package/dist/scripts/lakebase/schema-migrate.cli.js +16 -14
  41. package/dist/scripts/lakebase/scm-claim-feature.cli.cjs +59 -24
  42. package/dist/scripts/lakebase/scm-claim-feature.cli.js +59 -24
  43. package/dist/scripts/lakebase/scm-doctor.cli.cjs +59 -24
  44. package/dist/scripts/lakebase/scm-doctor.cli.js +59 -24
  45. package/dist/scripts/lakebase/scm-merge.cli.cjs +16 -14
  46. package/dist/scripts/lakebase/scm-merge.cli.js +16 -14
  47. package/dist/scripts/lakebase/scm-reconcile-tier.cli.cjs +16 -14
  48. package/dist/scripts/lakebase/scm-reconcile-tier.cli.js +16 -14
  49. package/dist/scripts/lakebase/scm-recover-orphans.cli.cjs +43 -10
  50. package/dist/scripts/lakebase/scm-recover-orphans.cli.js +43 -10
  51. package/dist/scripts/lakebase/snapshot.cli.cjs +418 -0
  52. package/dist/scripts/lakebase/snapshot.cli.d.cts +1 -0
  53. package/dist/scripts/lakebase/snapshot.cli.d.ts +1 -0
  54. package/dist/scripts/lakebase/snapshot.cli.js +395 -0
  55. package/dist/scripts/util/index.cjs +2 -2
  56. package/dist/scripts/util/index.js +2 -2
  57. package/package.json +2 -1
  58. package/scripts/git/commit-push.ts +60 -14
  59. package/scripts/lakebase/branch-create.ts +93 -14
  60. package/scripts/lakebase/branch.cli.ts +15 -0
  61. package/scripts/lakebase/create-preflight.ts +213 -1
  62. package/scripts/lakebase/create-project.ts +98 -30
  63. package/scripts/lakebase/get-connection.ts +29 -12
  64. package/scripts/lakebase/snapshot.cli.ts +117 -0
  65. package/scripts/lakebase/snapshot.ts +85 -0
  66. package/templates/project/common/scripts/run-tests.sh +43 -2
  67. package/templates/project/python/tests/conftest.py +22 -0
  68. package/templates/project/common/tests/e2e/__pycache__/conftest.cpython-314.pyc +0 -0
  69. package/templates/project/python/tests/__pycache__/conftest.cpython-314.pyc +0 -0
@@ -78996,6 +78996,7 @@ __export(scripts_exports, {
78996
78996
  catalogExists: () => catalogExists,
78997
78997
  catalogExplorerUrl: () => catalogExplorerUrl,
78998
78998
  checkDatabricksAuth: () => checkDatabricksAuth,
78999
+ checkGitHubPreflight: () => checkGitHubPreflight,
78999
79000
  checkGitHubScopes: () => checkGitHubScopes,
79000
79001
  checkGitHubWorkflowScope: () => checkGitHubWorkflowScope,
79001
79002
  checkoutBranch: () => checkoutBranch,
@@ -79013,6 +79014,7 @@ __export(scripts_exports, {
79013
79014
  commitAllSignedOff: () => commitAllSignedOff,
79014
79015
  commitAmend: () => commitAmend,
79015
79016
  commitAndPush: () => commitAndPush,
79017
+ commitInitial: () => commitInitial,
79016
79018
  commitSignedOff: () => commitSignedOff,
79017
79019
  compileMigrationPattern: () => compileMigrationPattern,
79018
79020
  connectionApplicationName: () => connectionApplicationName,
@@ -79027,6 +79029,7 @@ __export(scripts_exports, {
79027
79029
  createPullRequest: () => createPullRequest,
79028
79030
  createRegistrationToken: () => createRegistrationToken,
79029
79031
  createRepo: () => createRepo,
79032
+ createRollbackLedger: () => createRollbackLedger,
79030
79033
  createTag: () => createTag,
79031
79034
  createTestPairedBranch: () => createTestPairedBranch,
79032
79035
  createUatPairedBranch: () => createUatPairedBranch,
@@ -79210,6 +79213,7 @@ __export(scripts_exports, {
79210
79213
  push: () => push,
79211
79214
  pushCurrentBranchForPr: () => pushCurrentBranchForPr,
79212
79215
  pushFailureHint: () => pushFailureHint,
79216
+ pushInitial: () => pushInitial,
79213
79217
  pushTo: () => pushTo,
79214
79218
  queryBranchSchema: () => queryBranchSchema,
79215
79219
  queryBranchTables: () => queryBranchTables,
@@ -79299,6 +79303,7 @@ __export(scripts_exports, {
79299
79303
  waitForBranchReady: () => waitForBranchReady,
79300
79304
  waitForCi: () => waitForCi,
79301
79305
  warmAndVerifyKit: () => warmAndVerifyKit,
79306
+ withCreateRollback: () => withCreateRollback,
79302
79307
  withLakebaseRollback: () => withLakebaseRollback,
79303
79308
  withProxyEnv: () => withProxyEnv,
79304
79309
  workflowStateFileExists: () => workflowStateFileExists,
@@ -87388,9 +87393,46 @@ function dbcli3(args, host, timeout = KIT_TIMEOUTS.cliDefault) {
87388
87393
  }
87389
87394
 
87390
87395
  // scripts/lakebase/branch-create.ts
87396
+ function snapshotPath(instance, snapshot) {
87397
+ return snapshot.includes("/") ? snapshot : `${projectPath(instance)}/snapshots/${snapshot}`;
87398
+ }
87399
+ function applyExpiration(spec, ttl, noExpiry) {
87400
+ if (ttl && noExpiry === true) {
87401
+ throw new LakebaseBranchError(
87402
+ `Cannot set both ttl ("${ttl}") and noExpiry: true on the same branch \u2013 they are mutually exclusive. Pass one or the other.`
87403
+ );
87404
+ }
87405
+ if (ttl) spec.ttl = ttl;
87406
+ else if (noExpiry ?? true) spec.no_expiry = true;
87407
+ }
87391
87408
  async function createBranch(args) {
87392
87409
  const sanitized = sanitizeBranchName(args.branch);
87393
87410
  const lookup = { instance: args.instance, host: args.host };
87411
+ if (args.fromSnapshot) {
87412
+ if (args.parentBranch || args.sourceBranchTime || args.sourceBranchLsn) {
87413
+ throw new LakebaseBranchError(
87414
+ `fromSnapshot is mutually exclusive with parentBranch / sourceBranchTime / sourceBranchLsn (the Lakebase API rejects source_snapshot combined with any source_branch field).`
87415
+ );
87416
+ }
87417
+ const existing2 = await getBranchByName(sanitized, lookup);
87418
+ if (existing2) return existing2;
87419
+ const spec = { source_snapshot: snapshotPath(args.instance, args.fromSnapshot) };
87420
+ applyExpiration(spec, args.ttl, args.noExpiry);
87421
+ try {
87422
+ await createWithTtlRecovery(args.instance, sanitized, spec, args.host);
87423
+ } catch (err) {
87424
+ if (err instanceof LakebaseBranchTtlTooLongError) throw err;
87425
+ const landed = await getBranchByName(sanitized, lookup);
87426
+ if (!landed) throw err;
87427
+ }
87428
+ return waitForBranchReady({
87429
+ instance: args.instance,
87430
+ host: args.host,
87431
+ branch: sanitized,
87432
+ timeoutMs: args.readyTimeoutMs ?? KIT_TIMEOUTS.readyWait,
87433
+ pollIntervalMs: args.pollIntervalMs ?? KIT_TIMEOUTS.readyPoll
87434
+ });
87435
+ }
87394
87436
  let sourceBranchPath;
87395
87437
  if (args.parentBranch) {
87396
87438
  if (looksLikeBranchUid(args.parentBranch)) {
@@ -87438,19 +87480,15 @@ async function createBranch(args) {
87438
87480
  assertSourceMatches(existing, sourceBranchPath, sanitized);
87439
87481
  return existing;
87440
87482
  }
87441
- if (args.ttl && args.noExpiry === true) {
87483
+ if (args.sourceBranchTime && args.sourceBranchLsn) {
87442
87484
  throw new LakebaseBranchError(
87443
- `Cannot set both ttl ("${args.ttl}") and noExpiry: true on the same branch \u2013 they are mutually exclusive. Pass one or the other.`
87485
+ `sourceBranchTime and sourceBranchLsn are mutually exclusive \u2013 pass at most one point-in-time.`
87444
87486
  );
87445
87487
  }
87446
- const specObj = {
87447
- source_branch: sourceBranchPath
87448
- };
87449
- if (args.ttl) {
87450
- specObj.ttl = args.ttl;
87451
- } else if (args.noExpiry ?? true) {
87452
- specObj.no_expiry = true;
87453
- }
87488
+ const specObj = { source_branch: sourceBranchPath };
87489
+ if (args.sourceBranchTime) specObj.source_branch_time = args.sourceBranchTime;
87490
+ else if (args.sourceBranchLsn) specObj.source_branch_lsn = args.sourceBranchLsn;
87491
+ applyExpiration(specObj, args.ttl, args.noExpiry);
87454
87492
  try {
87455
87493
  await createWithTtlRecovery(args.instance, sanitized, specObj, args.host);
87456
87494
  } catch (err) {
@@ -88959,8 +88997,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
88959
88997
  var cached;
88960
88998
  function substrateSelfVersion() {
88961
88999
  if (cached !== void 0) return cached;
88962
- if ("0.3.9".length > 0) {
88963
- cached = "0.3.9";
89000
+ if ("0.3.11".length > 0) {
89001
+ cached = "0.3.11";
88964
89002
  return cached;
88965
89003
  }
88966
89004
  cached = "unknown";
@@ -89007,22 +89045,24 @@ async function getConnection(args) {
89007
89045
  const endpointPath2 = `projects/${args.instance}/branches/${branchId}/endpoints/${endpointName}`;
89008
89046
  if (args.output === "dsn") {
89009
89047
  const host2 = await resolveEndpointHost(args.instance, branchId);
89010
- const { token, email: email2 } = await mintCredential(endpointPath2);
89011
- const url = buildPostgresUrl({ host: host2, port: POSTGRES_PORT, database, user: email2, password: token });
89048
+ const { token: token2, email: email2 } = await mintCredential(endpointPath2);
89049
+ const url = buildPostgresUrl({ host: host2, port: POSTGRES_PORT, database, user: email2, password: token2 });
89012
89050
  return { url, host: host2, port: POSTGRES_PORT, database, user: email2, endpointPath: endpointPath2 };
89013
89051
  }
89014
89052
  const host = await resolveEndpointHost(args.instance, branchId);
89015
- const email = await resolveCurrentUser();
89016
89053
  process.env.PGAPPNAME = connectionApplicationName();
89017
- return createLakebasePool({
89018
- endpoint: endpointPath2,
89019
- host,
89020
- database,
89021
- user: email,
89022
- // workspaceClient is passed through verbatim. createLakebasePool falls
89023
- // back to environment / ServiceContext when omitted.
89024
- ...args.workspaceClient !== void 0 ? { workspaceClient: args.workspaceClient } : {}
89025
- });
89054
+ if (args.workspaceClient !== void 0) {
89055
+ const email2 = await resolveCurrentUser();
89056
+ return createLakebasePool({
89057
+ endpoint: endpointPath2,
89058
+ host,
89059
+ database,
89060
+ user: email2,
89061
+ workspaceClient: args.workspaceClient
89062
+ });
89063
+ }
89064
+ const { token, email } = await mintCredential(endpointPath2);
89065
+ return createLakebasePool({ host, database, user: email, password: token });
89026
89066
  }
89027
89067
  async function resolveEndpointHost(instance, branch) {
89028
89068
  const branchId = await resolveBranchId({ instance, branch });
@@ -90665,6 +90705,70 @@ async function checkGitHubWorkflowScope(probe = () => checkGitHubScopes(["workfl
90665
90705
  return { ok: true };
90666
90706
  }
90667
90707
  }
90708
+ async function checkGitHubPreflight(input) {
90709
+ const warnings = [];
90710
+ const hard = input.hardScopes ?? ["repo", "workflow"];
90711
+ const advisory = input.advisoryScopes ?? ["delete_repo"];
90712
+ const currentUserProbe = input.currentUser ?? getCurrentUser;
90713
+ const scopesProbe = input.scopes ?? ((req) => checkGitHubScopes(req));
90714
+ const repoExistsProbe = input.repoExists ?? repoExists;
90715
+ let activeUser;
90716
+ try {
90717
+ activeUser = await currentUserProbe();
90718
+ } catch (err) {
90719
+ return {
90720
+ ok: false,
90721
+ warnings,
90722
+ reason: `GitHub authentication failed: ${err instanceof Error ? err.message : String(err)}. Sign in with \`gh auth login\`, or set GITHUB_TOKEN to a valid token, then re-run.`
90723
+ };
90724
+ }
90725
+ if (activeUser.toLowerCase() !== input.owner.toLowerCase()) {
90726
+ warnings.push(
90727
+ `Signed in to GitHub as "${activeUser}" but creating under "${input.owner}" (an org or another account); ensure "${activeUser}" can create repositories there.`
90728
+ );
90729
+ }
90730
+ try {
90731
+ const { granted, missing } = await scopesProbe([...hard, ...advisory]);
90732
+ if (granted !== null) {
90733
+ const missingHard = missing.filter((s2) => hard.includes(s2));
90734
+ const missingAdvisory = missing.filter((s2) => advisory.includes(s2));
90735
+ if (missingHard.length > 0) {
90736
+ return {
90737
+ ok: false,
90738
+ warnings,
90739
+ activeUser,
90740
+ reason: `GitHub token missing required scope(s): ${missingHard.join(", ")} (grants [${granted.join(", ") || "none"}]). Fix: gh auth refresh -h github.com -s ${[...hard].join(",")}`
90741
+ };
90742
+ }
90743
+ if (missingAdvisory.length > 0) {
90744
+ warnings.push(
90745
+ `GitHub token missing the ${missingAdvisory.join(", ")} scope \u2014 automatic rollback of the repo on a failed create is unavailable (you would delete it by hand). Grant it with: gh auth refresh -h github.com -s delete_repo`
90746
+ );
90747
+ }
90748
+ } else {
90749
+ warnings.push(
90750
+ "GitHub token scopes are not visible (fine-grained PAT or App token); cannot pre-verify repo/workflow access , the create will surface any gap when it pushes."
90751
+ );
90752
+ }
90753
+ } catch {
90754
+ warnings.push("Could not read GitHub token scopes (probe error); skipping the scope pre-check.");
90755
+ }
90756
+ try {
90757
+ if (await repoExistsProbe(`${input.owner}/${input.repoName}`)) {
90758
+ return {
90759
+ ok: false,
90760
+ warnings,
90761
+ activeUser,
90762
+ reason: `GitHub repo "${input.owner}/${input.repoName}" already exists. Pick a different project name, or delete the existing repo first.`
90763
+ };
90764
+ }
90765
+ } catch {
90766
+ warnings.push(
90767
+ `Could not check whether "${input.owner}/${input.repoName}" already exists (probe error); the create will fail clearly if it does.`
90768
+ );
90769
+ }
90770
+ return { ok: true, warnings, activeUser };
90771
+ }
90668
90772
  function githubWorkflowScopePrereqMessage(reason) {
90669
90773
  return "The GitHub token lacks the `workflow` OAuth scope, required to push the project's `.github/workflows/*` CI files. (Without this check, scaffolding runs all the way to the final push, is rejected, and rolls back.) Grant the scope, then re-run:\n - gh CLI: gh auth refresh -h github.com -s workflow\n - VS Code: re-sign in to GitHub and approve the workflow scope\n - token: set GITHUB_TOKEN to a PAT that includes the `workflow` scope" + (reason ? `
90670
90774
  (${reason})` : "");
@@ -90730,6 +90834,53 @@ async function withLakebaseRollback(opts, fn) {
90730
90834
  throw wrapped;
90731
90835
  }
90732
90836
  }
90837
+ function createRollbackLedger() {
90838
+ const steps = [];
90839
+ return {
90840
+ register: (label, undo) => {
90841
+ steps.push({ label, undo });
90842
+ },
90843
+ steps: () => steps
90844
+ };
90845
+ }
90846
+ async function withCreateRollback(ledger, opts, fn) {
90847
+ try {
90848
+ return await fn();
90849
+ } catch (err) {
90850
+ const report = opts.report ?? (() => {
90851
+ });
90852
+ const steps = [...ledger.steps()].reverse();
90853
+ const rolledBack = [];
90854
+ const failed = [];
90855
+ if (steps.length > 0) report(`Create failed; rolling back ${steps.length} created resource(s)...`);
90856
+ for (const s2 of steps) {
90857
+ try {
90858
+ report(` rolling back: ${s2.label}`);
90859
+ await s2.undo();
90860
+ rolledBack.push(s2.label);
90861
+ } catch (e2) {
90862
+ const m2 = e2 instanceof Error ? e2.message : String(e2);
90863
+ if (/not.?found/i.test(m2)) {
90864
+ rolledBack.push(s2.label);
90865
+ continue;
90866
+ }
90867
+ failed.push(`${s2.label} (${m2})`);
90868
+ }
90869
+ }
90870
+ const base = err instanceof Error ? err.message : String(err);
90871
+ const parts = [];
90872
+ if (rolledBack.length) parts.push(`rolled back: ${rolledBack.join(", ")}`);
90873
+ if (failed.length) {
90874
+ parts.push(
90875
+ `COULD NOT roll back: ${failed.join("; ")} , clean these up by hand before retrying the same name`
90876
+ );
90877
+ }
90878
+ const suffix = parts.length ? ` (${parts.join("; ")})` : "";
90879
+ const wrapped = err instanceof Error ? err : new Error(base);
90880
+ wrapped.message = `${base}${suffix}`;
90881
+ throw wrapped;
90882
+ }
90883
+ }
90733
90884
 
90734
90885
  // scripts/lakebase/create-project.ts
90735
90886
  init_cjs_shims();
@@ -90798,26 +90949,38 @@ To finish:
90798
90949
  }
90799
90950
  };
90800
90951
  async function commitAndPush(args) {
90801
- await exec2("git add -A", { cwd: args.projectDir });
90802
- await exec2(`git commit -m ${JSON.stringify(args.message)}`, {
90803
- cwd: args.projectDir,
90952
+ await commitInitial(args.projectDir, args.message);
90953
+ if (args.push === false) return;
90954
+ await pushInitial({ projectDir: args.projectDir, remote: args.remote, branch: args.branch });
90955
+ }
90956
+ async function commitInitial(projectDir, message) {
90957
+ await exec2("git add -A", { cwd: projectDir });
90958
+ await exec2(`git commit -m ${JSON.stringify(message)}`, {
90959
+ cwd: projectDir,
90804
90960
  timeout: 3e4
90805
90961
  });
90806
- if (args.push === false) return;
90962
+ }
90963
+ async function pushInitial(args) {
90807
90964
  const remote = args.remote ?? "origin";
90808
90965
  const branch = args.branch ?? "main";
90809
- try {
90810
- await exec2(`git push -u ${remote} ${branch}`, {
90811
- cwd: args.projectDir,
90812
- timeout: 3e4
90813
- });
90814
- } catch (err) {
90815
- const msg = err instanceof Error ? err.message : String(err);
90816
- if (/without `?workflow`? scope|workflow scope/i.test(msg)) {
90817
- throw new WorkflowScopeError(args.projectDir);
90966
+ const attempts = Math.max(1, args.attempts ?? 1);
90967
+ const sleep2 = args.sleep ?? ((ms) => new Promise((r2) => setTimeout(r2, ms)));
90968
+ const run = args.run ?? ((cmd, cwd) => exec2(cmd, { cwd, timeout: 3e4 }).then(() => void 0));
90969
+ let lastErr;
90970
+ for (let i2 = 1; i2 <= attempts; i2++) {
90971
+ try {
90972
+ await run(`git push -u ${remote} ${branch}`, args.projectDir);
90973
+ return;
90974
+ } catch (err) {
90975
+ const msg = err instanceof Error ? err.message : String(err);
90976
+ if (/without `?workflow`? scope|workflow scope/i.test(msg)) {
90977
+ throw new WorkflowScopeError(args.projectDir);
90978
+ }
90979
+ lastErr = err;
90980
+ if (i2 < attempts) await sleep2(args.delayMs ?? 1500);
90818
90981
  }
90819
- throw err;
90820
90982
  }
90983
+ throw lastErr instanceof Error ? lastErr : new Error(String(lastErr));
90821
90984
  }
90822
90985
 
90823
90986
  // scripts/lakebase/scaffold.ts
@@ -93000,64 +93163,72 @@ async function createProject(input, progress) {
93000
93163
  throw new Error(databricksAuthPrereqMessage(host, auth7.reason));
93001
93164
  }
93002
93165
  if (useGithub) {
93003
- report("Checking GitHub token scopes...");
93004
- const scope = await checkGitHubWorkflowScope();
93005
- if (!scope.ok) {
93006
- throw new Error(githubWorkflowScopePrereqMessage(scope.reason));
93007
- }
93008
- }
93009
- if (useGithub) {
93010
- report("Creating GitHub repository...", fullRepoName);
93011
- await createRepo(fullRepoName, {
93012
- private: input.privateRepo !== false,
93013
- description: `Lakebase project: ${input.projectName}`
93014
- });
93015
- report("Waiting for GitHub repo to be visible...", fullRepoName);
93016
- const probeDelays = [1e3, 2e3, 3e3, 5e3, 8e3];
93017
- let probeErr = "";
93018
- let visible = false;
93019
- for (const waitMs of probeDelays) {
93020
- try {
93021
- await getRepoFullName(fullRepoName);
93022
- visible = true;
93023
- break;
93024
- } catch (err) {
93025
- probeErr = err instanceof Error ? err.message : String(err);
93026
- await delay(waitMs);
93027
- }
93028
- }
93029
- if (!visible) {
93030
- let activeUser = "";
93031
- try {
93032
- activeUser = await getCurrentUser();
93033
- } catch {
93034
- }
93035
- const samlHint = /SAML|scope does not match|sso/i.test(probeErr) ? "\n\nThe error mentions SAML \u2013 re-sign in to GitHub and authorize SSO for this org." : "";
93036
- const userHint = activeUser && activeUser !== input.githubOwner ? `
93166
+ report("Checking GitHub account + token requisites...");
93167
+ const gh = await checkGitHubPreflight({ owner: input.githubOwner, repoName: input.projectName });
93168
+ for (const w of gh.warnings) {
93169
+ warnings.push(w);
93170
+ report(`Note: ${w}`);
93171
+ }
93172
+ if (!gh.ok) throw new Error(gh.reason);
93173
+ }
93174
+ const rollback = createRollbackLedger();
93175
+ return await withCreateRollback(
93176
+ rollback,
93177
+ { report },
93178
+ async () => {
93179
+ if (useGithub) {
93180
+ report("Creating GitHub repository...", fullRepoName);
93181
+ await createRepo(fullRepoName, {
93182
+ private: input.privateRepo !== false,
93183
+ description: `Lakebase project: ${input.projectName}`
93184
+ });
93185
+ rollback.register(`GitHub repo ${fullRepoName}`, () => deleteRepo(fullRepoName));
93186
+ report("Waiting for GitHub repo to be visible...", fullRepoName);
93187
+ const probeDelays = [1e3, 2e3, 3e3, 5e3, 8e3];
93188
+ let probeErr = "";
93189
+ let visible = false;
93190
+ for (const waitMs of probeDelays) {
93191
+ try {
93192
+ await getRepoFullName(fullRepoName);
93193
+ visible = true;
93194
+ break;
93195
+ } catch (err) {
93196
+ probeErr = err instanceof Error ? err.message : String(err);
93197
+ await delay(waitMs);
93198
+ }
93199
+ }
93200
+ if (!visible) {
93201
+ let activeUser = "";
93202
+ try {
93203
+ activeUser = await getCurrentUser();
93204
+ } catch {
93205
+ }
93206
+ const samlHint = /SAML|scope does not match|sso/i.test(probeErr) ? "\n\nThe error mentions SAML \u2013 re-sign in to GitHub and authorize SSO for this org." : "";
93207
+ const userHint = activeUser && activeUser !== input.githubOwner ? `
93037
93208
 
93038
93209
  Note: signed in as "${activeUser}", but the repo was created under "${input.githubOwner}".` : "";
93039
- throw new Error(
93040
- `GitHub repo "${fullRepoName}" was created but isn't visible after ~19s of polling.${samlHint}${userHint}
93210
+ throw new Error(
93211
+ `GitHub repo "${fullRepoName}" was created but isn't visible after ~19s of polling.${samlHint}${userHint}
93041
93212
 
93042
93213
  Last probe error:
93043
93214
  ${probeErr.split("\n")[0].slice(0, 200)}`
93044
- );
93045
- }
93046
- report("Cloning repository...", projectDir);
93047
- await cloneRepo({
93048
- repoUrl: `https://github.com/${fullRepoName}.git`,
93049
- parentDir: input.parentDir
93050
- });
93051
- } else {
93052
- report("Creating local project directory...", projectDir);
93053
- fs20.mkdirSync(projectDir, { recursive: true });
93054
- await gitInit(projectDir);
93055
- }
93056
- report("Creating Lakebase database (provisioning Postgres)...", lakebaseProjectId);
93057
- await createLakebaseProject({ projectId: lakebaseProjectId, host });
93058
- return await withLakebaseRollback(
93059
- { projectId: lakebaseProjectId, host, report },
93060
- async () => {
93215
+ );
93216
+ }
93217
+ report("Cloning repository...", projectDir);
93218
+ await cloneRepo({
93219
+ repoUrl: `https://github.com/${fullRepoName}.git`,
93220
+ parentDir: input.parentDir
93221
+ });
93222
+ rollback.register(`local project dir ${projectDir}`, () => fs20.rmSync(projectDir, { recursive: true, force: true }));
93223
+ } else {
93224
+ report("Creating local project directory...", projectDir);
93225
+ fs20.mkdirSync(projectDir, { recursive: true });
93226
+ await gitInit(projectDir);
93227
+ rollback.register(`local project dir ${projectDir}`, () => fs20.rmSync(projectDir, { recursive: true, force: true }));
93228
+ }
93229
+ report("Creating Lakebase database (provisioning Postgres)...", lakebaseProjectId);
93230
+ await createLakebaseProject({ projectId: lakebaseProjectId, host });
93231
+ rollback.register(`Lakebase project ${lakebaseProjectId}`, () => deleteLakebaseProject({ projectId: lakebaseProjectId, host }));
93061
93232
  report("Resolving database endpoint...");
93062
93233
  const defaultBranchId = await getDefaultBranchId({
93063
93234
  projectId: lakebaseProjectId,
@@ -93141,6 +93312,10 @@ Last probe error:
93141
93312
  projectName: input.projectName,
93142
93313
  report: (m2) => report(m2)
93143
93314
  });
93315
+ rollback.register(
93316
+ `self-hosted runner ${input.projectName}`,
93317
+ () => removeRunner({ fullRepoName, projectName: input.projectName })
93318
+ );
93144
93319
  } catch (err) {
93145
93320
  const msg = err instanceof Error ? err.message : String(err);
93146
93321
  warnings.push(`Runner setup failed: ${msg}`);
@@ -93209,6 +93384,16 @@ Last probe error:
93209
93384
  "The Consort toolkit downloads on first use , run `./scripts/lk --refresh`, or just your first `./scripts/lk` command, and it installs then."
93210
93385
  );
93211
93386
  }
93387
+ if (enableSftdd && useGithub) {
93388
+ report("Warming the Consort toolkit (so the first push doesn't cold-download mid-hook)...");
93389
+ let warm = warmAndVerifyKit(projectDir);
93390
+ if (!warm.ok) warm = warmAndVerifyKit(projectDir);
93391
+ if (!warm.ok) {
93392
+ const m2 = kitWarmWarning(projectDir, warm.reason);
93393
+ warnings.push(m2);
93394
+ report(`Note: ${m2}`);
93395
+ }
93396
+ }
93212
93397
  const langLabels = {
93213
93398
  java: "Java/Spring Boot",
93214
93399
  kotlin: "Kotlin/Spring Boot",
@@ -93229,12 +93414,25 @@ Last probe error:
93229
93414
  }
93230
93415
  }
93231
93416
  report("Creating initial commit...");
93232
- await commitAndPush({
93233
- projectDir,
93234
- message: `Initial project scaffold (${langLabel} + Lakebase)`,
93235
- push: useGithub
93236
- });
93237
- if (tiers === 2 || tiers === 3) {
93417
+ await commitInitial(projectDir, `Initial project scaffold (${langLabel} + Lakebase)`);
93418
+ let pushLanded = !useGithub;
93419
+ if (useGithub) {
93420
+ try {
93421
+ await pushInitial({ projectDir, attempts: 2 });
93422
+ pushLanded = true;
93423
+ } catch (err) {
93424
+ if (err instanceof WorkflowScopeError) throw err;
93425
+ const msg = err instanceof Error ? err.message : String(err);
93426
+ const m2 = `Provisioning is complete, but the initial push did not land after a retry: ${msg}. The project on disk is fine , finish it with: cd ${projectDir} && git push -u origin main`;
93427
+ warnings.push(m2);
93428
+ report(`WARNING: ${m2}`);
93429
+ }
93430
+ }
93431
+ if ((tiers === 2 || tiers === 3) && !pushLanded) {
93432
+ const m2 = `INCOMPLETE TIERS: you requested ${tiers} tiers, but the initial push hasn't landed, so the tier branches can't fork off origin yet. After you finish the push (above), cut them with \`./scripts/lk lakebase-cut-tier --name staging --fork-from main\`${tiers === 3 ? " and `--name dev --fork-from staging`" : ""}.`;
93433
+ warnings.push(m2);
93434
+ report(`WARNING: ${m2}`);
93435
+ } else if (tiers === 2 || tiers === 3) {
93238
93436
  report(`Cutting staging tier (tiers=${tiers}) via createLongRunningBranch...`);
93239
93437
  try {
93240
93438
  await createLongRunningBranch({
@@ -93285,7 +93483,7 @@ Last probe error:
93285
93483
  warnings
93286
93484
  };
93287
93485
  }
93288
- // end withLakebaseRollback closure
93486
+ // end withCreateRollback closure
93289
93487
  );
93290
93488
  }
93291
93489
 
@@ -98675,6 +98873,7 @@ function isCliEntry(importMetaUrl2) {
98675
98873
  catalogExists,
98676
98874
  catalogExplorerUrl,
98677
98875
  checkDatabricksAuth,
98876
+ checkGitHubPreflight,
98678
98877
  checkGitHubScopes,
98679
98878
  checkGitHubWorkflowScope,
98680
98879
  checkoutBranch,
@@ -98692,6 +98891,7 @@ function isCliEntry(importMetaUrl2) {
98692
98891
  commitAllSignedOff,
98693
98892
  commitAmend,
98694
98893
  commitAndPush,
98894
+ commitInitial,
98695
98895
  commitSignedOff,
98696
98896
  compileMigrationPattern,
98697
98897
  connectionApplicationName,
@@ -98706,6 +98906,7 @@ function isCliEntry(importMetaUrl2) {
98706
98906
  createPullRequest,
98707
98907
  createRegistrationToken,
98708
98908
  createRepo,
98909
+ createRollbackLedger,
98709
98910
  createTag,
98710
98911
  createTestPairedBranch,
98711
98912
  createUatPairedBranch,
@@ -98889,6 +99090,7 @@ function isCliEntry(importMetaUrl2) {
98889
99090
  push,
98890
99091
  pushCurrentBranchForPr,
98891
99092
  pushFailureHint,
99093
+ pushInitial,
98892
99094
  pushTo,
98893
99095
  queryBranchSchema,
98894
99096
  queryBranchTables,
@@ -98978,6 +99180,7 @@ function isCliEntry(importMetaUrl2) {
98978
99180
  waitForBranchReady,
98979
99181
  waitForCi,
98980
99182
  warmAndVerifyKit,
99183
+ withCreateRollback,
98981
99184
  withLakebaseRollback,
98982
99185
  withProxyEnv,
98983
99186
  workflowStateFileExists,
@@ -1,7 +1,7 @@
1
- export { CreateRepoOptions, GITHUB_SCOPES, GitHubAuthDiagnosis, GitHubAuthSource, GitHubRepoError, GitHubRunnerError, GitHubScopeStatus, GitHubSecretsError, RepoRunner, VsCodeSessionOptions, checkGitHubScopes, createRegistrationToken, createRepo, deleteRepo, deleteRunner, diagnoseGitHubAuth, getActionsEnabled, getCurrentUser, getRepoFullName, getRunnerIdByName, getRunnerStatus, listRepoRunners, listSecretNames, repoExists, resolveGitHubToken, setRepoSecret, setRepoSecrets, tryGhAuthToken, tryVsCodeSession } from './github/index.cjs';
2
- export { C as CreatePullRequestArgs, F as FastForwardBranchArgs, G as GitHubPullRequestError, M as MergePairedPullRequestArgs, a as MergePairedPullRequestResult, b as MergePullRequestArgs, c as MergePullRequestResult, P as PullRequestCheck, d as PullRequestFile, e as PullRequestInfo, f as PullRequestReview, W as WorkflowRunSummary, g as createPullRequest, h as fastForwardBranch, i as getPullRequest, j as getPullRequestComments, k as getPullRequestFiles, l as getPullRequestReviews, m as listIssueComments, n as listWorkflowRuns, o as mergePairedPullRequest, p as mergePullRequest } from '../pr-e-E4aP4j.cjs';
3
- export { AbandonFeatureArgs, AbandonFeatureResult, AddE2eToRunTestsScriptArgs, AddE2eToRunTestsScriptResult, AddInfraToPackageJsonArgs, AddInfraToPackageJsonResult, AddInfraToRunTestsScriptArgs, AddInfraToRunTestsScriptResult, AddPlaywrightToPackageJsonArgs, AddPlaywrightToPackageJsonResult, AddPythonE2eDepsArgs, AddPythonE2eDepsResult, AdoptLakebaseProjectArgs, AdoptLakebaseProjectResult, AdoptStateArgs, AdoptStateResult, AppServicePrincipal, AppliedSchemaMigration, ApplySchemaMigrationsArgs, ApplySchemaMigrationsResult, BranchLookupOpts, BranchMetadata, CONVENTION_TIER_DEFAULTS, CatalogExistsArgs, CheckoutMode, CheckoutPairedArgs, CheckoutPairedResult, ClaimFeatureBranchArgs, ClaimFeatureBranchResult, ClaimedOrphan, ClientFramework, CommandDriftReport, CommandFileEntry, CommandFileStatus, ConnectionArgs, ConsortSetupHooks, CreateBranchArgs, CreateConventionBranchArgs, CreateConventionPairedBranchArgs, CreateLongRunningBranchArgs, CreateLongRunningBranchResult, CreatePairedBranchArgs, CreatePairedBranchResult, CreateProjectArgs, CreateProjectResult, CutBackupArgs, CutBackupResult, DEFAULT_PROTECTED_TIER_NAMES, DOTNET_EFCORE_DEFAULTS, DOTNET_FLYWAY_DIR, DatabricksProfile, DeleteAppEndpointArgs, DeleteAppEndpointResult, DeleteBranchArgs, DeletePairedBranchArgs, DeletePairedBranchResult, DeployClaudeCommandsOptions, DeployClaudeCommandsResult, DeployEnvExampleArgs, DeployLanguageProjectArgs, DeploySpringStarterArgs, DeployTarget, DeployTargetsConfig, DetectCommandDriftArgs, DetectScaffoldedDriftArgs, DetectWorkflowDriftArgs, DoctorArgs, DoctorFinding, DoctorReport, DoctorSeverity, DotnetMigrationTool, DsnArgs, DsnResult, EF_DESIGN_PACKAGE, EfCoreProject, EnableE2eForProjectArgs, EnableE2eForProjectResult, EnableInfraForProjectArgs, EnableInfraForProjectResult, EndpointInfo, EnsureAppEndpointArgs, EnsureAppEndpointResult, EnsureEndpointArgs, EnsureLakebaseSecretAuthArgs, EnsureLakebaseSecretAuthResult, EnsureProfilePinnedArgs, EnsureProfilePinnedResult, EnsureSchemaAndVolumeArgs, EnsureSchemaAndVolumeResult, FIXABLE_FINDING_IDS, FixFindingArgs, FixFindingResult, FixableFindingId, GateInvariant, GateStatus, GenerateAppYamlOptions, GenerateMavenProjectOptions, GetAppEndpointArgs, GetAppEndpointResult, GetAppServicePrincipalArgs, GetCiAppEndpointArgs, GetCiAppEndpointResult, GetConnectionArgs, GetCredentialArgs, GetEndpointArgs, GetSchemaDiffArgs, GrantLakebasePermissionArgs, GrantLakebasePermissionResult, GrantUcCatalogPermissionArgs, GrantUcCatalogPermissionResult, HealthDoctorReport, HookVerification, InfraCheckResult, InfraSuiteResult, InitWorkflowStateArgs, InitializrMetadata, InitializrNetworkError, InitializrParseError, InstallPlaywrightArgs, InstallPlaywrightOptions, InstallPlaywrightResult, LakebaseBranchError, LakebaseBranchInfo, LakebaseBranchTtlTooLongError, LakebasePermissionLevel, LakebaseProjectArgs, LakebaseProjectError, LakebaseProjectInfo, LakebaseProjectMetadata, ListSchemaMigrationsArgs, MAVEN_FLYWAY_DIR, MIGRATION_DEFAULTS, MergeArgs, MergePairedArgs, MergePairedResult, MergeResult, MigrationDefaults, MigrationLanguage, MigrationLayout, ModifiedSchemaObject, NODE_E2E_TEMPLATE_FILES, OrphanCandidate, PLAYWRIGHT_TEMPLATE_FILES, PLAYWRIGHT_TEST_VERSION_RANGE, PYTEST_BDD_VERSION_RANGE, PYTEST_PLAYWRIGHT_VERSION_RANGE, PYTHON_E2E_TEMPLATE_FILES, PendingSchemaMigration, PoolArgs, PreflightResult, PreparePrArgs, PreparePrResult, ProgressCallback, ProjectLanguage, PropagateCredentialsArgs, PropagateCredentialsResult, ProtectedBranchCommitError, QueryBranchSchemaArgs, RecoverOrphansArgs, RecoverOrphansResult, ReleaseArgs, ReleaseResult, RemoveRunnerArgs, ResolveDatabricksHostArgs, ResolveMigrationLayoutArgs, RollbackDeployArgs, RollbackDeployResult, RollbackOptions, RollbackSchemaMigrationArgs, RollbackSchemaMigrationResult, RunDoctorDeps, RunInfraSuiteArgs, RunPlaywrightInstallArgs, RunPlaywrightInstallResult, RunnerInfo, RunnerReportFn, RunnerType, SCM_STATES, STATE_FILE_REL, ScaffoldAllArgs, ScaffoldOptions, ScaffoldReportFn, ScaffoldStaticAllArgs, ScaffoldStaticAllResult, ScaffoldedDriftReport, SchemaColumn, SchemaDiffResult, SchemaMigrationError, SchemaMigrationFile, SchemaMigrationLanguage, SchemaMigrationStatusArgs, SchemaMigrationStatusResult, SchemaMigrationToolName, SchemaObject, SchemaQueryRow, ScmAbandonError, ScmAdoptError, ScmClaimError, ScmDoctorFixError, ScmMergeError, ScmPreparePrError, ScmRecoverError, ScmReleaseError, ScmState, ScmWaitCiError, ScmWorkflowState, SetupRunnerArgs, SftddSetupHooks, SpringInitializrClient, SpringJvmLanguage, StaleBranchFinding, SyncEnvArgs, SyncEnvResult, TableSchema, TierTopology, TryCreateCatalogArgs, TryCreateCatalogResult, UcCatalogPermission, UpdateEnvConnectionArgs, UpdateWorkflowsArgs, UpdateWorkflowsResult, UploadDirectoryArgs, UploadDirectoryResult, ValidateAppOptions, ValidateAppResult, ValidationError, ValidationResult, WaitCiArgs, WaitCiResult, WaitForBranchAuthReadyArgs, WaitForBranchReadyArgs, WorkflowDriftReport, WorkflowFileStatus, WorkflowFileUpdate, WorkflowStatus, WorkflowUpdateOutcome, WorkflowVerification, WriteEnvFileArgs, WritePlaywrightTemplatesArgs, WritePlaywrightTemplatesResult, _testMakeBrownfieldFixture, abandonFeatureBranch, addE2eToRunTestsScript, addInfraToPackageJson, addInfraToRunTestsScript, addPlaywrightToPackageJson, adoptLakebaseProject, adoptScmState, applySchemaMigrations, assertAdoptionPreflight, assertCleanForFork, assertCommitTargetNotProtected, assertCreatedProjectReady, buildPostgresUrl, buildSchemaQuery, cacheProjectRetention, catalogExists, catalogExplorerUrl, checkDatabricksAuth, checkGitHubWorkflowScope, checkoutPaired, claimFeatureBranch, clearRetentionCache, compileMigrationPattern, connectionApplicationName, createBranch, createFeaturePairedBranch, createLakebaseProject, createLongRunningBranch, createPairedBranch, createPerfPairedBranch, createProject, createTestPairedBranch, createUatPairedBranch, cutBackup, databricksAuthPrereqMessage, defaultRefreshPromoteWorkflows, deleteAppEndpoint, deleteBranch, deleteLakebaseProject, deletePairedBranch, deleteProjectArgs, deployClaudeAgents, deployClaudeCommands, deployClaudeSettings, deployClaudeSkills, deployClientProject, deployDeployTargets, deployEnv, deployEnvExample, deployGitignore, deployLanguageProject, deployScripts, deploySpringStarter, deployVscodeSettings, deployWorkflows, deriveCiAppName, describeGates, detectCommandDrift, detectLanguage, detectLanguageAt, detectScaffoldedDrift, detectWorkflowDrift, dirIsEmpty, enableE2eForProject, enableInfraForProject, endpointPath, ensureAppEndpoint, ensureCachedArchive, ensureEndpoint, ensureLakebaseSecretAuth, ensureProfilePinned, ensurePythonBddDeps, ensurePythonE2eDeps, ensureSchemaAndVolume, extractPullNumber, featureBranchName, findCsprojFiles, findDefaultBranchName, findEfCoreProject, findHistoryRetentionDuration, fixFinding, flywayMigrationsDir, formatJUnit, formatSchemaDiffAsMarkdown, generateAppYaml, getAppEndpoint, getAppServicePrincipal, getBranchByName, getCachedProjectRetention, getCiAppEndpoint, getConnection, getCredential, getDefaultBranch, getDefaultBranchId, getDefaultBranchName, getEndpoint, getProjectInfo, getProjectRetentionDuration, getRunnerInfo, getSchemaDiff, getTargetNames, githubWorkflowScopePrereqMessage, grantLakebasePermission, grantUcCatalogPermission, hasDotnetMarker, inferTierTopology, initWorkflowState, installHooks, installPlaywright, isAllSchemas, isDotnetFlywayProject, isDotnetProject, isForeignFeatureClaim, isGitTracked, isLongRunningTierBranch, isLtsJavaVersion, isPrereleaseBootVersion, isRunning, isTier, isTtlTooLongError, kitWarmWarning, listAppDeployments, listBranches, listSchemaMigrations, mergeFeature, mergePaired, minLakebaseTtl, mintCredential, normalizeHost, normalizeTierName, parseHostFromAuthDescribe, parseLakebaseTtl, parseTargetsYaml, patchWorkflowsForRunnerType, preparePr, projectPath, propagateCredentials, protectedTierNamesFromEnv, pushFailureHint, queryBranchSchema, queryBranchTables, readEnvVar, readTargets, readWorkflowState, reconcilePromoteRunState, reconcileTierToOrigin, recoverOrphans, release, removeRunner, resolveBranchId, resolveBranchPath, resolveCurrentUser, resolveDatabricksHost, resolveEndpointHost, resolveFeatureStartPoint, resolveJavaHome, resolveLatestBootVersion, resolveLatestLtsJavaVersion, resolveMigrationLanguage, resolveMigrationLayout, resolveParentBranch, resolveProfileForHost, resolveProfileForHostSync, resolveProtectedTierNames, rollbackDeploy, rollbackSchemaMigration, runDoctor, runHealthDoctor, runInfraSuite, runPlaywrightInstall, runnerDir, runnerName, sanitizeFeatureSlug, scaffoldAll, scaffoldStaticAll, schemaMigrationStatus, schemaObjectName, selectProfileForHost, setupRunner, stateFilePath, stopRunner, substituteScmUtilsVersion, substrateVersion, syncEnvToCurrentBranch, tierBranchNames, toolForLanguage, tryCreateCatalog, updateEnvConnection, updateWorkflows, uploadDirectory, validateApp, validateCreateInputs, validateWorkflowState, verifyHooks, verifyProject, verifyWorkflows, waitForBranchAuthReady, waitForBranchReady, waitForCi, warmAndVerifyKit, withLakebaseRollback, workflowStateFileExists, writeEnvFile, writePlaywrightTemplates, writeTargets, writeWorkflowState } from './lakebase/index.cjs';
4
- export { AddRemoteArgs, AheadBehind, AmendArgs, BranchesAtCommitArgs, CheckoutBranchArgs, CloneRepoArgs, CommitAllArgs, CommitAndPushArgs, CommitArgs, CommitFilesArgs, CreateTagArgs, CreateWorktreeArgs, CwdOnlyArgs, DeleteLocalBranchArgs, DeleteRemoteBranchArgs, DeleteRemoteTagArgs, DeleteTagArgs, DiffFilesArgs, DiscardAllChangesArgs, FetchArgs, FileChangeShort, GetFileAtRefArgs, GetMergeBaseArgs, GitBranchInfo, HasRemoteBranchArgs, IsDirtyArgs, ListLocalBranchesArgs, ListMigrationsOnBranchArgs, ListRemoteBranchesArgs, LogRawArgs, MergeBranchArgs, MergeCommit, NearestParent, OutgoingIncomingArgs, ProtectedBranchError, PublishBranchArgs, PullFromArgs, PushCurrentBranchForPrArgs, PushToArgs, RebaseBranchArgs, RecentMergesArgs, RemoveRemoteArgs, RemoveWorktreeArgs, RenameBranchArgs, ResolveNearestParentArgs, ShaArgs, StashIndexArgs, StashWithMessageArgs, UndoLastCommitArgs, WorkflowScopeError, abortRebase, addRemote, checkoutBranch, checkoutDetached, cherryPick, cloneRepo, commit, commitAll, commitAllIfChanged, commitAllSignedOff, commitAmend, commitAndPush, commitSignedOff, createTag, createWorktree, deleteLocalBranch, deleteRemoteBranch, deleteRemoteTag, deleteTag, discardAllChanges, fetch, getAheadBehind, getBranchesAtCommit, getCommitFiles, getCurrentBranch, getDiffFiles, getFileAtRef, getGitHubUrl, getIncomingCommits, getLogRaw, getLogShortstat, getMergeBase, getNearestParentName, getOutgoingCommits, getOwnerRepo, getRecentMerges, getRepoRoot, gitBranchExists, gitInit, hasRemoteBranch, hasUpstream, isDirty, isRebasing, listLocalBranches, listMigrationsOnBranch, listRemoteBranches, listRemotes, listTags, listWorktrees, mergeBranch, publishBranch, pull, pullFrom, pullRebase, push, pushCurrentBranchForPr, pushTo, rebaseBranch, removeRemote, removeWorktree, renameBranch, resolveDefaultBranch, resolveNearestParent, revert, stash, stashApply, stashDrop, stashDropAll, stashIncludeUntracked, stashList, stashPop, stashStaged, sync, undoLastCommit } from './git/index.cjs';
1
+ export { GITHUB_SCOPES, GitHubAuthDiagnosis, GitHubAuthSource, GitHubRunnerError, GitHubSecretsError, RepoRunner, VsCodeSessionOptions, createRegistrationToken, deleteRunner, diagnoseGitHubAuth, getRunnerIdByName, getRunnerStatus, listRepoRunners, listSecretNames, resolveGitHubToken, setRepoSecret, setRepoSecrets, tryGhAuthToken, tryVsCodeSession } from './github/index.cjs';
2
+ export { C as CreatePullRequestArgs, a as CreateRepoOptions, F as FastForwardBranchArgs, G as GitHubPullRequestError, b as GitHubRepoError, c as GitHubScopeStatus, M as MergePairedPullRequestArgs, d as MergePairedPullRequestResult, e as MergePullRequestArgs, f as MergePullRequestResult, P as PullRequestCheck, g as PullRequestFile, h as PullRequestInfo, i as PullRequestReview, W as WorkflowRunSummary, j as checkGitHubScopes, k as createPullRequest, l as createRepo, m as deleteRepo, n as fastForwardBranch, o as getActionsEnabled, p as getCurrentUser, q as getPullRequest, r as getPullRequestComments, s as getPullRequestFiles, t as getPullRequestReviews, u as getRepoFullName, v as listIssueComments, w as listWorkflowRuns, x as mergePairedPullRequest, y as mergePullRequest, z as repoExists } from '../pr-D-eayWyJ.cjs';
3
+ export { AbandonFeatureArgs, AbandonFeatureResult, AddE2eToRunTestsScriptArgs, AddE2eToRunTestsScriptResult, AddInfraToPackageJsonArgs, AddInfraToPackageJsonResult, AddInfraToRunTestsScriptArgs, AddInfraToRunTestsScriptResult, AddPlaywrightToPackageJsonArgs, AddPlaywrightToPackageJsonResult, AddPythonE2eDepsArgs, AddPythonE2eDepsResult, AdoptLakebaseProjectArgs, AdoptLakebaseProjectResult, AdoptStateArgs, AdoptStateResult, AppServicePrincipal, AppliedSchemaMigration, ApplySchemaMigrationsArgs, ApplySchemaMigrationsResult, BranchLookupOpts, BranchMetadata, CONVENTION_TIER_DEFAULTS, CatalogExistsArgs, CheckoutMode, CheckoutPairedArgs, CheckoutPairedResult, ClaimFeatureBranchArgs, ClaimFeatureBranchResult, ClaimedOrphan, ClientFramework, CommandDriftReport, CommandFileEntry, CommandFileStatus, ConnectionArgs, ConsortSetupHooks, CreateBranchArgs, CreateConventionBranchArgs, CreateConventionPairedBranchArgs, CreateLongRunningBranchArgs, CreateLongRunningBranchResult, CreatePairedBranchArgs, CreatePairedBranchResult, CreateProjectArgs, CreateProjectResult, CreateRollbackOptions, CutBackupArgs, CutBackupResult, DEFAULT_PROTECTED_TIER_NAMES, DOTNET_EFCORE_DEFAULTS, DOTNET_FLYWAY_DIR, DatabricksProfile, DeleteAppEndpointArgs, DeleteAppEndpointResult, DeleteBranchArgs, DeletePairedBranchArgs, DeletePairedBranchResult, DeployClaudeCommandsOptions, DeployClaudeCommandsResult, DeployEnvExampleArgs, DeployLanguageProjectArgs, DeploySpringStarterArgs, DeployTarget, DeployTargetsConfig, DetectCommandDriftArgs, DetectScaffoldedDriftArgs, DetectWorkflowDriftArgs, DoctorArgs, DoctorFinding, DoctorReport, DoctorSeverity, DotnetMigrationTool, DsnArgs, DsnResult, EF_DESIGN_PACKAGE, EfCoreProject, EnableE2eForProjectArgs, EnableE2eForProjectResult, EnableInfraForProjectArgs, EnableInfraForProjectResult, EndpointInfo, EnsureAppEndpointArgs, EnsureAppEndpointResult, EnsureEndpointArgs, EnsureLakebaseSecretAuthArgs, EnsureLakebaseSecretAuthResult, EnsureProfilePinnedArgs, EnsureProfilePinnedResult, EnsureSchemaAndVolumeArgs, EnsureSchemaAndVolumeResult, FIXABLE_FINDING_IDS, FixFindingArgs, FixFindingResult, FixableFindingId, GateInvariant, GateStatus, GenerateAppYamlOptions, GenerateMavenProjectOptions, GetAppEndpointArgs, GetAppEndpointResult, GetAppServicePrincipalArgs, GetCiAppEndpointArgs, GetCiAppEndpointResult, GetConnectionArgs, GetCredentialArgs, GetEndpointArgs, GetSchemaDiffArgs, GitHubPreflightInput, GitHubPreflightResult, GrantLakebasePermissionArgs, GrantLakebasePermissionResult, GrantUcCatalogPermissionArgs, GrantUcCatalogPermissionResult, HealthDoctorReport, HookVerification, InfraCheckResult, InfraSuiteResult, InitWorkflowStateArgs, InitializrMetadata, InitializrNetworkError, InitializrParseError, InstallPlaywrightArgs, InstallPlaywrightOptions, InstallPlaywrightResult, LakebaseBranchError, LakebaseBranchInfo, LakebaseBranchTtlTooLongError, LakebasePermissionLevel, LakebaseProjectArgs, LakebaseProjectError, LakebaseProjectInfo, LakebaseProjectMetadata, ListSchemaMigrationsArgs, MAVEN_FLYWAY_DIR, MIGRATION_DEFAULTS, MergeArgs, MergePairedArgs, MergePairedResult, MergeResult, MigrationDefaults, MigrationLanguage, MigrationLayout, ModifiedSchemaObject, NODE_E2E_TEMPLATE_FILES, OrphanCandidate, PLAYWRIGHT_TEMPLATE_FILES, PLAYWRIGHT_TEST_VERSION_RANGE, PYTEST_BDD_VERSION_RANGE, PYTEST_PLAYWRIGHT_VERSION_RANGE, PYTHON_E2E_TEMPLATE_FILES, PendingSchemaMigration, PoolArgs, PreflightResult, PreparePrArgs, PreparePrResult, ProgressCallback, ProjectLanguage, PropagateCredentialsArgs, PropagateCredentialsResult, ProtectedBranchCommitError, QueryBranchSchemaArgs, RecoverOrphansArgs, RecoverOrphansResult, ReleaseArgs, ReleaseResult, RemoveRunnerArgs, ResolveDatabricksHostArgs, ResolveMigrationLayoutArgs, RollbackDeployArgs, RollbackDeployResult, RollbackLedger, RollbackOptions, RollbackSchemaMigrationArgs, RollbackSchemaMigrationResult, RollbackStep, RunDoctorDeps, RunInfraSuiteArgs, RunPlaywrightInstallArgs, RunPlaywrightInstallResult, RunnerInfo, RunnerReportFn, RunnerType, SCM_STATES, STATE_FILE_REL, ScaffoldAllArgs, ScaffoldOptions, ScaffoldReportFn, ScaffoldStaticAllArgs, ScaffoldStaticAllResult, ScaffoldedDriftReport, SchemaColumn, SchemaDiffResult, SchemaMigrationError, SchemaMigrationFile, SchemaMigrationLanguage, SchemaMigrationStatusArgs, SchemaMigrationStatusResult, SchemaMigrationToolName, SchemaObject, SchemaQueryRow, ScmAbandonError, ScmAdoptError, ScmClaimError, ScmDoctorFixError, ScmMergeError, ScmPreparePrError, ScmRecoverError, ScmReleaseError, ScmState, ScmWaitCiError, ScmWorkflowState, SetupRunnerArgs, SftddSetupHooks, SpringInitializrClient, SpringJvmLanguage, StaleBranchFinding, SyncEnvArgs, SyncEnvResult, TableSchema, TierTopology, TryCreateCatalogArgs, TryCreateCatalogResult, UcCatalogPermission, UpdateEnvConnectionArgs, UpdateWorkflowsArgs, UpdateWorkflowsResult, UploadDirectoryArgs, UploadDirectoryResult, ValidateAppOptions, ValidateAppResult, ValidationError, ValidationResult, WaitCiArgs, WaitCiResult, WaitForBranchAuthReadyArgs, WaitForBranchReadyArgs, WorkflowDriftReport, WorkflowFileStatus, WorkflowFileUpdate, WorkflowStatus, WorkflowUpdateOutcome, WorkflowVerification, WriteEnvFileArgs, WritePlaywrightTemplatesArgs, WritePlaywrightTemplatesResult, _testMakeBrownfieldFixture, abandonFeatureBranch, addE2eToRunTestsScript, addInfraToPackageJson, addInfraToRunTestsScript, addPlaywrightToPackageJson, adoptLakebaseProject, adoptScmState, applySchemaMigrations, assertAdoptionPreflight, assertCleanForFork, assertCommitTargetNotProtected, assertCreatedProjectReady, buildPostgresUrl, buildSchemaQuery, cacheProjectRetention, catalogExists, catalogExplorerUrl, checkDatabricksAuth, checkGitHubPreflight, checkGitHubWorkflowScope, checkoutPaired, claimFeatureBranch, clearRetentionCache, compileMigrationPattern, connectionApplicationName, createBranch, createFeaturePairedBranch, createLakebaseProject, createLongRunningBranch, createPairedBranch, createPerfPairedBranch, createProject, createRollbackLedger, createTestPairedBranch, createUatPairedBranch, cutBackup, databricksAuthPrereqMessage, defaultRefreshPromoteWorkflows, deleteAppEndpoint, deleteBranch, deleteLakebaseProject, deletePairedBranch, deleteProjectArgs, deployClaudeAgents, deployClaudeCommands, deployClaudeSettings, deployClaudeSkills, deployClientProject, deployDeployTargets, deployEnv, deployEnvExample, deployGitignore, deployLanguageProject, deployScripts, deploySpringStarter, deployVscodeSettings, deployWorkflows, deriveCiAppName, describeGates, detectCommandDrift, detectLanguage, detectLanguageAt, detectScaffoldedDrift, detectWorkflowDrift, dirIsEmpty, enableE2eForProject, enableInfraForProject, endpointPath, ensureAppEndpoint, ensureCachedArchive, ensureEndpoint, ensureLakebaseSecretAuth, ensureProfilePinned, ensurePythonBddDeps, ensurePythonE2eDeps, ensureSchemaAndVolume, extractPullNumber, featureBranchName, findCsprojFiles, findDefaultBranchName, findEfCoreProject, findHistoryRetentionDuration, fixFinding, flywayMigrationsDir, formatJUnit, formatSchemaDiffAsMarkdown, generateAppYaml, getAppEndpoint, getAppServicePrincipal, getBranchByName, getCachedProjectRetention, getCiAppEndpoint, getConnection, getCredential, getDefaultBranch, getDefaultBranchId, getDefaultBranchName, getEndpoint, getProjectInfo, getProjectRetentionDuration, getRunnerInfo, getSchemaDiff, getTargetNames, githubWorkflowScopePrereqMessage, grantLakebasePermission, grantUcCatalogPermission, hasDotnetMarker, inferTierTopology, initWorkflowState, installHooks, installPlaywright, isAllSchemas, isDotnetFlywayProject, isDotnetProject, isForeignFeatureClaim, isGitTracked, isLongRunningTierBranch, isLtsJavaVersion, isPrereleaseBootVersion, isRunning, isTier, isTtlTooLongError, kitWarmWarning, listAppDeployments, listBranches, listSchemaMigrations, mergeFeature, mergePaired, minLakebaseTtl, mintCredential, normalizeHost, normalizeTierName, parseHostFromAuthDescribe, parseLakebaseTtl, parseTargetsYaml, patchWorkflowsForRunnerType, preparePr, projectPath, propagateCredentials, protectedTierNamesFromEnv, pushFailureHint, queryBranchSchema, queryBranchTables, readEnvVar, readTargets, readWorkflowState, reconcilePromoteRunState, reconcileTierToOrigin, recoverOrphans, release, removeRunner, resolveBranchId, resolveBranchPath, resolveCurrentUser, resolveDatabricksHost, resolveEndpointHost, resolveFeatureStartPoint, resolveJavaHome, resolveLatestBootVersion, resolveLatestLtsJavaVersion, resolveMigrationLanguage, resolveMigrationLayout, resolveParentBranch, resolveProfileForHost, resolveProfileForHostSync, resolveProtectedTierNames, rollbackDeploy, rollbackSchemaMigration, runDoctor, runHealthDoctor, runInfraSuite, runPlaywrightInstall, runnerDir, runnerName, sanitizeFeatureSlug, scaffoldAll, scaffoldStaticAll, schemaMigrationStatus, schemaObjectName, selectProfileForHost, setupRunner, stateFilePath, stopRunner, substituteScmUtilsVersion, substrateVersion, syncEnvToCurrentBranch, tierBranchNames, toolForLanguage, tryCreateCatalog, updateEnvConnection, updateWorkflows, uploadDirectory, validateApp, validateCreateInputs, validateWorkflowState, verifyHooks, verifyProject, verifyWorkflows, waitForBranchAuthReady, waitForBranchReady, waitForCi, warmAndVerifyKit, withCreateRollback, withLakebaseRollback, workflowStateFileExists, writeEnvFile, writePlaywrightTemplates, writeTargets, writeWorkflowState } from './lakebase/index.cjs';
4
+ export { AddRemoteArgs, AheadBehind, AmendArgs, BranchesAtCommitArgs, CheckoutBranchArgs, CloneRepoArgs, CommitAllArgs, CommitAndPushArgs, CommitArgs, CommitFilesArgs, CreateTagArgs, CreateWorktreeArgs, CwdOnlyArgs, DeleteLocalBranchArgs, DeleteRemoteBranchArgs, DeleteRemoteTagArgs, DeleteTagArgs, DiffFilesArgs, DiscardAllChangesArgs, FetchArgs, FileChangeShort, GetFileAtRefArgs, GetMergeBaseArgs, GitBranchInfo, HasRemoteBranchArgs, IsDirtyArgs, ListLocalBranchesArgs, ListMigrationsOnBranchArgs, ListRemoteBranchesArgs, LogRawArgs, MergeBranchArgs, MergeCommit, NearestParent, OutgoingIncomingArgs, ProtectedBranchError, PublishBranchArgs, PullFromArgs, PushCurrentBranchForPrArgs, PushInitialArgs, PushToArgs, RebaseBranchArgs, RecentMergesArgs, RemoveRemoteArgs, RemoveWorktreeArgs, RenameBranchArgs, ResolveNearestParentArgs, ShaArgs, StashIndexArgs, StashWithMessageArgs, UndoLastCommitArgs, WorkflowScopeError, abortRebase, addRemote, checkoutBranch, checkoutDetached, cherryPick, cloneRepo, commit, commitAll, commitAllIfChanged, commitAllSignedOff, commitAmend, commitAndPush, commitInitial, commitSignedOff, createTag, createWorktree, deleteLocalBranch, deleteRemoteBranch, deleteRemoteTag, deleteTag, discardAllChanges, fetch, getAheadBehind, getBranchesAtCommit, getCommitFiles, getCurrentBranch, getDiffFiles, getFileAtRef, getGitHubUrl, getIncomingCommits, getLogRaw, getLogShortstat, getMergeBase, getNearestParentName, getOutgoingCommits, getOwnerRepo, getRecentMerges, getRepoRoot, gitBranchExists, gitInit, hasRemoteBranch, hasUpstream, isDirty, isRebasing, listLocalBranches, listMigrationsOnBranch, listRemoteBranches, listRemotes, listTags, listWorktrees, mergeBranch, publishBranch, pull, pullFrom, pullRebase, push, pushCurrentBranchForPr, pushInitial, pushTo, rebaseBranch, removeRemote, removeWorktree, renameBranch, resolveDefaultBranch, resolveNearestParent, revert, stash, stashApply, stashDrop, stashDropAll, stashIncludeUntracked, stashList, stashPop, stashStaged, sync, undoLastCommit } from './git/index.cjs';
5
5
  export { CopyDirSubstitutedArgs, LAKEBASE_BRANCH_NAME_MAX, OwnerRepo, PROXY_ENV_KEYS, PollProbeDone, PollProbePending, PollProbeResult, PollUntilArgs, PollUntilDoneResult, PollUntilResult, PollUntilTimeoutResult, copyDirSubstituted, delay, extractZipToDir, formatOwnerRepo, isCliEntry, parseOwnerRepo, patchPomForLakebase, pollUntil, pollUntilDefined, proxyEnvSubset, sanitizeArtifactId, sanitizeBranchName, withProxyEnv } from './util/index.cjs';
6
6
  export { C as CwdOnly, E as ExecOptions, e as exec, s as shq } from '../exec-CwxSWhlz.cjs';
7
7
  export { C as CI_TOKEN_LIFETIME_SECONDS, a as CI_TOKEN_REMINT_MARGIN_SECONDS, b as CiFreshnessResult, c as CiTokenExpiryArgs, E as EnsureCiSecretsFreshArgs, R as REQUIRED_CI_SECRETS, S as SyncCiSecretsArgs, d as ciTokenComment, e as ciTokenExpiry, f as ensureCiSecretsFresh, g as ensureCiSecretsFreshFromEnv, m as missingCiSecrets, s as syncCiSecrets } from '../ci-secrets-CnGrdQV-.cjs';