@codedrifters/configulator 0.0.314 → 0.0.316
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 +81 -16
- package/lib/index.d.ts +82 -17
- package/lib/index.js +178 -93
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +156 -72
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -286,6 +286,7 @@ __export(index_exports, {
|
|
|
286
286
|
TIER_AWARE_BUNDLE_NAMES: () => TIER_AWARE_BUNDLE_NAMES,
|
|
287
287
|
TestRunner: () => TestRunner,
|
|
288
288
|
TsDocCoverageKind: () => TsDocCoverageKind,
|
|
289
|
+
TsdocConfig: () => TsdocConfig,
|
|
289
290
|
TurboRepo: () => TurboRepo,
|
|
290
291
|
TurboRepoTask: () => TurboRepoTask,
|
|
291
292
|
TypeScriptConfig: () => TypeScriptConfig,
|
|
@@ -27868,16 +27869,32 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
|
|
|
27868
27869
|
this.globalEnv.push(name);
|
|
27869
27870
|
}
|
|
27870
27871
|
}
|
|
27871
|
-
|
|
27872
|
-
|
|
27873
|
-
|
|
27874
|
-
|
|
27875
|
-
|
|
27876
|
-
|
|
27877
|
-
|
|
27878
|
-
|
|
27879
|
-
|
|
27872
|
+
activateBranchNameEnvVar(options) {
|
|
27873
|
+
const value = '$(echo "${GIT_BRANCH_NAME:-$(git rev-parse --abbrev-ref HEAD)}")';
|
|
27874
|
+
if (options === void 0) {
|
|
27875
|
+
this.project.logger.warn(
|
|
27876
|
+
"TurboRepo.activateBranchNameEnvVar() with no arguments is deprecated. It writes GIT_BRANCH_NAME to the root `globalEnv`, which forces every task in the monorepo to miss cache on every branch switch. Pass `{ tasks: [...] }` and name only the tasks that actually consume the branch (e.g. CDK synth/package) to preserve cross-branch cache hits for everything else."
|
|
27877
|
+
);
|
|
27878
|
+
this.addGlobalEnvVar("GIT_BRANCH_NAME", value);
|
|
27879
|
+
return;
|
|
27880
|
+
}
|
|
27881
|
+
const knownTaskNames = this.tasks.map((task) => task.name);
|
|
27882
|
+
const unknown = options.tasks.filter(
|
|
27883
|
+
(name) => !knownTaskNames.includes(name)
|
|
27880
27884
|
);
|
|
27885
|
+
if (unknown.length > 0) {
|
|
27886
|
+
throw new Error(
|
|
27887
|
+
`TurboRepo.activateBranchNameEnvVar: unknown task name(s) ${JSON.stringify(
|
|
27888
|
+
unknown
|
|
27889
|
+
)}. Known tasks on this TurboRepo: ${JSON.stringify(knownTaskNames)}.`
|
|
27890
|
+
);
|
|
27891
|
+
}
|
|
27892
|
+
for (const name of options.tasks) {
|
|
27893
|
+
const task = this.tasks.find((t) => t.name === name);
|
|
27894
|
+
if (task && !task.env.includes("GIT_BRANCH_NAME")) {
|
|
27895
|
+
task.env.push("GIT_BRANCH_NAME");
|
|
27896
|
+
}
|
|
27897
|
+
}
|
|
27881
27898
|
}
|
|
27882
27899
|
preSynthesize() {
|
|
27883
27900
|
let nextDependsOn = this.project.deps.all.filter((d) => d.version === "workspace:*").map((d) => [d.name, ROOT_TURBO_TASK_NAME].join("#"));
|
|
@@ -27911,7 +27928,6 @@ var _TurboRepo = class _TurboRepo extends import_lib2.Component {
|
|
|
27911
27928
|
ui: this.isRootProject ? this.ui : void 0,
|
|
27912
27929
|
dangerouslyDisablePackageManagerCheck: this.isRootProject ? this.dangerouslyDisablePackageManagerCheck : void 0,
|
|
27913
27930
|
cacheDir: this.isRootProject ? this.cacheDir : void 0,
|
|
27914
|
-
daemon: this.isRootProject ? this.daemon : void 0,
|
|
27915
27931
|
envMode: this.isRootProject ? this.envMode : void 0,
|
|
27916
27932
|
/**
|
|
27917
27933
|
* All tasks
|
|
@@ -33154,7 +33170,7 @@ export default preview;
|
|
|
33154
33170
|
}
|
|
33155
33171
|
|
|
33156
33172
|
// src/projects/astro-project.ts
|
|
33157
|
-
var
|
|
33173
|
+
var import_projen23 = require("projen");
|
|
33158
33174
|
var import_ts_deepmerge3 = require("ts-deepmerge");
|
|
33159
33175
|
|
|
33160
33176
|
// src/projects/monorepo-layout.ts
|
|
@@ -33302,7 +33318,7 @@ function resolveReactViteSiteProjectOutdir(packageName) {
|
|
|
33302
33318
|
}
|
|
33303
33319
|
|
|
33304
33320
|
// src/projects/typescript-project.ts
|
|
33305
|
-
var
|
|
33321
|
+
var import_projen22 = require("projen");
|
|
33306
33322
|
var import_javascript4 = require("projen/lib/javascript");
|
|
33307
33323
|
var import_release = require("projen/lib/release");
|
|
33308
33324
|
var import_ts_deepmerge2 = require("ts-deepmerge");
|
|
@@ -34291,12 +34307,98 @@ var MonorepoProject = class extends import_typescript3.TypeScriptAppProject {
|
|
|
34291
34307
|
}
|
|
34292
34308
|
};
|
|
34293
34309
|
|
|
34310
|
+
// src/typescript/tsdoc-config.ts
|
|
34311
|
+
var import_projen20 = require("projen");
|
|
34312
|
+
var STANDARD_MODIFIER_TAGS = [
|
|
34313
|
+
"@default",
|
|
34314
|
+
"@defaultValue",
|
|
34315
|
+
"@experimental",
|
|
34316
|
+
"@internal"
|
|
34317
|
+
];
|
|
34318
|
+
var ALWAYS_ON_SCOPES = ["@codedrifters"];
|
|
34319
|
+
var TsdocConfig = class _TsdocConfig extends import_projen20.Component {
|
|
34320
|
+
/**
|
|
34321
|
+
* Derive a workspace scope from a scoped package name (`@scope/name`).
|
|
34322
|
+
* Returns `undefined` when the name is unscoped.
|
|
34323
|
+
*
|
|
34324
|
+
* @internal
|
|
34325
|
+
*/
|
|
34326
|
+
static scopeFromPackageName(packageName) {
|
|
34327
|
+
if (!packageName || !packageName.startsWith("@")) {
|
|
34328
|
+
return void 0;
|
|
34329
|
+
}
|
|
34330
|
+
const slash = packageName.indexOf("/");
|
|
34331
|
+
if (slash <= 1) {
|
|
34332
|
+
return void 0;
|
|
34333
|
+
}
|
|
34334
|
+
return packageName.slice(0, slash);
|
|
34335
|
+
}
|
|
34336
|
+
constructor(project, options = {}) {
|
|
34337
|
+
super(project);
|
|
34338
|
+
const scopeFromName = _TsdocConfig.scopeFromPackageName(
|
|
34339
|
+
project.package.packageName
|
|
34340
|
+
);
|
|
34341
|
+
const scopeSet = /* @__PURE__ */ new Set([
|
|
34342
|
+
...ALWAYS_ON_SCOPES,
|
|
34343
|
+
...scopeFromName ? [scopeFromName] : [],
|
|
34344
|
+
...options.workspaceScopes ?? []
|
|
34345
|
+
]);
|
|
34346
|
+
const tagSet = /* @__PURE__ */ new Set([
|
|
34347
|
+
...STANDARD_MODIFIER_TAGS,
|
|
34348
|
+
...Array.from(scopeSet),
|
|
34349
|
+
...options.additionalModifierTags ?? []
|
|
34350
|
+
]);
|
|
34351
|
+
const tagDefinitions = Array.from(tagSet).sort((a, b) => a.localeCompare(b)).map((tagName) => ({
|
|
34352
|
+
tagName,
|
|
34353
|
+
syntaxKind: "modifier",
|
|
34354
|
+
allowMultiple: true
|
|
34355
|
+
}));
|
|
34356
|
+
new import_projen20.JsonFile(project, "tsdoc.json", {
|
|
34357
|
+
obj: {
|
|
34358
|
+
$schema: "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
|
|
34359
|
+
tagDefinitions
|
|
34360
|
+
}
|
|
34361
|
+
});
|
|
34362
|
+
project.addPackageIgnore("tsdoc.json");
|
|
34363
|
+
}
|
|
34364
|
+
};
|
|
34365
|
+
|
|
34366
|
+
// src/typescript/typescript-config.ts
|
|
34367
|
+
var import_node_path2 = require("path");
|
|
34368
|
+
var import_projen21 = require("projen");
|
|
34369
|
+
var import_path2 = require("projen/lib/util/path");
|
|
34370
|
+
var TypeScriptConfig = class extends import_projen21.Component {
|
|
34371
|
+
constructor(project) {
|
|
34372
|
+
super(project);
|
|
34373
|
+
let tsPaths = {};
|
|
34374
|
+
const workspaceDeps = project.deps.all.filter(
|
|
34375
|
+
(d) => d.version === "workspace:*"
|
|
34376
|
+
);
|
|
34377
|
+
workspaceDeps.forEach((dep) => {
|
|
34378
|
+
const subproject = project.root.subprojects.find((p) => p.package.packageName === dep.name);
|
|
34379
|
+
if (!subproject) {
|
|
34380
|
+
throw new Error(`Could not find subproject ${dep.name} in monorepo.`);
|
|
34381
|
+
}
|
|
34382
|
+
tsPaths = {
|
|
34383
|
+
...tsPaths,
|
|
34384
|
+
[dep.name]: [
|
|
34385
|
+
(0, import_path2.ensureRelativePathStartsWithDot)(
|
|
34386
|
+
(0, import_node_path2.relative)(project.outdir, subproject.outdir)
|
|
34387
|
+
)
|
|
34388
|
+
]
|
|
34389
|
+
};
|
|
34390
|
+
});
|
|
34391
|
+
project.tsconfig?.file.addOverride("compilerOptions.paths", tsPaths);
|
|
34392
|
+
project.tsconfigDev?.file.addOverride("compilerOptions.paths", tsPaths);
|
|
34393
|
+
}
|
|
34394
|
+
};
|
|
34395
|
+
|
|
34294
34396
|
// src/projects/typescript-project.ts
|
|
34295
34397
|
var TestRunner = {
|
|
34296
34398
|
JEST: "jest",
|
|
34297
34399
|
VITEST: "vitest"
|
|
34298
34400
|
};
|
|
34299
|
-
var TypeScriptProject = class extends
|
|
34401
|
+
var TypeScriptProject = class extends import_projen22.typescript.TypeScriptProject {
|
|
34300
34402
|
constructor(userOptions) {
|
|
34301
34403
|
if (!(userOptions.parent instanceof MonorepoProject)) {
|
|
34302
34404
|
throw new Error(
|
|
@@ -34426,34 +34528,46 @@ var TypeScriptProject = class extends import_projen20.typescript.TypeScriptProje
|
|
|
34426
34528
|
this.eslint?.addRules({
|
|
34427
34529
|
"tsdoc/syntax": "warn"
|
|
34428
34530
|
});
|
|
34429
|
-
|
|
34430
|
-
|
|
34431
|
-
|
|
34432
|
-
|
|
34433
|
-
|
|
34434
|
-
|
|
34435
|
-
|
|
34436
|
-
|
|
34437
|
-
|
|
34438
|
-
|
|
34439
|
-
|
|
34440
|
-
|
|
34441
|
-
|
|
34442
|
-
|
|
34443
|
-
|
|
34444
|
-
|
|
34445
|
-
|
|
34446
|
-
|
|
34447
|
-
|
|
34448
|
-
|
|
34449
|
-
|
|
34450
|
-
|
|
34451
|
-
|
|
34452
|
-
|
|
34453
|
-
|
|
34454
|
-
|
|
34455
|
-
|
|
34456
|
-
|
|
34531
|
+
const requireJsdoc = options.requireJsdoc ?? "off";
|
|
34532
|
+
if (requireJsdoc !== "off") {
|
|
34533
|
+
const publicOnly = requireJsdoc === "public";
|
|
34534
|
+
this.eslint?.addOverride({
|
|
34535
|
+
files: ["src/**/*.ts"],
|
|
34536
|
+
excludedFiles: ["**/*.test.*", "**/*.spec.*", "**/*.generated.ts"],
|
|
34537
|
+
rules: {
|
|
34538
|
+
"jsdoc/require-jsdoc": [
|
|
34539
|
+
"warn",
|
|
34540
|
+
{
|
|
34541
|
+
publicOnly,
|
|
34542
|
+
require: {
|
|
34543
|
+
FunctionDeclaration: true,
|
|
34544
|
+
ClassDeclaration: true
|
|
34545
|
+
},
|
|
34546
|
+
...publicOnly ? {
|
|
34547
|
+
contexts: [
|
|
34548
|
+
"ExportNamedDeclaration > FunctionDeclaration",
|
|
34549
|
+
"ExportNamedDeclaration > ClassDeclaration",
|
|
34550
|
+
"ExportNamedDeclaration > VariableDeclaration",
|
|
34551
|
+
"ExportNamedDeclaration > TSInterfaceDeclaration",
|
|
34552
|
+
"ExportNamedDeclaration > TSTypeAliasDeclaration",
|
|
34553
|
+
"ExportNamedDeclaration > TSEnumDeclaration"
|
|
34554
|
+
]
|
|
34555
|
+
} : {},
|
|
34556
|
+
checkConstructors: false,
|
|
34557
|
+
checkGetters: false,
|
|
34558
|
+
checkSetters: false,
|
|
34559
|
+
enableFixer: false
|
|
34560
|
+
}
|
|
34561
|
+
]
|
|
34562
|
+
}
|
|
34563
|
+
});
|
|
34564
|
+
}
|
|
34565
|
+
if (options.tsdocConfig !== false) {
|
|
34566
|
+
new TsdocConfig(
|
|
34567
|
+
this,
|
|
34568
|
+
typeof options.tsdocConfig === "object" ? options.tsdocConfig : {}
|
|
34569
|
+
);
|
|
34570
|
+
}
|
|
34457
34571
|
if (options.apiExtractor !== false) {
|
|
34458
34572
|
new ApiExtractor(
|
|
34459
34573
|
this,
|
|
@@ -34606,10 +34720,10 @@ var AstroProject = class extends TypeScriptProject {
|
|
|
34606
34720
|
adapter: options.adapter
|
|
34607
34721
|
});
|
|
34608
34722
|
if (options.sampleCode === true) {
|
|
34609
|
-
new
|
|
34723
|
+
new import_projen23.SampleFile(this, "src/pages/index.astro", {
|
|
34610
34724
|
contents: DEFAULT_INDEX_ASTRO
|
|
34611
34725
|
});
|
|
34612
|
-
new
|
|
34726
|
+
new import_projen23.SampleFile(this, "public/favicon.svg", {
|
|
34613
34727
|
contents: DEFAULT_FAVICON_SVG
|
|
34614
34728
|
});
|
|
34615
34729
|
}
|
|
@@ -34634,19 +34748,19 @@ var DEFAULT_FAVICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
|
34634
34748
|
`;
|
|
34635
34749
|
|
|
34636
34750
|
// src/projects/aws-cdk-project.ts
|
|
34637
|
-
var
|
|
34751
|
+
var import_projen26 = require("projen");
|
|
34638
34752
|
var import_javascript5 = require("projen/lib/javascript");
|
|
34639
34753
|
var import_release2 = require("projen/lib/release");
|
|
34640
34754
|
var import_ts_deepmerge4 = require("ts-deepmerge");
|
|
34641
34755
|
|
|
34642
34756
|
// src/workflows/aws-deploy-workflow.ts
|
|
34643
34757
|
var import_utils11 = __toESM(require_lib());
|
|
34644
|
-
var
|
|
34758
|
+
var import_projen24 = require("projen");
|
|
34645
34759
|
var import_build = require("projen/lib/build");
|
|
34646
34760
|
var import_github5 = require("projen/lib/github");
|
|
34647
34761
|
var import_workflows_model5 = require("projen/lib/github/workflows-model");
|
|
34648
34762
|
var PROD_DEPLOY_NAME = "prod-deploy";
|
|
34649
|
-
var AwsDeployWorkflow = class _AwsDeployWorkflow extends
|
|
34763
|
+
var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen24.Component {
|
|
34650
34764
|
constructor(project, options = {}) {
|
|
34651
34765
|
super(project);
|
|
34652
34766
|
this.project = project;
|
|
@@ -34910,7 +35024,7 @@ var AwsDeployWorkflow = class _AwsDeployWorkflow extends import_projen22.Compone
|
|
|
34910
35024
|
};
|
|
34911
35025
|
|
|
34912
35026
|
// src/workflows/aws-teardown-workflow.ts
|
|
34913
|
-
var
|
|
35027
|
+
var import_projen25 = require("projen");
|
|
34914
35028
|
var import_github6 = require("projen/lib/github");
|
|
34915
35029
|
var import_workflows_model6 = require("projen/lib/github/workflows-model");
|
|
34916
35030
|
var DEFAULT_TEARDOWN_BRANCH_PATTERNS = [
|
|
@@ -34932,7 +35046,7 @@ var resolveBranchPatterns = (explicit, targets) => {
|
|
|
34932
35046
|
}
|
|
34933
35047
|
return [...DEFAULT_TEARDOWN_BRANCH_PATTERNS];
|
|
34934
35048
|
};
|
|
34935
|
-
var AwsTeardownWorkflow = class extends
|
|
35049
|
+
var AwsTeardownWorkflow = class extends import_projen25.Component {
|
|
34936
35050
|
constructor(rootProject, options) {
|
|
34937
35051
|
super(rootProject);
|
|
34938
35052
|
this.rootProject = rootProject;
|
|
@@ -35114,7 +35228,7 @@ var AwsTeardownWorkflow = class extends import_projen23.Component {
|
|
|
35114
35228
|
};
|
|
35115
35229
|
|
|
35116
35230
|
// src/projects/aws-cdk-project.ts
|
|
35117
|
-
var AwsCdkProject = class extends
|
|
35231
|
+
var AwsCdkProject = class extends import_projen26.awscdk.AwsCdkTypeScriptApp {
|
|
35118
35232
|
constructor(userOptions) {
|
|
35119
35233
|
if (!(userOptions.parent instanceof MonorepoProject)) {
|
|
35120
35234
|
throw new Error(
|
|
@@ -35311,7 +35425,7 @@ var AwsCdkProject = class extends import_projen24.awscdk.AwsCdkTypeScriptApp {
|
|
|
35311
35425
|
};
|
|
35312
35426
|
|
|
35313
35427
|
// src/projects/react-vite-site-project.ts
|
|
35314
|
-
var
|
|
35428
|
+
var import_projen27 = require("projen");
|
|
35315
35429
|
var import_ts_deepmerge5 = require("ts-deepmerge");
|
|
35316
35430
|
var ReactViteSiteProject = class extends TypeScriptProject {
|
|
35317
35431
|
constructor(userOptions) {
|
|
@@ -35350,7 +35464,7 @@ var ReactViteSiteProject = class extends TypeScriptProject {
|
|
|
35350
35464
|
};
|
|
35351
35465
|
super(options);
|
|
35352
35466
|
this.package.addField("type", "module");
|
|
35353
|
-
new
|
|
35467
|
+
new import_projen27.TextFile(this, ".nvmrc", { lines: ["v24.11.0"] });
|
|
35354
35468
|
this.tsconfig?.file.addOverride("compilerOptions.target", "ES2020");
|
|
35355
35469
|
this.tsconfig?.file.addOverride("compilerOptions.lib", [
|
|
35356
35470
|
"ES2020",
|
|
@@ -35400,7 +35514,7 @@ var ReactViteSiteProject = class extends TypeScriptProject {
|
|
|
35400
35514
|
"build",
|
|
35401
35515
|
".turbo"
|
|
35402
35516
|
]);
|
|
35403
|
-
new
|
|
35517
|
+
new import_projen27.SampleFile(this, "vite.config.ts", {
|
|
35404
35518
|
contents: `import { defineConfig } from 'vite';
|
|
35405
35519
|
import react from '@vitejs/plugin-react';
|
|
35406
35520
|
import tailwindcss from '@tailwindcss/vite';
|
|
@@ -35412,7 +35526,7 @@ export default defineConfig({
|
|
|
35412
35526
|
});
|
|
35413
35527
|
`
|
|
35414
35528
|
});
|
|
35415
|
-
new
|
|
35529
|
+
new import_projen27.SampleFile(this, "src/vite-env.d.ts", {
|
|
35416
35530
|
contents: `/// <reference types="vite/client" />
|
|
35417
35531
|
|
|
35418
35532
|
interface ImportMetaEnv {
|
|
@@ -35427,7 +35541,7 @@ interface ImportMeta {
|
|
|
35427
35541
|
});
|
|
35428
35542
|
if (options.testRunner !== TestRunner.JEST) {
|
|
35429
35543
|
this.tryRemoveFile("vitest.config.ts");
|
|
35430
|
-
new
|
|
35544
|
+
new import_projen27.SampleFile(this, "vitest.config.ts", {
|
|
35431
35545
|
contents: `import { defineConfig, mergeConfig } from 'vitest/config';
|
|
35432
35546
|
import react from '@vitejs/plugin-react';
|
|
35433
35547
|
import viteConfig from './vite.config';
|
|
@@ -35571,7 +35685,7 @@ export default mergeConfig(
|
|
|
35571
35685
|
}
|
|
35572
35686
|
if (userOptions.sampleCode === true) {
|
|
35573
35687
|
const siteName = options.name;
|
|
35574
|
-
new
|
|
35688
|
+
new import_projen27.SampleFile(this, "index.html", {
|
|
35575
35689
|
contents: `<!doctype html>
|
|
35576
35690
|
<html>
|
|
35577
35691
|
<head>
|
|
@@ -35586,7 +35700,7 @@ export default mergeConfig(
|
|
|
35586
35700
|
</html>
|
|
35587
35701
|
`
|
|
35588
35702
|
});
|
|
35589
|
-
new
|
|
35703
|
+
new import_projen27.SampleFile(this, "src/routes.tsx", {
|
|
35590
35704
|
contents: `import { createBrowserRouter } from 'react-router-dom';
|
|
35591
35705
|
import App from './App';
|
|
35592
35706
|
|
|
@@ -35595,7 +35709,7 @@ export const router = createBrowserRouter([
|
|
|
35595
35709
|
]);
|
|
35596
35710
|
`
|
|
35597
35711
|
});
|
|
35598
|
-
new
|
|
35712
|
+
new import_projen27.SampleFile(this, "src/main.tsx", {
|
|
35599
35713
|
contents: `import React from 'react';
|
|
35600
35714
|
import ReactDOM from 'react-dom/client';
|
|
35601
35715
|
import { RouterProvider } from 'react-router-dom';
|
|
@@ -35609,7 +35723,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
35609
35723
|
);
|
|
35610
35724
|
`
|
|
35611
35725
|
});
|
|
35612
|
-
new
|
|
35726
|
+
new import_projen27.SampleFile(this, "src/App.tsx", {
|
|
35613
35727
|
contents: `export default function App() {
|
|
35614
35728
|
return (
|
|
35615
35729
|
<main className="p-4">
|
|
@@ -35619,11 +35733,11 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
35619
35733
|
}
|
|
35620
35734
|
`
|
|
35621
35735
|
});
|
|
35622
|
-
new
|
|
35736
|
+
new import_projen27.SampleFile(this, "src/index.css", {
|
|
35623
35737
|
contents: `@import "tailwindcss";
|
|
35624
35738
|
`
|
|
35625
35739
|
});
|
|
35626
|
-
new
|
|
35740
|
+
new import_projen27.SampleFile(this, "src/setupTests.ts", {
|
|
35627
35741
|
contents: `import '@testing-library/jest-dom';
|
|
35628
35742
|
`
|
|
35629
35743
|
});
|
|
@@ -35632,7 +35746,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
|
35632
35746
|
};
|
|
35633
35747
|
|
|
35634
35748
|
// src/projects/starlight-project.ts
|
|
35635
|
-
var
|
|
35749
|
+
var import_projen28 = require("projen");
|
|
35636
35750
|
var STARLIGHT_ROLE = {
|
|
35637
35751
|
DOCS: "docs",
|
|
35638
35752
|
SITE: "site"
|
|
@@ -35674,10 +35788,10 @@ var StarlightProject = class extends AstroProject {
|
|
|
35674
35788
|
turbo.compileTask.inputs.push("src/content/**");
|
|
35675
35789
|
}
|
|
35676
35790
|
if (userOptions.sampleContent === true) {
|
|
35677
|
-
new
|
|
35791
|
+
new import_projen28.SampleFile(this, "src/content/docs/index.mdx", {
|
|
35678
35792
|
contents: DEFAULT_INDEX_MDX
|
|
35679
35793
|
});
|
|
35680
|
-
new
|
|
35794
|
+
new import_projen28.SampleFile(this, "src/content.config.ts", {
|
|
35681
35795
|
contents: DEFAULT_CONTENT_CONFIG_TS
|
|
35682
35796
|
});
|
|
35683
35797
|
}
|
|
@@ -35749,36 +35863,6 @@ export const collections = {
|
|
|
35749
35863
|
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
|
|
35750
35864
|
};
|
|
35751
35865
|
`;
|
|
35752
|
-
|
|
35753
|
-
// src/typescript/typescript-config.ts
|
|
35754
|
-
var import_node_path2 = require("path");
|
|
35755
|
-
var import_projen27 = require("projen");
|
|
35756
|
-
var import_path2 = require("projen/lib/util/path");
|
|
35757
|
-
var TypeScriptConfig = class extends import_projen27.Component {
|
|
35758
|
-
constructor(project) {
|
|
35759
|
-
super(project);
|
|
35760
|
-
let tsPaths = {};
|
|
35761
|
-
const workspaceDeps = project.deps.all.filter(
|
|
35762
|
-
(d) => d.version === "workspace:*"
|
|
35763
|
-
);
|
|
35764
|
-
workspaceDeps.forEach((dep) => {
|
|
35765
|
-
const subproject = project.root.subprojects.find((p) => p.package.packageName === dep.name);
|
|
35766
|
-
if (!subproject) {
|
|
35767
|
-
throw new Error(`Could not find subproject ${dep.name} in monorepo.`);
|
|
35768
|
-
}
|
|
35769
|
-
tsPaths = {
|
|
35770
|
-
...tsPaths,
|
|
35771
|
-
[dep.name]: [
|
|
35772
|
-
(0, import_path2.ensureRelativePathStartsWithDot)(
|
|
35773
|
-
(0, import_node_path2.relative)(project.outdir, subproject.outdir)
|
|
35774
|
-
)
|
|
35775
|
-
]
|
|
35776
|
-
};
|
|
35777
|
-
});
|
|
35778
|
-
project.tsconfig?.file.addOverride("compilerOptions.paths", tsPaths);
|
|
35779
|
-
project.tsconfigDev?.file.addOverride("compilerOptions.paths", tsPaths);
|
|
35780
|
-
}
|
|
35781
|
-
};
|
|
35782
35866
|
// Annotate the CommonJS export names for ESM import in node:
|
|
35783
35867
|
0 && (module.exports = {
|
|
35784
35868
|
AGENT_MODEL,
|
|
@@ -35892,6 +35976,7 @@ var TypeScriptConfig = class extends import_projen27.Component {
|
|
|
35892
35976
|
TIER_AWARE_BUNDLE_NAMES,
|
|
35893
35977
|
TestRunner,
|
|
35894
35978
|
TsDocCoverageKind,
|
|
35979
|
+
TsdocConfig,
|
|
35895
35980
|
TurboRepo,
|
|
35896
35981
|
TurboRepoTask,
|
|
35897
35982
|
TypeScriptConfig,
|