@strapi/strapi 5.0.0-beta.0 → 5.0.0-beta.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 (223) hide show
  1. package/dist/admin.d.ts.map +1 -1
  2. package/dist/admin.js +5 -0
  3. package/dist/admin.js.map +1 -1
  4. package/dist/admin.mjs +4 -0
  5. package/dist/admin.mjs.map +1 -1
  6. package/dist/cli/commands/admin/create-user.js +2 -2
  7. package/dist/cli/commands/admin/create-user.js.map +1 -1
  8. package/dist/cli/commands/admin/create-user.mjs +88 -0
  9. package/dist/cli/commands/admin/create-user.mjs.map +1 -0
  10. package/dist/cli/commands/admin/reset-user-password.js +2 -2
  11. package/dist/cli/commands/admin/reset-user-password.js.map +1 -1
  12. package/dist/cli/commands/admin/reset-user-password.mjs +44 -0
  13. package/dist/cli/commands/admin/reset-user-password.mjs.map +1 -0
  14. package/dist/cli/commands/build.js.map +1 -1
  15. package/dist/cli/commands/build.mjs +30 -0
  16. package/dist/cli/commands/build.mjs.map +1 -0
  17. package/dist/cli/commands/components/list.js +2 -2
  18. package/dist/cli/commands/components/list.js.map +1 -1
  19. package/dist/cli/commands/components/list.mjs +24 -0
  20. package/dist/cli/commands/components/list.mjs.map +1 -0
  21. package/dist/cli/commands/configuration/dump.js +2 -2
  22. package/dist/cli/commands/configuration/dump.js.map +1 -1
  23. package/dist/cli/commands/configuration/dump.mjs +41 -0
  24. package/dist/cli/commands/configuration/dump.mjs.map +1 -0
  25. package/dist/cli/commands/configuration/restore.js +2 -2
  26. package/dist/cli/commands/configuration/restore.js.map +1 -1
  27. package/dist/cli/commands/configuration/restore.mjs +140 -0
  28. package/dist/cli/commands/configuration/restore.mjs.map +1 -0
  29. package/dist/cli/commands/console.js +2 -2
  30. package/dist/cli/commands/console.js.map +1 -1
  31. package/dist/cli/commands/console.mjs +27 -0
  32. package/dist/cli/commands/console.mjs.map +1 -0
  33. package/dist/cli/commands/content-types/list.js +2 -2
  34. package/dist/cli/commands/content-types/list.js.map +1 -1
  35. package/dist/cli/commands/content-types/list.mjs +24 -0
  36. package/dist/cli/commands/content-types/list.mjs.map +1 -0
  37. package/dist/cli/commands/controllers/list.js +2 -2
  38. package/dist/cli/commands/controllers/list.js.map +1 -1
  39. package/dist/cli/commands/controllers/list.mjs +24 -0
  40. package/dist/cli/commands/controllers/list.mjs.map +1 -0
  41. package/dist/cli/commands/develop.js.map +1 -1
  42. package/dist/cli/commands/develop.mjs +27 -0
  43. package/dist/cli/commands/develop.mjs.map +1 -0
  44. package/dist/cli/commands/export/action.js.map +1 -1
  45. package/dist/cli/commands/export/action.mjs +116 -0
  46. package/dist/cli/commands/export/action.mjs.map +1 -0
  47. package/dist/cli/commands/export/command.mjs +24 -0
  48. package/dist/cli/commands/export/command.mjs.map +1 -0
  49. package/dist/cli/commands/generate.mjs +13 -0
  50. package/dist/cli/commands/generate.mjs.map +1 -0
  51. package/dist/cli/commands/hooks/list.js +2 -2
  52. package/dist/cli/commands/hooks/list.js.map +1 -1
  53. package/dist/cli/commands/hooks/list.mjs +24 -0
  54. package/dist/cli/commands/hooks/list.mjs.map +1 -0
  55. package/dist/cli/commands/import/action.js.map +1 -1
  56. package/dist/cli/commands/import/action.mjs +105 -0
  57. package/dist/cli/commands/import/action.mjs.map +1 -0
  58. package/dist/cli/commands/import/command.mjs +68 -0
  59. package/dist/cli/commands/import/command.mjs.map +1 -0
  60. package/dist/cli/commands/index.mjs +71 -0
  61. package/dist/cli/commands/index.mjs.map +1 -0
  62. package/dist/cli/commands/middlewares/list.js +2 -2
  63. package/dist/cli/commands/middlewares/list.js.map +1 -1
  64. package/dist/cli/commands/middlewares/list.mjs +24 -0
  65. package/dist/cli/commands/middlewares/list.mjs.map +1 -0
  66. package/dist/cli/commands/plugin/build.mjs +85 -0
  67. package/dist/cli/commands/plugin/build.mjs.map +1 -0
  68. package/dist/cli/commands/plugin/init/action.d.ts +1 -2
  69. package/dist/cli/commands/plugin/init/action.d.ts.map +1 -1
  70. package/dist/cli/commands/plugin/init/action.js +1 -1
  71. package/dist/cli/commands/plugin/init/action.js.map +1 -1
  72. package/dist/cli/commands/plugin/init/action.mjs +409 -0
  73. package/dist/cli/commands/plugin/init/action.mjs.map +1 -0
  74. package/dist/cli/commands/plugin/init/command.mjs +10 -0
  75. package/dist/cli/commands/plugin/init/command.mjs.map +1 -0
  76. package/dist/cli/commands/plugin/init/files/admin.mjs +283 -0
  77. package/dist/cli/commands/plugin/init/files/admin.mjs.map +1 -0
  78. package/dist/cli/commands/plugin/init/files/editorConfig.mjs +26 -0
  79. package/dist/cli/commands/plugin/init/files/editorConfig.mjs.map +1 -0
  80. package/dist/cli/commands/plugin/init/files/eslint.mjs +11 -0
  81. package/dist/cli/commands/plugin/init/files/eslint.mjs.map +1 -0
  82. package/dist/cli/commands/plugin/init/files/gitIgnore.mjs +34 -0
  83. package/dist/cli/commands/plugin/init/files/gitIgnore.mjs.map +1 -0
  84. package/dist/cli/commands/plugin/init/files/prettier.mjs +25 -0
  85. package/dist/cli/commands/plugin/init/files/prettier.mjs.map +1 -0
  86. package/dist/cli/commands/plugin/init/files/server.js +15 -15
  87. package/dist/cli/commands/plugin/init/files/server.js.map +1 -1
  88. package/dist/cli/commands/plugin/init/files/server.mjs +360 -0
  89. package/dist/cli/commands/plugin/init/files/server.mjs.map +1 -0
  90. package/dist/cli/commands/plugin/init/files/typescript.mjs +66 -0
  91. package/dist/cli/commands/plugin/init/files/typescript.mjs.map +1 -0
  92. package/dist/cli/commands/plugin/link-watch.mjs +82 -0
  93. package/dist/cli/commands/plugin/link-watch.mjs.map +1 -0
  94. package/dist/cli/commands/plugin/verify.js.map +1 -1
  95. package/dist/cli/commands/plugin/verify.mjs +34 -0
  96. package/dist/cli/commands/plugin/verify.mjs.map +1 -0
  97. package/dist/cli/commands/plugin/watch.js.map +1 -1
  98. package/dist/cli/commands/plugin/watch.mjs +83 -0
  99. package/dist/cli/commands/plugin/watch.mjs.map +1 -0
  100. package/dist/cli/commands/policies/list.js +2 -2
  101. package/dist/cli/commands/policies/list.js.map +1 -1
  102. package/dist/cli/commands/policies/list.mjs +24 -0
  103. package/dist/cli/commands/policies/list.mjs.map +1 -0
  104. package/dist/cli/commands/report.js +2 -2
  105. package/dist/cli/commands/report.js.map +1 -1
  106. package/dist/cli/commands/report.mjs +35 -0
  107. package/dist/cli/commands/report.mjs.map +1 -0
  108. package/dist/cli/commands/routes/list.js +2 -2
  109. package/dist/cli/commands/routes/list.js.map +1 -1
  110. package/dist/cli/commands/routes/list.mjs +28 -0
  111. package/dist/cli/commands/routes/list.mjs.map +1 -0
  112. package/dist/cli/commands/services/list.js +2 -2
  113. package/dist/cli/commands/services/list.js.map +1 -1
  114. package/dist/cli/commands/services/list.mjs +24 -0
  115. package/dist/cli/commands/services/list.mjs.map +1 -0
  116. package/dist/cli/commands/start.js +1 -1
  117. package/dist/cli/commands/start.js.map +1 -1
  118. package/dist/cli/commands/start.mjs +24 -0
  119. package/dist/cli/commands/start.mjs.map +1 -0
  120. package/dist/cli/commands/telemetry/disable.mjs +67 -0
  121. package/dist/cli/commands/telemetry/disable.mjs.map +1 -0
  122. package/dist/cli/commands/telemetry/enable.mjs +86 -0
  123. package/dist/cli/commands/telemetry/enable.mjs.map +1 -0
  124. package/dist/cli/commands/templates/generate.mjs +74 -0
  125. package/dist/cli/commands/templates/generate.mjs.map +1 -0
  126. package/dist/cli/commands/transfer/action.mjs +131 -0
  127. package/dist/cli/commands/transfer/action.mjs.map +1 -0
  128. package/dist/cli/commands/transfer/command.mjs +84 -0
  129. package/dist/cli/commands/transfer/command.mjs.map +1 -0
  130. package/dist/cli/commands/ts/generate-types.js +2 -2
  131. package/dist/cli/commands/ts/generate-types.js.map +1 -1
  132. package/dist/cli/commands/ts/generate-types.mjs +35 -0
  133. package/dist/cli/commands/ts/generate-types.mjs.map +1 -0
  134. package/dist/cli/commands/version.mjs +13 -0
  135. package/dist/cli/commands/version.mjs.map +1 -0
  136. package/dist/cli/index.mjs +49 -0
  137. package/dist/cli/index.mjs.map +1 -0
  138. package/dist/cli/utils/commander.mjs +109 -0
  139. package/dist/cli/utils/commander.mjs.map +1 -0
  140. package/dist/cli/utils/data-transfer.d.ts +3 -3
  141. package/dist/cli/utils/data-transfer.d.ts.map +1 -1
  142. package/dist/cli/utils/data-transfer.js +2 -2
  143. package/dist/cli/utils/data-transfer.js.map +1 -1
  144. package/dist/cli/utils/data-transfer.mjs +339 -0
  145. package/dist/cli/utils/data-transfer.mjs.map +1 -0
  146. package/dist/cli/utils/helpers.mjs +100 -0
  147. package/dist/cli/utils/helpers.mjs.map +1 -0
  148. package/dist/cli/utils/logger.mjs +80 -0
  149. package/dist/cli/utils/logger.mjs.map +1 -0
  150. package/dist/cli/utils/pkg.d.ts.map +1 -1
  151. package/dist/cli/utils/pkg.js +18 -15
  152. package/dist/cli/utils/pkg.js.map +1 -1
  153. package/dist/cli/utils/pkg.mjs +87 -0
  154. package/dist/cli/utils/pkg.mjs.map +1 -0
  155. package/dist/cli/utils/telemetry.mjs +22 -0
  156. package/dist/cli/utils/telemetry.mjs.map +1 -0
  157. package/dist/cli/utils/tsconfig.mjs +23 -0
  158. package/dist/cli/utils/tsconfig.mjs.map +1 -0
  159. package/dist/node/build.mjs +58 -0
  160. package/dist/node/build.mjs.map +1 -0
  161. package/dist/node/core/admin-customisations.mjs +22 -0
  162. package/dist/node/core/admin-customisations.mjs.map +1 -0
  163. package/dist/node/core/aliases.d.ts.map +1 -1
  164. package/dist/node/core/aliases.js +3 -1
  165. package/dist/node/core/aliases.js.map +1 -1
  166. package/dist/node/core/aliases.mjs +30 -0
  167. package/dist/node/core/aliases.mjs.map +1 -0
  168. package/dist/node/core/config.mjs +16 -0
  169. package/dist/node/core/config.mjs.map +1 -0
  170. package/dist/node/core/dependencies.mjs +151 -0
  171. package/dist/node/core/dependencies.mjs.map +1 -0
  172. package/dist/node/core/env.d.ts.map +1 -1
  173. package/dist/node/core/env.js +7 -4
  174. package/dist/node/core/env.js.map +1 -1
  175. package/dist/node/core/env.mjs +23 -0
  176. package/dist/node/core/env.mjs.map +1 -0
  177. package/dist/node/core/errors.mjs +29 -0
  178. package/dist/node/core/errors.mjs.map +1 -0
  179. package/dist/node/core/files.mjs +43 -0
  180. package/dist/node/core/files.mjs.map +1 -0
  181. package/dist/node/core/managers.mjs +17 -0
  182. package/dist/node/core/managers.mjs.map +1 -0
  183. package/dist/node/core/monorepo.mjs +20 -0
  184. package/dist/node/core/monorepo.mjs.map +1 -0
  185. package/dist/node/core/plugins.mjs +93 -0
  186. package/dist/node/core/plugins.mjs.map +1 -0
  187. package/dist/node/core/timer.mjs +27 -0
  188. package/dist/node/core/timer.mjs.map +1 -0
  189. package/dist/node/create-build-context.d.ts +3 -3
  190. package/dist/node/create-build-context.d.ts.map +1 -1
  191. package/dist/node/create-build-context.js +1 -1
  192. package/dist/node/create-build-context.js.map +1 -1
  193. package/dist/node/create-build-context.mjs +91 -0
  194. package/dist/node/create-build-context.mjs.map +1 -0
  195. package/dist/node/develop.d.ts.map +1 -1
  196. package/dist/node/develop.js +7 -1
  197. package/dist/node/develop.js.map +1 -1
  198. package/dist/node/develop.mjs +252 -0
  199. package/dist/node/develop.mjs.map +1 -0
  200. package/dist/node/staticFiles.d.ts.map +1 -1
  201. package/dist/node/staticFiles.js +25 -3
  202. package/dist/node/staticFiles.js.map +1 -1
  203. package/dist/node/staticFiles.mjs +76 -0
  204. package/dist/node/staticFiles.mjs.map +1 -0
  205. package/dist/node/types.d.ts +2 -2
  206. package/dist/node/types.d.ts.map +1 -1
  207. package/dist/node/vite/build.mjs +12 -0
  208. package/dist/node/vite/build.mjs.map +1 -0
  209. package/dist/node/vite/config.mjs +99 -0
  210. package/dist/node/vite/config.mjs.map +1 -0
  211. package/dist/node/vite/plugins.mjs +43 -0
  212. package/dist/node/vite/plugins.mjs.map +1 -0
  213. package/dist/node/vite/watch.js.map +1 -1
  214. package/dist/node/vite/watch.mjs +52 -0
  215. package/dist/node/vite/watch.mjs.map +1 -0
  216. package/dist/node/webpack/build.mjs +39 -0
  217. package/dist/node/webpack/build.mjs.map +1 -0
  218. package/dist/node/webpack/config.mjs +228 -0
  219. package/dist/node/webpack/config.mjs.map +1 -0
  220. package/dist/node/webpack/watch.js.map +1 -1
  221. package/dist/node/webpack/watch.mjs +92 -0
  222. package/dist/node/webpack/watch.mjs.map +1 -0
  223. package/package.json +27 -25
@@ -0,0 +1,283 @@
1
+ import { outdent } from "outdent";
2
+ const PLUGIN_ICON_CODE = outdent`
3
+ import { Puzzle } from '@strapi/icons';
4
+
5
+ const PluginIcon = () => <Puzzle />;
6
+
7
+ export { PluginIcon };
8
+ `;
9
+ const APP_CODE = outdent`
10
+ import { Page } from '@strapi/strapi/admin';
11
+ import { Switch, Route } from 'react-router-dom';
12
+
13
+ import { PLUGIN_ID } from '../pluginId';
14
+
15
+ import { HomePage } from './HomePage';
16
+
17
+ const App = () => {
18
+ return (
19
+ <Switch>
20
+ <Route index element={<HomePage />} />
21
+ <Route path="*" element={<Page.Error />} />
22
+ </Switch>
23
+ );
24
+ };
25
+
26
+ export { App };
27
+ `;
28
+ const HOMEPAGE_CODE = outdent`
29
+ import { Main } from '@strapi/design-system';
30
+ import { useIntl } from 'react-intl';
31
+
32
+ import { getTranslation } from '../utils/getTranslation';
33
+
34
+ const HomePage = () => {
35
+ const { formatMessage } = useIntl();
36
+
37
+ return (
38
+ <Main>
39
+ <h1>Welcome to {formatMessage({ id: getTranslation("plugin.name") })}</h1>
40
+ </Main>
41
+ )
42
+ }
43
+
44
+ export { HomePage };
45
+ `;
46
+ const TYPESCRIPT = [
47
+ {
48
+ name: "admin/src/index.ts",
49
+ contents: outdent`
50
+ import { prefixPluginTranslations } from './utils/prefixPluginTranslations';
51
+ import { PLUGIN_ID } from './pluginId';
52
+ import { Initializer } from './components/Initializer';
53
+ import { PluginIcon } from './components/PluginIcon';
54
+
55
+ export default {
56
+ register(app: any) {
57
+ app.addMenuLink({
58
+ to: \`plugins/\${PLUGIN_ID}\`,
59
+ icon: PluginIcon,
60
+ intlLabel: {
61
+ id: \`\${PLUGIN_ID}.plugin.name\`,
62
+ defaultMessage: PLUGIN_ID,
63
+ },
64
+ Component: async () => {
65
+ const { App } = await import('./pages/App');
66
+
67
+ return App;
68
+ },
69
+ });
70
+
71
+ app.registerPlugin({
72
+ id: PLUGIN_ID,
73
+ initializer: Initializer,
74
+ isReady: false,
75
+ name: PLUGIN_ID,
76
+ });
77
+ },
78
+
79
+ async registerTrads(app: any) {
80
+ const { locales } = app;
81
+
82
+ const importedTranslations = await Promise.all(
83
+ (locales as string[]).map((locale) => {
84
+ return import(\`./translations/\${locale}.json\`)
85
+ .then(({ default: data }) => {
86
+ return {
87
+ data: prefixPluginTranslations(data, PLUGIN_ID),
88
+ locale,
89
+ };
90
+ })
91
+ .catch(() => {
92
+ return {
93
+ data: {},
94
+ locale,
95
+ };
96
+ });
97
+ })
98
+ );
99
+
100
+ return importedTranslations;
101
+ },
102
+ };
103
+ `
104
+ },
105
+ {
106
+ name: "admin/src/components/PluginIcon.tsx",
107
+ contents: PLUGIN_ICON_CODE
108
+ },
109
+ {
110
+ name: "admin/src/components/Initializer.tsx",
111
+ contents: outdent`
112
+ import { useEffect, useRef } from 'react';
113
+
114
+ import { PLUGIN_ID } from '../pluginId';
115
+
116
+ type InitializerProps = {
117
+ setPlugin: (id: string) => void;
118
+ };
119
+
120
+ const Initializer = ({ setPlugin }: InitializerProps) => {
121
+ const ref = useRef(setPlugin);
122
+
123
+ useEffect(() => {
124
+ ref.current(PLUGIN_ID);
125
+ }, []);
126
+
127
+ return null;
128
+ };
129
+
130
+ export { Initializer };
131
+ `
132
+ },
133
+ {
134
+ name: "admin/src/pages/App.tsx",
135
+ contents: APP_CODE
136
+ },
137
+ {
138
+ name: "admin/src/pages/HomePage.tsx",
139
+ contents: HOMEPAGE_CODE
140
+ },
141
+ {
142
+ name: "admin/src/utils/getTranslation.ts",
143
+ contents: outdent`
144
+ import { PLUGIN_ID } from '../pluginId';
145
+
146
+ const getTranslation = (id: string) => \`\${PLUGIN_ID}.\${id}\`;
147
+
148
+ export { getTranslation };
149
+ `
150
+ },
151
+ {
152
+ name: "admin/src/translations/en.json",
153
+ contents: outdent`
154
+ {}
155
+ `
156
+ },
157
+ {
158
+ /**
159
+ * TODO: remove this when we release design-system V2
160
+ */
161
+ name: "admin/custom.d.ts",
162
+ contents: outdent`
163
+ declare module '@strapi/design-system/*';
164
+ declare module '@strapi/design-system';
165
+ `
166
+ }
167
+ ];
168
+ const JAVASCRIPT = [
169
+ {
170
+ name: "admin/src/index.js",
171
+ contents: outdent`
172
+ import { prefixPluginTranslations } from './utils/prefixPluginTranslations';
173
+ import { PLUGIN_ID } from './pluginId';
174
+ import { Initializer } from './components/Initializer';
175
+ import { PluginIcon } from './components/PluginIcon';
176
+
177
+ export default {
178
+ register(app) {
179
+ app.addMenuLink({
180
+ to: \`plugins/\${PluginIcon}\`,
181
+ icon: PluginIcon,
182
+ intlLabel: {
183
+ id: \`\${PLUGIN_ID}.plugin.name\`,
184
+ defaultMessage: PLUGIN_ID,
185
+ },
186
+ Component: async () => {
187
+ const { App } = await import('./pages/App');
188
+
189
+ return App;
190
+ },
191
+ });
192
+
193
+ app.registerPlugin({
194
+ id: PLUGIN_ID,
195
+ initializer: Initializer,
196
+ isReady: false,
197
+ name: PLUGIN_ID,
198
+ });
199
+ },
200
+
201
+ async registerTrads(app) {
202
+ const { locales } = app;
203
+
204
+ const importedTranslations = await Promise.all(
205
+ locales.map((locale) => {
206
+ return import(\`./translations/\${locale}.json\`)
207
+ .then(({ default: data }) => {
208
+ return {
209
+ data: prefixPluginTranslations(data, PLUGIN_ID),
210
+ locale,
211
+ };
212
+ })
213
+ .catch(() => {
214
+ return {
215
+ data: {},
216
+ locale,
217
+ };
218
+ });
219
+ })
220
+ );
221
+
222
+ return importedTranslations;
223
+ },
224
+ };
225
+ `
226
+ },
227
+ {
228
+ name: "admin/src/components/PluginIcon.jsx",
229
+ contents: PLUGIN_ICON_CODE
230
+ },
231
+ {
232
+ name: "admin/src/components/Initializer.jsx",
233
+ contents: outdent`
234
+ import { useEffect, useRef } from 'react';
235
+
236
+ import { PLUGIN_ID } from '../pluginId';
237
+
238
+ /**
239
+ * @type {import('react').FC<{ setPlugin: (id: string) => void }>}
240
+ */
241
+ const Initializer = ({ setPlugin }) => {
242
+ const ref = useRef(setPlugin);
243
+
244
+ useEffect(() => {
245
+ ref.current(PLUGIN_ID);
246
+ }, []);
247
+
248
+ return null;
249
+ };
250
+
251
+ export { Initializer };
252
+ `
253
+ },
254
+ {
255
+ name: "admin/src/pages/App.jsx",
256
+ contents: APP_CODE
257
+ },
258
+ {
259
+ name: "admin/src/pages/HomePage.jsx",
260
+ contents: HOMEPAGE_CODE
261
+ },
262
+ {
263
+ name: "admin/src/utils/getTranslation.js",
264
+ contents: outdent`
265
+ import { PLUGIN_ID } from '../pluginId';
266
+
267
+ const getTranslation = (id) => \`\${PLUGIN_ID}.\${id}\`;
268
+
269
+ export { getTranslation };
270
+ `
271
+ },
272
+ {
273
+ name: "admin/src/translations/en.json",
274
+ contents: outdent`
275
+ {}
276
+ `
277
+ }
278
+ ];
279
+ export {
280
+ JAVASCRIPT as adminJavascriptFiles,
281
+ TYPESCRIPT as adminTypescriptFiles
282
+ };
283
+ //# sourceMappingURL=admin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.mjs","sources":["../../../../../../src/cli/commands/plugin/init/files/admin.ts"],"sourcesContent":["import { TemplateFile } from '@strapi/pack-up';\nimport { outdent } from 'outdent';\n\nconst PLUGIN_ICON_CODE = outdent`\nimport { Puzzle } from '@strapi/icons';\n\nconst PluginIcon = () => <Puzzle />;\n\nexport { PluginIcon };\n`;\n\nconst APP_CODE = outdent`\nimport { Page } from '@strapi/strapi/admin';\nimport { Switch, Route } from 'react-router-dom';\n\nimport { PLUGIN_ID } from '../pluginId';\n\nimport { HomePage } from './HomePage';\n\nconst App = () => {\n return (\n <Switch>\n <Route index element={<HomePage />} />\n <Route path=\"*\" element={<Page.Error />} />\n </Switch>\n );\n};\n\nexport { App };\n`;\n\nconst HOMEPAGE_CODE = outdent`\n import { Main } from '@strapi/design-system';\n import { useIntl } from 'react-intl';\n\n import { getTranslation } from '../utils/getTranslation';\n\n const HomePage = () => {\n const { formatMessage } = useIntl();\n\n return (\n <Main>\n <h1>Welcome to {formatMessage({ id: getTranslation(\"plugin.name\") })}</h1>\n </Main>\n )\n }\n\n export { HomePage };\n`;\n\nconst TYPESCRIPT: TemplateFile[] = [\n {\n name: 'admin/src/index.ts',\n contents: outdent`\n import { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n import { PLUGIN_ID } from './pluginId';\n import { Initializer } from './components/Initializer';\n import { PluginIcon } from './components/PluginIcon';\n \n export default {\n register(app: any) {\n app.addMenuLink({\n to: \\`plugins/\\${PLUGIN_ID}\\`,\n icon: PluginIcon,\n intlLabel: {\n id: \\`\\${PLUGIN_ID}.plugin.name\\`,\n defaultMessage: PLUGIN_ID,\n },\n Component: async () => {\n const { App } = await import('./pages/App');\n \n return App;\n },\n });\n \n app.registerPlugin({\n id: PLUGIN_ID,\n initializer: Initializer,\n isReady: false,\n name: PLUGIN_ID,\n });\n },\n \n async registerTrads(app: any) {\n const { locales } = app;\n \n const importedTranslations = await Promise.all(\n (locales as string[]).map((locale) => {\n return import(\\`./translations/\\${locale}.json\\`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, PLUGIN_ID),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n \n return importedTranslations;\n },\n };\n `,\n },\n {\n name: 'admin/src/components/PluginIcon.tsx',\n contents: PLUGIN_ICON_CODE,\n },\n {\n name: 'admin/src/components/Initializer.tsx',\n contents: outdent`\n import { useEffect, useRef } from 'react';\n\n import { PLUGIN_ID } from '../pluginId';\n \n type InitializerProps = {\n setPlugin: (id: string) => void;\n };\n \n const Initializer = ({ setPlugin }: InitializerProps) => {\n const ref = useRef(setPlugin);\n \n useEffect(() => {\n ref.current(PLUGIN_ID);\n }, []);\n \n return null;\n };\n \n export { Initializer };\n `,\n },\n {\n name: 'admin/src/pages/App.tsx',\n contents: APP_CODE,\n },\n {\n name: 'admin/src/pages/HomePage.tsx',\n contents: HOMEPAGE_CODE,\n },\n {\n name: 'admin/src/utils/getTranslation.ts',\n contents: outdent`\n import { PLUGIN_ID } from '../pluginId';\n\n const getTranslation = (id: string) => \\`\\${PLUGIN_ID}.\\${id}\\`;\n\n export { getTranslation };\n `,\n },\n {\n name: 'admin/src/translations/en.json',\n contents: outdent`\n {}\n `,\n },\n {\n /**\n * TODO: remove this when we release design-system V2\n */\n name: 'admin/custom.d.ts',\n contents: outdent`\n declare module '@strapi/design-system/*';\n declare module '@strapi/design-system';\n `,\n },\n];\n\nconst JAVASCRIPT: TemplateFile[] = [\n {\n name: 'admin/src/index.js',\n contents: outdent`\n import { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n import { PLUGIN_ID } from './pluginId';\n import { Initializer } from './components/Initializer';\n import { PluginIcon } from './components/PluginIcon';\n \n export default {\n register(app) {\n app.addMenuLink({\n to: \\`plugins/\\${PluginIcon}\\`,\n icon: PluginIcon,\n intlLabel: {\n id: \\`\\${PLUGIN_ID}.plugin.name\\`,\n defaultMessage: PLUGIN_ID,\n },\n Component: async () => {\n const { App } = await import('./pages/App');\n \n return App;\n },\n });\n \n app.registerPlugin({\n id: PLUGIN_ID,\n initializer: Initializer,\n isReady: false,\n name: PLUGIN_ID,\n });\n },\n \n async registerTrads(app) {\n const { locales } = app;\n \n const importedTranslations = await Promise.all(\n locales.map((locale) => {\n return import(\\`./translations/\\${locale}.json\\`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, PLUGIN_ID),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n \n return importedTranslations;\n },\n };\n `,\n },\n {\n name: 'admin/src/components/PluginIcon.jsx',\n contents: PLUGIN_ICON_CODE,\n },\n {\n name: 'admin/src/components/Initializer.jsx',\n contents: outdent`\n import { useEffect, useRef } from 'react';\n \n import { PLUGIN_ID } from '../pluginId';\n \n /**\n * @type {import('react').FC<{ setPlugin: (id: string) => void }>}\n */ \n const Initializer = ({ setPlugin }) => {\n const ref = useRef(setPlugin);\n \n useEffect(() => {\n ref.current(PLUGIN_ID);\n }, []);\n \n return null;\n };\n \n export { Initializer };\n `,\n },\n {\n name: 'admin/src/pages/App.jsx',\n contents: APP_CODE,\n },\n {\n name: 'admin/src/pages/HomePage.jsx',\n contents: HOMEPAGE_CODE,\n },\n {\n name: 'admin/src/utils/getTranslation.js',\n contents: outdent`\n import { PLUGIN_ID } from '../pluginId';\n \n const getTranslation = (id) => \\`\\${PLUGIN_ID}.\\${id}\\`;\n \n export { getTranslation };\n `,\n },\n {\n name: 'admin/src/translations/en.json',\n contents: outdent`\n {}\n `,\n },\n];\n\nexport { TYPESCRIPT as adminTypescriptFiles, JAVASCRIPT as adminJavascriptFiles };\n"],"names":[],"mappings":";AAGA,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQzB,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBjB,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBtB,MAAM,aAA6B;AAAA,EACjC;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA;AAAA;AAAA,EAGZ;AACF;"}
@@ -0,0 +1,26 @@
1
+ import { outdent } from "outdent";
2
+ const editorConfigFile = {
3
+ name: ".editorconfig",
4
+ contents: outdent`
5
+ root = true
6
+
7
+ [*]
8
+ indent_style = space
9
+ indent_size = 2
10
+ end_of_line = lf
11
+ charset = utf-8
12
+ trim_trailing_whitespace = true
13
+ insert_final_newline = true
14
+
15
+ [{package.json,*.yml}]
16
+ indent_style = space
17
+ indent_size = 2
18
+
19
+ [*.md]
20
+ trim_trailing_whitespace = false
21
+ `
22
+ };
23
+ export {
24
+ editorConfigFile
25
+ };
26
+ //# sourceMappingURL=editorConfig.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editorConfig.mjs","sources":["../../../../../../src/cli/commands/plugin/init/files/editorConfig.ts"],"sourcesContent":["import { TemplateFile } from '@strapi/pack-up';\nimport { outdent } from 'outdent';\n\nconst editorConfigFile: TemplateFile = {\n name: '.editorconfig',\n contents: outdent`\n root = true\n\n [*]\n indent_style = space\n indent_size = 2\n end_of_line = lf\n charset = utf-8\n trim_trailing_whitespace = true\n insert_final_newline = true\n \n [{package.json,*.yml}]\n indent_style = space\n indent_size = 2\n \n [*.md]\n trim_trailing_whitespace = false\n `,\n};\n\nexport { editorConfigFile };\n"],"names":[],"mappings":";AAGA,MAAM,mBAAiC;AAAA,EACrC,MAAM;AAAA,EACN,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBZ;"}
@@ -0,0 +1,11 @@
1
+ import { outdent } from "outdent";
2
+ const eslintIgnoreFile = {
3
+ name: ".eslintignore",
4
+ contents: outdent`
5
+ dist
6
+ `
7
+ };
8
+ export {
9
+ eslintIgnoreFile
10
+ };
11
+ //# sourceMappingURL=eslint.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.mjs","sources":["../../../../../../src/cli/commands/plugin/init/files/eslint.ts"],"sourcesContent":["import { TemplateFile } from '@strapi/pack-up';\nimport { outdent } from 'outdent';\n\nconst eslintIgnoreFile: TemplateFile = {\n name: '.eslintignore',\n contents: outdent`\n dist\n `,\n};\n\nexport { eslintIgnoreFile };\n"],"names":[],"mappings":";AAGA,MAAM,mBAAiC;AAAA,EACrC,MAAM;AAAA,EACN,UAAU;AAAA;AAAA;AAGZ;"}
@@ -0,0 +1,34 @@
1
+ import { outdent } from "outdent";
2
+ const gitIgnoreFile = {
3
+ name: ".gitignore",
4
+ contents: outdent`
5
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
6
+
7
+ # dependencies
8
+ node_modules
9
+ .pnp
10
+ .pnp.js
11
+
12
+ # testing
13
+ coverage
14
+
15
+ # production
16
+ dist
17
+
18
+ # misc
19
+ .DS_Store
20
+ *.pem
21
+
22
+ # debug
23
+ npm-debug.log*
24
+ yarn-debug.log*
25
+ yarn-error.log*
26
+
27
+ # local env files
28
+ .env
29
+ `
30
+ };
31
+ export {
32
+ gitIgnoreFile
33
+ };
34
+ //# sourceMappingURL=gitIgnore.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitIgnore.mjs","sources":["../../../../../../src/cli/commands/plugin/init/files/gitIgnore.ts"],"sourcesContent":["import { TemplateFile } from '@strapi/pack-up';\nimport { outdent } from 'outdent';\n\nconst gitIgnoreFile: TemplateFile = {\n name: '.gitignore',\n contents: outdent`\n # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n # dependencies\n node_modules\n .pnp\n .pnp.js\n \n # testing\n coverage\n \n # production\n dist\n \n # misc\n .DS_Store\n *.pem\n \n # debug\n npm-debug.log*\n yarn-debug.log*\n yarn-error.log*\n \n # local env files\n .env \n `,\n};\n\nexport { gitIgnoreFile };\n"],"names":[],"mappings":";AAGA,MAAM,gBAA8B;AAAA,EAClC,MAAM;AAAA,EACN,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BZ;"}
@@ -0,0 +1,25 @@
1
+ import { outdent } from "outdent";
2
+ const prettierFile = {
3
+ name: ".prettierrc",
4
+ contents: outdent`
5
+ {
6
+ "endOfLine": 'lf',
7
+ "tabWidth": 2,
8
+ "printWidth": 100,
9
+ "singleQuote": true,
10
+ "trailingComma": 'es5',
11
+ }
12
+ `
13
+ };
14
+ const prettierIgnoreFile = {
15
+ name: ".prettierignore",
16
+ contents: outdent`
17
+ dist
18
+ coverage
19
+ `
20
+ };
21
+ export {
22
+ prettierFile,
23
+ prettierIgnoreFile
24
+ };
25
+ //# sourceMappingURL=prettier.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prettier.mjs","sources":["../../../../../../src/cli/commands/plugin/init/files/prettier.ts"],"sourcesContent":["import { TemplateFile } from '@strapi/pack-up';\nimport { outdent } from 'outdent';\n\nconst prettierFile: TemplateFile = {\n name: '.prettierrc',\n contents: outdent`\n {\n \"endOfLine\": 'lf',\n \"tabWidth\": 2,\n \"printWidth\": 100,\n \"singleQuote\": true,\n \"trailingComma\": 'es5',\n }\n `,\n};\n\nconst prettierIgnoreFile: TemplateFile = {\n name: '.prettierignore',\n contents: outdent`\n dist\n coverage\n `,\n};\n\nexport { prettierFile, prettierIgnoreFile };\n"],"names":[],"mappings":";AAGA,MAAM,eAA6B;AAAA,EACjC,MAAM;AAAA,EACN,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASZ;AAEA,MAAM,qBAAmC;AAAA,EACvC,MAAM;AAAA,EACN,UAAU;AAAA;AAAA;AAAA;AAIZ;"}
@@ -22,12 +22,12 @@ const TYPESCRIPT = (pluginName) => [
22
22
  import policies from './policies';
23
23
  import routes from './routes';
24
24
  import services from './services';
25
-
25
+
26
26
  export default {
27
27
  bootstrap,
28
28
  destroy,
29
29
  register,
30
-
30
+
31
31
  config,
32
32
  controllers,
33
33
  contentTypes,
@@ -41,9 +41,9 @@ const TYPESCRIPT = (pluginName) => [
41
41
  {
42
42
  name: "server/src/bootstrap.ts",
43
43
  contents: outdent.outdent`
44
- import type { Strapi } from '@strapi/strapi';
44
+ import type { Core } from '@strapi/strapi';
45
45
 
46
- const bootstrap = ({ strapi }: { strapi: Strapi }) => {
46
+ const bootstrap = ({ strapi }: { strapi: Core.Strapi }) => {
47
47
  // bootstrap phase
48
48
  };
49
49
 
@@ -53,9 +53,9 @@ const TYPESCRIPT = (pluginName) => [
53
53
  {
54
54
  name: "server/src/destroy.ts",
55
55
  contents: outdent.outdent`
56
- import type { Strapi } from '@strapi/strapi';
56
+ import type { Core } from '@strapi/strapi';
57
57
 
58
- const destroy = ({ strapi }: { strapi: Strapi }) => {
58
+ const destroy = ({ strapi }: { strapi: Core.Strapi }) => {
59
59
  // destroy phase
60
60
  };
61
61
 
@@ -65,9 +65,9 @@ const TYPESCRIPT = (pluginName) => [
65
65
  {
66
66
  name: "server/src/register.ts",
67
67
  contents: outdent.outdent`
68
- import type { Strapi } from '@strapi/strapi';
68
+ import type { Core } from '@strapi/strapi';
69
69
 
70
- const register = ({ strapi }: { strapi: Strapi }) => {
70
+ const register = ({ strapi }: { strapi: Core.Strapi }) => {
71
71
  // register phase
72
72
  };
73
73
 
@@ -102,9 +102,9 @@ const TYPESCRIPT = (pluginName) => [
102
102
  {
103
103
  name: "server/src/controllers/controller.ts",
104
104
  contents: outdent.outdent`
105
- import type { Strapi } from '@strapi/strapi';
105
+ import type { Core } from '@strapi/strapi';
106
106
 
107
- const controller = ({ strapi }: { strapi: Strapi }) => ({
107
+ const controller = ({ strapi }: { strapi: Core.Strapi }) => ({
108
108
  index(ctx) {
109
109
  ctx.body = strapi
110
110
  .plugin('${pluginName}')
@@ -158,9 +158,9 @@ const TYPESCRIPT = (pluginName) => [
158
158
  {
159
159
  name: "server/src/services/service.ts",
160
160
  contents: outdent.outdent`
161
- import type { Strapi } from '@strapi/strapi';
161
+ import type { Core } from '@strapi/strapi';
162
162
 
163
- const service = ({ strapi }: { strapi: Strapi }) => ({
163
+ const service = ({ strapi }: { strapi: Core.Strapi }) => ({
164
164
  getWelcomeMessage() {
165
165
  return 'Welcome to Strapi 🚀';
166
166
  },
@@ -198,7 +198,7 @@ const JAVASCRIPT = (pluginName) => [
198
198
  bootstrap,
199
199
  destroy,
200
200
  register,
201
-
201
+
202
202
  config,
203
203
  controllers,
204
204
  contentTypes,
@@ -229,7 +229,7 @@ const JAVASCRIPT = (pluginName) => [
229
229
  const destroy = ({ strapi }) => {
230
230
  // destroy phase
231
231
  };
232
-
232
+
233
233
  module.exports = destroy;
234
234
  `
235
235
  },
@@ -241,7 +241,7 @@ const JAVASCRIPT = (pluginName) => [
241
241
  const register = ({ strapi }) => {
242
242
  // register phase
243
243
  };
244
-
244
+
245
245
  module.exports = register;
246
246
  `
247
247
  },
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sources":["../../../../../../src/cli/commands/plugin/init/files/server.ts"],"sourcesContent":["import { TemplateFile } from '@strapi/pack-up';\nimport { outdent } from 'outdent';\n\nconst TYPESCRIPT = (pluginName: string): TemplateFile[] => [\n {\n name: 'server/src/index.ts',\n contents: outdent`\n /**\n * Application methods\n */\n import bootstrap from './bootstrap';\n import destroy from './destroy';\n import register from './register';\n\n /**\n * Plugin server methods\n */\n import config from './config';\n import contentTypes from './content-types';\n import controllers from './controllers';\n import middlewares from './middlewares';\n import policies from './policies';\n import routes from './routes';\n import services from './services';\n \n export default {\n bootstrap,\n destroy,\n register,\n \n config,\n controllers,\n contentTypes,\n middlewares,\n policies,\n routes,\n services,\n };\n `,\n },\n {\n name: 'server/src/bootstrap.ts',\n contents: outdent`\n import type { Strapi } from '@strapi/strapi';\n\n const bootstrap = ({ strapi }: { strapi: Strapi }) => {\n // bootstrap phase\n };\n\n export default bootstrap;\n `,\n },\n {\n name: 'server/src/destroy.ts',\n contents: outdent`\n import type { Strapi } from '@strapi/strapi';\n\n const destroy = ({ strapi }: { strapi: Strapi }) => {\n // destroy phase\n };\n\n export default destroy;\n `,\n },\n {\n name: 'server/src/register.ts',\n contents: outdent`\n import type { Strapi } from '@strapi/strapi';\n\n const register = ({ strapi }: { strapi: Strapi }) => {\n // register phase\n };\n\n export default register;\n `,\n },\n {\n name: 'server/src/config/index.ts',\n contents: outdent`\n export default {\n default: {},\n validator() {},\n };\n `,\n },\n {\n name: 'server/src/content-types/index.ts',\n contents: outdent`\n export default {};\n `,\n },\n {\n name: 'server/src/controllers/index.ts',\n contents: outdent`\n import controller from './controller';\n\n export default {\n controller,\n };\n `,\n },\n {\n name: 'server/src/controllers/controller.ts',\n contents: outdent`\n import type { Strapi } from '@strapi/strapi';\n\n const controller = ({ strapi }: { strapi: Strapi }) => ({\n index(ctx) {\n ctx.body = strapi\n .plugin('${pluginName}')\n // the name of the service file & the method.\n .service('service')\n .getWelcomeMessage();\n },\n });\n\n export default controller\n `,\n },\n {\n name: 'server/src/middlewares/index.ts',\n contents: outdent`\n export default {};\n `,\n },\n {\n name: 'server/src/policies/index.ts',\n contents: outdent`\n export default {};\n `,\n },\n {\n name: 'server/src/routes/index.ts',\n contents: outdent`\n export default [\n {\n method: 'GET',\n path: '/',\n // name of the controller file & the method.\n handler: 'controller.index',\n config: {\n policies: [],\n },\n },\n ];\n `,\n },\n {\n name: 'server/src/services/index.ts',\n contents: outdent`\n import service from './service';\n\n export default {\n service,\n };\n `,\n },\n {\n name: 'server/src/services/service.ts',\n contents: outdent`\n import type { Strapi } from '@strapi/strapi';\n\n const service = ({ strapi }: { strapi: Strapi }) => ({\n getWelcomeMessage() {\n return 'Welcome to Strapi 🚀';\n },\n });\n\n export default service\n `,\n },\n];\n\nconst JAVASCRIPT = (pluginName: string): TemplateFile[] => [\n {\n name: 'server/src/index.ts',\n contents: outdent`\n 'use strict';\n\n /**\n * Application methods\n */\n const bootstrap = require('./bootstrap');\n const destroy = require('./destroy');\n const register = require('./register');\n\n /**\n * Plugin server methods\n */\n const config = require('./config');\n const contentTypes = require('./content-types');\n const controllers = require('./controllers');\n const middlewares = require('./middlewares');\n const policies = require('./policies');\n const routes = require('./routes');\n const services = require('./services');\n\n module.exports = {\n bootstrap,\n destroy,\n register,\n \n config,\n controllers,\n contentTypes,\n middlewares,\n policies,\n routes,\n services,\n };\n `,\n },\n {\n name: 'server/src/bootstrap.ts',\n contents: outdent`\n 'use strict';\n\n const bootstrap = ({ strapi }) => {\n // bootstrap phase\n };\n\n module.exports = bootstrap;\n `,\n },\n {\n name: 'server/src/destroy.ts',\n contents: outdent`\n 'use strict';\n\n const destroy = ({ strapi }) => {\n // destroy phase\n };\n \n module.exports = destroy;\n `,\n },\n {\n name: 'server/src/register.ts',\n contents: outdent`\n 'use strict';\n\n const register = ({ strapi }) => {\n // register phase\n };\n \n module.exports = register;\n `,\n },\n {\n name: 'server/src/config/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = {\n default: {},\n validator() {},\n };\n `,\n },\n {\n name: 'server/src/content-types/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = {};\n `,\n },\n {\n name: 'server/src/controllers/index.ts',\n contents: outdent`\n 'use strict';\n\n const controller = require('./controller');\n\n module.exports = {\n controller,\n };\n `,\n },\n {\n name: 'server/src/controllers/controller.ts',\n contents: outdent`\n 'use strict';\n\n const controller = ({ strapi }) => ({\n index(ctx) {\n ctx.body = strapi\n .plugin('${pluginName}')\n // the name of the service file & the method.\n .service('service')\n .getWelcomeMessage();\n },\n });\n\n module.exports = controller\n `,\n },\n {\n name: 'server/src/middlewares/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = {};\n `,\n },\n {\n name: 'server/src/policies/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = {};\n `,\n },\n {\n name: 'server/src/routes/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = [\n {\n method: 'GET',\n path: '/',\n // name of the controller file & the method.\n handler: 'controller.index',\n config: {\n policies: [],\n },\n },\n ];\n `,\n },\n {\n name: 'server/src/services/index.ts',\n contents: outdent`\n 'use strict';\n\n const service = require('./service');\n\n module.exports = {\n service,\n };\n `,\n },\n {\n name: 'server/src/services/service.ts',\n contents: outdent`\n 'use strict';\n\n const service = ({ strapi }) => ({\n getWelcomeMessage() {\n return 'Welcome to Strapi 🚀';\n },\n });\n\n module.exports = service\n `,\n },\n];\n\nexport { TYPESCRIPT as serverTypescriptFiles, JAVASCRIPT as serverJavascriptFiles };\n"],"names":["outdent"],"mappings":";;;AAGM,MAAA,aAAa,CAAC,eAAuC;AAAA,EACzD;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAiCZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EASZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAA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,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAKZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAKZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAeZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EASZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAWZ;AACF;;;"}
1
+ {"version":3,"file":"server.js","sources":["../../../../../../src/cli/commands/plugin/init/files/server.ts"],"sourcesContent":["import { TemplateFile } from '@strapi/pack-up';\nimport { outdent } from 'outdent';\n\nconst TYPESCRIPT = (pluginName: string): TemplateFile[] => [\n {\n name: 'server/src/index.ts',\n contents: outdent`\n /**\n * Application methods\n */\n import bootstrap from './bootstrap';\n import destroy from './destroy';\n import register from './register';\n\n /**\n * Plugin server methods\n */\n import config from './config';\n import contentTypes from './content-types';\n import controllers from './controllers';\n import middlewares from './middlewares';\n import policies from './policies';\n import routes from './routes';\n import services from './services';\n\n export default {\n bootstrap,\n destroy,\n register,\n\n config,\n controllers,\n contentTypes,\n middlewares,\n policies,\n routes,\n services,\n };\n `,\n },\n {\n name: 'server/src/bootstrap.ts',\n contents: outdent`\n import type { Core } from '@strapi/strapi';\n\n const bootstrap = ({ strapi }: { strapi: Core.Strapi }) => {\n // bootstrap phase\n };\n\n export default bootstrap;\n `,\n },\n {\n name: 'server/src/destroy.ts',\n contents: outdent`\n import type { Core } from '@strapi/strapi';\n\n const destroy = ({ strapi }: { strapi: Core.Strapi }) => {\n // destroy phase\n };\n\n export default destroy;\n `,\n },\n {\n name: 'server/src/register.ts',\n contents: outdent`\n import type { Core } from '@strapi/strapi';\n\n const register = ({ strapi }: { strapi: Core.Strapi }) => {\n // register phase\n };\n\n export default register;\n `,\n },\n {\n name: 'server/src/config/index.ts',\n contents: outdent`\n export default {\n default: {},\n validator() {},\n };\n `,\n },\n {\n name: 'server/src/content-types/index.ts',\n contents: outdent`\n export default {};\n `,\n },\n {\n name: 'server/src/controllers/index.ts',\n contents: outdent`\n import controller from './controller';\n\n export default {\n controller,\n };\n `,\n },\n {\n name: 'server/src/controllers/controller.ts',\n contents: outdent`\n import type { Core } from '@strapi/strapi';\n\n const controller = ({ strapi }: { strapi: Core.Strapi }) => ({\n index(ctx) {\n ctx.body = strapi\n .plugin('${pluginName}')\n // the name of the service file & the method.\n .service('service')\n .getWelcomeMessage();\n },\n });\n\n export default controller\n `,\n },\n {\n name: 'server/src/middlewares/index.ts',\n contents: outdent`\n export default {};\n `,\n },\n {\n name: 'server/src/policies/index.ts',\n contents: outdent`\n export default {};\n `,\n },\n {\n name: 'server/src/routes/index.ts',\n contents: outdent`\n export default [\n {\n method: 'GET',\n path: '/',\n // name of the controller file & the method.\n handler: 'controller.index',\n config: {\n policies: [],\n },\n },\n ];\n `,\n },\n {\n name: 'server/src/services/index.ts',\n contents: outdent`\n import service from './service';\n\n export default {\n service,\n };\n `,\n },\n {\n name: 'server/src/services/service.ts',\n contents: outdent`\n import type { Core } from '@strapi/strapi';\n\n const service = ({ strapi }: { strapi: Core.Strapi }) => ({\n getWelcomeMessage() {\n return 'Welcome to Strapi 🚀';\n },\n });\n\n export default service\n `,\n },\n];\n\nconst JAVASCRIPT = (pluginName: string): TemplateFile[] => [\n {\n name: 'server/src/index.ts',\n contents: outdent`\n 'use strict';\n\n /**\n * Application methods\n */\n const bootstrap = require('./bootstrap');\n const destroy = require('./destroy');\n const register = require('./register');\n\n /**\n * Plugin server methods\n */\n const config = require('./config');\n const contentTypes = require('./content-types');\n const controllers = require('./controllers');\n const middlewares = require('./middlewares');\n const policies = require('./policies');\n const routes = require('./routes');\n const services = require('./services');\n\n module.exports = {\n bootstrap,\n destroy,\n register,\n\n config,\n controllers,\n contentTypes,\n middlewares,\n policies,\n routes,\n services,\n };\n `,\n },\n {\n name: 'server/src/bootstrap.ts',\n contents: outdent`\n 'use strict';\n\n const bootstrap = ({ strapi }) => {\n // bootstrap phase\n };\n\n module.exports = bootstrap;\n `,\n },\n {\n name: 'server/src/destroy.ts',\n contents: outdent`\n 'use strict';\n\n const destroy = ({ strapi }) => {\n // destroy phase\n };\n\n module.exports = destroy;\n `,\n },\n {\n name: 'server/src/register.ts',\n contents: outdent`\n 'use strict';\n\n const register = ({ strapi }) => {\n // register phase\n };\n\n module.exports = register;\n `,\n },\n {\n name: 'server/src/config/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = {\n default: {},\n validator() {},\n };\n `,\n },\n {\n name: 'server/src/content-types/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = {};\n `,\n },\n {\n name: 'server/src/controllers/index.ts',\n contents: outdent`\n 'use strict';\n\n const controller = require('./controller');\n\n module.exports = {\n controller,\n };\n `,\n },\n {\n name: 'server/src/controllers/controller.ts',\n contents: outdent`\n 'use strict';\n\n const controller = ({ strapi }) => ({\n index(ctx) {\n ctx.body = strapi\n .plugin('${pluginName}')\n // the name of the service file & the method.\n .service('service')\n .getWelcomeMessage();\n },\n });\n\n module.exports = controller\n `,\n },\n {\n name: 'server/src/middlewares/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = {};\n `,\n },\n {\n name: 'server/src/policies/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = {};\n `,\n },\n {\n name: 'server/src/routes/index.ts',\n contents: outdent`\n 'use strict';\n\n module.exports = [\n {\n method: 'GET',\n path: '/',\n // name of the controller file & the method.\n handler: 'controller.index',\n config: {\n policies: [],\n },\n },\n ];\n `,\n },\n {\n name: 'server/src/services/index.ts',\n contents: outdent`\n 'use strict';\n\n const service = require('./service');\n\n module.exports = {\n service,\n };\n `,\n },\n {\n name: 'server/src/services/service.ts',\n contents: outdent`\n 'use strict';\n\n const service = ({ strapi }) => ({\n getWelcomeMessage() {\n return 'Welcome to Strapi 🚀';\n },\n });\n\n module.exports = service\n `,\n },\n];\n\nexport { TYPESCRIPT as serverTypescriptFiles, JAVASCRIPT as serverJavascriptFiles };\n"],"names":["outdent"],"mappings":";;;AAGM,MAAA,aAAa,CAAC,eAAuC;AAAA,EACzD;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAiCZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EASZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EASZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EASZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAMZ;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAUA,QAAAA;AAAAA;AAAAA;AAAAA,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