nodefony 6.5.7 → 6.10.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 +436 -0
- package/README.md +2 -5
- package/autoloader.es6 +7 -2
- package/cli/builder/bundles/users-bundle/Command/usersCommand.js +1 -1
- package/cli/builder/bundles/users-bundle/Entity/sequelize/userEntity.js +5 -1
- package/cli/builder/bundles/users-bundle/Resources/config/webpack/webpack.prod.config.js +3 -3
- package/cli/builder/bundles/users-bundle/Resources/config/webpack.config.js +4 -0
- package/cli/builder/bundles/users-bundle/Resources/graphiql/graphiql.jsx +40 -4
- package/cli/builder/bundles/users-bundle/Resources/scss/users.scss +9 -10
- package/cli/builder/bundles/users-bundle/Resources/swagger/swagger.js +3 -2
- package/cli/builder/bundles/users-bundle/Resources/translations/login.en_en.yml +3 -1
- package/cli/builder/bundles/users-bundle/Resources/translations/login.fr_fr.yml +2 -0
- package/cli/builder/bundles/users-bundle/Resources/views/documentation/base.html.twig +1 -2
- package/cli/builder/bundles/users-bundle/Resources/views/footer.html.twig +2 -4
- package/cli/builder/bundles/users-bundle/Resources/views/graphiql/index.html.twig +4 -9
- package/cli/builder/bundles/users-bundle/Resources/views/header.html.twig +63 -66
- package/cli/builder/bundles/users-bundle/Resources/views/swagger/index.html.twig +4 -12
- package/cli/builder/bundles/users-bundle/controller/api/graphql/graphqlController.js +2 -0
- package/cli/builder/bundles/users-bundle/controller/usersController.js +1 -1
- package/cli/builder/bundles/users-bundle/package.json +29 -29
- package/cli/builder/bundles/users-bundle/src/providers/mongoose/userProvider.js +3 -3
- package/cli/builder/microService/skeletons/config/pm2.config.js +1 -1
- package/cli/builder/microService/skeletons/config/webpack/webpack.config.dev.js +1 -6
- package/cli/builder/microService/skeletons/config/webpack/webpack.config.prod.js +1 -6
- package/cli/builder/microService/skeletons/config/webpack.config.js +40 -34
- package/cli/builder/microService/skeletons/package.json +27 -22
- package/cli/builder/microService/skeletons/src/browser/index.css +1 -1
- package/cli/builder/microService/skeletons/src/browser/index.js +1 -3
- package/cli/builder/microService/skeletons/src/browser/socketio.js +46 -0
- package/cli/builder/microService/skeletons/src/node/examples/index.js +12 -52
- package/cli/builder/microService/skeletons/src/node/index.js +18 -18
- package/cli/builder/microService/skeletons/src/node/services/servers/http.js +9 -1
- package/cli/builder/microService/skeletons/src/node/services/servers/https.js +9 -1
- package/cli/builder/microService/skeletons/src/node/services/socketio/socketio.js +15 -12
- package/cli/builder/microService/skeletons/src/templates/base.html +12 -0
- package/cli/builder/microService/skeletons/src/templates/socket.html +23 -0
- package/cli/builder/project/skeletons/README.md +2 -5
- package/cli/builder/project/skeletons/config/config.js.skeleton +2 -4
- package/cli/builder/project/skeletons/package.json.skeleton +7 -7
- package/cli/builder/sandbox/skeletons/Resources/js/entry.js +2 -2
- package/cli/builder/skeletons/config/nodefony/framework-bundle.js +2 -3
- package/cli/builder/skeletons/config/nodefony/http-bundle.js +5 -3
- package/cli/builder/skeletons/config/nodefony/mongoose-bundle.js +2 -6
- package/cli/builder/skeletons/config/nodefony/redis-bundle.js +16 -11
- package/cli/builder/skeletons/config/webpack/webpack.prod.config.js +1 -11
- package/cli/builder/skeletons/config/webpack.config.js +5 -5
- package/cli/builder/skeletons/package.json +25 -20
- package/cli/builder/vue/skeletons/vue.config.js +4 -4
- package/cli/builder/vue/vueBuilder.js +1 -1
- package/cli/install/install.js +2 -1
- package/cli.es6 +6 -12
- package/error.es6 +2 -1
- package/kernel/api/graphqlApi.es6 +17 -7
- package/kernel/bundle.es6 +1 -1
- package/kernel/cliKernel.es6 +2 -2
- package/kernel/controllers/controller.es6 +4 -0
- package/kernel/kernel.es6 +1 -1
- package/kernel/reader.es6 +1 -0
- package/kernel/security/secureArea.es6 +3 -1
- package/nodefony.es6 +1 -1
- package/package.json +37 -38
- package/cli/builder/bundles/users-bundle/Resources/views/index.html.twig +0 -19
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { render } from "react-dom";
|
|
3
3
|
import GraphiQL from "graphiql";
|
|
4
|
+
//import { createGraphiQLFetcher } from '@graphiql/toolkit';
|
|
4
5
|
import "graphiql/graphiql.min.css";
|
|
5
6
|
import "./index.css";
|
|
6
7
|
const NODE_ENV = process.env.NODE_ENV ;
|
|
@@ -9,7 +10,7 @@ const config = process.env.GRAPHIQL ;
|
|
|
9
10
|
|
|
10
11
|
const URL = config.url;
|
|
11
12
|
|
|
12
|
-
function
|
|
13
|
+
function fetcher(graphQLParams) {
|
|
13
14
|
return fetch(URL, {
|
|
14
15
|
method: 'post',
|
|
15
16
|
headers: {
|
|
@@ -19,12 +20,47 @@ function graphQLFetcher(graphQLParams) {
|
|
|
19
20
|
body: JSON.stringify(graphQLParams),
|
|
20
21
|
credentials: 'same-origin',
|
|
21
22
|
}).then(response => response.json().then((ele)=>{
|
|
22
|
-
|
|
23
|
+
if(ele.error){
|
|
24
|
+
return ele.error;
|
|
25
|
+
}
|
|
23
26
|
return ele.data;
|
|
27
|
+
}).catch(e =>{
|
|
28
|
+
throw e;
|
|
24
29
|
}));
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
const defaultQuery = `
|
|
33
|
+
# Welcome to GraphiQL
|
|
34
|
+
#
|
|
35
|
+
# GraphiQL is an in-browser tool for writing, validating, and
|
|
36
|
+
# testing GraphQL queries.
|
|
37
|
+
#
|
|
38
|
+
# Type queries into this side of the screen, and you will see intelligent
|
|
39
|
+
# typeaheads aware of the current GraphQL type schema and live syntax and
|
|
40
|
+
# validation errors highlighted within the text.
|
|
41
|
+
#
|
|
42
|
+
# GraphQL queries typically start with a "{" character. Lines that start
|
|
43
|
+
# with a # are ignored.
|
|
44
|
+
#
|
|
45
|
+
# An example GraphQL query might look like:
|
|
46
|
+
#
|
|
47
|
+
# {
|
|
48
|
+
# field(arg: "value") {
|
|
49
|
+
# subField
|
|
50
|
+
# }
|
|
51
|
+
# }
|
|
52
|
+
#
|
|
53
|
+
# Keyboard shortcuts:
|
|
54
|
+
#
|
|
55
|
+
# Prettify Query: Shift-Ctrl-P (or press the prettify button above)
|
|
56
|
+
#
|
|
57
|
+
# Merge Query: Shift-Ctrl-M (or press the merge button above)
|
|
58
|
+
#
|
|
59
|
+
# Run Query: Ctrl-Enter (or press the play button above)
|
|
60
|
+
#
|
|
61
|
+
# Auto Complete: Ctrl-Space (or just start typing)
|
|
62
|
+
#
|
|
63
|
+
|
|
28
64
|
{
|
|
29
65
|
user(username: "admin") {
|
|
30
66
|
username
|
|
@@ -55,6 +91,6 @@ const Logo = () => {
|
|
|
55
91
|
GraphiQL.Logo = Logo;
|
|
56
92
|
|
|
57
93
|
render(
|
|
58
|
-
<GraphiQL fetcher={
|
|
94
|
+
<GraphiQL fetcher={fetcher} defaultQuery={defaultQuery} />,
|
|
59
95
|
container
|
|
60
96
|
);
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
@import url(https://fonts.googleapis.com/css?family=Comfortaa);
|
|
2
2
|
@import url(https://fonts.googleapis.com/css?family=Gochi+Hand);
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
text-align: center;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.hello h1 {
|
|
9
|
-
font-family: 'Gochi Hand', cursive;
|
|
10
|
-
color: #0167b8;
|
|
11
|
-
letter-spacing: 0;
|
|
12
|
-
font-size: 4em;
|
|
13
|
-
text-transform: none;
|
|
4
|
+
body{
|
|
14
5
|
}
|
|
15
6
|
|
|
16
7
|
.nodefony{
|
|
@@ -25,6 +16,14 @@
|
|
|
25
16
|
font-size: 4em;
|
|
26
17
|
text-transform: none;
|
|
27
18
|
}
|
|
19
|
+
.nodefony h3 {
|
|
20
|
+
text-align: center;
|
|
21
|
+
font-family: 'Gochi Hand', cursive;
|
|
22
|
+
color: #0167b8;
|
|
23
|
+
letter-spacing: 0;
|
|
24
|
+
font-size: 1.2em;
|
|
25
|
+
text-transform: none;
|
|
26
|
+
}
|
|
28
27
|
|
|
29
28
|
pre {
|
|
30
29
|
display: block;
|
|
@@ -36,14 +36,15 @@ class Swagger {
|
|
|
36
36
|
urls: this.config.urls,
|
|
37
37
|
"urls.primaryName": this.config.primaryName,
|
|
38
38
|
dom_id: '#swagger',
|
|
39
|
-
|
|
39
|
+
validatorUrl:"none",
|
|
40
|
+
defaultModelsExpandDepth: -1,
|
|
40
41
|
deepLinking: true,
|
|
41
42
|
presets: [
|
|
42
43
|
SwaggerUI.presets.apis,
|
|
43
44
|
SwaggerUIStandalonePreset
|
|
44
45
|
],
|
|
45
46
|
plugins: [
|
|
46
|
-
SwaggerUIBundle.plugins.DownloadUrl
|
|
47
|
+
//SwaggerUIBundle.plugins.DownloadUrl
|
|
47
48
|
],
|
|
48
49
|
layout: "StandaloneLayout",
|
|
49
50
|
requestInterceptor: function (request) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
security : Securité
|
|
4
4
|
login : Se Connecter
|
|
5
|
+
signin : Se Connecter
|
|
5
6
|
logout : Se Déconnecter
|
|
6
7
|
submit : Valider
|
|
7
8
|
surname : Nom
|
|
@@ -9,4 +10,5 @@ name : Prénom
|
|
|
9
10
|
username : Utilisateur
|
|
10
11
|
|
|
11
12
|
register : "S'enregistrer"
|
|
13
|
+
signup : "S'enregistrer"
|
|
12
14
|
update : Modifer
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<link rel="icon" type="image/x-icon" href="/app/favicon.ico"/>
|
|
13
13
|
{% endblock %}
|
|
14
14
|
{% block description %}
|
|
15
|
-
<meta name="description" content="Node.js full-stack web framework
|
|
15
|
+
<meta name="description" content="Node.js full-stack web framework">
|
|
16
16
|
{% endblock %}
|
|
17
17
|
<title>
|
|
18
18
|
{% block title %}{{nodefony.name|escape}}{% endblock %}
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
{% endblock %}
|
|
29
29
|
{% block body %}{% endblock %}
|
|
30
30
|
{% block footer %}
|
|
31
|
-
{{ render( controller("documentation:documentation:footer" )) }}
|
|
32
31
|
{% endblock %}
|
|
33
32
|
{% block javascripts %}
|
|
34
33
|
<!-- WEBPACK BUNDLE -->
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
<!-- Footer -->
|
|
2
|
-
<footer class="
|
|
3
|
-
|
|
4
|
-
<div class="text-center py-3">
|
|
2
|
+
<footer class="footer mt-auto py-3 bg-light fixed-bottom">
|
|
3
|
+
<div class="container">
|
|
5
4
|
<a href="https://github.com/nodefony">{{year|escape}} powered by: nodefony@{{nodefony.version}}</a>
|
|
6
5
|
</div>
|
|
7
|
-
<!-- Copyright -->
|
|
8
6
|
</footer>
|
|
9
7
|
<!-- Footer -->
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
{% extends '../base.html.twig' %}
|
|
2
|
-
|
|
1
|
+
{% extends '../documentation/base.html.twig' %}
|
|
3
2
|
|
|
4
3
|
{% block title %}{{title|escape}}{% endblock %}
|
|
5
4
|
|
|
6
5
|
{% block stylesheets %}
|
|
7
6
|
<!-- WEBPACK BUNDLE -->
|
|
8
|
-
<link rel="stylesheet" href="/documentation-bundle/assets/css/documentation.css"/>
|
|
9
7
|
<link rel='stylesheet' href='{{CDN("stylesheet")}}/users-bundle/assets/css/graphiql.css'/>
|
|
8
|
+
{{ parent() }}
|
|
10
9
|
<style>
|
|
11
10
|
body {
|
|
12
11
|
padding: 0;
|
|
@@ -21,14 +20,10 @@
|
|
|
21
20
|
|
|
22
21
|
{% block body %}
|
|
23
22
|
|
|
24
|
-
{% block header %}
|
|
25
|
-
{{ render( controller("users:users:header" )) }}
|
|
26
|
-
{% endblock %}
|
|
27
|
-
|
|
28
23
|
<div class="container-fluid">
|
|
29
24
|
<div class="row flex-xl-nowrap">
|
|
30
25
|
{% include '../documentation/navbar.html.twig' %}
|
|
31
|
-
<main class="col-12 col-md-9 col-xl-
|
|
26
|
+
<main class="col-12 col-md-9 col-xl-10" style="top: 2px;">
|
|
32
27
|
<div id="graphiql"></div>
|
|
33
28
|
</main>
|
|
34
29
|
</div>
|
|
@@ -40,6 +35,6 @@
|
|
|
40
35
|
|
|
41
36
|
<!-- WEBPACK BUNDLE -->
|
|
42
37
|
<script src='{{CDN("javascript")}}/users-bundle/assets/js/graphiql.js'></script>
|
|
43
|
-
|
|
38
|
+
{{ parent() }}
|
|
44
39
|
|
|
45
40
|
{% endblock %}
|
|
@@ -1,29 +1,22 @@
|
|
|
1
1
|
{% set user = getUser() %}
|
|
2
2
|
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<span class="navbar-toggler-icon"></span>
|
|
7
|
-
</button>
|
|
8
|
-
<a class="navbar-brand mr-5" href="/">
|
|
3
|
+
<div class="container-fluid">
|
|
4
|
+
<header class="d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom">
|
|
5
|
+
<a href="/" class="d-flex align-items-center col-md-3 mb-2 mb-md-0 text-dark text-decoration-none">
|
|
9
6
|
<img src="/app/images/app-logo.png" width="30" height="30" class="d-inline-block align-top" alt="">
|
|
10
|
-
<span class="
|
|
7
|
+
<span style="color:#0167b8" class="fs-4 nodefony"><h3>{{nodefony.name|escape}}</h3></span>
|
|
11
8
|
</a>
|
|
12
|
-
<div class="collapse navbar-collapse" id="header_nodefony">
|
|
13
|
-
<ul class="navbar-nav me-auto ">
|
|
14
|
-
{% if urlDoc %}
|
|
15
|
-
<li class="nav-item">
|
|
16
|
-
<form class="form-inline" action="{{urlDoc}}">
|
|
17
|
-
<button class="btn btn-sm btn-outline-secondary" type="submit">Documentation</button>
|
|
18
|
-
</form>
|
|
19
|
-
</li>
|
|
20
|
-
{% endif %}
|
|
21
|
-
</ul>
|
|
22
9
|
|
|
23
|
-
|
|
10
|
+
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
|
|
11
|
+
{% if urlDoc %}
|
|
12
|
+
<li><a href="{{urlDoc}}" class="btn btn-outline-secondary px-2">Documentation</a></li>
|
|
13
|
+
{% endif %}
|
|
14
|
+
</ul>
|
|
15
|
+
|
|
16
|
+
<form action="{{url('lang')}}" name="formLang" id="formLang" class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3">
|
|
17
|
+
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
|
|
24
18
|
<li class="nav-item">
|
|
25
|
-
|
|
26
|
-
<div class="input-group input-group-sm" style="top:5px;margin-right:5px">
|
|
19
|
+
<div class="input-group input-group-sm">
|
|
27
20
|
<label class="input-group-text">{{"lang"| trans("messages") }} : </label>
|
|
28
21
|
<select class="form-select form-select-sm " name="language" id="language">
|
|
29
22
|
{% for opt in langs %}
|
|
@@ -38,56 +31,60 @@
|
|
|
38
31
|
{% endfor %}
|
|
39
32
|
</select>
|
|
40
33
|
</div>
|
|
41
|
-
</form>
|
|
42
34
|
</li>
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
</ul>
|
|
36
|
+
</form>
|
|
37
|
+
|
|
38
|
+
{% if user %}
|
|
39
|
+
<div class="dropdown text-end">
|
|
40
|
+
<a href="#" class="d-block link-dark text-decoration-none dropdown-toggle" id="dropdownUser1" data-bs-toggle="dropdown" aria-expanded="false">
|
|
45
41
|
{% if user.image %}
|
|
46
|
-
<img
|
|
42
|
+
<img src="https://github.com/mdo.png" alt="mdo" width="32" height="32" class="rounded-circle">
|
|
43
|
+
{% else %}
|
|
44
|
+
<i class="text-large fa fa-user"></i>
|
|
47
45
|
{% endif %}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{% else %}
|
|
65
|
-
<img width="100px" height="100px" src="/framework-bundle/images/nodefony-logo.png" alt="nodefony-logo"></img>
|
|
66
|
-
{% endif %}
|
|
67
|
-
<div class="user-info">
|
|
68
|
-
<p>{{"username"|trans("login")}} : {{ user.username|escape }}</p>
|
|
69
|
-
<p>{{"surname"|trans("login")}} : <i> {{ user.surname|escape }} </i> </p>
|
|
70
|
-
<p>{{"name"|trans("login")}} : <i> {{ user.name|escape }} </i> </p>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
<div class="card-footer text-muted">
|
|
74
|
-
<a href ="{{url("logout")}}" class="card-link">{{"logout"|trans("login")}}</a>
|
|
75
|
-
<a href ="{{url("nodefony-user-update",{username:user.username})}}" class="card-link">{{"update"|trans("login")}}</a>
|
|
76
|
-
</div>
|
|
46
|
+
</a>
|
|
47
|
+
<ul class="dropdown-menu text-small border-0" aria-labelledby="dropdownUser1">
|
|
48
|
+
<div class="card " style="width: 18rem;height:100%">
|
|
49
|
+
<div class="card-header">
|
|
50
|
+
<h5 class="card-title">Profile</h5>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="card-body text-center" >
|
|
53
|
+
{% if user.image %}
|
|
54
|
+
<img width="100px" height="100px"src="{{ user.image|escape }}" alt=""></img>
|
|
55
|
+
{% else %}
|
|
56
|
+
<img width="100px" height="100px" src="/framework-bundle/images/nodefony-logo.png" alt="nodefony-logo"></img>
|
|
57
|
+
{% endif %}
|
|
58
|
+
<div class="user-info">
|
|
59
|
+
<p>{{"username"|trans("login")}} : {{ user.username|escape }}</p>
|
|
60
|
+
<p>{{"surname"|trans("login")}} : <i> {{ user.surname|escape }} </i> </p>
|
|
61
|
+
<p>{{"name"|trans("login")}} : <i> {{ user.name|escape }} </i> </p>
|
|
77
62
|
</div>
|
|
78
63
|
</div>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class="btn btn-sm btn-outline-secondary"
|
|
85
|
-
role="button"
|
|
86
|
-
aria-pressed="false">
|
|
87
|
-
{{"login"|trans("login")}}
|
|
88
|
-
</a>
|
|
89
|
-
{% endif %}
|
|
64
|
+
<div class="card-footer text-muted">
|
|
65
|
+
<a href ="{{url("logout")}}" class="card-link">{{"logout"|trans("login")}}</a>
|
|
66
|
+
<a href ="{{url("nodefony-user-update",{username:user.username})}}" class="card-link">{{"update"|trans("login")}}</a>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
90
69
|
</ul>
|
|
91
70
|
</div>
|
|
92
|
-
|
|
93
|
-
|
|
71
|
+
{% else %}
|
|
72
|
+
|
|
73
|
+
<div class=" text-end">
|
|
74
|
+
<a href="{{url("login",{type:"secure"})}}"
|
|
75
|
+
class="btn btn-sm btn-outline-secondary"
|
|
76
|
+
role="button"
|
|
77
|
+
aria-pressed="false">
|
|
78
|
+
{{trans("signin")}}
|
|
79
|
+
</a>
|
|
80
|
+
<a href="{{url("nodefony-user-create")}}"
|
|
81
|
+
class="btn btn-sm btn-outline-primary"
|
|
82
|
+
role="button"
|
|
83
|
+
aria-pressed="false">
|
|
84
|
+
{{trans("signup")}}
|
|
85
|
+
</a>
|
|
86
|
+
|
|
87
|
+
</div>
|
|
88
|
+
{% endif %}
|
|
89
|
+
</header>
|
|
90
|
+
</div>
|
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
{% extends '../base.html.twig' %}
|
|
1
|
+
{% extends '../documentation/base.html.twig' %}
|
|
2
2
|
|
|
3
3
|
{% block title %}{{title|escape}}{% endblock %}
|
|
4
4
|
|
|
5
5
|
{% block stylesheets %}
|
|
6
6
|
<!-- WEBPACK BUNDLE -->
|
|
7
7
|
<link rel='stylesheet' href='{{CDN("stylesheet")}}/users-bundle/assets/css/swagger.css'/>
|
|
8
|
-
|
|
8
|
+
{{ parent() }}
|
|
9
9
|
{% endblock %}
|
|
10
10
|
|
|
11
11
|
{% block body %}
|
|
12
12
|
|
|
13
|
-
{% block header %}
|
|
14
|
-
{{ render( controller("users:users:header" )) }}
|
|
15
|
-
{% endblock %}
|
|
16
|
-
|
|
17
13
|
<div class="container-fluid">
|
|
18
14
|
<div class="row flex-xl-nowrap">
|
|
19
15
|
{% include '../documentation/navbar.html.twig' %}
|
|
20
|
-
<main class="col-12 col-md-9 col-xl-
|
|
16
|
+
<main class="col-12 col-md-9 col-xl-10" style="top:2px">
|
|
21
17
|
<div id="swagger"></div>
|
|
22
18
|
</main>
|
|
23
19
|
</div>
|
|
24
20
|
</div>
|
|
25
21
|
|
|
26
|
-
{% block footer %}
|
|
27
|
-
{{ render( controller("users:users:footer" )) }}
|
|
28
22
|
{% endblock %}
|
|
29
23
|
|
|
30
24
|
{% block javascripts %}
|
|
31
25
|
<!-- WEBPACK BUNDLE -->
|
|
32
26
|
<script src='{{CDN("javascript")}}/users-bundle/assets/js/swagger.js'></script>
|
|
33
|
-
|
|
34
|
-
{% endblock %}
|
|
35
|
-
|
|
27
|
+
{{ parent() }}
|
|
36
28
|
{% endblock %}
|
|
@@ -16,45 +16,45 @@
|
|
|
16
16
|
],
|
|
17
17
|
"repository": {},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@babel/core": "^7.
|
|
20
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
19
|
+
"@babel/core": "^7.16.7",
|
|
20
|
+
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
21
21
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
22
|
-
"@babel/preset-env": "^7.
|
|
23
|
-
"@babel/preset-react": "^7.
|
|
24
|
-
"@popperjs/core": "^2.
|
|
25
|
-
"babel-loader": "^8.2.
|
|
22
|
+
"@babel/preset-env": "^7.16.7",
|
|
23
|
+
"@babel/preset-react": "^7.16.7",
|
|
24
|
+
"@popperjs/core": "^2.11.0",
|
|
25
|
+
"babel-loader": "^8.2.3",
|
|
26
26
|
"babel-register": "^6.26.0",
|
|
27
|
-
"bootstrap": "^5.
|
|
28
|
-
"clean-webpack-plugin": "^4.0.0
|
|
27
|
+
"bootstrap": "^5.1.3",
|
|
28
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
29
29
|
"css-hot-loader": "^1.4.4",
|
|
30
|
-
"css-loader": "^6.
|
|
31
|
-
"expose-loader": "^3.
|
|
30
|
+
"css-loader": "^6.5.1",
|
|
31
|
+
"expose-loader": "^3.1.0",
|
|
32
32
|
"faker": "^5.5.3",
|
|
33
33
|
"font-awesome": "^4.7.0",
|
|
34
|
-
"graphiql": "^1.
|
|
35
|
-
"graphql": "^
|
|
36
|
-
"
|
|
37
|
-
"
|
|
34
|
+
"graphiql": "^1.5.16",
|
|
35
|
+
"graphql": "^16.2.0",
|
|
36
|
+
"graphql-ws": "^5.5.5",
|
|
37
|
+
"html-webpack-plugin": "^5.5.0",
|
|
38
|
+
"imports-loader": "^3.1.1",
|
|
38
39
|
"jquery": "^3.6.0",
|
|
39
|
-
"mini-css-extract-plugin": "^2.
|
|
40
|
-
"mongoose-paginate-v2": "^1.4.
|
|
41
|
-
"node-sass": "^
|
|
42
|
-
"
|
|
43
|
-
"react": "^17.0.
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"style-loader": "^3.2.1",
|
|
40
|
+
"mini-css-extract-plugin": "^2.4.5",
|
|
41
|
+
"mongoose-paginate-v2": "^1.4.2",
|
|
42
|
+
"node-sass": "^7.0.1",
|
|
43
|
+
"react": "^17.0.2",
|
|
44
|
+
"react-dom": "^17.0.2",
|
|
45
|
+
"sass-loader": "^12.4.0",
|
|
46
|
+
"style-loader": "^3.3.1",
|
|
47
47
|
"svg-inline-loader": "^0.8.2",
|
|
48
|
-
"swagger-ui": "^
|
|
49
|
-
"swagger-ui-dist": "^
|
|
50
|
-
"terser-webpack-plugin": "^5.
|
|
51
|
-
"webpack": "^5.
|
|
48
|
+
"swagger-ui": "^4.1.3",
|
|
49
|
+
"swagger-ui-dist": "^4.1.3",
|
|
50
|
+
"terser-webpack-plugin": "^5.3.0",
|
|
51
|
+
"webpack": "^5.65.0",
|
|
52
52
|
"webpack-merge": "^5.8.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@mapbox/node-pre-gyp": "^1.0.
|
|
56
|
-
"node-gyp": "^8.1
|
|
57
|
-
"sequelize-cli": "^6.
|
|
55
|
+
"@mapbox/node-pre-gyp": "^1.0.8",
|
|
56
|
+
"node-gyp": "^8.4.1",
|
|
57
|
+
"sequelize-cli": "^6.3.0"
|
|
58
58
|
},
|
|
59
59
|
"license": "CECILL-B",
|
|
60
60
|
"readmeFilename": "README.md",
|
|
@@ -24,8 +24,8 @@ module.exports = nodefony.registerProvider("userProvider", () => {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
refreshUser(user) {
|
|
28
|
-
|
|
27
|
+
async refreshUser(user) {
|
|
28
|
+
const serialize = await user.populate();
|
|
29
29
|
return new nodefony.User(
|
|
30
30
|
serialize.username,
|
|
31
31
|
serialize.password,
|
|
@@ -46,4 +46,4 @@ module.exports = nodefony.registerProvider("userProvider", () => {
|
|
|
46
46
|
|
|
47
47
|
};
|
|
48
48
|
return Provider;
|
|
49
|
-
});
|
|
49
|
+
});
|
|
@@ -3,7 +3,7 @@ const package = require(path.resolve("package.json"));
|
|
|
3
3
|
const env = process.env.NODE_ENV;
|
|
4
4
|
const logName = `${package.name}.log`;
|
|
5
5
|
|
|
6
|
-
let cpu = require('os').cpus().length;
|
|
6
|
+
let cpu = 2 // require('os').cpus().length;
|
|
7
7
|
let exec_mode = "cluster";
|
|
8
8
|
let watch = false;
|
|
9
9
|
let autorestart =true ;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
2
1
|
|
|
3
2
|
module.exports = {
|
|
4
3
|
mode: 'development',
|
|
5
4
|
devtool: 'source-map',
|
|
6
5
|
plugins: [
|
|
7
|
-
|
|
8
|
-
fallback: "style-loader",
|
|
9
|
-
filename: "./css/[name].css",
|
|
10
|
-
allChunks: true
|
|
11
|
-
})
|
|
6
|
+
|
|
12
7
|
]
|
|
13
8
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const TerserPlugin = require('terser-webpack-plugin');
|
|
2
|
-
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
3
2
|
|
|
4
3
|
module.exports = {
|
|
5
4
|
mode: 'production',
|
|
@@ -19,11 +18,7 @@ module.exports = {
|
|
|
19
18
|
]
|
|
20
19
|
},
|
|
21
20
|
plugins: [
|
|
22
|
-
|
|
23
|
-
fallback: "style-loader",
|
|
24
|
-
filename: "./css/[name].min.css",
|
|
25
|
-
allChunks: true
|
|
26
|
-
})
|
|
21
|
+
|
|
27
22
|
]
|
|
28
23
|
|
|
29
24
|
|