@strapi/generators 0.0.0-next.f45143c5e2a8a9d85691d0abf79a3f42024a0c71 → 0.0.0-next.f4ec69568d980c6fee91ce2ee0f41c138347aa81
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.
- package/LICENSE +18 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +34 -0
- package/dist/index.mjs.map +1 -0
- package/dist/plopfile.d.ts +4 -0
- package/dist/plopfile.d.ts.map +1 -0
- package/dist/plopfile.js +586 -0
- package/dist/plopfile.js.map +1 -0
- package/dist/plopfile.mjs +582 -0
- package/dist/plopfile.mjs.map +1 -0
- package/dist/plops/api.d.ts +4 -0
- package/dist/plops/api.d.ts.map +1 -0
- package/dist/plops/content-type.d.ts +4 -0
- package/dist/plops/content-type.d.ts.map +1 -0
- package/dist/plops/controller.d.ts +4 -0
- package/dist/plops/controller.d.ts.map +1 -0
- package/dist/plops/middleware.d.ts +4 -0
- package/dist/plops/middleware.d.ts.map +1 -0
- package/dist/plops/migration.d.ts +4 -0
- package/dist/plops/migration.d.ts.map +1 -0
- package/dist/plops/policy.d.ts +4 -0
- package/dist/plops/policy.d.ts.map +1 -0
- package/dist/plops/prompts/bootstrap-api-prompts.d.ts +4 -0
- package/dist/plops/prompts/bootstrap-api-prompts.d.ts.map +1 -0
- package/dist/plops/prompts/ct-names-prompts.d.ts +4 -0
- package/dist/plops/prompts/ct-names-prompts.d.ts.map +1 -0
- package/dist/plops/prompts/get-attributes-prompts.d.ts +4 -0
- package/dist/plops/prompts/get-attributes-prompts.d.ts.map +1 -0
- package/dist/plops/prompts/get-destination-prompts.d.ts +6 -0
- package/dist/plops/prompts/get-destination-prompts.d.ts.map +1 -0
- package/dist/plops/prompts/kind-prompts.d.ts +4 -0
- package/dist/plops/prompts/kind-prompts.d.ts.map +1 -0
- package/dist/plops/service.d.ts +4 -0
- package/dist/plops/service.d.ts.map +1 -0
- package/dist/plops/utils/get-file-path.d.ts +3 -0
- package/dist/plops/utils/get-file-path.d.ts.map +1 -0
- package/dist/plops/utils/get-formatted-date.d.ts +3 -0
- package/dist/plops/utils/get-formatted-date.d.ts.map +1 -0
- package/dist/plops/utils/validate-attribute-input.d.ts +3 -0
- package/dist/plops/utils/validate-attribute-input.d.ts.map +1 -0
- package/dist/plops/utils/validate-file-name-input.d.ts +3 -0
- package/dist/plops/utils/validate-file-name-input.d.ts.map +1 -0
- package/dist/plops/utils/validate-input.d.ts +3 -0
- package/dist/plops/utils/validate-input.d.ts.map +1 -0
- package/{lib → dist}/templates/js/content-type.schema.json.hbs +0 -1
- package/{lib → dist}/templates/ts/content-type.schema.json.hbs +0 -1
- package/{lib → dist}/templates/ts/middleware.ts.hbs +2 -2
- package/package.json +29 -9
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -4
- package/lib/files/js/plugin/admin/src/components/Initializer/index.js +0 -26
- package/lib/files/js/plugin/admin/src/components/PluginIcon/index.js +0 -12
- package/lib/files/js/plugin/admin/src/index.js +0 -63
- package/lib/files/js/plugin/admin/src/pages/App/index.js +0 -25
- package/lib/files/js/plugin/admin/src/pages/HomePage/index.js +0 -20
- package/lib/files/js/plugin/admin/src/pluginId.js +0 -5
- package/lib/files/js/plugin/admin/src/translations/en.json +0 -1
- package/lib/files/js/plugin/admin/src/translations/fr.json +0 -1
- package/lib/files/js/plugin/admin/src/utils/getTrad.js +0 -5
- package/lib/files/js/plugin/server/bootstrap.js +0 -5
- package/lib/files/js/plugin/server/config/index.js +0 -6
- package/lib/files/js/plugin/server/content-types/index.js +0 -3
- package/lib/files/js/plugin/server/controllers/index.js +0 -7
- package/lib/files/js/plugin/server/controllers/my-controller.js.hbs +0 -10
- package/lib/files/js/plugin/server/destroy.js +0 -5
- package/lib/files/js/plugin/server/index.js +0 -25
- package/lib/files/js/plugin/server/middlewares/index.js +0 -3
- package/lib/files/js/plugin/server/policies/index.js +0 -3
- package/lib/files/js/plugin/server/register.js +0 -5
- package/lib/files/js/plugin/server/routes/index.js +0 -10
- package/lib/files/js/plugin/server/services/index.js +0 -7
- package/lib/files/js/plugin/server/services/my-service.js +0 -7
- package/lib/files/js/plugin/strapi-admin.js +0 -3
- package/lib/files/js/plugin/strapi-server.js +0 -3
- package/lib/files/ts/plugin/admin/src/components/Initializer/index.tsx +0 -24
- package/lib/files/ts/plugin/admin/src/components/PluginIcon/index.tsx +0 -12
- package/lib/files/ts/plugin/admin/src/index.tsx +0 -67
- package/lib/files/ts/plugin/admin/src/pages/App/index.tsx +0 -25
- package/lib/files/ts/plugin/admin/src/pages/HomePage/index.tsx +0 -19
- package/lib/files/ts/plugin/admin/src/pluginId.ts +0 -5
- package/lib/files/ts/plugin/admin/src/translations/en.json +0 -1
- package/lib/files/ts/plugin/admin/src/translations/fr.json +0 -1
- package/lib/files/ts/plugin/admin/src/utils/getTrad.ts +0 -5
- package/lib/files/ts/plugin/custom.d.ts +0 -5
- package/lib/files/ts/plugin/server/bootstrap.ts +0 -5
- package/lib/files/ts/plugin/server/config/index.ts +0 -4
- package/lib/files/ts/plugin/server/content-types/index.ts +0 -1
- package/lib/files/ts/plugin/server/controllers/index.ts +0 -5
- package/lib/files/ts/plugin/server/controllers/my-controller.ts.hbs +0 -10
- package/lib/files/ts/plugin/server/destroy.ts +0 -5
- package/lib/files/ts/plugin/server/index.ts +0 -23
- package/lib/files/ts/plugin/server/middlewares/index.ts +0 -1
- package/lib/files/ts/plugin/server/policies/index.ts +0 -1
- package/lib/files/ts/plugin/server/register.ts +0 -5
- package/lib/files/ts/plugin/server/routes/index.ts +0 -10
- package/lib/files/ts/plugin/server/services/index.ts +0 -5
- package/lib/files/ts/plugin/server/services/my-service.ts +0 -7
- package/lib/files/ts/plugin/strapi-admin.js +0 -3
- package/lib/files/ts/plugin/strapi-server.js +0 -3
- package/lib/files/ts/plugin/tsconfig.json +0 -20
- package/lib/files/ts/plugin/tsconfig.server.json +0 -25
- package/lib/index.js +0 -37
- package/lib/plopfile.js +0 -28
- package/lib/plops/__tests__/content-type.test.js +0 -179
- package/lib/plops/api.js +0 -82
- package/lib/plops/content-type.js +0 -148
- package/lib/plops/controller.js +0 -36
- package/lib/plops/middleware.js +0 -36
- package/lib/plops/migration.js +0 -33
- package/lib/plops/plugin.js +0 -91
- package/lib/plops/policy.js +0 -36
- package/lib/plops/prompts/bootstrap-api-prompts.js +0 -10
- package/lib/plops/prompts/ct-names-prompts.js +0 -44
- package/lib/plops/prompts/draft-and-publish-prompts.js +0 -10
- package/lib/plops/prompts/get-attributes-prompts.js +0 -105
- package/lib/plops/prompts/get-destination-prompts.js +0 -79
- package/lib/plops/prompts/kind-prompts.js +0 -17
- package/lib/plops/service.js +0 -34
- package/lib/plops/utils/__tests__/get-file-path.test.js +0 -25
- package/lib/plops/utils/get-file-path.js +0 -17
- package/lib/plops/utils/get-formatted-date.js +0 -8
- package/lib/plops/utils/validate-attribute-input.js +0 -11
- package/lib/plops/utils/validate-file-name-input.js +0 -11
- package/lib/plops/utils/validate-input.js +0 -11
- package/lib/templates/js/README.md.hbs +0 -3
- package/lib/templates/js/plugin-package.json.hbs +0 -42
- package/lib/templates/ts/README.md.hbs +0 -3
- package/lib/templates/ts/plugin-package.json.hbs +0 -51
- /package/{lib → dist}/templates/js/collection-type-routes.js.hbs +0 -0
- /package/{lib → dist}/templates/js/controller.js.hbs +0 -0
- /package/{lib → dist}/templates/js/core-controller.js.hbs +0 -0
- /package/{lib → dist}/templates/js/core-router.js.hbs +0 -0
- /package/{lib → dist}/templates/js/core-service.js.hbs +0 -0
- /package/{lib → dist}/templates/js/middleware.js.hbs +0 -0
- /package/{lib → dist}/templates/js/migration.js.hbs +0 -0
- /package/{lib → dist}/templates/js/policy.js.hbs +0 -0
- /package/{lib → dist}/templates/js/service.js.hbs +0 -0
- /package/{lib → dist}/templates/js/single-route.js.hbs +0 -0
- /package/{lib → dist}/templates/js/single-type-routes.js.hbs +0 -0
- /package/{lib → dist}/templates/ts/collection-type-routes.ts.hbs +0 -0
- /package/{lib → dist}/templates/ts/controller.ts.hbs +0 -0
- /package/{lib → dist}/templates/ts/core-controller.ts.hbs +0 -0
- /package/{lib → dist}/templates/ts/core-router.ts.hbs +0 -0
- /package/{lib → dist}/templates/ts/core-service.ts.hbs +0 -0
- /package/{lib → dist}/templates/ts/migration.ts.hbs +0 -0
- /package/{lib → dist}/templates/ts/policy.ts.hbs +0 -0
- /package/{lib → dist}/templates/ts/service.ts.hbs +0 -0
- /package/{lib → dist}/templates/ts/single-route.ts.hbs +0 -0
- /package/{lib → dist}/templates/ts/single-type-routes.ts.hbs +0 -0
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const getFilePath = require('../get-file-path');
|
|
4
|
-
|
|
5
|
-
describe('Get-File-Path util', () => {
|
|
6
|
-
test('with destination set as api', () => {
|
|
7
|
-
const filePath = getFilePath('api');
|
|
8
|
-
expect(filePath).toBe(`api/{{ api }}`);
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
test('with destination set as plugin', () => {
|
|
12
|
-
const filePath = getFilePath('plugin');
|
|
13
|
-
expect(filePath).toBe(`plugins/{{ plugin }}/server`);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
test('with destination set as root', () => {
|
|
17
|
-
const filePath = getFilePath('root');
|
|
18
|
-
expect(filePath).toBe(`./`);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
test('with empty destination string', () => {
|
|
22
|
-
const filePath = getFilePath('');
|
|
23
|
-
expect(filePath).toBe(`api/{{ id }}`);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = (destination) => {
|
|
4
|
-
if (destination === 'api') {
|
|
5
|
-
return `api/{{ api }}`;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
if (destination === 'plugin') {
|
|
9
|
-
return `plugins/{{ plugin }}/server`;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
if (destination === 'root') {
|
|
13
|
-
return './';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return `api/{{ id }}`;
|
|
17
|
-
};
|
|
@@ -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": "^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
|
-
}
|
|
@@ -1,51 +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
|
-
"prop-types": "^15.7.2"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@strapi/typescript-utils": "^4.6.0",
|
|
18
|
-
"@types/react": "^17.0.53",
|
|
19
|
-
"@types/react-dom": "^17.0.18",
|
|
20
|
-
"@types/react-router-dom": "^5.3.3",
|
|
21
|
-
"@types/styled-components": "^5.1.26",
|
|
22
|
-
"react": "^17.0.2",
|
|
23
|
-
"react-dom": "^17.0.2",
|
|
24
|
-
"react-router-dom": "^5.3.4",
|
|
25
|
-
"styled-components": "^5.3.6",
|
|
26
|
-
"typescript": "4.6.3"
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"react": "^17.0.2",
|
|
30
|
-
"react-dom": "^17.0.2",
|
|
31
|
-
"react-router-dom": "^5.3.4",
|
|
32
|
-
"styled-components": "^5.3.6"
|
|
33
|
-
},
|
|
34
|
-
"author": {
|
|
35
|
-
"name": "A Strapi developer"
|
|
36
|
-
},
|
|
37
|
-
"maintainers": [
|
|
38
|
-
{
|
|
39
|
-
"name": "A Strapi developer"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"engines": {
|
|
43
|
-
"node": ">=14.19.1 <=18.x.x",
|
|
44
|
-
"npm": ">=6.0.0"
|
|
45
|
-
},
|
|
46
|
-
"scripts": {
|
|
47
|
-
"develop": "tsc -p tsconfig.server.json -w",
|
|
48
|
-
"build": "tsc -p tsconfig.server.json"
|
|
49
|
-
},
|
|
50
|
-
"license": "MIT"
|
|
51
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|