@feathersjs/generators 5.0.14 → 5.0.16

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 (158) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/lib/app/index.d.ts +19 -27
  3. package/lib/app/index.js +25 -30
  4. package/lib/app/index.js.map +1 -1
  5. package/lib/app/index.ts +17 -8
  6. package/lib/app/templates/app.test.tpl.d.ts +5 -2
  7. package/lib/app/templates/app.test.tpl.js +3 -7
  8. package/lib/app/templates/app.test.tpl.js.map +1 -1
  9. package/lib/app/templates/app.test.tpl.ts +4 -4
  10. package/lib/app/templates/app.tpl.d.ts +1 -1
  11. package/lib/app/templates/app.tpl.js +3 -7
  12. package/lib/app/templates/app.tpl.js.map +1 -1
  13. package/lib/app/templates/app.tpl.ts +4 -4
  14. package/lib/app/templates/channels.tpl.d.ts +1 -1
  15. package/lib/app/templates/channels.tpl.js +3 -7
  16. package/lib/app/templates/channels.tpl.js.map +1 -1
  17. package/lib/app/templates/channels.tpl.ts +4 -4
  18. package/lib/app/templates/client.test.tpl.d.ts +1 -1
  19. package/lib/app/templates/client.test.tpl.js +3 -7
  20. package/lib/app/templates/client.test.tpl.js.map +1 -1
  21. package/lib/app/templates/client.test.tpl.ts +4 -4
  22. package/lib/app/templates/client.tpl.d.ts +1 -1
  23. package/lib/app/templates/client.tpl.js +3 -7
  24. package/lib/app/templates/client.tpl.js.map +1 -1
  25. package/lib/app/templates/client.tpl.ts +4 -4
  26. package/lib/app/templates/configuration.tpl.d.ts +1 -1
  27. package/lib/app/templates/configuration.tpl.js +7 -11
  28. package/lib/app/templates/configuration.tpl.js.map +1 -1
  29. package/lib/app/templates/configuration.tpl.ts +4 -4
  30. package/lib/app/templates/declarations.tpl.d.ts +1 -1
  31. package/lib/app/templates/declarations.tpl.js +2 -6
  32. package/lib/app/templates/declarations.tpl.js.map +1 -1
  33. package/lib/app/templates/declarations.tpl.ts +3 -3
  34. package/lib/app/templates/index.html.tpl.d.ts +5 -2
  35. package/lib/app/templates/index.html.tpl.js +2 -6
  36. package/lib/app/templates/index.html.tpl.js.map +1 -1
  37. package/lib/app/templates/index.html.tpl.ts +3 -3
  38. package/lib/app/templates/index.tpl.d.ts +1 -1
  39. package/lib/app/templates/index.tpl.js +3 -7
  40. package/lib/app/templates/index.tpl.js.map +1 -1
  41. package/lib/app/templates/index.tpl.ts +4 -4
  42. package/lib/app/templates/logger.tpl.d.ts +1 -1
  43. package/lib/app/templates/logger.tpl.js +6 -10
  44. package/lib/app/templates/logger.tpl.js.map +1 -1
  45. package/lib/app/templates/logger.tpl.ts +4 -4
  46. package/lib/app/templates/package.json.tpl.d.ts +5 -2
  47. package/lib/app/templates/package.json.tpl.js +2 -6
  48. package/lib/app/templates/package.json.tpl.js.map +1 -1
  49. package/lib/app/templates/package.json.tpl.ts +3 -3
  50. package/lib/app/templates/prettierrc.tpl.d.ts +1 -1
  51. package/lib/app/templates/prettierrc.tpl.js +5 -9
  52. package/lib/app/templates/prettierrc.tpl.js.map +1 -1
  53. package/lib/app/templates/prettierrc.tpl.ts +4 -4
  54. package/lib/app/templates/readme.md.tpl.d.ts +5 -2
  55. package/lib/app/templates/readme.md.tpl.js +2 -6
  56. package/lib/app/templates/readme.md.tpl.js.map +1 -1
  57. package/lib/app/templates/readme.md.tpl.ts +3 -3
  58. package/lib/app/templates/services.tpl.d.ts +1 -1
  59. package/lib/app/templates/services.tpl.js +3 -7
  60. package/lib/app/templates/services.tpl.js.map +1 -1
  61. package/lib/app/templates/services.tpl.ts +4 -4
  62. package/lib/app/templates/tsconfig.json.tpl.d.ts +1 -1
  63. package/lib/app/templates/tsconfig.json.tpl.js +3 -7
  64. package/lib/app/templates/tsconfig.json.tpl.js.map +1 -1
  65. package/lib/app/templates/tsconfig.json.tpl.ts +3 -3
  66. package/lib/app/templates/validators.tpl.d.ts +1 -1
  67. package/lib/app/templates/validators.tpl.js +3 -7
  68. package/lib/app/templates/validators.tpl.js.map +1 -1
  69. package/lib/app/templates/validators.tpl.ts +4 -4
  70. package/lib/authentication/index.d.ts +10 -10
  71. package/lib/authentication/index.js +16 -19
  72. package/lib/authentication/index.js.map +1 -1
  73. package/lib/authentication/index.ts +65 -56
  74. package/lib/authentication/templates/authentication.tpl.d.ts +1 -1
  75. package/lib/authentication/templates/authentication.tpl.js +11 -15
  76. package/lib/authentication/templates/authentication.tpl.js.map +1 -1
  77. package/lib/authentication/templates/authentication.tpl.ts +5 -5
  78. package/lib/authentication/templates/client.test.tpl.d.ts +1 -1
  79. package/lib/authentication/templates/client.test.tpl.js +7 -11
  80. package/lib/authentication/templates/client.test.tpl.js.map +1 -1
  81. package/lib/authentication/templates/client.test.tpl.ts +5 -5
  82. package/lib/authentication/templates/config.tpl.d.ts +1 -1
  83. package/lib/authentication/templates/config.tpl.js +8 -15
  84. package/lib/authentication/templates/config.tpl.js.map +1 -1
  85. package/lib/authentication/templates/config.tpl.ts +3 -3
  86. package/lib/authentication/templates/declarations.tpl.d.ts +1 -1
  87. package/lib/authentication/templates/declarations.tpl.js +5 -9
  88. package/lib/authentication/templates/declarations.tpl.js.map +1 -1
  89. package/lib/authentication/templates/declarations.tpl.ts +3 -3
  90. package/lib/commons.d.ts +10 -2
  91. package/lib/commons.js +43 -76
  92. package/lib/commons.js.map +1 -1
  93. package/lib/commons.ts +22 -4
  94. package/lib/connection/index.d.ts +1 -1
  95. package/lib/connection/index.js +24 -30
  96. package/lib/connection/index.js.map +1 -1
  97. package/lib/connection/index.ts +10 -4
  98. package/lib/connection/templates/knex.tpl.d.ts +1 -1
  99. package/lib/connection/templates/knex.tpl.js +13 -20
  100. package/lib/connection/templates/knex.tpl.js.map +1 -1
  101. package/lib/connection/templates/knex.tpl.ts +4 -4
  102. package/lib/connection/templates/mongodb.tpl.d.ts +1 -1
  103. package/lib/connection/templates/mongodb.tpl.js +10 -14
  104. package/lib/connection/templates/mongodb.tpl.js.map +1 -1
  105. package/lib/connection/templates/mongodb.tpl.ts +4 -4
  106. package/lib/hook/index.d.ts +6 -6
  107. package/lib/hook/index.js +13 -17
  108. package/lib/hook/index.js.map +1 -1
  109. package/lib/hook/index.ts +7 -3
  110. package/lib/hook/templates/hook.tpl.d.ts +1 -1
  111. package/lib/hook/templates/hook.tpl.js +3 -7
  112. package/lib/hook/templates/hook.tpl.js.map +1 -1
  113. package/lib/hook/templates/hook.tpl.ts +4 -4
  114. package/lib/index.d.ts +7 -7
  115. package/lib/index.js +7 -36
  116. package/lib/index.js.map +1 -1
  117. package/lib/index.ts +7 -7
  118. package/lib/service/index.d.ts +1 -1
  119. package/lib/service/index.js +27 -31
  120. package/lib/service/index.js.map +1 -1
  121. package/lib/service/index.ts +94 -92
  122. package/lib/service/templates/client.tpl.d.ts +1 -1
  123. package/lib/service/templates/client.tpl.js +4 -8
  124. package/lib/service/templates/client.tpl.js.map +1 -1
  125. package/lib/service/templates/client.tpl.ts +4 -4
  126. package/lib/service/templates/schema.json.tpl.d.ts +1 -1
  127. package/lib/service/templates/schema.json.tpl.js +10 -14
  128. package/lib/service/templates/schema.json.tpl.js.map +1 -1
  129. package/lib/service/templates/schema.json.tpl.ts +4 -4
  130. package/lib/service/templates/schema.typebox.tpl.d.ts +1 -1
  131. package/lib/service/templates/schema.typebox.tpl.js +8 -12
  132. package/lib/service/templates/schema.typebox.tpl.js.map +1 -1
  133. package/lib/service/templates/schema.typebox.tpl.ts +4 -4
  134. package/lib/service/templates/service.tpl.d.ts +1 -1
  135. package/lib/service/templates/service.tpl.js +9 -14
  136. package/lib/service/templates/service.tpl.js.map +1 -1
  137. package/lib/service/templates/service.tpl.ts +4 -4
  138. package/lib/service/templates/shared.tpl.d.ts +1 -1
  139. package/lib/service/templates/shared.tpl.js +3 -7
  140. package/lib/service/templates/shared.tpl.js.map +1 -1
  141. package/lib/service/templates/shared.tpl.ts +4 -4
  142. package/lib/service/templates/test.tpl.d.ts +1 -1
  143. package/lib/service/templates/test.tpl.js +3 -7
  144. package/lib/service/templates/test.tpl.js.map +1 -1
  145. package/lib/service/templates/test.tpl.ts +4 -4
  146. package/lib/service/type/custom.tpl.d.ts +1 -1
  147. package/lib/service/type/custom.tpl.js +4 -9
  148. package/lib/service/type/custom.tpl.js.map +1 -1
  149. package/lib/service/type/custom.tpl.ts +4 -4
  150. package/lib/service/type/knex.tpl.d.ts +1 -1
  151. package/lib/service/type/knex.tpl.js +6 -11
  152. package/lib/service/type/knex.tpl.js.map +1 -1
  153. package/lib/service/type/knex.tpl.ts +4 -4
  154. package/lib/service/type/mongodb.tpl.d.ts +1 -1
  155. package/lib/service/type/mongodb.tpl.js +4 -9
  156. package/lib/service/type/mongodb.tpl.js.map +1 -1
  157. package/lib/service/type/mongodb.tpl.ts +4 -4
  158. package/package.json +30 -29
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
1
+ import { toFile, when, renderTemplate } from '@featherscloud/pinion';
5
2
  const template = ({ framework, schema }) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/typescript.html
6
3
  import { HookContext as FeathersHookContext, NextFunction } from '@feathersjs/feathers'
7
4
  import { Application as FeathersApplication } from '@feathersjs/${framework}'
@@ -25,6 +22,5 @@ export type Application = FeathersApplication<ServiceTypes, Configuration>
25
22
  // The context for hook functions - can be typed with a service class
26
23
  export type HookContext<S = any> = FeathersHookContext<Application, S>
27
24
  `;
28
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, pinion_1.when)(({ language }) => language === 'ts', (0, pinion_1.renderTemplate)(template, (0, pinion_1.toFile)(({ lib }) => lib, 'declarations.ts'))));
29
- exports.generate = generate;
25
+ export const generate = (ctx) => Promise.resolve(ctx).then(when(({ language }) => language === 'ts', renderTemplate(template, toFile(({ lib }) => lib, 'declarations.ts'))));
30
26
  //# sourceMappingURL=declarations.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"declarations.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/declarations.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAA4E;AAG5E,MAAM,QAAQ,GAAG,CAAC,EAChB,SAAS,EACT,MAAM,EACc,EAAE,EAAE,CAAC,QAAQ,CAAC;;kEAE8B,SAAS;EAEzE,MAAM,KAAK,KAAK;IACd,CAAC,CAAC,qCAAqC;IACvC,CAAC,CAAC,4DACN;;;;;;;;;;;;;;;;;CAiBC,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,aAAI,EACF,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,KAAK,IAAI,EACnC,IAAA,uBAAc,EACZ,QAAQ,EACR,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,CACjE,CACF,CACF,CAAA;AATU,QAAA,QAAQ,YASlB"}
1
+ {"version":3,"file":"declarations.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/declarations.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGpE,MAAM,QAAQ,GAAG,CAAC,EAChB,SAAS,EACT,MAAM,EACc,EAAE,EAAE,CAAC,QAAQ,CAAC;;kEAE8B,SAAS;EAEzE,MAAM,KAAK,KAAK;IACd,CAAC,CAAC,qCAAqC;IACvC,CAAC,CAAC,4DACN;;;;;;;;;;;;;;;;;CAiBC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CACvB,IAAI,CACF,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,KAAK,IAAI,EACnC,cAAc,CACZ,QAAQ,EACR,MAAM,CAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,CACjE,CACF,CACF,CAAA"}
@@ -1,5 +1,5 @@
1
- import { generator, toFile, when, renderTemplate } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
1
+ import { toFile, when, renderTemplate } from '@featherscloud/pinion'
2
+ import { AppGeneratorContext } from '../index.js'
3
3
 
4
4
  const template = ({
5
5
  framework,
@@ -31,7 +31,7 @@ export type HookContext<S = any> = FeathersHookContext<Application, S>
31
31
  `
32
32
 
33
33
  export const generate = (ctx: AppGeneratorContext) =>
34
- generator(ctx).then(
34
+ Promise.resolve(ctx).then(
35
35
  when<AppGeneratorContext>(
36
36
  ({ language }) => language === 'ts',
37
37
  renderTemplate(
@@ -1,2 +1,5 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
1
+ import { AppGeneratorContext } from '../index.js';
2
+ export declare const generate: (ctx: AppGeneratorContext) => Promise<import("../../commons.js").FeathersBaseContext & import("../index.js").AppGeneratorData & {
3
+ dependencies: string[];
4
+ devDependencies: string[];
5
+ }>;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
1
+ import { renderTemplate, toFile } from '@featherscloud/pinion';
5
2
  const template = ({ name, description }) => /* html */ `<!DOCTYPE html>
6
3
  <html lang="en">
7
4
  <head>
@@ -40,6 +37,5 @@ const template = ({ name, description }) => /* html */ `<!DOCTYPE html>
40
37
  </html>
41
38
 
42
39
  `;
43
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, pinion_1.renderTemplate)(template, (0, pinion_1.toFile)('public', 'index.html')));
44
- exports.generate = generate;
40
+ export const generate = (ctx) => Promise.resolve(ctx).then(renderTemplate(template, toFile('public', 'index.html')));
45
41
  //# sourceMappingURL=index.html.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.html.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/index.html.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsE;AAGtE,MAAM,QAAQ,GAAG,CAAC,EAAE,IAAI,EAAE,WAAW,EAAuB,EAAE,EAAE,CAAC,UAAU,CAAC;;;aAG/D,IAAI;wCACuB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiClD,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,uBAAc,EAAC,QAAQ,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;AADlE,QAAA,QAAQ,YAC0D"}
1
+ {"version":3,"file":"index.html.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/index.html.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAG9D,MAAM,QAAQ,GAAG,CAAC,EAAE,IAAI,EAAE,WAAW,EAAuB,EAAE,EAAE,CAAC,UAAU,CAAC;;;aAG/D,IAAI;wCACuB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiClD,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
- import { generator, renderTemplate, toFile } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
1
+ import { renderTemplate, toFile } from '@featherscloud/pinion'
2
+ import { AppGeneratorContext } from '../index.js'
3
3
 
4
4
  const template = ({ name, description }: AppGeneratorContext) => /* html */ `<!DOCTYPE html>
5
5
  <html lang="en">
@@ -41,4 +41,4 @@ const template = ({ name, description }: AppGeneratorContext) => /* html */ `<!D
41
41
  `
42
42
 
43
43
  export const generate = (ctx: AppGeneratorContext) =>
44
- generator(ctx).then(renderTemplate(template, toFile('public', 'index.html')))
44
+ Promise.resolve(ctx).then(renderTemplate(template, toFile('public', 'index.html')))
@@ -1,2 +1,2 @@
1
- import { AppGeneratorContext } from '../index';
1
+ import { AppGeneratorContext } from '../index.js';
2
2
  export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const commons_1 = require("../../commons");
1
+ import { toFile } from '@featherscloud/pinion';
2
+ import { renderSource } from '../../commons.js';
6
3
  const template = ({}) => /* ts */ `import { app } from './app'
7
4
  import { logger } from './logger'
8
5
 
@@ -17,6 +14,5 @@ app.listen(port).then(() => {
17
14
  logger.info(\`Feathers app listening on http://\${host}:\${port}\`)
18
15
  })
19
16
  `;
20
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, commons_1.renderSource)(template, (0, pinion_1.toFile)(({ lib }) => lib, 'index')));
21
- exports.generate = generate;
17
+ export const generate = (ctx) => Promise.resolve(ctx).then(renderSource(template, toFile(({ lib }) => lib, 'index')));
22
18
  //# sourceMappingURL=index.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/index.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;;CAatD,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,sBAAY,EACV,QAAQ,EACR,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,CACvD,CACF,CAAA;AANU,QAAA,QAAQ,YAMlB"}
1
+ {"version":3,"file":"index.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/index.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAG/C,MAAM,QAAQ,GAAG,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;;CAatD,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CACvB,YAAY,CACV,QAAQ,EACR,MAAM,CAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,CACvD,CACF,CAAA"}
@@ -1,6 +1,6 @@
1
- import { generator, toFile } from '@feathershq/pinion'
2
- import { renderSource } from '../../commons'
3
- import { AppGeneratorContext } from '../index'
1
+ import { toFile } from '@featherscloud/pinion'
2
+ import { renderSource } from '../../commons.js'
3
+ import { AppGeneratorContext } from '../index.js'
4
4
 
5
5
  const template = ({}: AppGeneratorContext) => /* ts */ `import { app } from './app'
6
6
  import { logger } from './logger'
@@ -18,7 +18,7 @@ app.listen(port).then(() => {
18
18
  `
19
19
 
20
20
  export const generate = (ctx: AppGeneratorContext) =>
21
- generator(ctx).then(
21
+ Promise.resolve(ctx).then(
22
22
  renderSource(
23
23
  template,
24
24
  toFile<AppGeneratorContext>(({ lib }) => lib, 'index')
@@ -1,3 +1,3 @@
1
- import { AppGeneratorContext } from '../index';
1
+ import { AppGeneratorContext } from '../index.js';
2
2
  export declare const logErrorTemplate = "// For more information about this file see https://dove.feathersjs.com/guides/cli/log-error.html\nimport type { HookContext, NextFunction } from '../declarations'\nimport { logger } from '../logger'\n\nexport const logError = async (context: HookContext, next: NextFunction) => {\n try {\n await next()\n } catch (error: any) {\n logger.error(error.stack)\n \n // Log validation errors\n if (error.data) {\n logger.error('Data: %O', error.data)\n }\n\n throw error\n }\n}\n";
3
3
  export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = exports.logErrorTemplate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const commons_1 = require("../../commons");
1
+ import { toFile } from '@featherscloud/pinion';
2
+ import { renderSource } from '../../commons.js';
6
3
  const template = ({}) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/logging.html
7
4
  import { createLogger, format, transports } from 'winston'
8
5
 
@@ -19,7 +16,7 @@ export const logger = createLogger({
19
16
  ]
20
17
  })
21
18
  `;
22
- exports.logErrorTemplate = `// For more information about this file see https://dove.feathersjs.com/guides/cli/log-error.html
19
+ export const logErrorTemplate = /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/log-error.html
23
20
  import type { HookContext, NextFunction } from '../declarations'
24
21
  import { logger } from '../logger'
25
22
 
@@ -38,8 +35,7 @@ export const logError = async (context: HookContext, next: NextFunction) => {
38
35
  }
39
36
  }
40
37
  `;
41
- const generate = (ctx) => (0, pinion_1.generator)(ctx)
42
- .then((0, commons_1.renderSource)(template, (0, pinion_1.toFile)(({ lib }) => lib, 'logger')))
43
- .then((0, commons_1.renderSource)(exports.logErrorTemplate, (0, pinion_1.toFile)(({ lib }) => lib, 'hooks', 'log-error')));
44
- exports.generate = generate;
38
+ export const generate = (ctx) => Promise.resolve(ctx)
39
+ .then(renderSource(template, toFile(({ lib }) => lib, 'logger')))
40
+ .then(renderSource(logErrorTemplate, toFile(({ lib }) => lib, 'hooks', 'log-error')));
45
41
  //# sourceMappingURL=logger.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/logger.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GACZ,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;CAevC,CAAA;AAEY,QAAA,gBAAgB,GAAY;;;;;;;;;;;;;;;;;;CAkBxC,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CACH,IAAA,sBAAY,EACV,QAAQ,EACR,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CACxD,CACF;KACA,IAAI,CACH,IAAA,sBAAY,EACV,wBAAgB,EAChB,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,CAAC,CACpE,CACF,CAAA;AAbQ,QAAA,QAAQ,YAahB"}
1
+ {"version":3,"file":"logger.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/logger.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAG/C,MAAM,QAAQ,GACZ,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;CAevC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;;;;;;;;;;;;;;;;;;CAkBxC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;KACjB,IAAI,CACH,YAAY,CACV,QAAQ,EACR,MAAM,CAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CACxD,CACF;KACA,IAAI,CACH,YAAY,CACV,gBAAgB,EAChB,MAAM,CAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,CAAC,CACpE,CACF,CAAA"}
@@ -1,6 +1,6 @@
1
- import { generator, toFile } from '@feathershq/pinion'
2
- import { renderSource } from '../../commons'
3
- import { AppGeneratorContext } from '../index'
1
+ import { toFile } from '@featherscloud/pinion'
2
+ import { renderSource } from '../../commons.js'
3
+ import { AppGeneratorContext } from '../index.js'
4
4
 
5
5
  const template =
6
6
  ({}: AppGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/logging.html
@@ -41,7 +41,7 @@ export const logError = async (context: HookContext, next: NextFunction) => {
41
41
  `
42
42
 
43
43
  export const generate = (ctx: AppGeneratorContext) =>
44
- generator(ctx)
44
+ Promise.resolve(ctx)
45
45
  .then(
46
46
  renderSource(
47
47
  template,
@@ -1,2 +1,5 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
1
+ import { AppGeneratorContext } from '../index.js';
2
+ export declare const generate: (ctx: AppGeneratorContext) => Promise<import("../../commons.js").FeathersBaseContext & import("../index.js").AppGeneratorData & {
3
+ dependencies: string[];
4
+ devDependencies: string[];
5
+ }>;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
1
+ import { toFile, writeJSON } from '@featherscloud/pinion';
5
2
  const jsPackageJson = (lib) => ({
6
3
  type: 'module',
7
4
  scripts: {
@@ -59,6 +56,5 @@ const packageJson = ({ name, description, client, language, packager, database,
59
56
  }),
60
57
  ...(language === 'ts' ? tsPackageJson(lib) : jsPackageJson(lib))
61
58
  });
62
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, pinion_1.writeJSON)(packageJson, (0, pinion_1.toFile)('package.json')));
63
- exports.generate = generate;
59
+ export const generate = (ctx) => Promise.resolve(ctx).then(writeJSON(packageJson, toFile('package.json')));
64
60
  //# sourceMappingURL=package.json.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"package.json.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/package.json.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAGjE,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC;IACtC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE;QACP,KAAK,EAAE,QAAQ,GAAG,EAAE;QACpB,GAAG,EAAE,WAAW,GAAG,GAAG;QACtB,QAAQ,EAAE,gCAAgC;QAC1C,KAAK,EAAE,wDAAwD;QAC/D,IAAI,EAAE,eAAe;QACrB,eAAe,EAAE,sCAAsC;KACxD;CACF,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE;QACP,GAAG,EAAE,sBAAsB,GAAG,WAAW;QACzC,OAAO,EAAE,wBAAwB;QACjC,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,gCAAgC;QAC1C,KAAK,EACH,mGAAmG;QACrG,IAAI,EAAE,eAAe;QACrB,eAAe,EAAE,yDAAyD;KAC3E;CACF,CAAC,CAAA;AAEF,MAAM,WAAW,GAAG,CAAC,EACnB,IAAI,EACJ,WAAW,EACX,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,GAAG,EACH,IAAI,EACJ,MAAM,EACc,EAAE,EAAE,CAAC,CAAC;IAC1B,IAAI;IACJ,WAAW;IACX,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,IAAI;IACb,QAAQ,EAA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AAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS;SACzD;QACH,CAAC,CAAC;YACE,IAAI,EAAE,WAAW;SAClB,CAAC;IACN,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CACjE,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
- import { generator, toFile, writeJSON } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
1
+ import { toFile, writeJSON } from '@featherscloud/pinion'
2
+ import { AppGeneratorContext } from '../index.js'
3
3
 
4
4
  const jsPackageJson = (lib: string) => ({
5
5
  type: 'module',
@@ -75,4 +75,4 @@ const packageJson = ({
75
75
  })
76
76
 
77
77
  export const generate = (ctx: AppGeneratorContext) =>
78
- generator(ctx).then(writeJSON(packageJson, toFile('package.json')))
78
+ Promise.resolve(ctx).then(writeJSON(packageJson, toFile('package.json')))
@@ -1,2 +1,2 @@
1
- import { AppGeneratorContext } from '../index';
1
+ import { AppGeneratorContext } from '../index.js';
2
2
  export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,11 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const commons_1 = require("../../commons");
6
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, pinion_1.writeJSON)((ctx) => ({
7
- ...commons_1.PRETTIERRC,
1
+ import { toFile, writeJSON } from '@featherscloud/pinion';
2
+ import { PRETTIERRC } from '../../commons.js';
3
+ export const generate = (ctx) => Promise.resolve(ctx).then(writeJSON((ctx) => ({
4
+ ...PRETTIERRC,
8
5
  parser: ctx.language === 'ts' ? 'typescript' : 'babel'
9
- }), (0, pinion_1.toFile)('.prettierrc')));
10
- exports.generate = generate;
6
+ }), toFile('.prettierrc')));
11
7
  //# sourceMappingURL=prettierrc.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prettierrc.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/prettierrc.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAEjE,2CAA0C;AAEnC,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,kBAAS,EACP,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACR,GAAG,oBAAU;IACb,MAAM,EAAE,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO;CACvD,CAAC,EACF,IAAA,eAAM,EAAC,aAAa,CAAC,CACtB,CACF,CAAA;AATU,QAAA,QAAQ,YASlB"}
1
+ {"version":3,"file":"prettierrc.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/prettierrc.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CACvB,SAAS,CACP,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACR,GAAG,UAAU;IACb,MAAM,EAAE,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO;CACvD,CAAC,EACF,MAAM,CAAC,aAAa,CAAC,CACtB,CACF,CAAA"}
@@ -1,9 +1,9 @@
1
- import { generator, toFile, writeJSON } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
3
- import { PRETTIERRC } from '../../commons'
1
+ import { toFile, writeJSON } from '@featherscloud/pinion'
2
+ import { AppGeneratorContext } from '../index.js'
3
+ import { PRETTIERRC } from '../../commons.js'
4
4
 
5
5
  export const generate = (ctx: AppGeneratorContext) =>
6
- generator(ctx).then(
6
+ Promise.resolve(ctx).then(
7
7
  writeJSON<AppGeneratorContext>(
8
8
  (ctx) => ({
9
9
  ...PRETTIERRC,
@@ -1,2 +1,5 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
1
+ import { AppGeneratorContext } from '../index.js';
2
+ export declare const generate: (ctx: AppGeneratorContext) => Promise<import("../../commons.js").FeathersBaseContext & import("../index.js").AppGeneratorData & {
3
+ dependencies: string[];
4
+ devDependencies: string[];
5
+ }>;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
1
+ import { renderTemplate, toFile } from '@featherscloud/pinion';
5
2
  const template = ({ name, description, language, database }) => /* md */ `# ${name}
6
3
 
7
4
  > ${description}
@@ -49,6 +46,5 @@ $ npx feathers generate service # Generate a new Service
49
46
 
50
47
  For more information on all the things you can do with Feathers visit [docs.feathersjs.com](http://docs.feathersjs.com).
51
48
  `;
52
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, pinion_1.renderTemplate)(template, (0, pinion_1.toFile)('readme.md')));
53
- exports.generate = generate;
49
+ export const generate = (ctx) => Promise.resolve(ctx).then(renderTemplate(template, toFile('readme.md')));
54
50
  //# sourceMappingURL=readme.md.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"readme.md.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/readme.md.tpl.ts"],"names":[],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cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
- import { generator, renderTemplate, toFile } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
1
+ import { renderTemplate, toFile } from '@featherscloud/pinion'
2
+ import { AppGeneratorContext } from '../index.js'
3
3
 
4
4
  const template = ({ name, description, language, database }: AppGeneratorContext) => /* md */ `# ${name}
5
5
 
@@ -54,4 +54,4 @@ For more information on all the things you can do with Feathers visit [docs.feat
54
54
  `
55
55
 
56
56
  export const generate = (ctx: AppGeneratorContext) =>
57
- generator(ctx).then(renderTemplate(template, toFile('readme.md')))
57
+ Promise.resolve(ctx).then(renderTemplate(template, toFile('readme.md')))
@@ -1,2 +1,2 @@
1
- import { AppGeneratorContext } from '../index';
1
+ import { AppGeneratorContext } from '../index.js';
2
2
  export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const commons_1 = require("../../commons");
1
+ import { toFile } from '@featherscloud/pinion';
2
+ import { renderSource } from '../../commons.js';
6
3
  const template = ({}) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/application.html#configure-functions
7
4
  import type { Application } from '../declarations'
8
5
 
@@ -10,6 +7,5 @@ export const services = (app: Application) => {
10
7
  // All services will be registered here
11
8
  }
12
9
  `;
13
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, commons_1.renderSource)(template, (0, pinion_1.toFile)(({ lib }) => lib, 'services', 'index')));
14
- exports.generate = generate;
10
+ export const generate = (ctx) => Promise.resolve(ctx).then(renderSource(template, toFile(({ lib }) => lib, 'services', 'index')));
15
11
  //# sourceMappingURL=services.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"services.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/services.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GACZ,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;CAMvC,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,sBAAY,EACV,QAAQ,EACR,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,CACnE,CACF,CAAA;AANU,QAAA,QAAQ,YAMlB"}
1
+ {"version":3,"file":"services.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/services.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAG/C,MAAM,QAAQ,GACZ,CAAC,EAAuB,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;CAMvC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CACvB,YAAY,CACV,QAAQ,EACR,MAAM,CAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,CACnE,CACF,CAAA"}
@@ -1,6 +1,6 @@
1
- import { generator, toFile } from '@feathershq/pinion'
2
- import { renderSource } from '../../commons'
3
- import { AppGeneratorContext } from '../index'
1
+ import { toFile } from '@featherscloud/pinion'
2
+ import { renderSource } from '../../commons.js'
3
+ import { AppGeneratorContext } from '../index.js'
4
4
 
5
5
  const template =
6
6
  ({}: AppGeneratorContext) => /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/application.html#configure-functions
@@ -12,7 +12,7 @@ export const services = (app: Application) => {
12
12
  `
13
13
 
14
14
  export const generate = (ctx: AppGeneratorContext) =>
15
- generator(ctx).then(
15
+ Promise.resolve(ctx).then(
16
16
  renderSource(
17
17
  template,
18
18
  toFile<AppGeneratorContext>(({ lib }) => lib, 'services', 'index')
@@ -1,2 +1,2 @@
1
- import { AppGeneratorContext } from '../index';
1
+ import { AppGeneratorContext } from '../index.js';
2
2
  export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, pinion_1.when)((ctx) => ctx.language === 'ts', (0, pinion_1.writeJSON)(({ lib }) => ({
1
+ import { toFile, when, writeJSON } from '@featherscloud/pinion';
2
+ export const generate = (ctx) => Promise.resolve(ctx).then(when((ctx) => ctx.language === 'ts', writeJSON(({ lib }) => ({
6
3
  'ts-node': {
7
4
  files: true
8
5
  },
@@ -18,6 +15,5 @@ const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, pinion_1.when)((
18
15
  },
19
16
  include: [lib],
20
17
  exclude: ['test']
21
- }), (0, pinion_1.toFile)('tsconfig.json'))));
22
- exports.generate = generate;
18
+ }), toFile('tsconfig.json'))));
23
19
  //# sourceMappingURL=tsconfig.json.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsconfig.json.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/tsconfig.json.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAuE;AAGhE,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,aAAI,EACF,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,IAAI,EAC9B,IAAA,kBAAS,EACP,CAA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AAO,EAAE,CAAC,MAAM,CAAC;CAClB,CAAC,EACF,MAAM,CAAC,eAAe,CAAC,CACxB,CACF,CACF,CAAA"}
@@ -1,8 +1,8 @@
1
- import { generator, toFile, when, writeJSON } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
1
+ import { toFile, when, writeJSON } from '@featherscloud/pinion'
2
+ import { AppGeneratorContext } from '../index.js'
3
3
 
4
4
  export const generate = (ctx: AppGeneratorContext) =>
5
- generator(ctx).then(
5
+ Promise.resolve(ctx).then(
6
6
  when<AppGeneratorContext>(
7
7
  (ctx) => ctx.language === 'ts',
8
8
  writeJSON<AppGeneratorContext>(
@@ -1,2 +1,2 @@
1
- import { AppGeneratorContext } from '../index';
1
+ import { AppGeneratorContext } from '../index.js';
2
2
  export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const commons_1 = require("../../commons");
1
+ import { toFile } from '@featherscloud/pinion';
2
+ import { renderSource } from '../../commons.js';
6
3
  const validatorTemplate = /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/validators.html
7
4
  import { Ajv, addFormats } from '@feathersjs/schema'
8
5
  import type { FormatsPluginOptions } from '@feathersjs/schema'
@@ -30,6 +27,5 @@ export const queryValidator: Ajv = addFormats(new Ajv({
30
27
  coerceTypes: true
31
28
  }), formats)
32
29
  `;
33
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, commons_1.renderSource)(validatorTemplate, (0, pinion_1.toFile)(({ lib }) => lib, 'validators')));
34
- exports.generate = generate;
30
+ export const generate = (ctx) => Promise.resolve(ctx).then(renderSource(validatorTemplate, toFile(({ lib }) => lib, 'validators')));
35
31
  //# sourceMappingURL=validators.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validators.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/validators.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,iBAAiB,GAAG,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BlC,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CACjB,IAAA,sBAAY,EACV,iBAAiB,EACjB,IAAA,eAAM,EAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,YAAY,CAAC,CAC5D,CACF,CAAA;AANU,QAAA,QAAQ,YAMlB"}
1
+ {"version":3,"file":"validators.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/validators.tpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAG/C,MAAM,iBAAiB,GAAG,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BlC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CACvB,YAAY,CACV,iBAAiB,EACjB,MAAM,CAAsB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,YAAY,CAAC,CAC5D,CACF,CAAA"}
@@ -1,6 +1,6 @@
1
- import { generator, toFile } from '@feathershq/pinion'
2
- import { renderSource } from '../../commons'
3
- import { AppGeneratorContext } from '../index'
1
+ import { toFile } from '@featherscloud/pinion'
2
+ import { renderSource } from '../../commons.js'
3
+ import { AppGeneratorContext } from '../index.js'
4
4
 
5
5
  const validatorTemplate = /* ts */ `// For more information about this file see https://dove.feathersjs.com/guides/cli/validators.html
6
6
  import { Ajv, addFormats } from '@feathersjs/schema'
@@ -31,7 +31,7 @@ export const queryValidator: Ajv = addFormats(new Ajv({
31
31
  `
32
32
 
33
33
  export const generate = (ctx: AppGeneratorContext) =>
34
- generator(ctx).then(
34
+ Promise.resolve(ctx).then(
35
35
  renderSource(
36
36
  validatorTemplate,
37
37
  toFile<AppGeneratorContext>(({ lib }) => lib, 'validators')
@@ -1,5 +1,5 @@
1
- import { FeathersBaseContext } from '../commons';
2
- import { ServiceGeneratorContext } from '../service/index';
1
+ import { FeathersBaseContext } from '../commons.js';
2
+ import { ServiceGeneratorContext } from '../service/index.js';
3
3
  export interface AuthenticationGeneratorContext extends ServiceGeneratorContext {
4
4
  service: string;
5
5
  entity: string;
@@ -9,6 +9,9 @@ export interface AuthenticationGeneratorContext extends ServiceGeneratorContext
9
9
  export type AuthenticationGeneratorArguments = FeathersBaseContext & Partial<Pick<AuthenticationGeneratorContext, 'service' | 'authStrategies' | 'path' | 'schema' | 'type'>>;
10
10
  export declare const generate: (ctx: AuthenticationGeneratorArguments) => Promise<{
11
11
  dependencies: string[];
12
+ service: string;
13
+ entity: string;
14
+ authStrategies: string[];
12
15
  name: string;
13
16
  path: string;
14
17
  folder: string[];
@@ -23,16 +26,13 @@ export declare const generate: (ctx: AuthenticationGeneratorArguments) => Promis
23
26
  schema: false | "typebox" | "json";
24
27
  authentication: boolean;
25
28
  isEntityService?: boolean;
26
- authStrategies: string[];
27
- feathers: import("../commons").FeathersAppInfo;
28
- pkg: import("../commons").AppPackageJson;
29
+ feathers: import("../commons.js").FeathersAppInfo;
30
+ pkg: import("../commons.js").AppPackageJson;
29
31
  lib: string;
30
32
  test: string;
31
33
  language: "ts" | "js";
32
- dependencyVersions?: import("../commons").DependencyVersions;
34
+ dependencyVersions?: import("../commons.js").DependencyVersions;
33
35
  cwd: string;
34
- _?: (string | number)[];
35
- pinion: import("@feathershq/pinion").Configuration;
36
- entity: string;
37
- service: string;
36
+ argv: string[];
37
+ pinion: import("@featherscloud/pinion").Configuration;
38
38
  }>;