nodefony 7.0.0-beta.2 → 7.0.0-beta.21
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/CHANGELOG.md +534 -8028
- package/README.md +33 -30
- package/autoloader.es6 +46 -48
- package/builder.es6 +66 -76
- package/cli/builder/bundles/bundle.js +57 -63
- package/cli/builder/bundles/controller.js +34 -38
- package/cli/builder/bundles/users-bundle/Command/fixtureTask.js +11 -12
- package/cli/builder/bundles/users-bundle/Command/usersCommand.js +23 -24
- package/cli/builder/bundles/users-bundle/Entity/mongoose/userEntity.js +25 -30
- package/cli/builder/bundles/users-bundle/Entity/sequelize/userEntity.js +42 -31
- package/cli/builder/bundles/users-bundle/Fixtures/users.js +24 -26
- package/cli/builder/bundles/users-bundle/Fixtures/usersFixtures.js +28 -29
- package/cli/builder/bundles/users-bundle/Resources/config/config.js +4 -3
- package/cli/builder/bundles/users-bundle/Resources/config/routing.js +2 -2
- package/cli/builder/bundles/users-bundle/Resources/config/security.js +9 -8
- package/cli/builder/bundles/users-bundle/Resources/config/webpack/webpack.dev.config.js +3 -3
- package/cli/builder/bundles/users-bundle/Resources/config/webpack/webpack.prod.config.js +4 -3
- package/cli/builder/bundles/users-bundle/Resources/config/webpack.config.js +74 -75
- package/cli/builder/bundles/users-bundle/Resources/scss/awesome/font-awesome.config.js +9 -9
- package/cli/builder/bundles/users-bundle/Resources/swagger/openapi/login.js +13 -13
- package/cli/builder/bundles/users-bundle/Resources/swagger/openapi/users.js +14 -14
- package/cli/builder/bundles/users-bundle/controller/api/graphql/graphqlController.js +13 -15
- package/cli/builder/bundles/users-bundle/controller/api/graphql/userResolver.js +29 -29
- package/cli/builder/bundles/users-bundle/controller/api/graphql/usertype.js +2 -2
- package/cli/builder/bundles/users-bundle/controller/api/openapi/loginApiController.js +34 -36
- package/cli/builder/bundles/users-bundle/controller/api/openapi/restUserController.js +32 -36
- package/cli/builder/bundles/users-bundle/controller/loginController.js +30 -34
- package/cli/builder/bundles/users-bundle/controller/usersController.js +54 -60
- package/cli/builder/bundles/users-bundle/package.json +27 -25
- package/cli/builder/bundles/users-bundle/pnpm-lock.yaml +4262 -0
- package/cli/builder/bundles/users-bundle/readme.md +7 -7
- package/cli/builder/bundles/users-bundle/services/usersService.js +97 -102
- package/cli/builder/bundles/users-bundle/src/providers/mongoose/userProvider.js +6 -8
- package/cli/builder/bundles/users-bundle/src/providers/sequelize/userProvider.js +9 -10
- package/cli/builder/bundles/users-bundle/tests/loginTest.js +119 -70
- package/cli/builder/bundles/users-bundle/usersBundle.js +2 -3
- package/cli/builder/microService/microService.js +139 -141
- package/cli/builder/microService/skeletons/package.json +23 -22
- package/cli/builder/project/project.js +228 -181
- package/cli/builder/project/skeletons/README.md +33 -30
- package/cli/builder/project/skeletons/bin/dev-deploy.sh +5 -0
- package/cli/builder/project/skeletons/bin/prod-deploy.sh +3 -0
- package/cli/builder/project/skeletons/config/config.js.skeleton +1 -0
- package/cli/builder/project/skeletons/config/pm2.config.js.skeleton +41 -17
- package/cli/builder/project/skeletons/eslintignore.skeleton +15 -0
- package/cli/builder/project/skeletons/eslintrc.js.skeleton +97 -0
- package/cli/builder/project/skeletons/gitignore.skeleton +1 -0
- package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.37.entity-user.js +137 -0
- package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.38.entity-session.js +97 -0
- package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.39.entity-requests.js +115 -0
- package/cli/builder/project/skeletons/migrations/2022.12.25T17.37.40.entity-jwts.js +97 -0
- package/cli/builder/project/skeletons/migrations/migrations.skeleton.js +0 -2
- package/cli/builder/project/skeletons/package.json.twig +70 -0
- package/cli/builder/react/reactBuilder.js +59 -65
- package/cli/builder/sandbox/sandBoxBuilder.js +132 -134
- package/cli/builder/skeletons/app/appKernel.js +120 -2
- package/cli/builder/skeletons/config/config.js +1 -1
- package/cli/builder/skeletons/config/nodefony/framework-bundle.js +2 -1
- package/cli/builder/skeletons/config/nodefony/http-bundle.js +1 -0
- package/cli/builder/skeletons/config/nodefony/mongoose-bundle.js +38 -12
- package/cli/builder/skeletons/config/nodefony/monitoring-bundle.js +21 -2
- package/cli/builder/skeletons/config/nodefony/sequelize-bundle.js +122 -13
- package/cli/builder/skeletons/package.json.twig +57 -0
- package/cli/builder/skeletons/unittest/testFile.js +44 -45
- package/cli/builder/vue/skeletons/vue.config.js +84 -10
- package/cli/builder/vue/vueBuilder.js +116 -114
- package/cli/generate/generate.es6 +38 -39
- package/cli/install/install.js +45 -58
- package/cli/sequelize/sequelize.js +50 -39
- package/cli/start.js +353 -347
- package/cli/tools/pm2.es6 +55 -57
- package/cli/tools/tools.es6 +36 -37
- package/cli.es6 +280 -228
- package/container.es6 +51 -59
- package/error.es6 +25 -27
- package/fileClass.es6 +53 -55
- package/finder/file.es6 +5 -4
- package/finder/fileResult.es6 +23 -22
- package/finder/finder2.es6 +46 -54
- package/finder.es6 +88 -97
- package/kernel/annotations/annotations.es6 +44 -46
- package/kernel/api/api.es6 +6 -8
- package/kernel/api/graphqlApi.es6 +21 -21
- package/kernel/api/jsonApi.es6 +40 -45
- package/kernel/api/openApi.es6 +9 -11
- package/kernel/api/schemas/openApiSchema.js +61 -32
- package/kernel/babylon.es6 +31 -38
- package/kernel/bundle.es6 +252 -220
- package/kernel/cliKernel.es6 +157 -170
- package/kernel/command.es6 +17 -20
- package/kernel/commands/nodefonyCommand.es6 +111 -58
- package/kernel/commands/tasks/bundlesTask.es6 +14 -19
- package/kernel/controllers/controller.es6 +167 -180
- package/kernel/fixture.es6 +4 -7
- package/kernel/injections/injections.es6 +97 -103
- package/kernel/kernel.es6 +476 -384
- package/kernel/kernelWatcher.es6 +64 -54
- package/kernel/orm/entity.es6 +10 -12
- package/kernel/orm/orm.es6 +68 -48
- package/kernel/reader.es6 +45 -47
- package/kernel/security/encoder.es6 +8 -6
- package/kernel/security/factories/factory.es6 +34 -37
- package/kernel/security/factories/passeportFactory.es6 +13 -14
- package/kernel/security/provider.es6 +11 -13
- package/kernel/security/providers/chainProvider.es6 +13 -28
- package/kernel/security/providers/memoryProvider.es6 +7 -11
- package/kernel/security/providers/providerManager.es6 +11 -14
- package/kernel/security/providers/userEntityProvider.es6 +7 -8
- package/kernel/security/role.es6 +3 -3
- package/kernel/security/secureArea.es6 +143 -149
- package/kernel/security/tokens/token.es6 +30 -32
- package/kernel/security/user.es6 +19 -19
- package/kernel/serviceRealTime.es6 +5 -7
- package/kernel/services/connectionsService.es6 +20 -22
- package/kernel/services/cron/cronService.es6 +14 -16
- package/kernel/task.es6 +20 -26
- package/kernel/templates.es6 +4 -5
- package/kernel/templating/twig.es6 +56 -47
- package/kernel/tests/cliTest.js +7 -11
- package/kernel/tests/containerTest.js +25 -37
- package/kernel/tests/kernelTest.js +9 -16
- package/nodefony.es6 +279 -256
- package/notificationsCenter.es6 +28 -20
- package/package.json +40 -40
- package/protocol.es6 +19 -21
- package/protocols/bayeux.es6 +35 -38
- package/protocols/jsonRpc/jsonrpc.es6 +12 -14
- package/result.es6 +11 -12
- package/service.es6 +62 -62
- package/syslog/pdu.es6 +99 -91
- package/syslog/syslog.es6 +101 -102
- package/watcher.es6 +21 -20
- package/cli/builder/project/skeletons/jshintignore.skeleton +0 -1
- package/cli/builder/project/skeletons/jshintrc.skeleton +0 -60
- package/cli/builder/project/skeletons/package.json.skeleton +0 -52
- package/cli/builder/skeletons/package.json +0 -61
package/cli/tools/pm2.es6
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
module.exports = class pm2Builder extends nodefony.Builder {
|
|
2
|
-
|
|
3
|
-
constructor(cli) {
|
|
2
|
+
constructor (cli) {
|
|
4
3
|
super(cli);
|
|
5
4
|
this.choices = [];
|
|
6
5
|
if (nodefony.isTrunk) {
|
|
7
|
-
this.choices.push(
|
|
8
|
-
this.choices.push(
|
|
9
|
-
this.choices.push(
|
|
10
|
-
this.choices.push(
|
|
11
|
-
this.choices.push(
|
|
12
|
-
this.choices.push(
|
|
13
|
-
this.choices.push(
|
|
14
|
-
this.choices.push(
|
|
15
|
-
this.choices.push(
|
|
16
|
-
this.choices.push(
|
|
6
|
+
this.choices.push("List PM2 Production Projects");
|
|
7
|
+
this.choices.push("Log PM2 Production Project");
|
|
8
|
+
this.choices.push("Stop PM2 Production Project");
|
|
9
|
+
this.choices.push("Restart PM2 Production Project");
|
|
10
|
+
this.choices.push("Delete PM2 Production Project");
|
|
11
|
+
this.choices.push("Save PM2");
|
|
12
|
+
this.choices.push("Startup PM2");
|
|
13
|
+
this.choices.push("Unstartup PM2");
|
|
14
|
+
this.choices.push("Install PM2 Logrotate");
|
|
15
|
+
this.choices.push("Kill PM2 Deamon");
|
|
17
16
|
} else {
|
|
18
|
-
this.choices.push(
|
|
19
|
-
this.choices.push(
|
|
20
|
-
//this.choices.push(`Install PM2 Logrotate`);
|
|
21
|
-
this.choices.push(
|
|
17
|
+
this.choices.push("List PM2 Production Projects");
|
|
18
|
+
this.choices.push("Log PM2 Production Projects");
|
|
19
|
+
// this.choices.push(`Install PM2 Logrotate`);
|
|
20
|
+
this.choices.push("Kill PM2 Deamon");
|
|
22
21
|
}
|
|
23
22
|
this.choices.push(this.cli.getSeparator());
|
|
24
23
|
this.choices.push("Quit");
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
log(pci, severity, msgid, msg) {
|
|
26
|
+
log (pci, severity, msgid, msg) {
|
|
28
27
|
try {
|
|
29
28
|
if (!msgid) {
|
|
30
29
|
msgid = "PM2";
|
|
@@ -35,53 +34,53 @@ module.exports = class pm2Builder extends nodefony.Builder {
|
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
interaction() {
|
|
37
|
+
interaction () {
|
|
39
38
|
return this.cli.prompt([{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
39
|
+
type: "list",
|
|
40
|
+
name: "command",
|
|
41
|
+
message: " Nodefony CLI : ",
|
|
42
|
+
default: 0,
|
|
43
|
+
pageSize: this.choices.length,
|
|
44
|
+
choices: this.choices,
|
|
45
|
+
filter: (val) => {
|
|
46
|
+
switch (val) {
|
|
47
|
+
case "List PM2 Production Projects":
|
|
48
|
+
return "list";
|
|
49
|
+
case "Stop PM2 Production Project":
|
|
50
|
+
return "stop";
|
|
51
|
+
case "Restart PM2 Production Project":
|
|
52
|
+
return "restart";
|
|
53
|
+
case "Delete PM2 Production Project":
|
|
54
|
+
return "delete";
|
|
55
|
+
case "Log PM2 Production Projects":
|
|
56
|
+
case "Log PM2 Production Project":
|
|
57
|
+
return "logs";
|
|
58
|
+
case "Save PM2":
|
|
59
|
+
return "pm2-save";
|
|
60
|
+
case "Startup PM2":
|
|
61
|
+
return "pm2-startup";
|
|
62
|
+
case "Unstartup PM2":
|
|
63
|
+
return "pm2-unstartup";
|
|
64
|
+
case "Install PM2 Logrotate":
|
|
65
|
+
return "pm2-logrotate";
|
|
66
|
+
case "Kill PM2 Deamon":
|
|
67
|
+
return "kill";
|
|
68
|
+
case "Quit":
|
|
69
|
+
return "quit";
|
|
70
|
+
default:
|
|
71
|
+
console.log("\n");
|
|
72
|
+
this.log(`command not found : ${val}`, "ERROR");
|
|
73
|
+
this.cli.terminate(1);
|
|
76
74
|
}
|
|
77
|
-
}
|
|
75
|
+
}
|
|
76
|
+
}])
|
|
78
77
|
.then((response) => {
|
|
79
78
|
this.start(response);
|
|
80
79
|
return response;
|
|
81
80
|
});
|
|
82
81
|
}
|
|
83
82
|
|
|
84
|
-
start(response) {
|
|
83
|
+
start (response) {
|
|
85
84
|
switch (response.command) {
|
|
86
85
|
case "stop":
|
|
87
86
|
return this.cli.setCommand("stop");
|
|
@@ -110,5 +109,4 @@ module.exports = class pm2Builder extends nodefony.Builder {
|
|
|
110
109
|
return this.cli.setCommand("", "-h");
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
|
-
|
|
114
112
|
};
|
package/cli/tools/tools.es6
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
const builderInstall = require(path.resolve(__dirname, "..", "install", "install.js"));
|
|
2
2
|
|
|
3
3
|
module.exports = class toolsBuilder extends nodefony.Builder {
|
|
4
|
-
|
|
5
|
-
constructor(cli) {
|
|
4
|
+
constructor (cli) {
|
|
6
5
|
super(cli);
|
|
7
6
|
this.choices = [];
|
|
8
7
|
if (nodefony.isTrunk) {
|
|
9
8
|
if (nodefony.builded) {
|
|
10
|
-
this.choices.push(
|
|
11
|
-
this.choices.push(
|
|
12
|
-
this.choices.push(
|
|
9
|
+
this.choices.push("Webpack Dump");
|
|
10
|
+
this.choices.push("Outdated Packages");
|
|
11
|
+
this.choices.push("Clear Project");
|
|
13
12
|
} else {
|
|
14
|
-
this.choices.push(
|
|
13
|
+
this.choices.push("Clear Project");
|
|
15
14
|
}
|
|
16
15
|
} else {
|
|
17
|
-
this.choices.push(
|
|
16
|
+
this.choices.push("Clear Project");
|
|
18
17
|
}
|
|
19
18
|
this.choices.push(this.cli.getSeparator());
|
|
20
19
|
this.choices.push("Quit");
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
log(pci, severity, msgid, msg) {
|
|
22
|
+
log (pci, severity, msgid, msg) {
|
|
24
23
|
try {
|
|
25
24
|
if (!msgid) {
|
|
26
25
|
msgid = "TOOLS";
|
|
@@ -31,38 +30,38 @@ module.exports = class toolsBuilder extends nodefony.Builder {
|
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
interaction() {
|
|
33
|
+
interaction () {
|
|
35
34
|
return this.cli.prompt([{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
35
|
+
type: "list",
|
|
36
|
+
name: "command",
|
|
37
|
+
message: " Nodefony CLI : ",
|
|
38
|
+
default: 0,
|
|
39
|
+
pageSize: this.choices.length,
|
|
40
|
+
choices: this.choices,
|
|
41
|
+
filter: (val) => {
|
|
42
|
+
switch (val) {
|
|
43
|
+
case "Clear Project":
|
|
44
|
+
return "clear";
|
|
45
|
+
case "Webpack Dump":
|
|
46
|
+
return "webpack";
|
|
47
|
+
case "Outdated Packages":
|
|
48
|
+
return "outdated";
|
|
49
|
+
case "Quit":
|
|
50
|
+
return "quit";
|
|
51
|
+
default:
|
|
52
|
+
console.log("\n");
|
|
53
|
+
this.log(`command not found : ${val}`, "INFO");
|
|
54
|
+
this.cli.terminate(1);
|
|
57
55
|
}
|
|
58
|
-
}
|
|
56
|
+
}
|
|
57
|
+
}])
|
|
59
58
|
.then((response) => {
|
|
60
59
|
this.start(response);
|
|
61
|
-
return response
|
|
60
|
+
return response;
|
|
62
61
|
});
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
start(response) {
|
|
64
|
+
start (response) {
|
|
66
65
|
switch (response.command) {
|
|
67
66
|
case "clear":
|
|
68
67
|
return this.cleanProject();
|
|
@@ -78,14 +77,15 @@ module.exports = class toolsBuilder extends nodefony.Builder {
|
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
cleanProject(cwd = path.resolve(".")) {
|
|
80
|
+
cleanProject (cwd = path.resolve(".")) {
|
|
82
81
|
try {
|
|
83
|
-
|
|
82
|
+
const installer = new builderInstall(this.cli);
|
|
84
83
|
return installer.clear(cwd)
|
|
85
84
|
.then(() => {
|
|
86
85
|
this.log("Clean Project Complete");
|
|
87
86
|
this.cli.terminate(0);
|
|
88
|
-
})
|
|
87
|
+
})
|
|
88
|
+
.catch((e) => {
|
|
89
89
|
this.log(e, "ERROR");
|
|
90
90
|
throw e;
|
|
91
91
|
});
|
|
@@ -94,5 +94,4 @@ module.exports = class toolsBuilder extends nodefony.Builder {
|
|
|
94
94
|
throw e;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
|
|
98
97
|
};
|