@baseplate-dev/project-builder-server 0.3.8 → 0.4.1

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.
Files changed (146) hide show
  1. package/dist/actions/diff/diff-project.action.js +1 -1
  2. package/dist/actions/diff/diff-project.action.js.map +1 -1
  3. package/dist/actions/snapshot/snapshot-add.action.d.ts.map +1 -1
  4. package/dist/actions/snapshot/snapshot-add.action.js +3 -3
  5. package/dist/actions/snapshot/snapshot-add.action.js.map +1 -1
  6. package/dist/actions/snapshot/snapshot-remove.action.d.ts.map +1 -1
  7. package/dist/actions/snapshot/snapshot-remove.action.js +3 -3
  8. package/dist/actions/snapshot/snapshot-remove.action.js.map +1 -1
  9. package/dist/actions/snapshot/snapshot-save.action.d.ts.map +1 -1
  10. package/dist/actions/snapshot/snapshot-save.action.js +3 -3
  11. package/dist/actions/snapshot/snapshot-save.action.js.map +1 -1
  12. package/dist/actions/snapshot/snapshot-show.action.d.ts.map +1 -1
  13. package/dist/actions/snapshot/snapshot-show.action.js +2 -2
  14. package/dist/actions/snapshot/snapshot-show.action.js.map +1 -1
  15. package/dist/actions/sync/sync-all-projects.action.d.ts.map +1 -1
  16. package/dist/actions/sync/sync-all-projects.action.js +2 -2
  17. package/dist/actions/sync/sync-all-projects.action.js.map +1 -1
  18. package/dist/actions/sync/sync-project.action.d.ts.map +1 -1
  19. package/dist/actions/sync/sync-project.action.js +2 -2
  20. package/dist/actions/sync/sync-project.action.js.map +1 -1
  21. package/dist/actions/types.d.ts +4 -13
  22. package/dist/actions/types.d.ts.map +1 -1
  23. package/dist/actions/types.js.map +1 -1
  24. package/dist/actions/utils/index.d.ts +1 -0
  25. package/dist/actions/utils/index.d.ts.map +1 -1
  26. package/dist/actions/utils/index.js +1 -0
  27. package/dist/actions/utils/index.js.map +1 -1
  28. package/dist/actions/utils/is-example-project.d.ts +7 -0
  29. package/dist/actions/utils/is-example-project.d.ts.map +1 -0
  30. package/dist/actions/utils/is-example-project.js +22 -0
  31. package/dist/actions/utils/is-example-project.js.map +1 -0
  32. package/dist/actions/utils/project-discovery.d.ts +5 -5
  33. package/dist/actions/utils/project-discovery.d.ts.map +1 -1
  34. package/dist/actions/utils/project-discovery.js +5 -2
  35. package/dist/actions/utils/project-discovery.js.map +1 -1
  36. package/dist/actions/utils/projects.d.ts +2 -2
  37. package/dist/actions/utils/projects.d.ts.map +1 -1
  38. package/dist/actions/utils/projects.js.map +1 -1
  39. package/dist/api/index.d.ts +1 -1
  40. package/dist/api/projects.d.ts +2 -6
  41. package/dist/api/projects.d.ts.map +1 -1
  42. package/dist/api/projects.js +1 -30
  43. package/dist/api/projects.js.map +1 -1
  44. package/dist/compiler/app-compiler.d.ts +9 -0
  45. package/dist/compiler/app-compiler.d.ts.map +1 -0
  46. package/dist/compiler/app-compiler.js +18 -0
  47. package/dist/compiler/app-compiler.js.map +1 -0
  48. package/dist/compiler/app-entry-builder.d.ts +4 -3
  49. package/dist/compiler/app-entry-builder.d.ts.map +1 -1
  50. package/dist/compiler/app-entry-builder.js +4 -4
  51. package/dist/compiler/app-entry-builder.js.map +1 -1
  52. package/dist/compiler/backend/backend-compiler.d.ts +17 -0
  53. package/dist/compiler/backend/backend-compiler.d.ts.map +1 -0
  54. package/dist/compiler/backend/backend-compiler.js +40 -0
  55. package/dist/compiler/backend/backend-compiler.js.map +1 -0
  56. package/dist/compiler/backend/fastify.d.ts.map +1 -1
  57. package/dist/compiler/backend/fastify.js +6 -4
  58. package/dist/compiler/backend/fastify.js.map +1 -1
  59. package/dist/compiler/backend/graphql.d.ts.map +1 -1
  60. package/dist/compiler/backend/graphql.js +5 -6
  61. package/dist/compiler/backend/graphql.js.map +1 -1
  62. package/dist/compiler/backend/index.d.ts +1 -2
  63. package/dist/compiler/backend/index.d.ts.map +1 -1
  64. package/dist/compiler/backend/index.js +1 -33
  65. package/dist/compiler/backend/index.js.map +1 -1
  66. package/dist/compiler/backend/services.d.ts.map +1 -1
  67. package/dist/compiler/backend/services.js +50 -48
  68. package/dist/compiler/backend/services.js.map +1 -1
  69. package/dist/compiler/compile-packages.d.ts +13 -0
  70. package/dist/compiler/compile-packages.d.ts.map +1 -0
  71. package/dist/compiler/compile-packages.js +53 -0
  72. package/dist/compiler/compile-packages.js.map +1 -0
  73. package/dist/compiler/index.d.ts +2 -2
  74. package/dist/compiler/index.d.ts.map +1 -1
  75. package/dist/compiler/index.js +2 -26
  76. package/dist/compiler/index.js.map +1 -1
  77. package/dist/compiler/infrastructure-utils.d.ts +36 -0
  78. package/dist/compiler/infrastructure-utils.d.ts.map +1 -0
  79. package/dist/compiler/infrastructure-utils.js +39 -0
  80. package/dist/compiler/infrastructure-utils.js.map +1 -0
  81. package/dist/compiler/package-compiler.d.ts +84 -0
  82. package/dist/compiler/package-compiler.d.ts.map +1 -0
  83. package/dist/compiler/package-compiler.js +67 -0
  84. package/dist/compiler/package-compiler.js.map +1 -0
  85. package/dist/compiler/package-entry.d.ts +18 -0
  86. package/dist/compiler/package-entry.d.ts.map +1 -0
  87. package/dist/compiler/package-entry.js +2 -0
  88. package/dist/compiler/package-entry.js.map +1 -0
  89. package/dist/compiler/root/index.d.ts +2 -0
  90. package/dist/compiler/root/index.d.ts.map +1 -0
  91. package/dist/compiler/root/index.js +2 -0
  92. package/dist/compiler/root/index.js.map +1 -0
  93. package/dist/compiler/root/root-package-compiler.d.ts +23 -0
  94. package/dist/compiler/root/root-package-compiler.d.ts.map +1 -0
  95. package/dist/compiler/root/root-package-compiler.js +149 -0
  96. package/dist/compiler/root/root-package-compiler.js.map +1 -0
  97. package/dist/compiler/web/index.d.ts +1 -2
  98. package/dist/compiler/web/index.d.ts.map +1 -1
  99. package/dist/compiler/web/index.js +1 -124
  100. package/dist/compiler/web/index.js.map +1 -1
  101. package/dist/compiler/web/web-compiler.d.ts +19 -0
  102. package/dist/compiler/web/web-compiler.d.ts.map +1 -0
  103. package/dist/compiler/web/web-compiler.js +156 -0
  104. package/dist/compiler/web/web-compiler.js.map +1 -0
  105. package/dist/dev-server/api/router.d.ts +6 -6
  106. package/dist/diff/diff-project.d.ts +3 -2
  107. package/dist/diff/diff-project.d.ts.map +1 -1
  108. package/dist/diff/diff-project.js +9 -52
  109. package/dist/diff/diff-project.js.map +1 -1
  110. package/dist/diff/snapshot/create-snapshot-for-project.d.ts.map +1 -1
  111. package/dist/diff/snapshot/create-snapshot-for-project.js +4 -4
  112. package/dist/diff/snapshot/create-snapshot-for-project.js.map +1 -1
  113. package/dist/diff/snapshot/snapshot-management.d.ts.map +1 -1
  114. package/dist/diff/snapshot/snapshot-management.js +3 -3
  115. package/dist/diff/snapshot/snapshot-management.js.map +1 -1
  116. package/dist/plugins/node-plugin-store.d.ts +2 -2
  117. package/dist/plugins/node-plugin-store.d.ts.map +1 -1
  118. package/dist/plugins/node-plugin-store.js +4 -2
  119. package/dist/plugins/node-plugin-store.js.map +1 -1
  120. package/dist/project-definition/get-single-app-directory-for-project.d.ts.map +1 -1
  121. package/dist/project-definition/get-single-app-directory-for-project.js +2 -1
  122. package/dist/project-definition/get-single-app-directory-for-project.js.map +1 -1
  123. package/dist/server/builder-service-manager.d.ts +2 -1
  124. package/dist/server/builder-service-manager.d.ts.map +1 -1
  125. package/dist/server/builder-service-manager.js +5 -8
  126. package/dist/server/builder-service-manager.js.map +1 -1
  127. package/dist/service/builder-service.d.ts +6 -6
  128. package/dist/service/builder-service.d.ts.map +1 -1
  129. package/dist/service/builder-service.js +9 -7
  130. package/dist/service/builder-service.js.map +1 -1
  131. package/dist/sync/generate-for-directory.d.ts +2 -2
  132. package/dist/sync/generate-for-directory.d.ts.map +1 -1
  133. package/dist/sync/generate-for-directory.js +3 -3
  134. package/dist/sync/generate-for-directory.js.map +1 -1
  135. package/dist/sync/generator-steps-writer.js +1 -1
  136. package/dist/sync/generator-steps-writer.js.map +1 -1
  137. package/dist/sync/sync-project.js +3 -3
  138. package/dist/sync/sync-project.js.map +1 -1
  139. package/dist/sync/types.d.ts.map +1 -1
  140. package/dist/sync/types.js +3 -2
  141. package/dist/sync/types.js.map +1 -1
  142. package/package.json +8 -8
  143. package/dist/compiler/backend/utils.d.ts +0 -16
  144. package/dist/compiler/backend/utils.d.ts.map +0 -1
  145. package/dist/compiler/backend/utils.js +0 -17
  146. package/dist/compiler/backend/utils.js.map +0 -1
@@ -0,0 +1,53 @@
1
+ import { ProjectDefinitionContainer } from '@baseplate-dev/project-builder-lib';
2
+ import { sortBy } from 'es-toolkit';
3
+ import { BackendPackageCompiler } from './backend/index.js';
4
+ import { RootPackageCompiler } from './root/index.js';
5
+ import { WebPackageCompiler } from './web/index.js';
6
+ /**
7
+ * Create a package compiler instance based on app type
8
+ *
9
+ * @param definitionContainer - The project definition container
10
+ * @param app - The app configuration
11
+ * @returns PackageCompiler instance for the app type
12
+ */
13
+ function createAppCompiler(definitionContainer, app) {
14
+ switch (app.type) {
15
+ case 'backend': {
16
+ return new BackendPackageCompiler(definitionContainer, app);
17
+ }
18
+ case 'web': {
19
+ return new WebPackageCompiler(definitionContainer, app);
20
+ }
21
+ default: {
22
+ throw new Error(`Unknown app type: ${app.type}`);
23
+ }
24
+ }
25
+ }
26
+ /**
27
+ * Compile all packages in a project definition
28
+ *
29
+ * Root package is compiled first, then backend apps, then other apps.
30
+ *
31
+ * @param projectJson - Serialized project definition JSON
32
+ * @param context - Schema parser context
33
+ * @returns Array of compiled package entries with generator bundles (root first, then apps)
34
+ */
35
+ export function compilePackages(projectJson, context) {
36
+ const definitionContainer = ProjectDefinitionContainer.fromSerializedConfig(projectJson, context);
37
+ const appConfigs = sortBy(definitionContainer.definition.apps, [
38
+ (a) => (a.type === 'backend' ? 0 : 1),
39
+ (a) => a.name,
40
+ ]);
41
+ // Instantiate all package compilers
42
+ const compilers = [
43
+ new RootPackageCompiler(definitionContainer),
44
+ ...appConfigs.map((app) => createAppCompiler(definitionContainer, app)),
45
+ ];
46
+ const compilerContext = {
47
+ compilers,
48
+ };
49
+ // Compile all packages
50
+ const packages = compilers.map((compiler) => compiler.compile(compilerContext));
51
+ return packages;
52
+ }
53
+ //# sourceMappingURL=compile-packages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile-packages.js","sourceRoot":"","sources":["../../src/compiler/compile-packages.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAQpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;;GAMG;AACH,SAAS,iBAAiB,CACxB,mBAA+C,EAC/C,GAAc;IAEd,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,SAAS,CAAC,CAAC,CAAC;YACf,OAAO,IAAI,sBAAsB,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;QAC9D,CAAC;QACD,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,OAAO,IAAI,kBAAkB,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,IAAI,KAAK,CAAC,qBAAsB,GAAiB,CAAC,IAAI,EAAE,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,WAAoB,EACpB,OAA4B;IAE5B,MAAM,mBAAmB,GAAG,0BAA0B,CAAC,oBAAoB,CACzE,WAAW,EACX,OAAO,CACR,CAAC;IAEF,MAAM,UAAU,GAAG,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAAC,IAAI,EAAE;QAC7D,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI;KACd,CAAC,CAAC;IAEH,oCAAoC;IACpC,MAAM,SAAS,GAAG;QAChB,IAAI,mBAAmB,CAAC,mBAAmB,CAAC;QAC5C,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;KACxE,CAAC;IAEF,MAAM,eAAe,GAA2B;QAC9C,SAAS;KACV,CAAC;IAEF,uBAAuB;IACvB,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC1C,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,CAClC,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { AppEntry, SchemaParserContext } from '@baseplate-dev/project-builder-lib';
2
- export declare function compileApplications(projectJson: unknown, context: SchemaParserContext): AppEntry[];
1
+ export { compilePackages } from './compile-packages.js';
2
+ export * from './root/index.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compiler/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EAER,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAQ5C,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,mBAAmB,GAC3B,QAAQ,EAAE,CAwBZ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compiler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,iBAAiB,CAAC"}
@@ -1,27 +1,3 @@
1
- import { ProjectDefinitionContainer } from '@baseplate-dev/project-builder-lib';
2
- import { sortBy } from 'es-toolkit';
3
- import { compileBackend } from './backend/index.js';
4
- import { compileWeb } from './web/index.js';
5
- export function compileApplications(projectJson, context) {
6
- const definitionContainer = ProjectDefinitionContainer.fromSerializedConfig(projectJson, context);
7
- // Compile backend app first since it's likely the dependency for the other apps
8
- const appConfigs = sortBy(definitionContainer.definition.apps, [
9
- (a) => (a.type === 'backend' ? 0 : 1),
10
- (a) => a.name,
11
- ]);
12
- const apps = appConfigs.map((app) => {
13
- switch (app.type) {
14
- case 'backend': {
15
- return compileBackend(definitionContainer, app);
16
- }
17
- case 'web': {
18
- return compileWeb(definitionContainer, app);
19
- }
20
- default: {
21
- throw new Error(`Unknown app type: ${app.type}`);
22
- }
23
- }
24
- });
25
- return apps;
26
- }
1
+ export { compilePackages } from './compile-packages.js';
2
+ export * from './root/index.js';
27
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/compiler/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,UAAU,mBAAmB,CACjC,WAAoB,EACpB,OAA4B;IAE5B,MAAM,mBAAmB,GAAG,0BAA0B,CAAC,oBAAoB,CACzE,WAAW,EACX,OAAO,CACR,CAAC;IACF,gFAAgF;IAChF,MAAM,UAAU,GAAG,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAAC,IAAI,EAAE;QAC7D,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI;KACd,CAAC,CAAC;IACH,MAAM,IAAI,GAAe,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAC9C,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;YACjB,KAAK,SAAS,CAAC,CAAC,CAAC;gBACf,OAAO,cAAc,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;YAClD,CAAC;YACD,KAAK,KAAK,CAAC,CAAC,CAAC;gBACX,OAAO,UAAU,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;YAC9C,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,IAAI,KAAK,CAAC,qBAAsB,GAAqB,CAAC,IAAI,EAAE,CAAC,CAAC;YACtE,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/compiler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { ProjectDefinition } from '@baseplate-dev/project-builder-lib';
2
+ /**
3
+ * Get PostgreSQL database settings from project definition
4
+ *
5
+ * @param projectDefinition - The project definition containing infrastructure settings
6
+ * @returns PostgreSQL configuration and connection URL
7
+ */
8
+ export declare function getPostgresSettings(projectDefinition: ProjectDefinition): {
9
+ config: {
10
+ port: number;
11
+ password: string;
12
+ database: string;
13
+ };
14
+ url: string;
15
+ };
16
+ /**
17
+ * Get Redis settings from project definition
18
+ *
19
+ * @param projectDefinition - The project definition containing infrastructure settings
20
+ * @returns Redis configuration and connection URL
21
+ */
22
+ export declare function getRedisSettings(projectDefinition: ProjectDefinition): {
23
+ config: {
24
+ port: number;
25
+ password: string;
26
+ };
27
+ url: string;
28
+ };
29
+ /**
30
+ * Check if Redis is enabled in the project infrastructure settings
31
+ *
32
+ * @param projectDefinition - The project definition containing infrastructure settings
33
+ * @returns True if Redis is enabled
34
+ */
35
+ export declare function isRedisEnabled(projectDefinition: ProjectDefinition): boolean;
36
+ //# sourceMappingURL=infrastructure-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infrastructure-utils.d.ts","sourceRoot":"","sources":["../../src/compiler/infrastructure-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAE5E;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG;IACzE,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;CACb,CASA;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG;IACtE,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;CACb,CAQA;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAE5E"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Get PostgreSQL database settings from project definition
3
+ *
4
+ * @param projectDefinition - The project definition containing infrastructure settings
5
+ * @returns PostgreSQL configuration and connection URL
6
+ */
7
+ export function getPostgresSettings(projectDefinition) {
8
+ const port = projectDefinition.settings.general.portOffset + 432;
9
+ const password = `${projectDefinition.settings.general.name}-password`;
10
+ const database = projectDefinition.settings.general.name;
11
+ return {
12
+ config: { port, password, database },
13
+ url: `postgres://postgres:${password}@localhost:${port}/${database}?schema=public`,
14
+ };
15
+ }
16
+ /**
17
+ * Get Redis settings from project definition
18
+ *
19
+ * @param projectDefinition - The project definition containing infrastructure settings
20
+ * @returns Redis configuration and connection URL
21
+ */
22
+ export function getRedisSettings(projectDefinition) {
23
+ const port = projectDefinition.settings.general.portOffset + 379;
24
+ const password = `${projectDefinition.settings.general.name}-password`;
25
+ return {
26
+ config: { port, password },
27
+ url: `redis://:${password}@localhost:${port}`,
28
+ };
29
+ }
30
+ /**
31
+ * Check if Redis is enabled in the project infrastructure settings
32
+ *
33
+ * @param projectDefinition - The project definition containing infrastructure settings
34
+ * @returns True if Redis is enabled
35
+ */
36
+ export function isRedisEnabled(projectDefinition) {
37
+ return projectDefinition.settings.infrastructure?.redis?.enabled ?? false;
38
+ }
39
+ //# sourceMappingURL=infrastructure-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infrastructure-utils.js","sourceRoot":"","sources":["../../src/compiler/infrastructure-utils.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,iBAAoC;IAQtE,MAAM,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,GAAG,GAAG,CAAC;IACjE,MAAM,QAAQ,GAAG,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC;IACvE,MAAM,QAAQ,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;IAEzD,OAAO;QACL,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE;QACpC,GAAG,EAAE,uBAAuB,QAAQ,cAAc,IAAI,IAAI,QAAQ,gBAAgB;KACnF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAoC;IAOnE,MAAM,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,GAAG,GAAG,CAAC;IACjE,MAAM,QAAQ,GAAG,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC;IAEvE,OAAO;QACL,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC1B,GAAG,EAAE,YAAY,QAAQ,cAAc,IAAI,EAAE;KAC9C,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,iBAAoC;IACjE,OAAO,iBAAiB,CAAC,QAAQ,CAAC,cAAc,EAAE,KAAK,EAAE,OAAO,IAAI,KAAK,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,84 @@
1
+ import type { AppEntryType, BaseAppConfig, ProjectDefinitionContainer } from '@baseplate-dev/project-builder-lib';
2
+ import type { PackageEntry } from './package-entry.js';
3
+ import { AppEntryBuilder } from './app-entry-builder.js';
4
+ export interface PackageTasks {
5
+ build: string[];
6
+ dev: string[];
7
+ watch: string[];
8
+ }
9
+ export interface PackageCompilerContext {
10
+ compilers: PackageCompiler[];
11
+ }
12
+ /**
13
+ * Abstract base class for package type compilers
14
+ *
15
+ * Each package type (backend, web, library, etc.) extends this class
16
+ * to define how it should be compiled into a PackageEntry with generator bundles.
17
+ *
18
+ * Each child class defines its own constructor requirements based on what
19
+ * information it needs (e.g., app config, definition container).
20
+ */
21
+ export declare abstract class PackageCompiler {
22
+ protected readonly definitionContainer: ProjectDefinitionContainer;
23
+ constructor(definitionContainer: ProjectDefinitionContainer);
24
+ /**
25
+ * Compile a package configuration into a PackageEntry with generator bundle
26
+ *
27
+ * @returns PackageEntry with generated bundle ready for sync
28
+ */
29
+ abstract compile(context: PackageCompilerContext): PackageEntry;
30
+ /**
31
+ * Get the formatted package name (e.g., '@scope/backend' or 'project-backend')
32
+ *
33
+ * @returns Formatted package name
34
+ */
35
+ abstract getPackageName(): string;
36
+ /**
37
+ * Get the package directory path relative to monorepo root
38
+ *
39
+ * @returns Package directory path (e.g., 'apps/backend', '.')
40
+ */
41
+ abstract getPackageDirectory(): string;
42
+ /**
43
+ * Get the tasks for a package used in turbo configuration
44
+ *
45
+ * @returns Object with build, dev, and watch tasks
46
+ */
47
+ getTasks(): PackageTasks;
48
+ }
49
+ /**
50
+ * Build a package name following monorepo naming conventions
51
+ *
52
+ * If packageScope is set, creates scoped package: @scope/name
53
+ * Otherwise, creates prefixed package: project-name
54
+ *
55
+ * @param generalSettings - Project general settings
56
+ * @param packageName - The app/package name
57
+ * @returns Formatted package name
58
+ *
59
+ * @example
60
+ * ```typescript
61
+ * buildPackageName({ name: 'blog', packageScope: 'acme' }, 'backend')
62
+ * // Returns: '@acme/backend'
63
+ *
64
+ * buildPackageName({ name: 'blog', packageScope: '' }, 'backend')
65
+ * // Returns: 'blog-backend'
66
+ * ```
67
+ */
68
+ export declare function buildPackageName(generalSettings: {
69
+ name: string;
70
+ packageScope: string;
71
+ }, packageName: string): string;
72
+ /**
73
+ * Create an AppEntryBuilder for a package
74
+ *
75
+ * The AppEntryBuilder manages the AppCompiler state and plugin coordination
76
+ * for the package compilation process.
77
+ *
78
+ * @param definitionContainer - The project definition container
79
+ * @param appConfig - The package configuration
80
+ * @param appConfigType - The package type marker (backend, web, etc.)
81
+ * @returns Configured AppEntryBuilder instance
82
+ */
83
+ export declare function createAppEntryBuilderForPackage<TAppConfig extends BaseAppConfig>(definitionContainer: ProjectDefinitionContainer, appConfig: TAppConfig, appConfigType: AppEntryType<TAppConfig>): AppEntryBuilder<TAppConfig>;
84
+ //# sourceMappingURL=package-compiler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-compiler.d.ts","sourceRoot":"","sources":["../../src/compiler/package-compiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,0BAA0B,EAC3B,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,eAAe,EAAE,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,8BAAsB,eAAe;IACnC,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,0BAA0B,CAAC;gBAEvD,mBAAmB,EAAE,0BAA0B;IAG3D;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,sBAAsB,GAAG,YAAY;IAE/D;;;;OAIG;IACH,QAAQ,CAAC,cAAc,IAAI,MAAM;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,IAAI,MAAM;IAEtC;;;;OAIG;IACH,QAAQ,IAAI,YAAY;CAOzB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,EACvD,WAAW,EAAE,MAAM,GAClB,MAAM,CAIR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAC7C,UAAU,SAAS,aAAa,EAEhC,mBAAmB,EAAE,0BAA0B,EAC/C,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,YAAY,CAAC,UAAU,CAAC,GACtC,eAAe,CAAC,UAAU,CAAC,CAE7B"}
@@ -0,0 +1,67 @@
1
+ import { AppEntryBuilder } from './app-entry-builder.js';
2
+ /**
3
+ * Abstract base class for package type compilers
4
+ *
5
+ * Each package type (backend, web, library, etc.) extends this class
6
+ * to define how it should be compiled into a PackageEntry with generator bundles.
7
+ *
8
+ * Each child class defines its own constructor requirements based on what
9
+ * information it needs (e.g., app config, definition container).
10
+ */
11
+ export class PackageCompiler {
12
+ definitionContainer;
13
+ constructor(definitionContainer) {
14
+ this.definitionContainer = definitionContainer;
15
+ }
16
+ /**
17
+ * Get the tasks for a package used in turbo configuration
18
+ *
19
+ * @returns Object with build, dev, and watch tasks
20
+ */
21
+ getTasks() {
22
+ return {
23
+ build: [],
24
+ dev: [],
25
+ watch: [],
26
+ };
27
+ }
28
+ }
29
+ /**
30
+ * Build a package name following monorepo naming conventions
31
+ *
32
+ * If packageScope is set, creates scoped package: @scope/name
33
+ * Otherwise, creates prefixed package: project-name
34
+ *
35
+ * @param generalSettings - Project general settings
36
+ * @param packageName - The app/package name
37
+ * @returns Formatted package name
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * buildPackageName({ name: 'blog', packageScope: 'acme' }, 'backend')
42
+ * // Returns: '@acme/backend'
43
+ *
44
+ * buildPackageName({ name: 'blog', packageScope: '' }, 'backend')
45
+ * // Returns: 'blog-backend'
46
+ * ```
47
+ */
48
+ export function buildPackageName(generalSettings, packageName) {
49
+ return generalSettings.packageScope
50
+ ? `@${generalSettings.packageScope}/${packageName}`
51
+ : `${generalSettings.name}-${packageName}`;
52
+ }
53
+ /**
54
+ * Create an AppEntryBuilder for a package
55
+ *
56
+ * The AppEntryBuilder manages the AppCompiler state and plugin coordination
57
+ * for the package compilation process.
58
+ *
59
+ * @param definitionContainer - The project definition container
60
+ * @param appConfig - The package configuration
61
+ * @param appConfigType - The package type marker (backend, web, etc.)
62
+ * @returns Configured AppEntryBuilder instance
63
+ */
64
+ export function createAppEntryBuilderForPackage(definitionContainer, appConfig, appConfigType) {
65
+ return new AppEntryBuilder(definitionContainer, appConfig, appConfigType);
66
+ }
67
+ //# sourceMappingURL=package-compiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-compiler.js","sourceRoot":"","sources":["../../src/compiler/package-compiler.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAYzD;;;;;;;;GAQG;AACH,MAAM,OAAgB,eAAe;IAChB,mBAAmB,CAA6B;IAEnE,YAAY,mBAA+C;QACzD,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACjD,CAAC;IAsBD;;;;OAIG;IACH,QAAQ;QACN,OAAO;YACL,KAAK,EAAE,EAAE;YACT,GAAG,EAAE,EAAE;YACP,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,eAAuD,EACvD,WAAmB;IAEnB,OAAO,eAAe,CAAC,YAAY;QACjC,CAAC,CAAC,IAAI,eAAe,CAAC,YAAY,IAAI,WAAW,EAAE;QACnD,CAAC,CAAC,GAAG,eAAe,CAAC,IAAI,IAAI,WAAW,EAAE,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,+BAA+B,CAG7C,mBAA+C,EAC/C,SAAqB,EACrB,aAAuC;IAEvC,OAAO,IAAI,eAAe,CAAC,mBAAmB,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { GeneratorBundle } from '@baseplate-dev/sync';
2
+ /**
3
+ * Represents a compiled package entry (app or root package) ready for code generation
4
+ *
5
+ * A PackageEntry contains all information needed to generate code for a single
6
+ * package in the monorepo, including its generator bundle and target directory.
7
+ */
8
+ export interface PackageEntry {
9
+ /** Unique identifier for the package */
10
+ id: string;
11
+ /** Package name */
12
+ name: string;
13
+ /** Relative directory path from project root (e.g., 'apps/backend', '.') */
14
+ packageDirectory: string;
15
+ /** Generator bundle containing all generation tasks for this package */
16
+ generatorBundle: GeneratorBundle;
17
+ }
18
+ //# sourceMappingURL=package-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-entry.d.ts","sourceRoot":"","sources":["../../src/compiler/package-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,gBAAgB,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,eAAe,EAAE,eAAe,CAAC;CAClC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=package-entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-entry.js","sourceRoot":"","sources":["../../src/compiler/package-entry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './root-package-compiler.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compiler/root/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './root-package-compiler.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/compiler/root/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { PackageCompilerContext } from '../package-compiler.js';
2
+ import type { PackageEntry } from '../package-entry.js';
3
+ import { PackageCompiler } from '../package-compiler.js';
4
+ /**
5
+ * Compiler for monorepo root package
6
+ *
7
+ * Generates:
8
+ * - package.json with workspace scripts
9
+ * - pnpm-workspace.yaml with workspace patterns
10
+ * - Docker Compose configuration (Postgres, optional Redis)
11
+ * - Basic tooling (prettier, gitignore)
12
+ *
13
+ * Does NOT include:
14
+ * - TypeScript/tsconfig (no code in root)
15
+ * - ESLint
16
+ * - Vitest (no tests in root)
17
+ */
18
+ export declare class RootPackageCompiler extends PackageCompiler {
19
+ compile(context: PackageCompilerContext): PackageEntry;
20
+ getPackageName(): string;
21
+ getPackageDirectory(): string;
22
+ }
23
+ //# sourceMappingURL=root-package-compiler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-package-compiler.d.ts","sourceRoot":"","sources":["../../../src/compiler/root/root-package-compiler.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAOxD,OAAO,EAAoB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAmB3E;;;;;;;;;;;;;GAaG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,OAAO,CAAC,OAAO,EAAE,sBAAsB,GAAG,YAAY;IAgHtD,cAAc,IAAI,MAAM;IAMxB,mBAAmB,IAAI,MAAM;CAG9B"}
@@ -0,0 +1,149 @@
1
+ import { dockerComposeGenerator, nodeGenerator, nodeGitIgnoreGenerator, pathRootsGenerator, pnpmWorkspaceGenerator, prettierGenerator, rootReadmeGenerator, turboGenerator, } from '@baseplate-dev/core-generators';
2
+ import { uniq } from 'es-toolkit';
3
+ import { getPostgresSettings, getRedisSettings, isRedisEnabled, } from '../infrastructure-utils.js';
4
+ import { buildPackageName, PackageCompiler } from '../package-compiler.js';
5
+ /**
6
+ * Build Docker Compose configuration at root level
7
+ *
8
+ * Always includes Postgres, optionally includes Redis if enabled in infrastructure settings
9
+ *
10
+ * @param projectDefinition - The project definition containing infrastructure settings
11
+ * @returns Generator bundle for Docker Compose
12
+ */
13
+ function buildDocker(projectDefinition) {
14
+ return dockerComposeGenerator({
15
+ postgres: getPostgresSettings(projectDefinition).config,
16
+ ...(isRedisEnabled(projectDefinition)
17
+ ? { redis: getRedisSettings(projectDefinition).config }
18
+ : {}),
19
+ });
20
+ }
21
+ /**
22
+ * Compiler for monorepo root package
23
+ *
24
+ * Generates:
25
+ * - package.json with workspace scripts
26
+ * - pnpm-workspace.yaml with workspace patterns
27
+ * - Docker Compose configuration (Postgres, optional Redis)
28
+ * - Basic tooling (prettier, gitignore)
29
+ *
30
+ * Does NOT include:
31
+ * - TypeScript/tsconfig (no code in root)
32
+ * - ESLint
33
+ * - Vitest (no tests in root)
34
+ */
35
+ export class RootPackageCompiler extends PackageCompiler {
36
+ compile(context) {
37
+ const projectDefinition = this.definitionContainer.definition;
38
+ const generalSettings = projectDefinition.settings.general;
39
+ const monorepoSettings = projectDefinition.settings.monorepo;
40
+ // Build workspace patterns from monorepo settings
41
+ const appsFolder = monorepoSettings?.appsFolder ?? 'apps';
42
+ const workspacePackages = [`${appsFolder}/*`];
43
+ const tasks = context.compilers.map((compiler) => compiler.getTasks());
44
+ const mergedTasks = {
45
+ dev: uniq(tasks.flatMap((task) => task.dev)),
46
+ build: uniq(tasks.flatMap((task) => task.build)),
47
+ watch: uniq(tasks.flatMap((task) => task.watch)),
48
+ };
49
+ const turboTasks = [
50
+ ...mergedTasks.dev.map((task) => ({
51
+ name: task,
52
+ persistent: true,
53
+ cache: false,
54
+ })),
55
+ ...mergedTasks.build.map((task) => ({
56
+ inputs: ['$TURBO_DEFAULT$', '!README.md', '!**/*.test.ts'],
57
+ outputs: ['build/**', 'dist/**', '.next/**', '!.next/cache/**'],
58
+ name: task,
59
+ persistent: false,
60
+ })),
61
+ ...mergedTasks.watch.map((task) => ({
62
+ name: task,
63
+ persistent: true,
64
+ cache: false,
65
+ })),
66
+ { name: 'typecheck' },
67
+ { name: 'lint', dependsOn: ['^build'], outputLogs: 'new-only' },
68
+ { name: 'test', dependsOn: ['^build'], outputLogs: 'errors-only' },
69
+ { name: 'prettier:check' },
70
+ { name: 'prettier:check:root' },
71
+ { name: 'prettier:write', cache: false },
72
+ { name: 'prettier:write:root', cache: false },
73
+ ];
74
+ const devTasks = mergedTasks.dev.join(' ');
75
+ const buildTasks = mergedTasks.build.join(' ');
76
+ const watchTasks = mergedTasks.watch.join(' ');
77
+ const { cliVersion } = this.definitionContainer.parserContext;
78
+ const rootBundle = nodeGenerator({
79
+ name: generalSettings.name,
80
+ packageName: generalSettings.packageScope
81
+ ? `@${generalSettings.packageScope}/root`
82
+ : `${generalSettings.name}-root`,
83
+ description: `Monorepo root for ${generalSettings.name}`,
84
+ private: true,
85
+ rootPackage: true,
86
+ scripts: {
87
+ build: `turbo run ${buildTasks}`,
88
+ 'build:affected': `turbo run ${buildTasks} --affected`,
89
+ typecheck: `turbo run typecheck`,
90
+ lint: `turbo run lint`,
91
+ 'lint:affected': `turbo run lint --affected`,
92
+ test: `turbo run test`,
93
+ 'prettier:check': `turbo run prettier:check && pnpm run prettier:check:root`,
94
+ 'prettier:check:affected': `turbo run prettier:check --affected`,
95
+ 'prettier:write': `turbo run prettier:write && pnpm run prettier:write:root`,
96
+ dev: `turbo run ${devTasks}`,
97
+ watch: `turbo run ${watchTasks}`,
98
+ 'baseplate:serve': 'baseplate serve',
99
+ 'baseplate:generate': 'baseplate generate',
100
+ 'prettier:check:root': `prettier --check . "!${appsFolder}/**"`,
101
+ 'prettier:write:root': `prettier --write . "!${appsFolder}/**"`,
102
+ },
103
+ additionalPackages: {
104
+ dev: {
105
+ // only include the project-builder-cli package if the project is not an internal example
106
+ ...(this.definitionContainer.parserContext.project.isInternalExample
107
+ ? {}
108
+ : {
109
+ '@baseplate-dev/project-builder-cli': cliVersion,
110
+ }),
111
+ },
112
+ },
113
+ children: {
114
+ docker: buildDocker(projectDefinition),
115
+ gitIgnore: nodeGitIgnoreGenerator({
116
+ additionalExclusions: ['# Turbo build artifacts', '.turbo/**'],
117
+ }),
118
+ prettier: prettierGenerator({
119
+ disableDefaultScripts: true,
120
+ additionalIgnorePaths: ['.turbo/**', 'pnpm-workspace.yaml'],
121
+ }),
122
+ workspacePackages: pnpmWorkspaceGenerator({
123
+ packages: workspacePackages,
124
+ }),
125
+ pathRoots: pathRootsGenerator({}),
126
+ turbo: turboGenerator({
127
+ tasks: turboTasks,
128
+ }),
129
+ rootReadme: rootReadmeGenerator({
130
+ projectName: generalSettings.name,
131
+ }),
132
+ },
133
+ });
134
+ return {
135
+ id: 'root',
136
+ name: 'root',
137
+ packageDirectory: this.getPackageDirectory(), // Root of the monorepo
138
+ generatorBundle: rootBundle,
139
+ };
140
+ }
141
+ getPackageName() {
142
+ const generalSettings = this.definitionContainer.definition.settings.general;
143
+ return buildPackageName(generalSettings, 'root');
144
+ }
145
+ getPackageDirectory() {
146
+ return '.';
147
+ }
148
+ }
149
+ //# sourceMappingURL=root-package-compiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-package-compiler.js","sourceRoot":"","sources":["../../../src/compiler/root/root-package-compiler.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAKlC,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE3E;;;;;;;GAOG;AACH,SAAS,WAAW,CAAC,iBAAoC;IACvD,OAAO,sBAAsB,CAAC;QAC5B,QAAQ,EAAE,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,MAAM;QACvD,GAAG,CAAC,cAAc,CAAC,iBAAiB,CAAC;YACnC,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,MAAM,EAAE;YACvD,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IACtD,OAAO,CAAC,OAA+B;QACrC,MAAM,iBAAiB,GAAG,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC;QAC9D,MAAM,eAAe,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC3D,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAE7D,kDAAkD;QAClD,MAAM,UAAU,GAAG,gBAAgB,EAAE,UAAU,IAAI,MAAM,CAAC;QAC1D,MAAM,iBAAiB,GAA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Z,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,EAAE,EAAE,uBAAuB;YACrE,eAAe,EAAE,UAAU;SAC5B,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,MAAM,eAAe,GACnB,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC;QACvD,OAAO,gBAAgB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;IAED,mBAAmB;QACjB,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
@@ -1,3 +1,2 @@
1
- import type { AppEntry, ProjectDefinitionContainer, WebAppConfig } from '@baseplate-dev/project-builder-lib';
2
- export declare function compileWeb(definitionContainer: ProjectDefinitionContainer, app: WebAppConfig): AppEntry;
1
+ export { WebPackageCompiler } from './web-compiler.js';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compiler/web/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,0BAA0B,EAC1B,YAAY,EACb,MAAM,oCAAoC,CAAC;AAkK5C,wBAAgB,UAAU,CACxB,mBAAmB,EAAE,0BAA0B,EAC/C,GAAG,EAAE,YAAY,GAChB,QAAQ,CA0BV"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compiler/web/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}