@codedrifters/configulator 0.0.197 → 0.0.199

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
@@ -2982,6 +2982,11 @@ var VERSION = {
2982
2982
  * Version of Node.js to use in CI workflows at github actions.
2983
2983
  */
2984
2984
  NODE_WORKFLOWS: "24",
2985
+ /**
2986
+ * Version of `pnpm/action-setup` to use in GitHub workflows.
2987
+ * Tracks the version projen currently emits (see node_modules/projen/lib/javascript/node-project.js).
2988
+ */
2989
+ PNPM_ACTION_SETUP_VERSION: "v5",
2985
2990
  /**
2986
2991
  * Version of PNPM to use in workflows at github actions.
2987
2992
  */
@@ -2990,6 +2995,20 @@ var VERSION = {
2990
2995
  * Version of Projen to use.
2991
2996
  */
2992
2997
  PROJEN_VERSION: "0.99.48",
2998
+ /**
2999
+ * Version of `actions/setup-node` to use in GitHub workflows.
3000
+ * Tracks the version projen currently emits (see node_modules/projen/lib/github/workflows.js).
3001
+ */
3002
+ SETUP_NODE_ACTION_VERSION: "v6",
3003
+ /**
3004
+ * Version of sharp to pin for StarlightProject (required peer for
3005
+ * Starlight's image optimization pipeline).
3006
+ */
3007
+ SHARP_VERSION: "0.34.5",
3008
+ /**
3009
+ * Version of @astrojs/starlight to pin for StarlightProject scaffolding.
3010
+ */
3011
+ STARLIGHT_VERSION: "0.38.3",
2993
3012
  /**
2994
3013
  * What version of the turborepo library should we use?
2995
3014
  */
@@ -4751,6 +4770,8 @@ var VERSION_NPM_PACKAGES = [
4751
4770
  { key: "AWS_CONSTRUCTS_VERSION", npmPackage: "constructs" },
4752
4771
  { key: "PNPM_VERSION", npmPackage: "pnpm" },
4753
4772
  { key: "PROJEN_VERSION", npmPackage: "projen" },
4773
+ { key: "SHARP_VERSION", npmPackage: "sharp" },
4774
+ { key: "STARLIGHT_VERSION", npmPackage: "@astrojs/starlight" },
4754
4775
  { key: "TURBO_VERSION", npmPackage: "turbo" },
4755
4776
  { key: "TYPES_NODE_VERSION", npmPackage: "@types/node" },
4756
4777
  { key: "VITEST_VERSION", npmPackage: "vitest" }
@@ -4831,6 +4852,7 @@ import { ReleaseTrigger } from "projen/lib/release";
4831
4852
  import { merge as merge2 } from "ts-deepmerge";
4832
4853
 
4833
4854
  // src/projects/monorepo-project.ts
4855
+ import { WorkflowSteps } from "projen/lib/github";
4834
4856
  import {
4835
4857
  NodePackageManager,
4836
4858
  UpgradeDependenciesSchedule
@@ -5465,16 +5487,15 @@ var MonorepoProject = class extends TypeScriptAppProject {
5465
5487
  name: "Build Sub Projects",
5466
5488
  run: `npx projen ${ROOT_CI_TASK_NAME}`
5467
5489
  },
5468
- {
5490
+ WorkflowSteps.uploadArtifact({
5469
5491
  name: "Upload Turbo runs",
5470
5492
  if: "always()",
5471
- uses: "actions/upload-artifact@v4.6.2",
5493
+ continueOnError: true,
5472
5494
  with: {
5473
5495
  name: "turbo-runs",
5474
5496
  path: ".turbo/runs"
5475
- },
5476
- continueOnError: true
5477
- }
5497
+ }
5498
+ })
5478
5499
  );
5479
5500
  }
5480
5501
  if (options.resetTask !== false) {
@@ -5873,7 +5894,7 @@ import { merge as merge3 } from "ts-deepmerge";
5873
5894
  var import_utils11 = __toESM(require_lib());
5874
5895
  import { Component as Component16 } from "projen";
5875
5896
  import { BuildWorkflow } from "projen/lib/build";
5876
- import { GitHub as GitHub2 } from "projen/lib/github";
5897
+ import { GitHub as GitHub2, WorkflowSteps as WorkflowSteps2 } from "projen/lib/github";
5877
5898
  import { JobPermission as JobPermission5 } from "projen/lib/github/workflows-model";
5878
5899
  var PROD_DEPLOY_NAME = "prod-deploy";
5879
5900
  var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component16 {
@@ -5892,7 +5913,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component16 {
5892
5913
  return [
5893
5914
  {
5894
5915
  name: "Setup Node",
5895
- uses: "actions/setup-node@v4",
5916
+ uses: `actions/setup-node@${VERSION.SETUP_NODE_ACTION_VERSION}`,
5896
5917
  with: {
5897
5918
  ["node-version"]: VERSION.NODE_WORKFLOWS
5898
5919
  },
@@ -5905,7 +5926,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component16 {
5905
5926
  return [
5906
5927
  {
5907
5928
  name: "Setup PNPM",
5908
- uses: "pnpm/action-setup@v3",
5929
+ uses: `pnpm/action-setup@${VERSION.PNPM_ACTION_SETUP_VERSION}`,
5909
5930
  with: {
5910
5931
  version: VERSION.PNPM_VERSION
5911
5932
  }
@@ -6124,16 +6145,15 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends Component16 {
6124
6145
  name: "Build Sub Projects",
6125
6146
  run: `npx projen ${ROOT_CI_TASK_NAME}`
6126
6147
  },
6127
- {
6148
+ WorkflowSteps2.uploadArtifact({
6128
6149
  name: "Upload Turbo runs",
6129
6150
  if: "always()",
6130
- uses: "actions/upload-artifact@v4.6.2",
6151
+ continueOnError: true,
6131
6152
  with: {
6132
6153
  name: "turbo-runs",
6133
6154
  path: ".turbo/runs"
6134
- },
6135
- continueOnError: true
6136
- }
6155
+ }
6156
+ })
6137
6157
  );
6138
6158
  }
6139
6159
  super.preSynthesize();
@@ -6537,6 +6557,91 @@ var AwsCdkProject = class extends awscdk.AwsCdkTypeScriptApp {
6537
6557
  }
6538
6558
  };
6539
6559
 
6560
+ // src/projects/starlight-project.ts
6561
+ import { SampleFile as SampleFile2 } from "projen";
6562
+ var StarlightProject = class extends AstroProject {
6563
+ constructor(userOptions) {
6564
+ const starlightConfig = buildStarlightConfig(userOptions);
6565
+ const starlightSpec = {
6566
+ name: "starlight",
6567
+ importPath: "@astrojs/starlight",
6568
+ defaultImport: true,
6569
+ args: JSON.stringify(starlightConfig, null, 2)
6570
+ };
6571
+ const mergedOptions = {
6572
+ ...userOptions,
6573
+ integrations: [starlightSpec, ...userOptions.integrations ?? []],
6574
+ depsUpgradeOptions: {
6575
+ ...userOptions.depsUpgradeOptions,
6576
+ exclude: [
6577
+ ...userOptions.depsUpgradeOptions?.exclude ?? [],
6578
+ "@astrojs/starlight",
6579
+ "sharp"
6580
+ ]
6581
+ }
6582
+ };
6583
+ super(mergedOptions);
6584
+ const starlightVersion = userOptions.starlightVersion ?? VERSION.STARLIGHT_VERSION;
6585
+ const sharpVersion = userOptions.sharpVersion ?? VERSION.SHARP_VERSION;
6586
+ this.addDeps(
6587
+ `@astrojs/starlight@${starlightVersion}`,
6588
+ `sharp@${sharpVersion}`
6589
+ );
6590
+ const turbo = TurboRepo.of(this);
6591
+ if (turbo?.compileTask) {
6592
+ turbo.compileTask.inputs.push("src/content/**");
6593
+ }
6594
+ if (userOptions.sampleContent === true) {
6595
+ new SampleFile2(this, "src/content/docs/index.mdx", {
6596
+ contents: DEFAULT_INDEX_MDX
6597
+ });
6598
+ new SampleFile2(this, "src/content/config.ts", {
6599
+ contents: DEFAULT_CONTENT_CONFIG_TS
6600
+ });
6601
+ }
6602
+ }
6603
+ };
6604
+ function buildStarlightConfig(options) {
6605
+ const config = {
6606
+ title: options.starlightTitle
6607
+ };
6608
+ if (options.starlightDescription !== void 0) {
6609
+ config.description = options.starlightDescription;
6610
+ }
6611
+ if (options.social !== void 0) {
6612
+ config.social = options.social;
6613
+ }
6614
+ if (options.sidebar !== void 0) {
6615
+ config.sidebar = options.sidebar;
6616
+ }
6617
+ if (options.customCss !== void 0) {
6618
+ config.customCss = options.customCss;
6619
+ }
6620
+ if (options.logo !== void 0) {
6621
+ config.logo = options.logo;
6622
+ }
6623
+ if (options.editLink !== void 0) {
6624
+ config.editLink = options.editLink;
6625
+ }
6626
+ return config;
6627
+ }
6628
+ var DEFAULT_INDEX_MDX = `---
6629
+ title: Welcome
6630
+ description: Starlight-powered documentation site.
6631
+ ---
6632
+
6633
+ # Hello, Starlight!
6634
+
6635
+ Edit \`src/content/docs/index.mdx\` to replace this page.
6636
+ `;
6637
+ var DEFAULT_CONTENT_CONFIG_TS = `import { defineCollection } from "astro:content";
6638
+ import { docsSchema } from "@astrojs/starlight/schema";
6639
+
6640
+ export const collections = {
6641
+ docs: defineCollection({ schema: docsSchema() }),
6642
+ };
6643
+ `;
6644
+
6540
6645
  // src/typescript/typescript-config.ts
6541
6646
  import { relative as relative4 } from "path";
6542
6647
  import { Component as Component18 } from "projen";
@@ -6598,6 +6703,7 @@ export {
6598
6703
  ROOT_CI_TASK_NAME,
6599
6704
  ROOT_TURBO_TASK_NAME,
6600
6705
  ResetTask,
6706
+ StarlightProject,
6601
6707
  TestRunner,
6602
6708
  TurboRepo,
6603
6709
  TurboRepoTask,