This repository was archived by the owner on Mar 30, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,10 +6,15 @@ import { PlatformModuleType } from "./PlatformModuleType.ts";
66export class TestModuleType extends StringType {
77 async complete ( ) : Promise < string [ ] > {
88 const repo = await CollieRepository . load ( ) ;
9+ const excludes = {
10+ testModules : false ,
11+ tenantModules : true ,
12+ } ;
13+
914 const modules = await repo . processFilesGlob (
1015 "foundations/*/platforms/**/*.test/terragrunt.hcl" ,
1116 ( file ) => PlatformModuleType . parseModuleId ( file . path ) ,
12- false ,
17+ excludes ,
1318 ) ;
1419
1520 // I don't know how we could get the foundation name passed to the arg to filter
Original file line number Diff line number Diff line change @@ -170,10 +170,15 @@ export class PlatformDeployer<T extends PlatformConfig> {
170170 }
171171
172172 private async testModuleTerragruntFiles ( relativeModulePath : string ) {
173+ const excludes = {
174+ testModules : false ,
175+ tenantModules : true ,
176+ } ;
177+
173178 const files = await this . repo . processFilesGlob (
174179 `${ relativeModulePath } /${ TEST_MODULE_GLOB } /terragrunt.hcl` ,
175180 ( file ) => file ,
176- false ,
181+ excludes ,
177182 ) ;
178183
179184 // a terragrunt stack conists of multiple executable terragrunt files
Original file line number Diff line number Diff line change @@ -61,9 +61,14 @@ export class KitDependencyAnalyzer {
6161 this . logger ,
6262 ) ;
6363
64+ const excludes = {
65+ tenantModules : true ,
66+ testModules : true ,
67+ } ;
6468 const q = await this . collie . processFilesGlob (
6569 `${ relativePlatformPath } /**/terragrunt.hcl` ,
6670 ( file ) => this . tryParseDependency ( file . path ) ,
71+ excludes ,
6772 ) ;
6873
6974 const all = await Promise . all ( q ) ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as fs from "std/fs";
22import * as path from "std/path" ;
33
44export const TEST_MODULE_GLOB = "**/*.test" ;
5+ export const TENANT_MODULE_GLOB = "**/tenants" ;
56
67export class CollieRepository {
78 private constructor ( private readonly repoDir : string ) {
@@ -52,7 +53,13 @@ export class CollieRepository {
5253 async processFilesGlob < T > (
5354 pattern : string ,
5455 process : ( file : fs . WalkEntry ) => T | undefined ,
55- excludeTestModules = true ,
56+ excludes : {
57+ testModules : boolean ;
58+ tenantModules : boolean ;
59+ } = {
60+ testModules : true ,
61+ tenantModules : false ,
62+ } ,
5663 ) : Promise < T [ ] > {
5764 const q : T [ ] = [ ] ;
5865 for await (
@@ -70,7 +77,8 @@ export class CollieRepository {
7077 "kit/**/modules" , // exclude sub-modules
7178 "kit/**/template" , // exclude template files
7279
73- ...( excludeTestModules ? [ TEST_MODULE_GLOB ] : [ ] ) ,
80+ ...( excludes . testModules ? [ TEST_MODULE_GLOB ] : [ ] ) ,
81+ ...( excludes . tenantModules ? [ TENANT_MODULE_GLOB ] : [ ] ) ,
7482 ] ,
7583 } )
7684 ) {
You can’t perform that action at this time.
0 commit comments