@baseplate-dev/project-builder-server 0.4.2 → 0.4.4

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 (38) hide show
  1. package/dist/actions/generators/create-generator.action.d.ts +15 -0
  2. package/dist/actions/generators/create-generator.action.d.ts.map +1 -0
  3. package/dist/actions/generators/create-generator.action.js +54 -0
  4. package/dist/actions/generators/create-generator.action.js.map +1 -0
  5. package/dist/actions/generators/index.d.ts +3 -0
  6. package/dist/actions/generators/index.d.ts.map +1 -0
  7. package/dist/actions/generators/index.js +3 -0
  8. package/dist/actions/generators/index.js.map +1 -0
  9. package/dist/actions/index.d.ts +1 -0
  10. package/dist/actions/index.d.ts.map +1 -1
  11. package/dist/actions/index.js +1 -0
  12. package/dist/actions/index.js.map +1 -1
  13. package/dist/actions/registry.d.ts +9 -0
  14. package/dist/actions/registry.d.ts.map +1 -1
  15. package/dist/actions/registry.js +2 -0
  16. package/dist/actions/registry.js.map +1 -1
  17. package/dist/compiler/backend/fastify.d.ts.map +1 -1
  18. package/dist/compiler/backend/fastify.js +5 -1
  19. package/dist/compiler/backend/fastify.js.map +1 -1
  20. package/dist/compiler/web/web-compiler.d.ts.map +1 -1
  21. package/dist/compiler/web/web-compiler.js +2 -1
  22. package/dist/compiler/web/web-compiler.js.map +1 -1
  23. package/dist/dev-server/api/router.d.ts +6 -6
  24. package/dist/index.d.ts +2 -0
  25. package/dist/index.js +2 -0
  26. package/dist/templates/create/create-generator.d.ts +16 -0
  27. package/dist/templates/create/create-generator.d.ts.map +1 -0
  28. package/dist/templates/create/create-generator.js +175 -0
  29. package/dist/templates/create/create-generator.js.map +1 -0
  30. package/dist/templates/create/index.d.ts +2 -0
  31. package/dist/templates/create/index.d.ts.map +1 -0
  32. package/dist/templates/create/index.js +2 -0
  33. package/dist/templates/create/index.js.map +1 -0
  34. package/dist/utils/find-monorepo-root.d.ts +6 -0
  35. package/dist/utils/find-monorepo-root.d.ts.map +1 -0
  36. package/dist/utils/find-monorepo-root.js +19 -0
  37. package/dist/utils/find-monorepo-root.js.map +1 -0
  38. package/package.json +8 -8
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Service action to create a new generator with boilerplate code
4
+ */
5
+ export declare const createGeneratorAction: import("#src/actions/types.js").ServiceAction<z.ZodObject<{
6
+ name: z.ZodString;
7
+ directory: z.ZodString;
8
+ includeTemplates: z.ZodDefault<z.ZodBoolean>;
9
+ }, z.core.$strip>, z.ZodObject<{
10
+ message: z.ZodString;
11
+ generatorName: z.ZodString;
12
+ generatorPath: z.ZodString;
13
+ filesCreated: z.ZodArray<z.ZodString>;
14
+ }, z.core.$strip>>;
15
+ //# sourceMappingURL=create-generator.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-generator.action.d.ts","sourceRoot":"","sources":["../../../src/actions/generators/create-generator.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkCxB;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;kBAiChC,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { z } from 'zod';
2
+ import { createServiceAction } from '#src/actions/types.js';
3
+ // Custom regex for generator names: category/kebab-name format
4
+ const generatorNameSchema = z
5
+ .string()
6
+ .regex(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/, 'Generator name must be in format "category/name" using kebab-case (e.g., "email/sendgrid")');
7
+ const createGeneratorInputSchema = z.object({
8
+ name: generatorNameSchema.describe('Generator name in format "category/name" (e.g., "email/sendgrid")'),
9
+ directory: z
10
+ .string()
11
+ .describe('Directory to create generator in (e.g., "packages/fastify-generators/src/generators")'),
12
+ includeTemplates: z
13
+ .boolean()
14
+ .default(true)
15
+ .describe('Include placeholder template setup'),
16
+ });
17
+ const createGeneratorOutputSchema = z.object({
18
+ message: z.string().describe('Success message'),
19
+ generatorName: z.string().describe('The created generator name'),
20
+ generatorPath: z.string().describe('The path to the created generator'),
21
+ filesCreated: z.array(z.string()).describe('List of files created'),
22
+ });
23
+ /**
24
+ * Service action to create a new generator with boilerplate code
25
+ */
26
+ export const createGeneratorAction = createServiceAction({
27
+ name: 'create-generator',
28
+ title: 'Create Generator',
29
+ description: 'Create a new generator with boilerplate code, including generator file, index, and optional template setup',
30
+ inputSchema: createGeneratorInputSchema,
31
+ outputSchema: createGeneratorOutputSchema,
32
+ handler: async (input, context) => {
33
+ const { name, directory, includeTemplates } = input;
34
+ const { createGenerator } = await import('#src/templates/create/create-generator.js');
35
+ const result = createGenerator({
36
+ name,
37
+ directory,
38
+ includeTemplates,
39
+ });
40
+ context.logger.info(result.message);
41
+ return result;
42
+ },
43
+ writeCliOutput: (output) => {
44
+ console.info(`✅ ${output.message}`);
45
+ console.info(`📁 Generator path: ${output.generatorPath}`);
46
+ if (output.filesCreated.length > 0) {
47
+ console.info(`📄 Files created:`);
48
+ for (const file of output.filesCreated) {
49
+ console.info(` - ${file}`);
50
+ }
51
+ }
52
+ },
53
+ });
54
+ //# sourceMappingURL=create-generator.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-generator.action.js","sourceRoot":"","sources":["../../../src/actions/generators/create-generator.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,+DAA+D;AAC/D,MAAM,mBAAmB,GAAG,CAAC;KAC1B,MAAM,EAAE;KACR,KAAK,CACJ,oCAAoC,EACpC,4FAA4F,CAC7F,CAAC;AAEJ,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAChC,mEAAmE,CACpE;IACD,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,CACP,uFAAuF,CACxF;IACH,gBAAgB,EAAE,CAAC;SAChB,OAAO,EAAE;SACT,OAAO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sB,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;QAC3D,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;YAClC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC;gBACvC,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './create-generator.action.js';
2
+ export { createGenerator } from '#src/templates/create/index.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/generators/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './create-generator.action.js';
2
+ export { createGenerator } from '#src/templates/create/index.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/actions/generators/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './diff/index.js';
2
+ export * from './generators/index.js';
2
3
  export * from './snapshot/index.js';
3
4
  export * from './sync/index.js';
4
5
  export * from './template-extractor/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './diff/index.js';
2
+ export * from './generators/index.js';
2
3
  export * from './snapshot/index.js';
3
4
  export * from './sync/index.js';
4
5
  export * from './template-extractor/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -23,6 +23,15 @@ export declare const ALL_SERVICE_ACTIONS: (import("./types.js").ServiceAction<im
23
23
  }, import("zod/v4/core").$strip>>;
24
24
  totalDiffs: import("zod").ZodNumber;
25
25
  hasDifferences: import("zod").ZodBoolean;
26
+ }, import("zod/v4/core").$strip>> | import("./types.js").ServiceAction<import("zod").ZodObject<{
27
+ name: import("zod").ZodString;
28
+ directory: import("zod").ZodString;
29
+ includeTemplates: import("zod").ZodDefault<import("zod").ZodBoolean>;
30
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
31
+ message: import("zod").ZodString;
32
+ generatorName: import("zod").ZodString;
33
+ generatorPath: import("zod").ZodString;
34
+ filesCreated: import("zod").ZodArray<import("zod").ZodString>;
26
35
  }, import("zod/v4/core").$strip>> | import("./types.js").ServiceAction<import("zod").ZodObject<{
27
36
  project: import("zod").ZodString;
28
37
  app: import("zod").ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/actions/registry.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAiB/B,CAAC"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/actions/registry.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAkB/B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { diffProjectAction } from './diff/diff-project.action.js';
2
+ import { createGeneratorAction } from './generators/index.js';
2
3
  import { snapshotAddAction, snapshotRemoveAction, snapshotSaveAction, snapshotShowAction, } from './snapshot/index.js';
3
4
  import { syncAllProjectsAction, syncProjectAction } from './sync/index.js';
4
5
  import { discoverGeneratorsAction, extractTemplatesAction, generateTemplatesAction, } from './template-extractor/index.js';
@@ -10,6 +11,7 @@ export const ALL_SERVICE_ACTIONS = [
10
11
  discoverGeneratorsAction,
11
12
  extractTemplatesAction,
12
13
  generateTemplatesAction,
14
+ createGeneratorAction,
13
15
  configureTsTemplateAction,
14
16
  configureTextTemplateAction,
15
17
  configureRawTemplateAction,
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/actions/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,iBAAiB;IACjB,iBAAiB;IACjB,qBAAqB;IACrB,wBAAwB;IACxB,sBAAsB;IACtB,uBAAuB;IACvB,yBAAyB;IACzB,2BAA2B;IAC3B,0BAA0B;IAC1B,oBAAoB;IACpB,mBAAmB;IACnB,0BAA0B;IAC1B,iBAAiB;IACjB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;CACnB,CAAC"}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/actions/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,iBAAiB;IACjB,iBAAiB;IACjB,qBAAqB;IACrB,wBAAwB;IACxB,sBAAsB;IACtB,uBAAuB;IACvB,qBAAqB;IACrB,yBAAyB;IACzB,2BAA2B;IAC3B,0BAA0B;IAC1B,oBAAoB;IACpB,mBAAmB;IACnB,0BAA0B;IAC1B,iBAAiB;IACjB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;CACnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../../../src/compiler/backend/fastify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAwB3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAStE,wBAAgB,YAAY,CAC1B,OAAO,EAAE,sBAAsB,EAC/B,GAAG,EAAE,gBAAgB,GACpB,eAAe,CAwDjB"}
1
+ {"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../../../src/compiler/backend/fastify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAyB3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAStE,wBAAgB,YAAY,CAC1B,OAAO,EAAE,sBAAsB,EAC/B,GAAG,EAAE,gBAAgB,GACpB,eAAe,CA6DjB"}
@@ -1,4 +1,4 @@
1
- import { appModuleGenerator, axiosGenerator, composeFastifyApplication, dataUtilsGenerator, fastifyPostmarkGenerator, fastifyRedisGenerator, fastifySentryGenerator, fastifyServerGenerator, fastifyStripeGenerator, pothosGenerator, pothosPrismaGenerator, pothosScalarGenerator, pothosSentryGenerator, prismaGenerator, prismaVitestGenerator, readmeGenerator, yogaPluginGenerator, } from '@baseplate-dev/fastify-generators';
1
+ import { appModuleGenerator, authorizerUtilsStubGenerator, axiosGenerator, composeFastifyApplication, dataUtilsGenerator, fastifyPostmarkGenerator, fastifyRedisGenerator, fastifySentryGenerator, fastifyServerGenerator, fastifyStripeGenerator, pothosGenerator, pothosPrismaGenerator, pothosScalarGenerator, pothosSentryGenerator, prismaGenerator, prismaVitestGenerator, readmeGenerator, yogaPluginGenerator, } from '@baseplate-dev/fastify-generators';
2
2
  import { FeatureUtils } from '@baseplate-dev/project-builder-lib';
3
3
  import { safeMergeAll } from '@baseplate-dev/utils';
4
4
  import { getPostgresSettings, getRedisSettings, isRedisEnabled, } from '../infrastructure-utils.js';
@@ -20,6 +20,7 @@ export function buildFastify(builder, app) {
20
20
  ],
21
21
  },
22
22
  });
23
+ const rootChildren = appCompiler.getRootChildren();
23
24
  return composeFastifyApplication({
24
25
  children: safeMergeAll({
25
26
  fastifyServer: fastifyServerGenerator({
@@ -41,6 +42,9 @@ export function buildFastify(builder, app) {
41
42
  }),
42
43
  prismaVitest: prismaVitestGenerator({}),
43
44
  dataUtils: dataUtilsGenerator({}),
45
+ ...('authorizerUtils' in rootChildren
46
+ ? {}
47
+ : { authorizerUtils: authorizerUtilsStubGenerator({}) }),
44
48
  yoga: yogaPluginGenerator({
45
49
  enableSubscriptions: app.enableSubscriptions,
46
50
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"fast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AAC;gBACnE,aAAa;aACd;YACD,MAAM,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;SAClE,EACD,WAAW,CAAC,eAAe,EAAE,CAC9B;KACF,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"fastify.js","sourceRoot":"","sources":["../../../src/compiler/backend/fastify.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC5B,cAAc,EACd,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIpD,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,UAAU,YAAY,CAC1B,OAA+B,EAC/B,GAAqB;IAErB,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IACnD,MAAM,YAAY,GAAG,YAAY,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAErE,sBAAsB;IACtB,MAAM,aAAa,GAAG,kBAAkB,CAAC;QACvC,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE;YACR,WAAW,EAAE;gBACX,qBAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gBACvC,qBAAqB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;gBAC3C,q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gBACJ,CAAC,CAAC,EAAE,eAAe,EAAE,4BAA4B,CAAC,EAAE,CAAC,EAAE,CAAC;YAC1D,IAAI,EAAE,mBAAmB,CAAC;gBACxB,mBAAmB,EAAE,GAAG,CAAC,mBAAmB;aAC7C,CAAC;YACF,MAAM,EAAE,eAAe,CAAC,EAAE,CAAC;YAC3B,YAAY,EAAE,qBAAqB,CAAC,EAAE,CAAC;YACvC,YAAY,EAAE,qBAAqB,CAAC,EAAE,CAAC;YACvC,OAAO,EAAE;gBACP,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;gBACnE,aAAa;aACd;YACD,MAAM,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;SAClE,EACD,WAAW,CAAC,eAAe,EAAE,CAC9B;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"web-compiler.d.ts","sourceRoot":"","sources":["../../../src/compiler/web/web-compiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AA+BvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAmIjD;;;;;;;;;GASG;AACH,qBAAa,kBAAmB,SAAQ,WAAW,CAAC,YAAY,CAAC;IAC/D,OAAO,IAAI,YAAY;IAuBvB,QAAQ,IAAI,YAAY;CAOzB"}
1
+ {"version":3,"file":"web-compiler.d.ts","sourceRoot":"","sources":["../../../src/compiler/web/web-compiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAkCvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAmIjD;;;;;;;;;GASG;AACH,qBAAa,kBAAmB,SAAQ,WAAW,CAAC,YAAY,CAAC;IAC/D,OAAO,IAAI,YAAY;IAwBvB,QAAQ,IAAI,YAAY;CAOzB"}
@@ -1,4 +1,4 @@
1
- import { composeNodeGenerator } from '@baseplate-dev/core-generators';
1
+ import { composeNodeGenerator, vitestGenerator, } from '@baseplate-dev/core-generators';
2
2
  import { AppUtils, FeatureUtils, webAppEntryType, } from '@baseplate-dev/project-builder-lib';
3
3
  import { adminComponentsGenerator, adminHomeGenerator, adminLayoutGenerator, apolloErrorGenerator, apolloErrorLinkGenerator, apolloSentryGenerator, composeReactGenerators, reactApolloGenerator, reactComponentsGenerator, reactRouterGenerator, reactRoutesGenerator, reactSentryGenerator, reactTailwindGenerator, } from '@baseplate-dev/react-generators';
4
4
  import { safeMerge } from '@baseplate-dev/utils';
@@ -127,6 +127,7 @@ export class WebPackageCompiler extends AppCompiler {
127
127
  version: '1.0.0',
128
128
  children: {
129
129
  react: buildReact(appBuilder),
130
+ vitest: vitestGenerator({}),
130
131
  },
131
132
  });
132
133
  return appBuilder.buildProjectEntry(nodeBundle, this.getPackageDirectory());
@@ -1 +1 @@
1
- {"version":3,"file":"web-compiler.js","sourceRoot":"","sources":["../../../src/compiler/web/web-compiler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,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AAM,UAAU,GAAG,+BAA+B,CAChD,IAAI,CAAC,mBAAmB,EACxB,IAAI,CAAC,SAAS,EACd,eAAe,CAChB,CAAC;QAEF,MAAM,EAAE,iBAAiB,EAAE,GAAG,UAAU,CAAC;QACzC,MAAM,eAAe,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC;QAE3D,MAAM,UAAU,GAAG,oBAAoB,CAAC;YACtC,IAAI,EAAE,GAAG,eAAe,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;YACtD,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE;YAClC,WAAW,EAAE,eAAe,eAAe,CAAC,IAAI,EAAE;YAClD,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE;gBACR,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;aAC9B;SACF,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC,iBAAiB,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,QAAQ;QACN,OAAO;YACL,KAAK,EAAE,CAAC,OAAO,CAAC;YAChB,GAAG,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;SACrB,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"web-compiler.js","sourceRoot":"","sources":["../../../src/compiler/web/web-compiler.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,oBAAoB,EACpB,eAAe,GAChB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,GAC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,EACd,eAAe,CAChB,CAAC;QAEF,MAAM,EAAE,iBAAiB,EAAE,GAAG,UAAU,CAAC;QACzC,MAAM,eAAe,GAAG,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC;QAE3D,MAAM,UAAU,GAAG,oBAAoB,CAAC;YACtC,IAAI,EAAE,GAAG,eAAe,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;YACtD,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE;YAClC,WAAW,EAAE,eAAe,eAAe,CAAC,IAAI,EAAE;YAClD,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE;gBACR,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;gBAC7B,MAAM,EAAE,eAAe,CAAC,EAAE,CAAC;aAC5B;SACF,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC,iBAAiB,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,QAAQ;QACN,OAAO;YACL,KAAK,EAAE,CAAC,OAAO,CAAC;YAChB,GAAG,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;SACrB,CAAC;IACJ,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
1
  export declare const devServerRouter: import("@trpc/server").TRPCBuiltRouter<{
2
- ctx: import("../../actions/types.js").ServiceActionContext;
2
+ ctx: import("../../index.js").ServiceActionContext;
3
3
  meta: object;
4
4
  errorShape: {
5
5
  data: {
@@ -16,7 +16,7 @@ export declare const devServerRouter: import("@trpc/server").TRPCBuiltRouter<{
16
16
  transformer: false;
17
17
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
18
18
  diff: import("@trpc/server").TRPCBuiltRouter<{
19
- ctx: import("../../actions/types.js").ServiceActionContext;
19
+ ctx: import("../../index.js").ServiceActionContext;
20
20
  meta: object;
21
21
  errorShape: {
22
22
  data: {
@@ -60,7 +60,7 @@ export declare const devServerRouter: import("@trpc/server").TRPCBuiltRouter<{
60
60
  }>;
61
61
  }>>;
62
62
  templateExtractor: import("@trpc/server").TRPCBuiltRouter<{
63
- ctx: import("../../actions/types.js").ServiceActionContext;
63
+ ctx: import("../../index.js").ServiceActionContext;
64
64
  meta: object;
65
65
  errorShape: {
66
66
  data: {
@@ -117,7 +117,7 @@ export declare const devServerRouter: import("@trpc/server").TRPCBuiltRouter<{
117
117
  }>;
118
118
  }>>;
119
119
  templates: import("@trpc/server").TRPCBuiltRouter<{
120
- ctx: import("../../actions/types.js").ServiceActionContext;
120
+ ctx: import("../../index.js").ServiceActionContext;
121
121
  meta: object;
122
122
  errorShape: {
123
123
  data: {
@@ -221,7 +221,7 @@ export declare const devServerRouter: import("@trpc/server").TRPCBuiltRouter<{
221
221
  }>;
222
222
  }>>;
223
223
  snapshot: import("@trpc/server").TRPCBuiltRouter<{
224
- ctx: import("../../actions/types.js").ServiceActionContext;
224
+ ctx: import("../../index.js").ServiceActionContext;
225
225
  meta: object;
226
226
  errorShape: {
227
227
  data: {
@@ -304,7 +304,7 @@ export declare const devServerRouter: import("@trpc/server").TRPCBuiltRouter<{
304
304
  }>;
305
305
  }>>;
306
306
  project: import("@trpc/server").TRPCBuiltRouter<{
307
- ctx: import("../../actions/types.js").ServiceActionContext;
307
+ ctx: import("../../index.js").ServiceActionContext;
308
308
  meta: object;
309
309
  errorShape: {
310
310
  data: {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
+ export * from './actions/index.js';
1
2
  export * from './api/index.js';
3
+ export * from './compiler/index.js';
2
4
  export * from './constants/index.js';
3
5
  export * from './diff/index.js';
4
6
  export * from './plugins/index.js';
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
+ export * from './actions/index.js';
1
2
  export * from './api/index.js';
3
+ export * from './compiler/index.js';
2
4
  export * from './constants/index.js';
3
5
  export * from './diff/index.js';
4
6
  export * from './plugins/index.js';
@@ -0,0 +1,16 @@
1
+ export interface CreateGeneratorInput {
2
+ name: string;
3
+ directory: string;
4
+ includeTemplates?: boolean;
5
+ }
6
+ export interface CreateGeneratorResult {
7
+ message: string;
8
+ generatorName: string;
9
+ generatorPath: string;
10
+ filesCreated: string[];
11
+ }
12
+ /**
13
+ * Create a new generator with boilerplate code
14
+ */
15
+ export declare function createGenerator(input: CreateGeneratorInput): CreateGeneratorResult;
16
+ //# sourceMappingURL=create-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-generator.d.ts","sourceRoot":"","sources":["../../../src/templates/create/create-generator.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAyHD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,oBAAoB,GAC1B,qBAAqB,CAkGvB"}
@@ -0,0 +1,175 @@
1
+ import { camelCase, constantCase } from 'change-case';
2
+ import { execSync } from 'node:child_process';
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
5
+ import { findMonorepoRoot } from '#src/utils/find-monorepo-root.js';
6
+ /**
7
+ * Parse a generator name in format "category/kebab-name" into its components
8
+ */
9
+ function parseGeneratorName(name) {
10
+ const [category, kebabName] = name.split('/');
11
+ return {
12
+ category,
13
+ kebabName,
14
+ camelCaseName: camelCase(kebabName),
15
+ screamingSnakeName: constantCase(kebabName),
16
+ };
17
+ }
18
+ /**
19
+ * Generate the main generator file content
20
+ */
21
+ function generateGeneratorFileContent(fullName, parsed) {
22
+ return `import { createGenerator, createGeneratorTask } from '@baseplate-dev/sync';
23
+ import { z } from 'zod';
24
+
25
+ import { ${parsed.screamingSnakeName}_GENERATED } from './generated/index.js';
26
+
27
+ const descriptorSchema = z.object({});
28
+
29
+ /**
30
+ * Generator for ${fullName}
31
+ */
32
+ export const ${parsed.camelCaseName}Generator = createGenerator({
33
+ name: '${fullName}',
34
+ generatorFileUrl: import.meta.url,
35
+ descriptorSchema,
36
+ buildTasks: () => ({
37
+ paths: ${parsed.screamingSnakeName}_GENERATED.paths.task,
38
+ renderers: ${parsed.screamingSnakeName}_GENERATED.renderers.task,
39
+ main: createGeneratorTask({
40
+ dependencies: {
41
+ renderers: ${parsed.screamingSnakeName}_GENERATED.renderers.provider,
42
+ },
43
+ run({ renderers }) {
44
+ return {
45
+ build: async (builder) => {
46
+ // Add your generator logic here
47
+ },
48
+ };
49
+ },
50
+ }),
51
+ }),
52
+ });
53
+ `;
54
+ }
55
+ /**
56
+ * Generate the barrel export (index.ts) content
57
+ */
58
+ function generateIndexFileContent(kebabName) {
59
+ return `export * from './${kebabName}.generator.js';
60
+ `;
61
+ }
62
+ /**
63
+ * Generate the placeholder generated/index.ts content
64
+ */
65
+ function generatePlaceholderGeneratedContent(parsed) {
66
+ return `// This file is auto-generated by \`pnpm generate:templates\`
67
+ // Do not edit manually - run the command after adding templates
68
+ export const ${parsed.screamingSnakeName}_GENERATED = undefined as never;
69
+ `;
70
+ }
71
+ /**
72
+ * Generate the extractor.json content
73
+ */
74
+ function generateExtractorJsonContent(fullName) {
75
+ return JSON.stringify({
76
+ name: fullName,
77
+ templates: {},
78
+ }, null, 2);
79
+ }
80
+ /**
81
+ * Generate the category index.ts content or update existing one
82
+ */
83
+ function generateOrUpdateCategoryIndex(categoryDir, kebabName) {
84
+ const indexPath = path.join(categoryDir, 'index.ts');
85
+ const exportLine = `export * from './${kebabName}/index.js';`;
86
+ if (fs.existsSync(indexPath)) {
87
+ const existingContent = fs.readFileSync(indexPath, 'utf-8');
88
+ if (existingContent.includes(exportLine)) {
89
+ return { content: existingContent, isNew: false };
90
+ }
91
+ // Append the new export
92
+ const newContent = `${existingContent.trimEnd()}\n${exportLine}\n`;
93
+ return { content: newContent, isNew: false };
94
+ }
95
+ // Create new index file
96
+ return { content: `${exportLine}\n`, isNew: true };
97
+ }
98
+ /**
99
+ * Create a new generator with boilerplate code
100
+ */
101
+ export function createGenerator(input) {
102
+ const { name, directory, includeTemplates = true } = input;
103
+ // Parse the generator name
104
+ const parsed = parseGeneratorName(name);
105
+ // Resolve the absolute directory path
106
+ let absoluteDirectory;
107
+ if (path.isAbsolute(directory)) {
108
+ absoluteDirectory = directory;
109
+ }
110
+ else {
111
+ // For relative paths, resolve against monorepo root
112
+ const monorepoRoot = findMonorepoRoot();
113
+ if (!monorepoRoot) {
114
+ throw new Error('Could not find monorepo root. Please run from within a pnpm workspace or provide an absolute path.');
115
+ }
116
+ absoluteDirectory = path.resolve(monorepoRoot, directory);
117
+ }
118
+ // Validate the directory exists
119
+ if (!fs.existsSync(absoluteDirectory)) {
120
+ throw new Error(`Directory does not exist: ${absoluteDirectory}`);
121
+ }
122
+ // Create the generator directory structure
123
+ const categoryDir = path.join(absoluteDirectory, parsed.category);
124
+ const generatorDir = path.join(categoryDir, parsed.kebabName);
125
+ if (fs.existsSync(generatorDir)) {
126
+ throw new Error(`Generator directory already exists: ${generatorDir}`);
127
+ }
128
+ const filesCreated = [];
129
+ // Create directories
130
+ fs.mkdirSync(generatorDir, { recursive: true });
131
+ // Create the main generator file
132
+ const generatorFilePath = path.join(generatorDir, `${parsed.kebabName}.generator.ts`);
133
+ fs.writeFileSync(generatorFilePath, generateGeneratorFileContent(name, parsed));
134
+ filesCreated.push(generatorFilePath);
135
+ // Create the index.ts barrel export
136
+ const indexFilePath = path.join(generatorDir, 'index.ts');
137
+ fs.writeFileSync(indexFilePath, generateIndexFileContent(parsed.kebabName));
138
+ filesCreated.push(indexFilePath);
139
+ if (includeTemplates) {
140
+ // Create the generated directory with placeholder
141
+ const generatedDir = path.join(generatorDir, 'generated');
142
+ fs.mkdirSync(generatedDir, { recursive: true });
143
+ const generatedIndexPath = path.join(generatedDir, 'index.ts');
144
+ fs.writeFileSync(generatedIndexPath, generatePlaceholderGeneratedContent(parsed));
145
+ filesCreated.push(generatedIndexPath);
146
+ // Create extractor.json
147
+ const extractorPath = path.join(generatorDir, 'extractor.json');
148
+ fs.writeFileSync(extractorPath, generateExtractorJsonContent(name));
149
+ filesCreated.push(extractorPath);
150
+ }
151
+ // Update or create the category index.ts
152
+ const { content: categoryIndexContent, isNew: isCategoryNew } = generateOrUpdateCategoryIndex(categoryDir, parsed.kebabName);
153
+ const categoryIndexPath = path.join(categoryDir, 'index.ts');
154
+ fs.writeFileSync(categoryIndexPath, categoryIndexContent);
155
+ if (isCategoryNew) {
156
+ filesCreated.push(categoryIndexPath);
157
+ }
158
+ // Format the generated files with Prettier
159
+ try {
160
+ execSync(`pnpm prettier --write "${generatorDir}/**/*"`, {
161
+ stdio: 'pipe',
162
+ cwd: process.cwd(),
163
+ });
164
+ }
165
+ catch {
166
+ // Prettier formatting is best-effort, don't fail if it doesn't work
167
+ }
168
+ return {
169
+ message: `Successfully created generator '${name}' at ${generatorDir}`,
170
+ generatorName: name,
171
+ generatorPath: generatorDir,
172
+ filesCreated,
173
+ };
174
+ }
175
+ //# sourceMappingURL=create-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-generator.js","sourceRoot":"","sources":["../../../src/templates/create/create-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAsBpE;;GAEG;AACH,SAAS,kBAAkB,CAAC,IAAY;IACtC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,C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,CAAC;QACF,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAEtC,wBAAwB;QACxB,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;QAChE,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,4BAA4B,CAAC,IAAI,CAAC,CAAC,CAAC;QACpE,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACnC,CAAC;IAED,yCAAyC;IACzC,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,aAAa,EAAE,GAC3D,6BAA6B,CAAC,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAC/D,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAC7D,EAAE,CAAC,aAAa,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAC;IAC1D,IAAI,aAAa,EAAE,CAAC;QAClB,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IAED,2CAA2C;IAC3C,IAAI,CAAC;QACH,QAAQ,CAAC,0BAA0B,YAAY,QAAQ,EAAE;YACvD,KAAK,EAAE,MAAM;YACb,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;SACnB,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,oEAAoE;IACtE,CAAC;IAED,OAAO;QACL,OAAO,EAAE,mCAAmC,IAAI,QAAQ,YAAY,EAAE;QACtE,aAAa,EAAE,IAAI;QACnB,aAAa,EAAE,YAAY;QAC3B,YAAY;KACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './create-generator.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/create/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './create-generator.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/create/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Find the monorepo root by searching for pnpm-workspace.yaml in ancestor directories.
3
+ * Stops at filesystem root.
4
+ */
5
+ export declare function findMonorepoRoot(startDir?: string): string | undefined;
6
+ //# sourceMappingURL=find-monorepo-root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-monorepo-root.d.ts","sourceRoot":"","sources":["../../src/utils/find-monorepo-root.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,GAAE,MAAsB,GAC/B,MAAM,GAAG,SAAS,CAapB"}
@@ -0,0 +1,19 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ /**
4
+ * Find the monorepo root by searching for pnpm-workspace.yaml in ancestor directories.
5
+ * Stops at filesystem root.
6
+ */
7
+ export function findMonorepoRoot(startDir = process.cwd()) {
8
+ let currentDir = path.resolve(startDir);
9
+ const { root } = path.parse(currentDir);
10
+ while (currentDir !== root) {
11
+ const workspacePath = path.join(currentDir, 'pnpm-workspace.yaml');
12
+ if (fs.existsSync(workspacePath)) {
13
+ return currentDir;
14
+ }
15
+ currentDir = path.dirname(currentDir);
16
+ }
17
+ return undefined;
18
+ }
19
+ //# sourceMappingURL=find-monorepo-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-monorepo-root.js","sourceRoot":"","sources":["../../src/utils/find-monorepo-root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,WAAmB,OAAO,CAAC,GAAG,EAAE;IAEhC,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAExC,OAAO,UAAU,KAAK,IAAI,EAAE,CAAC;QAC3B,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;QACnE,IAAI,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;YACjC,OAAO,UAAU,CAAC;QACpB,CAAC;QACD,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baseplate-dev/project-builder-server",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Server for Project Builder using Baseplate generators",
5
5
  "keywords": [
6
6
  "backend",
@@ -65,12 +65,12 @@
65
65
  "pino": "9.5.0",
66
66
  "ts-morph": "26.0.0",
67
67
  "zod": "^4.1.13",
68
- "@baseplate-dev/core-generators": "0.4.2",
69
- "@baseplate-dev/fastify-generators": "0.4.2",
70
- "@baseplate-dev/project-builder-lib": "0.4.2",
71
- "@baseplate-dev/react-generators": "0.4.2",
72
- "@baseplate-dev/sync": "0.4.2",
73
- "@baseplate-dev/utils": "0.4.2"
68
+ "@baseplate-dev/core-generators": "0.4.4",
69
+ "@baseplate-dev/fastify-generators": "0.4.4",
70
+ "@baseplate-dev/project-builder-lib": "0.4.4",
71
+ "@baseplate-dev/react-generators": "0.4.4",
72
+ "@baseplate-dev/sync": "0.4.4",
73
+ "@baseplate-dev/utils": "0.4.4"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/micromatch": "^4.0.9",
@@ -81,7 +81,7 @@
81
81
  "tsx": "4.20.6",
82
82
  "typescript": "5.8.3",
83
83
  "vitest": "3.2.4",
84
- "@baseplate-dev/tools": "0.4.2"
84
+ "@baseplate-dev/tools": "0.4.4"
85
85
  },
86
86
  "engines": {
87
87
  "node": "^22.0.0"