@databricks-solutions/lakebase-scm-utils 0.2.45 → 0.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -4
- package/dist/{pr-D3CteJaf.d.cts → pr-e-E4aP4j.d.cts} +6 -0
- package/dist/{pr-D3CteJaf.d.ts → pr-e-E4aP4j.d.ts} +6 -0
- package/dist/scripts/github/index.cjs +2 -0
- package/dist/scripts/github/index.d.cts +1 -1
- package/dist/scripts/github/index.d.ts +1 -1
- package/dist/scripts/github/index.js +2 -0
- package/dist/scripts/github/pr.cli.cjs +2 -0
- package/dist/scripts/github/pr.cli.js +2 -0
- package/dist/scripts/index.cjs +38 -5
- package/dist/scripts/index.d.cts +2 -2
- package/dist/scripts/index.d.ts +2 -2
- package/dist/scripts/index.js +36 -5
- package/dist/scripts/lakebase/ci-resolve-branch.cli.cjs +12 -3
- package/dist/scripts/lakebase/ci-resolve-branch.cli.js +12 -3
- package/dist/scripts/lakebase/collapse-heads.cli.cjs +12 -3
- package/dist/scripts/lakebase/collapse-heads.cli.js +12 -3
- package/dist/scripts/lakebase/detect-language.cli.cjs +12 -3
- package/dist/scripts/lakebase/detect-language.cli.js +12 -3
- package/dist/scripts/lakebase/doctor.cli.cjs +12 -3
- package/dist/scripts/lakebase/doctor.cli.js +12 -3
- package/dist/scripts/lakebase/get-connection.cli.cjs +12 -3
- package/dist/scripts/lakebase/get-connection.cli.js +12 -3
- package/dist/scripts/lakebase/index.cjs +44 -5
- package/dist/scripts/lakebase/index.d.cts +3 -14
- package/dist/scripts/lakebase/index.d.ts +3 -14
- package/dist/scripts/lakebase/index.js +44 -5
- package/dist/scripts/lakebase/infra-runner.cli.cjs +12 -3
- package/dist/scripts/lakebase/infra-runner.cli.js +12 -3
- package/dist/scripts/lakebase/new-migration.cli.cjs +12 -3
- package/dist/scripts/lakebase/new-migration.cli.js +12 -3
- package/dist/scripts/lakebase/schema-diff.cli.cjs +12 -3
- package/dist/scripts/lakebase/schema-diff.cli.js +12 -3
- package/dist/scripts/lakebase/schema-migrate.cli.cjs +12 -3
- package/dist/scripts/lakebase/schema-migrate.cli.js +12 -3
- package/dist/scripts/lakebase/scm-claim-feature.cli.cjs +12 -3
- package/dist/scripts/lakebase/scm-claim-feature.cli.js +12 -3
- package/dist/scripts/lakebase/scm-doctor.cli.cjs +12 -3
- package/dist/scripts/lakebase/scm-doctor.cli.js +12 -3
- package/dist/scripts/lakebase/scm-merge.cli.cjs +12 -3
- package/dist/scripts/lakebase/scm-merge.cli.js +12 -3
- package/dist/scripts/lakebase/scm-prepare-pr.cli.cjs +2 -0
- package/dist/scripts/lakebase/scm-prepare-pr.cli.js +2 -0
- package/dist/scripts/lakebase/scm-reconcile-tier.cli.cjs +12 -3
- package/dist/scripts/lakebase/scm-reconcile-tier.cli.js +12 -3
- package/dist/scripts/lakebase/scm-wait-ci.cli.cjs +8 -0
- package/dist/scripts/lakebase/scm-wait-ci.cli.js +8 -0
- package/dist/scripts/lakebase/sync-ci-secrets.cli.cjs +8610 -0
- package/dist/scripts/lakebase/sync-ci-secrets.cli.d.cts +4 -0
- package/dist/scripts/lakebase/sync-ci-secrets.cli.d.ts +4 -0
- package/dist/scripts/lakebase/sync-ci-secrets.cli.js +8597 -0
- package/dist/scripts/util/index.cjs +21 -2
- package/dist/scripts/util/index.d.cts +9 -1
- package/dist/scripts/util/index.d.ts +9 -1
- package/dist/scripts/util/index.js +19 -2
- package/package.json +3 -2
- package/scripts/github/pr.ts +8 -0
- package/scripts/lakebase/constants.ts +23 -5
- package/scripts/lakebase/create-project.ts +14 -3
- package/scripts/lakebase/get-connection.ts +17 -3
- package/scripts/lakebase/scm-wait-ci.ts +13 -0
- package/scripts/lakebase/sync-ci-secrets.cli.ts +122 -0
- package/scripts/util/ci-secrets.ts +14 -1
- package/skills/lakebase-scm-workflows/README.md +2 -1
- package/templates/project/common/.gitignore.base +6 -0
- package/templates/project/common/scripts/lk +22 -4
- package/templates/project/nodejs/package.json +3 -1
- package/templates/project/nodejs/src/index.js +8 -0
- package/templates/project/nodejs/src/openapi.js +20 -0
- package/templates/project/nodejs/src/routes/health.js +18 -0
- package/templates/project/nodejs/tests/app.test.js +16 -0
package/README.md
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
# @databricks-solutions/lakebase-scm-utils
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
The engine that makes **application code and database schema travel together** through one
|
|
4
|
+
SCM workflow. It drives a single state machine (claim a feature branch, prepare a PR, wait
|
|
5
|
+
for CI, merge) in which every git branch is paired with its own Lakebase Postgres branch, so
|
|
6
|
+
the schema evolves in lockstep with the code and moves through the same gates. On every PR it
|
|
7
|
+
forks a database branch, applies migrations, runs the tests against real Postgres, and posts
|
|
8
|
+
the schema diff; a red run blocks the merge. On merge it migrates the target tier, then tears
|
|
9
|
+
the feature and PR branches down. The same commands run whether a human drives them from the
|
|
10
|
+
CLI / VS Code extension or an agent orchestrator (`consort`) drives them headless.
|
|
11
|
+
|
|
12
|
+
Under the hood it owns database branching, the paired-branch SCM workflow state machine,
|
|
13
|
+
connection and credential minting, schema migration, project scaffold and deploy primitives,
|
|
14
|
+
and the shared git / github / util layer: the portable substrate core shared by the
|
|
15
|
+
`lakebase-scm-extension` IDE extension and the `consort` orchestration kit.
|
|
7
16
|
|
|
8
17
|
It ships two consumption surfaces:
|
|
9
18
|
|
|
@@ -28,6 +28,12 @@ interface PullRequestInfo {
|
|
|
28
28
|
isDraft: boolean;
|
|
29
29
|
ciStatus: "pending" | "success" | "failure";
|
|
30
30
|
checks: PullRequestCheck[];
|
|
31
|
+
/** GitHub's mergeability triple: true/false/null (null = still computing). */
|
|
32
|
+
mergeable?: boolean | null;
|
|
33
|
+
/** GitHub's `mergeable_state`: `clean`/`unstable`/`behind`/`blocked`/`dirty`/`unknown`.
|
|
34
|
+
* `dirty` = merge conflict with the base — a `pull_request` CI run can't be dispatched
|
|
35
|
+
* (there is no mergeable ref), so a waiter must surface this, not poll until timeout. */
|
|
36
|
+
mergeableState?: string;
|
|
31
37
|
headBranch: string;
|
|
32
38
|
baseBranch: string;
|
|
33
39
|
body?: string;
|
|
@@ -28,6 +28,12 @@ interface PullRequestInfo {
|
|
|
28
28
|
isDraft: boolean;
|
|
29
29
|
ciStatus: "pending" | "success" | "failure";
|
|
30
30
|
checks: PullRequestCheck[];
|
|
31
|
+
/** GitHub's mergeability triple: true/false/null (null = still computing). */
|
|
32
|
+
mergeable?: boolean | null;
|
|
33
|
+
/** GitHub's `mergeable_state`: `clean`/`unstable`/`behind`/`blocked`/`dirty`/`unknown`.
|
|
34
|
+
* `dirty` = merge conflict with the base — a `pull_request` CI run can't be dispatched
|
|
35
|
+
* (there is no mergeable ref), so a waiter must surface this, not poll until timeout. */
|
|
36
|
+
mergeableState?: string;
|
|
31
37
|
headBranch: string;
|
|
32
38
|
baseBranch: string;
|
|
33
39
|
body?: string;
|
|
@@ -8840,6 +8840,8 @@ async function getPullRequest(ownerRepo, headBranch) {
|
|
|
8840
8840
|
isDraft: pr.draft || false,
|
|
8841
8841
|
ciStatus,
|
|
8842
8842
|
checks,
|
|
8843
|
+
mergeable: pr.mergeable,
|
|
8844
|
+
mergeableState: pr.mergeable_state,
|
|
8843
8845
|
headBranch: pr.head?.ref || headBranch,
|
|
8844
8846
|
baseBranch: pr.base?.ref || "",
|
|
8845
8847
|
body: pr.body || void 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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';
|
|
2
2
|
|
|
3
3
|
/** OAuth scopes the workflow ops collectively need. */
|
|
4
4
|
declare const GITHUB_SCOPES: readonly ["repo", "workflow", "delete_repo"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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.js';
|
|
2
2
|
|
|
3
3
|
/** OAuth scopes the workflow ops collectively need. */
|
|
4
4
|
declare const GITHUB_SCOPES: readonly ["repo", "workflow", "delete_repo"];
|
|
@@ -8799,6 +8799,8 @@ async function getPullRequest(ownerRepo, headBranch) {
|
|
|
8799
8799
|
isDraft: pr.draft || false,
|
|
8800
8800
|
ciStatus,
|
|
8801
8801
|
checks,
|
|
8802
|
+
mergeable: pr.mergeable,
|
|
8803
|
+
mergeableState: pr.mergeable_state,
|
|
8802
8804
|
headBranch: pr.head?.ref || headBranch,
|
|
8803
8805
|
baseBranch: pr.base?.ref || "",
|
|
8804
8806
|
body: pr.body || void 0,
|
|
@@ -8524,6 +8524,8 @@ async function getPullRequest(ownerRepo, headBranch) {
|
|
|
8524
8524
|
isDraft: pr.draft || false,
|
|
8525
8525
|
ciStatus,
|
|
8526
8526
|
checks,
|
|
8527
|
+
mergeable: pr.mergeable,
|
|
8528
|
+
mergeableState: pr.mergeable_state,
|
|
8527
8529
|
headBranch: pr.head?.ref || headBranch,
|
|
8528
8530
|
baseBranch: pr.base?.ref || "",
|
|
8529
8531
|
body: pr.body || void 0,
|
|
@@ -8525,6 +8525,8 @@ async function getPullRequest(ownerRepo, headBranch) {
|
|
|
8525
8525
|
isDraft: pr.draft || false,
|
|
8526
8526
|
ciStatus,
|
|
8527
8527
|
checks,
|
|
8528
|
+
mergeable: pr.mergeable,
|
|
8529
|
+
mergeableState: pr.mergeable_state,
|
|
8528
8530
|
headBranch: pr.head?.ref || headBranch,
|
|
8529
8531
|
baseBranch: pr.base?.ref || "",
|
|
8530
8532
|
body: pr.body || void 0,
|
package/dist/scripts/index.cjs
CHANGED
|
@@ -78954,6 +78954,7 @@ __export(scripts_exports, {
|
|
|
78954
78954
|
PYTHON_E2E_TEMPLATE_FILES: () => PYTHON_E2E_TEMPLATE_FILES,
|
|
78955
78955
|
ProtectedBranchCommitError: () => ProtectedBranchCommitError,
|
|
78956
78956
|
ProtectedBranchError: () => ProtectedBranchError,
|
|
78957
|
+
REQUIRED_CI_SECRETS: () => REQUIRED_CI_SECRETS,
|
|
78957
78958
|
SCM_STATES: () => SCM_STATES,
|
|
78958
78959
|
STATE_FILE_REL: () => STATE_FILE_REL,
|
|
78959
78960
|
SchemaMigrationError: () => SchemaMigrationError,
|
|
@@ -79165,6 +79166,7 @@ __export(scripts_exports, {
|
|
|
79165
79166
|
mergePullRequest: () => mergePullRequest,
|
|
79166
79167
|
minLakebaseTtl: () => minLakebaseTtl,
|
|
79167
79168
|
mintCredential: () => mintCredential,
|
|
79169
|
+
missingCiSecrets: () => missingCiSecrets,
|
|
79168
79170
|
normalizeHost: () => normalizeHost,
|
|
79169
79171
|
normalizeTierName: () => normalizeTierName,
|
|
79170
79172
|
parseHostFromAuthDescribe: () => parseHostFromAuthDescribe,
|
|
@@ -86947,6 +86949,8 @@ async function getPullRequest(ownerRepo, headBranch) {
|
|
|
86947
86949
|
isDraft: pr.draft || false,
|
|
86948
86950
|
ciStatus,
|
|
86949
86951
|
checks,
|
|
86952
|
+
mergeable: pr.mergeable,
|
|
86953
|
+
mergeableState: pr.mergeable_state,
|
|
86950
86954
|
headBranch: pr.head?.ref || headBranch,
|
|
86951
86955
|
baseBranch: pr.base?.ref || "",
|
|
86952
86956
|
body: pr.body || void 0,
|
|
@@ -88906,6 +88910,7 @@ var RUNTIME_ARTIFACT_IGNORE = [
|
|
|
88906
88910
|
var DEFAULT_ENDPOINT = "primary";
|
|
88907
88911
|
var CONSORT_APPLICATION_NAME = "consort";
|
|
88908
88912
|
var SCM_UTILS_APPLICATION_NAME = "scm-utils";
|
|
88913
|
+
var SCM_CLIENT_ENV = "LAKEBASE_SCM_CLIENT";
|
|
88909
88914
|
var CONSORT_VERSION_ENV = "CONSORT_VERSION";
|
|
88910
88915
|
|
|
88911
88916
|
// scripts/lakebase/self-version.ts
|
|
@@ -88917,8 +88922,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
88917
88922
|
var cached;
|
|
88918
88923
|
function substrateSelfVersion() {
|
|
88919
88924
|
if (cached !== void 0) return cached;
|
|
88920
|
-
if ("0.2.
|
|
88921
|
-
cached = "0.2.
|
|
88925
|
+
if ("0.2.47".length > 0) {
|
|
88926
|
+
cached = "0.2.47";
|
|
88922
88927
|
return cached;
|
|
88923
88928
|
}
|
|
88924
88929
|
cached = "unknown";
|
|
@@ -88946,9 +88951,17 @@ function substrateSelfVersion() {
|
|
|
88946
88951
|
}
|
|
88947
88952
|
|
|
88948
88953
|
// scripts/lakebase/get-connection.ts
|
|
88954
|
+
function sanitizeApplicationName(raw) {
|
|
88955
|
+
const cleaned = raw.replace(/[^\x21-\x7e]+/g, "-").replace(/^-+|-+$/g, "");
|
|
88956
|
+
if (!cleaned) return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
88957
|
+
return cleaned.length > 63 ? cleaned.slice(0, 63) : cleaned;
|
|
88958
|
+
}
|
|
88949
88959
|
function connectionApplicationName() {
|
|
88960
|
+
const client = process.env[SCM_CLIENT_ENV]?.trim();
|
|
88961
|
+
if (client) return sanitizeApplicationName(client);
|
|
88950
88962
|
const consortVersion = process.env[CONSORT_VERSION_ENV]?.trim();
|
|
88951
|
-
|
|
88963
|
+
if (consortVersion) return `${CONSORT_APPLICATION_NAME}/${consortVersion}`;
|
|
88964
|
+
return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
88952
88965
|
}
|
|
88953
88966
|
async function getConnection(args) {
|
|
88954
88967
|
const endpointName = args.endpointName ?? DEFAULT_ENDPOINT;
|
|
@@ -92314,6 +92327,11 @@ async function deleteRemoteBranch(args) {
|
|
|
92314
92327
|
}
|
|
92315
92328
|
|
|
92316
92329
|
// scripts/util/ci-secrets.ts
|
|
92330
|
+
var REQUIRED_CI_SECRETS = ["DATABRICKS_HOST", "LAKEBASE_PROJECT_ID", "DATABRICKS_TOKEN"];
|
|
92331
|
+
async function missingCiSecrets(ownerRepo) {
|
|
92332
|
+
const present = new Set(await listSecretNames(ownerRepo));
|
|
92333
|
+
return REQUIRED_CI_SECRETS.filter((n) => !present.has(n));
|
|
92334
|
+
}
|
|
92317
92335
|
async function syncCiSecrets(args) {
|
|
92318
92336
|
const lifetime = args.lifetimeSeconds ?? 86400;
|
|
92319
92337
|
const comment = args.comment ?? "GitHub Actions CI";
|
|
@@ -92830,10 +92848,17 @@ Last probe error:
|
|
|
92830
92848
|
lifetimeSeconds: 86400,
|
|
92831
92849
|
ownerRepo: fullRepoName
|
|
92832
92850
|
});
|
|
92851
|
+
const missing = await missingCiSecrets(fullRepoName);
|
|
92852
|
+
if (missing.length > 0) {
|
|
92853
|
+
const m2 = `CI auth incomplete \u2014 repo secret(s) MISSING: ${missing.join(", ")}. CI cannot provision a per-PR Lakebase branch until fixed. Repair with: lakebase-sync-ci-secrets (run in the project).`;
|
|
92854
|
+
warnings.push(m2);
|
|
92855
|
+
report(`WARNING: ${m2}`);
|
|
92856
|
+
}
|
|
92833
92857
|
} catch (err) {
|
|
92834
92858
|
const msg = err instanceof Error ? err.message : String(err);
|
|
92835
|
-
|
|
92836
|
-
|
|
92859
|
+
const m2 = `CI auth setup failed: ${msg}. CI will fail (no DATABASE_URL) until repaired \u2014 run: lakebase-sync-ci-secrets (in the project).`;
|
|
92860
|
+
warnings.push(m2);
|
|
92861
|
+
report(`WARNING: ${m2}`);
|
|
92837
92862
|
}
|
|
92838
92863
|
}
|
|
92839
92864
|
if (useGithub && runnerType === "self-hosted") {
|
|
@@ -95185,6 +95210,12 @@ async function waitForCi(args) {
|
|
|
95185
95210
|
if (lastPr.ciStatus === "success") {
|
|
95186
95211
|
return { done: true, value: lastPr };
|
|
95187
95212
|
}
|
|
95213
|
+
if (lastPr.mergeableState === "dirty" && lastPr.checks.length === 0) {
|
|
95214
|
+
throw new ScmWaitCiError(
|
|
95215
|
+
`PR ${lastPr.url} is CONFLICTING with ${lastPr.baseBranch} \u2014 GitHub will not dispatch CI (0 runs) until the conflict is resolved. Reconcile the branch and re-push; the synchronize event will trigger CI.`,
|
|
95216
|
+
"pr-conflicting"
|
|
95217
|
+
);
|
|
95218
|
+
}
|
|
95188
95219
|
if (lastPr.ciStatus === "failure") {
|
|
95189
95220
|
const failed = lastPr.checks.filter((c) => /(FAILURE|TIMED_OUT|CANCELLED|ACTION_REQUIRED)/i.test(c.conclusion)).map((c) => `${c.name} (${c.conclusion})`);
|
|
95190
95221
|
throw new ScmWaitCiError(
|
|
@@ -97748,6 +97779,7 @@ function withProxyEnv(base = {}) {
|
|
|
97748
97779
|
PYTHON_E2E_TEMPLATE_FILES,
|
|
97749
97780
|
ProtectedBranchCommitError,
|
|
97750
97781
|
ProtectedBranchError,
|
|
97782
|
+
REQUIRED_CI_SECRETS,
|
|
97751
97783
|
SCM_STATES,
|
|
97752
97784
|
STATE_FILE_REL,
|
|
97753
97785
|
SchemaMigrationError,
|
|
@@ -97959,6 +97991,7 @@ function withProxyEnv(base = {}) {
|
|
|
97959
97991
|
mergePullRequest,
|
|
97960
97992
|
minLakebaseTtl,
|
|
97961
97993
|
mintCredential,
|
|
97994
|
+
missingCiSecrets,
|
|
97962
97995
|
normalizeHost,
|
|
97963
97996
|
normalizeTierName,
|
|
97964
97997
|
parseHostFromAuthDescribe,
|
package/dist/scripts/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CreateRepoOptions, GITHUB_SCOPES, GitHubAuthDiagnosis, GitHubAuthSource, GitHubRepoError, GitHubRunnerError, GitHubSecretsError, RepoRunner, VsCodeSessionOptions, 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-
|
|
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
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, DatabricksProfile, DeleteAppEndpointArgs, DeleteAppEndpointResult, DeleteBranchArgs, DeletePairedBranchArgs, DeletePairedBranchResult, DeployClaudeCommandsOptions, DeployClaudeCommandsResult, DeployEnvExampleArgs, DeployLanguageProjectArgs, DeploySpringStarterArgs, DeployTarget, DeployTargetsConfig, DetectCommandDriftArgs, DetectScaffoldedDriftArgs, DetectWorkflowDriftArgs, DoctorArgs, DoctorFinding, DoctorReport, DoctorSeverity, DsnArgs, DsnResult, 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, 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, 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, checkoutPaired, claimFeatureBranch, clearRetentionCache, compileMigrationPattern, connectionApplicationName, createBranch, createFeaturePairedBranch, createLakebaseProject, createLongRunningBranch, createPairedBranch, createPerfPairedBranch, createProject, createTestPairedBranch, createUatPairedBranch, cutBackup, databricksAuthPrereqMessage, defaultRefreshPromoteWorkflows, 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, 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
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';
|
|
5
|
-
export { CopyDirSubstitutedArgs, LAKEBASE_BRANCH_NAME_MAX, OwnerRepo, PROXY_ENV_KEYS, PollProbeDone, PollProbePending, PollProbeResult, PollUntilArgs, PollUntilDoneResult, PollUntilResult, PollUntilTimeoutResult, SyncCiSecretsArgs, copyDirSubstituted, delay, extractZipToDir, formatOwnerRepo, isCliEntry, parseOwnerRepo, patchPomForLakebase, pollUntil, pollUntilDefined, proxyEnvSubset, sanitizeArtifactId, sanitizeBranchName, syncCiSecrets, withProxyEnv } from './util/index.cjs';
|
|
5
|
+
export { CopyDirSubstitutedArgs, LAKEBASE_BRANCH_NAME_MAX, OwnerRepo, PROXY_ENV_KEYS, PollProbeDone, PollProbePending, PollProbeResult, PollUntilArgs, PollUntilDoneResult, PollUntilResult, PollUntilTimeoutResult, REQUIRED_CI_SECRETS, SyncCiSecretsArgs, copyDirSubstituted, delay, extractZipToDir, formatOwnerRepo, isCliEntry, missingCiSecrets, parseOwnerRepo, patchPomForLakebase, pollUntil, pollUntilDefined, proxyEnvSubset, sanitizeArtifactId, sanitizeBranchName, syncCiSecrets, 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
|
import 'pg';
|
package/dist/scripts/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CreateRepoOptions, GITHUB_SCOPES, GitHubAuthDiagnosis, GitHubAuthSource, GitHubRepoError, GitHubRunnerError, GitHubSecretsError, RepoRunner, VsCodeSessionOptions, createRegistrationToken, createRepo, deleteRepo, deleteRunner, diagnoseGitHubAuth, getActionsEnabled, getCurrentUser, getRepoFullName, getRunnerIdByName, getRunnerStatus, listRepoRunners, listSecretNames, repoExists, resolveGitHubToken, setRepoSecret, setRepoSecrets, tryGhAuthToken, tryVsCodeSession } from './github/index.js';
|
|
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-
|
|
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.js';
|
|
3
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, DatabricksProfile, DeleteAppEndpointArgs, DeleteAppEndpointResult, DeleteBranchArgs, DeletePairedBranchArgs, DeletePairedBranchResult, DeployClaudeCommandsOptions, DeployClaudeCommandsResult, DeployEnvExampleArgs, DeployLanguageProjectArgs, DeploySpringStarterArgs, DeployTarget, DeployTargetsConfig, DetectCommandDriftArgs, DetectScaffoldedDriftArgs, DetectWorkflowDriftArgs, DoctorArgs, DoctorFinding, DoctorReport, DoctorSeverity, DsnArgs, DsnResult, 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, 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, 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, checkoutPaired, claimFeatureBranch, clearRetentionCache, compileMigrationPattern, connectionApplicationName, createBranch, createFeaturePairedBranch, createLakebaseProject, createLongRunningBranch, createPairedBranch, createPerfPairedBranch, createProject, createTestPairedBranch, createUatPairedBranch, cutBackup, databricksAuthPrereqMessage, defaultRefreshPromoteWorkflows, 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, 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.js';
|
|
4
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.js';
|
|
5
|
-
export { CopyDirSubstitutedArgs, LAKEBASE_BRANCH_NAME_MAX, OwnerRepo, PROXY_ENV_KEYS, PollProbeDone, PollProbePending, PollProbeResult, PollUntilArgs, PollUntilDoneResult, PollUntilResult, PollUntilTimeoutResult, SyncCiSecretsArgs, copyDirSubstituted, delay, extractZipToDir, formatOwnerRepo, isCliEntry, parseOwnerRepo, patchPomForLakebase, pollUntil, pollUntilDefined, proxyEnvSubset, sanitizeArtifactId, sanitizeBranchName, syncCiSecrets, withProxyEnv } from './util/index.js';
|
|
5
|
+
export { CopyDirSubstitutedArgs, LAKEBASE_BRANCH_NAME_MAX, OwnerRepo, PROXY_ENV_KEYS, PollProbeDone, PollProbePending, PollProbeResult, PollUntilArgs, PollUntilDoneResult, PollUntilResult, PollUntilTimeoutResult, REQUIRED_CI_SECRETS, SyncCiSecretsArgs, copyDirSubstituted, delay, extractZipToDir, formatOwnerRepo, isCliEntry, missingCiSecrets, parseOwnerRepo, patchPomForLakebase, pollUntil, pollUntilDefined, proxyEnvSubset, sanitizeArtifactId, sanitizeBranchName, syncCiSecrets, withProxyEnv } from './util/index.js';
|
|
6
6
|
export { C as CwdOnly, E as ExecOptions, e as exec, s as shq } from '../exec-CwxSWhlz.js';
|
|
7
7
|
import 'pg';
|
package/dist/scripts/index.js
CHANGED
|
@@ -9118,6 +9118,8 @@ async function getPullRequest(ownerRepo, headBranch) {
|
|
|
9118
9118
|
isDraft: pr.draft || false,
|
|
9119
9119
|
ciStatus,
|
|
9120
9120
|
checks,
|
|
9121
|
+
mergeable: pr.mergeable,
|
|
9122
|
+
mergeableState: pr.mergeable_state,
|
|
9121
9123
|
headBranch: pr.head?.ref || headBranch,
|
|
9122
9124
|
baseBranch: pr.base?.ref || "",
|
|
9123
9125
|
body: pr.body || void 0,
|
|
@@ -9708,6 +9710,7 @@ var RUNTIME_ARTIFACT_IGNORE = [
|
|
|
9708
9710
|
var DEFAULT_ENDPOINT = "primary";
|
|
9709
9711
|
var CONSORT_APPLICATION_NAME = "consort";
|
|
9710
9712
|
var SCM_UTILS_APPLICATION_NAME = "scm-utils";
|
|
9713
|
+
var SCM_CLIENT_ENV = "LAKEBASE_SCM_CLIENT";
|
|
9711
9714
|
var CONSORT_VERSION_ENV = "CONSORT_VERSION";
|
|
9712
9715
|
|
|
9713
9716
|
// scripts/lakebase/self-version.ts
|
|
@@ -9719,8 +9722,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
9719
9722
|
var cached;
|
|
9720
9723
|
function substrateSelfVersion() {
|
|
9721
9724
|
if (cached !== void 0) return cached;
|
|
9722
|
-
if ("0.2.
|
|
9723
|
-
cached = "0.2.
|
|
9725
|
+
if ("0.2.47".length > 0) {
|
|
9726
|
+
cached = "0.2.47";
|
|
9724
9727
|
return cached;
|
|
9725
9728
|
}
|
|
9726
9729
|
cached = "unknown";
|
|
@@ -9748,9 +9751,17 @@ function substrateSelfVersion() {
|
|
|
9748
9751
|
}
|
|
9749
9752
|
|
|
9750
9753
|
// scripts/lakebase/get-connection.ts
|
|
9754
|
+
function sanitizeApplicationName(raw) {
|
|
9755
|
+
const cleaned = raw.replace(/[^\x21-\x7e]+/g, "-").replace(/^-+|-+$/g, "");
|
|
9756
|
+
if (!cleaned) return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
9757
|
+
return cleaned.length > 63 ? cleaned.slice(0, 63) : cleaned;
|
|
9758
|
+
}
|
|
9751
9759
|
function connectionApplicationName() {
|
|
9760
|
+
const client = process.env[SCM_CLIENT_ENV]?.trim();
|
|
9761
|
+
if (client) return sanitizeApplicationName(client);
|
|
9752
9762
|
const consortVersion = process.env[CONSORT_VERSION_ENV]?.trim();
|
|
9753
|
-
|
|
9763
|
+
if (consortVersion) return `${CONSORT_APPLICATION_NAME}/${consortVersion}`;
|
|
9764
|
+
return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
9754
9765
|
}
|
|
9755
9766
|
async function getConnection(args) {
|
|
9756
9767
|
const endpointName = args.endpointName ?? DEFAULT_ENDPOINT;
|
|
@@ -13116,6 +13127,11 @@ async function deleteRemoteBranch(args) {
|
|
|
13116
13127
|
}
|
|
13117
13128
|
|
|
13118
13129
|
// scripts/util/ci-secrets.ts
|
|
13130
|
+
var REQUIRED_CI_SECRETS = ["DATABRICKS_HOST", "LAKEBASE_PROJECT_ID", "DATABRICKS_TOKEN"];
|
|
13131
|
+
async function missingCiSecrets(ownerRepo) {
|
|
13132
|
+
const present = new Set(await listSecretNames(ownerRepo));
|
|
13133
|
+
return REQUIRED_CI_SECRETS.filter((n) => !present.has(n));
|
|
13134
|
+
}
|
|
13119
13135
|
async function syncCiSecrets(args) {
|
|
13120
13136
|
const lifetime = args.lifetimeSeconds ?? 86400;
|
|
13121
13137
|
const comment = args.comment ?? "GitHub Actions CI";
|
|
@@ -13632,10 +13648,17 @@ Last probe error:
|
|
|
13632
13648
|
lifetimeSeconds: 86400,
|
|
13633
13649
|
ownerRepo: fullRepoName
|
|
13634
13650
|
});
|
|
13651
|
+
const missing = await missingCiSecrets(fullRepoName);
|
|
13652
|
+
if (missing.length > 0) {
|
|
13653
|
+
const m = `CI auth incomplete \u2014 repo secret(s) MISSING: ${missing.join(", ")}. CI cannot provision a per-PR Lakebase branch until fixed. Repair with: lakebase-sync-ci-secrets (run in the project).`;
|
|
13654
|
+
warnings.push(m);
|
|
13655
|
+
report(`WARNING: ${m}`);
|
|
13656
|
+
}
|
|
13635
13657
|
} catch (err) {
|
|
13636
13658
|
const msg = err instanceof Error ? err.message : String(err);
|
|
13637
|
-
|
|
13638
|
-
|
|
13659
|
+
const m = `CI auth setup failed: ${msg}. CI will fail (no DATABASE_URL) until repaired \u2014 run: lakebase-sync-ci-secrets (in the project).`;
|
|
13660
|
+
warnings.push(m);
|
|
13661
|
+
report(`WARNING: ${m}`);
|
|
13639
13662
|
}
|
|
13640
13663
|
}
|
|
13641
13664
|
if (useGithub && runnerType === "self-hosted") {
|
|
@@ -15987,6 +16010,12 @@ async function waitForCi(args) {
|
|
|
15987
16010
|
if (lastPr.ciStatus === "success") {
|
|
15988
16011
|
return { done: true, value: lastPr };
|
|
15989
16012
|
}
|
|
16013
|
+
if (lastPr.mergeableState === "dirty" && lastPr.checks.length === 0) {
|
|
16014
|
+
throw new ScmWaitCiError(
|
|
16015
|
+
`PR ${lastPr.url} is CONFLICTING with ${lastPr.baseBranch} \u2014 GitHub will not dispatch CI (0 runs) until the conflict is resolved. Reconcile the branch and re-push; the synchronize event will trigger CI.`,
|
|
16016
|
+
"pr-conflicting"
|
|
16017
|
+
);
|
|
16018
|
+
}
|
|
15990
16019
|
if (lastPr.ciStatus === "failure") {
|
|
15991
16020
|
const failed = lastPr.checks.filter((c) => /(FAILURE|TIMED_OUT|CANCELLED|ACTION_REQUIRED)/i.test(c.conclusion)).map((c) => `${c.name} (${c.conclusion})`);
|
|
15992
16021
|
throw new ScmWaitCiError(
|
|
@@ -18549,6 +18578,7 @@ export {
|
|
|
18549
18578
|
PYTHON_E2E_TEMPLATE_FILES,
|
|
18550
18579
|
ProtectedBranchCommitError,
|
|
18551
18580
|
ProtectedBranchError,
|
|
18581
|
+
REQUIRED_CI_SECRETS,
|
|
18552
18582
|
SCM_STATES,
|
|
18553
18583
|
STATE_FILE_REL,
|
|
18554
18584
|
SchemaMigrationError,
|
|
@@ -18760,6 +18790,7 @@ export {
|
|
|
18760
18790
|
mergePullRequest,
|
|
18761
18791
|
minLakebaseTtl,
|
|
18762
18792
|
mintCredential,
|
|
18793
|
+
missingCiSecrets,
|
|
18763
18794
|
normalizeHost,
|
|
18764
18795
|
normalizeTierName,
|
|
18765
18796
|
parseHostFromAuthDescribe,
|
|
@@ -79617,6 +79617,7 @@ var DEFAULT_DATABASE = "databricks_postgres";
|
|
|
79617
79617
|
var DEFAULT_ENDPOINT = "primary";
|
|
79618
79618
|
var CONSORT_APPLICATION_NAME = "consort";
|
|
79619
79619
|
var SCM_UTILS_APPLICATION_NAME = "scm-utils";
|
|
79620
|
+
var SCM_CLIENT_ENV = "LAKEBASE_SCM_CLIENT";
|
|
79620
79621
|
var CONSORT_VERSION_ENV = "CONSORT_VERSION";
|
|
79621
79622
|
|
|
79622
79623
|
// scripts/lakebase/self-version.ts
|
|
@@ -79628,8 +79629,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79628
79629
|
var cached;
|
|
79629
79630
|
function substrateSelfVersion() {
|
|
79630
79631
|
if (cached !== void 0) return cached;
|
|
79631
|
-
if ("0.2.
|
|
79632
|
-
cached = "0.2.
|
|
79632
|
+
if ("0.2.47".length > 0) {
|
|
79633
|
+
cached = "0.2.47";
|
|
79633
79634
|
return cached;
|
|
79634
79635
|
}
|
|
79635
79636
|
cached = "unknown";
|
|
@@ -79657,9 +79658,17 @@ function substrateSelfVersion() {
|
|
|
79657
79658
|
}
|
|
79658
79659
|
|
|
79659
79660
|
// scripts/lakebase/get-connection.ts
|
|
79661
|
+
function sanitizeApplicationName(raw) {
|
|
79662
|
+
const cleaned = raw.replace(/[^\x21-\x7e]+/g, "-").replace(/^-+|-+$/g, "");
|
|
79663
|
+
if (!cleaned) return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
79664
|
+
return cleaned.length > 63 ? cleaned.slice(0, 63) : cleaned;
|
|
79665
|
+
}
|
|
79660
79666
|
function connectionApplicationName() {
|
|
79667
|
+
const client = process.env[SCM_CLIENT_ENV]?.trim();
|
|
79668
|
+
if (client) return sanitizeApplicationName(client);
|
|
79661
79669
|
const consortVersion = process.env[CONSORT_VERSION_ENV]?.trim();
|
|
79662
|
-
|
|
79670
|
+
if (consortVersion) return `${CONSORT_APPLICATION_NAME}/${consortVersion}`;
|
|
79671
|
+
return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
79663
79672
|
}
|
|
79664
79673
|
async function getConnection(args) {
|
|
79665
79674
|
const endpointName = args.endpointName ?? DEFAULT_ENDPOINT;
|
|
@@ -710,6 +710,7 @@ var DEFAULT_DATABASE = "databricks_postgres";
|
|
|
710
710
|
var DEFAULT_ENDPOINT = "primary";
|
|
711
711
|
var CONSORT_APPLICATION_NAME = "consort";
|
|
712
712
|
var SCM_UTILS_APPLICATION_NAME = "scm-utils";
|
|
713
|
+
var SCM_CLIENT_ENV = "LAKEBASE_SCM_CLIENT";
|
|
713
714
|
var CONSORT_VERSION_ENV = "CONSORT_VERSION";
|
|
714
715
|
|
|
715
716
|
// scripts/lakebase/self-version.ts
|
|
@@ -720,8 +721,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
720
721
|
var cached;
|
|
721
722
|
function substrateSelfVersion() {
|
|
722
723
|
if (cached !== void 0) return cached;
|
|
723
|
-
if ("0.2.
|
|
724
|
-
cached = "0.2.
|
|
724
|
+
if ("0.2.47".length > 0) {
|
|
725
|
+
cached = "0.2.47";
|
|
725
726
|
return cached;
|
|
726
727
|
}
|
|
727
728
|
cached = "unknown";
|
|
@@ -749,9 +750,17 @@ function substrateSelfVersion() {
|
|
|
749
750
|
}
|
|
750
751
|
|
|
751
752
|
// scripts/lakebase/get-connection.ts
|
|
753
|
+
function sanitizeApplicationName(raw) {
|
|
754
|
+
const cleaned = raw.replace(/[^\x21-\x7e]+/g, "-").replace(/^-+|-+$/g, "");
|
|
755
|
+
if (!cleaned) return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
756
|
+
return cleaned.length > 63 ? cleaned.slice(0, 63) : cleaned;
|
|
757
|
+
}
|
|
752
758
|
function connectionApplicationName() {
|
|
759
|
+
const client = process.env[SCM_CLIENT_ENV]?.trim();
|
|
760
|
+
if (client) return sanitizeApplicationName(client);
|
|
753
761
|
const consortVersion = process.env[CONSORT_VERSION_ENV]?.trim();
|
|
754
|
-
|
|
762
|
+
if (consortVersion) return `${CONSORT_APPLICATION_NAME}/${consortVersion}`;
|
|
763
|
+
return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
755
764
|
}
|
|
756
765
|
async function getConnection(args) {
|
|
757
766
|
const endpointName = args.endpointName ?? DEFAULT_ENDPOINT;
|
|
@@ -79278,6 +79278,7 @@ var DEFAULT_DATABASE = "databricks_postgres";
|
|
|
79278
79278
|
var DEFAULT_ENDPOINT = "primary";
|
|
79279
79279
|
var CONSORT_APPLICATION_NAME = "consort";
|
|
79280
79280
|
var SCM_UTILS_APPLICATION_NAME = "scm-utils";
|
|
79281
|
+
var SCM_CLIENT_ENV = "LAKEBASE_SCM_CLIENT";
|
|
79281
79282
|
var CONSORT_VERSION_ENV = "CONSORT_VERSION";
|
|
79282
79283
|
|
|
79283
79284
|
// scripts/lakebase/self-version.ts
|
|
@@ -79289,8 +79290,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79289
79290
|
var cached;
|
|
79290
79291
|
function substrateSelfVersion() {
|
|
79291
79292
|
if (cached !== void 0) return cached;
|
|
79292
|
-
if ("0.2.
|
|
79293
|
-
cached = "0.2.
|
|
79293
|
+
if ("0.2.47".length > 0) {
|
|
79294
|
+
cached = "0.2.47";
|
|
79294
79295
|
return cached;
|
|
79295
79296
|
}
|
|
79296
79297
|
cached = "unknown";
|
|
@@ -79318,9 +79319,17 @@ function substrateSelfVersion() {
|
|
|
79318
79319
|
}
|
|
79319
79320
|
|
|
79320
79321
|
// scripts/lakebase/get-connection.ts
|
|
79322
|
+
function sanitizeApplicationName(raw) {
|
|
79323
|
+
const cleaned = raw.replace(/[^\x21-\x7e]+/g, "-").replace(/^-+|-+$/g, "");
|
|
79324
|
+
if (!cleaned) return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
79325
|
+
return cleaned.length > 63 ? cleaned.slice(0, 63) : cleaned;
|
|
79326
|
+
}
|
|
79321
79327
|
function connectionApplicationName() {
|
|
79328
|
+
const client = process.env[SCM_CLIENT_ENV]?.trim();
|
|
79329
|
+
if (client) return sanitizeApplicationName(client);
|
|
79322
79330
|
const consortVersion = process.env[CONSORT_VERSION_ENV]?.trim();
|
|
79323
|
-
|
|
79331
|
+
if (consortVersion) return `${CONSORT_APPLICATION_NAME}/${consortVersion}`;
|
|
79332
|
+
return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
79324
79333
|
}
|
|
79325
79334
|
async function getConnection(args) {
|
|
79326
79335
|
const endpointName = args.endpointName ?? DEFAULT_ENDPOINT;
|
|
@@ -382,6 +382,7 @@ var DEFAULT_DATABASE = "databricks_postgres";
|
|
|
382
382
|
var DEFAULT_ENDPOINT = "primary";
|
|
383
383
|
var CONSORT_APPLICATION_NAME = "consort";
|
|
384
384
|
var SCM_UTILS_APPLICATION_NAME = "scm-utils";
|
|
385
|
+
var SCM_CLIENT_ENV = "LAKEBASE_SCM_CLIENT";
|
|
385
386
|
var CONSORT_VERSION_ENV = "CONSORT_VERSION";
|
|
386
387
|
|
|
387
388
|
// scripts/lakebase/self-version.ts
|
|
@@ -392,8 +393,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
392
393
|
var cached;
|
|
393
394
|
function substrateSelfVersion() {
|
|
394
395
|
if (cached !== void 0) return cached;
|
|
395
|
-
if ("0.2.
|
|
396
|
-
cached = "0.2.
|
|
396
|
+
if ("0.2.47".length > 0) {
|
|
397
|
+
cached = "0.2.47";
|
|
397
398
|
return cached;
|
|
398
399
|
}
|
|
399
400
|
cached = "unknown";
|
|
@@ -421,9 +422,17 @@ function substrateSelfVersion() {
|
|
|
421
422
|
}
|
|
422
423
|
|
|
423
424
|
// scripts/lakebase/get-connection.ts
|
|
425
|
+
function sanitizeApplicationName(raw) {
|
|
426
|
+
const cleaned = raw.replace(/[^\x21-\x7e]+/g, "-").replace(/^-+|-+$/g, "");
|
|
427
|
+
if (!cleaned) return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
428
|
+
return cleaned.length > 63 ? cleaned.slice(0, 63) : cleaned;
|
|
429
|
+
}
|
|
424
430
|
function connectionApplicationName() {
|
|
431
|
+
const client = process.env[SCM_CLIENT_ENV]?.trim();
|
|
432
|
+
if (client) return sanitizeApplicationName(client);
|
|
425
433
|
const consortVersion = process.env[CONSORT_VERSION_ENV]?.trim();
|
|
426
|
-
|
|
434
|
+
if (consortVersion) return `${CONSORT_APPLICATION_NAME}/${consortVersion}`;
|
|
435
|
+
return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
427
436
|
}
|
|
428
437
|
async function getConnection(args) {
|
|
429
438
|
const endpointName = args.endpointName ?? DEFAULT_ENDPOINT;
|
|
@@ -79278,6 +79278,7 @@ var DEFAULT_DATABASE = "databricks_postgres";
|
|
|
79278
79278
|
var DEFAULT_ENDPOINT = "primary";
|
|
79279
79279
|
var CONSORT_APPLICATION_NAME = "consort";
|
|
79280
79280
|
var SCM_UTILS_APPLICATION_NAME = "scm-utils";
|
|
79281
|
+
var SCM_CLIENT_ENV = "LAKEBASE_SCM_CLIENT";
|
|
79281
79282
|
var CONSORT_VERSION_ENV = "CONSORT_VERSION";
|
|
79282
79283
|
|
|
79283
79284
|
// scripts/lakebase/self-version.ts
|
|
@@ -79289,8 +79290,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79289
79290
|
var cached;
|
|
79290
79291
|
function substrateSelfVersion() {
|
|
79291
79292
|
if (cached !== void 0) return cached;
|
|
79292
|
-
if ("0.2.
|
|
79293
|
-
cached = "0.2.
|
|
79293
|
+
if ("0.2.47".length > 0) {
|
|
79294
|
+
cached = "0.2.47";
|
|
79294
79295
|
return cached;
|
|
79295
79296
|
}
|
|
79296
79297
|
cached = "unknown";
|
|
@@ -79318,9 +79319,17 @@ function substrateSelfVersion() {
|
|
|
79318
79319
|
}
|
|
79319
79320
|
|
|
79320
79321
|
// scripts/lakebase/get-connection.ts
|
|
79322
|
+
function sanitizeApplicationName(raw) {
|
|
79323
|
+
const cleaned = raw.replace(/[^\x21-\x7e]+/g, "-").replace(/^-+|-+$/g, "");
|
|
79324
|
+
if (!cleaned) return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
79325
|
+
return cleaned.length > 63 ? cleaned.slice(0, 63) : cleaned;
|
|
79326
|
+
}
|
|
79321
79327
|
function connectionApplicationName() {
|
|
79328
|
+
const client = process.env[SCM_CLIENT_ENV]?.trim();
|
|
79329
|
+
if (client) return sanitizeApplicationName(client);
|
|
79322
79330
|
const consortVersion = process.env[CONSORT_VERSION_ENV]?.trim();
|
|
79323
|
-
|
|
79331
|
+
if (consortVersion) return `${CONSORT_APPLICATION_NAME}/${consortVersion}`;
|
|
79332
|
+
return `${SCM_UTILS_APPLICATION_NAME}/${substrateSelfVersion()}`;
|
|
79324
79333
|
}
|
|
79325
79334
|
async function getConnection(args) {
|
|
79326
79335
|
const endpointName = args.endpointName ?? DEFAULT_ENDPOINT;
|