@codedrifters/configulator 0.0.180 → 0.0.182

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.mjs CHANGED
@@ -1782,11 +1782,11 @@ var VERSION = {
1782
1782
  /**
1783
1783
  * Version of Projen to use.
1784
1784
  */
1785
- PROJEN_VERSION: "0.99.45",
1785
+ PROJEN_VERSION: "0.99.47",
1786
1786
  /**
1787
1787
  * What version of the turborepo library should we use?
1788
1788
  */
1789
- TURBO_VERSION: "2.9.5",
1789
+ TURBO_VERSION: "2.9.6",
1790
1790
  /**
1791
1791
  * Version of @types/node to use across all packages (pnpm catalog).
1792
1792
  */
@@ -3816,6 +3816,198 @@ function addBuildCompleteJob(buildWorkflow) {
3816
3816
  });
3817
3817
  }
3818
3818
 
3819
+ // src/workflows/sync-labels.ts
3820
+ import { Component as Component14, YamlFile as YamlFile2 } from "projen";
3821
+ import { JobPermission as JobPermission4 } from "projen/lib/github/workflows-model";
3822
+ var DEFAULT_STATUS_LABELS = [
3823
+ {
3824
+ name: "status:ready",
3825
+ color: "0E8A16",
3826
+ description: "Task is ready for pickup"
3827
+ },
3828
+ {
3829
+ name: "status:in-progress",
3830
+ color: "FBCA04",
3831
+ description: "Actively being worked on"
3832
+ },
3833
+ {
3834
+ name: "status:blocked",
3835
+ color: "D93F0B",
3836
+ description: "Blocked on a dependency or question"
3837
+ },
3838
+ {
3839
+ name: "status:done",
3840
+ color: "6F42C1",
3841
+ description: "Task completed and closed"
3842
+ },
3843
+ {
3844
+ name: "status:deferred",
3845
+ color: "C2E0C6",
3846
+ description: "Intentionally parked \u2014 not ready for pickup"
3847
+ },
3848
+ {
3849
+ name: "status:needs-attention",
3850
+ color: "FF0000",
3851
+ description: "Requires human review"
3852
+ }
3853
+ ];
3854
+ var DEFAULT_PRIORITY_LABELS = [
3855
+ {
3856
+ name: "priority:critical",
3857
+ color: "B60205",
3858
+ description: "Critical priority \u2014 address immediately"
3859
+ },
3860
+ {
3861
+ name: "priority:high",
3862
+ color: "D93F0B",
3863
+ description: "High priority \u2014 pick before normal"
3864
+ },
3865
+ {
3866
+ name: "priority:medium",
3867
+ color: "E4E669",
3868
+ description: "Medium priority"
3869
+ },
3870
+ {
3871
+ name: "priority:low",
3872
+ color: "D4C5F9",
3873
+ description: "Low priority \u2014 skip if higher-priority work exists"
3874
+ },
3875
+ {
3876
+ name: "priority:trivial",
3877
+ color: "EDEDED",
3878
+ description: "Trivial priority \u2014 address when convenient"
3879
+ }
3880
+ ];
3881
+ var DEFAULT_TYPE_LABELS = [
3882
+ {
3883
+ name: "type:feat",
3884
+ color: "1D76DB",
3885
+ description: "New feature or functionality"
3886
+ },
3887
+ {
3888
+ name: "type:fix",
3889
+ color: "D73A4A",
3890
+ description: "Bug fix"
3891
+ },
3892
+ {
3893
+ name: "type:docs",
3894
+ color: "0075CA",
3895
+ description: "Documentation only"
3896
+ },
3897
+ {
3898
+ name: "type:style",
3899
+ color: "BFD4F2",
3900
+ description: "Code style (formatting, whitespace) \u2014 no logic change"
3901
+ },
3902
+ {
3903
+ name: "type:refactor",
3904
+ color: "A2EEEF",
3905
+ description: "Code restructure \u2014 no feature or fix"
3906
+ },
3907
+ {
3908
+ name: "type:perf",
3909
+ color: "F9D0C4",
3910
+ description: "Performance improvement"
3911
+ },
3912
+ {
3913
+ name: "type:test",
3914
+ color: "BFD4F2",
3915
+ description: "Adding or updating tests"
3916
+ },
3917
+ {
3918
+ name: "type:build",
3919
+ color: "E6CCF5",
3920
+ description: "Build system or external dependencies"
3921
+ },
3922
+ {
3923
+ name: "type:ci",
3924
+ color: "D4C5F9",
3925
+ description: "CI configuration changes"
3926
+ },
3927
+ {
3928
+ name: "type:chore",
3929
+ color: "E6E6E6",
3930
+ description: "Maintenance tasks (deps, tooling, config)"
3931
+ },
3932
+ {
3933
+ name: "type:revert",
3934
+ color: "EDEDED",
3935
+ description: "Revert a previous commit"
3936
+ },
3937
+ {
3938
+ name: "type:release",
3939
+ color: "0E8A16",
3940
+ description: "Release preparation and version bumps"
3941
+ },
3942
+ {
3943
+ name: "type:hotfix",
3944
+ color: "B60205",
3945
+ description: "Urgent production fix"
3946
+ }
3947
+ ];
3948
+ var DEFAULT_WORKFLOW_NAME2 = "sync-labels";
3949
+ var LABELS_CONFIG_PATH = ".github/labels.yml";
3950
+ function addSyncLabelsWorkflow(project, options) {
3951
+ const workflowName = options.workflowName ?? DEFAULT_WORKFLOW_NAME2;
3952
+ const deleteOtherLabels = options.deleteOtherLabels ?? true;
3953
+ const allLabels = [
3954
+ ...DEFAULT_STATUS_LABELS,
3955
+ ...DEFAULT_PRIORITY_LABELS,
3956
+ ...DEFAULT_TYPE_LABELS,
3957
+ ...options.labels ?? []
3958
+ ];
3959
+ new LabelsFile(project, allLabels);
3960
+ const workflow = project.github?.addWorkflow(workflowName);
3961
+ if (!workflow) {
3962
+ return;
3963
+ }
3964
+ workflow.on({
3965
+ push: {
3966
+ branches: ["main"],
3967
+ paths: [LABELS_CONFIG_PATH]
3968
+ },
3969
+ workflowDispatch: {}
3970
+ });
3971
+ workflow.addJobs({
3972
+ sync: {
3973
+ name: "Sync labels",
3974
+ runsOn: ["ubuntu-latest"],
3975
+ permissions: {
3976
+ contents: JobPermission4.READ,
3977
+ issues: JobPermission4.WRITE
3978
+ },
3979
+ steps: [
3980
+ {
3981
+ name: "Checkout",
3982
+ uses: "actions/checkout@v6"
3983
+ },
3984
+ {
3985
+ name: "Sync labels",
3986
+ uses: "EndBug/label-sync@v2",
3987
+ with: {
3988
+ "config-file": LABELS_CONFIG_PATH,
3989
+ "delete-other-labels": deleteOtherLabels,
3990
+ token: "${{ secrets.GITHUB_TOKEN }}"
3991
+ }
3992
+ }
3993
+ ]
3994
+ }
3995
+ });
3996
+ }
3997
+ var LabelsFile = class extends Component14 {
3998
+ constructor(project, labels) {
3999
+ super(project);
4000
+ new YamlFile2(project, LABELS_CONFIG_PATH, {
4001
+ obj: labels.map((l) => ({
4002
+ name: l.name,
4003
+ color: l.color,
4004
+ description: l.description
4005
+ })),
4006
+ committed: true
4007
+ });
4008
+ }
4009
+ };
4010
+
3819
4011
  // src/projects/monorepo-project.ts
3820
4012
  var CONFIGULATOR_PACKAGE_NAME = "@codedrifters/configulator";
3821
4013
  var postInstallDependenciesMap = /* @__PURE__ */ new WeakMap();
@@ -4065,6 +4257,12 @@ var MonorepoProject = class extends TypeScriptAppProject {
4065
4257
  typeof options.agentConfig === "object" ? options.agentConfig : {}
4066
4258
  );
4067
4259
  }
4260
+ if (options.syncLabels !== false) {
4261
+ addSyncLabelsWorkflow(
4262
+ this,
4263
+ typeof options.syncLabels === "object" ? options.syncLabels : {}
4264
+ );
4265
+ }
4068
4266
  if (this.buildWorkflow) {
4069
4267
  addBuildCompleteJob(this.buildWorkflow);
4070
4268
  }
@@ -4123,9 +4321,9 @@ var MonorepoProject = class extends TypeScriptAppProject {
4123
4321
 
4124
4322
  // src/typescript/typescript-config.ts
4125
4323
  import { relative as relative4 } from "path";
4126
- import { Component as Component14 } from "projen";
4324
+ import { Component as Component15 } from "projen";
4127
4325
  import { ensureRelativePathStartsWithDot } from "projen/lib/util/path";
4128
- var TypeScriptConfig = class extends Component14 {
4326
+ var TypeScriptConfig = class extends Component15 {
4129
4327
  constructor(project) {
4130
4328
  super(project);
4131
4329
  let tsPaths = {};
@@ -4153,12 +4351,12 @@ var TypeScriptConfig = class extends Component14 {
4153
4351
 
4154
4352
  // src/workflows/aws-deploy-workflow.ts
4155
4353
  var import_utils11 = __toESM(require_lib());
4156
- import { Component as Component15 } from "projen";
4354
+ import { Component as Component16 } from "projen";
4157
4355
  import { BuildWorkflow } from "projen/lib/build";
4158
4356
  import { GitHub as GitHub2 } from "projen/lib/github";
4159
- import { JobPermission as JobPermission4 } from "projen/lib/github/workflows-model";
4357
+ import { JobPermission as JobPermission5 } from "projen/lib/github/workflows-model";
4160
4358
  var PROD_DEPLOY_NAME = "prod-deploy";
4161
- var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component15 {
4359
+ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component16 {
4162
4360
  constructor(project, options = {}) {
4163
4361
  super(project);
4164
4362
  this.project = project;
@@ -4385,8 +4583,8 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component15 {
4385
4583
  ],
4386
4584
  runsOn: ["ubuntu-latest"],
4387
4585
  permissions: {
4388
- contents: JobPermission4.READ,
4389
- idToken: JobPermission4.WRITE
4586
+ contents: JobPermission5.READ,
4587
+ idToken: JobPermission5.WRITE
4390
4588
  },
4391
4589
  concurrency: deployJobName,
4392
4590
  if: jobCondition,
@@ -4432,6 +4630,9 @@ export {
4432
4630
  BUILT_IN_BUNDLES,
4433
4631
  CLAUDE_RULE_TARGET,
4434
4632
  COMPLETE_JOB_ID,
4633
+ DEFAULT_PRIORITY_LABELS,
4634
+ DEFAULT_STATUS_LABELS,
4635
+ DEFAULT_TYPE_LABELS,
4435
4636
  JsiiFaker,
4436
4637
  MCP_TRANSPORT,
4437
4638
  MERGE_METHODS,
@@ -4456,6 +4657,7 @@ export {
4456
4657
  Vitest,
4457
4658
  addApproveMergeUpgradeWorkflow,
4458
4659
  addBuildCompleteJob,
4660
+ addSyncLabelsWorkflow,
4459
4661
  awsCdkBundle,
4460
4662
  baseBundle,
4461
4663
  getLatestEligibleVersion,