@codedrifters/configulator 0.0.177 → 0.0.178

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
@@ -1949,12 +1949,22 @@ function parseGitHubUrl(url) {
1949
1949
  }
1950
1950
  var ProjectMetadata = class _ProjectMetadata extends Component5 {
1951
1951
  /**
1952
- * Returns the ProjectMetadata instance for a project, or undefined
1953
- * if the component has not been added.
1952
+ * Returns the ProjectMetadata instance for a project. Walks up the parent
1953
+ * chain so sub-projects resolve the metadata declared on a root
1954
+ * `MonorepoProject` without needing a duplicate declaration of their own.
1955
+ * Returns `undefined` if no ancestor has a `ProjectMetadata` component.
1954
1956
  */
1955
1957
  static of(project) {
1956
1958
  const isProjectMetadata = (c) => c instanceof _ProjectMetadata;
1957
- return project.components.find(isProjectMetadata);
1959
+ let current = project;
1960
+ while (current) {
1961
+ const found = current.components.find(isProjectMetadata);
1962
+ if (found) {
1963
+ return found;
1964
+ }
1965
+ current = current.parent;
1966
+ }
1967
+ return void 0;
1958
1968
  }
1959
1969
  constructor(project, options = {}) {
1960
1970
  super(project);
@@ -3459,15 +3469,11 @@ var TypeScriptProject = class extends typescript.TypeScriptProject {
3459
3469
  turbo.compileTask?.outputs.push("dist/**");
3460
3470
  turbo.compileTask?.outputs.push("lib/**");
3461
3471
  }
3462
- const parentHasAgentConfig = userOptions.parent instanceof MonorepoProject && AgentConfig.of(userOptions.parent) !== void 0;
3463
- if (options.agentConfig !== false) {
3464
- const shouldEnable = typeof options.agentConfig === "object" || options.agentConfig === true || parentHasAgentConfig;
3465
- if (shouldEnable) {
3466
- new AgentConfig(
3467
- this,
3468
- typeof options.agentConfig === "object" ? options.agentConfig : {}
3469
- );
3470
- }
3472
+ if (options.agentConfig === true || typeof options.agentConfig === "object") {
3473
+ new AgentConfig(
3474
+ this,
3475
+ typeof options.agentConfig === "object" ? options.agentConfig : {}
3476
+ );
3471
3477
  }
3472
3478
  if (options.resetTask !== false) {
3473
3479
  const defaultResetTaskOptions = {