@feathersjs/cli 5.0.0-pre.34 → 5.0.0-pre.36

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 (173) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/lib/index.d.ts +6 -2
  5. package/lib/index.js +59 -2
  6. package/lib/index.js.map +1 -1
  7. package/package.json +28 -30
  8. package/lib/app/index.d.ts +0 -29
  9. package/lib/app/index.js +0 -146
  10. package/lib/app/index.js.map +0 -1
  11. package/lib/app/index.ts +0 -228
  12. package/lib/app/static/.gitignore +0 -121
  13. package/lib/app/templates/app.test.tpl.d.ts +0 -2
  14. package/lib/app/templates/app.test.tpl.js +0 -49
  15. package/lib/app/templates/app.test.tpl.js.map +0 -1
  16. package/lib/app/templates/app.test.tpl.ts +0 -50
  17. package/lib/app/templates/app.tpl.d.ts +0 -2
  18. package/lib/app/templates/app.tpl.js +0 -123
  19. package/lib/app/templates/app.tpl.js.map +0 -1
  20. package/lib/app/templates/app.tpl.ts +0 -138
  21. package/lib/app/templates/channels.tpl.d.ts +0 -2
  22. package/lib/app/templates/channels.tpl.js +0 -49
  23. package/lib/app/templates/channels.tpl.js.map +0 -1
  24. package/lib/app/templates/channels.tpl.ts +0 -55
  25. package/lib/app/templates/client.test.tpl.d.ts +0 -2
  26. package/lib/app/templates/client.test.tpl.js +0 -27
  27. package/lib/app/templates/client.test.tpl.js.map +0 -1
  28. package/lib/app/templates/client.test.tpl.ts +0 -26
  29. package/lib/app/templates/client.tpl.d.ts +0 -2
  30. package/lib/app/templates/client.tpl.js +0 -38
  31. package/lib/app/templates/client.tpl.js.map +0 -1
  32. package/lib/app/templates/client.tpl.ts +0 -45
  33. package/lib/app/templates/configuration.tpl.d.ts +0 -2
  34. package/lib/app/templates/configuration.tpl.js +0 -71
  35. package/lib/app/templates/configuration.tpl.js.map +0 -1
  36. package/lib/app/templates/configuration.tpl.ts +0 -82
  37. package/lib/app/templates/declarations.tpl.d.ts +0 -2
  38. package/lib/app/templates/declarations.tpl.js +0 -28
  39. package/lib/app/templates/declarations.tpl.js.map +0 -1
  40. package/lib/app/templates/declarations.tpl.ts +0 -37
  41. package/lib/app/templates/index.html.tpl.d.ts +0 -2
  42. package/lib/app/templates/index.html.tpl.js +0 -45
  43. package/lib/app/templates/index.html.tpl.js.map +0 -1
  44. package/lib/app/templates/index.html.tpl.ts +0 -44
  45. package/lib/app/templates/index.tpl.d.ts +0 -2
  46. package/lib/app/templates/index.tpl.js +0 -18
  47. package/lib/app/templates/index.tpl.js.map +0 -1
  48. package/lib/app/templates/index.tpl.ts +0 -22
  49. package/lib/app/templates/logger.tpl.d.ts +0 -3
  50. package/lib/app/templates/logger.tpl.js +0 -45
  51. package/lib/app/templates/logger.tpl.js.map +0 -1
  52. package/lib/app/templates/logger.tpl.ts +0 -56
  53. package/lib/app/templates/package.json.tpl.d.ts +0 -2
  54. package/lib/app/templates/package.json.tpl.js +0 -58
  55. package/lib/app/templates/package.json.tpl.js.map +0 -1
  56. package/lib/app/templates/package.json.tpl.ts +0 -71
  57. package/lib/app/templates/prettierrc.tpl.d.ts +0 -2
  58. package/lib/app/templates/prettierrc.tpl.js +0 -11
  59. package/lib/app/templates/prettierrc.tpl.js.map +0 -1
  60. package/lib/app/templates/prettierrc.tpl.ts +0 -14
  61. package/lib/app/templates/readme.md.tpl.d.ts +0 -2
  62. package/lib/app/templates/readme.md.tpl.js +0 -54
  63. package/lib/app/templates/readme.md.tpl.js.map +0 -1
  64. package/lib/app/templates/readme.md.tpl.ts +0 -57
  65. package/lib/app/templates/services.tpl.d.ts +0 -2
  66. package/lib/app/templates/services.tpl.js +0 -15
  67. package/lib/app/templates/services.tpl.js.map +0 -1
  68. package/lib/app/templates/services.tpl.ts +0 -20
  69. package/lib/app/templates/tsconfig.json.tpl.d.ts +0 -2
  70. package/lib/app/templates/tsconfig.json.tpl.js +0 -22
  71. package/lib/app/templates/tsconfig.json.tpl.js.map +0 -1
  72. package/lib/app/templates/tsconfig.json.tpl.ts +0 -28
  73. package/lib/app/templates/validators.tpl.d.ts +0 -2
  74. package/lib/app/templates/validators.tpl.js +0 -36
  75. package/lib/app/templates/validators.tpl.js.map +0 -1
  76. package/lib/app/templates/validators.tpl.ts +0 -40
  77. package/lib/authentication/index.d.ts +0 -73
  78. package/lib/authentication/index.js +0 -107
  79. package/lib/authentication/index.js.map +0 -1
  80. package/lib/authentication/index.ts +0 -126
  81. package/lib/authentication/templates/authentication.tpl.d.ts +0 -2
  82. package/lib/authentication/templates/authentication.tpl.js +0 -40
  83. package/lib/authentication/templates/authentication.tpl.js.map +0 -1
  84. package/lib/authentication/templates/authentication.tpl.ts +0 -51
  85. package/lib/authentication/templates/client.test.tpl.d.ts +0 -2
  86. package/lib/authentication/templates/client.test.tpl.js +0 -62
  87. package/lib/authentication/templates/client.test.tpl.js.map +0 -1
  88. package/lib/authentication/templates/client.test.tpl.ts +0 -74
  89. package/lib/authentication/templates/config.tpl.d.ts +0 -2
  90. package/lib/authentication/templates/config.tpl.js +0 -50
  91. package/lib/authentication/templates/config.tpl.js.map +0 -1
  92. package/lib/authentication/templates/config.tpl.ts +0 -57
  93. package/lib/authentication/templates/declarations.tpl.d.ts +0 -2
  94. package/lib/authentication/templates/declarations.tpl.js +0 -19
  95. package/lib/authentication/templates/declarations.tpl.js.map +0 -1
  96. package/lib/authentication/templates/declarations.tpl.ts +0 -34
  97. package/lib/authentication/templates/knex.tpl.d.ts +0 -2
  98. package/lib/authentication/templates/knex.tpl.js +0 -45
  99. package/lib/authentication/templates/knex.tpl.js.map +0 -1
  100. package/lib/authentication/templates/knex.tpl.ts +0 -62
  101. package/lib/authentication/templates/schema.json.tpl.d.ts +0 -2
  102. package/lib/authentication/templates/schema.json.tpl.js +0 -103
  103. package/lib/authentication/templates/schema.json.tpl.js.map +0 -1
  104. package/lib/authentication/templates/schema.json.tpl.ts +0 -124
  105. package/lib/authentication/templates/schema.typebox.tpl.d.ts +0 -3
  106. package/lib/authentication/templates/schema.typebox.tpl.js +0 -86
  107. package/lib/authentication/templates/schema.typebox.tpl.js.map +0 -1
  108. package/lib/authentication/templates/schema.typebox.tpl.ts +0 -108
  109. package/lib/cli.d.ts +0 -6
  110. package/lib/cli.js +0 -75
  111. package/lib/cli.js.map +0 -1
  112. package/lib/cli.ts +0 -68
  113. package/lib/commons.d.ts +0 -150
  114. package/lib/commons.js +0 -198
  115. package/lib/commons.js.map +0 -1
  116. package/lib/commons.ts +0 -284
  117. package/lib/connection/index.d.ts +0 -55
  118. package/lib/connection/index.js +0 -88
  119. package/lib/connection/index.js.map +0 -1
  120. package/lib/connection/index.ts +0 -123
  121. package/lib/connection/templates/knex.tpl.d.ts +0 -2
  122. package/lib/connection/templates/knex.tpl.js +0 -48
  123. package/lib/connection/templates/knex.tpl.js.map +0 -1
  124. package/lib/connection/templates/knex.tpl.ts +0 -67
  125. package/lib/connection/templates/mongodb.tpl.d.ts +0 -2
  126. package/lib/connection/templates/mongodb.tpl.js +0 -34
  127. package/lib/connection/templates/mongodb.tpl.js.map +0 -1
  128. package/lib/connection/templates/mongodb.tpl.ts +0 -40
  129. package/lib/hook/index.d.ts +0 -22
  130. package/lib/hook/index.js +0 -43
  131. package/lib/hook/index.js.map +0 -1
  132. package/lib/hook/index.ts +0 -47
  133. package/lib/hook/templates/hook.tpl.d.ts +0 -2
  134. package/lib/hook/templates/hook.tpl.js +0 -22
  135. package/lib/hook/templates/hook.tpl.js.map +0 -1
  136. package/lib/hook/templates/hook.tpl.ts +0 -33
  137. package/lib/index.ts +0 -2
  138. package/lib/service/index.d.ts +0 -64
  139. package/lib/service/index.js +0 -116
  140. package/lib/service/index.js.map +0 -1
  141. package/lib/service/index.ts +0 -191
  142. package/lib/service/templates/client.tpl.d.ts +0 -2
  143. package/lib/service/templates/client.tpl.js +0 -31
  144. package/lib/service/templates/client.tpl.js.map +0 -1
  145. package/lib/service/templates/client.tpl.ts +0 -57
  146. package/lib/service/templates/schema.json.tpl.d.ts +0 -2
  147. package/lib/service/templates/schema.json.tpl.js +0 -83
  148. package/lib/service/templates/schema.json.tpl.js.map +0 -1
  149. package/lib/service/templates/schema.json.tpl.ts +0 -98
  150. package/lib/service/templates/schema.typebox.tpl.d.ts +0 -2
  151. package/lib/service/templates/schema.typebox.tpl.js +0 -61
  152. package/lib/service/templates/schema.typebox.tpl.js.map +0 -1
  153. package/lib/service/templates/schema.typebox.tpl.ts +0 -76
  154. package/lib/service/templates/service.tpl.d.ts +0 -3
  155. package/lib/service/templates/service.tpl.js +0 -112
  156. package/lib/service/templates/service.tpl.js.map +0 -1
  157. package/lib/service/templates/service.tpl.ts +0 -152
  158. package/lib/service/templates/test.tpl.d.ts +0 -2
  159. package/lib/service/templates/test.tpl.js +0 -25
  160. package/lib/service/templates/test.tpl.js.map +0 -1
  161. package/lib/service/templates/test.tpl.ts +0 -33
  162. package/lib/service/type/custom.tpl.d.ts +0 -3
  163. package/lib/service/type/custom.tpl.js +0 -98
  164. package/lib/service/type/custom.tpl.js.map +0 -1
  165. package/lib/service/type/custom.tpl.ts +0 -109
  166. package/lib/service/type/knex.tpl.d.ts +0 -3
  167. package/lib/service/type/knex.tpl.js +0 -71
  168. package/lib/service/type/knex.tpl.js.map +0 -1
  169. package/lib/service/type/knex.tpl.ts +0 -92
  170. package/lib/service/type/mongodb.tpl.d.ts +0 -3
  171. package/lib/service/type/mongodb.tpl.js +0 -50
  172. package/lib/service/type/mongodb.tpl.js.map +0 -1
  173. package/lib/service/type/mongodb.tpl.ts +0 -62
package/lib/commons.d.ts DELETED
@@ -1,150 +0,0 @@
1
- import { PackageJson } from 'type-fest';
2
- import { Callable, PinionContext, Location } from '@feathershq/pinion';
3
- import * as ts from 'typescript';
4
- import { Options as PrettierOptions } from 'prettier';
5
- export declare const version: any;
6
- export type DependencyVersions = {
7
- [key: string]: string;
8
- };
9
- /**
10
- * The database types supported by this generator
11
- */
12
- export type DatabaseType = 'mongodb' | 'mysql' | 'postgresql' | 'sqlite' | 'mssql';
13
- /**
14
- * Returns the name of the Feathers database adapter for a supported database type
15
- *
16
- * @param database The type of the database
17
- * @returns The name of the adapter
18
- */
19
- export declare const getDatabaseAdapter: (database: DatabaseType) => "mongodb" | "knex";
20
- export type FeathersAppInfo = {
21
- /**
22
- * The application language
23
- */
24
- language: 'ts' | 'js';
25
- /**
26
- * The main database
27
- */
28
- database: DatabaseType;
29
- /**
30
- * The package manager used
31
- */
32
- packager: 'yarn' | 'npm';
33
- /**
34
- * A list of all chosen transports
35
- */
36
- transports: ('rest' | 'websockets')[];
37
- /**
38
- * The HTTP framework used
39
- */
40
- framework: 'koa' | 'express';
41
- /**
42
- * The main schema definition format
43
- */
44
- schema: 'typebox' | 'json';
45
- };
46
- export interface AppPackageJson extends PackageJson {
47
- feathers?: FeathersAppInfo;
48
- }
49
- export interface FeathersBaseContext extends PinionContext {
50
- /**
51
- * Information about the Feathers application (like chosen language, database etc.)
52
- * usually taken from `package.json`
53
- */
54
- feathers: FeathersAppInfo;
55
- /**
56
- * The package.json file
57
- */
58
- pkg: AppPackageJson;
59
- /**
60
- * The folder where source files are put
61
- */
62
- lib: string;
63
- /**
64
- * The folder where test files are put
65
- */
66
- test: string;
67
- /**
68
- * The language the app is generated in
69
- */
70
- language: 'js' | 'ts';
71
- /**
72
- * A list dependencies that should be installed with a certain version.
73
- * Used for installing development dependencies during testing.
74
- */
75
- dependencyVersions?: DependencyVersions;
76
- }
77
- /**
78
- * Returns dependencies with the versions from the context attached (if available)
79
- *
80
- * @param dependencies The dependencies to install
81
- * @param versions The dependency version list
82
- * @returns A list of dependencies with their versions
83
- */
84
- export declare const addVersions: (dependencies: string[], versions: DependencyVersions) => string[];
85
- /**
86
- * Loads the application package.json and populates information like the library and test directory
87
- * and Feathers app specific information.
88
- *
89
- * @returns The updated context
90
- */
91
- export declare const initializeBaseContext: () => <C extends FeathersBaseContext>(ctx: C) => Promise<Awaited<C> & {
92
- lib: string;
93
- test: string;
94
- language: "ts" | "js";
95
- feathers: FeathersAppInfo;
96
- }>;
97
- /**
98
- * Checks if the current context contains a valid generated application. This is necesary for most
99
- * generators (besides the app generator).
100
- *
101
- * @param ctx The context to check against
102
- * @returns Throws an error or returns the original context
103
- */
104
- export declare const checkPreconditions: () => <T extends FeathersBaseContext>(ctx: T) => Promise<T>;
105
- /**
106
- * Returns the transpiled and prettified JavaScript for a TypeScript source code
107
- *
108
- * @param typescript The TypeScript source code
109
- * @param options TypeScript transpilation options
110
- * @returns The formatted JavaScript source code
111
- */
112
- export declare const getJavaScript: (typescript: string, options?: ts.TranspileOptions) => string;
113
- /**
114
- * The default configuration for prettifying files
115
- */
116
- export declare const PRETTIERRC: PrettierOptions;
117
- export declare const prettify: <C extends PinionContext & {
118
- language: 'js' | 'ts';
119
- }>(target: Callable<string, C>, options?: PrettierOptions) => (ctx: C) => Promise<C>;
120
- /**
121
- * Render a source file template for the language set in the context.
122
- *
123
- * @param templates The JavaScript and TypeScript template to render
124
- * @param target The target filename without extension (will be added based on language)
125
- * @returns The updated context
126
- */
127
- export declare const renderSource: <C extends PinionContext & {
128
- language: 'js' | 'ts';
129
- }>(template: Callable<string, C>, target: Callable<string, C>, options?: {
130
- force: boolean;
131
- }) => (ctx: C) => Promise<C>;
132
- /**
133
- * Inject a source template as the language set in the context.
134
- *
135
- * @param template The source template to render
136
- * @param location The location to inject the code to. Must use the target language.
137
- * @param target The target file name
138
- * @param transpile Set to `false` if the code should not be transpiled to JavaScript
139
- * @returns
140
- */
141
- export declare const injectSource: <C extends PinionContext & {
142
- language: 'js' | 'ts';
143
- }>(template: Callable<string, C>, location: Location<C>, target: Callable<string, C>, transpile?: boolean) => (ctx: C) => Promise<C>;
144
- /**
145
- * Synchronously checks if a file exits
146
- * @param context The base context
147
- * @param filenames The filenames to check
148
- * @returns Wether the file exists or not
149
- */
150
- export declare const fileExists: (...filenames: string[]) => boolean;
package/lib/commons.js DELETED
@@ -1,198 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.fileExists = exports.injectSource = exports.renderSource = exports.prettify = exports.PRETTIERRC = exports.getJavaScript = exports.checkPreconditions = exports.initializeBaseContext = exports.addVersions = exports.getDatabaseAdapter = exports.version = void 0;
30
- const fs_1 = __importDefault(require("fs"));
31
- const path_1 = require("path");
32
- const promises_1 = require("fs/promises");
33
- const pinion_1 = require("@feathershq/pinion");
34
- const ts = __importStar(require("typescript"));
35
- const prettier_1 = __importDefault(require("prettier"));
36
- const path_2 = __importDefault(require("path"));
37
- exports.version = JSON.parse(fs_1.default.readFileSync((0, path_1.join)(__dirname, '..', 'package.json')).toString()).version;
38
- /**
39
- * Returns the name of the Feathers database adapter for a supported database type
40
- *
41
- * @param database The type of the database
42
- * @returns The name of the adapter
43
- */
44
- const getDatabaseAdapter = (database) => (database === 'mongodb' ? 'mongodb' : 'knex');
45
- exports.getDatabaseAdapter = getDatabaseAdapter;
46
- /**
47
- * Returns dependencies with the versions from the context attached (if available)
48
- *
49
- * @param dependencies The dependencies to install
50
- * @param versions The dependency version list
51
- * @returns A list of dependencies with their versions
52
- */
53
- const addVersions = (dependencies, versions) => dependencies.map((dep) => `${dep}@${versions[dep] ? versions[dep] : 'latest'}`);
54
- exports.addVersions = addVersions;
55
- /**
56
- * Loads the application package.json and populates information like the library and test directory
57
- * and Feathers app specific information.
58
- *
59
- * @returns The updated context
60
- */
61
- const initializeBaseContext = () => (ctx) => Promise.resolve(ctx)
62
- .then((0, pinion_1.loadJSON)((0, pinion_1.fromFile)('package.json'), (pkg) => ({ pkg }), {}))
63
- .then((0, pinion_1.loadJSON)(path_2.default.join(__dirname, '..', 'package.json'), (pkg) => ({
64
- dependencyVersions: {
65
- ...pkg.devDependencies,
66
- ...ctx.dependencyVersions,
67
- '@feathersjs/cli': exports.version
68
- }
69
- })))
70
- .then((ctx) => {
71
- var _a, _b, _c, _d, _e, _f, _g;
72
- return ({
73
- ...ctx,
74
- lib: ((_b = (_a = ctx.pkg) === null || _a === void 0 ? void 0 : _a.directories) === null || _b === void 0 ? void 0 : _b.lib) || 'src',
75
- test: ((_d = (_c = ctx.pkg) === null || _c === void 0 ? void 0 : _c.directories) === null || _d === void 0 ? void 0 : _d.test) || 'test',
76
- language: ctx.language || ((_f = (_e = ctx.pkg) === null || _e === void 0 ? void 0 : _e.feathers) === null || _f === void 0 ? void 0 : _f.language),
77
- feathers: (_g = ctx.pkg) === null || _g === void 0 ? void 0 : _g.feathers
78
- });
79
- });
80
- exports.initializeBaseContext = initializeBaseContext;
81
- /**
82
- * Checks if the current context contains a valid generated application. This is necesary for most
83
- * generators (besides the app generator).
84
- *
85
- * @param ctx The context to check against
86
- * @returns Throws an error or returns the original context
87
- */
88
- const checkPreconditions = () => async (ctx) => {
89
- if (!ctx.feathers) {
90
- throw new Error(`Can not run generator since the current folder does not appear to be a Feathers application.
91
- Either your package.json is missing or it does not have \`feathers\` property.
92
- `);
93
- }
94
- return ctx;
95
- };
96
- exports.checkPreconditions = checkPreconditions;
97
- const importRegex = /from '(\..*)'/g;
98
- const escapeNewLines = (code) => code.replace(/\n\n/g, '\n/* :newline: */');
99
- const restoreNewLines = (code) => code.replace(/\/\* :newline: \*\//g, '\n');
100
- const fixLocalImports = (code) => code.replace(importRegex, "from '$1.js'");
101
- /**
102
- * Returns the transpiled and prettified JavaScript for a TypeScript source code
103
- *
104
- * @param typescript The TypeScript source code
105
- * @param options TypeScript transpilation options
106
- * @returns The formatted JavaScript source code
107
- */
108
- const getJavaScript = (typescript, options = {}) => {
109
- const source = escapeNewLines(typescript);
110
- const transpiled = ts.transpileModule(source, {
111
- ...options,
112
- compilerOptions: {
113
- module: ts.ModuleKind.ESNext,
114
- target: ts.ScriptTarget.ES2020,
115
- preserveValueImports: true,
116
- ...options.compilerOptions
117
- }
118
- });
119
- return fixLocalImports(restoreNewLines(transpiled.outputText));
120
- };
121
- exports.getJavaScript = getJavaScript;
122
- const getFileName = async (target, ctx) => `${await (0, pinion_1.getCallable)(target, ctx)}.${ctx.language}`;
123
- /**
124
- * The default configuration for prettifying files
125
- */
126
- exports.PRETTIERRC = {
127
- tabWidth: 2,
128
- useTabs: false,
129
- printWidth: 110,
130
- semi: false,
131
- trailingComma: 'none',
132
- singleQuote: true
133
- };
134
- /*
135
- * Format a source file using Prettier. Will use the local configuration, the settings set in
136
- * `options` or a default configuration
137
- *
138
- * @param target The file to prettify
139
- * @param options The Prettier options
140
- * @returns The updated context
141
- */
142
- const prettify = (target, options = exports.PRETTIERRC) => async (ctx) => {
143
- const fileName = await getFileName(target, ctx);
144
- const config = (await prettier_1.default.resolveConfig(ctx.cwd)) || options;
145
- const content = (await (0, promises_1.readFile)(fileName)).toString();
146
- try {
147
- await (0, promises_1.writeFile)(fileName, await prettier_1.default.format(content, {
148
- parser: ctx.language === 'ts' ? 'typescript' : 'babel',
149
- ...config
150
- }));
151
- }
152
- catch (error) {
153
- throw new Error(`Error prettifying ${fileName}: ${error.message}`);
154
- }
155
- return ctx;
156
- };
157
- exports.prettify = prettify;
158
- /**
159
- * Render a source file template for the language set in the context.
160
- *
161
- * @param templates The JavaScript and TypeScript template to render
162
- * @param target The target filename without extension (will be added based on language)
163
- * @returns The updated context
164
- */
165
- const renderSource = (template, target, options) => async (ctx) => {
166
- const { language } = ctx;
167
- const fileName = await getFileName(target, ctx);
168
- const content = language === 'js' ? (0, exports.getJavaScript)(await (0, pinion_1.getCallable)(template, ctx)) : template;
169
- const renderer = (0, pinion_1.renderTemplate)(content, fileName, options);
170
- return renderer(ctx).then((0, exports.prettify)(target));
171
- };
172
- exports.renderSource = renderSource;
173
- /**
174
- * Inject a source template as the language set in the context.
175
- *
176
- * @param template The source template to render
177
- * @param location The location to inject the code to. Must use the target language.
178
- * @param target The target file name
179
- * @param transpile Set to `false` if the code should not be transpiled to JavaScript
180
- * @returns
181
- */
182
- const injectSource = (template, location, target, transpile = true) => async (ctx) => {
183
- const { language } = ctx;
184
- const source = language === 'js' && transpile ? (0, exports.getJavaScript)(await (0, pinion_1.getCallable)(template, ctx)) : template;
185
- const fileName = await getFileName(target, ctx);
186
- const injector = (0, pinion_1.inject)(source, location, fileName);
187
- return injector(ctx).then((0, exports.prettify)(target));
188
- };
189
- exports.injectSource = injectSource;
190
- /**
191
- * Synchronously checks if a file exits
192
- * @param context The base context
193
- * @param filenames The filenames to check
194
- * @returns Wether the file exists or not
195
- */
196
- const fileExists = (...filenames) => fs_1.default.existsSync((0, path_1.join)(...filenames));
197
- exports.fileExists = fileExists;
198
- //# sourceMappingURL=commons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commons.js","sourceRoot":"","sources":["../src/commons.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAmB;AACnB,+BAA2B;AAE3B,0CAAiD;AACjD,+CAS2B;AAC3B,+CAAgC;AAChC,wDAA+D;AAC/D,gDAAuB;AAER,eAAO,GAAK,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AAQ,KAAK,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,IAAA,qBAAa,EAAC,MAAM,IAAA,oBAAW,EAAY,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IACxG,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/C,MAAM,QAAQ,GAAG,IAAA,eAAM,EAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAEnD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAA,gBAAQ,EAAC,MAAM,CAAC,CAAC,CAAA;AAC7C,CAAC,CAAA;AAfU,QAAA,YAAY,gBAetB;AAEH;;;;;GAKG;AACI,MAAM,UAAU,GAAG,CAAC,GAAG,SAAmB,EAAE,EAAE,CAAC,YAAE,CAAC,UAAU,CAAC,IAAA,WAAI,EAAC,GAAG,SAAS,CAAC,CAAC,CAAA;AAA1E,QAAA,UAAU,cAAgE"}
package/lib/commons.ts DELETED
@@ -1,284 +0,0 @@
1
- import fs from 'fs'
2
- import { join } from 'path'
3
- import { PackageJson } from 'type-fest'
4
- import { readFile, writeFile } from 'fs/promises'
5
- import {
6
- Callable,
7
- PinionContext,
8
- loadJSON,
9
- fromFile,
10
- getCallable,
11
- renderTemplate,
12
- inject,
13
- Location
14
- } from '@feathershq/pinion'
15
- import * as ts from 'typescript'
16
- import prettier, { Options as PrettierOptions } from 'prettier'
17
- import path from 'path'
18
-
19
- export const { version } = JSON.parse(fs.readFileSync(join(__dirname, '..', 'package.json')).toString())
20
-
21
- export type DependencyVersions = { [key: string]: string }
22
-
23
- /**
24
- * The database types supported by this generator
25
- */
26
- export type DatabaseType = 'mongodb' | 'mysql' | 'postgresql' | 'sqlite' | 'mssql'
27
-
28
- /**
29
- * Returns the name of the Feathers database adapter for a supported database type
30
- *
31
- * @param database The type of the database
32
- * @returns The name of the adapter
33
- */
34
- export const getDatabaseAdapter = (database: DatabaseType) => (database === 'mongodb' ? 'mongodb' : 'knex')
35
-
36
- export type FeathersAppInfo = {
37
- /**
38
- * The application language
39
- */
40
- language: 'ts' | 'js'
41
- /**
42
- * The main database
43
- */
44
- database: DatabaseType
45
- /**
46
- * The package manager used
47
- */
48
- packager: 'yarn' | 'npm'
49
- /**
50
- * A list of all chosen transports
51
- */
52
- transports: ('rest' | 'websockets')[]
53
- /**
54
- * The HTTP framework used
55
- */
56
- framework: 'koa' | 'express'
57
- /**
58
- * The main schema definition format
59
- */
60
- schema: 'typebox' | 'json'
61
- }
62
-
63
- export interface AppPackageJson extends PackageJson {
64
- feathers?: FeathersAppInfo
65
- }
66
-
67
- export interface FeathersBaseContext extends PinionContext {
68
- /**
69
- * Information about the Feathers application (like chosen language, database etc.)
70
- * usually taken from `package.json`
71
- */
72
- feathers: FeathersAppInfo
73
- /**
74
- * The package.json file
75
- */
76
- pkg: AppPackageJson
77
- /**
78
- * The folder where source files are put
79
- */
80
- lib: string
81
- /**
82
- * The folder where test files are put
83
- */
84
- test: string
85
- /**
86
- * The language the app is generated in
87
- */
88
- language: 'js' | 'ts'
89
- /**
90
- * A list dependencies that should be installed with a certain version.
91
- * Used for installing development dependencies during testing.
92
- */
93
- dependencyVersions?: DependencyVersions
94
- }
95
-
96
- /**
97
- * Returns dependencies with the versions from the context attached (if available)
98
- *
99
- * @param dependencies The dependencies to install
100
- * @param versions The dependency version list
101
- * @returns A list of dependencies with their versions
102
- */
103
- export const addVersions = (dependencies: string[], versions: DependencyVersions) =>
104
- dependencies.map((dep) => `${dep}@${versions[dep] ? versions[dep] : 'latest'}`)
105
-
106
- /**
107
- * Loads the application package.json and populates information like the library and test directory
108
- * and Feathers app specific information.
109
- *
110
- * @returns The updated context
111
- */
112
- export const initializeBaseContext =
113
- () =>
114
- <C extends FeathersBaseContext>(ctx: C) =>
115
- Promise.resolve(ctx)
116
- .then(loadJSON(fromFile('package.json'), (pkg) => ({ pkg }), {}))
117
- .then(
118
- loadJSON(path.join(__dirname, '..', 'package.json'), (pkg: PackageJson) => ({
119
- dependencyVersions: {
120
- ...pkg.devDependencies,
121
- ...ctx.dependencyVersions,
122
- '@feathersjs/cli': version
123
- }
124
- }))
125
- )
126
- .then((ctx) => ({
127
- ...ctx,
128
- lib: ctx.pkg?.directories?.lib || 'src',
129
- test: ctx.pkg?.directories?.test || 'test',
130
- language: ctx.language || ctx.pkg?.feathers?.language,
131
- feathers: ctx.pkg?.feathers
132
- }))
133
-
134
- /**
135
- * Checks if the current context contains a valid generated application. This is necesary for most
136
- * generators (besides the app generator).
137
- *
138
- * @param ctx The context to check against
139
- * @returns Throws an error or returns the original context
140
- */
141
- export const checkPreconditions =
142
- () =>
143
- async <T extends FeathersBaseContext>(ctx: T) => {
144
- if (!ctx.feathers) {
145
- throw new Error(`Can not run generator since the current folder does not appear to be a Feathers application.
146
- Either your package.json is missing or it does not have \`feathers\` property.
147
- `)
148
- }
149
-
150
- return ctx
151
- }
152
-
153
- const importRegex = /from '(\..*)'/g
154
- const escapeNewLines = (code: string) => code.replace(/\n\n/g, '\n/* :newline: */')
155
- const restoreNewLines = (code: string) => code.replace(/\/\* :newline: \*\//g, '\n')
156
- const fixLocalImports = (code: string) => code.replace(importRegex, "from '$1.js'")
157
-
158
- /**
159
- * Returns the transpiled and prettified JavaScript for a TypeScript source code
160
- *
161
- * @param typescript The TypeScript source code
162
- * @param options TypeScript transpilation options
163
- * @returns The formatted JavaScript source code
164
- */
165
- export const getJavaScript = (typescript: string, options: ts.TranspileOptions = {}) => {
166
- const source = escapeNewLines(typescript)
167
- const transpiled = ts.transpileModule(source, {
168
- ...options,
169
- compilerOptions: {
170
- module: ts.ModuleKind.ESNext,
171
- target: ts.ScriptTarget.ES2020,
172
- preserveValueImports: true,
173
- ...options.compilerOptions
174
- }
175
- })
176
-
177
- return fixLocalImports(restoreNewLines(transpiled.outputText))
178
- }
179
-
180
- const getFileName = async <C extends PinionContext & { language: 'js' | 'ts' }>(
181
- target: Callable<string, C>,
182
- ctx: C
183
- ) => `${await getCallable(target, ctx)}.${ctx.language}`
184
-
185
- /**
186
- * The default configuration for prettifying files
187
- */
188
- export const PRETTIERRC: PrettierOptions = {
189
- tabWidth: 2,
190
- useTabs: false,
191
- printWidth: 110,
192
- semi: false,
193
- trailingComma: 'none',
194
- singleQuote: true
195
- }
196
-
197
- /*
198
- * Format a source file using Prettier. Will use the local configuration, the settings set in
199
- * `options` or a default configuration
200
- *
201
- * @param target The file to prettify
202
- * @param options The Prettier options
203
- * @returns The updated context
204
- */
205
- export const prettify =
206
- <C extends PinionContext & { language: 'js' | 'ts' }>(
207
- target: Callable<string, C>,
208
- options: PrettierOptions = PRETTIERRC
209
- ) =>
210
- async (ctx: C) => {
211
- const fileName = await getFileName(target, ctx)
212
- const config = (await prettier.resolveConfig(ctx.cwd)) || options
213
- const content = (await readFile(fileName)).toString()
214
-
215
- try {
216
- await writeFile(
217
- fileName,
218
- await prettier.format(content, {
219
- parser: ctx.language === 'ts' ? 'typescript' : 'babel',
220
- ...config
221
- })
222
- )
223
- } catch (error: any) {
224
- throw new Error(`Error prettifying ${fileName}: ${error.message}`)
225
- }
226
-
227
- return ctx
228
- }
229
-
230
- /**
231
- * Render a source file template for the language set in the context.
232
- *
233
- * @param templates The JavaScript and TypeScript template to render
234
- * @param target The target filename without extension (will be added based on language)
235
- * @returns The updated context
236
- */
237
- export const renderSource =
238
- <C extends PinionContext & { language: 'js' | 'ts' }>(
239
- template: Callable<string, C>,
240
- target: Callable<string, C>,
241
- options?: { force: boolean }
242
- ) =>
243
- async (ctx: C) => {
244
- const { language } = ctx
245
- const fileName = await getFileName(target, ctx)
246
- const content = language === 'js' ? getJavaScript(await getCallable<string, C>(template, ctx)) : template
247
- const renderer = renderTemplate(content, fileName, options)
248
-
249
- return renderer(ctx).then(prettify(target))
250
- }
251
-
252
- /**
253
- * Inject a source template as the language set in the context.
254
- *
255
- * @param template The source template to render
256
- * @param location The location to inject the code to. Must use the target language.
257
- * @param target The target file name
258
- * @param transpile Set to `false` if the code should not be transpiled to JavaScript
259
- * @returns
260
- */
261
- export const injectSource =
262
- <C extends PinionContext & { language: 'js' | 'ts' }>(
263
- template: Callable<string, C>,
264
- location: Location<C>,
265
- target: Callable<string, C>,
266
- transpile = true
267
- ) =>
268
- async (ctx: C) => {
269
- const { language } = ctx
270
- const source =
271
- language === 'js' && transpile ? getJavaScript(await getCallable<string, C>(template, ctx)) : template
272
- const fileName = await getFileName(target, ctx)
273
- const injector = inject(source, location, fileName)
274
-
275
- return injector(ctx).then(prettify(target))
276
- }
277
-
278
- /**
279
- * Synchronously checks if a file exits
280
- * @param context The base context
281
- * @param filenames The filenames to check
282
- * @returns Wether the file exists or not
283
- */
284
- export const fileExists = (...filenames: string[]) => fs.existsSync(join(...filenames))
@@ -1,55 +0,0 @@
1
- import { FeathersBaseContext, DatabaseType } from '../commons';
2
- export interface ConnectionGeneratorContext extends FeathersBaseContext {
3
- name?: string;
4
- database: DatabaseType;
5
- connectionString: string;
6
- dependencies: string[];
7
- }
8
- export type ConnectionGeneratorArguments = FeathersBaseContext & Partial<Pick<ConnectionGeneratorContext, 'database' | 'connectionString' | 'name'>>;
9
- export declare const defaultConnectionString: (type: DatabaseType, name: string) => string;
10
- export declare const prompts: ({ database, connectionString, pkg, name }: ConnectionGeneratorArguments) => ({
11
- name: string;
12
- type: string;
13
- when: boolean;
14
- message: string;
15
- suffix: string;
16
- choices: {
17
- value: string;
18
- name: string;
19
- }[];
20
- default?: undefined;
21
- } | {
22
- name: string;
23
- type: string;
24
- when: boolean;
25
- message: string;
26
- default: (answers: {
27
- name?: string;
28
- database: DatabaseType;
29
- }) => string;
30
- suffix?: undefined;
31
- choices?: undefined;
32
- })[];
33
- export declare const DATABASE_CLIENTS: {
34
- mongodb: string;
35
- sqlite: string;
36
- postgresql: string;
37
- mysql: string;
38
- mssql: string;
39
- };
40
- export declare const getDatabaseClient: (database: DatabaseType) => string;
41
- export declare const generate: (ctx: ConnectionGeneratorArguments) => Promise<{
42
- dependencies: string[];
43
- name?: string;
44
- database: DatabaseType;
45
- connectionString: string;
46
- feathers: import("../commons").FeathersAppInfo;
47
- pkg: import("../commons").AppPackageJson;
48
- lib: string;
49
- test: string;
50
- language: "ts" | "js";
51
- dependencyVersions?: import("../commons").DependencyVersions;
52
- cwd: string;
53
- _?: (string | number)[];
54
- pinion: import("@feathershq/pinion").Configuration;
55
- }>;