@strapi/generators 5.12.0 → 5.12.2

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 (73) hide show
  1. package/dist/plopfile.js +14 -644
  2. package/dist/plopfile.js.map +1 -1
  3. package/dist/plopfile.mjs +7 -637
  4. package/dist/plopfile.mjs.map +1 -1
  5. package/dist/plops/api.js +81 -0
  6. package/dist/plops/api.js.map +1 -0
  7. package/dist/plops/api.mjs +79 -0
  8. package/dist/plops/api.mjs.map +1 -0
  9. package/dist/plops/content-type.js +150 -0
  10. package/dist/plops/content-type.js.map +1 -0
  11. package/dist/plops/content-type.mjs +148 -0
  12. package/dist/plops/content-type.mjs.map +1 -0
  13. package/dist/plops/controller.js +40 -0
  14. package/dist/plops/controller.js.map +1 -0
  15. package/dist/plops/controller.mjs +38 -0
  16. package/dist/plops/controller.mjs.map +1 -0
  17. package/dist/plops/middleware.js +42 -0
  18. package/dist/plops/middleware.js.map +1 -0
  19. package/dist/plops/middleware.mjs +40 -0
  20. package/dist/plops/middleware.mjs.map +1 -0
  21. package/dist/plops/migration.js +35 -0
  22. package/dist/plops/migration.js.map +1 -0
  23. package/dist/plops/migration.mjs +33 -0
  24. package/dist/plops/migration.mjs.map +1 -0
  25. package/dist/plops/policy.js +42 -0
  26. package/dist/plops/policy.js.map +1 -0
  27. package/dist/plops/policy.mjs +40 -0
  28. package/dist/plops/policy.mjs.map +1 -0
  29. package/dist/plops/prompts/bootstrap-api-prompts.js +13 -0
  30. package/dist/plops/prompts/bootstrap-api-prompts.js.map +1 -0
  31. package/dist/plops/prompts/bootstrap-api-prompts.mjs +11 -0
  32. package/dist/plops/prompts/bootstrap-api-prompts.mjs.map +1 -0
  33. package/dist/plops/prompts/ct-names-prompts.js +44 -0
  34. package/dist/plops/prompts/ct-names-prompts.js.map +1 -0
  35. package/dist/plops/prompts/ct-names-prompts.mjs +42 -0
  36. package/dist/plops/prompts/ct-names-prompts.mjs.map +1 -0
  37. package/dist/plops/prompts/get-attributes-prompts.js +101 -0
  38. package/dist/plops/prompts/get-attributes-prompts.js.map +1 -0
  39. package/dist/plops/prompts/get-attributes-prompts.mjs +99 -0
  40. package/dist/plops/prompts/get-attributes-prompts.mjs.map +1 -0
  41. package/dist/plops/prompts/get-destination-prompts.js +78 -0
  42. package/dist/plops/prompts/get-destination-prompts.js.map +1 -0
  43. package/dist/plops/prompts/get-destination-prompts.mjs +76 -0
  44. package/dist/plops/prompts/get-destination-prompts.mjs.map +1 -0
  45. package/dist/plops/prompts/kind-prompts.js +26 -0
  46. package/dist/plops/prompts/kind-prompts.js.map +1 -0
  47. package/dist/plops/prompts/kind-prompts.mjs +24 -0
  48. package/dist/plops/prompts/kind-prompts.mjs.map +1 -0
  49. package/dist/plops/service.js +38 -0
  50. package/dist/plops/service.js.map +1 -0
  51. package/dist/plops/service.mjs +36 -0
  52. package/dist/plops/service.mjs.map +1 -0
  53. package/dist/plops/utils/get-file-path.js +17 -0
  54. package/dist/plops/utils/get-file-path.js.map +1 -0
  55. package/dist/plops/utils/get-file-path.mjs +15 -0
  56. package/dist/plops/utils/get-file-path.mjs.map +1 -0
  57. package/dist/plops/utils/get-formatted-date.js +8 -0
  58. package/dist/plops/utils/get-formatted-date.js.map +1 -0
  59. package/dist/plops/utils/get-formatted-date.mjs +6 -0
  60. package/dist/plops/utils/get-formatted-date.mjs.map +1 -0
  61. package/dist/plops/utils/validate-attribute-input.js +12 -0
  62. package/dist/plops/utils/validate-attribute-input.js.map +1 -0
  63. package/dist/plops/utils/validate-attribute-input.mjs +10 -0
  64. package/dist/plops/utils/validate-attribute-input.mjs.map +1 -0
  65. package/dist/plops/utils/validate-file-name-input.js +12 -0
  66. package/dist/plops/utils/validate-file-name-input.js.map +1 -0
  67. package/dist/plops/utils/validate-file-name-input.mjs +10 -0
  68. package/dist/plops/utils/validate-file-name-input.mjs.map +1 -0
  69. package/dist/plops/utils/validate-input.js +12 -0
  70. package/dist/plops/utils/validate-input.js.map +1 -0
  71. package/dist/plops/utils/validate-input.mjs +10 -0
  72. package/dist/plops/utils/validate-input.mjs.map +1 -0
  73. package/package.json +5 -5
package/dist/plopfile.mjs CHANGED
@@ -1,641 +1,11 @@
1
1
  import pluralize from 'pluralize';
2
- import { join } from 'path';
3
- import fs from 'fs-extra';
4
- import tsUtils from '@strapi/typescript-utils';
5
- import slugify from '@sindresorhus/slugify';
6
- import { strings } from '@strapi/utils';
7
-
8
- var validateInput = ((input)=>{
9
- const regex = /^[A-Za-z-]+$/g;
10
- if (!input) {
11
- return 'You must provide an input';
12
- }
13
- return regex.test(input) || "Please use only letters, '-' and no spaces";
14
- });
15
-
16
- var generateApi = ((plop)=>{
17
- // API generator
18
- plop.setGenerator('api', {
19
- description: 'Generate a basic API',
20
- prompts: [
21
- {
22
- type: 'input',
23
- name: 'id',
24
- message: 'API name',
25
- validate: (input)=>validateInput(input)
26
- },
27
- {
28
- type: 'confirm',
29
- name: 'isPluginApi',
30
- message: 'Is this API for a plugin?'
31
- },
32
- {
33
- when: (answers)=>answers.isPluginApi,
34
- type: 'list',
35
- name: 'plugin',
36
- message: 'Plugin name',
37
- async choices () {
38
- const pluginsPath = join(plop.getDestBasePath(), 'plugins');
39
- const exists = await fs.pathExists(pluginsPath);
40
- if (!exists) {
41
- throw Error('Couldn\'t find a "plugins" directory');
42
- }
43
- const pluginsDir = await fs.readdir(pluginsPath, {
44
- withFileTypes: true
45
- });
46
- const pluginsDirContent = pluginsDir.filter((fd)=>fd.isDirectory());
47
- if (pluginsDirContent.length === 0) {
48
- throw Error('The "plugins" directory is empty');
49
- }
50
- return pluginsDirContent;
51
- }
52
- }
53
- ],
54
- actions (answers) {
55
- if (!answers) {
56
- return [];
57
- }
58
- const filePath = answers.isPluginApi && answers.plugin ? 'plugins/{{ plugin }}/server' : 'api/{{ id }}';
59
- const currentDir = process.cwd();
60
- const language = tsUtils.isUsingTypeScriptSync(currentDir) ? 'ts' : 'js';
61
- const baseActions = [
62
- {
63
- type: 'add',
64
- path: `${filePath}/controllers/{{ id }}.${language}`,
65
- templateFile: `templates/${language}/controller.${language}.hbs`
66
- },
67
- {
68
- type: 'add',
69
- path: `${filePath}/services/{{ id }}.${language}`,
70
- templateFile: `templates/${language}/service.${language}.hbs`
71
- }
72
- ];
73
- if (answers.isPluginApi) {
74
- return baseActions;
75
- }
76
- return [
77
- {
78
- type: 'add',
79
- path: `${filePath}/routes/{{ id }}.${language}`,
80
- templateFile: `templates/${language}/single-route.${language}.hbs`
81
- },
82
- ...baseActions
83
- ];
84
- }
85
- });
86
- });
87
-
88
- var getDestinationPrompts = ((action, basePath, { rootFolder = false } = {})=>{
89
- return [
90
- {
91
- type: 'list',
92
- name: 'destination',
93
- message: `Where do you want to add this ${action}?`,
94
- choices: [
95
- ...rootFolder ? [
96
- {
97
- name: `Add ${action} to root of project`,
98
- value: 'root'
99
- }
100
- ] : [
101
- {
102
- name: `Add ${action} to new API`,
103
- value: 'new'
104
- }
105
- ],
106
- {
107
- name: `Add ${action} to an existing API`,
108
- value: 'api'
109
- },
110
- {
111
- name: `Add ${action} to an existing plugin`,
112
- value: 'plugin'
113
- }
114
- ]
115
- },
116
- {
117
- when: (answers)=>answers.destination === 'api',
118
- type: 'list',
119
- message: 'Which API is this for?',
120
- name: 'api',
121
- async choices () {
122
- const apiPath = join(basePath, 'api');
123
- const exists = await fs.pathExists(apiPath);
124
- if (!exists) {
125
- throw Error('Couldn\'t find an "api" directory');
126
- }
127
- const apiDir = await fs.readdir(apiPath, {
128
- withFileTypes: true
129
- });
130
- const apiDirContent = apiDir.filter((fd)=>fd.isDirectory());
131
- if (apiDirContent.length === 0) {
132
- throw Error('The "api" directory is empty');
133
- }
134
- return apiDirContent;
135
- }
136
- },
137
- {
138
- when: (answers)=>answers.destination === 'plugin',
139
- type: 'list',
140
- message: 'Which plugin is this for?',
141
- name: 'plugin',
142
- async choices () {
143
- const pluginsPath = join(basePath, 'plugins');
144
- const exists = await fs.pathExists(pluginsPath);
145
- if (!exists) {
146
- throw Error('Couldn\'t find a "plugins" directory');
147
- }
148
- const pluginsDir = await fs.readdir(pluginsPath);
149
- const pluginsDirContent = pluginsDir.filter((api)=>fs.lstatSync(join(pluginsPath, api)).isDirectory());
150
- if (pluginsDirContent.length === 0) {
151
- throw Error('The "plugins" directory is empty');
152
- }
153
- return pluginsDirContent;
154
- }
155
- }
156
- ];
157
- });
158
-
159
- var getFilePath = ((destination)=>{
160
- if (destination === 'api') {
161
- return `api/{{ api }}`;
162
- }
163
- if (destination === 'plugin') {
164
- return `plugins/{{ plugin }}/server`;
165
- }
166
- if (destination === 'root') {
167
- return './';
168
- }
169
- return `api/{{ id }}`;
170
- });
171
-
172
- var generateController = ((plop)=>{
173
- // Controller generator
174
- plop.setGenerator('controller', {
175
- description: 'Generate a controller for an API',
176
- prompts: [
177
- {
178
- type: 'input',
179
- name: 'id',
180
- message: 'Controller name',
181
- validate: (input)=>validateInput(input)
182
- },
183
- ...getDestinationPrompts('controller', plop.getDestBasePath())
184
- ],
185
- actions (answers) {
186
- if (!answers) {
187
- return [];
188
- }
189
- const filePath = getFilePath(answers.destination);
190
- const currentDir = process.cwd();
191
- const language = tsUtils.isUsingTypeScriptSync(currentDir) ? 'ts' : 'js';
192
- return [
193
- {
194
- type: 'add',
195
- path: `${filePath}/controllers/{{ id }}.${language}`,
196
- templateFile: `templates/${language}/controller.${language}.hbs`
197
- }
198
- ];
199
- }
200
- });
201
- });
202
-
203
- const questions$2 = [
204
- {
205
- type: 'input',
206
- name: 'displayName',
207
- message: 'Content type display name',
208
- validate: (input)=>!!input
209
- },
210
- {
211
- type: 'input',
212
- name: 'singularName',
213
- message: 'Content type singular name',
214
- default: (answers)=>slugify(answers.displayName),
215
- validate (input) {
216
- if (!strings.isKebabCase(input)) {
217
- return 'Value must be in kebab-case';
218
- }
219
- return true;
220
- }
221
- },
222
- {
223
- type: 'input',
224
- name: 'pluralName',
225
- message: 'Content type plural name',
226
- default: (answers)=>pluralize(answers.singularName),
227
- validate (input, answers) {
228
- if (answers.singularName === input) {
229
- return 'Singular and plural names cannot be the same';
230
- }
231
- if (!strings.isKebabCase(input)) {
232
- return 'Value must be in kebab-case';
233
- }
234
- return true;
235
- }
236
- }
237
- ];
238
-
239
- const questions$1 = [
240
- {
241
- type: 'list',
242
- name: 'kind',
243
- message: 'Please choose the model type',
244
- default: 'collectionType',
245
- choices: [
246
- {
247
- name: 'Collection Type',
248
- value: 'collectionType'
249
- },
250
- {
251
- name: 'Single Type',
252
- value: 'singleType'
253
- }
254
- ],
255
- validate: (input)=>validateInput(input)
256
- }
257
- ];
258
-
259
- var validateAttributeInput = ((input)=>{
260
- const regex = /^[A-Za-z-|_]+$/g;
261
- if (!input) {
262
- return 'You must provide an input';
263
- }
264
- return regex.test(input) || "Please use only letters, '-', '_', and no spaces";
265
- });
266
-
267
- const DEFAULT_TYPES = [
268
- // advanced types
269
- 'media',
270
- // scalar types
271
- 'string',
272
- 'text',
273
- 'richtext',
274
- 'json',
275
- 'enumeration',
276
- 'password',
277
- 'email',
278
- 'integer',
279
- 'biginteger',
280
- 'float',
281
- 'decimal',
282
- 'date',
283
- 'time',
284
- 'datetime',
285
- 'timestamp',
286
- 'boolean'
287
- ];
288
- const getAttributesPrompts = async (inquirer)=>{
289
- const { addAttributes } = await inquirer.prompt([
290
- {
291
- type: 'confirm',
292
- name: 'addAttributes',
293
- message: 'Do you want to add attributes?'
294
- }
295
- ]);
296
- const attributes = [];
297
- /**
298
- * @param {import('inquirer').Inquirer} inquirer
299
- * @returns {Promise<void>}
300
- */ const createNewAttributes = async (inquirer)=>{
301
- const answers = await inquirer.prompt([
302
- {
303
- type: 'input',
304
- name: 'attributeName',
305
- message: 'Name of attribute',
306
- validate: (input)=>validateAttributeInput(input)
307
- },
308
- {
309
- type: 'list',
310
- name: 'attributeType',
311
- message: 'What type of attribute',
312
- pageSize: DEFAULT_TYPES.length,
313
- choices: DEFAULT_TYPES.map((type)=>{
314
- return {
315
- name: type,
316
- value: type
317
- };
318
- })
319
- },
320
- {
321
- when: (answers)=>answers.attributeType === 'enumeration',
322
- type: 'input',
323
- name: 'enum',
324
- message: 'Add values separated by a comma'
325
- },
326
- {
327
- when: (answers)=>answers.attributeType === 'media',
328
- type: 'list',
329
- name: 'multiple',
330
- message: 'Choose media type',
331
- choices: [
332
- {
333
- name: 'Multiple',
334
- value: true
335
- },
336
- {
337
- name: 'Single',
338
- value: false
339
- }
340
- ]
341
- },
342
- {
343
- type: 'confirm',
344
- name: 'addAttributes',
345
- message: 'Do you want to add another attribute?'
346
- }
347
- ]);
348
- attributes.push(answers);
349
- if (!answers.addAttributes) {
350
- return;
351
- }
352
- await createNewAttributes(inquirer);
353
- };
354
- if (addAttributes) {
355
- await createNewAttributes(inquirer);
356
- } else {
357
- console.warn(`You won't be able to manage entries from the admin, you can still add attributes later from the content type builder.`);
358
- }
359
- return attributes;
360
- };
361
-
362
- const questions = [
363
- {
364
- type: 'confirm',
365
- name: 'bootstrapApi',
366
- default: true,
367
- message: 'Bootstrap API related files?'
368
- }
369
- ];
370
-
371
- var generateContentType = ((plop)=>{
372
- // Model generator
373
- plop.setGenerator('content-type', {
374
- description: 'Generate a content type for an API',
375
- async prompts (inquirer) {
376
- const config = await inquirer.prompt([
377
- ...questions$2,
378
- ...questions$1
379
- ]);
380
- // @ts-expect-error issue with deprecated inquirer.prompts attribute to fix with ugprade to inquirer
381
- const attributes = await getAttributesPrompts(inquirer);
382
- const api = await inquirer.prompt([
383
- ...getDestinationPrompts('model', plop.getDestBasePath()),
384
- {
385
- when: (answers)=>answers.destination === 'new',
386
- type: 'input',
387
- name: 'id',
388
- default: config.singularName,
389
- message: 'Name of the new API?',
390
- async validate (input) {
391
- if (!strings.isKebabCase(input)) {
392
- return 'Value must be in kebab-case';
393
- }
394
- const apiPath = join(plop.getDestBasePath(), 'api');
395
- const exists = await fs.pathExists(apiPath);
396
- if (!exists) {
397
- return true;
398
- }
399
- const apiDir = await fs.readdir(apiPath, {
400
- withFileTypes: true
401
- });
402
- const apiDirContent = apiDir.filter((fd)=>fd.isDirectory());
403
- if (apiDirContent.findIndex((dir)=>dir.name === input) !== -1) {
404
- throw new Error('This name is already taken.');
405
- }
406
- return true;
407
- }
408
- },
409
- ...questions
410
- ]);
411
- return {
412
- ...config,
413
- ...api,
414
- attributes
415
- };
416
- },
417
- actions (answers) {
418
- if (!answers) {
419
- return [];
420
- }
421
- const attributes = answers.attributes.reduce((object, answer)=>{
422
- const val = {
423
- type: answer.attributeType
424
- };
425
- if (answer.attributeType === 'enumeration') {
426
- val.enum = answer.enum.split(',').map((item)=>item.trim());
427
- }
428
- if (answer.attributeType === 'media') {
429
- val.allowedTypes = [
430
- 'images',
431
- 'files',
432
- 'videos',
433
- 'audios'
434
- ];
435
- val.multiple = answer.multiple;
436
- }
437
- return Object.assign(object, {
438
- [answer.attributeName]: val
439
- }, {});
440
- }, {});
441
- const filePath = getFilePath(answers.destination);
442
- const currentDir = process.cwd();
443
- const language = tsUtils.isUsingTypeScriptSync(currentDir) ? 'ts' : 'js';
444
- const baseActions = [
445
- {
446
- type: 'add',
447
- path: `${filePath}/content-types/{{ singularName }}/schema.json`,
448
- templateFile: `templates/${language}/content-type.schema.json.hbs`,
449
- data: {
450
- collectionName: slugify(answers.pluralName, {
451
- separator: '_'
452
- })
453
- }
454
- }
455
- ];
456
- if (Object.entries(attributes).length > 0) {
457
- baseActions.push({
458
- type: 'modify',
459
- path: `${filePath}/content-types/{{ singularName }}/schema.json`,
460
- transform (template) {
461
- const parsedTemplate = JSON.parse(template);
462
- parsedTemplate.attributes = attributes;
463
- return JSON.stringify(parsedTemplate, null, 2);
464
- }
465
- });
466
- }
467
- if (answers.bootstrapApi) {
468
- const { singularName } = answers;
469
- let uid;
470
- if (answers.destination === 'new') {
471
- uid = `api::${answers.id}.${singularName}`;
472
- } else if (answers.api) {
473
- uid = `api::${answers.api}.${singularName}`;
474
- } else if (answers.plugin) {
475
- uid = `plugin::${answers.plugin}.${singularName}`;
476
- }
477
- baseActions.push({
478
- type: 'add',
479
- path: `${filePath}/controllers/{{ singularName }}.${language}`,
480
- templateFile: `templates/${language}/core-controller.${language}.hbs`,
481
- data: {
482
- uid
483
- }
484
- }, {
485
- type: 'add',
486
- path: `${filePath}/services/{{ singularName }}.${language}`,
487
- templateFile: `templates/${language}/core-service.${language}.hbs`,
488
- data: {
489
- uid
490
- }
491
- }, {
492
- type: 'add',
493
- path: `${filePath}/routes/{{ singularName }}.${language}`,
494
- templateFile: `templates/${language}/core-router.${language}.hbs`,
495
- data: {
496
- uid
497
- }
498
- });
499
- }
500
- return baseActions;
501
- }
502
- });
503
- });
504
-
505
- var generatePolicy = ((plop)=>{
506
- // Policy generator
507
- plop.setGenerator('policy', {
508
- description: 'Generate a policy for an API',
509
- prompts: [
510
- {
511
- type: 'input',
512
- name: 'id',
513
- message: 'Policy name',
514
- validate: (input)=>validateInput(input)
515
- },
516
- ...getDestinationPrompts('policy', plop.getDestBasePath(), {
517
- rootFolder: true
518
- })
519
- ],
520
- actions (answers) {
521
- if (!answers) {
522
- return [];
523
- }
524
- const currentDir = process.cwd();
525
- const filePath = getFilePath(answers.destination);
526
- const language = tsUtils.isUsingTypeScriptSync(currentDir) ? 'ts' : 'js';
527
- return [
528
- {
529
- type: 'add',
530
- path: `${filePath}/policies/{{ id }}.${language}`,
531
- templateFile: `templates/${language}/policy.${language}.hbs`
532
- }
533
- ];
534
- }
535
- });
536
- });
537
-
538
- var generateMiddleware = ((plop)=>{
539
- // middleware generator
540
- plop.setGenerator('middleware', {
541
- description: 'Generate a middleware for an API',
542
- prompts: [
543
- {
544
- type: 'input',
545
- name: 'name',
546
- message: 'Middleware name',
547
- validate: (input)=>validateInput(input)
548
- },
549
- ...getDestinationPrompts('middleware', plop.getDestBasePath(), {
550
- rootFolder: true
551
- })
552
- ],
553
- actions (answers) {
554
- if (!answers) {
555
- return [];
556
- }
557
- const filePath = getFilePath(answers.destination);
558
- const currentDir = process.cwd();
559
- const language = tsUtils.isUsingTypeScriptSync(currentDir) ? 'ts' : 'js';
560
- return [
561
- {
562
- type: 'add',
563
- path: `${filePath}/middlewares/{{ name }}.${language}`,
564
- templateFile: `templates/${language}/middleware.${language}.hbs`
565
- }
566
- ];
567
- }
568
- });
569
- });
570
-
571
- var validateFileNameInput = ((input)=>{
572
- const regex = /^[A-Za-z-_0-9]+$/g;
573
- if (!input) {
574
- return 'You must provide an input';
575
- }
576
- return regex.test(input) || "Please use only letters and number, '-' or '_' and no spaces";
577
- });
578
-
579
- var getFormattedDate = ((date = new Date())=>{
580
- return new Date(date.getTime() - date.getTimezoneOffset() * 60000).toJSON().replace(/[-:]/g, '.').replace(/\....Z/, '');
581
- });
582
-
583
- var generateMigration = ((plop)=>{
584
- // Migration generator
585
- plop.setGenerator('migration', {
586
- description: 'Generate a migration',
587
- prompts: [
588
- {
589
- type: 'input',
590
- name: 'name',
591
- message: 'Migration name',
592
- validate: (input)=>validateFileNameInput(input)
593
- }
594
- ],
595
- actions () {
596
- const currentDir = process.cwd();
597
- const language = tsUtils.isUsingTypeScriptSync(currentDir) ? 'ts' : 'js';
598
- const timestamp = getFormattedDate();
599
- return [
600
- {
601
- type: 'add',
602
- path: `${currentDir}/database/migrations/${timestamp}.{{ name }}.${language}`,
603
- templateFile: `templates/${language}/migration.${language}.hbs`
604
- }
605
- ];
606
- }
607
- });
608
- });
609
-
610
- var generateService = ((plop)=>{
611
- // Service generator
612
- plop.setGenerator('service', {
613
- description: 'Generate a service for an API',
614
- prompts: [
615
- {
616
- type: 'input',
617
- name: 'id',
618
- message: 'Service name'
619
- },
620
- ...getDestinationPrompts('service', plop.getDestBasePath())
621
- ],
622
- actions (answers) {
623
- if (!answers) {
624
- return [];
625
- }
626
- const filePath = getFilePath(answers?.destination);
627
- const currentDir = process.cwd();
628
- const language = tsUtils.isUsingTypeScriptSync(currentDir) ? 'ts' : 'js';
629
- return [
630
- {
631
- type: 'add',
632
- path: `${filePath}/services/{{ id }}.${language}`,
633
- templateFile: `templates/${language}/service.${language}.hbs`
634
- }
635
- ];
636
- }
637
- });
638
- });
2
+ import generateApi from './plops/api.mjs';
3
+ import generateController from './plops/controller.mjs';
4
+ import generateContentType from './plops/content-type.mjs';
5
+ import generatePolicy from './plops/policy.mjs';
6
+ import generateMiddleware from './plops/middleware.mjs';
7
+ import generateMigration from './plops/migration.mjs';
8
+ import generateService from './plops/service.mjs';
639
9
 
640
10
  var plopfile = ((plop)=>{
641
11
  // Plop config