@ingenyus/swarm-wasp 0.2.6 → 0.2.7

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/.tsbuildinfo +1 -1
  2. package/dist/generators/action/action-generator.js +15 -13
  3. package/dist/generators/action/index.js +15 -13
  4. package/dist/generators/api/api-generator.d.ts.map +1 -1
  5. package/dist/generators/api/api-generator.js +17 -11
  6. package/dist/generators/api/index.js +17 -11
  7. package/dist/generators/api-namespace/api-namespace-generator.d.ts.map +1 -1
  8. package/dist/generators/api-namespace/api-namespace-generator.js +36 -26
  9. package/dist/generators/api-namespace/index.js +36 -26
  10. package/dist/generators/api-namespace/templates/config/api-namespace.eta +1 -1
  11. package/dist/generators/base/component-generator.base.d.ts.map +1 -1
  12. package/dist/generators/base/component-generator.base.js +12 -10
  13. package/dist/generators/base/index.js +15 -13
  14. package/dist/generators/base/operation-generator.base.d.ts +1 -1
  15. package/dist/generators/base/operation-generator.base.js +15 -13
  16. package/dist/generators/crud/crud-generator.js +15 -13
  17. package/dist/generators/crud/index.js +15 -13
  18. package/dist/generators/index.js +30 -18
  19. package/dist/generators/job/index.js +12 -10
  20. package/dist/generators/job/job-generator.js +12 -10
  21. package/dist/generators/query/index.js +15 -13
  22. package/dist/generators/query/query-generator.js +15 -13
  23. package/dist/generators/route/index.js +12 -10
  24. package/dist/generators/route/route-generator.js +12 -10
  25. package/dist/generators/{api-namespace/templates → shared/templates/middleware}/middleware.eta +1 -6
  26. package/dist/index.js +32 -20
  27. package/dist/wasp-config/app.d.ts +1 -1
  28. package/dist/wasp-config/app.d.ts.map +1 -1
  29. package/dist/wasp-config/app.js +2 -2
  30. package/dist/wasp-config/index.js +2 -2
  31. package/package.json +2 -2
  32. package/dist/generators/operation/templates/config/operation.eta +0 -6
  33. /package/dist/generators/{operation/templates → shared/templates/operations}/create.eta +0 -0
  34. /package/dist/generators/{operation/templates → shared/templates/operations}/delete.eta +0 -0
  35. /package/dist/generators/{operation/templates → shared/templates/operations}/get.eta +0 -0
  36. /package/dist/generators/{operation/templates → shared/templates/operations}/getAll.eta +0 -0
  37. /package/dist/generators/{operation/templates → shared/templates/operations}/getFiltered.eta +0 -0
  38. /package/dist/generators/{operation/templates → shared/templates/operations}/update.eta +0 -0
@@ -31,7 +31,6 @@ var CONFIG_TYPES = {
31
31
  import {
32
32
  GeneratorRuntime,
33
33
  hasHelperMethodCall,
34
- toCamelCase,
35
34
  toKebabCase as toKebabCase2,
36
35
  validateFeaturePath as validateFeaturePath3
37
36
  } from "@ingenyus/swarm";
@@ -919,17 +918,20 @@ var ComponentGeneratorBase = class extends WaspGeneratorBase {
919
918
  * Generate middleware file for API or API namespace
920
919
  */
921
920
  async generateMiddlewareFile(targetFile, name, force) {
922
- const replacements = {
923
- name,
924
- middlewareType: toCamelCase(this.componentType || "")
925
- };
926
- await this.renderTemplateToFile(
927
- "middleware.eta",
928
- replacements,
921
+ const templatePath = this.templateUtility.resolveTemplatePath(
922
+ "middleware/middleware.eta",
923
+ "shared",
924
+ import.meta.url
925
+ );
926
+ const fileExists = this.checkFileExists(
929
927
  targetFile,
930
- "Middleware file",
931
- force
928
+ force,
929
+ "Middleware file"
932
930
  );
931
+ const content = this.templateUtility.processTemplate(templatePath, {
932
+ name
933
+ });
934
+ this.writeFile(targetFile, content, "Middleware file", fileExists);
933
935
  }
934
936
  };
935
937
 
@@ -31,7 +31,6 @@ var CONFIG_TYPES = {
31
31
  import {
32
32
  GeneratorRuntime,
33
33
  hasHelperMethodCall,
34
- toCamelCase,
35
34
  toKebabCase as toKebabCase2,
36
35
  validateFeaturePath as validateFeaturePath3
37
36
  } from "@ingenyus/swarm";
@@ -919,17 +918,20 @@ var ComponentGeneratorBase = class extends WaspGeneratorBase {
919
918
  * Generate middleware file for API or API namespace
920
919
  */
921
920
  async generateMiddlewareFile(targetFile, name, force) {
922
- const replacements = {
923
- name,
924
- middlewareType: toCamelCase(this.componentType || "")
925
- };
926
- await this.renderTemplateToFile(
927
- "middleware.eta",
928
- replacements,
921
+ const templatePath = this.templateUtility.resolveTemplatePath(
922
+ "middleware/middleware.eta",
923
+ "shared",
924
+ import.meta.url
925
+ );
926
+ const fileExists = this.checkFileExists(
929
927
  targetFile,
930
- "Middleware file",
931
- force
928
+ force,
929
+ "Middleware file"
932
930
  );
931
+ const content = this.templateUtility.processTemplate(templatePath, {
932
+ name
933
+ });
934
+ this.writeFile(targetFile, content, "Middleware file", fileExists);
933
935
  }
934
936
  };
935
937
 
@@ -42,7 +42,6 @@ var CONFIG_TYPES = {
42
42
  import {
43
43
  GeneratorRuntime,
44
44
  hasHelperMethodCall,
45
- toCamelCase,
46
45
  toKebabCase as toKebabCase2,
47
46
  validateFeaturePath as validateFeaturePath3
48
47
  } from "@ingenyus/swarm";
@@ -1070,17 +1069,20 @@ var ComponentGeneratorBase = class extends WaspGeneratorBase {
1070
1069
  * Generate middleware file for API or API namespace
1071
1070
  */
1072
1071
  async generateMiddlewareFile(targetFile, name, force) {
1073
- const replacements = {
1074
- name,
1075
- middlewareType: toCamelCase(this.componentType || "")
1076
- };
1077
- await this.renderTemplateToFile(
1078
- "middleware.eta",
1079
- replacements,
1072
+ const templatePath = this.templateUtility.resolveTemplatePath(
1073
+ "middleware/middleware.eta",
1074
+ "shared",
1075
+ import.meta.url
1076
+ );
1077
+ const fileExists = this.checkFileExists(
1080
1078
  targetFile,
1081
- "Middleware file",
1082
- force
1079
+ force,
1080
+ "Middleware file"
1083
1081
  );
1082
+ const content = this.templateUtility.processTemplate(templatePath, {
1083
+ name
1084
+ });
1085
+ this.writeFile(targetFile, content, "Middleware file", fileExists);
1084
1086
  }
1085
1087
  };
1086
1088
 
@@ -1110,13 +1112,13 @@ var OperationGeneratorBase = class extends ComponentGeneratorBase {
1110
1112
  }
1111
1113
  /**
1112
1114
  * Gets the template path for operation templates.
1113
- * This method resolves operation templates to the operation generator's directory
1115
+ * This method resolves operation templates to the shared templates directory
1114
1116
  * instead of the current generator's directory.
1115
1117
  */
1116
1118
  getOperationTemplatePath(templateName) {
1117
1119
  return this.templateUtility.resolveTemplatePath(
1118
- templateName,
1119
- "operation",
1120
+ `operations/${templateName}`,
1121
+ "shared",
1120
1122
  import.meta.url
1121
1123
  );
1122
1124
  }
@@ -42,7 +42,6 @@ var CONFIG_TYPES = {
42
42
  import {
43
43
  GeneratorRuntime,
44
44
  hasHelperMethodCall,
45
- toCamelCase,
46
45
  toKebabCase as toKebabCase2,
47
46
  validateFeaturePath as validateFeaturePath3
48
47
  } from "@ingenyus/swarm";
@@ -1070,17 +1069,20 @@ var ComponentGeneratorBase = class extends WaspGeneratorBase {
1070
1069
  * Generate middleware file for API or API namespace
1071
1070
  */
1072
1071
  async generateMiddlewareFile(targetFile, name, force) {
1073
- const replacements = {
1074
- name,
1075
- middlewareType: toCamelCase(this.componentType || "")
1076
- };
1077
- await this.renderTemplateToFile(
1078
- "middleware.eta",
1079
- replacements,
1072
+ const templatePath = this.templateUtility.resolveTemplatePath(
1073
+ "middleware/middleware.eta",
1074
+ "shared",
1075
+ import.meta.url
1076
+ );
1077
+ const fileExists = this.checkFileExists(
1080
1078
  targetFile,
1081
- "Middleware file",
1082
- force
1079
+ force,
1080
+ "Middleware file"
1083
1081
  );
1082
+ const content = this.templateUtility.processTemplate(templatePath, {
1083
+ name
1084
+ });
1085
+ this.writeFile(targetFile, content, "Middleware file", fileExists);
1084
1086
  }
1085
1087
  };
1086
1088
 
@@ -1110,13 +1112,13 @@ var OperationGeneratorBase = class extends ComponentGeneratorBase {
1110
1112
  }
1111
1113
  /**
1112
1114
  * Gets the template path for operation templates.
1113
- * This method resolves operation templates to the operation generator's directory
1115
+ * This method resolves operation templates to the shared templates directory
1114
1116
  * instead of the current generator's directory.
1115
1117
  */
1116
1118
  getOperationTemplatePath(templateName) {
1117
1119
  return this.templateUtility.resolveTemplatePath(
1118
- templateName,
1119
- "operation",
1120
+ `operations/${templateName}`,
1121
+ "shared",
1120
1122
  import.meta.url
1121
1123
  );
1122
1124
  }
@@ -203,7 +203,6 @@ var TemplateUtility = class {
203
203
  import {
204
204
  GeneratorRuntime,
205
205
  hasHelperMethodCall,
206
- toCamelCase,
207
206
  toKebabCase as toKebabCase2,
208
207
  validateFeaturePath as validateFeaturePath3
209
208
  } from "@ingenyus/swarm";
@@ -930,17 +929,20 @@ var ComponentGeneratorBase = class extends WaspGeneratorBase {
930
929
  * Generate middleware file for API or API namespace
931
930
  */
932
931
  async generateMiddlewareFile(targetFile, name, force) {
933
- const replacements = {
934
- name,
935
- middlewareType: toCamelCase(this.componentType || "")
936
- };
937
- await this.renderTemplateToFile(
938
- "middleware.eta",
939
- replacements,
932
+ const templatePath = this.templateUtility.resolveTemplatePath(
933
+ "middleware/middleware.eta",
934
+ "shared",
935
+ import.meta.url
936
+ );
937
+ const fileExists = this.checkFileExists(
940
938
  targetFile,
941
- "Middleware file",
942
- force
939
+ force,
940
+ "Middleware file"
943
941
  );
942
+ const content = this.templateUtility.processTemplate(templatePath, {
943
+ name
944
+ });
945
+ this.writeFile(targetFile, content, "Middleware file", fileExists);
944
946
  }
945
947
  };
946
948
 
@@ -203,7 +203,6 @@ var TemplateUtility = class {
203
203
  import {
204
204
  GeneratorRuntime,
205
205
  hasHelperMethodCall,
206
- toCamelCase,
207
206
  toKebabCase as toKebabCase2,
208
207
  validateFeaturePath as validateFeaturePath3
209
208
  } from "@ingenyus/swarm";
@@ -930,17 +929,20 @@ var ComponentGeneratorBase = class extends WaspGeneratorBase {
930
929
  * Generate middleware file for API or API namespace
931
930
  */
932
931
  async generateMiddlewareFile(targetFile, name, force) {
933
- const replacements = {
934
- name,
935
- middlewareType: toCamelCase(this.componentType || "")
936
- };
937
- await this.renderTemplateToFile(
938
- "middleware.eta",
939
- replacements,
932
+ const templatePath = this.templateUtility.resolveTemplatePath(
933
+ "middleware/middleware.eta",
934
+ "shared",
935
+ import.meta.url
936
+ );
937
+ const fileExists = this.checkFileExists(
940
938
  targetFile,
941
- "Middleware file",
942
- force
939
+ force,
940
+ "Middleware file"
943
941
  );
942
+ const content = this.templateUtility.processTemplate(templatePath, {
943
+ name
944
+ });
945
+ this.writeFile(targetFile, content, "Middleware file", fileExists);
944
946
  }
945
947
  };
946
948
 
@@ -1,19 +1,14 @@
1
- <% if (middlewareType === 'apiNamespace') { -%>
2
1
  import type { RequestHandler } from "express";
3
- <% } -%>
4
2
  import type { MiddlewareConfigFn } from "wasp/server";
5
3
 
6
4
  export const <%=name%>: MiddlewareConfigFn = (middlewareConfig) => {
7
- <%- if (middlewareType === 'apiNamespace') { %>
8
5
  const <%=name%>Middleware: RequestHandler = (_req, _res, next) => {
9
6
  // TODO: Add your custom logic here
10
7
  next();
11
8
  };
12
9
 
13
10
  middlewareConfig.set("<%=name%>.middleware", <%=name%>Middleware);
14
- <%- } else { %>
15
- // TODO: Add your custom logic here
16
- <%- } %>
17
11
 
18
12
  return middlewareConfig;
19
13
  };
14
+
package/dist/index.js CHANGED
@@ -61,7 +61,6 @@ var CONFIG_TYPES = {
61
61
  import {
62
62
  GeneratorRuntime,
63
63
  hasHelperMethodCall,
64
- toCamelCase,
65
64
  toKebabCase as toKebabCase2,
66
65
  validateFeaturePath as validateFeaturePath3
67
66
  } from "@ingenyus/swarm";
@@ -1094,17 +1093,20 @@ var ComponentGeneratorBase = class extends WaspGeneratorBase {
1094
1093
  * Generate middleware file for API or API namespace
1095
1094
  */
1096
1095
  async generateMiddlewareFile(targetFile, name, force) {
1097
- const replacements = {
1098
- name,
1099
- middlewareType: toCamelCase(this.componentType || "")
1100
- };
1101
- await this.renderTemplateToFile(
1102
- "middleware.eta",
1103
- replacements,
1096
+ const templatePath = this.templateUtility.resolveTemplatePath(
1097
+ "middleware/middleware.eta",
1098
+ "shared",
1099
+ import.meta.url
1100
+ );
1101
+ const fileExists = this.checkFileExists(
1104
1102
  targetFile,
1105
- "Middleware file",
1106
- force
1103
+ force,
1104
+ "Middleware file"
1107
1105
  );
1106
+ const content = this.templateUtility.processTemplate(templatePath, {
1107
+ name
1108
+ });
1109
+ this.writeFile(targetFile, content, "Middleware file", fileExists);
1108
1110
  }
1109
1111
  };
1110
1112
 
@@ -1134,13 +1136,13 @@ var OperationGeneratorBase = class extends ComponentGeneratorBase {
1134
1136
  }
1135
1137
  /**
1136
1138
  * Gets the template path for operation templates.
1137
- * This method resolves operation templates to the operation generator's directory
1139
+ * This method resolves operation templates to the shared templates directory
1138
1140
  * instead of the current generator's directory.
1139
1141
  */
1140
1142
  getOperationTemplatePath(templateName) {
1141
1143
  return this.templateUtility.resolveTemplatePath(
1142
- templateName,
1143
- "operation",
1144
+ `operations/${templateName}`,
1145
+ "shared",
1144
1146
  import.meta.url
1145
1147
  );
1146
1148
  }
@@ -1489,7 +1491,11 @@ var ApiGenerator = class extends ComponentGeneratorBase {
1489
1491
  const targetFile = `${apiTargetDirectory}/${fileName}`;
1490
1492
  await this.generateApiFile(targetFile, apiName, args);
1491
1493
  if (args.customMiddleware) {
1492
- const { targetDirectory: middlewareTargetDirectory } = this.ensureTargetDirectory(args.feature, "middleware");
1494
+ const middlewareTargetDirectory = this.path.join(
1495
+ apiTargetDirectory,
1496
+ "middleware"
1497
+ );
1498
+ ensureDirectoryExists(this.fileSystem, middlewareTargetDirectory);
1493
1499
  const middlewareFile = `${middlewareTargetDirectory}/${apiName}.ts`;
1494
1500
  this.generateMiddlewareFile(
1495
1501
  middlewareFile,
@@ -1614,11 +1620,17 @@ var ApiNamespaceGenerator = class extends ComponentGeneratorBase {
1614
1620
  namespaceName,
1615
1621
  async () => {
1616
1622
  const configPath = this.validateFeatureConfig(feature);
1617
- const { targetDirectory, importDirectory } = this.ensureTargetDirectory(
1618
- feature,
1623
+ const {
1624
+ targetDirectory: apiTargetDirectory,
1625
+ importDirectory: apiImportDirectory
1626
+ } = this.ensureTargetDirectory(feature, "api");
1627
+ const middlewareTargetDirectory = path7.join(
1628
+ apiTargetDirectory,
1619
1629
  "middleware"
1620
1630
  );
1621
- const targetFile = `${targetDirectory}/${namespaceName}.ts`;
1631
+ ensureDirectoryExists(this.fileSystem, middlewareTargetDirectory);
1632
+ const importDirectory = `${apiImportDirectory}/middleware`;
1633
+ const targetFile = `${middlewareTargetDirectory}/${namespaceName}.ts`;
1622
1634
  await this.generateMiddlewareFile(
1623
1635
  targetFile,
1624
1636
  namespaceName,
@@ -1636,7 +1648,7 @@ var ApiNamespaceGenerator = class extends ComponentGeneratorBase {
1636
1648
  }
1637
1649
  async updateConfigFile(namespaceName, importDirectory, namespacePath, args, configFilePath) {
1638
1650
  const { force = false } = args;
1639
- const importPath = path7.join(importDirectory, namespaceName);
1651
+ const importPath = `${importDirectory}/${namespaceName}`;
1640
1652
  const definition = await this.getDefinition(
1641
1653
  namespaceName,
1642
1654
  importPath,
@@ -2321,7 +2333,7 @@ var App = class _App extends WaspApp {
2321
2333
  const middlewareImportPath = this.getFeatureImportPath(
2322
2334
  featureName,
2323
2335
  "server",
2324
- "middleware",
2336
+ path8.join("apis", "middleware"),
2325
2337
  name
2326
2338
  );
2327
2339
  super.api(name, {
@@ -2463,7 +2475,7 @@ var App = class _App extends WaspApp {
2463
2475
  const importPath = this.getFeatureImportPath(
2464
2476
  featureName,
2465
2477
  "server",
2466
- "middleware",
2478
+ path8.join("apis", "middleware"),
2467
2479
  name
2468
2480
  );
2469
2481
  super.apiNamespace(name, {
@@ -30,7 +30,7 @@ interface OperationOptions {
30
30
  }
31
31
  interface JobOptions {
32
32
  entities?: string[];
33
- cron: string;
33
+ cron?: string;
34
34
  args?: Record<string, unknown>;
35
35
  }
36
36
  interface ApiNamespaceOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/wasp-config/app.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,WAAW,EACX,GAAG,IAAI,OAAO,EAC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BjB;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAoDxC;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;CAe3B"}
@@ -109,7 +109,7 @@ var App = class _App extends WaspApp {
109
109
  const middlewareImportPath = this.getFeatureImportPath(
110
110
  featureName,
111
111
  "server",
112
- "middleware",
112
+ path.join("apis", "middleware"),
113
113
  name
114
114
  );
115
115
  super.api(name, {
@@ -251,7 +251,7 @@ var App = class _App extends WaspApp {
251
251
  const importPath = this.getFeatureImportPath(
252
252
  featureName,
253
253
  "server",
254
- "middleware",
254
+ path.join("apis", "middleware"),
255
255
  name
256
256
  );
257
257
  super.apiNamespace(name, {
@@ -109,7 +109,7 @@ var App = class _App extends WaspApp {
109
109
  const middlewareImportPath = this.getFeatureImportPath(
110
110
  featureName,
111
111
  "server",
112
- "middleware",
112
+ path.join("apis", "middleware"),
113
113
  name
114
114
  );
115
115
  super.api(name, {
@@ -251,7 +251,7 @@ var App = class _App extends WaspApp {
251
251
  const importPath = this.getFeatureImportPath(
252
252
  featureName,
253
253
  "server",
254
- "middleware",
254
+ path.join("apis", "middleware"),
255
255
  name
256
256
  );
257
257
  super.apiNamespace(name, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ingenyus/swarm-wasp",
3
3
  "type": "module",
4
- "version": "0.2.6",
4
+ "version": "0.2.7",
5
5
  "description": "Wasp-specific plugins for Swarm - Feature generators, commands, MCP tools, and enhanced Wasp configuration for Wasp development",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -43,7 +43,7 @@
43
43
  "@mrleebo/prisma-ast": "^0.13.0",
44
44
  "eta": "^4.0.1",
45
45
  "zod": "^4.1.11",
46
- "@ingenyus/swarm": "0.3.1"
46
+ "@ingenyus/swarm": "0.3.2"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "wasp-config": "*"
@@ -1,6 +0,0 @@
1
- .add<%=operationType%>(feature, "<%=operationName%>", {
2
- <%- if (entities.length > 0) { %>
3
- entities: [<%=entities%>],
4
- <%- } %>
5
- auth: <%=auth%>,
6
- })