@codedrifters/configulator 0.0.386 → 0.0.388
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.d.mts +9 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +59 -11
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +89 -35
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -173,7 +173,7 @@ var require_lib = __commonJS({
|
|
|
173
173
|
});
|
|
174
174
|
|
|
175
175
|
// src/agent/agent-config.ts
|
|
176
|
-
import { Component as Component8, SampleFile, TextFile as TextFile4 } from "projen";
|
|
176
|
+
import { Component as Component8, SampleFile as SampleFile2, TextFile as TextFile4 } from "projen";
|
|
177
177
|
|
|
178
178
|
// src/agent/types.ts
|
|
179
179
|
var AGENT_RULE_SCOPE = {
|
|
@@ -14807,11 +14807,14 @@ function renderUnblockDependentsScript(ud) {
|
|
|
14807
14807
|
` echo "$line" | grep -oE '#[0-9]+' | tr -d '#' | tr '\\n' ' ' || echo ""`,
|
|
14808
14808
|
"}",
|
|
14809
14809
|
"",
|
|
14810
|
-
"# Check
|
|
14810
|
+
"# Check whether a single dependency is resolved. Returns 0 (resolved)",
|
|
14811
|
+
"# for a CLOSED issue or a MERGED PR, 1 otherwise. A Depends on: target",
|
|
14812
|
+
"# may reference a PR (state MERGED/OPEN/CLOSED): an OPEN PR keeps",
|
|
14813
|
+
"# blocking, MERGED resolves it, UNKNOWN (API error) stays conservative.",
|
|
14811
14814
|
"is_closed() {",
|
|
14812
14815
|
" local state",
|
|
14813
14816
|
` state=$(gh issue view "$1" --json state --jq '.state' 2>/dev/null || echo "UNKNOWN")`,
|
|
14814
|
-
' [[ "$state" == "CLOSED" ]]',
|
|
14817
|
+
' [[ "$state" == "CLOSED" || "$state" == "MERGED" ]]',
|
|
14815
14818
|
"}",
|
|
14816
14819
|
"",
|
|
14817
14820
|
"# \u2500\u2500 main \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
|
|
@@ -15044,11 +15047,14 @@ function buildCheckBlockedScript(tiers, scopeGate, _runRatio) {
|
|
|
15044
15047
|
` echo "$line" | grep -oE '#[0-9]+' | tr -d '#' | tr '\\n' ' ' || echo ""`,
|
|
15045
15048
|
"}",
|
|
15046
15049
|
"",
|
|
15047
|
-
"# Check
|
|
15050
|
+
"# Check whether a single dependency is resolved. Returns 0 (resolved)",
|
|
15051
|
+
"# for a CLOSED issue or a MERGED PR, 1 otherwise. A Depends on: target",
|
|
15052
|
+
"# may reference a PR (state MERGED/OPEN/CLOSED): an OPEN PR keeps",
|
|
15053
|
+
"# blocking, MERGED resolves it, UNKNOWN (API error) stays conservative.",
|
|
15048
15054
|
"is_closed() {",
|
|
15049
15055
|
" local state",
|
|
15050
15056
|
` state=$(gh issue view "$1" --json state --jq '.state' 2>/dev/null || echo "UNKNOWN")`,
|
|
15051
|
-
' [[ "$state" == "CLOSED" ]]',
|
|
15057
|
+
' [[ "$state" == "CLOSED" || "$state" == "MERGED" ]]',
|
|
15052
15058
|
"}",
|
|
15053
15059
|
"",
|
|
15054
15060
|
"# Map a bare type-label value (without the `type:` prefix) to its",
|
|
@@ -30682,7 +30688,13 @@ function buildStandardsResearchBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults
|
|
|
30682
30688
|
var standardsResearchBundle = buildStandardsResearchBundle();
|
|
30683
30689
|
|
|
30684
30690
|
// src/turbo/turbo-repo.ts
|
|
30685
|
-
import {
|
|
30691
|
+
import {
|
|
30692
|
+
Component as Component4,
|
|
30693
|
+
FileBase,
|
|
30694
|
+
JsonFile,
|
|
30695
|
+
SampleDir,
|
|
30696
|
+
SampleFile
|
|
30697
|
+
} from "projen/lib";
|
|
30686
30698
|
import { JobPermission } from "projen/lib/github/workflows-model";
|
|
30687
30699
|
|
|
30688
30700
|
// src/turbo/turbo-repo-task.ts
|
|
@@ -30759,11 +30771,9 @@ var _TurboRepo = class _TurboRepo extends Component4 {
|
|
|
30759
30771
|
};
|
|
30760
30772
|
this.remoteCacheOptions = options.remoteCacheOptions;
|
|
30761
30773
|
this.buildAllTaskEnvVars = options.buildAllTaskEnvVars ?? {};
|
|
30762
|
-
const rootGeneratedFiles = this.isRootProject ? this.project.components.filter((c) => c instanceof FileBase).map((c) => c.path) : [];
|
|
30763
30774
|
this.buildTask = new TurboRepoTask(this.project, {
|
|
30764
30775
|
name: ROOT_TURBO_TASK_NAME,
|
|
30765
|
-
dependsOn: this.isRootProject ? [`^${ROOT_TURBO_TASK_NAME}`] : []
|
|
30766
|
-
...rootGeneratedFiles.length > 0 && { inputs: rootGeneratedFiles }
|
|
30776
|
+
dependsOn: this.isRootProject ? [`^${ROOT_TURBO_TASK_NAME}`] : []
|
|
30767
30777
|
});
|
|
30768
30778
|
if (this.isRootProject) {
|
|
30769
30779
|
this.buildAllTask = this.project.tasks.addTask(ROOT_CI_TASK_NAME, {
|
|
@@ -30803,18 +30813,17 @@ var _TurboRepo = class _TurboRepo extends Component4 {
|
|
|
30803
30813
|
}
|
|
30804
30814
|
}
|
|
30805
30815
|
if (!this.isRootProject) {
|
|
30806
|
-
const generatedFiles = this.project.components.filter((c) => c instanceof FileBase).map((c) => c.path);
|
|
30807
30816
|
this.preCompileTask = new TurboRepoTask(project, {
|
|
30808
30817
|
name: options.preCompileTask?.name ?? "pre-compile",
|
|
30809
|
-
inputs: ["src/**"
|
|
30818
|
+
inputs: ["src/**"]
|
|
30810
30819
|
});
|
|
30811
30820
|
this.compileTask = new TurboRepoTask(project, {
|
|
30812
30821
|
name: options.compileTask?.name ?? "compile",
|
|
30813
|
-
inputs: ["src/**"
|
|
30822
|
+
inputs: ["src/**"]
|
|
30814
30823
|
});
|
|
30815
30824
|
this.postCompileTask = new TurboRepoTask(project, {
|
|
30816
30825
|
name: options.postCompileTask?.name ?? "post-compile",
|
|
30817
|
-
inputs: ["src/**"
|
|
30826
|
+
inputs: ["src/**"]
|
|
30818
30827
|
});
|
|
30819
30828
|
this.testTask = new TurboRepoTask(project, {
|
|
30820
30829
|
name: options.testTask?.name ?? "test"
|
|
@@ -30945,6 +30954,33 @@ var _TurboRepo = class _TurboRepo extends Component4 {
|
|
|
30945
30954
|
}
|
|
30946
30955
|
}
|
|
30947
30956
|
}
|
|
30957
|
+
/**
|
|
30958
|
+
* Paths of all generated files in the project, deduped, for use as task
|
|
30959
|
+
* inputs so the compile cache invalidates when they change. Includes
|
|
30960
|
+
* projen-managed `FileBase` files plus generated-once `SampleFile` /
|
|
30961
|
+
* `SampleDir` — whose paths projen keeps private, so they are read defensively
|
|
30962
|
+
* and skipped if that internal shape ever changes. Computed at synth time so
|
|
30963
|
+
* files added after this component (e.g. a subclass's SampleFiles) are seen.
|
|
30964
|
+
*/
|
|
30965
|
+
generatedFileInputs() {
|
|
30966
|
+
const inputs = /* @__PURE__ */ new Set();
|
|
30967
|
+
for (const component of this.project.components) {
|
|
30968
|
+
if (component instanceof FileBase) {
|
|
30969
|
+
inputs.add(component.path);
|
|
30970
|
+
} else if (component instanceof SampleFile) {
|
|
30971
|
+
const filePath = component.filePath;
|
|
30972
|
+
if (typeof filePath === "string") {
|
|
30973
|
+
inputs.add(filePath);
|
|
30974
|
+
}
|
|
30975
|
+
} else if (component instanceof SampleDir) {
|
|
30976
|
+
const dir = component.dir;
|
|
30977
|
+
if (typeof dir === "string") {
|
|
30978
|
+
inputs.add(`${dir}/**`);
|
|
30979
|
+
}
|
|
30980
|
+
}
|
|
30981
|
+
}
|
|
30982
|
+
return Array.from(inputs);
|
|
30983
|
+
}
|
|
30948
30984
|
preSynthesize() {
|
|
30949
30985
|
let nextDependsOn = this.project.deps.all.filter((d) => d.version === "workspace:*").map((d) => [d.name, ROOT_TURBO_TASK_NAME].join("#"));
|
|
30950
30986
|
if (!this.isRootProject) {
|
|
@@ -30966,6 +31002,24 @@ var _TurboRepo = class _TurboRepo extends Component4 {
|
|
|
30966
31002
|
});
|
|
30967
31003
|
this.buildTask.dependsOn.push(...nextDependsOn);
|
|
30968
31004
|
}
|
|
31005
|
+
const generatedInputs = this.generatedFileInputs();
|
|
31006
|
+
const appendGeneratedInputs = (task) => {
|
|
31007
|
+
if (!task) {
|
|
31008
|
+
return;
|
|
31009
|
+
}
|
|
31010
|
+
for (const input of generatedInputs) {
|
|
31011
|
+
if (!task.inputs.includes(input)) {
|
|
31012
|
+
task.inputs.push(input);
|
|
31013
|
+
}
|
|
31014
|
+
}
|
|
31015
|
+
};
|
|
31016
|
+
if (this.isRootProject) {
|
|
31017
|
+
appendGeneratedInputs(this.buildTask);
|
|
31018
|
+
} else {
|
|
31019
|
+
appendGeneratedInputs(this.preCompileTask);
|
|
31020
|
+
appendGeneratedInputs(this.compileTask);
|
|
31021
|
+
appendGeneratedInputs(this.postCompileTask);
|
|
31022
|
+
}
|
|
30969
31023
|
const fileName = "turbo.json";
|
|
30970
31024
|
this.project.addPackageIgnore(fileName);
|
|
30971
31025
|
new JsonFile(this.project, fileName, {
|
|
@@ -33485,7 +33539,7 @@ var AgentConfig = class _AgentConfig extends Component8 {
|
|
|
33485
33539
|
});
|
|
33486
33540
|
}
|
|
33487
33541
|
if (resolvedIssueTemplates.emitStarterDoc) {
|
|
33488
|
-
new
|
|
33542
|
+
new SampleFile2(this.project, resolvedIssueTemplates.templatesPath, {
|
|
33489
33543
|
contents: renderIssueTemplatesStarterPage(resolvedIssueTemplates)
|
|
33490
33544
|
});
|
|
33491
33545
|
}
|
|
@@ -37040,7 +37094,7 @@ var JsiiFaker = class _JsiiFaker extends Component14 {
|
|
|
37040
37094
|
};
|
|
37041
37095
|
|
|
37042
37096
|
// src/projects/add-playwright.ts
|
|
37043
|
-
import { SampleFile as
|
|
37097
|
+
import { SampleFile as SampleFile3 } from "projen";
|
|
37044
37098
|
function addPlaywright(project) {
|
|
37045
37099
|
project.addDevDeps("@playwright/test");
|
|
37046
37100
|
project.tasks.addTask("e2e:install", {
|
|
@@ -37063,7 +37117,7 @@ function addPlaywright(project) {
|
|
|
37063
37117
|
project.setScript("e2e", "npx projen e2e");
|
|
37064
37118
|
project.setScript("e2e:ui", "npx projen e2e:ui");
|
|
37065
37119
|
project.setScript("e2e:report", "npx projen e2e:report");
|
|
37066
|
-
new
|
|
37120
|
+
new SampleFile3(project, "playwright.config.ts", {
|
|
37067
37121
|
contents: `import { defineConfig, devices } from '@playwright/test';
|
|
37068
37122
|
|
|
37069
37123
|
export default defineConfig({
|
|
@@ -37081,7 +37135,7 @@ export default defineConfig({
|
|
|
37081
37135
|
}
|
|
37082
37136
|
|
|
37083
37137
|
// src/projects/add-storybook.ts
|
|
37084
|
-
import { SampleFile as
|
|
37138
|
+
import { SampleFile as SampleFile4 } from "projen";
|
|
37085
37139
|
function addStorybook(project, options = {}) {
|
|
37086
37140
|
const withDocs = options.withDocs ?? true;
|
|
37087
37141
|
project.addDevDeps(
|
|
@@ -37100,7 +37154,7 @@ function addStorybook(project, options = {}) {
|
|
|
37100
37154
|
});
|
|
37101
37155
|
project.setScript("storybook", "npx projen storybook");
|
|
37102
37156
|
project.setScript("build-storybook", "npx projen build-storybook");
|
|
37103
|
-
new
|
|
37157
|
+
new SampleFile4(project, ".storybook/main.ts", {
|
|
37104
37158
|
contents: `import type { StorybookConfig } from '@storybook/react-vite';
|
|
37105
37159
|
|
|
37106
37160
|
const config: StorybookConfig = {
|
|
@@ -37111,7 +37165,7 @@ const config: StorybookConfig = {
|
|
|
37111
37165
|
export default config;
|
|
37112
37166
|
`
|
|
37113
37167
|
});
|
|
37114
|
-
new
|
|
37168
|
+
new SampleFile4(project, ".storybook/preview.ts", {
|
|
37115
37169
|
contents: `import '../src/index.css';
|
|
37116
37170
|
const preview = { parameters: { controls: { expanded: true } } };
|
|
37117
37171
|
export default preview;
|
|
@@ -37120,7 +37174,7 @@ export default preview;
|
|
|
37120
37174
|
}
|
|
37121
37175
|
|
|
37122
37176
|
// src/projects/astro-project.ts
|
|
37123
|
-
import { SampleFile as
|
|
37177
|
+
import { SampleFile as SampleFile5 } from "projen";
|
|
37124
37178
|
import { merge as merge3 } from "ts-deepmerge";
|
|
37125
37179
|
|
|
37126
37180
|
// src/projects/monorepo-layout.ts
|
|
@@ -38853,10 +38907,10 @@ var AstroProject = class extends TypeScriptProject {
|
|
|
38853
38907
|
adapter: options.adapter
|
|
38854
38908
|
});
|
|
38855
38909
|
if (options.sampleCode === true) {
|
|
38856
|
-
new
|
|
38910
|
+
new SampleFile5(this, "src/pages/index.astro", {
|
|
38857
38911
|
contents: DEFAULT_INDEX_ASTRO
|
|
38858
38912
|
});
|
|
38859
|
-
new
|
|
38913
|
+
new SampleFile5(this, "public/favicon.svg", {
|
|
38860
38914
|
contents: DEFAULT_FAVICON_SVG
|
|
38861
38915
|
});
|
|
38862
38916
|
}
|
|
@@ -39628,7 +39682,7 @@ var AwsCdkProject = class extends awscdk.AwsCdkTypeScriptApp {
|
|
|
39628
39682
|
};
|
|
39629
39683
|
|
|
39630
39684
|
// src/projects/react-vite-site-project.ts
|
|
39631
|
-
import { SampleFile as
|
|
39685
|
+
import { SampleFile as SampleFile6, TextFile as TextFile8 } from "projen";
|
|
39632
39686
|
import { merge as merge5 } from "ts-deepmerge";
|
|
39633
39687
|
var ReactViteSiteProject = class extends TypeScriptProject {
|
|
39634
39688
|
constructor(userOptions) {
|
|
@@ -39702,7 +39756,7 @@ var ReactViteSiteProject = class extends TypeScriptProject {
|
|
|
39702
39756
|
"vitest/globals",
|
|
39703
39757
|
"vite/client"
|
|
39704
39758
|
]);
|
|
39705
|
-
new
|
|
39759
|
+
new SampleFile6(this, "vite.config.ts", {
|
|
39706
39760
|
contents: `import { defineConfig } from 'vite';
|
|
39707
39761
|
import react from '@vitejs/plugin-react';
|
|
39708
39762
|
import tailwindcss from '@tailwindcss/vite';
|
|
@@ -39714,7 +39768,7 @@ export default defineConfig({
|
|
|
39714
39768
|
});
|
|
39715
39769
|
`
|
|
39716
39770
|
});
|
|
39717
|
-
new
|
|
39771
|
+
new SampleFile6(this, "src/vite-env.d.ts", {
|
|
39718
39772
|
contents: `/// <reference types="vite/client" />
|
|
39719
39773
|
|
|
39720
39774
|
interface ImportMetaEnv {
|
|
@@ -39729,7 +39783,7 @@ interface ImportMeta {
|
|
|
39729
39783
|
});
|
|
39730
39784
|
if (options.testRunner !== TestRunner.JEST) {
|
|
39731
39785
|
this.tryRemoveFile("vitest.config.ts");
|
|
39732
|
-
new
|
|
39786
|
+
new SampleFile6(this, "vitest.config.ts", {
|
|
39733
39787
|
contents: `import { defineConfig, mergeConfig } from 'vitest/config';
|
|
39734
39788
|
import react from '@vitejs/plugin-react';
|
|
39735
39789
|
import viteConfig from './vite.config';
|
|
@@ -39873,7 +39927,7 @@ export default mergeConfig(
|
|
|
39873
39927
|
}
|
|
39874
39928
|
if (userOptions.sampleCode === true) {
|
|
39875
39929
|
const siteName = options.name;
|
|
39876
|
-
new
|
|
39930
|
+
new SampleFile6(this, "index.html", {
|
|
39877
39931
|
contents: `<!doctype html>
|
|
39878
39932
|
<html>
|
|
39879
39933
|
<head>
|
|
@@ -39888,7 +39942,7 @@ export default mergeConfig(
|
|
|
39888
39942
|
</html>
|
|
39889
39943
|
`
|
|
39890
39944
|
});
|
|
39891
|
-
new
|
|
39945
|
+
new SampleFile6(this, "src/routes.tsx", {
|
|
39892
39946
|
contents: `import { createBrowserRouter } from 'react-router-dom';
|
|
39893
39947
|
import App from './App';
|
|
39894
39948
|
|
|
@@ -39897,7 +39951,7 @@ export const router = createBrowserRouter([
|
|
|
39897
39951
|
]);
|
|
39898
39952
|
`
|
|
39899
39953
|
});
|
|
39900
|
-
new
|
|
39954
|
+
new SampleFile6(this, "src/main.tsx", {
|
|
39901
39955
|
contents: `import React from 'react';
|
|
39902
39956
|
import ReactDOM from 'react-dom/client';
|
|
39903
39957
|
import { RouterProvider } from 'react-router-dom';
|
|
@@ -39911,7 +39965,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
39911
39965
|
);
|
|
39912
39966
|
`
|
|
39913
39967
|
});
|
|
39914
|
-
new
|
|
39968
|
+
new SampleFile6(this, "src/App.tsx", {
|
|
39915
39969
|
contents: `export default function App() {
|
|
39916
39970
|
return (
|
|
39917
39971
|
<main className="p-4">
|
|
@@ -39921,11 +39975,11 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
39921
39975
|
}
|
|
39922
39976
|
`
|
|
39923
39977
|
});
|
|
39924
|
-
new
|
|
39978
|
+
new SampleFile6(this, "src/index.css", {
|
|
39925
39979
|
contents: `@import "tailwindcss";
|
|
39926
39980
|
`
|
|
39927
39981
|
});
|
|
39928
|
-
new
|
|
39982
|
+
new SampleFile6(this, "src/setupTests.ts", {
|
|
39929
39983
|
contents: `import '@testing-library/jest-dom';
|
|
39930
39984
|
`
|
|
39931
39985
|
});
|
|
@@ -39934,7 +39988,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
39934
39988
|
};
|
|
39935
39989
|
|
|
39936
39990
|
// src/projects/starlight-project.ts
|
|
39937
|
-
import { SampleFile as
|
|
39991
|
+
import { SampleFile as SampleFile7 } from "projen";
|
|
39938
39992
|
var STARLIGHT_ROLE = {
|
|
39939
39993
|
DOCS: "docs",
|
|
39940
39994
|
SITE: "site"
|
|
@@ -39976,10 +40030,10 @@ var StarlightProject = class extends AstroProject {
|
|
|
39976
40030
|
turbo.compileTask.inputs.push("src/content/**");
|
|
39977
40031
|
}
|
|
39978
40032
|
if (userOptions.sampleContent === true) {
|
|
39979
|
-
new
|
|
40033
|
+
new SampleFile7(this, "src/content/docs/index.mdx", {
|
|
39980
40034
|
contents: DEFAULT_INDEX_MDX
|
|
39981
40035
|
});
|
|
39982
|
-
new
|
|
40036
|
+
new SampleFile7(this, "src/content.config.ts", {
|
|
39983
40037
|
contents: DEFAULT_CONTENT_CONFIG_TS
|
|
39984
40038
|
});
|
|
39985
40039
|
}
|