@rvoh/psychic 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,7 +66,7 @@ export default class PsychicCLI {
66
66
  program
67
67
  .command('generate:resource')
68
68
  .alias('g:resource')
69
- .description('create a Dream model, migration, controller, serializer, and spec placeholders')
69
+ .description('Generates a Dream model with corresponding spec factory, serializer, migration, and controller with the inheritance chain leading to that controller, with fleshed out specs for each resourceful action in the controller.')
70
70
  .option('--singular', 'generates a "resource" route instead of "resources", along with the necessary controller and spec changes')
71
71
  .option('--only <onlyActions>', `comma separated list of resourceful endpionts (e.g. "--only=create,show"); any of:
72
72
  - index
@@ -91,7 +91,7 @@ export default class PsychicCLI {
91
91
  program
92
92
  .command('generate:controller')
93
93
  .alias('g:controller')
94
- .description('create a controller')
94
+ .description('Generates a controller and the inheritance chain leading to that controller, and a spec skeleton for the controller.')
95
95
  .argument('<controllerName>', 'the name of the controller to create, including namespaces, e.g. Posts or Api/V1/Posts')
96
96
  .argument('[actions...]', 'the names of controller actions to create')
97
97
  .action(async (controllerName, actions) => {
@@ -101,7 +101,7 @@ export default class PsychicCLI {
101
101
  });
102
102
  program
103
103
  .command('setup:sync:enums')
104
- .description('generates an initializer in your app for syncing enums to a particular path.')
104
+ .description('Generates an initializer in your app for syncing enums to a particular path.')
105
105
  .argument('<outfile>', 'the path from your backend directory to the location which you want the enums copied. Should end with .ts, i.e. "../client/src/api/enums.ts"')
106
106
  .option('--initializer-filename <initializerFilename>', 'the name you want the file to be in your initializers folder. defaults to `sync-enums.ts`')
107
107
  .action(async (outfile, { initializerName, }) => {
@@ -114,7 +114,7 @@ export default class PsychicCLI {
114
114
  });
115
115
  program
116
116
  .command('setup:sync:openapi-redux')
117
- .description('generates openapi redux bindings to connect one of your openapi files to one of your clients')
117
+ .description('Generates openapi redux bindings to connect one of your openapi files to one of your clients.')
118
118
  .option('--schema-file <schemaFile>', 'the path from your api root to the openapi file you wish to use to generate your schema, i.e. ./src/openapi/openapi.json')
119
119
  .option('--api-file <apiFile>', 'the path to the boilerplate api file that will be used to scaffold your backend endpoints together with, i.e. ../client/app/api.ts')
120
120
  .option('--api-import <apiImport>', 'the camelCased name of the export from your api module, i.e. emptyBackendApi')
@@ -136,7 +136,7 @@ export default class PsychicCLI {
136
136
  });
137
137
  program
138
138
  .command('setup:sync:openapi-typescript')
139
- .description('generates an initializer in your app for converting one of your openapi files to typescript')
139
+ .description('Generates an initializer in your app for converting one of your openapi files to typescript.')
140
140
  .argument('<openapiFilepath>', 'the path from your backend directory to the openapi file you wish to scan, i.e. "./src/openapi/openapi.json"')
141
141
  .argument('<outfile>', 'the path from your backend directory to the location which you want the openapi types written to. Must end with .d.ts, i.e. "./src/conf/openapi/openapi.types.d.ts"')
142
142
  .option('--initializer-filename <initializerFilename>', 'the name you want the file to be in your initializers folder. defaults to `sync-openapi-typescript.ts`')
@@ -150,7 +150,7 @@ export default class PsychicCLI {
150
150
  });
151
151
  program
152
152
  .command('routes')
153
- .description('examines your current models, building a type-map of the associations so that the ORM can understand your relational setup. This is commited to your repo, and synced to the dream repo for consumption within the underlying library.')
153
+ .description('Prints a list of routes defined by the application, including path arguments and the controller/action reached by the route.')
154
154
  .action(async () => {
155
155
  await initializePsychicApp();
156
156
  PsychicBin.printRoutes();
@@ -158,7 +158,7 @@ export default class PsychicCLI {
158
158
  });
159
159
  program
160
160
  .command('sync')
161
- .description('sync introspects your database, updating your schema to reflect, and then syncs the new schema with the installed dream node module, allowing it provide your schema to the underlying kysely integration')
161
+ .description("Generates types from the current state of the database. Generates OpenAPI specs from @OpenAPI decorated controller actions. Additional sync actions may be customized with `on('cli:sync', async () => {})` in conf/app.ts or in an initializer in `conf/initializers/`.")
162
162
  .option('--ignore-errors')
163
163
  .option('--schema-only')
164
164
  .action(async (options) => {
@@ -184,13 +184,13 @@ export default class PsychicCLI {
184
184
  });
185
185
  program
186
186
  .command('sync:routes')
187
- .description('reads the routes generated by your app and generates a cache file, which is then used to give autocomplete support to the route helper, amoongst other things.')
187
+ .description('Reads the routes generated by your app and generates a cache file, which is then used to give autocomplete support to the route helper and other things.')
188
188
  .action(async () => {
189
189
  await PsychicBin.syncRoutes();
190
190
  });
191
191
  program
192
192
  .command('sync:openapi')
193
- .description('syncs openapi.json file to current state of all psychic controllers within the app')
193
+ .description('Syncs openapi.json file to current state of all psychic controllers within the app')
194
194
  .action(async () => {
195
195
  await initializePsychicApp();
196
196
  await PsychicBin.syncOpenapiJson();
@@ -66,7 +66,7 @@ export default class PsychicCLI {
66
66
  program
67
67
  .command('generate:resource')
68
68
  .alias('g:resource')
69
- .description('create a Dream model, migration, controller, serializer, and spec placeholders')
69
+ .description('Generates a Dream model with corresponding spec factory, serializer, migration, and controller with the inheritance chain leading to that controller, with fleshed out specs for each resourceful action in the controller.')
70
70
  .option('--singular', 'generates a "resource" route instead of "resources", along with the necessary controller and spec changes')
71
71
  .option('--only <onlyActions>', `comma separated list of resourceful endpionts (e.g. "--only=create,show"); any of:
72
72
  - index
@@ -91,7 +91,7 @@ export default class PsychicCLI {
91
91
  program
92
92
  .command('generate:controller')
93
93
  .alias('g:controller')
94
- .description('create a controller')
94
+ .description('Generates a controller and the inheritance chain leading to that controller, and a spec skeleton for the controller.')
95
95
  .argument('<controllerName>', 'the name of the controller to create, including namespaces, e.g. Posts or Api/V1/Posts')
96
96
  .argument('[actions...]', 'the names of controller actions to create')
97
97
  .action(async (controllerName, actions) => {
@@ -101,7 +101,7 @@ export default class PsychicCLI {
101
101
  });
102
102
  program
103
103
  .command('setup:sync:enums')
104
- .description('generates an initializer in your app for syncing enums to a particular path.')
104
+ .description('Generates an initializer in your app for syncing enums to a particular path.')
105
105
  .argument('<outfile>', 'the path from your backend directory to the location which you want the enums copied. Should end with .ts, i.e. "../client/src/api/enums.ts"')
106
106
  .option('--initializer-filename <initializerFilename>', 'the name you want the file to be in your initializers folder. defaults to `sync-enums.ts`')
107
107
  .action(async (outfile, { initializerName, }) => {
@@ -114,7 +114,7 @@ export default class PsychicCLI {
114
114
  });
115
115
  program
116
116
  .command('setup:sync:openapi-redux')
117
- .description('generates openapi redux bindings to connect one of your openapi files to one of your clients')
117
+ .description('Generates openapi redux bindings to connect one of your openapi files to one of your clients.')
118
118
  .option('--schema-file <schemaFile>', 'the path from your api root to the openapi file you wish to use to generate your schema, i.e. ./src/openapi/openapi.json')
119
119
  .option('--api-file <apiFile>', 'the path to the boilerplate api file that will be used to scaffold your backend endpoints together with, i.e. ../client/app/api.ts')
120
120
  .option('--api-import <apiImport>', 'the camelCased name of the export from your api module, i.e. emptyBackendApi')
@@ -136,7 +136,7 @@ export default class PsychicCLI {
136
136
  });
137
137
  program
138
138
  .command('setup:sync:openapi-typescript')
139
- .description('generates an initializer in your app for converting one of your openapi files to typescript')
139
+ .description('Generates an initializer in your app for converting one of your openapi files to typescript.')
140
140
  .argument('<openapiFilepath>', 'the path from your backend directory to the openapi file you wish to scan, i.e. "./src/openapi/openapi.json"')
141
141
  .argument('<outfile>', 'the path from your backend directory to the location which you want the openapi types written to. Must end with .d.ts, i.e. "./src/conf/openapi/openapi.types.d.ts"')
142
142
  .option('--initializer-filename <initializerFilename>', 'the name you want the file to be in your initializers folder. defaults to `sync-openapi-typescript.ts`')
@@ -150,7 +150,7 @@ export default class PsychicCLI {
150
150
  });
151
151
  program
152
152
  .command('routes')
153
- .description('examines your current models, building a type-map of the associations so that the ORM can understand your relational setup. This is commited to your repo, and synced to the dream repo for consumption within the underlying library.')
153
+ .description('Prints a list of routes defined by the application, including path arguments and the controller/action reached by the route.')
154
154
  .action(async () => {
155
155
  await initializePsychicApp();
156
156
  PsychicBin.printRoutes();
@@ -158,7 +158,7 @@ export default class PsychicCLI {
158
158
  });
159
159
  program
160
160
  .command('sync')
161
- .description('sync introspects your database, updating your schema to reflect, and then syncs the new schema with the installed dream node module, allowing it provide your schema to the underlying kysely integration')
161
+ .description("Generates types from the current state of the database. Generates OpenAPI specs from @OpenAPI decorated controller actions. Additional sync actions may be customized with `on('cli:sync', async () => {})` in conf/app.ts or in an initializer in `conf/initializers/`.")
162
162
  .option('--ignore-errors')
163
163
  .option('--schema-only')
164
164
  .action(async (options) => {
@@ -184,13 +184,13 @@ export default class PsychicCLI {
184
184
  });
185
185
  program
186
186
  .command('sync:routes')
187
- .description('reads the routes generated by your app and generates a cache file, which is then used to give autocomplete support to the route helper, amoongst other things.')
187
+ .description('Reads the routes generated by your app and generates a cache file, which is then used to give autocomplete support to the route helper and other things.')
188
188
  .action(async () => {
189
189
  await PsychicBin.syncRoutes();
190
190
  });
191
191
  program
192
192
  .command('sync:openapi')
193
- .description('syncs openapi.json file to current state of all psychic controllers within the app')
193
+ .description('Syncs openapi.json file to current state of all psychic controllers within the app')
194
194
  .action(async () => {
195
195
  await initializePsychicApp();
196
196
  await PsychicBin.syncOpenapiJson();
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "name": "@rvoh/psychic",
4
4
  "description": "Typescript web framework",
5
- "version": "2.0.3",
5
+ "version": "2.0.4",
6
6
  "author": "RVOHealth",
7
7
  "repository": {
8
8
  "type": "git",