@strapi/generators 5.0.0-alpha.5 → 5.0.0-alpha.6

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 (68) hide show
  1. package/dist/plopfile.d.ts.map +1 -1
  2. package/dist/plopfile.js +0 -86
  3. package/dist/plopfile.js.map +1 -1
  4. package/dist/plopfile.mjs +0 -85
  5. package/dist/plopfile.mjs.map +1 -1
  6. package/dist/templates/ts/middleware.ts.hbs +2 -2
  7. package/package.json +7 -7
  8. package/dist/files/js/plugin/.gitattributes +0 -103
  9. package/dist/files/js/plugin/admin/src/components/Initializer/index.js +0 -26
  10. package/dist/files/js/plugin/admin/src/components/PluginIcon/index.js +0 -12
  11. package/dist/files/js/plugin/admin/src/index.js +0 -61
  12. package/dist/files/js/plugin/admin/src/pages/App/index.js +0 -25
  13. package/dist/files/js/plugin/admin/src/pages/HomePage/index.js +0 -20
  14. package/dist/files/js/plugin/admin/src/pluginId.js +0 -5
  15. package/dist/files/js/plugin/admin/src/translations/en.json +0 -1
  16. package/dist/files/js/plugin/admin/src/translations/fr.json +0 -1
  17. package/dist/files/js/plugin/admin/src/utils/getTrad.js +0 -5
  18. package/dist/files/js/plugin/admin/src/utils/prefixPluginTranslations.js +0 -11
  19. package/dist/files/js/plugin/server/bootstrap.js +0 -5
  20. package/dist/files/js/plugin/server/config/index.js +0 -6
  21. package/dist/files/js/plugin/server/content-types/index.js +0 -3
  22. package/dist/files/js/plugin/server/controllers/index.js +0 -7
  23. package/dist/files/js/plugin/server/controllers/my-controller.js.hbs +0 -10
  24. package/dist/files/js/plugin/server/destroy.js +0 -5
  25. package/dist/files/js/plugin/server/index.js +0 -25
  26. package/dist/files/js/plugin/server/middlewares/index.js +0 -3
  27. package/dist/files/js/plugin/server/policies/index.js +0 -3
  28. package/dist/files/js/plugin/server/register.js +0 -5
  29. package/dist/files/js/plugin/server/routes/index.js +0 -10
  30. package/dist/files/js/plugin/server/services/index.js +0 -7
  31. package/dist/files/js/plugin/server/services/my-service.js +0 -7
  32. package/dist/files/js/plugin/strapi-admin.js +0 -3
  33. package/dist/files/js/plugin/strapi-server.js +0 -3
  34. package/dist/files/ts/plugin/.gitattributes +0 -103
  35. package/dist/files/ts/plugin/admin/src/components/Initializer/index.tsx +0 -24
  36. package/dist/files/ts/plugin/admin/src/components/PluginIcon/index.tsx +0 -12
  37. package/dist/files/ts/plugin/admin/src/index.tsx +0 -67
  38. package/dist/files/ts/plugin/admin/src/pages/App/index.tsx +0 -25
  39. package/dist/files/ts/plugin/admin/src/pages/HomePage/index.tsx +0 -19
  40. package/dist/files/ts/plugin/admin/src/pluginId.ts +0 -5
  41. package/dist/files/ts/plugin/admin/src/translations/en.json +0 -1
  42. package/dist/files/ts/plugin/admin/src/translations/fr.json +0 -1
  43. package/dist/files/ts/plugin/admin/src/utils/getTrad.ts +0 -5
  44. package/dist/files/ts/plugin/admin/src/utils/prefixPluginTranslations.ts +0 -13
  45. package/dist/files/ts/plugin/custom.d.ts +0 -5
  46. package/dist/files/ts/plugin/server/bootstrap.ts +0 -5
  47. package/dist/files/ts/plugin/server/config/index.ts +0 -4
  48. package/dist/files/ts/plugin/server/content-types/index.ts +0 -1
  49. package/dist/files/ts/plugin/server/controllers/index.ts +0 -5
  50. package/dist/files/ts/plugin/server/controllers/my-controller.ts.hbs +0 -10
  51. package/dist/files/ts/plugin/server/destroy.ts +0 -5
  52. package/dist/files/ts/plugin/server/index.ts +0 -23
  53. package/dist/files/ts/plugin/server/middlewares/index.ts +0 -1
  54. package/dist/files/ts/plugin/server/policies/index.ts +0 -1
  55. package/dist/files/ts/plugin/server/register.ts +0 -5
  56. package/dist/files/ts/plugin/server/routes/index.ts +0 -10
  57. package/dist/files/ts/plugin/server/services/index.ts +0 -5
  58. package/dist/files/ts/plugin/server/services/my-service.ts +0 -7
  59. package/dist/files/ts/plugin/strapi-admin.js +0 -3
  60. package/dist/files/ts/plugin/strapi-server.js +0 -3
  61. package/dist/files/ts/plugin/tsconfig.json +0 -20
  62. package/dist/files/ts/plugin/tsconfig.server.json +0 -25
  63. package/dist/plops/plugin.d.ts +0 -4
  64. package/dist/plops/plugin.d.ts.map +0 -1
  65. package/dist/templates/js/README.md.hbs +0 -3
  66. package/dist/templates/js/plugin-package.json.hbs +0 -42
  67. package/dist/templates/ts/README.md.hbs +0 -3
  68. package/dist/templates/ts/plugin-package.json.hbs +0 -49
@@ -1,19 +0,0 @@
1
- /*
2
- *
3
- * HomePage
4
- *
5
- */
6
-
7
- import React from 'react';
8
- import pluginId from '../../pluginId';
9
-
10
- const HomePage = () => {
11
- return (
12
- <div>
13
- <h1>{pluginId}&apos;s HomePage</h1>
14
- <p>Happy coding</p>
15
- </div>
16
- );
17
- };
18
-
19
- export default HomePage;
@@ -1,5 +0,0 @@
1
- import pluginPkg from '../../package.json';
2
-
3
- const pluginId = pluginPkg.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, '');
4
-
5
- export default pluginId;
@@ -1,5 +0,0 @@
1
- import pluginId from '../pluginId';
2
-
3
- const getTrad = (id: string) => `${pluginId}.${id}`;
4
-
5
- export default getTrad;
@@ -1,13 +0,0 @@
1
- type TradOptions = Record<string, string>;
2
-
3
- const prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {
4
- if (!pluginId) {
5
- throw new TypeError("pluginId can't be empty");
6
- }
7
- return Object.keys(trad).reduce((acc, current) => {
8
- acc[`${pluginId}.${current}`] = trad[current];
9
- return acc;
10
- }, {} as TradOptions);
11
- };
12
-
13
- export { prefixPluginTranslations };
@@ -1,5 +0,0 @@
1
- declare module '@strapi/design-system/*';
2
- declare module '@strapi/design-system';
3
- declare module '@strapi/icons';
4
- declare module '@strapi/icons/*';
5
- declare module '@strapi/helper-plugin';
@@ -1,5 +0,0 @@
1
- import { Strapi } from '@strapi/strapi';
2
-
3
- export default ({ strapi }: { strapi: Strapi }) => {
4
- // bootstrap phase
5
- };
@@ -1,4 +0,0 @@
1
- export default {
2
- default: {},
3
- validator() {},
4
- };
@@ -1 +0,0 @@
1
- export default {};
@@ -1,5 +0,0 @@
1
- import myController from './my-controller';
2
-
3
- export default {
4
- myController,
5
- };
@@ -1,10 +0,0 @@
1
- import { Strapi } from '@strapi/strapi';
2
-
3
- export default ({ strapi }: { strapi: Strapi }) => ({
4
- index(ctx) {
5
- ctx.body = strapi
6
- .plugin('{{ pluginName }}')
7
- .service('myService')
8
- .getWelcomeMessage();
9
- },
10
- });
@@ -1,5 +0,0 @@
1
- import { Strapi } from '@strapi/strapi';
2
-
3
- export default ({ strapi }: { strapi: Strapi }) => {
4
- // destroy phase
5
- };
@@ -1,23 +0,0 @@
1
- import register from './register';
2
- import bootstrap from './bootstrap';
3
- import destroy from './destroy';
4
- import config from './config';
5
- import contentTypes from './content-types';
6
- import controllers from './controllers';
7
- import routes from './routes';
8
- import middlewares from './middlewares';
9
- import policies from './policies';
10
- import services from './services';
11
-
12
- export default {
13
- register,
14
- bootstrap,
15
- destroy,
16
- config,
17
- controllers,
18
- routes,
19
- services,
20
- contentTypes,
21
- policies,
22
- middlewares,
23
- };
@@ -1 +0,0 @@
1
- export default {};
@@ -1 +0,0 @@
1
- export default {};
@@ -1,5 +0,0 @@
1
- import { Strapi } from '@strapi/strapi';
2
-
3
- export default ({ strapi }: { strapi: Strapi }) => {
4
- // register phase
5
- };
@@ -1,10 +0,0 @@
1
- export default [
2
- {
3
- method: 'GET',
4
- path: '/',
5
- handler: 'myController.index',
6
- config: {
7
- policies: [],
8
- },
9
- },
10
- ];
@@ -1,5 +0,0 @@
1
- import myService from './my-service';
2
-
3
- export default {
4
- myService,
5
- };
@@ -1,7 +0,0 @@
1
- import { Strapi } from '@strapi/strapi';
2
-
3
- export default ({ strapi }: { strapi: Strapi }) => ({
4
- getWelcomeMessage() {
5
- return 'Welcome to Strapi 🚀';
6
- },
7
- });
@@ -1,3 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = require('./admin/src').default;
@@ -1,3 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = require('./dist/server');
@@ -1,20 +0,0 @@
1
- {
2
- "extends": "@strapi/typescript-utils/tsconfigs/admin",
3
-
4
- "compilerOptions": {
5
- "target": "ESNext",
6
- "strict": true
7
- },
8
-
9
- "include": ["admin", "custom.d.ts"],
10
-
11
- "exclude": [
12
- "node_modules/",
13
- "dist/",
14
-
15
- // Do not include server files in the server compilation
16
- "server/",
17
- // Do not include test files
18
- "**/*.test.ts"
19
- ]
20
- }
@@ -1,25 +0,0 @@
1
- {
2
- "extends": "@strapi/typescript-utils/tsconfigs/server",
3
-
4
- "compilerOptions": {
5
- "outDir": "dist",
6
- "rootDir": "."
7
- },
8
-
9
- "include": [
10
- // Include the root directory
11
- "server",
12
- // Force the JSON files in the src folder to be included
13
- "server/**/*.json"
14
- ],
15
-
16
- "exclude": [
17
- "node_modules/",
18
- "dist/",
19
-
20
- // Do not include admin files in the server compilation
21
- "admin/",
22
- // Do not include test files
23
- "**/*.test.ts"
24
- ]
25
- }
@@ -1,4 +0,0 @@
1
- import { NodePlopAPI } from 'plop';
2
- declare const _default: (plop: NodePlopAPI) => void;
3
- export default _default;
4
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plops/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;+BAmCb,WAAW;AAAjC,wBA8DE"}
@@ -1,3 +0,0 @@
1
- # Strapi plugin {{ pluginName }}
2
-
3
- A quick description of {{ pluginName }}.
@@ -1,42 +0,0 @@
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": "^18.2.0",
19
- "react-dom": "^18.2.0",
20
- "react-router-dom": "^6.0.0",
21
- "styled-components": "^5.3.6"
22
- },
23
- "peerDependencies": {
24
- "react": "^17.0.0 || ^18.0.0",
25
- "react-dom": "^17.0.0 || ^18.0.0",
26
- "react-router-dom": "^6.0.0",
27
- "styled-components": "^5.2.1"
28
- },
29
- "author": {
30
- "name": "A Strapi developer"
31
- },
32
- "maintainers": [
33
- {
34
- "name": "A Strapi developer"
35
- }
36
- ],
37
- "engines": {
38
- "node": ">=18.0.0 <=20.x.x",
39
- "npm": ">=6.0.0"
40
- },
41
- "license": "MIT"
42
- }
@@ -1,3 +0,0 @@
1
- # Strapi plugin {{ pluginName }}
2
-
3
- A quick description of {{ pluginName }}.
@@ -1,49 +0,0 @@
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 {{ pluginName }} plugin",
8
- "kind": "plugin"
9
- },
10
- "dependencies": {
11
- "@strapi/design-system": "^1.6.3",
12
- "@strapi/helper-plugin": "^4.6.0",
13
- "@strapi/icons": "^1.6.3",
14
- },
15
- "devDependencies": {
16
- "@strapi/typescript-utils": "^4.6.0",
17
- "@types/react": "^18.0.0",
18
- "@types/react-dom": "^18.0.0",
19
- "@types/styled-components": "^5.1.26",
20
- "react": "^18.0.0",
21
- "react-dom": "^18.0.0",
22
- "react-router-dom": "^6.0.0",
23
- "styled-components": "^5.3.6",
24
- "typescript": "5.0.4"
25
- },
26
- "peerDependencies": {
27
- "react": "^17.0.0 || ^18.0.0",
28
- "react-dom": "^17.0.0 || ^18.0.0",
29
- "react-router-dom": "^6.0.0",
30
- "styled-components": "^5.2.1"
31
- },
32
- "author": {
33
- "name": "A Strapi developer"
34
- },
35
- "maintainers": [
36
- {
37
- "name": "A Strapi developer"
38
- }
39
- ],
40
- "engines": {
41
- "node": ">=18.0.0 <=20.x.x",
42
- "npm": ">=6.0.0"
43
- },
44
- "scripts": {
45
- "develop": "tsc -p tsconfig.server.json -w",
46
- "build": "tsc -p tsconfig.server.json"
47
- },
48
- "license": "MIT"
49
- }