@strapi/generators 4.10.0-beta.1 → 4.10.1-experimental.0

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 (144) hide show
  1. package/dist/files/js/plugin/admin/src/components/Initializer/index.js +26 -0
  2. package/dist/files/js/plugin/admin/src/components/PluginIcon/index.js +12 -0
  3. package/dist/files/js/plugin/admin/src/index.js +63 -0
  4. package/dist/files/js/plugin/admin/src/pages/App/index.js +25 -0
  5. package/dist/files/js/plugin/admin/src/pages/HomePage/index.js +20 -0
  6. package/dist/files/js/plugin/admin/src/pluginId.js +5 -0
  7. package/dist/files/js/plugin/admin/src/translations/en.json +1 -0
  8. package/dist/files/js/plugin/admin/src/translations/fr.json +1 -0
  9. package/dist/files/js/plugin/admin/src/utils/getTrad.js +5 -0
  10. package/dist/files/js/plugin/server/bootstrap.js +5 -0
  11. package/dist/files/js/plugin/server/config/index.js +6 -0
  12. package/dist/files/js/plugin/server/content-types/index.js +3 -0
  13. package/dist/files/js/plugin/server/controllers/index.js +7 -0
  14. package/dist/files/js/plugin/server/controllers/my-controller.js.hbs +10 -0
  15. package/dist/files/js/plugin/server/destroy.js +5 -0
  16. package/dist/files/js/plugin/server/index.js +25 -0
  17. package/dist/files/js/plugin/server/middlewares/index.js +3 -0
  18. package/dist/files/js/plugin/server/policies/index.js +3 -0
  19. package/dist/files/js/plugin/server/register.js +5 -0
  20. package/dist/files/js/plugin/server/routes/index.js +10 -0
  21. package/dist/files/js/plugin/server/services/index.js +7 -0
  22. package/dist/files/js/plugin/server/services/my-service.js +7 -0
  23. package/dist/files/js/plugin/strapi-admin.js +3 -0
  24. package/dist/files/js/plugin/strapi-server.js +3 -0
  25. package/dist/files/ts/plugin/admin/src/components/Initializer/index.tsx +24 -0
  26. package/dist/files/ts/plugin/admin/src/components/PluginIcon/index.tsx +12 -0
  27. package/dist/files/ts/plugin/admin/src/index.tsx +67 -0
  28. package/dist/files/ts/plugin/admin/src/pages/App/index.tsx +25 -0
  29. package/dist/files/ts/plugin/admin/src/pages/HomePage/index.tsx +19 -0
  30. package/dist/files/ts/plugin/admin/src/pluginId.ts +5 -0
  31. package/dist/files/ts/plugin/admin/src/translations/en.json +1 -0
  32. package/dist/files/ts/plugin/admin/src/translations/fr.json +1 -0
  33. package/dist/files/ts/plugin/admin/src/utils/getTrad.ts +5 -0
  34. package/dist/files/ts/plugin/custom.d.ts +5 -0
  35. package/dist/files/ts/plugin/server/bootstrap.ts +5 -0
  36. package/dist/files/ts/plugin/server/config/index.ts +4 -0
  37. package/dist/files/ts/plugin/server/content-types/index.ts +1 -0
  38. package/dist/files/ts/plugin/server/controllers/index.ts +5 -0
  39. package/dist/files/ts/plugin/server/controllers/my-controller.ts.hbs +10 -0
  40. package/dist/files/ts/plugin/server/destroy.ts +5 -0
  41. package/dist/files/ts/plugin/server/index.ts +23 -0
  42. package/dist/files/ts/plugin/server/middlewares/index.ts +1 -0
  43. package/dist/files/ts/plugin/server/policies/index.ts +1 -0
  44. package/dist/files/ts/plugin/server/register.ts +5 -0
  45. package/dist/files/ts/plugin/server/routes/index.ts +10 -0
  46. package/dist/files/ts/plugin/server/services/index.ts +5 -0
  47. package/dist/files/ts/plugin/server/services/my-service.ts +7 -0
  48. package/dist/files/ts/plugin/strapi-admin.js +3 -0
  49. package/dist/files/ts/plugin/strapi-server.js +3 -0
  50. package/dist/files/ts/plugin/tsconfig.json +20 -0
  51. package/dist/files/ts/plugin/tsconfig.server.json +25 -0
  52. package/dist/index.d.ts +5 -0
  53. package/dist/index.js +32 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/plopfile.d.ts +3 -0
  56. package/dist/plopfile.js +29 -0
  57. package/dist/plopfile.js.map +1 -0
  58. package/dist/plops/api.d.ts +3 -0
  59. package/dist/plops/api.js +79 -0
  60. package/dist/plops/api.js.map +1 -0
  61. package/dist/plops/content-type.d.ts +3 -0
  62. package/dist/plops/content-type.js +135 -0
  63. package/dist/plops/content-type.js.map +1 -0
  64. package/dist/plops/controller.d.ts +3 -0
  65. package/dist/plops/controller.js +40 -0
  66. package/dist/plops/controller.js.map +1 -0
  67. package/dist/plops/middleware.d.ts +3 -0
  68. package/dist/plops/middleware.js +40 -0
  69. package/dist/plops/middleware.js.map +1 -0
  70. package/dist/plops/migration.d.ts +3 -0
  71. package/dist/plops/migration.js +35 -0
  72. package/dist/plops/migration.js.map +1 -0
  73. package/dist/plops/plugin.d.ts +3 -0
  74. package/dist/plops/plugin.js +84 -0
  75. package/dist/plops/plugin.js.map +1 -0
  76. package/dist/plops/policy.d.ts +3 -0
  77. package/dist/plops/policy.js +40 -0
  78. package/dist/plops/policy.js.map +1 -0
  79. package/dist/plops/prompts/bootstrap-api-prompts.d.ts +3 -0
  80. package/dist/plops/prompts/bootstrap-api-prompts.js +12 -0
  81. package/dist/plops/prompts/bootstrap-api-prompts.js.map +1 -0
  82. package/dist/plops/prompts/ct-names-prompts.d.ts +3 -0
  83. package/dist/plops/prompts/ct-names-prompts.js +45 -0
  84. package/dist/plops/prompts/ct-names-prompts.js.map +1 -0
  85. package/dist/plops/prompts/draft-and-publish-prompts.d.ts +3 -0
  86. package/dist/plops/prompts/draft-and-publish-prompts.js +12 -0
  87. package/dist/plops/prompts/draft-and-publish-prompts.js.map +1 -0
  88. package/dist/plops/prompts/get-attributes-prompts.d.ts +3 -0
  89. package/dist/plops/prompts/get-attributes-prompts.js +95 -0
  90. package/dist/plops/prompts/get-attributes-prompts.js.map +1 -0
  91. package/dist/plops/prompts/get-destination-prompts.d.ts +5 -0
  92. package/dist/plops/prompts/get-destination-prompts.js +72 -0
  93. package/dist/plops/prompts/get-destination-prompts.js.map +1 -0
  94. package/dist/plops/prompts/kind-prompts.d.ts +3 -0
  95. package/dist/plops/prompts/kind-prompts.js +21 -0
  96. package/dist/plops/prompts/kind-prompts.js.map +1 -0
  97. package/dist/plops/service.d.ts +3 -0
  98. package/dist/plops/service.js +38 -0
  99. package/dist/plops/service.js.map +1 -0
  100. package/dist/plops/utils/get-file-path.d.ts +2 -0
  101. package/dist/plops/utils/get-file-path.js +15 -0
  102. package/dist/plops/utils/get-file-path.js.map +1 -0
  103. package/dist/plops/utils/get-formatted-date.d.ts +2 -0
  104. package/dist/plops/utils/get-formatted-date.js +9 -0
  105. package/dist/plops/utils/get-formatted-date.js.map +1 -0
  106. package/dist/plops/utils/validate-attribute-input.d.ts +2 -0
  107. package/dist/plops/utils/validate-attribute-input.js +10 -0
  108. package/dist/plops/utils/validate-attribute-input.js.map +1 -0
  109. package/dist/plops/utils/validate-file-name-input.d.ts +2 -0
  110. package/dist/plops/utils/validate-file-name-input.js +10 -0
  111. package/dist/plops/utils/validate-file-name-input.js.map +1 -0
  112. package/dist/plops/utils/validate-input.d.ts +2 -0
  113. package/dist/plops/utils/validate-input.js +10 -0
  114. package/dist/plops/utils/validate-input.js.map +1 -0
  115. package/dist/templates/js/README.md.hbs +3 -0
  116. package/dist/templates/js/collection-type-routes.js.hbs +49 -0
  117. package/dist/templates/js/content-type.schema.json.hbs +15 -0
  118. package/dist/templates/js/controller.js.hbs +15 -0
  119. package/dist/templates/js/core-controller.js.hbs +9 -0
  120. package/dist/templates/js/core-router.js.hbs +9 -0
  121. package/dist/templates/js/core-service.js.hbs +9 -0
  122. package/dist/templates/js/middleware.js.hbs +14 -0
  123. package/dist/templates/js/migration.js.hbs +15 -0
  124. package/dist/templates/js/plugin-package.json.hbs +42 -0
  125. package/dist/templates/js/policy.js.hbs +18 -0
  126. package/dist/templates/js/service.js.hbs +7 -0
  127. package/dist/templates/js/single-route.js.hbs +13 -0
  128. package/dist/templates/js/single-type-routes.js.hbs +33 -0
  129. package/dist/templates/ts/README.md.hbs +3 -0
  130. package/dist/templates/ts/collection-type-routes.ts.hbs +49 -0
  131. package/dist/templates/ts/content-type.schema.json.hbs +15 -0
  132. package/dist/templates/ts/controller.ts.hbs +13 -0
  133. package/dist/templates/ts/core-controller.ts.hbs +7 -0
  134. package/dist/templates/ts/core-router.ts.hbs +7 -0
  135. package/dist/templates/ts/core-service.ts.hbs +7 -0
  136. package/dist/templates/ts/middleware.ts.hbs +14 -0
  137. package/dist/templates/ts/migration.ts.hbs +11 -0
  138. package/dist/templates/ts/plugin-package.json.hbs +51 -0
  139. package/dist/templates/ts/policy.ts.hbs +16 -0
  140. package/dist/templates/ts/service.ts.hbs +5 -0
  141. package/dist/templates/ts/single-route.ts.hbs +13 -0
  142. package/dist/templates/ts/single-type-routes.ts.hbs +31 -0
  143. package/lib/templates/ts/plugin-package.json.hbs +1 -1
  144. package/package.json +4 -4
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const pluralize_1 = __importDefault(require("pluralize"));
7
+ const slugify_1 = __importDefault(require("@sindresorhus/slugify"));
8
+ const utils_1 = __importDefault(require("@strapi/utils"));
9
+ const questions = [
10
+ {
11
+ type: 'input',
12
+ name: 'displayName',
13
+ message: 'Content type display name',
14
+ validate: (input) => !!input,
15
+ },
16
+ {
17
+ type: 'input',
18
+ name: 'singularName',
19
+ message: 'Content type singular name',
20
+ default: (answers) => (0, slugify_1.default)(answers.displayName),
21
+ validate(input) {
22
+ if (!utils_1.default.isKebabCase(input)) {
23
+ return 'Value must be in kebab-case';
24
+ }
25
+ return true;
26
+ },
27
+ },
28
+ {
29
+ type: 'input',
30
+ name: 'pluralName',
31
+ message: 'Content type plural name',
32
+ default: (answers) => (0, pluralize_1.default)(answers.singularName),
33
+ validate(input, answers) {
34
+ if (answers.singularName === input) {
35
+ return 'Singular and plural names cannot be the same';
36
+ }
37
+ if (!utils_1.default.isKebabCase(input)) {
38
+ return 'Value must be in kebab-case';
39
+ }
40
+ return true;
41
+ },
42
+ },
43
+ ];
44
+ exports.default = questions;
45
+ //# sourceMappingURL=ct-names-prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ct-names-prompts.js","sourceRoot":"","sources":["../../../src/plops/prompts/ct-names-prompts.ts"],"names":[],"mappings":";;;;;AAAA,0DAAkC;AAClC,oEAA4C;AAC5C,0DAAkC;AAUlC,MAAM,SAAS,GAA0B;IACvC;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,2BAA2B;QACpC,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK;KACrC;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,4BAA4B;QACrC,OAAO,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,IAAA,iBAAO,EAAC,OAAO,CAAC,WAAW,CAAC;QAC3D,QAAQ,CAAC,KAAK;YACZ,IAAI,CAAC,eAAK,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;gBAC7B,OAAO,6BAA6B,CAAC;aACtC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,0BAA0B;QACnC,OAAO,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,IAAA,mBAAS,EAAC,OAAO,CAAC,YAAY,CAAC;QAC9D,QAAQ,CAAC,KAAa,EAAE,OAAgB;YACtC,IAAI,OAAO,CAAC,YAAY,KAAK,KAAK,EAAE;gBAClC,OAAO,8CAA8C,CAAC;aACvD;YAED,IAAI,CAAC,eAAK,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;gBAC7B,OAAO,6BAA6B,CAAC;aACtC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;KACF;CACF,CAAC;AAEF,kBAAe,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PromptQuestion } from 'node-plop';
2
+ declare const questions: Array<PromptQuestion>;
3
+ export default questions;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const questions = [
4
+ {
5
+ type: 'confirm',
6
+ name: 'useDraftAndPublish',
7
+ default: false,
8
+ message: 'Use draft and publish?',
9
+ },
10
+ ];
11
+ exports.default = questions;
12
+ //# sourceMappingURL=draft-and-publish-prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-and-publish-prompts.js","sourceRoot":"","sources":["../../../src/plops/prompts/draft-and-publish-prompts.ts"],"names":[],"mappings":";;AAEA,MAAM,SAAS,GAA0B;IACvC;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,wBAAwB;KAClC;CACF,CAAC;AAEF,kBAAe,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { DynamicPromptsFunction } from 'node-plop';
2
+ declare const getAttributesPrompts: DynamicPromptsFunction;
3
+ export default getAttributesPrompts;
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const validate_attribute_input_1 = __importDefault(require("../utils/validate-attribute-input"));
7
+ const DEFAULT_TYPES = [
8
+ // advanced types
9
+ 'media',
10
+ // scalar types
11
+ 'string',
12
+ 'text',
13
+ 'richtext',
14
+ 'json',
15
+ 'enumeration',
16
+ 'password',
17
+ 'email',
18
+ 'integer',
19
+ 'biginteger',
20
+ 'float',
21
+ 'decimal',
22
+ 'date',
23
+ 'time',
24
+ 'datetime',
25
+ 'timestamp',
26
+ 'boolean',
27
+ ];
28
+ const getAttributesPrompts = async (inquirer) => {
29
+ const { addAttributes } = await inquirer.prompt([
30
+ {
31
+ type: 'confirm',
32
+ name: 'addAttributes',
33
+ message: 'Do you want to add attributes?',
34
+ },
35
+ ]);
36
+ const attributes = [];
37
+ /**
38
+ * @param {import('inquirer').Inquirer} inquirer
39
+ * @returns {Promise<void>}
40
+ */
41
+ const createNewAttributes = async (inquirer) => {
42
+ const answers = await inquirer.prompt([
43
+ {
44
+ type: 'input',
45
+ name: 'attributeName',
46
+ message: 'Name of attribute',
47
+ validate: (input) => (0, validate_attribute_input_1.default)(input),
48
+ },
49
+ {
50
+ type: 'list',
51
+ name: 'attributeType',
52
+ message: 'What type of attribute',
53
+ pageSize: DEFAULT_TYPES.length,
54
+ choices: DEFAULT_TYPES.map((type) => {
55
+ return { name: type, value: type };
56
+ }),
57
+ },
58
+ {
59
+ when: (answers) => answers.attributeType === 'enumeration',
60
+ type: 'input',
61
+ name: 'enum',
62
+ message: 'Add values separated by a comma',
63
+ },
64
+ {
65
+ when: (answers) => answers.attributeType === 'media',
66
+ type: 'list',
67
+ name: 'multiple',
68
+ message: 'Choose media type',
69
+ choices: [
70
+ { name: 'Multiple', value: true },
71
+ { name: 'Single', value: false },
72
+ ],
73
+ },
74
+ {
75
+ type: 'confirm',
76
+ name: 'addAttributes',
77
+ message: 'Do you want to add another attribute?',
78
+ },
79
+ ]);
80
+ attributes.push(answers);
81
+ if (!answers.addAttributes) {
82
+ return;
83
+ }
84
+ await createNewAttributes(inquirer);
85
+ };
86
+ if (addAttributes) {
87
+ await createNewAttributes(inquirer);
88
+ }
89
+ else {
90
+ console.warn(`You won't be able to manage entries from the admin, you can still add attributes later from the content type builder.`);
91
+ }
92
+ return attributes;
93
+ };
94
+ exports.default = getAttributesPrompts;
95
+ //# sourceMappingURL=get-attributes-prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-attributes-prompts.js","sourceRoot":"","sources":["../../../src/plops/prompts/get-attributes-prompts.ts"],"names":[],"mappings":";;;;;AAEA,iGAAuE;AASvE,MAAM,aAAa,GAAG;IACpB,iBAAiB;IACjB,OAAO;IAEP,eAAe;IACf,QAAQ;IACR,MAAM;IACN,UAAU;IACV,MAAM;IACN,aAAa;IACb,UAAU;IACV,OAAO;IACP,SAAS;IACT,YAAY;IACZ,OAAO;IACP,SAAS;IACT,MAAM;IACN,MAAM;IACN,UAAU;IACV,WAAW;IACX,SAAS;CACD,CAAC;AAEX,MAAM,oBAAoB,GAA2B,KAAK,EAAE,QAAQ,EAAE,EAAE;IACtE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QAC9C;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,gCAAgC;SAC1C;KACF,CAAC,CAAC;IAEH,MAAM,UAAU,GAA2B,EAAE,CAAC;IAE9C;;;OAGG;IACH,MAAM,mBAAmB,GAAG,KAAK,EAAE,QAA+C,EAAE,EAAE;QACpF,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;YACpC;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,mBAAmB;gBAC5B,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,IAAA,kCAAsB,EAAC,KAAK,CAAC;aAC3D;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,wBAAwB;gBACjC,QAAQ,EAAE,aAAa,CAAC,MAAM;gBAC9B,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;oBAClC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;gBACrC,CAAC,CAAC;aACH;YACD;gBACE,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,KAAK,aAAa;gBAC1D,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,iCAAiC;aAC3C;YACD;gBACE,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,KAAK,OAAO;gBACpD,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,mBAAmB;gBAC5B,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;oBACjC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE;iBACjC;aACF;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,uCAAuC;aACjD;SACF,CAAC,CAAC;QAEH,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEzB,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YAC1B,OAAO;SACR;QAED,MAAM,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC,CAAC;IAEF,IAAI,aAAa,EAAE;QACjB,MAAM,mBAAmB,CAAC,QAAQ,CAAC,CAAC;KACrC;SAAM;QACL,OAAO,CAAC,IAAI,CACV,uHAAuH,CACxH,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { PromptQuestion } from 'node-plop';
2
+ declare const _default: (action: string, basePath: string, { rootFolder }?: {
3
+ rootFolder?: boolean | undefined;
4
+ }) => Array<PromptQuestion>;
5
+ export default _default;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const path_1 = require("path");
7
+ const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ exports.default = (action, basePath, { rootFolder = false } = {}) => {
9
+ return [
10
+ {
11
+ type: 'list',
12
+ name: 'destination',
13
+ message: `Where do you want to add this ${action}?`,
14
+ choices: [
15
+ ...(rootFolder
16
+ ? [
17
+ {
18
+ name: `Add ${action} to root of project`,
19
+ value: 'root',
20
+ },
21
+ ]
22
+ : [
23
+ {
24
+ name: `Add ${action} to new API`,
25
+ value: 'new',
26
+ },
27
+ ]),
28
+ { name: `Add ${action} to an existing API`, value: 'api' },
29
+ { name: `Add ${action} to an existing plugin`, value: 'plugin' },
30
+ ],
31
+ },
32
+ {
33
+ when: (answers) => answers.destination === 'api',
34
+ type: 'list',
35
+ message: 'Which API is this for?',
36
+ name: 'api',
37
+ async choices() {
38
+ const apiPath = (0, path_1.join)(basePath, 'api');
39
+ const exists = await fs_extra_1.default.pathExists(apiPath);
40
+ if (!exists) {
41
+ throw Error('Couldn\'t find an "api" directory');
42
+ }
43
+ const apiDir = await fs_extra_1.default.readdir(apiPath, { withFileTypes: true });
44
+ const apiDirContent = apiDir.filter((fd) => fd.isDirectory());
45
+ if (apiDirContent.length === 0) {
46
+ throw Error('The "api" directory is empty');
47
+ }
48
+ return apiDirContent;
49
+ },
50
+ },
51
+ {
52
+ when: (answers) => answers.destination === 'plugin',
53
+ type: 'list',
54
+ message: 'Which plugin is this for?',
55
+ name: 'plugin',
56
+ async choices() {
57
+ const pluginsPath = (0, path_1.join)(basePath, 'plugins');
58
+ const exists = await fs_extra_1.default.pathExists(pluginsPath);
59
+ if (!exists) {
60
+ throw Error('Couldn\'t find a "plugins" directory');
61
+ }
62
+ const pluginsDir = await fs_extra_1.default.readdir(pluginsPath);
63
+ const pluginsDirContent = pluginsDir.filter((api) => fs_extra_1.default.lstatSync((0, path_1.join)(pluginsPath, api)).isDirectory());
64
+ if (pluginsDirContent.length === 0) {
65
+ throw Error('The "plugins" directory is empty');
66
+ }
67
+ return pluginsDirContent;
68
+ },
69
+ },
70
+ ];
71
+ };
72
+ //# sourceMappingURL=get-destination-prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-destination-prompts.js","sourceRoot":"","sources":["../../../src/plops/prompts/get-destination-prompts.ts"],"names":[],"mappings":";;;;;AAAA,+BAA4B;AAC5B,wDAA0B;AAI1B,kBAAe,CACb,MAAc,EACd,QAAgB,EAChB,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,EAAE,EACJ,EAAE;IACzB,OAAO;QACL;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,iCAAiC,MAAM,GAAG;YACnD,OAAO,EAAE;gBACP,GAAG,CAAC,UAAU;oBACZ,CAAC,CAAC;wBACE;4BACE,IAAI,EAAE,OAAO,MAAM,qBAAqB;4BACxC,KAAK,EAAE,MAAM;yBACd;qBACF;oBACH,CAAC,CAAC;wBACE;4BACE,IAAI,EAAE,OAAO,MAAM,aAAa;4BAChC,KAAK,EAAE,KAAK;yBACb;qBACF,CAAC;gBACN,EAAE,IAAI,EAAE,OAAO,MAAM,qBAAqB,EAAE,KAAK,EAAE,KAAK,EAAE;gBAC1D,EAAE,IAAI,EAAE,OAAO,MAAM,wBAAwB,EAAE,KAAK,EAAE,QAAQ,EAAE;aACjE;SACF;QACD;YACE,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,KAAK,KAAK;YAChD,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,wBAAwB;YACjC,IAAI,EAAE,KAAK;YACX,KAAK,CAAC,OAAO;gBACX,MAAM,OAAO,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;gBACtC,MAAM,MAAM,GAAG,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBAE5C,IAAI,CAAC,MAAM,EAAE;oBACX,MAAM,KAAK,CAAC,mCAAmC,CAAC,CAAC;iBAClD;gBAED,MAAM,MAAM,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;gBAClE,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;gBAE9D,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;oBAC9B,MAAM,KAAK,CAAC,8BAA8B,CAAC,CAAC;iBAC7C;gBAED,OAAO,aAAa,CAAC;YACvB,CAAC;SACF;QACD;YACE,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,KAAK,QAAQ;YACnD,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,2BAA2B;YACpC,IAAI,EAAE,QAAQ;YACd,KAAK,CAAC,OAAO;gBACX,MAAM,WAAW,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;gBAC9C,MAAM,MAAM,GAAG,MAAM,kBAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;gBAEhD,IAAI,CAAC,MAAM,EAAE;oBACX,MAAM,KAAK,CAAC,sCAAsC,CAAC,CAAC;iBACrD;gBAED,MAAM,UAAU,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBACjD,MAAM,iBAAiB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAClD,kBAAE,CAAC,SAAS,CAAC,IAAA,WAAI,EAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,CACnD,CAAC;gBAEF,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;oBAClC,MAAM,KAAK,CAAC,kCAAkC,CAAC,CAAC;iBACjD;gBAED,OAAO,iBAAiB,CAAC;YAC3B,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PromptQuestion } from 'node-plop';
2
+ declare const questions: Array<PromptQuestion>;
3
+ export default questions;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const validate_input_1 = __importDefault(require("../utils/validate-input"));
7
+ const questions = [
8
+ {
9
+ type: 'list',
10
+ name: 'kind',
11
+ message: 'Please choose the model type',
12
+ default: 'collectionType',
13
+ choices: [
14
+ { name: 'Collection Type', value: 'collectionType' },
15
+ { name: 'Single Type', value: 'singleType' },
16
+ ],
17
+ validate: (input) => (0, validate_input_1.default)(input),
18
+ },
19
+ ];
20
+ exports.default = questions;
21
+ //# sourceMappingURL=kind-prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kind-prompts.js","sourceRoot":"","sources":["../../../src/plops/prompts/kind-prompts.ts"],"names":[],"mappings":";;;;;AAEA,6EAAoD;AAEpD,MAAM,SAAS,GAA0B;IACvC;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,8BAA8B;QACvC,OAAO,EAAE,gBAAgB;QACzB,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;YACpD,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE;SAC7C;QACD,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,IAAA,wBAAa,EAAC,KAAK,CAAC;KAClD;CACF,CAAC;AAEF,kBAAe,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { NodePlopAPI } from 'plop';
2
+ declare const _default: (plop: NodePlopAPI) => void;
3
+ export default _default;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const typescript_utils_1 = __importDefault(require("@strapi/typescript-utils"));
7
+ const get_destination_prompts_1 = __importDefault(require("./prompts/get-destination-prompts"));
8
+ const get_file_path_1 = __importDefault(require("./utils/get-file-path"));
9
+ exports.default = (plop) => {
10
+ // Service generator
11
+ plop.setGenerator('service', {
12
+ description: 'Generate a service for an API',
13
+ prompts: [
14
+ {
15
+ type: 'input',
16
+ name: 'id',
17
+ message: 'Service name',
18
+ },
19
+ ...(0, get_destination_prompts_1.default)('service', plop.getDestBasePath()),
20
+ ],
21
+ actions(answers) {
22
+ if (!answers) {
23
+ return [];
24
+ }
25
+ const filePath = (0, get_file_path_1.default)(answers?.destination);
26
+ const currentDir = process.cwd();
27
+ const language = typescript_utils_1.default.isUsingTypeScriptSync(currentDir) ? 'ts' : 'js';
28
+ return [
29
+ {
30
+ type: 'add',
31
+ path: `${filePath}/services/{{ id }}.${language}`,
32
+ templateFile: `templates/${language}/service.${language}.hbs`,
33
+ },
34
+ ];
35
+ },
36
+ });
37
+ };
38
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/plops/service.ts"],"names":[],"mappings":";;;;;AACA,gFAA+C;AAE/C,gGAAsE;AACtE,0EAAgD;AAEhD,kBAAe,CAAC,IAAiB,EAAE,EAAE;IACnC,oBAAoB;IACpB,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE;QAC3B,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,IAAI;gBACV,OAAO,EAAE,cAAc;aACxB;YACD,GAAG,IAAA,iCAAqB,EAAC,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;SAC5D;QACD,OAAO,CAAC,OAAO;YACb,IAAI,CAAC,OAAO,EAAE;gBACZ,OAAO,EAAE,CAAC;aACX;YAED,MAAM,QAAQ,GAAG,IAAA,uBAAW,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;YACnD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;YACjC,MAAM,QAAQ,GAAG,0BAAO,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAEzE,OAAO;gBACL;oBACE,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,GAAG,QAAQ,sBAAsB,QAAQ,EAAE;oBACjD,YAAY,EAAE,aAAa,QAAQ,YAAY,QAAQ,MAAM;iBAC9D;aACF,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const _default: (destination: string) => "api/{{ id }}" | "api/{{ api }}" | "plugins/{{ plugin }}/server" | "./";
2
+ export default _default;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = (destination) => {
4
+ if (destination === 'api') {
5
+ return `api/{{ api }}`;
6
+ }
7
+ if (destination === 'plugin') {
8
+ return `plugins/{{ plugin }}/server`;
9
+ }
10
+ if (destination === 'root') {
11
+ return './';
12
+ }
13
+ return `api/{{ id }}`;
14
+ };
15
+ //# sourceMappingURL=get-file-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-file-path.js","sourceRoot":"","sources":["../../../src/plops/utils/get-file-path.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,WAAmB,EAAE,EAAE;IACrC,IAAI,WAAW,KAAK,KAAK,EAAE;QACzB,OAAO,eAAe,CAAC;KACxB;IAED,IAAI,WAAW,KAAK,QAAQ,EAAE;QAC5B,OAAO,6BAA6B,CAAC;KACtC;IAED,IAAI,WAAW,KAAK,MAAM,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const _default: (date?: Date) => string;
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = (date = new Date()) => {
4
+ return new Date(date.getTime() - date.getTimezoneOffset() * 60000)
5
+ .toJSON()
6
+ .replace(/[-:]/g, '.')
7
+ .replace(/\....Z/, '');
8
+ };
9
+ //# sourceMappingURL=get-formatted-date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-formatted-date.js","sourceRoot":"","sources":["../../../src/plops/utils/get-formatted-date.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,OAAa,IAAI,IAAI,EAAE,EAAE,EAAE;IACzC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAC;SAC/D,MAAM,EAAE;SACR,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;SACrB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC3B,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const _default: (input: string) => true | "You must provide an input" | "Please use only letters, '-', '_', and no spaces";
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = (input) => {
4
+ const regex = /^[A-Za-z-|_]+$/g;
5
+ if (!input) {
6
+ return 'You must provide an input';
7
+ }
8
+ return regex.test(input) || "Please use only letters, '-', '_', and no spaces";
9
+ };
10
+ //# sourceMappingURL=validate-attribute-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-attribute-input.js","sourceRoot":"","sources":["../../../src/plops/utils/validate-attribute-input.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,KAAa,EAAE,EAAE;IAC/B,MAAM,KAAK,GAAG,iBAAiB,CAAC;IAEhC,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,2BAA2B,CAAC;KACpC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,mDAAmD,CAAC;AAClF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const _default: (input: string) => true | "You must provide an input" | "Please use only letters and number, '-' or '_' and no spaces";
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = (input) => {
4
+ const regex = /^[A-Za-z-_0-9]+$/g;
5
+ if (!input) {
6
+ return 'You must provide an input';
7
+ }
8
+ return regex.test(input) || "Please use only letters and number, '-' or '_' and no spaces";
9
+ };
10
+ //# sourceMappingURL=validate-file-name-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-file-name-input.js","sourceRoot":"","sources":["../../../src/plops/utils/validate-file-name-input.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,KAAa,EAAE,EAAE;IAC/B,MAAM,KAAK,GAAG,mBAAmB,CAAC;IAElC,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,2BAA2B,CAAC;KACpC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,8DAA8D,CAAC;AAC7F,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const _default: (input: string) => true | "You must provide an input" | "Please use only letters, '-' and no spaces";
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = (input) => {
4
+ const regex = /^[A-Za-z-]+$/g;
5
+ if (!input) {
6
+ return 'You must provide an input';
7
+ }
8
+ return regex.test(input) || "Please use only letters, '-' and no spaces";
9
+ };
10
+ //# sourceMappingURL=validate-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-input.js","sourceRoot":"","sources":["../../../src/plops/utils/validate-input.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,KAAa,EAAE,EAAE;IAC/B,MAAM,KAAK,GAAG,eAAe,CAAC;IAE9B,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,2BAA2B,CAAC;KACpC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,4CAA4C,CAAC;AAC3E,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ # Strapi plugin {{ pluginName }}
2
+
3
+ A quick description of {{ pluginName }}.
@@ -0,0 +1,49 @@
1
+ module.exports = {
2
+ routes: [
3
+ {
4
+ method: 'GET',
5
+ path: '/{{ pluralize id }}',
6
+ handler: '{{ id }}.find',
7
+ config: {
8
+ policies: [],
9
+ middlewares: [],
10
+ },
11
+ },
12
+ {
13
+ method: 'GET',
14
+ path: '/{{ pluralize id }}/:id',
15
+ handler: '{{ id }}.findOne',
16
+ config: {
17
+ policies: [],
18
+ middlewares: [],
19
+ },
20
+ },
21
+ {
22
+ method: 'POST',
23
+ path: '/{{ pluralize id }}',
24
+ handler: '{{ id }}.create',
25
+ config: {
26
+ policies: [],
27
+ middlewares: [],
28
+ },
29
+ },
30
+ {
31
+ method: 'PUT',
32
+ path: '/{{ pluralize id }}/:id',
33
+ handler: '{{ id }}.update',
34
+ config: {
35
+ policies: [],
36
+ middlewares: [],
37
+ },
38
+ },
39
+ {
40
+ method: 'DELETE',
41
+ path: '/{{ pluralize id }}/:id',
42
+ handler: '{{ id }}.delete',
43
+ config: {
44
+ policies: [],
45
+ middlewares: [],
46
+ },
47
+ },
48
+ ],
49
+ };
@@ -0,0 +1,15 @@
1
+
2
+ {
3
+ "kind": "{{kind}}",
4
+ "collectionName": "{{ collectionName }}",
5
+ "info": {
6
+ "singularName": "{{ singularName }}",
7
+ "pluralName": "{{ pluralName }}",
8
+ "displayName": "{{ displayName }}"
9
+ },
10
+ "options": {
11
+ "draftAndPublish": {{ useDraftAndPublish }},
12
+ "comment": ""
13
+ },
14
+ "attributes": {}
15
+ }
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * A set of functions called "actions" for `{{ id }}`
5
+ */
6
+
7
+ module.exports = {
8
+ // exampleAction: async (ctx, next) => {
9
+ // try {
10
+ // ctx.body = 'ok';
11
+ // } catch (err) {
12
+ // ctx.body = err;
13
+ // }
14
+ // }
15
+ };
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * {{ id }} controller
5
+ */
6
+
7
+ const { createCoreController } = require('@strapi/strapi').factories;
8
+
9
+ module.exports = createCoreController('{{ uid }}');
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * {{ id }} router
5
+ */
6
+
7
+ const { createCoreRouter } = require('@strapi/strapi').factories;
8
+
9
+ module.exports = createCoreRouter('{{ uid }}');
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * {{ id }} service
5
+ */
6
+
7
+ const { createCoreService } = require('@strapi/strapi').factories;
8
+
9
+ module.exports = createCoreService('{{ uid }}');
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * `{{ name }}` middleware
5
+ */
6
+
7
+ module.exports = (config, { strapi }) => {
8
+ // Add your own logic here.
9
+ return async (ctx, next) => {
10
+ strapi.log.info('In {{ name }} middleware.');
11
+
12
+ await next();
13
+ };
14
+ };
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Migration `{{ name }}`
5
+ */
6
+
7
+ module.exports = {
8
+ /**
9
+ *
10
+ * @param {import('knex').Knex} knex
11
+ */
12
+ async up(knex) {
13
+
14
+ },
15
+ };
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "{{ pluginName }}",
3
+ "version": "0.0.0",
4
+ "description": "This is the description of the plugin.",
5
+ "strapi": {
6
+ "name": "{{ pluginName }}",
7
+ "description": "Description of {{titleCase pluginName }} plugin",
8
+ "kind": "plugin",
9
+ "displayName": "{{titleCase pluginName }}"
10
+ },
11
+ "dependencies": {
12
+ "@strapi/design-system": "^1.6.3",
13
+ "@strapi/helper-plugin": "^4.6.0",
14
+ "@strapi/icons": "^1.6.3",
15
+ "prop-types": "^15.7.2"
16
+ },
17
+ "devDependencies": {
18
+ "react": "^17.0.2",
19
+ "react-dom": "^17.0.2",
20
+ "react-router-dom": "^5.3.4",
21
+ "styled-components": "^5.3.6"
22
+ },
23
+ "peerDependencies": {
24
+ "react": "^17.0.2",
25
+ "react-dom": "^17.0.2",
26
+ "react-router-dom": "^5.3.4",
27
+ "styled-components": "^5.3.6"
28
+ },
29
+ "author": {
30
+ "name": "A Strapi developer"
31
+ },
32
+ "maintainers": [
33
+ {
34
+ "name": "A Strapi developer"
35
+ }
36
+ ],
37
+ "engines": {
38
+ "node": ">=14.19.1 <=18.x.x",
39
+ "npm": ">=6.0.0"
40
+ },
41
+ "license": "MIT"
42
+ }