@databricks-solutions/lakebase-scm-utils 0.2.48 → 0.2.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ci-secrets-CnGrdQV-.d.cts +84 -0
- package/dist/ci-secrets-CnGrdQV-.d.ts +84 -0
- package/dist/scripts/index.cjs +2177 -2052
- package/dist/scripts/index.d.cts +2 -1
- package/dist/scripts/index.d.ts +2 -1
- package/dist/scripts/index.js +253 -134
- package/dist/scripts/lakebase/ci-resolve-branch.cli.cjs +2 -2
- package/dist/scripts/lakebase/ci-resolve-branch.cli.js +2 -2
- package/dist/scripts/lakebase/collapse-heads.cli.cjs +2 -2
- package/dist/scripts/lakebase/collapse-heads.cli.js +2 -2
- package/dist/scripts/lakebase/detect-language.cli.cjs +2 -2
- package/dist/scripts/lakebase/detect-language.cli.js +2 -2
- package/dist/scripts/lakebase/doctor.cli.cjs +2 -2
- package/dist/scripts/lakebase/doctor.cli.js +2 -2
- package/dist/scripts/lakebase/get-connection.cli.cjs +2 -2
- package/dist/scripts/lakebase/get-connection.cli.js +2 -2
- package/dist/scripts/lakebase/index.cjs +2163 -2050
- package/dist/scripts/lakebase/index.d.cts +8 -0
- package/dist/scripts/lakebase/index.d.ts +8 -0
- package/dist/scripts/lakebase/index.js +243 -130
- package/dist/scripts/lakebase/infra-runner.cli.cjs +2 -2
- package/dist/scripts/lakebase/infra-runner.cli.js +2 -2
- package/dist/scripts/lakebase/new-migration.cli.cjs +2 -2
- package/dist/scripts/lakebase/new-migration.cli.js +2 -2
- package/dist/scripts/lakebase/schema-diff.cli.cjs +2 -2
- package/dist/scripts/lakebase/schema-diff.cli.js +2 -2
- package/dist/scripts/lakebase/schema-migrate.cli.cjs +2 -2
- package/dist/scripts/lakebase/schema-migrate.cli.js +2 -2
- package/dist/scripts/lakebase/scm-claim-feature.cli.cjs +2 -2
- package/dist/scripts/lakebase/scm-claim-feature.cli.js +2 -2
- package/dist/scripts/lakebase/scm-doctor.cli.cjs +2 -2
- package/dist/scripts/lakebase/scm-doctor.cli.js +2 -2
- package/dist/scripts/lakebase/scm-merge.cli.cjs +2216 -1994
- package/dist/scripts/lakebase/scm-merge.cli.js +296 -74
- package/dist/scripts/lakebase/scm-prepare-pr.cli.cjs +479 -86
- package/dist/scripts/lakebase/scm-prepare-pr.cli.js +479 -86
- package/dist/scripts/lakebase/scm-reconcile-tier.cli.cjs +2 -2
- package/dist/scripts/lakebase/scm-reconcile-tier.cli.js +2 -2
- package/dist/scripts/lakebase/sync-ci-secrets.cli.cjs +56 -30
- package/dist/scripts/lakebase/sync-ci-secrets.cli.js +56 -30
- package/dist/scripts/util/index.cjs +142 -25
- package/dist/scripts/util/index.d.cts +2 -27
- package/dist/scripts/util/index.d.ts +2 -27
- package/dist/scripts/util/index.js +136 -25
- package/package.json +1 -1
- package/scripts/lakebase/create-project.ts +2 -2
- package/scripts/lakebase/scm-merge.ts +21 -0
- package/scripts/lakebase/scm-prepare-pr.ts +10 -1
- package/scripts/lakebase/sync-ci-secrets.cli.ts +2 -2
- package/scripts/util/ci-secrets.ts +212 -26
- package/templates/project/common/scripts/create-token-and-sync-secrets.sh +9 -86
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { W as WorkflowRunSummary, e as PullRequestInfo, o as mergePairedPullRequest } from '../../pr-e-E4aP4j.cjs';
|
|
2
2
|
import { Pool } from 'pg';
|
|
3
|
+
import { b as CiFreshnessResult } from '../../ci-secrets-CnGrdQV-.cjs';
|
|
3
4
|
|
|
4
5
|
declare const BRAND: unique symbol;
|
|
5
6
|
/**
|
|
@@ -3109,6 +3110,8 @@ interface PreparePrResult {
|
|
|
3109
3110
|
prUrl: string;
|
|
3110
3111
|
/** True iff createPullRequest was invoked (vs. reusing an existing open PR). */
|
|
3111
3112
|
prCreated: boolean;
|
|
3113
|
+
/** Outcome of the expiry-aware CI-auth preflight run before the push (fail-soft). */
|
|
3114
|
+
ciFreshness: CiFreshnessResult;
|
|
3112
3115
|
}
|
|
3113
3116
|
declare function preparePr(args: PreparePrArgs): Promise<PreparePrResult>;
|
|
3114
3117
|
/**
|
|
@@ -3284,6 +3287,11 @@ interface MergeArgs {
|
|
|
3284
3287
|
fetchPrState?: (ownerRepo: string, headBranch: string) => Promise<{
|
|
3285
3288
|
mergeableState?: string;
|
|
3286
3289
|
} | undefined>;
|
|
3290
|
+
/** Expiry-aware CI-auth preflight run before the merge: the promote triggers merge.yml, which
|
|
3291
|
+
* needs a live DATABRICKS_TOKEN secret, and a merge is not a push so the pre-push hook does not
|
|
3292
|
+
* fire. Re-mints the canonical token when missing / near expiry. BEST-EFFORT: never blocks the
|
|
3293
|
+
* merge. Defaults to {@link ensureCiSecretsFreshFromEnv}; injected in tests. */
|
|
3294
|
+
ensureCiFresh?: (ownerRepo: string) => Promise<CiFreshnessResult>;
|
|
3287
3295
|
}
|
|
3288
3296
|
interface MergeResult {
|
|
3289
3297
|
state: ScmWorkflowState;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { W as WorkflowRunSummary, e as PullRequestInfo, o as mergePairedPullRequest } from '../../pr-e-E4aP4j.js';
|
|
2
2
|
import { Pool } from 'pg';
|
|
3
|
+
import { b as CiFreshnessResult } from '../../ci-secrets-CnGrdQV-.js';
|
|
3
4
|
|
|
4
5
|
declare const BRAND: unique symbol;
|
|
5
6
|
/**
|
|
@@ -3109,6 +3110,8 @@ interface PreparePrResult {
|
|
|
3109
3110
|
prUrl: string;
|
|
3110
3111
|
/** True iff createPullRequest was invoked (vs. reusing an existing open PR). */
|
|
3111
3112
|
prCreated: boolean;
|
|
3113
|
+
/** Outcome of the expiry-aware CI-auth preflight run before the push (fail-soft). */
|
|
3114
|
+
ciFreshness: CiFreshnessResult;
|
|
3112
3115
|
}
|
|
3113
3116
|
declare function preparePr(args: PreparePrArgs): Promise<PreparePrResult>;
|
|
3114
3117
|
/**
|
|
@@ -3284,6 +3287,11 @@ interface MergeArgs {
|
|
|
3284
3287
|
fetchPrState?: (ownerRepo: string, headBranch: string) => Promise<{
|
|
3285
3288
|
mergeableState?: string;
|
|
3286
3289
|
} | undefined>;
|
|
3290
|
+
/** Expiry-aware CI-auth preflight run before the merge: the promote triggers merge.yml, which
|
|
3291
|
+
* needs a live DATABRICKS_TOKEN secret, and a merge is not a push so the pre-push hook does not
|
|
3292
|
+
* fire. Re-mints the canonical token when missing / near expiry. BEST-EFFORT: never blocks the
|
|
3293
|
+
* merge. Defaults to {@link ensureCiSecretsFreshFromEnv}; injected in tests. */
|
|
3294
|
+
ensureCiFresh?: (ownerRepo: string) => Promise<CiFreshnessResult>;
|
|
3287
3295
|
}
|
|
3288
3296
|
interface MergeResult {
|
|
3289
3297
|
state: ScmWorkflowState;
|