@codedrifters/configulator 0.0.459 → 0.0.461
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/lib/index.d.mts +76 -9
- package/lib/index.d.ts +76 -9
- package/lib/index.js +36 -9
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +34 -9
- package/lib/index.mjs.map +1 -1
- package/package.json +5 -5
package/lib/index.mjs
CHANGED
|
@@ -6711,6 +6711,10 @@ var TurboRepoTask = class extends Component {
|
|
|
6711
6711
|
}
|
|
6712
6712
|
};
|
|
6713
6713
|
|
|
6714
|
+
// src/git/git-branch-env.ts
|
|
6715
|
+
var GIT_BRANCH_NAME_ENV = "GIT_BRANCH_NAME";
|
|
6716
|
+
var GIT_BRANCH_NAME_ENV_VALUE = '$([ -n "$GIT_BRANCH_NAME" ] && echo "$GIT_BRANCH_NAME" || git branch --show-current)';
|
|
6717
|
+
|
|
6714
6718
|
// src/turbo/turbo-repo.ts
|
|
6715
6719
|
var ROOT_TURBO_TASK_NAME = "turbo:build";
|
|
6716
6720
|
var ROOT_CI_TASK_NAME = "build:all";
|
|
@@ -6902,12 +6906,11 @@ var _TurboRepo = class _TurboRepo extends Component2 {
|
|
|
6902
6906
|
}
|
|
6903
6907
|
}
|
|
6904
6908
|
activateBranchNameEnvVar(options) {
|
|
6905
|
-
const value = '$([ -n "$GIT_BRANCH_NAME" ] && echo "$GIT_BRANCH_NAME" || git rev-parse --abbrev-ref HEAD)';
|
|
6906
6909
|
if (options === void 0) {
|
|
6907
6910
|
this.project.logger.warn(
|
|
6908
6911
|
"TurboRepo.activateBranchNameEnvVar() with no arguments is deprecated. It writes GIT_BRANCH_NAME to the root `globalEnv`, which forces every task in the monorepo to miss cache on every branch switch. Pass `{ tasks: [...] }` and name only the tasks that actually consume the branch (e.g. CDK synth/package) to preserve cross-branch cache hits for everything else."
|
|
6909
6912
|
);
|
|
6910
|
-
this.addGlobalEnvVar(
|
|
6913
|
+
this.addGlobalEnvVar(GIT_BRANCH_NAME_ENV, GIT_BRANCH_NAME_ENV_VALUE);
|
|
6911
6914
|
return;
|
|
6912
6915
|
}
|
|
6913
6916
|
const knownTaskNames = this.tasks.map((task) => task.name);
|
|
@@ -6923,10 +6926,30 @@ var _TurboRepo = class _TurboRepo extends Component2 {
|
|
|
6923
6926
|
}
|
|
6924
6927
|
for (const name of options.tasks) {
|
|
6925
6928
|
const task = this.tasks.find((t) => t.name === name);
|
|
6926
|
-
if (task && !task.env.includes(
|
|
6927
|
-
task.env.push(
|
|
6929
|
+
if (task && !task.env.includes(GIT_BRANCH_NAME_ENV)) {
|
|
6930
|
+
task.env.push(GIT_BRANCH_NAME_ENV);
|
|
6928
6931
|
}
|
|
6929
6932
|
}
|
|
6933
|
+
this.injectBranchNameOnBuildAll();
|
|
6934
|
+
}
|
|
6935
|
+
/**
|
|
6936
|
+
* Populate `GIT_BRANCH_NAME` on the root `build:all` task env — the process
|
|
6937
|
+
* env turbo runs in — so locally computed hashes match CI, where the
|
|
6938
|
+
* workflow job env supplies the same variable.
|
|
6939
|
+
*
|
|
6940
|
+
* Written straight to the task rather than through
|
|
6941
|
+
* {@link addGlobalEnvVar}, which would also push the name onto the root
|
|
6942
|
+
* `globalEnv` and bust the cache for every task in the monorepo.
|
|
6943
|
+
*
|
|
6944
|
+
* No-ops when the root project has no TurboRepo (`turbo: false`) and
|
|
6945
|
+
* therefore no `build:all` task to inject into.
|
|
6946
|
+
*/
|
|
6947
|
+
injectBranchNameOnBuildAll() {
|
|
6948
|
+
const rootTurbo = _TurboRepo.of(this.project.root);
|
|
6949
|
+
rootTurbo?.buildAllTask?.env(
|
|
6950
|
+
GIT_BRANCH_NAME_ENV,
|
|
6951
|
+
GIT_BRANCH_NAME_ENV_VALUE
|
|
6952
|
+
);
|
|
6930
6953
|
}
|
|
6931
6954
|
/**
|
|
6932
6955
|
* Paths of all generated files in the project, deduped, for use as task
|
|
@@ -34575,7 +34598,7 @@ var VERSION = {
|
|
|
34575
34598
|
/**
|
|
34576
34599
|
* Version of Astro to pin for AstroProject scaffolding.
|
|
34577
34600
|
*/
|
|
34578
|
-
ASTRO_VERSION: "7.2.
|
|
34601
|
+
ASTRO_VERSION: "7.2.3",
|
|
34579
34602
|
/**
|
|
34580
34603
|
* CDK CLI for workflows and command line operations.
|
|
34581
34604
|
*
|
|
@@ -34608,7 +34631,7 @@ var VERSION = {
|
|
|
34608
34631
|
/**
|
|
34609
34632
|
* Version of Projen to use.
|
|
34610
34633
|
*/
|
|
34611
|
-
PROJEN_VERSION: "0.101.
|
|
34634
|
+
PROJEN_VERSION: "0.101.32",
|
|
34612
34635
|
/**
|
|
34613
34636
|
* Version of `actions/setup-node` to use in GitHub workflows.
|
|
34614
34637
|
* Tracks the version projen currently emits (see node_modules/projen/lib/github/workflows.js).
|
|
@@ -34626,7 +34649,7 @@ var VERSION = {
|
|
|
34626
34649
|
/**
|
|
34627
34650
|
* What version of the turborepo library should we use?
|
|
34628
34651
|
*/
|
|
34629
|
-
TURBO_VERSION: "2.10.
|
|
34652
|
+
TURBO_VERSION: "2.10.11",
|
|
34630
34653
|
/**
|
|
34631
34654
|
* Version of `@types/node` to use across all packages (pnpm catalog).
|
|
34632
34655
|
*/
|
|
@@ -34639,7 +34662,7 @@ var VERSION = {
|
|
|
34639
34662
|
* packages are seeded into the monorepo's pnpm catalog from this constant,
|
|
34640
34663
|
* so `Vitest` renders them as `catalog:` wherever that catalog exists.
|
|
34641
34664
|
*/
|
|
34642
|
-
VITEST_VERSION: "4.1.
|
|
34665
|
+
VITEST_VERSION: "4.1.11"
|
|
34643
34666
|
};
|
|
34644
34667
|
|
|
34645
34668
|
// src/vitest/vitest-component.ts
|
|
@@ -38468,7 +38491,7 @@ var AwsDeploymentConfig = class _AwsDeploymentConfig extends Component12 {
|
|
|
38468
38491
|
};
|
|
38469
38492
|
this.cdkCli = CdkCli.of(project) || new CdkCli(project);
|
|
38470
38493
|
this.env = {
|
|
38471
|
-
|
|
38494
|
+
[GIT_BRANCH_NAME_ENV]: GIT_BRANCH_NAME_ENV_VALUE
|
|
38472
38495
|
};
|
|
38473
38496
|
this.projectPath = relative3(project.root.outdir, project.outdir);
|
|
38474
38497
|
this.rootPath = relative3(project.outdir, project.root.outdir);
|
|
@@ -44880,6 +44903,8 @@ export {
|
|
|
44880
44903
|
DiffReportJob,
|
|
44881
44904
|
GITHUB_ISSUE_TYPES,
|
|
44882
44905
|
GITHUB_ISSUE_TYPE_BY_TITLE_PREFIX,
|
|
44906
|
+
GIT_BRANCH_NAME_ENV,
|
|
44907
|
+
GIT_BRANCH_NAME_ENV_VALUE,
|
|
44883
44908
|
ISSUE_TEMPLATES_GENERATED_SUFFIX,
|
|
44884
44909
|
JsiiFaker,
|
|
44885
44910
|
LAYOUT_ENFORCEMENT,
|