@feathersjs/cli 5.0.0-pre.33 → 5.0.0-pre.35

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 (175) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/lib/index.d.ts +6 -2
  3. package/lib/index.js +59 -2
  4. package/lib/index.js.map +1 -1
  5. package/package.json +30 -30
  6. package/lib/app/index.d.ts +0 -29
  7. package/lib/app/index.js +0 -146
  8. package/lib/app/index.js.map +0 -1
  9. package/lib/app/index.ts +0 -227
  10. package/lib/app/static/.gitignore +0 -121
  11. package/lib/app/templates/app.test.tpl.d.ts +0 -2
  12. package/lib/app/templates/app.test.tpl.js +0 -48
  13. package/lib/app/templates/app.test.tpl.js.map +0 -1
  14. package/lib/app/templates/app.test.tpl.ts +0 -47
  15. package/lib/app/templates/app.tpl.d.ts +0 -2
  16. package/lib/app/templates/app.tpl.js +0 -121
  17. package/lib/app/templates/app.tpl.js.map +0 -1
  18. package/lib/app/templates/app.tpl.ts +0 -136
  19. package/lib/app/templates/channels.tpl.d.ts +0 -2
  20. package/lib/app/templates/channels.tpl.js +0 -48
  21. package/lib/app/templates/channels.tpl.js.map +0 -1
  22. package/lib/app/templates/channels.tpl.ts +0 -54
  23. package/lib/app/templates/client.test.tpl.d.ts +0 -2
  24. package/lib/app/templates/client.test.tpl.js +0 -27
  25. package/lib/app/templates/client.test.tpl.js.map +0 -1
  26. package/lib/app/templates/client.test.tpl.ts +0 -26
  27. package/lib/app/templates/client.tpl.d.ts +0 -2
  28. package/lib/app/templates/client.tpl.js +0 -37
  29. package/lib/app/templates/client.tpl.js.map +0 -1
  30. package/lib/app/templates/client.tpl.ts +0 -44
  31. package/lib/app/templates/config.tpl.d.ts +0 -2
  32. package/lib/app/templates/config.tpl.js +0 -30
  33. package/lib/app/templates/config.tpl.js.map +0 -1
  34. package/lib/app/templates/config.tpl.ts +0 -31
  35. package/lib/app/templates/declarations.tpl.d.ts +0 -2
  36. package/lib/app/templates/declarations.tpl.js +0 -27
  37. package/lib/app/templates/declarations.tpl.js.map +0 -1
  38. package/lib/app/templates/declarations.tpl.ts +0 -36
  39. package/lib/app/templates/index.html.tpl.d.ts +0 -2
  40. package/lib/app/templates/index.html.tpl.js +0 -45
  41. package/lib/app/templates/index.html.tpl.js.map +0 -1
  42. package/lib/app/templates/index.html.tpl.ts +0 -44
  43. package/lib/app/templates/index.tpl.d.ts +0 -2
  44. package/lib/app/templates/index.tpl.js +0 -18
  45. package/lib/app/templates/index.tpl.js.map +0 -1
  46. package/lib/app/templates/index.tpl.ts +0 -22
  47. package/lib/app/templates/logger.tpl.d.ts +0 -2
  48. package/lib/app/templates/logger.tpl.js +0 -39
  49. package/lib/app/templates/logger.tpl.js.map +0 -1
  50. package/lib/app/templates/logger.tpl.ts +0 -44
  51. package/lib/app/templates/package.json.tpl.d.ts +0 -2
  52. package/lib/app/templates/package.json.tpl.js +0 -55
  53. package/lib/app/templates/package.json.tpl.js.map +0 -1
  54. package/lib/app/templates/package.json.tpl.ts +0 -68
  55. package/lib/app/templates/prettierrc.tpl.d.ts +0 -2
  56. package/lib/app/templates/prettierrc.tpl.js +0 -11
  57. package/lib/app/templates/prettierrc.tpl.js.map +0 -1
  58. package/lib/app/templates/prettierrc.tpl.ts +0 -14
  59. package/lib/app/templates/readme.md.tpl.d.ts +0 -2
  60. package/lib/app/templates/readme.md.tpl.js +0 -54
  61. package/lib/app/templates/readme.md.tpl.js.map +0 -1
  62. package/lib/app/templates/readme.md.tpl.ts +0 -57
  63. package/lib/app/templates/schemas.tpl.d.ts +0 -2
  64. package/lib/app/templates/schemas.tpl.js +0 -75
  65. package/lib/app/templates/schemas.tpl.js.map +0 -1
  66. package/lib/app/templates/schemas.tpl.ts +0 -89
  67. package/lib/app/templates/services.tpl.d.ts +0 -2
  68. package/lib/app/templates/services.tpl.js +0 -14
  69. package/lib/app/templates/services.tpl.js.map +0 -1
  70. package/lib/app/templates/services.tpl.ts +0 -18
  71. package/lib/app/templates/tsconfig.json.tpl.d.ts +0 -2
  72. package/lib/app/templates/tsconfig.json.tpl.js +0 -22
  73. package/lib/app/templates/tsconfig.json.tpl.js.map +0 -1
  74. package/lib/app/templates/tsconfig.json.tpl.ts +0 -28
  75. package/lib/authentication/index.d.ts +0 -73
  76. package/lib/authentication/index.js +0 -107
  77. package/lib/authentication/index.js.map +0 -1
  78. package/lib/authentication/index.ts +0 -126
  79. package/lib/authentication/templates/authentication.tpl.d.ts +0 -2
  80. package/lib/authentication/templates/authentication.tpl.js +0 -39
  81. package/lib/authentication/templates/authentication.tpl.js.map +0 -1
  82. package/lib/authentication/templates/authentication.tpl.ts +0 -50
  83. package/lib/authentication/templates/client.test.tpl.d.ts +0 -2
  84. package/lib/authentication/templates/client.test.tpl.js +0 -61
  85. package/lib/authentication/templates/client.test.tpl.js.map +0 -1
  86. package/lib/authentication/templates/client.test.tpl.ts +0 -73
  87. package/lib/authentication/templates/client.tpl.d.ts +0 -2
  88. package/lib/authentication/templates/client.tpl.js +0 -14
  89. package/lib/authentication/templates/client.tpl.js.map +0 -1
  90. package/lib/authentication/templates/client.tpl.ts +0 -19
  91. package/lib/authentication/templates/config.tpl.d.ts +0 -2
  92. package/lib/authentication/templates/config.tpl.js +0 -50
  93. package/lib/authentication/templates/config.tpl.js.map +0 -1
  94. package/lib/authentication/templates/config.tpl.ts +0 -57
  95. package/lib/authentication/templates/declarations.tpl.d.ts +0 -2
  96. package/lib/authentication/templates/declarations.tpl.js +0 -19
  97. package/lib/authentication/templates/declarations.tpl.js.map +0 -1
  98. package/lib/authentication/templates/declarations.tpl.ts +0 -34
  99. package/lib/authentication/templates/knex.tpl.d.ts +0 -2
  100. package/lib/authentication/templates/knex.tpl.js +0 -45
  101. package/lib/authentication/templates/knex.tpl.js.map +0 -1
  102. package/lib/authentication/templates/knex.tpl.ts +0 -62
  103. package/lib/authentication/templates/schema.json.tpl.d.ts +0 -2
  104. package/lib/authentication/templates/schema.json.tpl.js +0 -93
  105. package/lib/authentication/templates/schema.json.tpl.js.map +0 -1
  106. package/lib/authentication/templates/schema.json.tpl.ts +0 -108
  107. package/lib/authentication/templates/schema.typebox.tpl.d.ts +0 -3
  108. package/lib/authentication/templates/schema.typebox.tpl.js +0 -78
  109. package/lib/authentication/templates/schema.typebox.tpl.js.map +0 -1
  110. package/lib/authentication/templates/schema.typebox.tpl.ts +0 -94
  111. package/lib/cli.d.ts +0 -6
  112. package/lib/cli.js +0 -75
  113. package/lib/cli.js.map +0 -1
  114. package/lib/cli.ts +0 -68
  115. package/lib/commons.d.ts +0 -143
  116. package/lib/commons.js +0 -190
  117. package/lib/commons.js.map +0 -1
  118. package/lib/commons.ts +0 -276
  119. package/lib/connection/index.d.ts +0 -55
  120. package/lib/connection/index.js +0 -88
  121. package/lib/connection/index.js.map +0 -1
  122. package/lib/connection/index.ts +0 -123
  123. package/lib/connection/templates/knex.tpl.d.ts +0 -2
  124. package/lib/connection/templates/knex.tpl.js +0 -46
  125. package/lib/connection/templates/knex.tpl.js.map +0 -1
  126. package/lib/connection/templates/knex.tpl.ts +0 -63
  127. package/lib/connection/templates/mongodb.tpl.d.ts +0 -2
  128. package/lib/connection/templates/mongodb.tpl.js +0 -33
  129. package/lib/connection/templates/mongodb.tpl.js.map +0 -1
  130. package/lib/connection/templates/mongodb.tpl.ts +0 -38
  131. package/lib/hook/index.d.ts +0 -22
  132. package/lib/hook/index.js +0 -43
  133. package/lib/hook/index.js.map +0 -1
  134. package/lib/hook/index.ts +0 -47
  135. package/lib/hook/templates/hook.tpl.d.ts +0 -2
  136. package/lib/hook/templates/hook.tpl.js +0 -20
  137. package/lib/hook/templates/hook.tpl.js.map +0 -1
  138. package/lib/hook/templates/hook.tpl.ts +0 -31
  139. package/lib/index.ts +0 -2
  140. package/lib/service/index.d.ts +0 -64
  141. package/lib/service/index.js +0 -116
  142. package/lib/service/index.js.map +0 -1
  143. package/lib/service/index.ts +0 -191
  144. package/lib/service/templates/client.tpl.d.ts +0 -2
  145. package/lib/service/templates/client.tpl.js +0 -31
  146. package/lib/service/templates/client.tpl.js.map +0 -1
  147. package/lib/service/templates/client.tpl.ts +0 -57
  148. package/lib/service/templates/schema.json.tpl.d.ts +0 -2
  149. package/lib/service/templates/schema.json.tpl.js +0 -75
  150. package/lib/service/templates/schema.json.tpl.js.map +0 -1
  151. package/lib/service/templates/schema.json.tpl.ts +0 -87
  152. package/lib/service/templates/schema.typebox.tpl.d.ts +0 -2
  153. package/lib/service/templates/schema.typebox.tpl.js +0 -55
  154. package/lib/service/templates/schema.typebox.tpl.js.map +0 -1
  155. package/lib/service/templates/schema.typebox.tpl.ts +0 -67
  156. package/lib/service/templates/service.tpl.d.ts +0 -3
  157. package/lib/service/templates/service.tpl.js +0 -98
  158. package/lib/service/templates/service.tpl.js.map +0 -1
  159. package/lib/service/templates/service.tpl.ts +0 -134
  160. package/lib/service/templates/test.tpl.d.ts +0 -2
  161. package/lib/service/templates/test.tpl.js +0 -24
  162. package/lib/service/templates/test.tpl.js.map +0 -1
  163. package/lib/service/templates/test.tpl.ts +0 -28
  164. package/lib/service/type/custom.tpl.d.ts +0 -3
  165. package/lib/service/type/custom.tpl.js +0 -94
  166. package/lib/service/type/custom.tpl.js.map +0 -1
  167. package/lib/service/type/custom.tpl.ts +0 -99
  168. package/lib/service/type/knex.tpl.d.ts +0 -3
  169. package/lib/service/type/knex.tpl.js +0 -67
  170. package/lib/service/type/knex.tpl.js.map +0 -1
  171. package/lib/service/type/knex.tpl.ts +0 -88
  172. package/lib/service/type/mongodb.tpl.d.ts +0 -3
  173. package/lib/service/type/mongodb.tpl.js +0 -47
  174. package/lib/service/type/mongodb.tpl.js.map +0 -1
  175. package/lib/service/type/mongodb.tpl.ts +0 -59
@@ -1,37 +0,0 @@
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 template = ({ name, language }) => /* ts */ `import { feathers } from '@feathersjs/feathers'
7
- import type { TransportConnection, Params } from '@feathersjs/feathers'
8
- import authenticationClient from '@feathersjs/authentication-client'
9
- import type { AuthenticationClientOptions } from '@feathersjs/authentication-client'
10
-
11
- export interface ServiceTypes {
12
- //
13
- }
14
-
15
- /**
16
- * Returns a ${language === 'ts' ? 'typed' : ''} client for the ${name} app.
17
- *
18
- * @param connection The REST or Socket.io Feathers client connection
19
- * @param authenticationOptions Additional settings for the authentication client
20
- * @see https://dove.feathersjs.com/api/client.html
21
- * @returns The Feathers client application
22
- */
23
- export const createClient = <Configuration = any> (
24
- connection: TransportConnection<ServiceTypes>,
25
- authenticationOptions: Partial<AuthenticationClientOptions> = {}
26
- ) => {
27
- const client = feathers<ServiceTypes, Configuration>()
28
-
29
- client.configure(connection)
30
- client.configure(authenticationClient(authenticationOptions))
31
-
32
- return client
33
- }
34
- `;
35
- const generate = async (ctx) => (0, pinion_1.generator)(ctx).then((0, commons_1.renderSource)(template, (0, pinion_1.toFile)(({ lib }) => lib, 'client')));
36
- exports.generate = generate;
37
- //# sourceMappingURL=client.tpl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/client.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAsD;AACtD,2CAA4C;AAG5C,MAAM,QAAQ,GAAG,CAAC,EAChB,IAAI,EACJ,QAAQ,EACY,EAAE,EAAE,CAAC,QAAQ,CAAC;;;;;;;;;;eAUrB,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,mBAAmB,IAAI;;;;;;;;;;;;;;;;;;CAkBrE,CAAA;AAEM,MAAM,QAAQ,GAAG,KAAK,EAAE,GAAwB,EAAE,EAAE,CACzD,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,QAAQ,CAAC,CACxD,CACF,CAAA;AANU,QAAA,QAAQ,YAMlB"}
@@ -1,44 +0,0 @@
1
- import { generator, toFile } from '@feathershq/pinion'
2
- import { renderSource } from '../../commons'
3
- import { AppGeneratorContext } from '../index'
4
-
5
- const template = ({
6
- name,
7
- language
8
- }: AppGeneratorContext) => /* ts */ `import { feathers } from '@feathersjs/feathers'
9
- import type { TransportConnection, Params } from '@feathersjs/feathers'
10
- import authenticationClient from '@feathersjs/authentication-client'
11
- import type { AuthenticationClientOptions } from '@feathersjs/authentication-client'
12
-
13
- export interface ServiceTypes {
14
- //
15
- }
16
-
17
- /**
18
- * Returns a ${language === 'ts' ? 'typed' : ''} client for the ${name} app.
19
- *
20
- * @param connection The REST or Socket.io Feathers client connection
21
- * @param authenticationOptions Additional settings for the authentication client
22
- * @see https://dove.feathersjs.com/api/client.html
23
- * @returns The Feathers client application
24
- */
25
- export const createClient = <Configuration = any> (
26
- connection: TransportConnection<ServiceTypes>,
27
- authenticationOptions: Partial<AuthenticationClientOptions> = {}
28
- ) => {
29
- const client = feathers<ServiceTypes, Configuration>()
30
-
31
- client.configure(connection)
32
- client.configure(authenticationClient(authenticationOptions))
33
-
34
- return client
35
- }
36
- `
37
-
38
- export const generate = async (ctx: AppGeneratorContext) =>
39
- generator(ctx).then(
40
- renderSource(
41
- template,
42
- toFile<AppGeneratorContext>(({ lib }) => lib, 'client')
43
- )
44
- )
@@ -1,2 +0,0 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const defaultConfig = ({}) => ({
6
- host: 'localhost',
7
- port: 3030,
8
- public: './public/',
9
- origins: ['http://localhost:3030'],
10
- paginate: {
11
- default: 10,
12
- max: 50
13
- }
14
- });
15
- const customEnvironment = {
16
- port: {
17
- __name: 'PORT',
18
- __format: 'number'
19
- },
20
- host: 'HOSTNAME'
21
- };
22
- const testConfig = {
23
- port: 8998
24
- };
25
- const generate = (ctx) => (0, pinion_1.generator)(ctx)
26
- .then((0, pinion_1.writeJSON)(defaultConfig, (0, pinion_1.toFile)('config', 'default.json')))
27
- .then((0, pinion_1.writeJSON)(testConfig, (0, pinion_1.toFile)('config', 'test.json')))
28
- .then((0, pinion_1.writeJSON)(customEnvironment, (0, pinion_1.toFile)('config', 'custom-environment-variables.json')));
29
- exports.generate = generate;
30
- //# sourceMappingURL=config.tpl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/config.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAGjE,MAAM,aAAa,GAAG,CAAC,EAAuB,EAAE,EAAE,CAAC,CAAC;IAClD,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,CAAC,uBAAuB,CAAC;IAClC,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,EAAE;KACR;CACF,CAAC,CAAA;AAEF,MAAM,iBAAiB,GAAG;IACxB,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QAAQ;KACnB;IACD,IAAI,EAAE,UAAU;CACjB,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,IAAI;CACX,CAAA;AAEM,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC;KACX,IAAI,CAAC,IAAA,kBAAS,EAAC,aAAa,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC;KAChE,IAAI,CAAC,IAAA,kBAAS,EAAC,UAAU,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;KAC1D,IAAI,CAAC,IAAA,kBAAS,EAAC,iBAAiB,EAAE,IAAA,eAAM,EAAC,QAAQ,EAAE,mCAAmC,CAAC,CAAC,CAAC,CAAA;AAJjF,QAAA,QAAQ,YAIyE"}
@@ -1,31 +0,0 @@
1
- import { generator, toFile, writeJSON } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
3
-
4
- const defaultConfig = ({}: AppGeneratorContext) => ({
5
- host: 'localhost',
6
- port: 3030,
7
- public: './public/',
8
- origins: ['http://localhost:3030'],
9
- paginate: {
10
- default: 10,
11
- max: 50
12
- }
13
- })
14
-
15
- const customEnvironment = {
16
- port: {
17
- __name: 'PORT',
18
- __format: 'number'
19
- },
20
- host: 'HOSTNAME'
21
- }
22
-
23
- const testConfig = {
24
- port: 8998
25
- }
26
-
27
- export const generate = (ctx: AppGeneratorContext) =>
28
- generator(ctx)
29
- .then(writeJSON(defaultConfig, toFile('config', 'default.json')))
30
- .then(writeJSON(testConfig, toFile('config', 'test.json')))
31
- .then(writeJSON(customEnvironment, toFile('config', 'custom-environment-variables.json')))
@@ -1,2 +0,0 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const template = ({ framework }) => /* ts */ `import { HookContext as FeathersHookContext, NextFunction } from '@feathersjs/feathers'
6
- import { Application as FeathersApplication } from '@feathersjs/${framework}'
7
- import { ApplicationConfiguration } from './schemas/configuration'
8
-
9
- export { NextFunction }
10
-
11
- // The types for app.get(name) and app.set(name)
12
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
13
- export interface Configuration extends ApplicationConfiguration {}
14
-
15
- // A mapping of service names to types. Will be extended in service files.
16
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
17
- export interface ServiceTypes {}
18
-
19
- // The application instance type that will be used everywhere else
20
- export type Application = FeathersApplication<ServiceTypes, Configuration>
21
-
22
- // The context for hook functions - can be typed with a service class
23
- export type HookContext<S = any> = FeathersHookContext<Application, S>
24
- `;
25
- 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'))));
26
- exports.generate = generate;
27
- //# sourceMappingURL=declarations.tpl.js.map
@@ -1 +0,0 @@
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,EACW,EAAE,EAAE,CAAC,QAAQ,CAAC;kEAC8B,SAAS;;;;;;;;;;;;;;;;;;CAkB1E,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,36 +0,0 @@
1
- import { generator, toFile, when, renderTemplate } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
3
-
4
- const template = ({
5
- framework
6
- }: AppGeneratorContext) => /* ts */ `import { HookContext as FeathersHookContext, NextFunction } from '@feathersjs/feathers'
7
- import { Application as FeathersApplication } from '@feathersjs/${framework}'
8
- import { ApplicationConfiguration } from './schemas/configuration'
9
-
10
- export { NextFunction }
11
-
12
- // The types for app.get(name) and app.set(name)
13
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
14
- export interface Configuration extends ApplicationConfiguration {}
15
-
16
- // A mapping of service names to types. Will be extended in service files.
17
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
18
- export interface ServiceTypes {}
19
-
20
- // The application instance type that will be used everywhere else
21
- export type Application = FeathersApplication<ServiceTypes, Configuration>
22
-
23
- // The context for hook functions - can be typed with a service class
24
- export type HookContext<S = any> = FeathersHookContext<Application, S>
25
- `
26
-
27
- export const generate = (ctx: AppGeneratorContext) =>
28
- generator(ctx).then(
29
- when<AppGeneratorContext>(
30
- ({ language }) => language === 'ts',
31
- renderTemplate(
32
- template,
33
- toFile<AppGeneratorContext>(({ lib }) => lib, 'declarations.ts')
34
- )
35
- )
36
- )
@@ -1,2 +0,0 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const template = ({ name, description }) => /* html */ `<!DOCTYPE html>
6
- <html lang="en">
7
- <head>
8
- <title>${name}</title>
9
- <meta name="description" content="${description}">
10
- <meta name="viewport" content="width=device-width, initial-scale=1">
11
- <style>
12
- * {
13
- margin: 0;
14
- padding: 0;
15
- box-sizing: border-box;
16
- }
17
-
18
- html {
19
- height: 100%;
20
- }
21
-
22
- body {
23
- min-height: 100%;
24
- display: flex;
25
- align-items: center;
26
- }
27
-
28
- img.logo {
29
- display: block;
30
- margin: auto auto;
31
- width: 30%;
32
- max-width: 100%;
33
- max-height: 100%;
34
- }
35
- </style>
36
- </head>
37
- <body>
38
- <img class="logo" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUwMCIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZ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ODcgMy45MjQgMy44MjYtMy44IDE2LjA0OS02LjM1MiAxNi4wNDktNi4zNTIgMy4zMTUtMy45NzkgMTAuMjkxLTMxLjA0NyAxMC45OTQtMzkuMzkxLjE3Ni0yLjA5My41ODMtNC42NTcuMjY4LTguMzk4IDAgMC05Ljk0MSAyLjE3Ny0xMi4wMTQgMS40MjQgMi4xMDQtLjIzNyAxMi4yNjMtNC4xNCAxMi4yNjMtNC4xNCAxLjgwMS0xNi4yMTMgMi4zNTgtNDIuMDkxLTMuNDEzLTQzLjE0MXptLTM2LjM4IDE3MS42OTFjLS43OTUgMTkuNDk2LTEuMjk0IDI1LjAwNC0yLjExNSAyOS42MDEtLjM3OS44NTctLjc1OC45OTctMS4xMzgtLjA5NS0zLjQ3Ny0xNS45OTItMy4yMjQtMTM2LjQzOCAzNi40MDktMTkxLjI0MS0yMy4wNSA0Mi4wOTItMzMuNTM1IDEyMi44NjEtMzMuMTU2IDE2MS43MzV6IiBmaWxsPSIjMzMzIi8+PC9zdmc+" />
39
- </body>
40
- </html>
41
-
42
- `;
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;
45
- //# sourceMappingURL=index.html.tpl.js.map
@@ -1 +0,0 @@
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,44 +0,0 @@
1
- import { generator, renderTemplate, toFile } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
3
-
4
- const template = ({ name, description }: AppGeneratorContext) => /* html */ `<!DOCTYPE html>
5
- <html lang="en">
6
- <head>
7
- <title>${name}</title>
8
- <meta name="description" content="${description}">
9
- <meta name="viewport" content="width=device-width, initial-scale=1">
10
- <style>
11
- * {
12
- margin: 0;
13
- padding: 0;
14
- box-sizing: border-box;
15
- }
16
-
17
- html {
18
- height: 100%;
19
- }
20
-
21
- body {
22
- min-height: 100%;
23
- display: flex;
24
- align-items: center;
25
- }
26
-
27
- img.logo {
28
- display: block;
29
- margin: auto auto;
30
- width: 30%;
31
- max-width: 100%;
32
- max-height: 100%;
33
- }
34
- </style>
35
- </head>
36
- <body>
37
- <img class="logo" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUwMCIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTEyOCA5LjEwMmM2NS42NjUgMCAxMTguODk4IDUzLjIzMyAxMTguODk4IDExOC44OTggMCA2NS42NjUtNTMuMjMzIDExOC44OTgtMTE4Ljg5OCAxMTguODk4QzYyLjMzNSAyNDYuODk4IDkuMTAyIDE5My42NjUgOS4xMDIgMTI4IDkuMTAyIDYyLjMzNSA2Mi4zMzUgOS4xMDIgMTI4IDkuMTAyTTEyOCAwQzU3LjQyMSAwIDAgNTcuNDIxIDAgMTI4YzAgNzAuNTc5IDU3LjQyMSAxMjggMTI4IDEyOCA3MC41NzkgMCAxMjgtNTcuNDIxIDEyOC0xMjhDMjU2IDU3LjQyMSAxOTguNTc5IDA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NS45OTItMy4yMjQtMTM2LjQzOCAzNi40MDktMTkxLjI0MS0yMy4wNSA0Mi4wOTItMzMuNTM1IDEyMi44NjEtMzMuMTU2IDE2MS43MzV6IiBmaWxsPSIjMzMzIi8+PC9zdmc+" />
38
- </body>
39
- </html>
40
-
41
- `
42
-
43
- export const generate = (ctx: AppGeneratorContext) =>
44
- generator(ctx).then(renderTemplate(template, toFile('public', 'index.html')))
@@ -1,2 +0,0 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,18 +0,0 @@
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 template = ({}) => /* ts */ `import { app } from './app'
7
- import { logger } from './logger'
8
-
9
- const port = app.get('port')
10
- const host = app.get('host')
11
-
12
- app.listen(port).then(() => {
13
- logger.info(\`Feathers app listening on http://\${host}:\${port}\`)
14
- })
15
- `;
16
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, commons_1.renderSource)(template, (0, pinion_1.toFile)(({ lib }) => lib, 'index')));
17
- exports.generate = generate;
18
- //# sourceMappingURL=index.tpl.js.map
@@ -1 +0,0 @@
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;;;;;;;;;CAStD,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,22 +0,0 @@
1
- import { generator, toFile } from '@feathershq/pinion'
2
- import { renderSource } from '../../commons'
3
- import { AppGeneratorContext } from '../index'
4
-
5
- const template = ({}: AppGeneratorContext) => /* ts */ `import { app } from './app'
6
- import { logger } from './logger'
7
-
8
- const port = app.get('port')
9
- const host = app.get('host')
10
-
11
- app.listen(port).then(() => {
12
- logger.info(\`Feathers app listening on http://\${host}:\${port}\`)
13
- })
14
- `
15
-
16
- export const generate = (ctx: AppGeneratorContext) =>
17
- generator(ctx).then(
18
- renderSource(
19
- template,
20
- toFile<AppGeneratorContext>(({ lib }) => lib, 'index')
21
- )
22
- )
@@ -1,2 +0,0 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,39 +0,0 @@
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 template = ({}) => /* ts */ `import { createLogger, format, transports } from 'winston'
7
- import type { HookContext, NextFunction } from './declarations'
8
-
9
- // Configure the Winston logger. For the complete documentation see https://github.com/winstonjs/winston
10
- export const logger = createLogger({
11
- // To see more detailed errors, change this to 'debug'
12
- level: 'info',
13
- format: format.combine(
14
- format.splat(),
15
- format.simple()
16
- ),
17
- transports: [
18
- new transports.Console()
19
- ]
20
- })
21
-
22
- export const logErrorHook = async (context: HookContext, next: NextFunction) => {
23
- try {
24
- await next()
25
- } catch (error: any) {
26
- logger.error(error.stack)
27
-
28
- // Log validation errors
29
- if (error.data) {
30
- logger.error(error.data)
31
- }
32
-
33
- throw error
34
- }
35
- }
36
- `;
37
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, commons_1.renderSource)(template, (0, pinion_1.toFile)(({ lib }) => lib, 'logger')));
38
- exports.generate = generate;
39
- //# sourceMappingURL=logger.tpl.js.map
@@ -1 +0,0 @@
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BvC,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,QAAQ,CAAC,CACxD,CACF,CAAA;AANU,QAAA,QAAQ,YAMlB"}
@@ -1,44 +0,0 @@
1
- import { generator, toFile } from '@feathershq/pinion'
2
- import { renderSource } from '../../commons'
3
- import { AppGeneratorContext } from '../index'
4
-
5
- const template =
6
- ({}: AppGeneratorContext) => /* ts */ `import { createLogger, format, transports } from 'winston'
7
- import type { HookContext, NextFunction } from './declarations'
8
-
9
- // Configure the Winston logger. For the complete documentation see https://github.com/winstonjs/winston
10
- export const logger = createLogger({
11
- // To see more detailed errors, change this to 'debug'
12
- level: 'info',
13
- format: format.combine(
14
- format.splat(),
15
- format.simple()
16
- ),
17
- transports: [
18
- new transports.Console()
19
- ]
20
- })
21
-
22
- export const logErrorHook = async (context: HookContext, next: NextFunction) => {
23
- try {
24
- await next()
25
- } catch (error: any) {
26
- logger.error(error.stack)
27
-
28
- // Log validation errors
29
- if (error.data) {
30
- logger.error(error.data)
31
- }
32
-
33
- throw error
34
- }
35
- }
36
- `
37
-
38
- export const generate = (ctx: AppGeneratorContext) =>
39
- generator(ctx).then(
40
- renderSource(
41
- template,
42
- toFile<AppGeneratorContext>(({ lib }) => lib, 'logger')
43
- )
44
- )
@@ -1,2 +0,0 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generate = void 0;
4
- const pinion_1 = require("@feathershq/pinion");
5
- const jsPackageJson = (lib) => ({
6
- type: 'module',
7
- scripts: {
8
- start: `node ${lib}`,
9
- dev: `nodemon ${lib}/`,
10
- prettier: 'npx prettier "**/*.js" --write',
11
- mocha: 'cross-env NODE_ENV=test mocha test/ --recursive --exit',
12
- test: 'npm run mocha'
13
- }
14
- });
15
- const tsPackageJson = (lib) => ({
16
- scripts: {
17
- dev: `nodemon -x ts-node ${lib}/index.ts`,
18
- compile: 'shx rm -rf lib/ && tsc',
19
- start: 'node lib/',
20
- prettier: 'npx prettier "**/*.ts" --write',
21
- mocha: 'cross-env NODE_ENV=test mocha test/ --require ts-node/register --recursive --extension .ts --exit',
22
- test: 'npm run mocha'
23
- }
24
- });
25
- const packageJson = ({ name, description, language, packager, database, framework, transports, lib, test, schema }) => ({
26
- name,
27
- description,
28
- version: '0.0.0',
29
- homepage: '',
30
- private: true,
31
- keywords: ['feathers'],
32
- author: {},
33
- contributors: [],
34
- bugs: {},
35
- engines: {
36
- node: `>= ${process.version.substring(1)}`
37
- },
38
- feathers: {
39
- language,
40
- packager,
41
- database,
42
- framework,
43
- transports,
44
- schema
45
- },
46
- directories: {
47
- lib,
48
- test
49
- },
50
- main: language === 'ts' ? 'lib/client' : `${lib}/client`,
51
- ...(language === 'ts' ? tsPackageJson(lib) : jsPackageJson(lib))
52
- });
53
- const generate = (ctx) => (0, pinion_1.generator)(ctx).then((0, pinion_1.writeJSON)(packageJson, (0, pinion_1.toFile)('package.json')));
54
- exports.generate = generate;
55
- //# sourceMappingURL=package.json.tpl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package.json.tpl.js","sourceRoot":"","sources":["../../../src/app/templates/package.json.tpl.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAGj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AC,GAAG,GAAG,SAAS;IACxD,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CACjE,CAAC,CAAA;AAEK,MAAM,QAAQ,GAAG,CAAC,GAAwB,EAAE,EAAE,CACnD,IAAA,kBAAS,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,kBAAS,EAAC,WAAW,EAAE,IAAA,eAAM,EAAC,cAAc,CAAC,CAAC,CAAC,CAAA;AADxD,QAAA,QAAQ,YACgD"}
@@ -1,68 +0,0 @@
1
- import { generator, toFile, writeJSON } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
3
-
4
- const jsPackageJson = (lib: string) => ({
5
- type: 'module',
6
- scripts: {
7
- start: `node ${lib}`,
8
- dev: `nodemon ${lib}/`,
9
- prettier: 'npx prettier "**/*.js" --write',
10
- mocha: 'cross-env NODE_ENV=test mocha test/ --recursive --exit',
11
- test: 'npm run mocha'
12
- }
13
- })
14
-
15
- const tsPackageJson = (lib: string) => ({
16
- scripts: {
17
- dev: `nodemon -x ts-node ${lib}/index.ts`,
18
- compile: 'shx rm -rf lib/ && tsc',
19
- start: 'node lib/',
20
- prettier: 'npx prettier "**/*.ts" --write',
21
- mocha:
22
- 'cross-env NODE_ENV=test mocha test/ --require ts-node/register --recursive --extension .ts --exit',
23
- test: 'npm run mocha'
24
- }
25
- })
26
-
27
- const packageJson = ({
28
- name,
29
- description,
30
- language,
31
- packager,
32
- database,
33
- framework,
34
- transports,
35
- lib,
36
- test,
37
- schema
38
- }: AppGeneratorContext) => ({
39
- name,
40
- description,
41
- version: '0.0.0',
42
- homepage: '',
43
- private: true,
44
- keywords: ['feathers'],
45
- author: {},
46
- contributors: [] as string[],
47
- bugs: {},
48
- engines: {
49
- node: `>= ${process.version.substring(1)}`
50
- },
51
- feathers: {
52
- language,
53
- packager,
54
- database,
55
- framework,
56
- transports,
57
- schema
58
- },
59
- directories: {
60
- lib,
61
- test
62
- },
63
- main: language === 'ts' ? 'lib/client' : `${lib}/client`,
64
- ...(language === 'ts' ? tsPackageJson(lib) : jsPackageJson(lib))
65
- })
66
-
67
- export const generate = (ctx: AppGeneratorContext) =>
68
- generator(ctx).then(writeJSON(packageJson, toFile('package.json')))
@@ -1,2 +0,0 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;
@@ -1,11 +0,0 @@
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,
8
- parser: ctx.language === 'ts' ? 'typescript' : 'babel'
9
- }), (0, pinion_1.toFile)('.prettierrc')));
10
- exports.generate = generate;
11
- //# sourceMappingURL=prettierrc.tpl.js.map
@@ -1 +0,0 @@
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,14 +0,0 @@
1
- import { generator, toFile, writeJSON } from '@feathershq/pinion'
2
- import { AppGeneratorContext } from '../index'
3
- import { PRETTIERRC } from '../../commons'
4
-
5
- export const generate = (ctx: AppGeneratorContext) =>
6
- generator(ctx).then(
7
- writeJSON<AppGeneratorContext>(
8
- (ctx) => ({
9
- ...PRETTIERRC,
10
- parser: ctx.language === 'ts' ? 'typescript' : 'babel'
11
- }),
12
- toFile('.prettierrc')
13
- )
14
- )
@@ -1,2 +0,0 @@
1
- import { AppGeneratorContext } from '../index';
2
- export declare const generate: (ctx: AppGeneratorContext) => Promise<AppGeneratorContext>;