@baseplate-dev/project-builder-server 0.3.3 → 0.3.5

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 (247) hide show
  1. package/dist/actions/diff/diff-project.action.d.ts +73 -0
  2. package/dist/actions/diff/diff-project.action.d.ts.map +1 -0
  3. package/dist/actions/diff/diff-project.action.js +103 -0
  4. package/dist/actions/diff/diff-project.action.js.map +1 -0
  5. package/dist/actions/diff/index.d.ts +2 -0
  6. package/dist/actions/diff/index.d.ts.map +1 -0
  7. package/dist/actions/diff/index.js +2 -0
  8. package/dist/actions/diff/index.js.map +1 -0
  9. package/dist/actions/index.d.ts +7 -0
  10. package/dist/actions/index.d.ts.map +1 -0
  11. package/dist/actions/index.js +7 -0
  12. package/dist/actions/index.js.map +1 -0
  13. package/dist/actions/registry.d.ts +270 -0
  14. package/dist/actions/registry.d.ts.map +1 -0
  15. package/dist/actions/registry.js +23 -0
  16. package/dist/actions/registry.js.map +1 -0
  17. package/dist/actions/snapshot/index.d.ts +5 -0
  18. package/dist/actions/snapshot/index.d.ts.map +1 -0
  19. package/dist/actions/snapshot/index.js +5 -0
  20. package/dist/actions/snapshot/index.js.map +1 -0
  21. package/dist/actions/snapshot/snapshot-add.action.d.ts +16 -0
  22. package/dist/actions/snapshot/snapshot-add.action.d.ts.map +1 -0
  23. package/dist/actions/snapshot/snapshot-add.action.js +80 -0
  24. package/dist/actions/snapshot/snapshot-add.action.js.map +1 -0
  25. package/dist/actions/snapshot/snapshot-remove.action.d.ts +15 -0
  26. package/dist/actions/snapshot/snapshot-remove.action.d.ts.map +1 -0
  27. package/dist/actions/snapshot/snapshot-remove.action.js +75 -0
  28. package/dist/actions/snapshot/snapshot-remove.action.js.map +1 -0
  29. package/dist/actions/snapshot/snapshot-save.action.d.ts +15 -0
  30. package/dist/actions/snapshot/snapshot-save.action.d.ts.map +1 -0
  31. package/dist/actions/snapshot/snapshot-save.action.js +82 -0
  32. package/dist/actions/snapshot/snapshot-save.action.js.map +1 -0
  33. package/dist/actions/snapshot/snapshot-show.action.d.ts +43 -0
  34. package/dist/actions/snapshot/snapshot-show.action.d.ts.map +1 -0
  35. package/dist/actions/snapshot/snapshot-show.action.js +136 -0
  36. package/dist/actions/snapshot/snapshot-show.action.js.map +1 -0
  37. package/dist/actions/sync/index.d.ts +2 -0
  38. package/dist/actions/sync/index.d.ts.map +1 -0
  39. package/dist/actions/sync/index.js +2 -0
  40. package/dist/actions/sync/index.js.map +1 -0
  41. package/dist/actions/sync/sync-project.action.d.ts +14 -0
  42. package/dist/actions/sync/sync-project.action.d.ts.map +1 -0
  43. package/dist/actions/sync/sync-project.action.js +94 -0
  44. package/dist/actions/sync/sync-project.action.js.map +1 -0
  45. package/dist/actions/template-extractor/discover-generators.action.d.ts +49 -0
  46. package/dist/actions/template-extractor/discover-generators.action.d.ts.map +1 -0
  47. package/dist/actions/template-extractor/discover-generators.action.js +57 -0
  48. package/dist/actions/template-extractor/discover-generators.action.js.map +1 -0
  49. package/dist/actions/template-extractor/extract-templates.action.d.ts +14 -0
  50. package/dist/actions/template-extractor/extract-templates.action.d.ts.map +1 -0
  51. package/dist/actions/template-extractor/extract-templates.action.js +60 -0
  52. package/dist/actions/template-extractor/extract-templates.action.js.map +1 -0
  53. package/dist/actions/template-extractor/generate-templates.action.d.ts +12 -0
  54. package/dist/actions/template-extractor/generate-templates.action.d.ts.map +1 -0
  55. package/dist/actions/template-extractor/generate-templates.action.js +58 -0
  56. package/dist/actions/template-extractor/generate-templates.action.js.map +1 -0
  57. package/dist/actions/template-extractor/index.d.ts +4 -0
  58. package/dist/actions/template-extractor/index.d.ts.map +1 -0
  59. package/dist/actions/template-extractor/index.js +4 -0
  60. package/dist/actions/template-extractor/index.js.map +1 -0
  61. package/dist/actions/templates/configure-raw-template.action.d.ts +16 -0
  62. package/dist/actions/templates/configure-raw-template.action.d.ts.map +1 -0
  63. package/dist/actions/templates/configure-raw-template.action.js +50 -0
  64. package/dist/actions/templates/configure-raw-template.action.js.map +1 -0
  65. package/dist/actions/templates/configure-text-template.action.d.ts +27 -0
  66. package/dist/actions/templates/configure-text-template.action.d.ts.map +1 -0
  67. package/dist/actions/templates/configure-text-template.action.js +64 -0
  68. package/dist/actions/templates/configure-text-template.action.js.map +1 -0
  69. package/dist/actions/templates/configure-ts-template.action.d.ts +18 -0
  70. package/dist/actions/templates/configure-ts-template.action.d.ts.map +1 -0
  71. package/dist/actions/templates/configure-ts-template.action.js +58 -0
  72. package/dist/actions/templates/configure-ts-template.action.js.map +1 -0
  73. package/dist/actions/templates/delete-template.action.d.ts +15 -0
  74. package/dist/actions/templates/delete-template.action.d.ts.map +1 -0
  75. package/dist/actions/templates/delete-template.action.js +49 -0
  76. package/dist/actions/templates/delete-template.action.js.map +1 -0
  77. package/dist/actions/templates/index.d.ts +7 -0
  78. package/dist/actions/templates/index.d.ts.map +1 -0
  79. package/dist/actions/templates/index.js +7 -0
  80. package/dist/actions/templates/index.js.map +1 -0
  81. package/dist/actions/templates/list-templates.action.d.ts +35 -0
  82. package/dist/actions/templates/list-templates.action.d.ts.map +1 -0
  83. package/dist/actions/templates/list-templates.action.js +63 -0
  84. package/dist/actions/templates/list-templates.action.js.map +1 -0
  85. package/dist/actions/templates/show-template-metadata.action.d.ts +17 -0
  86. package/dist/actions/templates/show-template-metadata.action.d.ts.map +1 -0
  87. package/dist/actions/templates/show-template-metadata.action.js +57 -0
  88. package/dist/actions/templates/show-template-metadata.action.js.map +1 -0
  89. package/dist/actions/types.d.ts +60 -0
  90. package/dist/actions/types.d.ts.map +1 -0
  91. package/dist/actions/types.js +9 -0
  92. package/dist/actions/types.js.map +1 -0
  93. package/dist/actions/utils/cli.d.ts +12 -0
  94. package/dist/actions/utils/cli.d.ts.map +1 -0
  95. package/dist/actions/utils/cli.js +14 -0
  96. package/dist/actions/utils/cli.js.map +1 -0
  97. package/dist/actions/utils/index.d.ts +6 -0
  98. package/dist/actions/utils/index.d.ts.map +1 -0
  99. package/dist/actions/utils/index.js +6 -0
  100. package/dist/actions/utils/index.js.map +1 -0
  101. package/dist/actions/utils/project-discovery.d.ts +22 -0
  102. package/dist/actions/utils/project-discovery.d.ts.map +1 -0
  103. package/dist/actions/utils/project-discovery.js +78 -0
  104. package/dist/actions/utils/project-discovery.js.map +1 -0
  105. package/dist/actions/utils/project-id.d.ts +7 -0
  106. package/dist/actions/utils/project-id.d.ts.map +1 -0
  107. package/dist/actions/utils/project-id.js +15 -0
  108. package/dist/actions/utils/project-id.js.map +1 -0
  109. package/dist/actions/utils/projects.d.ts +9 -0
  110. package/dist/actions/utils/projects.d.ts.map +1 -0
  111. package/dist/actions/utils/projects.js +16 -0
  112. package/dist/actions/utils/projects.js.map +1 -0
  113. package/dist/actions/utils/run-in-worker.d.ts +13 -0
  114. package/dist/actions/utils/run-in-worker.d.ts.map +1 -0
  115. package/dist/actions/utils/run-in-worker.js +78 -0
  116. package/dist/actions/utils/run-in-worker.js.map +1 -0
  117. package/dist/actions/utils/trpc.d.ts +16 -0
  118. package/dist/actions/utils/trpc.d.ts.map +1 -0
  119. package/dist/actions/utils/trpc.js +19 -0
  120. package/dist/actions/utils/trpc.js.map +1 -0
  121. package/dist/actions/utils/worker-script.d.ts +28 -0
  122. package/dist/actions/utils/worker-script.d.ts.map +1 -0
  123. package/dist/actions/utils/worker-script.js +55 -0
  124. package/dist/actions/utils/worker-script.js.map +1 -0
  125. package/dist/api/context.d.ts.map +1 -1
  126. package/dist/api/trpc.d.ts.map +1 -1
  127. package/dist/compiler/web/index.d.ts.map +1 -1
  128. package/dist/compiler/web/index.js +3 -2
  129. package/dist/compiler/web/index.js.map +1 -1
  130. package/dist/constants/server.d.ts +1 -1
  131. package/dist/constants/server.js +1 -1
  132. package/dist/dev-server/api/router.d.ts +325 -0
  133. package/dist/dev-server/api/router.d.ts.map +1 -0
  134. package/dist/dev-server/api/router.js +40 -0
  135. package/dist/dev-server/api/router.js.map +1 -0
  136. package/dist/dev-server/api/trpc.d.ts +20 -0
  137. package/dist/dev-server/api/trpc.d.ts.map +1 -0
  138. package/dist/dev-server/api/trpc.js +18 -0
  139. package/dist/dev-server/api/trpc.js.map +1 -0
  140. package/dist/dev-server/auth-plugin.d.ts +6 -0
  141. package/dist/dev-server/auth-plugin.d.ts.map +1 -0
  142. package/dist/dev-server/auth-plugin.js +43 -0
  143. package/dist/dev-server/auth-plugin.js.map +1 -0
  144. package/dist/dev-server/get-or-create-config.d.ts +18 -0
  145. package/dist/dev-server/get-or-create-config.d.ts.map +1 -0
  146. package/dist/dev-server/get-or-create-config.js +76 -0
  147. package/dist/dev-server/get-or-create-config.js.map +1 -0
  148. package/dist/dev-server/index.d.ts +4 -0
  149. package/dist/dev-server/index.d.ts.map +1 -0
  150. package/dist/dev-server/index.js +3 -0
  151. package/dist/dev-server/index.js.map +1 -0
  152. package/dist/dev-server/mcp/fastify.d.ts +8 -0
  153. package/dist/dev-server/mcp/fastify.d.ts.map +1 -0
  154. package/dist/dev-server/mcp/fastify.js +80 -0
  155. package/dist/dev-server/mcp/fastify.js.map +1 -0
  156. package/dist/dev-server/mcp/server.d.ts +15 -0
  157. package/dist/dev-server/mcp/server.d.ts.map +1 -0
  158. package/dist/dev-server/mcp/server.js +120 -0
  159. package/dist/dev-server/mcp/server.js.map +1 -0
  160. package/dist/dev-server/mcp/stdio.d.ts +4 -0
  161. package/dist/dev-server/mcp/stdio.d.ts.map +1 -0
  162. package/dist/dev-server/mcp/stdio.js +15 -0
  163. package/dist/dev-server/mcp/stdio.js.map +1 -0
  164. package/dist/dev-server/server.d.ts +18 -0
  165. package/dist/dev-server/server.d.ts.map +1 -0
  166. package/dist/dev-server/server.js +91 -0
  167. package/dist/dev-server/server.js.map +1 -0
  168. package/dist/diff/diff-project.d.ts +37 -20
  169. package/dist/diff/diff-project.d.ts.map +1 -1
  170. package/dist/diff/diff-project.js +89 -79
  171. package/dist/diff/diff-project.js.map +1 -1
  172. package/dist/fastify-plugins/graceful-shutdown.d.ts.map +1 -0
  173. package/dist/fastify-plugins/graceful-shutdown.js.map +1 -0
  174. package/dist/server/builder-service-manager.d.ts +9 -8
  175. package/dist/server/builder-service-manager.d.ts.map +1 -1
  176. package/dist/server/builder-service-manager.js +4 -10
  177. package/dist/server/builder-service-manager.js.map +1 -1
  178. package/dist/server/server.js +1 -1
  179. package/dist/server/server.js.map +1 -1
  180. package/dist/service/builder-service.d.ts +3 -4
  181. package/dist/service/builder-service.d.ts.map +1 -1
  182. package/dist/service/builder-service.js +7 -3
  183. package/dist/service/builder-service.js.map +1 -1
  184. package/dist/template-extractor/discover-generators.d.ts.map +1 -1
  185. package/dist/template-extractor/discover-generators.js +1 -1
  186. package/dist/template-extractor/discover-generators.js.map +1 -1
  187. package/dist/templates/configure/configure-raw-template.d.ts +13 -0
  188. package/dist/templates/configure/configure-raw-template.d.ts.map +1 -0
  189. package/dist/templates/configure/configure-raw-template.js +26 -0
  190. package/dist/templates/configure/configure-raw-template.js.map +1 -0
  191. package/dist/templates/configure/configure-text-template.d.ts +18 -0
  192. package/dist/templates/configure/configure-text-template.d.ts.map +1 -0
  193. package/dist/templates/configure/configure-text-template.js +48 -0
  194. package/dist/templates/configure/configure-text-template.js.map +1 -0
  195. package/dist/templates/configure/configure-ts-template.d.ts +15 -0
  196. package/dist/templates/configure/configure-ts-template.d.ts.map +1 -0
  197. package/dist/templates/configure/configure-ts-template.js +44 -0
  198. package/dist/templates/configure/configure-ts-template.js.map +1 -0
  199. package/dist/templates/configure/index.d.ts +5 -0
  200. package/dist/templates/configure/index.d.ts.map +1 -0
  201. package/dist/templates/configure/index.js +4 -0
  202. package/dist/templates/configure/index.js.map +1 -0
  203. package/dist/templates/configure/types.d.ts +7 -0
  204. package/dist/templates/configure/types.d.ts.map +1 -0
  205. package/dist/templates/configure/types.js +2 -0
  206. package/dist/templates/configure/types.js.map +1 -0
  207. package/dist/templates/delete/delete-template.d.ts +16 -0
  208. package/dist/templates/delete/delete-template.d.ts.map +1 -0
  209. package/dist/templates/delete/delete-template.js +45 -0
  210. package/dist/templates/delete/delete-template.js.map +1 -0
  211. package/dist/templates/list/list-templates.d.ts +22 -0
  212. package/dist/templates/list/list-templates.d.ts.map +1 -0
  213. package/dist/templates/list/list-templates.js +29 -0
  214. package/dist/templates/list/list-templates.js.map +1 -0
  215. package/dist/templates/show/show-template-metadata.d.ts +19 -0
  216. package/dist/templates/show/show-template-metadata.d.ts.map +1 -0
  217. package/dist/templates/show/show-template-metadata.js +37 -0
  218. package/dist/templates/show/show-template-metadata.js.map +1 -0
  219. package/dist/templates/utils/extractor-config.d.ts +18 -0
  220. package/dist/templates/utils/extractor-config.d.ts.map +1 -0
  221. package/dist/templates/utils/extractor-config.js +55 -0
  222. package/dist/templates/utils/extractor-config.js.map +1 -0
  223. package/dist/templates/utils/infer-exports-from-ts-file.d.ts +10 -0
  224. package/dist/templates/utils/infer-exports-from-ts-file.d.ts.map +1 -0
  225. package/dist/templates/utils/infer-exports-from-ts-file.js +87 -0
  226. package/dist/templates/utils/infer-exports-from-ts-file.js.map +1 -0
  227. package/dist/templates/utils/resolve-file-path.d.ts +15 -0
  228. package/dist/templates/utils/resolve-file-path.d.ts.map +1 -0
  229. package/dist/templates/utils/resolve-file-path.js +48 -0
  230. package/dist/templates/utils/resolve-file-path.js.map +1 -0
  231. package/dist/templates/utils/resolve-generator.d.ts +8 -0
  232. package/dist/templates/utils/resolve-generator.d.ts.map +1 -0
  233. package/dist/templates/utils/resolve-generator.js +26 -0
  234. package/dist/templates/utils/resolve-generator.js.map +1 -0
  235. package/dist/templates/utils/template-metadata.d.ts +14 -0
  236. package/dist/templates/utils/template-metadata.d.ts.map +1 -0
  237. package/dist/templates/utils/template-metadata.js +54 -0
  238. package/dist/templates/utils/template-metadata.js.map +1 -0
  239. package/dist/utils/case.d.ts +0 -1
  240. package/dist/utils/case.d.ts.map +1 -1
  241. package/dist/utils/case.js +1 -10
  242. package/dist/utils/case.js.map +1 -1
  243. package/package.json +17 -12
  244. package/dist/server/graceful-shutdown.d.ts.map +0 -1
  245. package/dist/server/graceful-shutdown.js.map +0 -1
  246. /package/dist/{server → fastify-plugins}/graceful-shutdown.d.ts +0 -0
  247. /package/dist/{server → fastify-plugins}/graceful-shutdown.js +0 -0
@@ -0,0 +1,87 @@
1
+ import { enhanceErrorWithContext } from '@baseplate-dev/utils';
2
+ import { Project } from 'ts-morph';
3
+ /**
4
+ * Extracts all available exports from a TypeScript file
5
+ */
6
+ export function inferExportsFromTsFile(filePath) {
7
+ try {
8
+ const project = new Project();
9
+ const sourceFile = project.addSourceFileAtPath(filePath);
10
+ const availableExports = new Map();
11
+ // Find export declarations
12
+ for (const exportDecl of sourceFile.getExportDeclarations()) {
13
+ for (const namedExport of exportDecl.getNamedExports()) {
14
+ availableExports.set(namedExport.getName(), {
15
+ name: namedExport.getName(),
16
+ isTypeOnly: namedExport.isTypeOnly(),
17
+ });
18
+ }
19
+ }
20
+ // Find variable declarations that are exported
21
+ for (const varDecl of sourceFile.getVariableDeclarations()) {
22
+ if (varDecl.isExported()) {
23
+ availableExports.set(varDecl.getName(), {
24
+ name: varDecl.getName(),
25
+ isTypeOnly: false,
26
+ });
27
+ }
28
+ }
29
+ // Find function declarations that are exported
30
+ for (const func of sourceFile.getFunctions()) {
31
+ if (func.isExported()) {
32
+ const name = func.getName();
33
+ if (name) {
34
+ availableExports.set(name, {
35
+ name,
36
+ isTypeOnly: false,
37
+ });
38
+ }
39
+ }
40
+ }
41
+ // Find class declarations that are exported
42
+ for (const cls of sourceFile.getClasses()) {
43
+ if (cls.isExported()) {
44
+ const name = cls.getName();
45
+ if (name) {
46
+ availableExports.set(name, {
47
+ name,
48
+ isTypeOnly: false,
49
+ });
50
+ }
51
+ }
52
+ }
53
+ // Find interface declarations that are exported
54
+ for (const iface of sourceFile.getInterfaces()) {
55
+ if (iface.isExported()) {
56
+ availableExports.set(iface.getName(), {
57
+ name: iface.getName(),
58
+ isTypeOnly: true,
59
+ });
60
+ }
61
+ }
62
+ // Find type declarations that are exported
63
+ for (const typeAlias of sourceFile.getTypeAliases()) {
64
+ if (typeAlias.isExported()) {
65
+ availableExports.set(typeAlias.getName(), {
66
+ name: typeAlias.getName(),
67
+ isTypeOnly: true,
68
+ });
69
+ }
70
+ }
71
+ // Check for default export
72
+ const defaultExportSymbol = sourceFile.getDefaultExportSymbol();
73
+ if (defaultExportSymbol) {
74
+ const name = defaultExportSymbol.getName();
75
+ availableExports.set(name, {
76
+ name,
77
+ isDefault: true,
78
+ isTypeOnly: false,
79
+ });
80
+ }
81
+ return availableExports;
82
+ }
83
+ catch (error) {
84
+ throw enhanceErrorWithContext(error, `Failed to extract exports from ${filePath}`);
85
+ }
86
+ }
87
+ //# sourceMappingURL=infer-exports-from-ts-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infer-exports-from-ts-file.js","sourceRoot":"","sources":["../../../src/templates/utils/infer-exports-from-ts-file.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,15 @@
1
+ import type { ProjectInfo } from '../../api/projects.js';
2
+ interface ResolvedFilePath {
3
+ /** The absolute file path */
4
+ absolutePath: string;
5
+ /** The relative path from the project directory */
6
+ projectRelativePath: string;
7
+ /** The project that contains this file */
8
+ project: ProjectInfo;
9
+ }
10
+ /**
11
+ * Resolves a file path (absolute or relative) to project and package information
12
+ */
13
+ export declare function resolveFilePath(filePath: string, projects: ProjectInfo[], project?: string): ResolvedFilePath;
14
+ export {};
15
+ //# sourceMappingURL=resolve-file-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-file-path.d.ts","sourceRoot":"","sources":["../../../src/templates/utils/resolve-file-path.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,UAAU,gBAAgB;IACxB,6BAA6B;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0CAA0C;IAC1C,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,WAAW,EAAE,EACvB,OAAO,CAAC,EAAE,MAAM,GACf,gBAAgB,CAYlB"}
@@ -0,0 +1,48 @@
1
+ import path from 'node:path';
2
+ /**
3
+ * Resolves a file path (absolute or relative) to project and package information
4
+ */
5
+ export function resolveFilePath(filePath, projects, project) {
6
+ if (path.isAbsolute(filePath)) {
7
+ // Handle absolute paths - find which project contains this path
8
+ return resolveAbsolutePath(filePath, projects);
9
+ }
10
+ // Handle relative paths - require project parameter
11
+ if (!project) {
12
+ throw new Error('Project parameter is required when filePath is relative');
13
+ }
14
+ return resolveRelativePath(filePath, projects, project);
15
+ }
16
+ /**
17
+ * Resolve an absolute file path to project and package info
18
+ */
19
+ function resolveAbsolutePath(absolutePath, projects) {
20
+ // Find the project that contains this path
21
+ const matchingProject = projects.find((proj) => absolutePath.startsWith(`${proj.directory}${path.sep}`));
22
+ if (!matchingProject) {
23
+ const availableProjects = projects.map((p) => p.directory).join(', ');
24
+ throw new Error(`File path "${absolutePath}" is not within any available project. Available projects: ${availableProjects}`);
25
+ }
26
+ return {
27
+ absolutePath,
28
+ projectRelativePath: path.relative(matchingProject.directory, absolutePath),
29
+ project: matchingProject,
30
+ };
31
+ }
32
+ /**
33
+ * Resolve a relative file path using the specified project
34
+ */
35
+ function resolveRelativePath(relativePath, projects, projectNameOrId) {
36
+ // Find the specified project
37
+ const matchingProject = projects.find((proj) => proj.name === projectNameOrId || proj.id === projectNameOrId);
38
+ if (!matchingProject) {
39
+ const availableProjects = projects.map((p) => p.name).join(', ');
40
+ throw new Error(`Project "${projectNameOrId}" not found. Available projects: ${availableProjects}`);
41
+ }
42
+ return {
43
+ absolutePath: path.join(matchingProject.directory, relativePath),
44
+ projectRelativePath: relativePath,
45
+ project: matchingProject,
46
+ };
47
+ }
48
+ //# sourceMappingURL=resolve-file-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-file-path.js","sourceRoot":"","sources":["../../../src/templates/utils/resolve-file-path.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAa7B;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAgB,EAChB,QAAuB,EACvB,OAAgB;IAEhB,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,gEAAgE;QAChE,OAAO,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;IAED,oDAAoD;IACpD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAC1B,YAAoB,EACpB,QAAuB;IAEvB,2CAA2C;IAC3C,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC7C,YAAY,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CACxD,CAAC;IAEF,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,iBAAiB,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtE,MAAM,IAAI,KAAK,CACb,cAAc,YAAY,8DAA8D,iBAAiB,EAAE,CAC5G,CAAC;IACJ,CAAC;IAED,OAAO;QACL,YAAY;QACZ,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,EAAE,YAAY,CAAC;QAC3E,OAAO,EAAE,eAAe;KACzB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAC1B,YAAoB,EACpB,QAAuB,EACvB,eAAuB;IAEvB,6BAA6B;IAC7B,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CACnC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,eAAe,IAAI,IAAI,CAAC,EAAE,KAAK,eAAe,CACvE,CAAC;IAEF,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,iBAAiB,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjE,MAAM,IAAI,KAAK,CACb,YAAY,eAAe,oCAAoC,iBAAiB,EAAE,CACnF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,YAAY,CAAC;QAChE,mBAAmB,EAAE,YAAY;QACjC,OAAO,EAAE,eAAe;KACzB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { PluginMetadataWithPaths } from '@baseplate-dev/project-builder-lib';
2
+ import type { Logger } from '@baseplate-dev/sync';
3
+ /**
4
+ * Resolves a generator name to its directory path using the template discovery system
5
+ * @throws Error if the generator is not found or if discovery fails
6
+ */
7
+ export declare function resolveGenerator(projectDirectory: string, plugins: PluginMetadataWithPaths[], generatorName: string, logger: Logger): Promise<string>;
8
+ //# sourceMappingURL=resolve-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-generator.d.ts","sourceRoot":"","sources":["../../../src/templates/utils/resolve-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMlD;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,uBAAuB,EAAE,EAClC,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,CAgCjB"}
@@ -0,0 +1,26 @@
1
+ import { findClosestMatch } from '@baseplate-dev/utils';
2
+ import { discoverGenerators } from '../../template-extractor/discover-generators.js';
3
+ /**
4
+ * Resolves a generator name to its directory path using the template discovery system
5
+ * @throws Error if the generator is not found or if discovery fails
6
+ */
7
+ export async function resolveGenerator(projectDirectory, plugins, generatorName, logger) {
8
+ try {
9
+ // Use the existing generator discovery to find all available generators
10
+ const generators = await discoverGenerators(projectDirectory, plugins, logger);
11
+ const generator = generators.find((gen) => gen.name === generatorName);
12
+ if (!generator) {
13
+ const availableGenerators = generators.map((g) => g.name);
14
+ const closestGenerators = findClosestMatch(generatorName, availableGenerators, 3);
15
+ throw new Error(`Generator '${generatorName}' not found. Did you mean one of these: ${closestGenerators.join(', ')}?`);
16
+ }
17
+ return generator.generatorDirectory;
18
+ }
19
+ catch (error) {
20
+ if (error instanceof Error) {
21
+ throw error;
22
+ }
23
+ throw new Error(`Failed to resolve generator '${generatorName}': ${String(error)}`);
24
+ }
25
+ }
26
+ //# sourceMappingURL=resolve-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-generator.js","sourceRoot":"","sources":["../../../src/templates/utils/resolve-generator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAErF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,gBAAwB,EACxB,OAAkC,EAClC,aAAqB,EACrB,MAAc;IAEd,IAAI,CAAC;QACH,wEAAwE;QACxE,MAAM,UAAU,GAAG,MAAM,kBAAkB,CACzC,gBAAgB,EAChB,OAAO,EACP,MAAM,CACP,CAAC;QAEF,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;QAEvE,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,mBAAmB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC1D,MAAM,iBAAiB,GAAG,gBAAgB,CACxC,aAAa,EACb,mBAAmB,EACnB,CAAC,CACF,CAAC;YACF,MAAM,IAAI,KAAK,CACb,cAAc,aAAa,2CAA2C,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACtG,CAAC;QACJ,CAAC;QAED,OAAO,SAAS,CAAC,kBAAkB,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,MAAM,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,KAAK,CACb,gCAAgC,aAAa,MAAM,MAAM,CAAC,KAAK,CAAC,EAAE,CACnE,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { TemplateInfo } from '@baseplate-dev/sync';
2
+ /**
3
+ * Creates or updates a .templates-info.json file
4
+ */
5
+ export declare function updateTemplateMetadata(filePath: string, generator: string, templateName: string, instanceData?: Record<string, unknown>): Promise<void>;
6
+ /**
7
+ * Reads template metadata for a specific file
8
+ */
9
+ export declare function readTemplateMetadataForFile(filePath: string): Promise<TemplateInfo>;
10
+ /**
11
+ * Removes a file's metadata entry from the .templates-info.json file
12
+ */
13
+ export declare function removeTemplateMetadata(filePath: string): Promise<void>;
14
+ //# sourceMappingURL=template-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-metadata.d.ts","sourceRoot":"","sources":["../../../src/templates/utils/template-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAexD;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED;;GAEG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,YAAY,CAAC,CAiBvB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB5E"}
@@ -0,0 +1,54 @@
1
+ import { TEMPLATES_INFO_FILENAME, templatesInfoFileSchema, } from '@baseplate-dev/sync';
2
+ import { handleFileNotFoundError, readJsonWithSchema, writeStablePrettyJson, } from '@baseplate-dev/utils/node';
3
+ import { omit } from 'es-toolkit';
4
+ import * as fs from 'node:fs/promises';
5
+ import path from 'node:path';
6
+ /**
7
+ * Creates or updates a .templates-info.json file
8
+ */
9
+ export async function updateTemplateMetadata(filePath, generator, templateName, instanceData) {
10
+ const dirPath = path.dirname(filePath);
11
+ const metadataPath = path.join(dirPath, TEMPLATES_INFO_FILENAME);
12
+ const fileName = path.basename(filePath);
13
+ const existingMetadata = await readJsonWithSchema(metadataPath, templatesInfoFileSchema).catch(handleFileNotFoundError);
14
+ const metadata = existingMetadata ?? {};
15
+ metadata[fileName] = {
16
+ template: templateName,
17
+ generator,
18
+ instanceData: instanceData ?? existingMetadata?.[fileName]?.instanceData ?? {},
19
+ };
20
+ // Write the metadata back to the file
21
+ await writeStablePrettyJson(metadataPath, metadata);
22
+ }
23
+ /**
24
+ * Reads template metadata for a specific file
25
+ */
26
+ export async function readTemplateMetadataForFile(filePath) {
27
+ const dirPath = path.dirname(filePath);
28
+ const metadataPath = path.join(dirPath, TEMPLATES_INFO_FILENAME);
29
+ const fileName = path.basename(filePath);
30
+ const existingMetadata = await readJsonWithSchema(metadataPath, templatesInfoFileSchema).catch(handleFileNotFoundError);
31
+ if (!existingMetadata?.[fileName]) {
32
+ throw new Error(`No template metadata found for file '${fileName}' in ${metadataPath}`);
33
+ }
34
+ return existingMetadata[fileName];
35
+ }
36
+ /**
37
+ * Removes a file's metadata entry from the .templates-info.json file
38
+ */
39
+ export async function removeTemplateMetadata(filePath) {
40
+ const dirPath = path.dirname(filePath);
41
+ const metadataPath = path.join(dirPath, TEMPLATES_INFO_FILENAME);
42
+ const fileName = path.basename(filePath);
43
+ const existingMetadata = await readJsonWithSchema(metadataPath, templatesInfoFileSchema).catch(handleFileNotFoundError);
44
+ if (!existingMetadata) {
45
+ return;
46
+ }
47
+ // Remove the file entry from metadata
48
+ const updatedMetadata = omit(existingMetadata, [fileName]);
49
+ // If no entries remain, delete the metadata file entirely, otherwise write updated metadata
50
+ await (Object.keys(updatedMetadata).length === 0
51
+ ? fs.unlink(metadataPath)
52
+ : writeStablePrettyJson(metadataPath, updatedMetadata));
53
+ }
54
+ //# sourceMappingURL=template-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-metadata.js","sourceRoot":"","sources":["../../../src/templates/utils/template-metadata.ts"],"names":[],"mappings":"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"}
@@ -1,3 +1,2 @@
1
- export declare function dasherizeCamel(str: string): string;
2
1
  export declare function titleizeCamel(str: string): string;
3
2
  //# sourceMappingURL=case.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../src/utils/case.ts"],"names":[],"mappings":"AASA,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD"}
1
+ {"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../src/utils/case.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD"}
@@ -1,13 +1,4 @@
1
- import { dasherize, titleize, underscore } from 'inflection';
2
- function lowerCaseFirst(str) {
3
- if (str.length === 0) {
4
- return str;
5
- }
6
- return str.charAt(0).toLowerCase() + str.slice(1);
7
- }
8
- export function dasherizeCamel(str) {
9
- return dasherize(underscore(lowerCaseFirst(str)));
10
- }
1
+ import { titleize, underscore } from 'inflection';
11
2
  export function titleizeCamel(str) {
12
3
  return titleize(underscore(str));
13
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"case.js","sourceRoot":"","sources":["../../src/utils/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7D,SAAS,cAAc,CAAC,GAAW;IACjC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,SAAS,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AACnC,CAAC"}
1
+ {"version":3,"file":"case.js","sourceRoot":"","sources":["../../src/utils/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AACnC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baseplate-dev/project-builder-server",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Server for Project Builder using Baseplate generators",
5
5
  "keywords": [
6
6
  "backend",
@@ -25,7 +25,10 @@
25
25
  "exports": {
26
26
  ".": "./dist/index.js",
27
27
  "./template-extractor": "./dist/template-extractor/index.js",
28
- "./plugins": "./dist/plugins/index.js"
28
+ "./plugins": "./dist/plugins/index.js",
29
+ "./actions": "./dist/actions/index.js",
30
+ "./dev-server": "./dist/dev-server/index.js",
31
+ "./user-config": "./dist/user-config/index.js"
29
32
  },
30
33
  "main": "dist/index.js",
31
34
  "files": [
@@ -40,6 +43,7 @@
40
43
  "@fastify/helmet": "13.0.0",
41
44
  "@fastify/static": "8.0.3",
42
45
  "@fastify/websocket": "11.0.1",
46
+ "@modelcontextprotocol/sdk": "^1.17.3",
43
47
  "@trpc/server": "^11.1.2",
44
48
  "chalk": "5.3.0",
45
49
  "change-case": "5.4.4",
@@ -59,23 +63,24 @@
59
63
  "mime": "^4.0.3",
60
64
  "open": "10.1.0",
61
65
  "pino": "9.5.0",
62
- "zod": "3.24.1",
63
- "@baseplate-dev/core-generators": "0.3.3",
64
- "@baseplate-dev/fastify-generators": "0.3.3",
65
- "@baseplate-dev/project-builder-lib": "0.3.3",
66
- "@baseplate-dev/react-generators": "0.3.3",
67
- "@baseplate-dev/sync": "0.3.3",
68
- "@baseplate-dev/utils": "0.3.3"
66
+ "ts-morph": "26.0.0",
67
+ "zod": "3.25.76",
68
+ "@baseplate-dev/core-generators": "0.3.5",
69
+ "@baseplate-dev/fastify-generators": "0.3.5",
70
+ "@baseplate-dev/project-builder-lib": "0.3.5",
71
+ "@baseplate-dev/react-generators": "0.3.5",
72
+ "@baseplate-dev/sync": "0.3.5",
73
+ "@baseplate-dev/utils": "0.3.5"
69
74
  },
70
75
  "devDependencies": {
71
76
  "@types/micromatch": "^4.0.9",
72
- "@types/node": "^22.0.0",
77
+ "@types/node": "^22.17.2",
73
78
  "eslint": "9.32.0",
74
79
  "memfs": "4.15.1",
75
80
  "prettier": "3.6.2",
76
- "typescript": "5.7.3",
81
+ "typescript": "5.8.3",
77
82
  "vitest": "3.2.4",
78
- "@baseplate-dev/tools": "0.3.3"
83
+ "@baseplate-dev/tools": "0.3.5"
79
84
  },
80
85
  "engines": {
81
86
  "node": "^22.0.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"graceful-shutdown.d.ts","sourceRoot":"","sources":["../../src/server/graceful-shutdown.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB,qUAyBjC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"graceful-shutdown.js","sourceRoot":"","sources":["../../src/server/graceful-shutdown.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEhC,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,oDAAoD;AAE5E,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAC/D,MAAM,cAAc,GAA2B,CAAC,MAAM,EAAE,EAAE;QACxD,UAAU,CAAC,GAAG,EAAE;YACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,EAAE,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;QAEpB,yEAAyE;QACzE,oEAAoE;QAEpE,OAAO,CAAC,IAAI,CAAC,YAAY,MAAM,2BAA2B,CAAC,CAAC;QAE5D,OAAO;aACJ,KAAK,EAAE;aACP,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aAC3B,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;YACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAEtC,IAAI,EAAE,CAAC;AACT,CAAC,CAAC,CAAC"}