@codedrifters/configulator 0.0.364 → 0.0.366

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.js CHANGED
@@ -301,6 +301,11 @@ __export(index_exports, {
301
301
  StarlightProject: () => StarlightProject,
302
302
  TEMPORAL_FRAMING_CATEGORY_VALUES: () => TEMPORAL_FRAMING_CATEGORY_VALUES,
303
303
  TIER_AWARE_BUNDLE_NAMES: () => TIER_AWARE_BUNDLE_NAMES,
304
+ TURBO_RUN_CONTINUE: () => TURBO_RUN_CONTINUE,
305
+ TURBO_RUN_DRY_RUN: () => TURBO_RUN_DRY_RUN,
306
+ TURBO_RUN_LOG_ORDER: () => TURBO_RUN_LOG_ORDER,
307
+ TURBO_RUN_LOG_PREFIX: () => TURBO_RUN_LOG_PREFIX,
308
+ TURBO_RUN_OUTPUT_LOGS: () => TURBO_RUN_OUTPUT_LOGS,
304
309
  TestRunner: () => TestRunner,
305
310
  TsDocCoverageKind: () => TsDocCoverageKind,
306
311
  TsdocConfig: () => TsdocConfig,
@@ -30647,6 +30652,11 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
30647
30652
  this.cacheDir = options.cacheDir ?? ".turbo/cache";
30648
30653
  this.daemon = options.daemon ?? true;
30649
30654
  this.envMode = options.envMode ?? "strict";
30655
+ this.runOptions = {
30656
+ ...options.runOptions,
30657
+ summarize: options.runOptions?.summarize ?? true,
30658
+ concurrency: options.runOptions?.concurrency ?? 10
30659
+ };
30650
30660
  this.remoteCacheOptions = options.remoteCacheOptions;
30651
30661
  this.buildAllTaskEnvVars = options.buildAllTaskEnvVars ?? {};
30652
30662
  const rootGeneratedFiles = this.isRootProject ? this.project.components.filter((c) => c instanceof import_lib2.FileBase).map((c) => c.path) : [];
@@ -30667,11 +30677,11 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
30667
30677
  }
30668
30678
  if (!this.remoteCacheOptions) {
30669
30679
  this.buildAllTask.exec(
30670
- `turbo ${ROOT_TURBO_TASK_NAME} --summarize --concurrency=10`
30680
+ `turbo ${ROOT_TURBO_TASK_NAME} ${this.renderRunArgs(false)}`
30671
30681
  );
30672
30682
  } else {
30673
30683
  this.buildAllTask.exec(
30674
- `turbo turbo:build --summarize --concurrency=10 --cache=remote:rw --api=$TURBO_ENDPOINT --token=$TURBO_TOKEN --team=${this.remoteCacheOptions.teamName}`,
30684
+ `turbo ${ROOT_TURBO_TASK_NAME} ${this.renderRunArgs(true)}`,
30675
30685
  {
30676
30686
  condition: '[ ! -n "$CI" ]',
30677
30687
  env: {
@@ -30681,7 +30691,7 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
30681
30691
  }
30682
30692
  );
30683
30693
  this.buildAllTask.exec(
30684
- `turbo turbo:build --summarize --concurrency=10 --cache=remote:rw --api=$TURBO_ENDPOINT --token=$TURBO_TOKEN --team=${this.remoteCacheOptions.teamName}`,
30694
+ `turbo ${ROOT_TURBO_TASK_NAME} ${this.renderRunArgs(true)}`,
30685
30695
  {
30686
30696
  condition: '[ -n "$CI" ]',
30687
30697
  env: {
@@ -30729,6 +30739,75 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
30729
30739
  const isDefined = (c) => c instanceof _TurboRepo;
30730
30740
  return project.components.find(isDefined);
30731
30741
  }
30742
+ /**
30743
+ * Render the `turbo run` CLI flag string for the `build:all` / `reset:all`
30744
+ * task commands from {@link runOptions}. With no `runOptions` configured the
30745
+ * output matches the historically hard-coded flags exactly.
30746
+ *
30747
+ * @param remote - when `true`, also emit the remote-cache flags
30748
+ * (`--cache=remote:rw` plus `--api` / `--token` / `--team` derived from
30749
+ * {@link remoteCacheOptions}). The remote-cache `build:all` variant passes
30750
+ * `true`; `reset:all` and the local `build:all` variant pass `false`.
30751
+ */
30752
+ renderRunArgs(remote) {
30753
+ const run = this.runOptions;
30754
+ const args = [];
30755
+ if (run.summarize) {
30756
+ args.push("--summarize");
30757
+ }
30758
+ args.push(`--concurrency=${run.concurrency}`);
30759
+ if (run.force) {
30760
+ args.push("--force");
30761
+ }
30762
+ if (run.noCache) {
30763
+ args.push("--no-cache");
30764
+ }
30765
+ if (run.only) {
30766
+ args.push("--only");
30767
+ }
30768
+ if (run.affected) {
30769
+ args.push("--affected");
30770
+ }
30771
+ if (run.cacheWorkers !== void 0) {
30772
+ args.push(`--cache-workers=${run.cacheWorkers}`);
30773
+ }
30774
+ if (run.continueOn !== void 0) {
30775
+ args.push(`--continue=${run.continueOn}`);
30776
+ }
30777
+ if (run.frameworkInference !== void 0) {
30778
+ args.push(`--framework-inference=${run.frameworkInference}`);
30779
+ }
30780
+ for (const filter of run.filter ?? []) {
30781
+ args.push(`--filter=${filter}`);
30782
+ }
30783
+ if (run.outputLogs !== void 0) {
30784
+ args.push(`--output-logs=${run.outputLogs}`);
30785
+ }
30786
+ if (run.logOrder !== void 0) {
30787
+ args.push(`--log-order=${run.logOrder}`);
30788
+ }
30789
+ if (run.logPrefix !== void 0) {
30790
+ args.push(`--log-prefix=${run.logPrefix}`);
30791
+ }
30792
+ if (run.dryRun !== void 0) {
30793
+ args.push(`--dry-run=${run.dryRun}`);
30794
+ }
30795
+ const cache = run.cache ?? (remote ? "remote:rw" : void 0);
30796
+ if (cache !== void 0) {
30797
+ args.push(`--cache=${cache}`);
30798
+ }
30799
+ if (remote && this.remoteCacheOptions) {
30800
+ args.push(
30801
+ "--api=$TURBO_ENDPOINT",
30802
+ "--token=$TURBO_TOKEN",
30803
+ `--team=${this.remoteCacheOptions.teamName}`
30804
+ );
30805
+ }
30806
+ if (run.additionalArgs) {
30807
+ args.push(...run.additionalArgs);
30808
+ }
30809
+ return args.join(" ");
30810
+ }
30732
30811
  /**
30733
30812
  * Add an env var to the global env vars for all tasks.
30734
30813
  * This will also become an input for the build:all task cache at the root.
@@ -34877,6 +34956,34 @@ var renderCdkDocs = (opts) => {
34877
34956
  return compose("docs", tokens);
34878
34957
  };
34879
34958
 
34959
+ // src/turbo/turbo-run-enums.ts
34960
+ var TURBO_RUN_CONTINUE = {
34961
+ Never: "never",
34962
+ DependenciesSuccessful: "dependencies-successful",
34963
+ Always: "always"
34964
+ };
34965
+ var TURBO_RUN_OUTPUT_LOGS = {
34966
+ Full: "full",
34967
+ None: "none",
34968
+ HashOnly: "hash-only",
34969
+ NewOnly: "new-only",
34970
+ ErrorsOnly: "errors-only"
34971
+ };
34972
+ var TURBO_RUN_LOG_ORDER = {
34973
+ Auto: "auto",
34974
+ Stream: "stream",
34975
+ Grouped: "grouped"
34976
+ };
34977
+ var TURBO_RUN_LOG_PREFIX = {
34978
+ Auto: "auto",
34979
+ None: "none",
34980
+ Task: "task"
34981
+ };
34982
+ var TURBO_RUN_DRY_RUN = {
34983
+ Text: "text",
34984
+ Json: "json"
34985
+ };
34986
+
34880
34987
  // src/aws/aws-deployment-config.ts
34881
34988
  var AwsDeploymentConfig = class _AwsDeploymentConfig extends import_projen12.Component {
34882
34989
  constructor(project) {
@@ -37116,7 +37223,7 @@ var ResetTask = class _ResetTask extends import_projen18.Component {
37116
37223
  );
37117
37224
  resetAllTask.exec("turbo telemetry disable");
37118
37225
  resetAllTask.exec(
37119
- `turbo turbo:${this.taskName} --summarize --concurrency=10`
37226
+ `turbo turbo:${this.taskName} ${turbo.renderRunArgs(false)}`
37120
37227
  );
37121
37228
  resetAllTask.exec(`pnpm ${this.taskName}`);
37122
37229
  }
@@ -38598,7 +38705,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen25.Compone
38598
38705
  name: "Setup PNPM",
38599
38706
  uses: `pnpm/action-setup@${VERSION.PNPM_ACTION_SETUP_VERSION}`,
38600
38707
  with: {
38601
- version: VERSION.PNPM_VERSION
38708
+ version: this.rootProject.pnpmVersion
38602
38709
  }
38603
38710
  }
38604
38711
  ];
@@ -39851,6 +39958,11 @@ export const collections = {
39851
39958
  StarlightProject,
39852
39959
  TEMPORAL_FRAMING_CATEGORY_VALUES,
39853
39960
  TIER_AWARE_BUNDLE_NAMES,
39961
+ TURBO_RUN_CONTINUE,
39962
+ TURBO_RUN_DRY_RUN,
39963
+ TURBO_RUN_LOG_ORDER,
39964
+ TURBO_RUN_LOG_PREFIX,
39965
+ TURBO_RUN_OUTPUT_LOGS,
39854
39966
  TestRunner,
39855
39967
  TsDocCoverageKind,
39856
39968
  TsdocConfig,