@codedrifters/configulator 0.0.176 → 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/README.md +12 -14
- package/lib/index.d.mts +11 -7
- package/lib/index.d.ts +11 -7
- package/lib/index.js +21 -15
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +21 -15
- package/lib/index.mjs.map +1 -1
- package/package.json +23 -22
package/README.md
CHANGED
|
@@ -1255,44 +1255,42 @@ const project = new MonorepoProject({
|
|
|
1255
1255
|
});
|
|
1256
1256
|
```
|
|
1257
1257
|
|
|
1258
|
-
**Monorepo with per-package
|
|
1258
|
+
**Monorepo with per-package opt-in:**
|
|
1259
|
+
|
|
1260
|
+
`AgentConfig` is **not** auto-inherited by sub-projects. Agent rule files are
|
|
1261
|
+
rendered only on projects that explicitly opt in, so the monorepo root's
|
|
1262
|
+
`AgentConfig` does not duplicate `.cursor/`, `.claude/`, or `CLAUDE.md` into
|
|
1263
|
+
each sub-project's `outdir`. Sub-projects that opt in do still resolve
|
|
1264
|
+
`ProjectMetadata` from the root, so template tokens like
|
|
1265
|
+
`{{repository.owner}}` work without redeclaring metadata.
|
|
1259
1266
|
|
|
1260
1267
|
```typescript
|
|
1261
1268
|
const root = new MonorepoProject({
|
|
1262
1269
|
name: "my-monorepo",
|
|
1263
1270
|
agentConfig: {
|
|
1264
|
-
// Root-level config
|
|
1271
|
+
// Root-level config — renders into the monorepo root only
|
|
1265
1272
|
rules: [{ name: "monorepo-rule", description: "...", scope: AGENT_RULE_SCOPE.ALWAYS, content: "..." }],
|
|
1266
1273
|
},
|
|
1267
1274
|
});
|
|
1268
1275
|
|
|
1269
|
-
// Sub-project
|
|
1276
|
+
// Sub-project with no agent config — nothing rendered into packages/api/
|
|
1270
1277
|
const api = new TypeScriptProject({
|
|
1271
1278
|
parent: root,
|
|
1272
1279
|
name: "@my-org/api",
|
|
1273
1280
|
outdir: "packages/api",
|
|
1274
|
-
// Inherits agentConfig from root
|
|
1275
1281
|
});
|
|
1276
1282
|
|
|
1277
|
-
// Sub-project
|
|
1283
|
+
// Sub-project that explicitly opts into its own agent config
|
|
1278
1284
|
const frontend = new TypeScriptProject({
|
|
1279
1285
|
parent: root,
|
|
1280
1286
|
name: "@my-org/frontend",
|
|
1281
1287
|
outdir: "packages/frontend",
|
|
1282
1288
|
agentConfig: {
|
|
1283
|
-
//
|
|
1289
|
+
// Only generate Claude config for this package
|
|
1284
1290
|
platforms: [AGENT_PLATFORM.CLAUDE],
|
|
1285
1291
|
excludeBundles: ["jest"], // This package uses Vitest, not Jest
|
|
1286
1292
|
},
|
|
1287
1293
|
});
|
|
1288
|
-
|
|
1289
|
-
// Sub-project with agent config disabled
|
|
1290
|
-
const scripts = new TypeScriptProject({
|
|
1291
|
-
parent: root,
|
|
1292
|
-
name: "@my-org/scripts",
|
|
1293
|
-
outdir: "packages/scripts",
|
|
1294
|
-
agentConfig: false, // No agent config for this package
|
|
1295
|
-
});
|
|
1296
1294
|
```
|
|
1297
1295
|
|
|
1298
1296
|
## Troubleshooting
|
package/lib/index.d.mts
CHANGED
|
@@ -1536,7 +1536,7 @@ declare const VERSION: {
|
|
|
1536
1536
|
*
|
|
1537
1537
|
* CLI and lib are versioned separately, so this is the CLI version.
|
|
1538
1538
|
*/
|
|
1539
|
-
readonly AWS_CDK_CLI_VERSION: "2.
|
|
1539
|
+
readonly AWS_CDK_CLI_VERSION: "2.1118.0";
|
|
1540
1540
|
/**
|
|
1541
1541
|
* CDK Version to use for construct projects.
|
|
1542
1542
|
*
|
|
@@ -1558,7 +1558,7 @@ declare const VERSION: {
|
|
|
1558
1558
|
/**
|
|
1559
1559
|
* Version of Projen to use.
|
|
1560
1560
|
*/
|
|
1561
|
-
readonly PROJEN_VERSION: "0.99.
|
|
1561
|
+
readonly PROJEN_VERSION: "0.99.42";
|
|
1562
1562
|
/**
|
|
1563
1563
|
* What version of the turborepo library should we use?
|
|
1564
1564
|
*/
|
|
@@ -1566,7 +1566,7 @@ declare const VERSION: {
|
|
|
1566
1566
|
/**
|
|
1567
1567
|
* Version of @types/node to use across all packages (pnpm catalog).
|
|
1568
1568
|
*/
|
|
1569
|
-
readonly TYPES_NODE_VERSION: "
|
|
1569
|
+
readonly TYPES_NODE_VERSION: "25.5.2";
|
|
1570
1570
|
/**
|
|
1571
1571
|
* What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
|
|
1572
1572
|
* can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
|
|
@@ -2561,8 +2561,10 @@ declare class MonorepoProject extends TypeScriptAppProject {
|
|
|
2561
2561
|
*/
|
|
2562
2562
|
declare class ProjectMetadata extends Component {
|
|
2563
2563
|
/**
|
|
2564
|
-
* Returns the ProjectMetadata instance for a project
|
|
2565
|
-
*
|
|
2564
|
+
* Returns the ProjectMetadata instance for a project. Walks up the parent
|
|
2565
|
+
* chain so sub-projects resolve the metadata declared on a root
|
|
2566
|
+
* `MonorepoProject` without needing a duplicate declaration of their own.
|
|
2567
|
+
* Returns `undefined` if no ancestor has a `ProjectMetadata` component.
|
|
2566
2568
|
*/
|
|
2567
2569
|
static of(project: Project$1): ProjectMetadata | undefined;
|
|
2568
2570
|
/** Resolved metadata with auto-detected values filled in. */
|
|
@@ -2718,8 +2720,10 @@ interface TypeScriptProjectOptions extends Omit<typescript.TypeScriptProjectOpti
|
|
|
2718
2720
|
* - `AgentConfigOptions`: enable with explicit configuration
|
|
2719
2721
|
* - `false` or `undefined`: disabled (default)
|
|
2720
2722
|
*
|
|
2721
|
-
*
|
|
2722
|
-
*
|
|
2723
|
+
* Sub-projects do not inherit `AgentConfig` from their parent
|
|
2724
|
+
* `MonorepoProject`. Agent rule files are rendered only on projects that
|
|
2725
|
+
* explicitly opt in, so a monorepo's root `AgentConfig` does not duplicate
|
|
2726
|
+
* `.cursor/`, `.claude/`, or `CLAUDE.md` into each sub-project's `outdir`.
|
|
2723
2727
|
*
|
|
2724
2728
|
* @default false
|
|
2725
2729
|
*/
|
package/lib/index.d.ts
CHANGED
|
@@ -1585,7 +1585,7 @@ declare const VERSION: {
|
|
|
1585
1585
|
*
|
|
1586
1586
|
* CLI and lib are versioned separately, so this is the CLI version.
|
|
1587
1587
|
*/
|
|
1588
|
-
readonly AWS_CDK_CLI_VERSION: "2.
|
|
1588
|
+
readonly AWS_CDK_CLI_VERSION: "2.1118.0";
|
|
1589
1589
|
/**
|
|
1590
1590
|
* CDK Version to use for construct projects.
|
|
1591
1591
|
*
|
|
@@ -1607,7 +1607,7 @@ declare const VERSION: {
|
|
|
1607
1607
|
/**
|
|
1608
1608
|
* Version of Projen to use.
|
|
1609
1609
|
*/
|
|
1610
|
-
readonly PROJEN_VERSION: "0.99.
|
|
1610
|
+
readonly PROJEN_VERSION: "0.99.42";
|
|
1611
1611
|
/**
|
|
1612
1612
|
* What version of the turborepo library should we use?
|
|
1613
1613
|
*/
|
|
@@ -1615,7 +1615,7 @@ declare const VERSION: {
|
|
|
1615
1615
|
/**
|
|
1616
1616
|
* Version of @types/node to use across all packages (pnpm catalog).
|
|
1617
1617
|
*/
|
|
1618
|
-
readonly TYPES_NODE_VERSION: "
|
|
1618
|
+
readonly TYPES_NODE_VERSION: "25.5.2";
|
|
1619
1619
|
/**
|
|
1620
1620
|
* What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
|
|
1621
1621
|
* can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
|
|
@@ -2610,8 +2610,10 @@ declare class MonorepoProject extends TypeScriptAppProject {
|
|
|
2610
2610
|
*/
|
|
2611
2611
|
declare class ProjectMetadata extends Component {
|
|
2612
2612
|
/**
|
|
2613
|
-
* Returns the ProjectMetadata instance for a project
|
|
2614
|
-
*
|
|
2613
|
+
* Returns the ProjectMetadata instance for a project. Walks up the parent
|
|
2614
|
+
* chain so sub-projects resolve the metadata declared on a root
|
|
2615
|
+
* `MonorepoProject` without needing a duplicate declaration of their own.
|
|
2616
|
+
* Returns `undefined` if no ancestor has a `ProjectMetadata` component.
|
|
2615
2617
|
*/
|
|
2616
2618
|
static of(project: Project): ProjectMetadata | undefined;
|
|
2617
2619
|
/** Resolved metadata with auto-detected values filled in. */
|
|
@@ -2767,8 +2769,10 @@ interface TypeScriptProjectOptions extends Omit<typescript.TypeScriptProjectOpti
|
|
|
2767
2769
|
* - `AgentConfigOptions`: enable with explicit configuration
|
|
2768
2770
|
* - `false` or `undefined`: disabled (default)
|
|
2769
2771
|
*
|
|
2770
|
-
*
|
|
2771
|
-
*
|
|
2772
|
+
* Sub-projects do not inherit `AgentConfig` from their parent
|
|
2773
|
+
* `MonorepoProject`. Agent rule files are rendered only on projects that
|
|
2774
|
+
* explicitly opt in, so a monorepo's root `AgentConfig` does not duplicate
|
|
2775
|
+
* `.cursor/`, `.claude/`, or `CLAUDE.md` into each sub-project's `outdir`.
|
|
2772
2776
|
*
|
|
2773
2777
|
* @default false
|
|
2774
2778
|
*/
|
package/lib/index.js
CHANGED
|
@@ -1782,7 +1782,7 @@ var VERSION = {
|
|
|
1782
1782
|
*
|
|
1783
1783
|
* CLI and lib are versioned separately, so this is the CLI version.
|
|
1784
1784
|
*/
|
|
1785
|
-
AWS_CDK_CLI_VERSION: "2.
|
|
1785
|
+
AWS_CDK_CLI_VERSION: "2.1118.0",
|
|
1786
1786
|
/**
|
|
1787
1787
|
* CDK Version to use for construct projects.
|
|
1788
1788
|
*
|
|
@@ -1804,7 +1804,7 @@ var VERSION = {
|
|
|
1804
1804
|
/**
|
|
1805
1805
|
* Version of Projen to use.
|
|
1806
1806
|
*/
|
|
1807
|
-
PROJEN_VERSION: "0.99.
|
|
1807
|
+
PROJEN_VERSION: "0.99.42",
|
|
1808
1808
|
/**
|
|
1809
1809
|
* What version of the turborepo library should we use?
|
|
1810
1810
|
*/
|
|
@@ -1812,7 +1812,7 @@ var VERSION = {
|
|
|
1812
1812
|
/**
|
|
1813
1813
|
* Version of @types/node to use across all packages (pnpm catalog).
|
|
1814
1814
|
*/
|
|
1815
|
-
TYPES_NODE_VERSION: "
|
|
1815
|
+
TYPES_NODE_VERSION: "25.5.2",
|
|
1816
1816
|
/**
|
|
1817
1817
|
* What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
|
|
1818
1818
|
* can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
|
|
@@ -2001,12 +2001,22 @@ function parseGitHubUrl(url) {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
var ProjectMetadata = class _ProjectMetadata extends import_projen5.Component {
|
|
2003
2003
|
/**
|
|
2004
|
-
* Returns the ProjectMetadata instance for a project
|
|
2005
|
-
*
|
|
2004
|
+
* Returns the ProjectMetadata instance for a project. Walks up the parent
|
|
2005
|
+
* chain so sub-projects resolve the metadata declared on a root
|
|
2006
|
+
* `MonorepoProject` without needing a duplicate declaration of their own.
|
|
2007
|
+
* Returns `undefined` if no ancestor has a `ProjectMetadata` component.
|
|
2006
2008
|
*/
|
|
2007
2009
|
static of(project) {
|
|
2008
2010
|
const isProjectMetadata = (c) => c instanceof _ProjectMetadata;
|
|
2009
|
-
|
|
2011
|
+
let current = project;
|
|
2012
|
+
while (current) {
|
|
2013
|
+
const found = current.components.find(isProjectMetadata);
|
|
2014
|
+
if (found) {
|
|
2015
|
+
return found;
|
|
2016
|
+
}
|
|
2017
|
+
current = current.parent;
|
|
2018
|
+
}
|
|
2019
|
+
return void 0;
|
|
2010
2020
|
}
|
|
2011
2021
|
constructor(project, options = {}) {
|
|
2012
2022
|
super(project);
|
|
@@ -3502,15 +3512,11 @@ var TypeScriptProject = class extends import_projen12.typescript.TypeScriptProje
|
|
|
3502
3512
|
turbo.compileTask?.outputs.push("dist/**");
|
|
3503
3513
|
turbo.compileTask?.outputs.push("lib/**");
|
|
3504
3514
|
}
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
this,
|
|
3511
|
-
typeof options.agentConfig === "object" ? options.agentConfig : {}
|
|
3512
|
-
);
|
|
3513
|
-
}
|
|
3515
|
+
if (options.agentConfig === true || typeof options.agentConfig === "object") {
|
|
3516
|
+
new AgentConfig(
|
|
3517
|
+
this,
|
|
3518
|
+
typeof options.agentConfig === "object" ? options.agentConfig : {}
|
|
3519
|
+
);
|
|
3514
3520
|
}
|
|
3515
3521
|
if (options.resetTask !== false) {
|
|
3516
3522
|
const defaultResetTaskOptions = {
|