@databricks-solutions/lakebase-scm-utils 0.2.42 → 0.2.44

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 (66) hide show
  1. package/dist/scripts/github/index.cjs +21 -4
  2. package/dist/scripts/github/index.js +21 -4
  3. package/dist/scripts/github/pr.cli.cjs +21 -4
  4. package/dist/scripts/github/pr.cli.js +21 -4
  5. package/dist/scripts/index.cjs +58 -10
  6. package/dist/scripts/index.d.cts +1 -1
  7. package/dist/scripts/index.d.ts +1 -1
  8. package/dist/scripts/index.js +57 -10
  9. package/dist/scripts/lakebase/branch.cli.cjs +21 -4
  10. package/dist/scripts/lakebase/branch.cli.js +21 -4
  11. package/dist/scripts/lakebase/ci-app-endpoint.cli.cjs +21 -4
  12. package/dist/scripts/lakebase/ci-app-endpoint.cli.js +21 -4
  13. package/dist/scripts/lakebase/ci-resolve-branch.cli.cjs +23 -6
  14. package/dist/scripts/lakebase/ci-resolve-branch.cli.js +23 -6
  15. package/dist/scripts/lakebase/collapse-heads.cli.cjs +23 -6
  16. package/dist/scripts/lakebase/collapse-heads.cli.js +23 -6
  17. package/dist/scripts/lakebase/cut-backup.cli.cjs +21 -4
  18. package/dist/scripts/lakebase/cut-backup.cli.js +21 -4
  19. package/dist/scripts/lakebase/cut-tier.cli.cjs +21 -4
  20. package/dist/scripts/lakebase/cut-tier.cli.js +21 -4
  21. package/dist/scripts/lakebase/detect-language.cli.cjs +23 -6
  22. package/dist/scripts/lakebase/detect-language.cli.js +23 -6
  23. package/dist/scripts/lakebase/doctor.cli.cjs +23 -6
  24. package/dist/scripts/lakebase/doctor.cli.js +23 -6
  25. package/dist/scripts/lakebase/get-connection.cli.cjs +23 -6
  26. package/dist/scripts/lakebase/get-connection.cli.js +23 -6
  27. package/dist/scripts/lakebase/index.cjs +58 -10
  28. package/dist/scripts/lakebase/index.d.cts +17 -1
  29. package/dist/scripts/lakebase/index.d.ts +17 -1
  30. package/dist/scripts/lakebase/index.js +57 -10
  31. package/dist/scripts/lakebase/infra-runner.cli.cjs +23 -6
  32. package/dist/scripts/lakebase/infra-runner.cli.js +23 -6
  33. package/dist/scripts/lakebase/new-migration.cli.cjs +23 -6
  34. package/dist/scripts/lakebase/new-migration.cli.js +23 -6
  35. package/dist/scripts/lakebase/schema-diff.cli.cjs +23 -6
  36. package/dist/scripts/lakebase/schema-diff.cli.js +23 -6
  37. package/dist/scripts/lakebase/schema-migrate.cli.cjs +23 -6
  38. package/dist/scripts/lakebase/schema-migrate.cli.js +23 -6
  39. package/dist/scripts/lakebase/scm-abandon-feature.cli.cjs +21 -4
  40. package/dist/scripts/lakebase/scm-abandon-feature.cli.js +21 -4
  41. package/dist/scripts/lakebase/scm-adopt-state.cli.cjs +21 -4
  42. package/dist/scripts/lakebase/scm-adopt-state.cli.js +21 -4
  43. package/dist/scripts/lakebase/scm-claim-feature.cli.cjs +23 -6
  44. package/dist/scripts/lakebase/scm-claim-feature.cli.js +23 -6
  45. package/dist/scripts/lakebase/scm-cleanup.cli.cjs +21 -4
  46. package/dist/scripts/lakebase/scm-cleanup.cli.js +21 -4
  47. package/dist/scripts/lakebase/scm-doctor.cli.cjs +23 -6
  48. package/dist/scripts/lakebase/scm-doctor.cli.js +23 -6
  49. package/dist/scripts/lakebase/scm-merge.cli.cjs +39 -6
  50. package/dist/scripts/lakebase/scm-merge.cli.js +39 -6
  51. package/dist/scripts/lakebase/scm-reconcile-tier.cli.cjs +23 -6
  52. package/dist/scripts/lakebase/scm-reconcile-tier.cli.js +23 -6
  53. package/dist/scripts/lakebase/scm-recover-orphans.cli.cjs +21 -4
  54. package/dist/scripts/lakebase/scm-recover-orphans.cli.js +21 -4
  55. package/dist/scripts/util/index.cjs +23 -6
  56. package/dist/scripts/util/index.js +23 -6
  57. package/package.json +1 -1
  58. package/scripts/lakebase/databricks-cli.ts +44 -4
  59. package/scripts/lakebase/runner-setup.ts +18 -2
  60. package/scripts/lakebase/scm-merge.ts +36 -0
  61. package/scripts/lakebase/secret-auth.ts +9 -2
  62. package/templates/project/common/.github/workflows/merge.yml +17 -6
  63. package/templates/project/common/.github/workflows/pr.yml +17 -6
  64. package/templates/project/common/scripts/run-tests.sh +10 -0
  65. package/templates/project/python/tests/__pycache__/conftest.cpython-314.pyc +0 -0
  66. package/templates/project/python/tests/conftest.py +10 -3
@@ -208,16 +208,33 @@ stdout: ${stdout}` : killed || signal ? `
208
208
  }
209
209
  async function runDatabricks(args, opts = {}) {
210
210
  const { argv, env, profile } = buildInvocation(args, opts);
211
+ const timeout = opts.timeout ?? KIT_TIMEOUTS.cliDefault;
211
212
  try {
212
- const { stdout } = await execFileP("databricks", argv, {
213
- env,
214
- timeout: opts.timeout ?? KIT_TIMEOUTS.cliDefault
215
- });
213
+ if (opts.input !== void 0) {
214
+ return await execDatabricksWithStdin(argv, opts.input, env, timeout);
215
+ }
216
+ const { stdout } = await execFileP("databricks", argv, { env, timeout });
216
217
  return stdout.toString();
217
218
  } catch (err) {
218
219
  throw classifyDatabricksError(err, argv, profile);
219
220
  }
220
221
  }
222
+ function execDatabricksWithStdin(argv, input, env, timeout) {
223
+ return new Promise((resolve, reject) => {
224
+ const child = execFile("databricks", argv, { env, timeout }, (err, stdout, stderr) => {
225
+ if (err) {
226
+ err.stdout = String(stdout ?? "");
227
+ err.stderr = String(stderr ?? "");
228
+ reject(err);
229
+ return;
230
+ }
231
+ resolve(String(stdout ?? ""));
232
+ });
233
+ child.stdin?.on("error", () => {
234
+ });
235
+ child.stdin?.end(input);
236
+ });
237
+ }
221
238
  function runDatabricksSync(args, opts = {}) {
222
239
  const { argv, env, profile } = buildInvocation(args, opts);
223
240
  try {
@@ -371,8 +388,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
371
388
  var cached;
372
389
  function substrateSelfVersion() {
373
390
  if (cached !== void 0) return cached;
374
- if ("0.2.42".length > 0) {
375
- cached = "0.2.42";
391
+ if ("0.2.44".length > 0) {
392
+ cached = "0.2.44";
376
393
  return cached;
377
394
  }
378
395
  cached = "unknown";
@@ -79093,6 +79093,7 @@ __export(lakebase_exports, {
79093
79093
  readEnvVar: () => readEnvVar,
79094
79094
  readTargets: () => readTargets,
79095
79095
  readWorkflowState: () => readWorkflowState,
79096
+ reconcileTierToOrigin: () => reconcileTierToOrigin,
79096
79097
  recoverOrphans: () => recoverOrphans,
79097
79098
  release: () => release,
79098
79099
  removeRunner: () => removeRunner,
@@ -79484,16 +79485,33 @@ stdout: ${stdout}` : killed || signal ? `
79484
79485
  }
79485
79486
  async function runDatabricks(args, opts = {}) {
79486
79487
  const { argv, env, profile } = buildInvocation(args, opts);
79488
+ const timeout = opts.timeout ?? KIT_TIMEOUTS.cliDefault;
79487
79489
  try {
79488
- const { stdout } = await execFileP("databricks", argv, {
79489
- env,
79490
- timeout: opts.timeout ?? KIT_TIMEOUTS.cliDefault
79491
- });
79490
+ if (opts.input !== void 0) {
79491
+ return await execDatabricksWithStdin(argv, opts.input, env, timeout);
79492
+ }
79493
+ const { stdout } = await execFileP("databricks", argv, { env, timeout });
79492
79494
  return stdout.toString();
79493
79495
  } catch (err) {
79494
79496
  throw classifyDatabricksError(err, argv, profile);
79495
79497
  }
79496
79498
  }
79499
+ function execDatabricksWithStdin(argv, input, env, timeout) {
79500
+ return new Promise((resolve2, reject) => {
79501
+ const child = (0, import_node_child_process2.execFile)("databricks", argv, { env, timeout }, (err, stdout, stderr) => {
79502
+ if (err) {
79503
+ err.stdout = String(stdout ?? "");
79504
+ err.stderr = String(stderr ?? "");
79505
+ reject(err);
79506
+ return;
79507
+ }
79508
+ resolve2(String(stdout ?? ""));
79509
+ });
79510
+ child.stdin?.on("error", () => {
79511
+ });
79512
+ child.stdin?.end(input);
79513
+ });
79514
+ }
79497
79515
  function runDatabricksSync(args, opts = {}) {
79498
79516
  const { argv, env, profile } = buildInvocation(args, opts);
79499
79517
  try {
@@ -81569,8 +81587,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
81569
81587
  var cached;
81570
81588
  function substrateSelfVersion() {
81571
81589
  if (cached !== void 0) return cached;
81572
- if ("0.2.42".length > 0) {
81573
- cached = "0.2.42";
81590
+ if ("0.2.44".length > 0) {
81591
+ cached = "0.2.44";
81574
81592
  return cached;
81575
81593
  }
81576
81594
  cached = "unknown";
@@ -91829,8 +91847,20 @@ async function setupRunner(args) {
91829
91847
  if (needsConfig) {
91830
91848
  report("Registering runner with GitHub...");
91831
91849
  const regToken = await createRegistrationToken(args.fullRepoName);
91832
- cp4.execSync(
91833
- `./config.sh --url "https://github.com/${args.fullRepoName}" --token "${regToken}" --name "${name}" --labels self-hosted --unattended --replace`,
91850
+ cp4.execFileSync(
91851
+ "./config.sh",
91852
+ [
91853
+ "--url",
91854
+ `https://github.com/${args.fullRepoName}`,
91855
+ "--token",
91856
+ regToken,
91857
+ "--name",
91858
+ name,
91859
+ "--labels",
91860
+ "self-hosted",
91861
+ "--unattended",
91862
+ "--replace"
91863
+ ],
91834
91864
  { cwd: dir, timeout: KIT_TIMEOUTS.cliLong }
91835
91865
  );
91836
91866
  }
@@ -94889,6 +94919,20 @@ function pickRunUrl(pr) {
94889
94919
 
94890
94920
  // scripts/lakebase/scm-merge.ts
94891
94921
  init_cjs_shims();
94922
+ async function reconcileTierToOrigin(args) {
94923
+ const { cwd, tier } = args;
94924
+ try {
94925
+ const head = await getCurrentBranch({ cwd });
94926
+ if (head === tier) {
94927
+ await exec2(`git pull --ff-only`, { cwd, timeout: 3e4 });
94928
+ } else {
94929
+ await exec2(`git fetch origin ${shellEscape2(`${tier}:${tier}`)}`, { cwd, timeout: 3e4 });
94930
+ }
94931
+ return null;
94932
+ } catch (err) {
94933
+ return `local reconcile of ${tier} to origin/${tier} failed: ${err instanceof Error ? err.message : String(err)}. Reconcile it by hand (git checkout ${tier} && git pull --ff-only).`;
94934
+ }
94935
+ }
94892
94936
  var ScmMergeError = class extends Error {
94893
94937
  constructor(message, code) {
94894
94938
  super(message);
@@ -95014,6 +95058,8 @@ async function mergeFeature(args) {
95014
95058
  }
95015
95059
  } else {
95016
95060
  headAfter = head || current.branch;
95061
+ const reconcileWarning = await reconcileTierToOrigin({ cwd: args.projectDir, tier: switchTo });
95062
+ if (reconcileWarning) warnings.push(reconcileWarning);
95017
95063
  }
95018
95064
  if (headAfter !== current.branch) {
95019
95065
  try {
@@ -96572,9 +96618,10 @@ async function ensureLakebaseSecretAuth(args) {
96572
96618
  if (typeof pat !== "string" || !pat) {
96573
96619
  throw new Error("databricks tokens create returned no token_value");
96574
96620
  }
96575
- await runDatabricks(["secrets", "put-secret", scopeName, keyName, "--string-value", pat], {
96621
+ await runDatabricks(["secrets", "put-secret", "--json", "@/dev/stdin"], {
96576
96622
  profile,
96577
- timeout: timeoutMs
96623
+ timeout: timeoutMs,
96624
+ input: JSON.stringify({ scope: scopeName, key: keyName, string_value: pat })
96578
96625
  });
96579
96626
  let aclGranted = false;
96580
96627
  if (servicePrincipalClientId) {
@@ -96869,6 +96916,7 @@ function isUcMissingError(msg) {
96869
96916
  readEnvVar,
96870
96917
  readTargets,
96871
96918
  readWorkflowState,
96919
+ reconcileTierToOrigin,
96872
96920
  recoverOrphans,
96873
96921
  release,
96874
96922
  removeRunner,
@@ -3165,6 +3165,22 @@ interface WaitCiResult {
3165
3165
  }
3166
3166
  declare function waitForCi(args: WaitCiArgs): Promise<WaitCiResult>;
3167
3167
 
3168
+ /**
3169
+ * Fast-forward the local tier ref to origin/<tier> after a remote merge, WITHOUT
3170
+ * needing a checkout. A promote interrupted after the remote merge (e.g. a
3171
+ * downstream migrate failure) otherwise leaves the local tier BEHIND, so the
3172
+ * next sprint plans on stale code and the next push rejects non-fast-forward.
3173
+ * Mechanism by head position: when HEAD IS the tier, `git pull --ff-only` syncs
3174
+ * ref + working tree; otherwise `git fetch origin <tier>:<tier>` fast-forwards
3175
+ * the local ref in place (git refuses fetch-into-current-branch, hence the
3176
+ * split). Returns null on success; a warning string when the sync fails (e.g.
3177
+ * not a fast-forward because the local tier has its own commits), never throws.
3178
+ */
3179
+ declare function reconcileTierToOrigin(args: {
3180
+ cwd: string;
3181
+ tier: string;
3182
+ }): Promise<string | null>;
3183
+
3168
3184
  declare class ScmMergeError extends Error {
3169
3185
  readonly code: "no-state-file" | "bad-precondition" | "no-github-remote" | "no-pr-url" | "bad-pr-url" | "merge-failed" | "migrate-failed" | "migrate-timeout" | "migrate-auth";
3170
3186
  constructor(message: string, code: "no-state-file" | "bad-precondition" | "no-github-remote" | "no-pr-url" | "bad-pr-url" | "merge-failed" | "migrate-failed" | "migrate-timeout" | "migrate-auth");
@@ -4062,4 +4078,4 @@ declare function applySchemaMigrations(args: ApplySchemaMigrationsArgs): Promise
4062
4078
  declare function rollbackSchemaMigration(args: RollbackSchemaMigrationArgs): Promise<RollbackSchemaMigrationResult>;
4063
4079
  declare function schemaMigrationStatus(args: SchemaMigrationStatusArgs): Promise<SchemaMigrationStatusResult>;
4064
4080
 
4065
- export { type AbandonFeatureArgs, type AbandonFeatureResult, type AddE2eToRunTestsScriptArgs, type AddE2eToRunTestsScriptResult, type AddInfraToPackageJsonArgs, type AddInfraToPackageJsonResult, type AddInfraToRunTestsScriptArgs, type AddInfraToRunTestsScriptResult, type AddPlaywrightToPackageJsonArgs, type AddPlaywrightToPackageJsonResult, type AddPythonE2eDepsArgs, type AddPythonE2eDepsResult, type AdoptLakebaseProjectArgs, type AdoptLakebaseProjectResult, type AdoptStateArgs, type AdoptStateResult, type AppServicePrincipal, type AppliedSchemaMigration, type ApplySchemaMigrationsArgs, type ApplySchemaMigrationsResult, type BranchLookupOpts, type BranchMetadata, CONVENTION_TIER_DEFAULTS, type CatalogExistsArgs, type CheckoutMode, type CheckoutPairedArgs, type CheckoutPairedResult, type ClaimFeatureBranchArgs, type ClaimFeatureBranchResult, type ClaimedOrphan, type ClientFramework, type CommandDriftReport, type CommandFileEntry, type CommandFileStatus, type ConnectionArgs, type ConsortSetupHooks, type CreateBranchArgs, type CreateConventionBranchArgs, type CreateConventionPairedBranchArgs, type CreateLongRunningBranchArgs, type CreateLongRunningBranchResult, type CreatePairedBranchArgs, type CreatePairedBranchResult, type CreateProjectArgs, type CreateProjectResult, type CutBackupArgs, type CutBackupResult, DEFAULT_PROTECTED_TIER_NAMES, type DatabricksProfile, type DeleteAppEndpointArgs, type DeleteAppEndpointResult, type DeleteBranchArgs, type DeletePairedBranchArgs, type DeletePairedBranchResult, type DeployClaudeCommandsOptions, type DeployClaudeCommandsResult, type DeployEnvExampleArgs, type DeployLanguageProjectArgs, type DeploySpringStarterArgs, type DeployTarget, type DeployTargetsConfig, type DetectCommandDriftArgs, type DetectScaffoldedDriftArgs, type DetectWorkflowDriftArgs, type DoctorArgs$1 as DoctorArgs, type DoctorFinding, type DoctorReport$1 as DoctorReport, type DoctorSeverity, type DsnArgs, type DsnResult, type EnableE2eForProjectArgs, type EnableE2eForProjectResult, type EnableInfraForProjectArgs, type EnableInfraForProjectResult, type EndpointInfo, type EnsureAppEndpointArgs, type EnsureAppEndpointResult, type EnsureEndpointArgs, type EnsureLakebaseSecretAuthArgs, type EnsureLakebaseSecretAuthResult, type EnsureProfilePinnedArgs, type EnsureProfilePinnedResult, type EnsureSchemaAndVolumeArgs, type EnsureSchemaAndVolumeResult, FIXABLE_FINDING_IDS, type FixFindingArgs, type FixFindingResult, type FixableFindingId, type GateInvariant, type GateStatus, type GenerateAppYamlOptions, type GenerateMavenProjectOptions, type GetAppEndpointArgs, type GetAppEndpointResult, type GetAppServicePrincipalArgs, type GetCiAppEndpointArgs, type GetCiAppEndpointResult, type GetConnectionArgs, type GetCredentialArgs, type GetEndpointArgs, type GetSchemaDiffArgs, type GrantLakebasePermissionArgs, type GrantLakebasePermissionResult, type GrantUcCatalogPermissionArgs, type GrantUcCatalogPermissionResult, type DoctorReport as HealthDoctorReport, type HookVerification, type InfraCheckResult, type InfraSuiteResult, type InitWorkflowStateArgs, type InitializrMetadata, InitializrNetworkError, InitializrParseError, type InstallPlaywrightArgs, type InstallPlaywrightOptions, type InstallPlaywrightResult, LakebaseBranchError, type LakebaseBranchInfo, LakebaseBranchTtlTooLongError, type LakebasePermissionLevel, type LakebaseProjectArgs, LakebaseProjectError, type LakebaseProjectInfo, type LakebaseProjectMetadata, type ListSchemaMigrationsArgs, MIGRATION_DEFAULTS, type MergeArgs, type MergePairedArgs, type MergePairedResult, type MergeResult, type MigrationDefaults, type MigrationLanguage, type MigrationLayout, type ModifiedSchemaObject, NODE_E2E_TEMPLATE_FILES, type OrphanCandidate, PLAYWRIGHT_TEMPLATE_FILES, PLAYWRIGHT_TEST_VERSION_RANGE, PYTEST_BDD_VERSION_RANGE, PYTEST_PLAYWRIGHT_VERSION_RANGE, PYTHON_E2E_TEMPLATE_FILES, type PendingSchemaMigration, type PoolArgs, type PreflightResult, type PreparePrArgs, type PreparePrResult, type ProgressCallback, type ProjectLanguage, type PropagateCredentialsArgs, type PropagateCredentialsResult, ProtectedBranchCommitError, type QueryBranchSchemaArgs, type RecoverOrphansArgs, type RecoverOrphansResult, type ReleaseArgs, type ReleaseResult, type RemoveRunnerArgs, type ResolveDatabricksHostArgs, type ResolveMigrationLayoutArgs, type RollbackDeployArgs, type RollbackDeployResult, type RollbackOptions, type RollbackSchemaMigrationArgs, type RollbackSchemaMigrationResult, type RunDoctorDeps, type RunInfraSuiteArgs, type RunPlaywrightInstallArgs, type RunPlaywrightInstallResult, type RunnerInfo, type RunnerReportFn, type RunnerType, SCM_STATES, STATE_FILE_REL, type ScaffoldAllArgs, type ScaffoldOptions, type ScaffoldReportFn, type ScaffoldStaticAllArgs, type ScaffoldStaticAllResult, type ScaffoldedDriftReport, type SchemaColumn, type SchemaDiffResult, SchemaMigrationError, type SchemaMigrationFile, type SchemaMigrationLanguage, type SchemaMigrationStatusArgs, type SchemaMigrationStatusResult, type SchemaMigrationToolName, type SchemaObject, type SchemaQueryRow, ScmAbandonError, ScmAdoptError, ScmClaimError, ScmDoctorFixError, ScmMergeError, ScmPreparePrError, ScmRecoverError, type ScmState, ScmWaitCiError, type ScmWorkflowState, type SetupRunnerArgs, type SftddSetupHooks, SpringInitializrClient, type SpringJvmLanguage, type StaleBranchFinding, type SyncEnvArgs, type SyncEnvResult, type TableSchema, type TierTopology, type TryCreateCatalogArgs, type TryCreateCatalogResult, type UcCatalogPermission, type UpdateEnvConnectionArgs, type UpdateWorkflowsArgs, type UpdateWorkflowsResult, type UploadDirectoryArgs, type UploadDirectoryResult, type ValidateAppOptions, type ValidateAppResult, type ValidationError, type ValidationResult, type WaitCiArgs, type WaitCiResult, type WaitForBranchAuthReadyArgs, type WaitForBranchReadyArgs, type WorkflowDriftReport, type WorkflowFileStatus, type WorkflowFileUpdate, type WorkflowStatus, type WorkflowUpdateOutcome, type WorkflowVerification, type WriteEnvFileArgs, type WritePlaywrightTemplatesArgs, type WritePlaywrightTemplatesResult, _testMakeBrownfieldFixture, abandonFeatureBranch, addE2eToRunTestsScript, addInfraToPackageJson, addInfraToRunTestsScript, addPlaywrightToPackageJson, adoptLakebaseProject, adoptScmState, applySchemaMigrations, assertAdoptionPreflight, assertCleanForFork, assertCommitTargetNotProtected, assertCreatedProjectReady, buildPostgresUrl, buildSchemaQuery, cacheProjectRetention, catalogExists, catalogExplorerUrl, checkDatabricksAuth, checkoutPaired, claimFeatureBranch, clearRetentionCache, compileMigrationPattern, connectionApplicationName, createBranch, createFeaturePairedBranch, createLakebaseProject, createLongRunningBranch, createPairedBranch, createPerfPairedBranch, createProject, createTestPairedBranch, createUatPairedBranch, cutBackup, databricksAuthPrereqMessage, deleteAppEndpoint, deleteBranch, deleteLakebaseProject, deletePairedBranch, 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, findDefaultBranchName, findHistoryRetentionDuration, fixFinding, formatJUnit, formatSchemaDiffAsMarkdown, generateAppYaml, getAppEndpoint, getAppServicePrincipal, getBranchByName, getCachedProjectRetention, getCiAppEndpoint, getConnection, getCredential, getDefaultBranch, getDefaultBranchId, getDefaultBranchName, getEndpoint, getProjectInfo, getProjectRetentionDuration, getRunnerInfo, getSchemaDiff, getTargetNames, grantLakebasePermission, grantUcCatalogPermission, inferTierTopology, initWorkflowState, installHooks, installPlaywright, isAllSchemas, 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, recoverOrphans, release, removeRunner, resolveBranchId, resolveBranchPath, resolveCurrentUser, resolveDatabricksHost, resolveEndpointHost, resolveFeatureStartPoint, resolveJavaHome, resolveLatestBootVersion, resolveLatestLtsJavaVersion, resolveMigrationLanguage, resolveMigrationLayout, resolveParentBranch, resolveProfileForHost, resolveProfileForHostSync, resolveProtectedTierNames, rollbackDeploy, rollbackSchemaMigration, runDoctor$1 as runDoctor, runDoctor as 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 };
4081
+ export { type AbandonFeatureArgs, type AbandonFeatureResult, type AddE2eToRunTestsScriptArgs, type AddE2eToRunTestsScriptResult, type AddInfraToPackageJsonArgs, type AddInfraToPackageJsonResult, type AddInfraToRunTestsScriptArgs, type AddInfraToRunTestsScriptResult, type AddPlaywrightToPackageJsonArgs, type AddPlaywrightToPackageJsonResult, type AddPythonE2eDepsArgs, type AddPythonE2eDepsResult, type AdoptLakebaseProjectArgs, type AdoptLakebaseProjectResult, type AdoptStateArgs, type AdoptStateResult, type AppServicePrincipal, type AppliedSchemaMigration, type ApplySchemaMigrationsArgs, type ApplySchemaMigrationsResult, type BranchLookupOpts, type BranchMetadata, CONVENTION_TIER_DEFAULTS, type CatalogExistsArgs, type CheckoutMode, type CheckoutPairedArgs, type CheckoutPairedResult, type ClaimFeatureBranchArgs, type ClaimFeatureBranchResult, type ClaimedOrphan, type ClientFramework, type CommandDriftReport, type CommandFileEntry, type CommandFileStatus, type ConnectionArgs, type ConsortSetupHooks, type CreateBranchArgs, type CreateConventionBranchArgs, type CreateConventionPairedBranchArgs, type CreateLongRunningBranchArgs, type CreateLongRunningBranchResult, type CreatePairedBranchArgs, type CreatePairedBranchResult, type CreateProjectArgs, type CreateProjectResult, type CutBackupArgs, type CutBackupResult, DEFAULT_PROTECTED_TIER_NAMES, type DatabricksProfile, type DeleteAppEndpointArgs, type DeleteAppEndpointResult, type DeleteBranchArgs, type DeletePairedBranchArgs, type DeletePairedBranchResult, type DeployClaudeCommandsOptions, type DeployClaudeCommandsResult, type DeployEnvExampleArgs, type DeployLanguageProjectArgs, type DeploySpringStarterArgs, type DeployTarget, type DeployTargetsConfig, type DetectCommandDriftArgs, type DetectScaffoldedDriftArgs, type DetectWorkflowDriftArgs, type DoctorArgs$1 as DoctorArgs, type DoctorFinding, type DoctorReport$1 as DoctorReport, type DoctorSeverity, type DsnArgs, type DsnResult, type EnableE2eForProjectArgs, type EnableE2eForProjectResult, type EnableInfraForProjectArgs, type EnableInfraForProjectResult, type EndpointInfo, type EnsureAppEndpointArgs, type EnsureAppEndpointResult, type EnsureEndpointArgs, type EnsureLakebaseSecretAuthArgs, type EnsureLakebaseSecretAuthResult, type EnsureProfilePinnedArgs, type EnsureProfilePinnedResult, type EnsureSchemaAndVolumeArgs, type EnsureSchemaAndVolumeResult, FIXABLE_FINDING_IDS, type FixFindingArgs, type FixFindingResult, type FixableFindingId, type GateInvariant, type GateStatus, type GenerateAppYamlOptions, type GenerateMavenProjectOptions, type GetAppEndpointArgs, type GetAppEndpointResult, type GetAppServicePrincipalArgs, type GetCiAppEndpointArgs, type GetCiAppEndpointResult, type GetConnectionArgs, type GetCredentialArgs, type GetEndpointArgs, type GetSchemaDiffArgs, type GrantLakebasePermissionArgs, type GrantLakebasePermissionResult, type GrantUcCatalogPermissionArgs, type GrantUcCatalogPermissionResult, type DoctorReport as HealthDoctorReport, type HookVerification, type InfraCheckResult, type InfraSuiteResult, type InitWorkflowStateArgs, type InitializrMetadata, InitializrNetworkError, InitializrParseError, type InstallPlaywrightArgs, type InstallPlaywrightOptions, type InstallPlaywrightResult, LakebaseBranchError, type LakebaseBranchInfo, LakebaseBranchTtlTooLongError, type LakebasePermissionLevel, type LakebaseProjectArgs, LakebaseProjectError, type LakebaseProjectInfo, type LakebaseProjectMetadata, type ListSchemaMigrationsArgs, MIGRATION_DEFAULTS, type MergeArgs, type MergePairedArgs, type MergePairedResult, type MergeResult, type MigrationDefaults, type MigrationLanguage, type MigrationLayout, type ModifiedSchemaObject, NODE_E2E_TEMPLATE_FILES, type OrphanCandidate, PLAYWRIGHT_TEMPLATE_FILES, PLAYWRIGHT_TEST_VERSION_RANGE, PYTEST_BDD_VERSION_RANGE, PYTEST_PLAYWRIGHT_VERSION_RANGE, PYTHON_E2E_TEMPLATE_FILES, type PendingSchemaMigration, type PoolArgs, type PreflightResult, type PreparePrArgs, type PreparePrResult, type ProgressCallback, type ProjectLanguage, type PropagateCredentialsArgs, type PropagateCredentialsResult, ProtectedBranchCommitError, type QueryBranchSchemaArgs, type RecoverOrphansArgs, type RecoverOrphansResult, type ReleaseArgs, type ReleaseResult, type RemoveRunnerArgs, type ResolveDatabricksHostArgs, type ResolveMigrationLayoutArgs, type RollbackDeployArgs, type RollbackDeployResult, type RollbackOptions, type RollbackSchemaMigrationArgs, type RollbackSchemaMigrationResult, type RunDoctorDeps, type RunInfraSuiteArgs, type RunPlaywrightInstallArgs, type RunPlaywrightInstallResult, type RunnerInfo, type RunnerReportFn, type RunnerType, SCM_STATES, STATE_FILE_REL, type ScaffoldAllArgs, type ScaffoldOptions, type ScaffoldReportFn, type ScaffoldStaticAllArgs, type ScaffoldStaticAllResult, type ScaffoldedDriftReport, type SchemaColumn, type SchemaDiffResult, SchemaMigrationError, type SchemaMigrationFile, type SchemaMigrationLanguage, type SchemaMigrationStatusArgs, type SchemaMigrationStatusResult, type SchemaMigrationToolName, type SchemaObject, type SchemaQueryRow, ScmAbandonError, ScmAdoptError, ScmClaimError, ScmDoctorFixError, ScmMergeError, ScmPreparePrError, ScmRecoverError, type ScmState, ScmWaitCiError, type ScmWorkflowState, type SetupRunnerArgs, type SftddSetupHooks, SpringInitializrClient, type SpringJvmLanguage, type StaleBranchFinding, type SyncEnvArgs, type SyncEnvResult, type TableSchema, type TierTopology, type TryCreateCatalogArgs, type TryCreateCatalogResult, type UcCatalogPermission, type UpdateEnvConnectionArgs, type UpdateWorkflowsArgs, type UpdateWorkflowsResult, type UploadDirectoryArgs, type UploadDirectoryResult, type ValidateAppOptions, type ValidateAppResult, type ValidationError, type ValidationResult, type WaitCiArgs, type WaitCiResult, type WaitForBranchAuthReadyArgs, type WaitForBranchReadyArgs, type WorkflowDriftReport, type WorkflowFileStatus, type WorkflowFileUpdate, type WorkflowStatus, type WorkflowUpdateOutcome, type WorkflowVerification, type WriteEnvFileArgs, type WritePlaywrightTemplatesArgs, type WritePlaywrightTemplatesResult, _testMakeBrownfieldFixture, abandonFeatureBranch, addE2eToRunTestsScript, addInfraToPackageJson, addInfraToRunTestsScript, addPlaywrightToPackageJson, adoptLakebaseProject, adoptScmState, applySchemaMigrations, assertAdoptionPreflight, assertCleanForFork, assertCommitTargetNotProtected, assertCreatedProjectReady, buildPostgresUrl, buildSchemaQuery, cacheProjectRetention, catalogExists, catalogExplorerUrl, checkDatabricksAuth, checkoutPaired, claimFeatureBranch, clearRetentionCache, compileMigrationPattern, connectionApplicationName, createBranch, createFeaturePairedBranch, createLakebaseProject, createLongRunningBranch, createPairedBranch, createPerfPairedBranch, createProject, createTestPairedBranch, createUatPairedBranch, cutBackup, databricksAuthPrereqMessage, deleteAppEndpoint, deleteBranch, deleteLakebaseProject, deletePairedBranch, 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, findDefaultBranchName, findHistoryRetentionDuration, fixFinding, formatJUnit, formatSchemaDiffAsMarkdown, generateAppYaml, getAppEndpoint, getAppServicePrincipal, getBranchByName, getCachedProjectRetention, getCiAppEndpoint, getConnection, getCredential, getDefaultBranch, getDefaultBranchId, getDefaultBranchName, getEndpoint, getProjectInfo, getProjectRetentionDuration, getRunnerInfo, getSchemaDiff, getTargetNames, grantLakebasePermission, grantUcCatalogPermission, inferTierTopology, initWorkflowState, installHooks, installPlaywright, isAllSchemas, 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, reconcileTierToOrigin, recoverOrphans, release, removeRunner, resolveBranchId, resolveBranchPath, resolveCurrentUser, resolveDatabricksHost, resolveEndpointHost, resolveFeatureStartPoint, resolveJavaHome, resolveLatestBootVersion, resolveLatestLtsJavaVersion, resolveMigrationLanguage, resolveMigrationLayout, resolveParentBranch, resolveProfileForHost, resolveProfileForHostSync, resolveProtectedTierNames, rollbackDeploy, rollbackSchemaMigration, runDoctor$1 as runDoctor, runDoctor as 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 };
@@ -3165,6 +3165,22 @@ interface WaitCiResult {
3165
3165
  }
3166
3166
  declare function waitForCi(args: WaitCiArgs): Promise<WaitCiResult>;
3167
3167
 
3168
+ /**
3169
+ * Fast-forward the local tier ref to origin/<tier> after a remote merge, WITHOUT
3170
+ * needing a checkout. A promote interrupted after the remote merge (e.g. a
3171
+ * downstream migrate failure) otherwise leaves the local tier BEHIND, so the
3172
+ * next sprint plans on stale code and the next push rejects non-fast-forward.
3173
+ * Mechanism by head position: when HEAD IS the tier, `git pull --ff-only` syncs
3174
+ * ref + working tree; otherwise `git fetch origin <tier>:<tier>` fast-forwards
3175
+ * the local ref in place (git refuses fetch-into-current-branch, hence the
3176
+ * split). Returns null on success; a warning string when the sync fails (e.g.
3177
+ * not a fast-forward because the local tier has its own commits), never throws.
3178
+ */
3179
+ declare function reconcileTierToOrigin(args: {
3180
+ cwd: string;
3181
+ tier: string;
3182
+ }): Promise<string | null>;
3183
+
3168
3184
  declare class ScmMergeError extends Error {
3169
3185
  readonly code: "no-state-file" | "bad-precondition" | "no-github-remote" | "no-pr-url" | "bad-pr-url" | "merge-failed" | "migrate-failed" | "migrate-timeout" | "migrate-auth";
3170
3186
  constructor(message: string, code: "no-state-file" | "bad-precondition" | "no-github-remote" | "no-pr-url" | "bad-pr-url" | "merge-failed" | "migrate-failed" | "migrate-timeout" | "migrate-auth");
@@ -4062,4 +4078,4 @@ declare function applySchemaMigrations(args: ApplySchemaMigrationsArgs): Promise
4062
4078
  declare function rollbackSchemaMigration(args: RollbackSchemaMigrationArgs): Promise<RollbackSchemaMigrationResult>;
4063
4079
  declare function schemaMigrationStatus(args: SchemaMigrationStatusArgs): Promise<SchemaMigrationStatusResult>;
4064
4080
 
4065
- export { type AbandonFeatureArgs, type AbandonFeatureResult, type AddE2eToRunTestsScriptArgs, type AddE2eToRunTestsScriptResult, type AddInfraToPackageJsonArgs, type AddInfraToPackageJsonResult, type AddInfraToRunTestsScriptArgs, type AddInfraToRunTestsScriptResult, type AddPlaywrightToPackageJsonArgs, type AddPlaywrightToPackageJsonResult, type AddPythonE2eDepsArgs, type AddPythonE2eDepsResult, type AdoptLakebaseProjectArgs, type AdoptLakebaseProjectResult, type AdoptStateArgs, type AdoptStateResult, type AppServicePrincipal, type AppliedSchemaMigration, type ApplySchemaMigrationsArgs, type ApplySchemaMigrationsResult, type BranchLookupOpts, type BranchMetadata, CONVENTION_TIER_DEFAULTS, type CatalogExistsArgs, type CheckoutMode, type CheckoutPairedArgs, type CheckoutPairedResult, type ClaimFeatureBranchArgs, type ClaimFeatureBranchResult, type ClaimedOrphan, type ClientFramework, type CommandDriftReport, type CommandFileEntry, type CommandFileStatus, type ConnectionArgs, type ConsortSetupHooks, type CreateBranchArgs, type CreateConventionBranchArgs, type CreateConventionPairedBranchArgs, type CreateLongRunningBranchArgs, type CreateLongRunningBranchResult, type CreatePairedBranchArgs, type CreatePairedBranchResult, type CreateProjectArgs, type CreateProjectResult, type CutBackupArgs, type CutBackupResult, DEFAULT_PROTECTED_TIER_NAMES, type DatabricksProfile, type DeleteAppEndpointArgs, type DeleteAppEndpointResult, type DeleteBranchArgs, type DeletePairedBranchArgs, type DeletePairedBranchResult, type DeployClaudeCommandsOptions, type DeployClaudeCommandsResult, type DeployEnvExampleArgs, type DeployLanguageProjectArgs, type DeploySpringStarterArgs, type DeployTarget, type DeployTargetsConfig, type DetectCommandDriftArgs, type DetectScaffoldedDriftArgs, type DetectWorkflowDriftArgs, type DoctorArgs$1 as DoctorArgs, type DoctorFinding, type DoctorReport$1 as DoctorReport, type DoctorSeverity, type DsnArgs, type DsnResult, type EnableE2eForProjectArgs, type EnableE2eForProjectResult, type EnableInfraForProjectArgs, type EnableInfraForProjectResult, type EndpointInfo, type EnsureAppEndpointArgs, type EnsureAppEndpointResult, type EnsureEndpointArgs, type EnsureLakebaseSecretAuthArgs, type EnsureLakebaseSecretAuthResult, type EnsureProfilePinnedArgs, type EnsureProfilePinnedResult, type EnsureSchemaAndVolumeArgs, type EnsureSchemaAndVolumeResult, FIXABLE_FINDING_IDS, type FixFindingArgs, type FixFindingResult, type FixableFindingId, type GateInvariant, type GateStatus, type GenerateAppYamlOptions, type GenerateMavenProjectOptions, type GetAppEndpointArgs, type GetAppEndpointResult, type GetAppServicePrincipalArgs, type GetCiAppEndpointArgs, type GetCiAppEndpointResult, type GetConnectionArgs, type GetCredentialArgs, type GetEndpointArgs, type GetSchemaDiffArgs, type GrantLakebasePermissionArgs, type GrantLakebasePermissionResult, type GrantUcCatalogPermissionArgs, type GrantUcCatalogPermissionResult, type DoctorReport as HealthDoctorReport, type HookVerification, type InfraCheckResult, type InfraSuiteResult, type InitWorkflowStateArgs, type InitializrMetadata, InitializrNetworkError, InitializrParseError, type InstallPlaywrightArgs, type InstallPlaywrightOptions, type InstallPlaywrightResult, LakebaseBranchError, type LakebaseBranchInfo, LakebaseBranchTtlTooLongError, type LakebasePermissionLevel, type LakebaseProjectArgs, LakebaseProjectError, type LakebaseProjectInfo, type LakebaseProjectMetadata, type ListSchemaMigrationsArgs, MIGRATION_DEFAULTS, type MergeArgs, type MergePairedArgs, type MergePairedResult, type MergeResult, type MigrationDefaults, type MigrationLanguage, type MigrationLayout, type ModifiedSchemaObject, NODE_E2E_TEMPLATE_FILES, type OrphanCandidate, PLAYWRIGHT_TEMPLATE_FILES, PLAYWRIGHT_TEST_VERSION_RANGE, PYTEST_BDD_VERSION_RANGE, PYTEST_PLAYWRIGHT_VERSION_RANGE, PYTHON_E2E_TEMPLATE_FILES, type PendingSchemaMigration, type PoolArgs, type PreflightResult, type PreparePrArgs, type PreparePrResult, type ProgressCallback, type ProjectLanguage, type PropagateCredentialsArgs, type PropagateCredentialsResult, ProtectedBranchCommitError, type QueryBranchSchemaArgs, type RecoverOrphansArgs, type RecoverOrphansResult, type ReleaseArgs, type ReleaseResult, type RemoveRunnerArgs, type ResolveDatabricksHostArgs, type ResolveMigrationLayoutArgs, type RollbackDeployArgs, type RollbackDeployResult, type RollbackOptions, type RollbackSchemaMigrationArgs, type RollbackSchemaMigrationResult, type RunDoctorDeps, type RunInfraSuiteArgs, type RunPlaywrightInstallArgs, type RunPlaywrightInstallResult, type RunnerInfo, type RunnerReportFn, type RunnerType, SCM_STATES, STATE_FILE_REL, type ScaffoldAllArgs, type ScaffoldOptions, type ScaffoldReportFn, type ScaffoldStaticAllArgs, type ScaffoldStaticAllResult, type ScaffoldedDriftReport, type SchemaColumn, type SchemaDiffResult, SchemaMigrationError, type SchemaMigrationFile, type SchemaMigrationLanguage, type SchemaMigrationStatusArgs, type SchemaMigrationStatusResult, type SchemaMigrationToolName, type SchemaObject, type SchemaQueryRow, ScmAbandonError, ScmAdoptError, ScmClaimError, ScmDoctorFixError, ScmMergeError, ScmPreparePrError, ScmRecoverError, type ScmState, ScmWaitCiError, type ScmWorkflowState, type SetupRunnerArgs, type SftddSetupHooks, SpringInitializrClient, type SpringJvmLanguage, type StaleBranchFinding, type SyncEnvArgs, type SyncEnvResult, type TableSchema, type TierTopology, type TryCreateCatalogArgs, type TryCreateCatalogResult, type UcCatalogPermission, type UpdateEnvConnectionArgs, type UpdateWorkflowsArgs, type UpdateWorkflowsResult, type UploadDirectoryArgs, type UploadDirectoryResult, type ValidateAppOptions, type ValidateAppResult, type ValidationError, type ValidationResult, type WaitCiArgs, type WaitCiResult, type WaitForBranchAuthReadyArgs, type WaitForBranchReadyArgs, type WorkflowDriftReport, type WorkflowFileStatus, type WorkflowFileUpdate, type WorkflowStatus, type WorkflowUpdateOutcome, type WorkflowVerification, type WriteEnvFileArgs, type WritePlaywrightTemplatesArgs, type WritePlaywrightTemplatesResult, _testMakeBrownfieldFixture, abandonFeatureBranch, addE2eToRunTestsScript, addInfraToPackageJson, addInfraToRunTestsScript, addPlaywrightToPackageJson, adoptLakebaseProject, adoptScmState, applySchemaMigrations, assertAdoptionPreflight, assertCleanForFork, assertCommitTargetNotProtected, assertCreatedProjectReady, buildPostgresUrl, buildSchemaQuery, cacheProjectRetention, catalogExists, catalogExplorerUrl, checkDatabricksAuth, checkoutPaired, claimFeatureBranch, clearRetentionCache, compileMigrationPattern, connectionApplicationName, createBranch, createFeaturePairedBranch, createLakebaseProject, createLongRunningBranch, createPairedBranch, createPerfPairedBranch, createProject, createTestPairedBranch, createUatPairedBranch, cutBackup, databricksAuthPrereqMessage, deleteAppEndpoint, deleteBranch, deleteLakebaseProject, deletePairedBranch, 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, findDefaultBranchName, findHistoryRetentionDuration, fixFinding, formatJUnit, formatSchemaDiffAsMarkdown, generateAppYaml, getAppEndpoint, getAppServicePrincipal, getBranchByName, getCachedProjectRetention, getCiAppEndpoint, getConnection, getCredential, getDefaultBranch, getDefaultBranchId, getDefaultBranchName, getEndpoint, getProjectInfo, getProjectRetentionDuration, getRunnerInfo, getSchemaDiff, getTargetNames, grantLakebasePermission, grantUcCatalogPermission, inferTierTopology, initWorkflowState, installHooks, installPlaywright, isAllSchemas, 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, recoverOrphans, release, removeRunner, resolveBranchId, resolveBranchPath, resolveCurrentUser, resolveDatabricksHost, resolveEndpointHost, resolveFeatureStartPoint, resolveJavaHome, resolveLatestBootVersion, resolveLatestLtsJavaVersion, resolveMigrationLanguage, resolveMigrationLayout, resolveParentBranch, resolveProfileForHost, resolveProfileForHostSync, resolveProtectedTierNames, rollbackDeploy, rollbackSchemaMigration, runDoctor$1 as runDoctor, runDoctor as 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 };
4081
+ export { type AbandonFeatureArgs, type AbandonFeatureResult, type AddE2eToRunTestsScriptArgs, type AddE2eToRunTestsScriptResult, type AddInfraToPackageJsonArgs, type AddInfraToPackageJsonResult, type AddInfraToRunTestsScriptArgs, type AddInfraToRunTestsScriptResult, type AddPlaywrightToPackageJsonArgs, type AddPlaywrightToPackageJsonResult, type AddPythonE2eDepsArgs, type AddPythonE2eDepsResult, type AdoptLakebaseProjectArgs, type AdoptLakebaseProjectResult, type AdoptStateArgs, type AdoptStateResult, type AppServicePrincipal, type AppliedSchemaMigration, type ApplySchemaMigrationsArgs, type ApplySchemaMigrationsResult, type BranchLookupOpts, type BranchMetadata, CONVENTION_TIER_DEFAULTS, type CatalogExistsArgs, type CheckoutMode, type CheckoutPairedArgs, type CheckoutPairedResult, type ClaimFeatureBranchArgs, type ClaimFeatureBranchResult, type ClaimedOrphan, type ClientFramework, type CommandDriftReport, type CommandFileEntry, type CommandFileStatus, type ConnectionArgs, type ConsortSetupHooks, type CreateBranchArgs, type CreateConventionBranchArgs, type CreateConventionPairedBranchArgs, type CreateLongRunningBranchArgs, type CreateLongRunningBranchResult, type CreatePairedBranchArgs, type CreatePairedBranchResult, type CreateProjectArgs, type CreateProjectResult, type CutBackupArgs, type CutBackupResult, DEFAULT_PROTECTED_TIER_NAMES, type DatabricksProfile, type DeleteAppEndpointArgs, type DeleteAppEndpointResult, type DeleteBranchArgs, type DeletePairedBranchArgs, type DeletePairedBranchResult, type DeployClaudeCommandsOptions, type DeployClaudeCommandsResult, type DeployEnvExampleArgs, type DeployLanguageProjectArgs, type DeploySpringStarterArgs, type DeployTarget, type DeployTargetsConfig, type DetectCommandDriftArgs, type DetectScaffoldedDriftArgs, type DetectWorkflowDriftArgs, type DoctorArgs$1 as DoctorArgs, type DoctorFinding, type DoctorReport$1 as DoctorReport, type DoctorSeverity, type DsnArgs, type DsnResult, type EnableE2eForProjectArgs, type EnableE2eForProjectResult, type EnableInfraForProjectArgs, type EnableInfraForProjectResult, type EndpointInfo, type EnsureAppEndpointArgs, type EnsureAppEndpointResult, type EnsureEndpointArgs, type EnsureLakebaseSecretAuthArgs, type EnsureLakebaseSecretAuthResult, type EnsureProfilePinnedArgs, type EnsureProfilePinnedResult, type EnsureSchemaAndVolumeArgs, type EnsureSchemaAndVolumeResult, FIXABLE_FINDING_IDS, type FixFindingArgs, type FixFindingResult, type FixableFindingId, type GateInvariant, type GateStatus, type GenerateAppYamlOptions, type GenerateMavenProjectOptions, type GetAppEndpointArgs, type GetAppEndpointResult, type GetAppServicePrincipalArgs, type GetCiAppEndpointArgs, type GetCiAppEndpointResult, type GetConnectionArgs, type GetCredentialArgs, type GetEndpointArgs, type GetSchemaDiffArgs, type GrantLakebasePermissionArgs, type GrantLakebasePermissionResult, type GrantUcCatalogPermissionArgs, type GrantUcCatalogPermissionResult, type DoctorReport as HealthDoctorReport, type HookVerification, type InfraCheckResult, type InfraSuiteResult, type InitWorkflowStateArgs, type InitializrMetadata, InitializrNetworkError, InitializrParseError, type InstallPlaywrightArgs, type InstallPlaywrightOptions, type InstallPlaywrightResult, LakebaseBranchError, type LakebaseBranchInfo, LakebaseBranchTtlTooLongError, type LakebasePermissionLevel, type LakebaseProjectArgs, LakebaseProjectError, type LakebaseProjectInfo, type LakebaseProjectMetadata, type ListSchemaMigrationsArgs, MIGRATION_DEFAULTS, type MergeArgs, type MergePairedArgs, type MergePairedResult, type MergeResult, type MigrationDefaults, type MigrationLanguage, type MigrationLayout, type ModifiedSchemaObject, NODE_E2E_TEMPLATE_FILES, type OrphanCandidate, PLAYWRIGHT_TEMPLATE_FILES, PLAYWRIGHT_TEST_VERSION_RANGE, PYTEST_BDD_VERSION_RANGE, PYTEST_PLAYWRIGHT_VERSION_RANGE, PYTHON_E2E_TEMPLATE_FILES, type PendingSchemaMigration, type PoolArgs, type PreflightResult, type PreparePrArgs, type PreparePrResult, type ProgressCallback, type ProjectLanguage, type PropagateCredentialsArgs, type PropagateCredentialsResult, ProtectedBranchCommitError, type QueryBranchSchemaArgs, type RecoverOrphansArgs, type RecoverOrphansResult, type ReleaseArgs, type ReleaseResult, type RemoveRunnerArgs, type ResolveDatabricksHostArgs, type ResolveMigrationLayoutArgs, type RollbackDeployArgs, type RollbackDeployResult, type RollbackOptions, type RollbackSchemaMigrationArgs, type RollbackSchemaMigrationResult, type RunDoctorDeps, type RunInfraSuiteArgs, type RunPlaywrightInstallArgs, type RunPlaywrightInstallResult, type RunnerInfo, type RunnerReportFn, type RunnerType, SCM_STATES, STATE_FILE_REL, type ScaffoldAllArgs, type ScaffoldOptions, type ScaffoldReportFn, type ScaffoldStaticAllArgs, type ScaffoldStaticAllResult, type ScaffoldedDriftReport, type SchemaColumn, type SchemaDiffResult, SchemaMigrationError, type SchemaMigrationFile, type SchemaMigrationLanguage, type SchemaMigrationStatusArgs, type SchemaMigrationStatusResult, type SchemaMigrationToolName, type SchemaObject, type SchemaQueryRow, ScmAbandonError, ScmAdoptError, ScmClaimError, ScmDoctorFixError, ScmMergeError, ScmPreparePrError, ScmRecoverError, type ScmState, ScmWaitCiError, type ScmWorkflowState, type SetupRunnerArgs, type SftddSetupHooks, SpringInitializrClient, type SpringJvmLanguage, type StaleBranchFinding, type SyncEnvArgs, type SyncEnvResult, type TableSchema, type TierTopology, type TryCreateCatalogArgs, type TryCreateCatalogResult, type UcCatalogPermission, type UpdateEnvConnectionArgs, type UpdateWorkflowsArgs, type UpdateWorkflowsResult, type UploadDirectoryArgs, type UploadDirectoryResult, type ValidateAppOptions, type ValidateAppResult, type ValidationError, type ValidationResult, type WaitCiArgs, type WaitCiResult, type WaitForBranchAuthReadyArgs, type WaitForBranchReadyArgs, type WorkflowDriftReport, type WorkflowFileStatus, type WorkflowFileUpdate, type WorkflowStatus, type WorkflowUpdateOutcome, type WorkflowVerification, type WriteEnvFileArgs, type WritePlaywrightTemplatesArgs, type WritePlaywrightTemplatesResult, _testMakeBrownfieldFixture, abandonFeatureBranch, addE2eToRunTestsScript, addInfraToPackageJson, addInfraToRunTestsScript, addPlaywrightToPackageJson, adoptLakebaseProject, adoptScmState, applySchemaMigrations, assertAdoptionPreflight, assertCleanForFork, assertCommitTargetNotProtected, assertCreatedProjectReady, buildPostgresUrl, buildSchemaQuery, cacheProjectRetention, catalogExists, catalogExplorerUrl, checkDatabricksAuth, checkoutPaired, claimFeatureBranch, clearRetentionCache, compileMigrationPattern, connectionApplicationName, createBranch, createFeaturePairedBranch, createLakebaseProject, createLongRunningBranch, createPairedBranch, createPerfPairedBranch, createProject, createTestPairedBranch, createUatPairedBranch, cutBackup, databricksAuthPrereqMessage, deleteAppEndpoint, deleteBranch, deleteLakebaseProject, deletePairedBranch, 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, findDefaultBranchName, findHistoryRetentionDuration, fixFinding, formatJUnit, formatSchemaDiffAsMarkdown, generateAppYaml, getAppEndpoint, getAppServicePrincipal, getBranchByName, getCachedProjectRetention, getCiAppEndpoint, getConnection, getCredential, getDefaultBranch, getDefaultBranchId, getDefaultBranchName, getEndpoint, getProjectInfo, getProjectRetentionDuration, getRunnerInfo, getSchemaDiff, getTargetNames, grantLakebasePermission, grantUcCatalogPermission, inferTierTopology, initWorkflowState, installHooks, installPlaywright, isAllSchemas, 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, reconcileTierToOrigin, recoverOrphans, release, removeRunner, resolveBranchId, resolveBranchPath, resolveCurrentUser, resolveDatabricksHost, resolveEndpointHost, resolveFeatureStartPoint, resolveJavaHome, resolveLatestBootVersion, resolveLatestLtsJavaVersion, resolveMigrationLanguage, resolveMigrationLayout, resolveParentBranch, resolveProfileForHost, resolveProfileForHostSync, resolveProtectedTierNames, rollbackDeploy, rollbackSchemaMigration, runDoctor$1 as runDoctor, runDoctor as 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 };
@@ -1784,16 +1784,33 @@ stdout: ${stdout}` : killed || signal ? `
1784
1784
  }
1785
1785
  async function runDatabricks(args, opts = {}) {
1786
1786
  const { argv, env, profile } = buildInvocation(args, opts);
1787
+ const timeout = opts.timeout ?? KIT_TIMEOUTS.cliDefault;
1787
1788
  try {
1788
- const { stdout } = await execFileP("databricks", argv, {
1789
- env,
1790
- timeout: opts.timeout ?? KIT_TIMEOUTS.cliDefault
1791
- });
1789
+ if (opts.input !== void 0) {
1790
+ return await execDatabricksWithStdin(argv, opts.input, env, timeout);
1791
+ }
1792
+ const { stdout } = await execFileP("databricks", argv, { env, timeout });
1792
1793
  return stdout.toString();
1793
1794
  } catch (err) {
1794
1795
  throw classifyDatabricksError(err, argv, profile);
1795
1796
  }
1796
1797
  }
1798
+ function execDatabricksWithStdin(argv, input, env, timeout) {
1799
+ return new Promise((resolve2, reject) => {
1800
+ const child = execFile("databricks", argv, { env, timeout }, (err, stdout, stderr) => {
1801
+ if (err) {
1802
+ err.stdout = String(stdout ?? "");
1803
+ err.stderr = String(stderr ?? "");
1804
+ reject(err);
1805
+ return;
1806
+ }
1807
+ resolve2(String(stdout ?? ""));
1808
+ });
1809
+ child.stdin?.on("error", () => {
1810
+ });
1811
+ child.stdin?.end(input);
1812
+ });
1813
+ }
1797
1814
  function runDatabricksSync(args, opts = {}) {
1798
1815
  const { argv, env, profile } = buildInvocation(args, opts);
1799
1816
  try {
@@ -2500,8 +2517,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
2500
2517
  var cached;
2501
2518
  function substrateSelfVersion() {
2502
2519
  if (cached !== void 0) return cached;
2503
- if ("0.2.42".length > 0) {
2504
- cached = "0.2.42";
2520
+ if ("0.2.44".length > 0) {
2521
+ cached = "0.2.44";
2505
2522
  return cached;
2506
2523
  }
2507
2524
  cached = "unknown";
@@ -12760,8 +12777,20 @@ async function setupRunner(args) {
12760
12777
  if (needsConfig) {
12761
12778
  report("Registering runner with GitHub...");
12762
12779
  const regToken = await createRegistrationToken(args.fullRepoName);
12763
- cp4.execSync(
12764
- `./config.sh --url "https://github.com/${args.fullRepoName}" --token "${regToken}" --name "${name}" --labels self-hosted --unattended --replace`,
12780
+ cp4.execFileSync(
12781
+ "./config.sh",
12782
+ [
12783
+ "--url",
12784
+ `https://github.com/${args.fullRepoName}`,
12785
+ "--token",
12786
+ regToken,
12787
+ "--name",
12788
+ name,
12789
+ "--labels",
12790
+ "self-hosted",
12791
+ "--unattended",
12792
+ "--replace"
12793
+ ],
12765
12794
  { cwd: dir, timeout: KIT_TIMEOUTS.cliLong }
12766
12795
  );
12767
12796
  }
@@ -15820,6 +15849,20 @@ function pickRunUrl(pr) {
15820
15849
 
15821
15850
  // scripts/lakebase/scm-merge.ts
15822
15851
  init_esm_shims();
15852
+ async function reconcileTierToOrigin(args) {
15853
+ const { cwd, tier } = args;
15854
+ try {
15855
+ const head = await getCurrentBranch({ cwd });
15856
+ if (head === tier) {
15857
+ await exec2(`git pull --ff-only`, { cwd, timeout: 3e4 });
15858
+ } else {
15859
+ await exec2(`git fetch origin ${shellEscape2(`${tier}:${tier}`)}`, { cwd, timeout: 3e4 });
15860
+ }
15861
+ return null;
15862
+ } catch (err) {
15863
+ return `local reconcile of ${tier} to origin/${tier} failed: ${err instanceof Error ? err.message : String(err)}. Reconcile it by hand (git checkout ${tier} && git pull --ff-only).`;
15864
+ }
15865
+ }
15823
15866
  var ScmMergeError = class extends Error {
15824
15867
  constructor(message, code) {
15825
15868
  super(message);
@@ -15945,6 +15988,8 @@ async function mergeFeature(args) {
15945
15988
  }
15946
15989
  } else {
15947
15990
  headAfter = head || current.branch;
15991
+ const reconcileWarning = await reconcileTierToOrigin({ cwd: args.projectDir, tier: switchTo });
15992
+ if (reconcileWarning) warnings.push(reconcileWarning);
15948
15993
  }
15949
15994
  if (headAfter !== current.branch) {
15950
15995
  try {
@@ -17503,9 +17548,10 @@ async function ensureLakebaseSecretAuth(args) {
17503
17548
  if (typeof pat !== "string" || !pat) {
17504
17549
  throw new Error("databricks tokens create returned no token_value");
17505
17550
  }
17506
- await runDatabricks(["secrets", "put-secret", scopeName, keyName, "--string-value", pat], {
17551
+ await runDatabricks(["secrets", "put-secret", "--json", "@/dev/stdin"], {
17507
17552
  profile,
17508
- timeout: timeoutMs
17553
+ timeout: timeoutMs,
17554
+ input: JSON.stringify({ scope: scopeName, key: keyName, string_value: pat })
17509
17555
  });
17510
17556
  let aclGranted = false;
17511
17557
  if (servicePrincipalClientId) {
@@ -17799,6 +17845,7 @@ export {
17799
17845
  readEnvVar,
17800
17846
  readTargets,
17801
17847
  readWorkflowState,
17848
+ reconcileTierToOrigin,
17802
17849
  recoverOrphans,
17803
17850
  release,
17804
17851
  removeRunner,
@@ -77733,16 +77733,33 @@ stdout: ${stdout}` : killed || signal ? `
77733
77733
  }
77734
77734
  async function runDatabricks(args, opts = {}) {
77735
77735
  const { argv, env, profile } = buildInvocation(args, opts);
77736
+ const timeout = opts.timeout ?? KIT_TIMEOUTS.cliDefault;
77736
77737
  try {
77737
- const { stdout } = await execFileP("databricks", argv, {
77738
- env,
77739
- timeout: opts.timeout ?? KIT_TIMEOUTS.cliDefault
77740
- });
77738
+ if (opts.input !== void 0) {
77739
+ return await execDatabricksWithStdin(argv, opts.input, env, timeout);
77740
+ }
77741
+ const { stdout } = await execFileP("databricks", argv, { env, timeout });
77741
77742
  return stdout.toString();
77742
77743
  } catch (err) {
77743
77744
  throw classifyDatabricksError(err, argv, profile);
77744
77745
  }
77745
77746
  }
77747
+ function execDatabricksWithStdin(argv, input, env, timeout) {
77748
+ return new Promise((resolve, reject) => {
77749
+ const child = (0, import_node_child_process2.execFile)("databricks", argv, { env, timeout }, (err, stdout, stderr) => {
77750
+ if (err) {
77751
+ err.stdout = String(stdout ?? "");
77752
+ err.stderr = String(stderr ?? "");
77753
+ reject(err);
77754
+ return;
77755
+ }
77756
+ resolve(String(stdout ?? ""));
77757
+ });
77758
+ child.stdin?.on("error", () => {
77759
+ });
77760
+ child.stdin?.end(input);
77761
+ });
77762
+ }
77746
77763
  function runDatabricksSync(args, opts = {}) {
77747
77764
  const { argv, env, profile } = buildInvocation(args, opts);
77748
77765
  try {
@@ -79272,8 +79289,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
79272
79289
  var cached;
79273
79290
  function substrateSelfVersion() {
79274
79291
  if (cached !== void 0) return cached;
79275
- if ("0.2.42".length > 0) {
79276
- cached = "0.2.42";
79292
+ if ("0.2.44".length > 0) {
79293
+ cached = "0.2.44";
79277
79294
  return cached;
79278
79295
  }
79279
79296
  cached = "unknown";
@@ -212,16 +212,33 @@ stdout: ${stdout}` : killed || signal ? `
212
212
  }
213
213
  async function runDatabricks(args, opts = {}) {
214
214
  const { argv, env, profile } = buildInvocation(args, opts);
215
+ const timeout = opts.timeout ?? KIT_TIMEOUTS.cliDefault;
215
216
  try {
216
- const { stdout } = await execFileP("databricks", argv, {
217
- env,
218
- timeout: opts.timeout ?? KIT_TIMEOUTS.cliDefault
219
- });
217
+ if (opts.input !== void 0) {
218
+ return await execDatabricksWithStdin(argv, opts.input, env, timeout);
219
+ }
220
+ const { stdout } = await execFileP("databricks", argv, { env, timeout });
220
221
  return stdout.toString();
221
222
  } catch (err) {
222
223
  throw classifyDatabricksError(err, argv, profile);
223
224
  }
224
225
  }
226
+ function execDatabricksWithStdin(argv, input, env, timeout) {
227
+ return new Promise((resolve, reject) => {
228
+ const child = execFile("databricks", argv, { env, timeout }, (err, stdout, stderr) => {
229
+ if (err) {
230
+ err.stdout = String(stdout ?? "");
231
+ err.stderr = String(stderr ?? "");
232
+ reject(err);
233
+ return;
234
+ }
235
+ resolve(String(stdout ?? ""));
236
+ });
237
+ child.stdin?.on("error", () => {
238
+ });
239
+ child.stdin?.end(input);
240
+ });
241
+ }
225
242
  function runDatabricksSync(args, opts = {}) {
226
243
  const { argv, env, profile } = buildInvocation(args, opts);
227
244
  try {
@@ -375,8 +392,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
375
392
  var cached;
376
393
  function substrateSelfVersion() {
377
394
  if (cached !== void 0) return cached;
378
- if ("0.2.42".length > 0) {
379
- cached = "0.2.42";
395
+ if ("0.2.44".length > 0) {
396
+ cached = "0.2.44";
380
397
  return cached;
381
398
  }
382
399
  cached = "unknown";
@@ -77733,16 +77733,33 @@ stdout: ${stdout}` : killed || signal ? `
77733
77733
  }
77734
77734
  async function runDatabricks(args, opts = {}) {
77735
77735
  const { argv, env, profile } = buildInvocation(args, opts);
77736
+ const timeout = opts.timeout ?? KIT_TIMEOUTS.cliDefault;
77736
77737
  try {
77737
- const { stdout } = await execFileP("databricks", argv, {
77738
- env,
77739
- timeout: opts.timeout ?? KIT_TIMEOUTS.cliDefault
77740
- });
77738
+ if (opts.input !== void 0) {
77739
+ return await execDatabricksWithStdin(argv, opts.input, env, timeout);
77740
+ }
77741
+ const { stdout } = await execFileP("databricks", argv, { env, timeout });
77741
77742
  return stdout.toString();
77742
77743
  } catch (err) {
77743
77744
  throw classifyDatabricksError(err, argv, profile);
77744
77745
  }
77745
77746
  }
77747
+ function execDatabricksWithStdin(argv, input, env, timeout) {
77748
+ return new Promise((resolve, reject) => {
77749
+ const child = (0, import_node_child_process2.execFile)("databricks", argv, { env, timeout }, (err, stdout, stderr) => {
77750
+ if (err) {
77751
+ err.stdout = String(stdout ?? "");
77752
+ err.stderr = String(stderr ?? "");
77753
+ reject(err);
77754
+ return;
77755
+ }
77756
+ resolve(String(stdout ?? ""));
77757
+ });
77758
+ child.stdin?.on("error", () => {
77759
+ });
77760
+ child.stdin?.end(input);
77761
+ });
77762
+ }
77746
77763
  function runDatabricksSync(args, opts = {}) {
77747
77764
  const { argv, env, profile } = buildInvocation(args, opts);
77748
77765
  try {
@@ -79272,8 +79289,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
79272
79289
  var cached;
79273
79290
  function substrateSelfVersion() {
79274
79291
  if (cached !== void 0) return cached;
79275
- if ("0.2.42".length > 0) {
79276
- cached = "0.2.42";
79292
+ if ("0.2.44".length > 0) {
79293
+ cached = "0.2.44";
79277
79294
  return cached;
79278
79295
  }
79279
79296
  cached = "unknown";
@@ -212,16 +212,33 @@ stdout: ${stdout}` : killed || signal ? `
212
212
  }
213
213
  async function runDatabricks(args, opts = {}) {
214
214
  const { argv, env, profile } = buildInvocation(args, opts);
215
+ const timeout = opts.timeout ?? KIT_TIMEOUTS.cliDefault;
215
216
  try {
216
- const { stdout } = await execFileP("databricks", argv, {
217
- env,
218
- timeout: opts.timeout ?? KIT_TIMEOUTS.cliDefault
219
- });
217
+ if (opts.input !== void 0) {
218
+ return await execDatabricksWithStdin(argv, opts.input, env, timeout);
219
+ }
220
+ const { stdout } = await execFileP("databricks", argv, { env, timeout });
220
221
  return stdout.toString();
221
222
  } catch (err) {
222
223
  throw classifyDatabricksError(err, argv, profile);
223
224
  }
224
225
  }
226
+ function execDatabricksWithStdin(argv, input, env, timeout) {
227
+ return new Promise((resolve, reject) => {
228
+ const child = execFile("databricks", argv, { env, timeout }, (err, stdout, stderr) => {
229
+ if (err) {
230
+ err.stdout = String(stdout ?? "");
231
+ err.stderr = String(stderr ?? "");
232
+ reject(err);
233
+ return;
234
+ }
235
+ resolve(String(stdout ?? ""));
236
+ });
237
+ child.stdin?.on("error", () => {
238
+ });
239
+ child.stdin?.end(input);
240
+ });
241
+ }
225
242
  function runDatabricksSync(args, opts = {}) {
226
243
  const { argv, env, profile } = buildInvocation(args, opts);
227
244
  try {
@@ -375,8 +392,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
375
392
  var cached;
376
393
  function substrateSelfVersion() {
377
394
  if (cached !== void 0) return cached;
378
- if ("0.2.42".length > 0) {
379
- cached = "0.2.42";
395
+ if ("0.2.44".length > 0) {
396
+ cached = "0.2.44";
380
397
  return cached;
381
398
  }
382
399
  cached = "unknown";