nodefony 7.0.0-beta.8 → 7.0.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.
- package/CHANGELOG.md +375 -8505
- package/README.md +30 -27
- 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 +27 -38
- 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 +13 -6
- 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 -77
- package/cli/builder/bundles/users-bundle/Resources/js/users.js +3 -0
- package/cli/builder/bundles/users-bundle/Resources/scss/awesome/font-awesome.config.js +9 -9
- package/cli/builder/bundles/users-bundle/Resources/scss/custom.scss +6 -4
- 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 +12 -14
- 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 -35
- 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 +29 -27
- package/cli/builder/bundles/users-bundle/readme.md +7 -7
- package/cli/builder/bundles/users-bundle/services/usersService.js +103 -112
- 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 +122 -72
- 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 +30 -27
- 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 +71 -0
- package/cli/builder/react/reactBuilder.js +59 -65
- package/cli/builder/sandbox/sandBoxBuilder.js +134 -136
- package/cli/builder/sandbox/skeletons/bootstrap/custom.scss +5 -3
- package/cli/builder/skeletons/app/appKernel.js +120 -2
- package/cli/builder/skeletons/config/config.js +1 -1
- package/cli/builder/skeletons/config/nodefony/http-bundle.js +1 -0
- package/cli/builder/skeletons/config/nodefony/mongoose-bundle.js +37 -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 +270 -243
- 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 +230 -228
- 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 +670 -397
- package/kernel/kernelWatcher.es6 +64 -54
- package/kernel/orm/entity.es6 +10 -12
- package/kernel/orm/orm.es6 +65 -51
- 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 -152
- 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 +55 -55
- 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 -53
- package/cli/builder/sandbox/skeletons/bootstrap/awesome/font-awesome.config.js +0 -11
- package/cli/builder/skeletons/package.json +0 -61
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const localFramework = kernel.app.settings.locale;
|
|
2
|
-
let Faker = null
|
|
2
|
+
let Faker = null;
|
|
3
3
|
try {
|
|
4
|
-
Faker = require(
|
|
4
|
+
Faker = require("@withshepherd/faker");
|
|
5
5
|
} catch (e) {}
|
|
6
|
-
//const local = localFramework.slice(0, 2);
|
|
7
|
-
//const Faker = require(`faker/locale/${local}`);
|
|
8
|
-
//Faker.locale = local;
|
|
6
|
+
// const local = localFramework.slice(0, 2);
|
|
7
|
+
// const Faker = require(`faker/locale/${local}`);
|
|
8
|
+
// Faker.locale = local;
|
|
9
9
|
|
|
10
|
-
//let uuid = Faker.random.uuid();
|
|
11
|
-
//let ele = `/${uuid.split('-').slice(1, 4).join('\/')}/${uuid}.jpg `;
|
|
10
|
+
// let uuid = Faker.random.uuid();
|
|
11
|
+
// let ele = `/${uuid.split('-').slice(1, 4).join('\/')}/${uuid}.jpg `;
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
const rolesArray = [
|
|
14
|
+
const rolesArray = ["ROLE_USER", "ROLE_ADMIN", "ROLE_TEST", "ROLE_AUDIO", "ROLE_VIDEO"];
|
|
15
15
|
|
|
16
16
|
const defaultFixtures = [{
|
|
17
17
|
username: "anonymous",
|
|
@@ -63,7 +63,7 @@ const defaultFixtures = [{
|
|
|
63
63
|
}];
|
|
64
64
|
|
|
65
65
|
class randomFixture {
|
|
66
|
-
constructor() {
|
|
66
|
+
constructor () {
|
|
67
67
|
this.matrice = {
|
|
68
68
|
username: "",
|
|
69
69
|
name: "",
|
|
@@ -77,8 +77,8 @@ class randomFixture {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
randomUser(nb = 100) {
|
|
81
|
-
|
|
80
|
+
randomUser (nb = 100) {
|
|
81
|
+
const tab = [];
|
|
82
82
|
for (let i = 0; i < nb; i++) {
|
|
83
83
|
let gender = "male";
|
|
84
84
|
let lang = "fr-FR";
|
|
@@ -86,33 +86,31 @@ class randomFixture {
|
|
|
86
86
|
gender = "female";
|
|
87
87
|
lang = "en_EN";
|
|
88
88
|
}
|
|
89
|
-
tab.push(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}));
|
|
89
|
+
tab.push(nodefony.extend({}, this.matrice, {
|
|
90
|
+
username: Faker.internet.userName(),
|
|
91
|
+
name: Faker.name.lastName(),
|
|
92
|
+
surname: Faker.name.firstName(),
|
|
93
|
+
email: Faker.internet.email(),
|
|
94
|
+
gender,
|
|
95
|
+
lang: Faker.random.locale(),
|
|
96
|
+
image: Faker.image.avatar(),
|
|
97
|
+
url: Faker.internet.url(),
|
|
98
|
+
roles: [Faker.random.arrayElement(rolesArray)]
|
|
99
|
+
}));
|
|
101
100
|
}
|
|
102
101
|
return tab;
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
faker(option) {
|
|
104
|
+
faker (option) {
|
|
106
105
|
return Faker.fake(option);
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
randomFloat(modulo = 0, min = 0, max = 100) {
|
|
108
|
+
randomFloat (modulo = 0, min = 0, max = 100) {
|
|
110
109
|
if (modulo % 2) {
|
|
111
110
|
return -(Math.random() * (max - min) + min).toFixed(2);
|
|
112
111
|
}
|
|
113
112
|
return (Math.random() * (max - min) + min).toFixed(2);
|
|
114
113
|
}
|
|
115
|
-
|
|
116
114
|
}
|
|
117
115
|
|
|
118
116
|
module.exports.default = defaultFixtures;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
const users = require("./users.js");
|
|
2
2
|
|
|
3
3
|
class usersFixture extends nodefony.Fixture {
|
|
4
|
-
|
|
5
|
-
constructor(container) {
|
|
4
|
+
constructor (container) {
|
|
6
5
|
super("users", container);
|
|
7
6
|
this.usersService = this.get("users");
|
|
8
7
|
this.entity = this.orm.getEntity("user");
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
async initialize(random = 0) {
|
|
10
|
+
async initialize (random = 0) {
|
|
12
11
|
switch (this.ormName) {
|
|
13
|
-
case
|
|
12
|
+
case "sequelize":
|
|
14
13
|
if (random) {
|
|
15
14
|
return await this.randomSequelize(random);
|
|
16
15
|
}
|
|
@@ -23,12 +22,12 @@ class usersFixture extends nodefony.Fixture {
|
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
async randomSequelize(nb) {
|
|
25
|
+
async randomSequelize (nb) {
|
|
27
26
|
try {
|
|
28
|
-
|
|
27
|
+
const tab = [];
|
|
29
28
|
const random = new users.random();
|
|
30
|
-
|
|
31
|
-
for await (
|
|
29
|
+
const fixs = random.randomUser(nb);
|
|
30
|
+
for await (const user of fixs) {
|
|
32
31
|
tab.push(await this.loadSequelizeFixtures(user));
|
|
33
32
|
}
|
|
34
33
|
return tab;
|
|
@@ -37,10 +36,10 @@ class usersFixture extends nodefony.Fixture {
|
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
async runSequelize() {
|
|
39
|
+
async runSequelize () {
|
|
41
40
|
try {
|
|
42
|
-
|
|
43
|
-
for await (
|
|
41
|
+
const tab = [];
|
|
42
|
+
for await (const user of users.default) {
|
|
44
43
|
tab.push(await this.loadSequelizeFixtures(user));
|
|
45
44
|
}
|
|
46
45
|
return tab;
|
|
@@ -49,29 +48,29 @@ class usersFixture extends nodefony.Fixture {
|
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
loadSequelizeFixtures(obj) {
|
|
51
|
+
loadSequelizeFixtures (obj) {
|
|
53
52
|
return this.entity.findOrCreate({
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
where: {
|
|
54
|
+
username: obj.username
|
|
55
|
+
},
|
|
56
|
+
defaults: obj
|
|
57
|
+
})
|
|
59
58
|
.then((res) => {
|
|
60
59
|
if (res[1]) {
|
|
61
|
-
this.log(
|
|
60
|
+
this.log(`ADD USER : ${res[0].username}`, "INFO");
|
|
62
61
|
} else {
|
|
63
|
-
this.log(
|
|
62
|
+
this.log(`ALREADY EXIST USER : ${res[0].username}`, "INFO");
|
|
64
63
|
}
|
|
65
64
|
return res[1];
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
async randomMongoose(nb) {
|
|
68
|
+
async randomMongoose (nb) {
|
|
70
69
|
try {
|
|
71
|
-
|
|
70
|
+
const tab = [];
|
|
72
71
|
const random = new users.random();
|
|
73
|
-
|
|
74
|
-
for await (
|
|
72
|
+
const fixs = random.randomUser(nb);
|
|
73
|
+
for await (const user of fixs) {
|
|
75
74
|
tab.push(await this.loadMongooseFixtures(user));
|
|
76
75
|
}
|
|
77
76
|
return tab;
|
|
@@ -80,10 +79,10 @@ class usersFixture extends nodefony.Fixture {
|
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
async runMongoose() {
|
|
82
|
+
async runMongoose () {
|
|
84
83
|
try {
|
|
85
|
-
|
|
86
|
-
for await (
|
|
84
|
+
const tab = [];
|
|
85
|
+
for await (const user of users.default) {
|
|
87
86
|
tab.push(await this.loadMongooseFixtures(user));
|
|
88
87
|
}
|
|
89
88
|
return tab;
|
|
@@ -92,17 +91,17 @@ class usersFixture extends nodefony.Fixture {
|
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
|
|
95
|
-
loadMongooseFixtures(obj) {
|
|
94
|
+
loadMongooseFixtures (obj) {
|
|
96
95
|
return new Promise(async (resolve, reject) => {
|
|
97
96
|
try {
|
|
98
97
|
let document = await this.entity.findOne({
|
|
99
98
|
username: obj.username
|
|
100
99
|
});
|
|
101
100
|
if (document) {
|
|
102
|
-
this.log(
|
|
101
|
+
this.log(`ALREADY EXIST USER : ${obj.username}`, "INFO");
|
|
103
102
|
} else {
|
|
104
103
|
document = await new this.entity(obj).save();
|
|
105
|
-
this.log(
|
|
104
|
+
this.log(`ADD DOCUMENT USER : ${obj.username}`, "INFO");
|
|
106
105
|
}
|
|
107
106
|
return resolve(document);
|
|
108
107
|
} catch (e) {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* GENERATE BY nodefony-starter BUILDER
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
//const crypto = require('crypto');
|
|
16
|
-
const path = require(
|
|
17
|
-
const readFile = function (Path) {
|
|
15
|
+
// const crypto = require('crypto');
|
|
16
|
+
const path = require("path");
|
|
17
|
+
const readFile = function readFile (Path) {
|
|
18
18
|
try {
|
|
19
19
|
return fs.readFileSync(Path, {
|
|
20
20
|
encoding: "utf8"
|
|
@@ -24,14 +24,18 @@ const readFile = function (Path) {
|
|
|
24
24
|
throw e;
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
const randomSecret = function () {
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const randomSecret = function randomSecret () {
|
|
28
|
+
if( path && path.resolve){
|
|
29
|
+
const sercretPath = path.resolve(kernel.path,"config", "certificates", "ca", "private", "ca.key.pem");
|
|
30
|
+
return readFile(sercretPath);
|
|
31
|
+
}
|
|
32
|
+
return null
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
module.exports = {
|
|
33
36
|
type: "sandbox",
|
|
34
37
|
locale: "en_en",
|
|
38
|
+
|
|
35
39
|
/**
|
|
36
40
|
* WATCHERS
|
|
37
41
|
*
|
|
@@ -72,6 +76,9 @@ module.exports = {
|
|
|
72
76
|
maxAge: 200
|
|
73
77
|
}
|
|
74
78
|
},
|
|
79
|
+
webAuthn:{
|
|
80
|
+
enabled : true
|
|
81
|
+
},
|
|
75
82
|
jwt: {
|
|
76
83
|
token: {
|
|
77
84
|
expiresIn: 900 // seconds
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* ===============================================================================
|
|
4
4
|
* ROUTING BUNDLE users-bundle
|
|
5
5
|
*
|
|
6
|
-
* Copyright © /2019 |
|
|
6
|
+
* Copyright © /2019 |
|
|
7
7
|
*
|
|
8
8
|
* ===============================================================================
|
|
9
9
|
*
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
**/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
module.exports = {};
|
|
17
17
|
|
|
@@ -13,6 +13,7 @@ const cors = {
|
|
|
13
13
|
|
|
14
14
|
module.exports = {
|
|
15
15
|
security: {
|
|
16
|
+
|
|
16
17
|
/**
|
|
17
18
|
* FIREWALL PROVIDER
|
|
18
19
|
*/
|
|
@@ -44,7 +45,7 @@ module.exports = {
|
|
|
44
45
|
firewalls: {
|
|
45
46
|
// SECURITY AREA <passport-local>
|
|
46
47
|
nodefony_area: {
|
|
47
|
-
pattern: /^\/secure
|
|
48
|
+
pattern: /^\/secure/u,
|
|
48
49
|
provider: "nodefony",
|
|
49
50
|
form_login: {
|
|
50
51
|
login_path: "/login/secure",
|
|
@@ -52,8 +53,8 @@ module.exports = {
|
|
|
52
53
|
default_target_path: "/users"
|
|
53
54
|
},
|
|
54
55
|
"passport-local": {
|
|
55
|
-
usernameField:
|
|
56
|
-
passwordField:
|
|
56
|
+
usernameField: "username",
|
|
57
|
+
passwordField: "passwd"
|
|
57
58
|
},
|
|
58
59
|
logout: "/logout",
|
|
59
60
|
context: null,
|
|
@@ -61,11 +62,11 @@ module.exports = {
|
|
|
61
62
|
},
|
|
62
63
|
// SECURITY AREA LOGIN API <passport-local>
|
|
63
64
|
login_api_area: {
|
|
64
|
-
pattern: /^\/api\/jwt\/login
|
|
65
|
+
pattern: /^\/api\/jwt\/login/u,
|
|
65
66
|
provider: "nodefony",
|
|
66
67
|
"passport-local": {
|
|
67
|
-
usernameField:
|
|
68
|
-
passwordField:
|
|
68
|
+
usernameField: "username",
|
|
69
|
+
passwordField: "passwd"
|
|
69
70
|
},
|
|
70
71
|
stateless: false,
|
|
71
72
|
redirectHttps: true,
|
|
@@ -73,12 +74,12 @@ module.exports = {
|
|
|
73
74
|
},
|
|
74
75
|
// SECURITY AREA API <passport-jwt>
|
|
75
76
|
api_area: {
|
|
76
|
-
pattern: /^\/api
|
|
77
|
+
pattern: /^\/api/u,
|
|
77
78
|
redirectHttps: true,
|
|
78
79
|
stateless: true,
|
|
79
80
|
"passport-jwt": {
|
|
80
81
|
algorithms: "RS256",
|
|
81
|
-
//secretOrKey:"Les sanglots longs Des violons De l’automne Blessent mon cœur D’une langueur Monotone."
|
|
82
|
+
// secretOrKey:"Les sanglots longs Des violons De l’automne Blessent mon cœur D’une langueur Monotone."
|
|
82
83
|
certificats: {
|
|
83
84
|
private: path.resolve("config", "certificates", "ca", "private", "ca.key.pem"),
|
|
84
85
|
public: path.resolve("config", "certificates", "ca", "public", "public.key.pem")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
mode: "development",
|
|
@@ -7,7 +7,7 @@ module.exports = {
|
|
|
7
7
|
new CleanWebpackPlugin({
|
|
8
8
|
verbose: kernel.debug
|
|
9
9
|
})
|
|
10
|
-
//new webpack.NamedModulesPlugin(),
|
|
11
|
-
//new webpack.HotModuleReplacementPlugin()
|
|
10
|
+
// new webpack.NamedModulesPlugin(),
|
|
11
|
+
// new webpack.HotModuleReplacementPlugin()
|
|
12
12
|
]
|
|
13
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// WEBPACK PROD CONFIGURATION
|
|
2
|
-
//const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
|
3
|
-
const TerserPlugin = require(
|
|
2
|
+
// const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
|
3
|
+
const TerserPlugin = require("terser-webpack-plugin");
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
6
|
mode: "production",
|
|
@@ -18,7 +18,8 @@ module.exports = {
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
plugins: [
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
/* new OptimizeCssAssetsPlugin({
|
|
22
23
|
cssProcessorOptions: {
|
|
23
24
|
discardComments: {
|
|
24
25
|
removeAll: true
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
|
-
const webpack = require(
|
|
2
|
+
const webpack = require("webpack");
|
|
3
3
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
4
4
|
const {
|
|
5
5
|
merge
|
|
6
|
-
} = require(
|
|
6
|
+
} = require("webpack-merge");
|
|
7
7
|
|
|
8
8
|
// Default context <bundle base directory>
|
|
9
|
-
//const context = path.resolve(__dirname, "..", "public");
|
|
9
|
+
// const context = path.resolve(__dirname, "..", "public");
|
|
10
10
|
const public = path.resolve(__dirname, "..", "public", "assets");
|
|
11
11
|
const package = require(path.resolve("package.json"));
|
|
12
12
|
|
|
@@ -15,25 +15,23 @@ const bundleName = package.name;
|
|
|
15
15
|
const publicPath = `/${bundleName}-bundle/assets/`;
|
|
16
16
|
|
|
17
17
|
let config = null;
|
|
18
|
-
let dev = true;
|
|
19
18
|
const debug = kernel.debug ? "*" : false;
|
|
20
19
|
if (kernel.environment === "dev") {
|
|
21
20
|
config = require("./webpack/webpack.dev.config.js");
|
|
22
21
|
} else {
|
|
23
22
|
config = require("./webpack/webpack.prod.config.js");
|
|
24
|
-
dev = false;
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
|
|
28
26
|
module.exports = merge(config, {
|
|
29
|
-
//context: context,
|
|
27
|
+
// context: context,
|
|
30
28
|
target: "web",
|
|
31
29
|
entry: {
|
|
32
30
|
users: ["./Resources/js/users.js"]
|
|
33
31
|
},
|
|
34
32
|
output: {
|
|
35
33
|
path: public,
|
|
36
|
-
publicPath
|
|
34
|
+
publicPath,
|
|
37
35
|
filename: "./js/[name].js",
|
|
38
36
|
hashFunction: "xxhash64",
|
|
39
37
|
library: "[name]",
|
|
@@ -41,101 +39,100 @@ module.exports = merge(config, {
|
|
|
41
39
|
},
|
|
42
40
|
externals: {},
|
|
43
41
|
resolve: {
|
|
44
|
-
extensions: [
|
|
42
|
+
extensions: [".js", ".json", ".jsx", ".css", ".mjs"],
|
|
45
43
|
alias: {
|
|
46
44
|
"@modules": path.join(__dirname, "..", "..", "node_modules")
|
|
47
45
|
},
|
|
48
46
|
fallback: {
|
|
49
47
|
"path": false,
|
|
50
48
|
"assert": false,
|
|
51
|
-
buffer: require.resolve(
|
|
49
|
+
buffer: require.resolve("buffer/")
|
|
52
50
|
}
|
|
53
51
|
},
|
|
54
52
|
module: {
|
|
55
53
|
rules: [{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
// BABEL TRANSCODE
|
|
55
|
+
test: /\.(jsx|mjs|js|es6)$/,
|
|
56
|
+
exclude: new RegExp("node_modules"),
|
|
57
|
+
use: [{
|
|
58
|
+
loader: "babel-loader",
|
|
59
|
+
options: {
|
|
60
|
+
// presets: ['@babel/preset-env', '@babel/preset-react']
|
|
61
|
+
presets: [
|
|
62
|
+
["@babel/preset-env", {
|
|
63
|
+
modules: false
|
|
64
|
+
}],
|
|
65
|
+
"@babel/preset-react"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
}]
|
|
69
|
+
}, {
|
|
70
|
+
type: "javascript/auto",
|
|
71
|
+
test: /\.mjs$/,
|
|
72
|
+
use: [],
|
|
73
|
+
include: /node_modules/
|
|
74
|
+
}, {
|
|
75
|
+
test: require.resolve("jquery"),
|
|
76
|
+
rules: [{
|
|
77
|
+
loader: "expose-loader",
|
|
78
|
+
options: {
|
|
79
|
+
// expose: ['$', 'jQuery'],
|
|
80
|
+
exposes: [{
|
|
81
|
+
globalName: "$",
|
|
82
|
+
override: true
|
|
83
|
+
}, {
|
|
84
|
+
globalName: "jQuery",
|
|
85
|
+
override: true
|
|
86
|
+
}]
|
|
87
|
+
}
|
|
88
|
+
}]
|
|
89
|
+
}, {
|
|
90
|
+
test: /\.(sa|sc|c)ss$/,
|
|
91
|
+
use: [
|
|
92
|
+
// 'css-hot-loader',
|
|
93
|
+
MiniCssExtractPlugin.loader,
|
|
94
|
+
{
|
|
95
|
+
loader: "css-loader",
|
|
61
96
|
options: {
|
|
62
|
-
|
|
63
|
-
presets: [
|
|
64
|
-
['@babel/preset-env', {
|
|
65
|
-
modules: false
|
|
66
|
-
}],
|
|
67
|
-
'@babel/preset-react',
|
|
68
|
-
],
|
|
97
|
+
sourceMap: true
|
|
69
98
|
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
type: 'javascript/auto',
|
|
73
|
-
test: /\.mjs$/,
|
|
74
|
-
use: [],
|
|
75
|
-
include: /node_modules/,
|
|
76
|
-
}, {
|
|
77
|
-
test: require.resolve('jquery'),
|
|
78
|
-
rules: [{
|
|
79
|
-
loader: 'expose-loader',
|
|
99
|
+
}, {
|
|
100
|
+
loader: "sass-loader",
|
|
80
101
|
options: {
|
|
81
|
-
|
|
82
|
-
exposes: [{
|
|
83
|
-
globalName: '$',
|
|
84
|
-
override: true,
|
|
85
|
-
}, {
|
|
86
|
-
globalName: 'jQuery',
|
|
87
|
-
override: true,
|
|
88
|
-
}]
|
|
89
|
-
}
|
|
90
|
-
}]
|
|
91
|
-
}, {
|
|
92
|
-
test: /\.(sa|sc|c)ss$/,
|
|
93
|
-
use: [
|
|
94
|
-
//'css-hot-loader',
|
|
95
|
-
MiniCssExtractPlugin.loader,
|
|
96
|
-
{
|
|
97
|
-
loader: "css-loader",
|
|
98
|
-
options: {
|
|
99
|
-
sourceMap: true
|
|
100
|
-
}
|
|
101
|
-
}, {
|
|
102
|
-
loader: "sass-loader",
|
|
103
|
-
options: {
|
|
104
|
-
sourceMap: true
|
|
105
|
-
}
|
|
102
|
+
sourceMap: true
|
|
106
103
|
}
|
|
107
|
-
]
|
|
108
|
-
}, {
|
|
109
|
-
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
|
110
|
-
type: 'asset/inline'
|
|
111
|
-
}, {
|
|
112
|
-
test: /\.svg$/,
|
|
113
|
-
use: [{
|
|
114
|
-
loader: 'svg-inline-loader'
|
|
115
|
-
}],
|
|
116
|
-
}, {
|
|
117
|
-
// IMAGES
|
|
118
|
-
test: /\.(gif|png|jpe?g|svg)$/i,
|
|
119
|
-
type: 'asset/resource',
|
|
120
|
-
generator: {
|
|
121
|
-
filename: "images/[name][ext][query]",
|
|
122
104
|
}
|
|
105
|
+
]
|
|
106
|
+
}, {
|
|
107
|
+
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
|
108
|
+
type: "asset/inline"
|
|
109
|
+
}, {
|
|
110
|
+
test: /\.svg$/,
|
|
111
|
+
use: [{
|
|
112
|
+
loader: "svg-inline-loader"
|
|
113
|
+
}]
|
|
114
|
+
}, {
|
|
115
|
+
// IMAGES
|
|
116
|
+
test: /\.(gif|png|jpe?g|svg)$/i,
|
|
117
|
+
type: "asset/resource",
|
|
118
|
+
generator: {
|
|
119
|
+
filename: "images/[name][ext][query]"
|
|
123
120
|
}
|
|
124
|
-
]
|
|
121
|
+
}]
|
|
125
122
|
},
|
|
126
123
|
plugins: [
|
|
127
124
|
new webpack.ProvidePlugin({
|
|
128
|
-
Buffer: [
|
|
125
|
+
Buffer: ["buffer", "Buffer"]
|
|
129
126
|
}),
|
|
130
127
|
new MiniCssExtractPlugin({
|
|
131
128
|
filename: "./css/[name].css"
|
|
132
129
|
}),
|
|
133
130
|
new webpack.DefinePlugin({
|
|
134
|
-
|
|
135
|
-
platform
|
|
131
|
+
"process": {
|
|
132
|
+
platform: `'${process.platform}'`
|
|
136
133
|
},
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
"process.env": {
|
|
135
|
+
"NODE_ENV": JSON.stringify(process.env.NODE_ENV),
|
|
139
136
|
"NODE_DEBUG": JSON.stringify(debug),
|
|
140
137
|
"GRAPHIQL": JSON.stringify(bundleConfig.graphiql),
|
|
141
138
|
"SWAGGER": JSON.stringify(bundleConfig.swagger)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
module.exports = {
|
|
2
|
+
styles: {
|
|
3
|
+
"mixins": true,
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
"core": true,
|
|
6
|
+
"icons": true,
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
"larger": true,
|
|
9
|
+
"path": true
|
|
10
|
+
}
|
|
11
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
@import "~bootstrap/scss/bootstrap";
|
|
2
2
|
|
|
3
|
-
$fa-font-path:
|
|
4
|
-
@import
|
|
5
|
-
|
|
3
|
+
$fa-font-path: '~@fortawesome/fontawesome-free/webfonts';
|
|
4
|
+
@import "~@fortawesome/fontawesome-free/scss/fontawesome";
|
|
5
|
+
@import "~@fortawesome/fontawesome-free/scss/regular";
|
|
6
|
+
@import "~@fortawesome/fontawesome-free/scss/solid";
|
|
7
|
+
@import "~@fortawesome/fontawesome-free/scss/brands";
|
|
6
8
|
|
|
7
9
|
@import "./users.scss";
|
|
8
10
|
|
|
@@ -18,4 +20,4 @@ $fa-font-path: "~font-awesome/fonts";
|
|
|
18
20
|
@import "node_modules/bootstrap/scss/type";
|
|
19
21
|
@import "node_modules/bootstrap/scss/images";
|
|
20
22
|
@import "node_modules/bootstrap/scss/code";
|
|
21
|
-
@import "node_modules/bootstrap/scss/grid";*/
|
|
23
|
+
@import "node_modules/bootstrap/scss/grid";*/
|