@kungfu-tech/buildchain 3.0.5-alpha.0 → 3.0.5-alpha.2
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/site/buildchain-contract.json +30 -20
- package/dist/site/buildchain-site.json +28 -18
- package/dist/site/controller-registry.json +11 -3
- package/dist/site/kfd-claims.json +6 -4
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +4 -4
- package/dist/site/page-registry.json +20 -10
- package/dist/site/public-surface-audit.json +6 -4
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +8 -8
- package/dist/site/workflow-registry.json +4 -2
- package/docs/aws-us-elastic-runner-burst-plane.md +132 -16
- package/docs/publish-transaction.md +7 -5
- package/docs/release-flow.md +4 -0
- package/docs/release-governance.md +7 -0
- package/docs/reusable-build-surface.md +9 -0
- package/package.json +1 -1
- package/scripts/aws-macos-jit-controller-core.mjs +389 -0
- package/scripts/aws-macos-jit-controller-runtime.mjs +82 -0
- package/scripts/aws-macos-jit-controller.mjs +558 -0
- package/scripts/aws-macos-jit-job-controller.mjs +401 -0
- package/scripts/aws-windows-jit-campaign-core.mjs +241 -0
- package/scripts/aws-windows-jit-campaign.mjs +167 -0
- package/scripts/aws-windows-jit-controller-core.mjs +20 -2
- package/scripts/aws-windows-jit-controller.mjs +184 -109
- package/scripts/aws-windows-jit-core.mjs +18 -0
- package/scripts/aws-windows-jit.mjs +2 -0
- package/scripts/locked-source-checkout.mjs +17 -3
|
@@ -46,6 +46,14 @@ function normalizeFallback(value = "github") {
|
|
|
46
46
|
return fallback;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
function normalizeHistoryMode(value = "shallow") {
|
|
50
|
+
const mode = String(value || "shallow").trim().toLowerCase() || "shallow";
|
|
51
|
+
if (!["shallow", "full"].includes(mode)) {
|
|
52
|
+
throw new Error(`checkout-history-mode must be shallow or full; got ${value}`);
|
|
53
|
+
}
|
|
54
|
+
return mode;
|
|
55
|
+
}
|
|
56
|
+
|
|
49
57
|
function splitRepository(repository) {
|
|
50
58
|
const match = String(repository || "").trim().match(/^([^/\s]+)\/([^/\s]+)$/);
|
|
51
59
|
if (!match) {
|
|
@@ -237,19 +245,25 @@ export function fetchSourceCommit({
|
|
|
237
245
|
sourceTreeSha = "",
|
|
238
246
|
timeoutMs,
|
|
239
247
|
env = {},
|
|
248
|
+
historyMode = readEnv("BUILDCHAIN_CHECKOUT_HISTORY_MODE", "shallow"),
|
|
240
249
|
allowFullFetchRetry = false,
|
|
241
250
|
runGit = git,
|
|
242
251
|
containsCommit = hasCommit,
|
|
243
252
|
}) {
|
|
253
|
+
const normalizedHistoryMode = normalizeHistoryMode(historyMode);
|
|
244
254
|
const fetchEnv = isolatedGitFetchEnv(env, targetPath);
|
|
245
255
|
const fetch = (refspec) => {
|
|
246
256
|
const options = { cwd: targetPath, timeoutMs, env: fetchEnv };
|
|
257
|
+
const fetchArgs = ["fetch", "--no-tags"];
|
|
258
|
+
if (normalizedHistoryMode === "shallow") fetchArgs.push("--depth=1");
|
|
259
|
+
fetchArgs.push(remoteName, refspec);
|
|
247
260
|
try {
|
|
248
|
-
runGit(
|
|
249
|
-
return
|
|
261
|
+
runGit(fetchArgs, options);
|
|
262
|
+
return normalizedHistoryMode;
|
|
250
263
|
} catch (error) {
|
|
251
264
|
if (
|
|
252
|
-
|
|
265
|
+
normalizedHistoryMode !== "shallow"
|
|
266
|
+
|| !allowFullFetchRetry
|
|
253
267
|
|| !/dumb http transport does not support shallow capabilities/i.test(
|
|
254
268
|
String(error?.message || error || ""),
|
|
255
269
|
)
|