underpost 2.8.86 → 2.8.88
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/.env.development +39 -2
- package/.env.production +42 -2
- package/.env.test +39 -2
- package/.github/workflows/ghpkg.ci.yml +1 -1
- package/.github/workflows/npmpkg.ci.yml +1 -1
- package/.github/workflows/pwa-microservices-template-page.cd.yml +6 -5
- package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
- package/.github/workflows/release.cd.yml +3 -3
- package/README.md +76 -2
- package/bin/build.js +5 -0
- package/bin/deploy.js +93 -27
- package/bin/file.js +8 -4
- package/bin/util.js +1 -56
- package/cli.md +16 -5
- package/conf.js +33 -7
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +174 -0
- package/manifests/deployment/dd-test-development/proxy.yaml +51 -0
- package/manifests/deployment/mongo-express/deployment.yaml +12 -12
- package/manifests/maas/nvim.sh +91 -0
- package/package.json +8 -15
- package/src/api/core/core.router.js +2 -1
- package/src/api/default/default.controller.js +6 -1
- package/src/api/default/default.router.js +6 -2
- package/src/api/default/default.service.js +10 -1
- package/src/api/document/document.controller.js +66 -0
- package/src/api/document/document.model.js +51 -0
- package/src/api/document/document.router.js +24 -0
- package/src/api/document/document.service.js +125 -0
- package/src/api/file/file.controller.js +15 -1
- package/src/api/file/file.router.js +2 -1
- package/src/api/file/file.service.js +28 -8
- package/src/api/test/test.router.js +1 -1
- package/src/api/user/postman_collection.json +216 -0
- package/src/api/user/user.controller.js +25 -60
- package/src/api/user/user.model.js +29 -7
- package/src/api/user/user.router.js +40 -8
- package/src/api/user/user.service.js +86 -35
- package/src/cli/baremetal.js +33 -3
- package/src/cli/cloud-init.js +11 -0
- package/src/cli/cluster.js +4 -23
- package/src/cli/cron.js +0 -1
- package/src/cli/db.js +0 -19
- package/src/cli/deploy.js +67 -52
- package/src/cli/fs.js +1 -0
- package/src/cli/index.js +9 -1
- package/src/cli/lxd.js +7 -0
- package/src/cli/repository.js +44 -6
- package/src/cli/run.js +56 -9
- package/src/cli/ssh.js +20 -6
- package/src/client/Default.index.js +42 -1
- package/src/client/components/core/Account.js +10 -2
- package/src/client/components/core/AgGrid.js +30 -8
- package/src/client/components/core/Auth.js +99 -56
- package/src/client/components/core/BtnIcon.js +3 -2
- package/src/client/components/core/CalendarCore.js +2 -3
- package/src/client/components/core/CommonJs.js +1 -2
- package/src/client/components/core/Content.js +15 -12
- package/src/client/components/core/Css.js +2 -1
- package/src/client/components/core/CssCore.js +18 -1
- package/src/client/components/core/Docs.js +5 -5
- package/src/client/components/core/FileExplorer.js +3 -3
- package/src/client/components/core/FullScreen.js +19 -28
- package/src/client/components/core/Input.js +22 -16
- package/src/client/components/core/JoyStick.js +2 -2
- package/src/client/components/core/LoadingAnimation.js +2 -2
- package/src/client/components/core/LogIn.js +16 -23
- package/src/client/components/core/LogOut.js +5 -1
- package/src/client/components/core/Logger.js +4 -1
- package/src/client/components/core/Modal.js +102 -87
- package/src/client/components/core/ObjectLayerEngine.js +229 -4
- package/src/client/components/core/ObjectLayerEngineModal.js +442 -0
- package/src/client/components/core/Pagination.js +207 -0
- package/src/client/components/core/Panel.js +10 -10
- package/src/client/components/core/PanelForm.js +130 -33
- package/src/client/components/core/Recover.js +2 -2
- package/src/client/components/core/Router.js +210 -34
- package/src/client/components/core/SignUp.js +1 -2
- package/src/client/components/core/Stream.js +1 -1
- package/src/client/components/core/ToggleSwitch.js +15 -1
- package/src/client/components/core/VanillaJs.js +3 -84
- package/src/client/components/core/Worker.js +2 -2
- package/src/client/components/default/LogInDefault.js +0 -6
- package/src/client/components/default/LogOutDefault.js +0 -16
- package/src/client/components/default/MenuDefault.js +97 -44
- package/src/client/components/default/RoutesDefault.js +5 -2
- package/src/client/public/default/assets/mailer/api-user-default-avatar.png +0 -0
- package/src/client/services/core/core.service.js +8 -20
- package/src/client/services/default/default.management.js +115 -18
- package/src/client/services/default/default.service.js +13 -4
- package/src/client/services/document/document.service.js +97 -0
- package/src/client/services/file/file.service.js +2 -0
- package/src/client/services/test/test.service.js +3 -0
- package/src/client/services/user/user.management.js +6 -0
- package/src/client/services/user/user.service.js +15 -4
- package/src/client/ssr/Render.js +1 -1
- package/src/client/ssr/head/DefaultScripts.js +3 -0
- package/src/client/ssr/head/Seo.js +1 -0
- package/src/index.js +24 -2
- package/src/runtime/lampp/Lampp.js +89 -2
- package/src/runtime/xampp/Xampp.js +48 -1
- package/src/server/auth.js +519 -155
- package/src/server/backup.js +2 -2
- package/src/server/client-build-docs.js +1 -1
- package/src/server/client-build.js +4 -12
- package/src/server/client-icons.js +6 -78
- package/src/server/conf.js +144 -141
- package/src/server/process.js +2 -1
- package/src/server/proxy.js +1 -1
- package/src/server/runtime.js +136 -288
- package/src/server/ssl.js +1 -2
- package/src/server/ssr.js +85 -0
- package/src/server/start.js +4 -4
- package/src/server/valkey.js +2 -1
- package/test/api.test.js +3 -2
- package/bin/cyberia0.js +0 -78
package/cli.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v2.8.
|
|
1
|
+
## underpost ci/cd cli v2.8.88
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -47,11 +47,13 @@ Commands:
|
|
|
47
47
|
Initializes a new Underpost project with a predefined structure.
|
|
48
48
|
|
|
49
49
|
Arguments:
|
|
50
|
-
app-name
|
|
50
|
+
app-name The name or deploy-id of the application to create.
|
|
51
51
|
|
|
52
52
|
Options:
|
|
53
|
-
--
|
|
54
|
-
|
|
53
|
+
--deploy-id Crete deploy ID conf env files
|
|
54
|
+
--cluster Create deploy ID cluster files and sync to current cluster
|
|
55
|
+
--dev Sets the development cli context
|
|
56
|
+
-h, --help display help for command
|
|
55
57
|
|
|
56
58
|
```
|
|
57
59
|
|
|
@@ -290,11 +292,16 @@ Options:
|
|
|
290
292
|
management commands.
|
|
291
293
|
--cert Resets TLS/SSL certificate secrets for
|
|
292
294
|
deployments.
|
|
295
|
+
--cert-hosts <hosts> Resets TLS/SSL certificate secrets for
|
|
296
|
+
specified hosts.
|
|
297
|
+
--node <node> Sets optional node for deployment
|
|
298
|
+
operations.
|
|
293
299
|
--build-manifest Builds Kubernetes YAML manifests, including
|
|
294
300
|
deployments, services, proxies, and
|
|
295
301
|
secrets.
|
|
296
302
|
--replicas <replicas> Sets a custom number of replicas for
|
|
297
303
|
deployments.
|
|
304
|
+
--image <image> Sets a custom image for deployments.
|
|
298
305
|
--versions <deployment-versions> A comma-separated list of custom deployment
|
|
299
306
|
versions.
|
|
300
307
|
--traffic <traffic-versions> A comma-separated list of custom deployment
|
|
@@ -304,6 +311,8 @@ Options:
|
|
|
304
311
|
current resource deployments.
|
|
305
312
|
--kubeadm Enables the kubeadm context for deployment
|
|
306
313
|
operations.
|
|
314
|
+
--etc-hosts Enables the etc-hosts context for
|
|
315
|
+
deployment operations.
|
|
307
316
|
--restore-hosts Restores default `/etc/hosts` entries.
|
|
308
317
|
-h, --help display help for command
|
|
309
318
|
|
|
@@ -594,13 +603,15 @@ Options:
|
|
|
594
603
|
Runs a script from the specified path.
|
|
595
604
|
|
|
596
605
|
Arguments:
|
|
597
|
-
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, underpost-config, gpu-env, tf-gpu-test, dev-cluster, ssh-cluster-info, cyberia-ide, engine-ide, template-deploy, clean, pull, release-deploy, ssh-deploy, ide, dev-client, dev-api, monitor, db-client, promote, metrics, cluster, deploy, tf-vae-test, deploy-job.
|
|
606
|
+
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, underpost-config, gpu-env, tf-gpu-test, dev-cluster, ssh-cluster-info, cyberia-ide, engine-ide, template-deploy, clean, pull, release-deploy, ssh-deploy, ide, dev-client, dev-api, sync, ls-deployments, monitor, db-client, promote, metrics, cluster, deploy, tf-vae-test, deploy-job.
|
|
598
607
|
path The absolute or relative directory path where the script is located.
|
|
599
608
|
|
|
600
609
|
Options:
|
|
601
610
|
--command <command-array> Array of commands to run.
|
|
602
611
|
--args <args-array> Array of arguments to pass to the command.
|
|
603
612
|
--dev Sets the development context environment for the script.
|
|
613
|
+
--build Set builder context runner
|
|
614
|
+
--replicas <replicas> Sets a custom number of replicas for deployment.
|
|
604
615
|
--pod-name <pod-name> Optional: Specifies the pod name for test execution.
|
|
605
616
|
--volume-host-path <volume-host-path> Optional: Specifies the volume host path for test execution.
|
|
606
617
|
--volume-mount-path <volume-mount-path> Optional: Specifies the volume mount path for test execution.
|
package/conf.js
CHANGED
|
@@ -63,6 +63,7 @@ const DefaultConf = /**/ {
|
|
|
63
63
|
'Alert',
|
|
64
64
|
'404',
|
|
65
65
|
'500',
|
|
66
|
+
'Pagination',
|
|
66
67
|
],
|
|
67
68
|
default: [
|
|
68
69
|
'MenuDefault',
|
|
@@ -91,6 +92,16 @@ const DefaultConf = /**/ {
|
|
|
91
92
|
{ path: '/default-management', client: 'Default', ssr: 'Default' },
|
|
92
93
|
{ client: 'Default', ssr: 'Default', path: '/404', title: '404 Not Found' },
|
|
93
94
|
{ client: 'Default', ssr: 'Default', path: '/500', title: '500 Server Error' },
|
|
95
|
+
{
|
|
96
|
+
path: '/blog',
|
|
97
|
+
client: 'Default',
|
|
98
|
+
ssr: 'Default',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
path: '/chat',
|
|
102
|
+
client: 'Default',
|
|
103
|
+
ssr: 'Default',
|
|
104
|
+
},
|
|
94
105
|
],
|
|
95
106
|
dists: [
|
|
96
107
|
{
|
|
@@ -107,10 +118,25 @@ const DefaultConf = /**/ {
|
|
|
107
118
|
import_name_build: '/dist/sortablejs/sortable.complete.esm.js',
|
|
108
119
|
},
|
|
109
120
|
{ folder: './node_modules/validator', public_folder: '/dist/validator' },
|
|
110
|
-
{
|
|
121
|
+
{
|
|
122
|
+
folder: './node_modules/easymde/dist',
|
|
123
|
+
public_folder: '/dist/easymde',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
folder: './node_modules/marked/lib',
|
|
127
|
+
public_folder: '/dist/marked',
|
|
128
|
+
import_name: 'marked',
|
|
129
|
+
import_name_build: '/dist/marked/marked.esm.js',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
folder: './node_modules/vanilla-jsoneditor/standalone.js',
|
|
133
|
+
public_folder: '/dist/vanilla-jsoneditor/standalone.js',
|
|
134
|
+
import_name: 'vanilla-jsoneditor',
|
|
135
|
+
import_name_build: '/dist/vanilla-jsoneditor/standalone.js',
|
|
136
|
+
},
|
|
111
137
|
{
|
|
112
138
|
import_name: 'ag-grid-community',
|
|
113
|
-
import_name_build: '/dist/ag-grid-community/ag-grid-community.
|
|
139
|
+
import_name_build: '/dist/ag-grid-community/ag-grid-community.min.js',
|
|
114
140
|
folder: './node_modules/ag-grid-community/dist',
|
|
115
141
|
public_folder: '/dist/ag-grid-community',
|
|
116
142
|
styles: './node_modules/ag-grid-community/styles',
|
|
@@ -124,13 +150,13 @@ const DefaultConf = /**/ {
|
|
|
124
150
|
},
|
|
125
151
|
{ folder: './node_modules/peerjs/dist', public_folder: '/dist/peerjs' },
|
|
126
152
|
],
|
|
127
|
-
services: ['default', 'core', 'user', 'test', 'file'],
|
|
153
|
+
services: ['default', 'core', 'user', 'test', 'file', 'document'],
|
|
128
154
|
},
|
|
129
155
|
},
|
|
130
156
|
ssr: {
|
|
131
157
|
Default: {
|
|
132
158
|
head: ['Seo', 'Pwa', 'Css', 'DefaultScripts', 'Production'],
|
|
133
|
-
body: ['CacheControl', 'DefaultSplashScreen'
|
|
159
|
+
body: ['CacheControl', 'DefaultSplashScreen'],
|
|
134
160
|
mailer: { userVerifyEmail: 'DefaultVerifyEmail', userRecoverEmail: 'DefaultRecoverEmail' },
|
|
135
161
|
offline: [
|
|
136
162
|
{ path: '/offline', title: 'No Network Connection', client: 'NoNetworkConnection', head: [], body: [] },
|
|
@@ -144,11 +170,11 @@ const DefaultConf = /**/ {
|
|
|
144
170
|
'/': {
|
|
145
171
|
client: 'default',
|
|
146
172
|
runtime: 'nodejs',
|
|
147
|
-
apis: ['default', 'core', 'user', 'test', 'file'],
|
|
173
|
+
apis: ['default', 'core', 'user', 'test', 'file', 'document'],
|
|
148
174
|
origins: [],
|
|
149
175
|
minifyBuild: false,
|
|
150
|
-
iconsBuild:
|
|
151
|
-
liteBuild:
|
|
176
|
+
iconsBuild: false,
|
|
177
|
+
liteBuild: true,
|
|
152
178
|
docsBuild: false,
|
|
153
179
|
offlineBuild: false,
|
|
154
180
|
ws: 'core',
|
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-default-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v2.8.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.8.88
|
|
21
21
|
# resources:
|
|
22
22
|
# requests:
|
|
23
23
|
# memory: "124Ki"
|
|
@@ -100,7 +100,7 @@ spec:
|
|
|
100
100
|
spec:
|
|
101
101
|
containers:
|
|
102
102
|
- name: dd-default-development-green
|
|
103
|
-
image: localhost/rockylinux9-underpost:v2.8.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v2.8.88
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
apiVersion: apps/v1
|
|
3
|
+
kind: Deployment
|
|
4
|
+
metadata:
|
|
5
|
+
name: dd-test-development-blue
|
|
6
|
+
labels:
|
|
7
|
+
app: dd-test-development-blue
|
|
8
|
+
spec:
|
|
9
|
+
replicas: 1
|
|
10
|
+
selector:
|
|
11
|
+
matchLabels:
|
|
12
|
+
app: dd-test-development-blue
|
|
13
|
+
template:
|
|
14
|
+
metadata:
|
|
15
|
+
labels:
|
|
16
|
+
app: dd-test-development-blue
|
|
17
|
+
spec:
|
|
18
|
+
containers:
|
|
19
|
+
- name: dd-test-development-blue
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.8.88
|
|
21
|
+
# resources:
|
|
22
|
+
# requests:
|
|
23
|
+
# memory: "94Ki"
|
|
24
|
+
# cpu: "75m"
|
|
25
|
+
# limits:
|
|
26
|
+
# memory: "1504Ki"
|
|
27
|
+
# cpu: "1200m"
|
|
28
|
+
command:
|
|
29
|
+
- /bin/sh
|
|
30
|
+
- -c
|
|
31
|
+
- >
|
|
32
|
+
npm install -g npm@11.2.0 &&
|
|
33
|
+
npm install -g underpost &&
|
|
34
|
+
underpost secret underpost --create-from-file /etc/config/.env.development &&
|
|
35
|
+
underpost start --build --run dd-test development
|
|
36
|
+
volumeMounts:
|
|
37
|
+
- name: config-volume
|
|
38
|
+
mountPath: /etc/config
|
|
39
|
+
volumes:
|
|
40
|
+
- name: config-volume
|
|
41
|
+
configMap:
|
|
42
|
+
name: underpost-config
|
|
43
|
+
---
|
|
44
|
+
apiVersion: v1
|
|
45
|
+
kind: Service
|
|
46
|
+
metadata:
|
|
47
|
+
name: dd-test-development-blue-service
|
|
48
|
+
spec:
|
|
49
|
+
selector:
|
|
50
|
+
app: dd-test-development-blue
|
|
51
|
+
ports:
|
|
52
|
+
- name: 'tcp-4021'
|
|
53
|
+
protocol: TCP
|
|
54
|
+
port: 4021
|
|
55
|
+
targetPort: 4021
|
|
56
|
+
- name: 'udp-4021'
|
|
57
|
+
protocol: UDP
|
|
58
|
+
port: 4021
|
|
59
|
+
targetPort: 4021
|
|
60
|
+
|
|
61
|
+
- name: 'tcp-4022'
|
|
62
|
+
protocol: TCP
|
|
63
|
+
port: 4022
|
|
64
|
+
targetPort: 4022
|
|
65
|
+
- name: 'udp-4022'
|
|
66
|
+
protocol: UDP
|
|
67
|
+
port: 4022
|
|
68
|
+
targetPort: 4022
|
|
69
|
+
|
|
70
|
+
- name: 'tcp-4023'
|
|
71
|
+
protocol: TCP
|
|
72
|
+
port: 4023
|
|
73
|
+
targetPort: 4023
|
|
74
|
+
- name: 'udp-4023'
|
|
75
|
+
protocol: UDP
|
|
76
|
+
port: 4023
|
|
77
|
+
targetPort: 4023
|
|
78
|
+
|
|
79
|
+
- name: 'tcp-4024'
|
|
80
|
+
protocol: TCP
|
|
81
|
+
port: 4024
|
|
82
|
+
targetPort: 4024
|
|
83
|
+
- name: 'udp-4024'
|
|
84
|
+
protocol: UDP
|
|
85
|
+
port: 4024
|
|
86
|
+
targetPort: 4024
|
|
87
|
+
type: LoadBalancer
|
|
88
|
+
---
|
|
89
|
+
apiVersion: apps/v1
|
|
90
|
+
kind: Deployment
|
|
91
|
+
metadata:
|
|
92
|
+
name: dd-test-development-green
|
|
93
|
+
labels:
|
|
94
|
+
app: dd-test-development-green
|
|
95
|
+
spec:
|
|
96
|
+
replicas: 1
|
|
97
|
+
selector:
|
|
98
|
+
matchLabels:
|
|
99
|
+
app: dd-test-development-green
|
|
100
|
+
template:
|
|
101
|
+
metadata:
|
|
102
|
+
labels:
|
|
103
|
+
app: dd-test-development-green
|
|
104
|
+
spec:
|
|
105
|
+
containers:
|
|
106
|
+
- name: dd-test-development-green
|
|
107
|
+
image: localhost/rockylinux9-underpost:v2.8.88
|
|
108
|
+
# resources:
|
|
109
|
+
# requests:
|
|
110
|
+
# memory: "94Ki"
|
|
111
|
+
# cpu: "75m"
|
|
112
|
+
# limits:
|
|
113
|
+
# memory: "1504Ki"
|
|
114
|
+
# cpu: "1200m"
|
|
115
|
+
command:
|
|
116
|
+
- /bin/sh
|
|
117
|
+
- -c
|
|
118
|
+
- >
|
|
119
|
+
npm install -g npm@11.2.0 &&
|
|
120
|
+
npm install -g underpost &&
|
|
121
|
+
underpost secret underpost --create-from-file /etc/config/.env.development &&
|
|
122
|
+
underpost start --build --run dd-test development
|
|
123
|
+
volumeMounts:
|
|
124
|
+
- name: config-volume
|
|
125
|
+
mountPath: /etc/config
|
|
126
|
+
volumes:
|
|
127
|
+
- name: config-volume
|
|
128
|
+
configMap:
|
|
129
|
+
name: underpost-config
|
|
130
|
+
---
|
|
131
|
+
apiVersion: v1
|
|
132
|
+
kind: Service
|
|
133
|
+
metadata:
|
|
134
|
+
name: dd-test-development-green-service
|
|
135
|
+
spec:
|
|
136
|
+
selector:
|
|
137
|
+
app: dd-test-development-green
|
|
138
|
+
ports:
|
|
139
|
+
- name: 'tcp-4021'
|
|
140
|
+
protocol: TCP
|
|
141
|
+
port: 4021
|
|
142
|
+
targetPort: 4021
|
|
143
|
+
- name: 'udp-4021'
|
|
144
|
+
protocol: UDP
|
|
145
|
+
port: 4021
|
|
146
|
+
targetPort: 4021
|
|
147
|
+
|
|
148
|
+
- name: 'tcp-4022'
|
|
149
|
+
protocol: TCP
|
|
150
|
+
port: 4022
|
|
151
|
+
targetPort: 4022
|
|
152
|
+
- name: 'udp-4022'
|
|
153
|
+
protocol: UDP
|
|
154
|
+
port: 4022
|
|
155
|
+
targetPort: 4022
|
|
156
|
+
|
|
157
|
+
- name: 'tcp-4023'
|
|
158
|
+
protocol: TCP
|
|
159
|
+
port: 4023
|
|
160
|
+
targetPort: 4023
|
|
161
|
+
- name: 'udp-4023'
|
|
162
|
+
protocol: UDP
|
|
163
|
+
port: 4023
|
|
164
|
+
targetPort: 4023
|
|
165
|
+
|
|
166
|
+
- name: 'tcp-4024'
|
|
167
|
+
protocol: TCP
|
|
168
|
+
port: 4024
|
|
169
|
+
targetPort: 4024
|
|
170
|
+
- name: 'udp-4024'
|
|
171
|
+
protocol: UDP
|
|
172
|
+
port: 4024
|
|
173
|
+
targetPort: 4024
|
|
174
|
+
type: LoadBalancer
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
apiVersion: projectcontour.io/v1
|
|
4
|
+
kind: HTTPProxy
|
|
5
|
+
metadata:
|
|
6
|
+
name: test.nexodev.org
|
|
7
|
+
spec:
|
|
8
|
+
virtualhost:
|
|
9
|
+
fqdn: test.nexodev.org
|
|
10
|
+
routes:
|
|
11
|
+
- conditions:
|
|
12
|
+
- prefix: /
|
|
13
|
+
enableWebsockets: true
|
|
14
|
+
services:
|
|
15
|
+
- name: dd-test-development-blue-service
|
|
16
|
+
port: 4021
|
|
17
|
+
weight: 100
|
|
18
|
+
|
|
19
|
+
- conditions:
|
|
20
|
+
- prefix: /peer
|
|
21
|
+
enableWebsockets: true
|
|
22
|
+
services:
|
|
23
|
+
- name: dd-test-development-blue-service
|
|
24
|
+
port: 4022
|
|
25
|
+
weight: 100
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
apiVersion: projectcontour.io/v1
|
|
29
|
+
kind: HTTPProxy
|
|
30
|
+
metadata:
|
|
31
|
+
name: stagging.nexodev.org
|
|
32
|
+
spec:
|
|
33
|
+
virtualhost:
|
|
34
|
+
fqdn: stagging.nexodev.org
|
|
35
|
+
routes:
|
|
36
|
+
- conditions:
|
|
37
|
+
- prefix: /
|
|
38
|
+
enableWebsockets: true
|
|
39
|
+
services:
|
|
40
|
+
- name: dd-test-development-blue-service
|
|
41
|
+
port: 4023
|
|
42
|
+
weight: 100
|
|
43
|
+
|
|
44
|
+
- conditions:
|
|
45
|
+
- prefix: /peer
|
|
46
|
+
enableWebsockets: true
|
|
47
|
+
services:
|
|
48
|
+
- name: dd-test-development-blue-service
|
|
49
|
+
port: 4024
|
|
50
|
+
weight: 100
|
|
51
|
+
|
|
@@ -20,16 +20,16 @@ spec:
|
|
|
20
20
|
ports:
|
|
21
21
|
- containerPort: 8081
|
|
22
22
|
env:
|
|
23
|
-
- name: ME_CONFIG_MONGODB_ADMINUSERNAME
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- name: ME_CONFIG_MONGODB_ADMINPASSWORD
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
# - name: ME_CONFIG_MONGODB_ADMINUSERNAME
|
|
24
|
+
# valueFrom:
|
|
25
|
+
# secretKeyRef:
|
|
26
|
+
# name: mongodb-secret
|
|
27
|
+
# key: username
|
|
28
|
+
# - name: ME_CONFIG_MONGODB_ADMINPASSWORD
|
|
29
|
+
# valueFrom:
|
|
30
|
+
# secretKeyRef:
|
|
31
|
+
# name: mongodb-secret
|
|
32
|
+
# key: password
|
|
33
33
|
- name: ME_CONFIG_BASICAUTH_USERNAME
|
|
34
34
|
valueFrom:
|
|
35
35
|
secretKeyRef:
|
|
@@ -42,8 +42,8 @@ spec:
|
|
|
42
42
|
key: password
|
|
43
43
|
- name: ME_CONFIG_MONGODB_SERVER
|
|
44
44
|
value: 'mongodb-0.mongodb-service'
|
|
45
|
-
- name: ME_CONFIG_MONGODB_ENABLE_ADMIN
|
|
46
|
-
|
|
45
|
+
# - name: ME_CONFIG_MONGODB_ENABLE_ADMIN
|
|
46
|
+
# value: 'true'
|
|
47
47
|
- name: ME_CONFIG_MONGODB_PORT
|
|
48
48
|
value: '27017'
|
|
49
49
|
---
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
sudo dnf install -y neovim
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
sudo rm -rf ~/.config/nvim
|
|
8
|
+
sudo rm -rf ~/.local/share/nvim
|
|
9
|
+
|
|
10
|
+
mkdir -p ~/.config/nvim
|
|
11
|
+
mkdir -p ~/.local/share/nvim/site/autoload
|
|
12
|
+
|
|
13
|
+
# Install vim-plug for Neovim
|
|
14
|
+
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
|
15
|
+
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
16
|
+
|
|
17
|
+
# Create an init.vim with nvim-tree.lua + web-devicons + gruvbox (theme)
|
|
18
|
+
cat > ~/.config/nvim/init.vim <<'EOF'
|
|
19
|
+
" Minimal init.vim to use nvim-tree.lua + gruvbox theme via vim-plug
|
|
20
|
+
|
|
21
|
+
" --- vim-plug manager
|
|
22
|
+
call plug#begin('~/.local/share/nvim/plugged')
|
|
23
|
+
|
|
24
|
+
" file explorer (nvim-tree)
|
|
25
|
+
Plug 'nvim-tree/nvim-tree.lua'
|
|
26
|
+
Plug 'nvim-tree/nvim-web-devicons' " optional: file icons
|
|
27
|
+
|
|
28
|
+
" colorscheme
|
|
29
|
+
Plug 'morhetz/gruvbox'
|
|
30
|
+
|
|
31
|
+
" sensible defaults, optional
|
|
32
|
+
Plug 'tpope/vim-sensible'
|
|
33
|
+
|
|
34
|
+
call plug#end()
|
|
35
|
+
|
|
36
|
+
" --- UI settings
|
|
37
|
+
syntax on
|
|
38
|
+
filetype plugin indent on
|
|
39
|
+
set number
|
|
40
|
+
set relativenumber
|
|
41
|
+
if has('termguicolors')
|
|
42
|
+
set termguicolors
|
|
43
|
+
endif
|
|
44
|
+
set background=dark
|
|
45
|
+
|
|
46
|
+
" gruvbox options (optional)
|
|
47
|
+
let g:gruvbox_contrast_dark = 'soft'
|
|
48
|
+
colorscheme gruvbox
|
|
49
|
+
|
|
50
|
+
" --- nvim-tree configuration (Lua block)
|
|
51
|
+
lua << 'LUA'
|
|
52
|
+
-- safe require
|
|
53
|
+
local ok, tree = pcall(require, "nvim-tree")
|
|
54
|
+
if not ok then
|
|
55
|
+
return
|
|
56
|
+
end
|
|
57
|
+
tree.setup{
|
|
58
|
+
view = {
|
|
59
|
+
width = 30,
|
|
60
|
+
side = "left",
|
|
61
|
+
preserve_window_proportions = true,
|
|
62
|
+
},
|
|
63
|
+
renderer = {
|
|
64
|
+
indent_markers = { enable = true },
|
|
65
|
+
},
|
|
66
|
+
actions = {
|
|
67
|
+
open_file = {
|
|
68
|
+
quit_on_open = false,
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
LUA
|
|
73
|
+
|
|
74
|
+
" --- mappings: Ctrl-n toggles nvim-tree
|
|
75
|
+
nnoremap <C-n> :NvimTreeToggle<CR>
|
|
76
|
+
|
|
77
|
+
" Open nvim-tree on startup when opening nvim with no file args
|
|
78
|
+
autocmd StdinReadPre * let s:std_in=1
|
|
79
|
+
autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NvimTreeToggle | wincmd p | endif
|
|
80
|
+
EOF
|
|
81
|
+
|
|
82
|
+
# Fix permissions in case something was left owned by root (happens if you used sudo on these paths before)
|
|
83
|
+
sudo chown -R "$USER":"$USER" ~/.config/nvim ~/.local/share/nvim 2>/dev/null || true
|
|
84
|
+
|
|
85
|
+
# Install plugins automatically (non-interactive)
|
|
86
|
+
nvim +PlugInstall +qall
|
|
87
|
+
|
|
88
|
+
echo
|
|
89
|
+
echo "Done. Plugins installed."
|
|
90
|
+
echo "Run 'nvim' and press Ctrl-n to toggle the file tree."
|
|
91
|
+
echo "If colorscheme is not correct, ensure your terminal supports truecolor and TERM is xterm-256color."
|
package/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"type": "module",
|
|
3
3
|
"main": "src/index.js",
|
|
4
4
|
"name": "underpost",
|
|
5
|
-
"version": "2.8.
|
|
5
|
+
"version": "2.8.88",
|
|
6
6
|
"description": "pwa api rest template",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",
|
|
9
9
|
"build": "node bin/deploy build-full-client",
|
|
10
10
|
"test": "env-cmd -f .env.test c8 mocha",
|
|
11
|
-
"pm2": "env-cmd -f .env.production pm2 start src/server.js --node-args=\"--max-old-space-size=8192\" --name engine",
|
|
12
|
-
"dev": "env-cmd -f .env.development
|
|
11
|
+
"pm2": "env-cmd -f .env.production pm2 start src/server.js --node-args=\"--max-old-space-size=8192\" --name engine -- dd-default",
|
|
12
|
+
"dev": "env-cmd -f .env.development nodemon src/server",
|
|
13
13
|
"dev-img": "env-cmd -f .env.development node src/server",
|
|
14
14
|
"prod-img": "env-cmd -f .env.production node src/server",
|
|
15
15
|
"monitor": "pm2 start src/monitor.js --name monitor -- dd production",
|
|
@@ -51,21 +51,18 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@fortawesome/fontawesome-free": "^6.4.2",
|
|
53
53
|
"@fullcalendar/rrule": "^6.1.15",
|
|
54
|
-
"@loadingio/css-spinner": "^2.0.2",
|
|
55
54
|
"@neodrag/vanilla": "^2.0.3",
|
|
56
55
|
"adm-zip": "^0.5.10",
|
|
57
|
-
"ag-grid-community": "31.
|
|
56
|
+
"ag-grid-community": "^31.3.4",
|
|
58
57
|
"axios": "^1.5.1",
|
|
59
58
|
"chai": "^5.1.0",
|
|
60
59
|
"clean-jsdoc-theme": "^4.3.0",
|
|
61
|
-
"cli-progress": "^3.12.0",
|
|
62
|
-
"cli-spinners": "^3.0.0",
|
|
63
60
|
"clipboardy": "^4.0.0",
|
|
64
61
|
"cloudinary": "^2.5.1",
|
|
65
|
-
"color": "^4.2.3",
|
|
66
62
|
"colors": "^1.4.0",
|
|
67
63
|
"commander": "^12.1.0",
|
|
68
64
|
"compression": "^1.7.4",
|
|
65
|
+
"cookie-parser": "^1.4.7",
|
|
69
66
|
"cors": "^2.8.5",
|
|
70
67
|
"d3": "^7.9.0",
|
|
71
68
|
"dotenv": "^16.3.1",
|
|
@@ -73,20 +70,19 @@
|
|
|
73
70
|
"env-cmd": "^10.1.0",
|
|
74
71
|
"express": "^4.18.2",
|
|
75
72
|
"express-fileupload": "^1.4.3",
|
|
73
|
+
"express-rate-limit": "^8.1.0",
|
|
74
|
+
"express-slow-down": "^3.0.0",
|
|
76
75
|
"favicons": "^7.2.0",
|
|
77
|
-
"font-awesome-assets": "^0.0.9",
|
|
78
76
|
"fs-extra": "^11.1.1",
|
|
79
77
|
"fullcalendar": "^6.1.15",
|
|
78
|
+
"helmet": "^8.1.0",
|
|
80
79
|
"html-minifier-terser": "^7.2.0",
|
|
81
80
|
"http-proxy-middleware": "^2.0.6",
|
|
82
81
|
"ignore-walk": "^6.0.4",
|
|
83
82
|
"iovalkey": "^0.2.1",
|
|
84
83
|
"jimp": "^0.22.12",
|
|
85
|
-
"joystick-controller": "^1.0.15",
|
|
86
84
|
"json-colorizer": "^2.2.2",
|
|
87
85
|
"jsonwebtoken": "^9.0.2",
|
|
88
|
-
"keyword-extractor": "^0.0.28",
|
|
89
|
-
"log-update": "^6.0.0",
|
|
90
86
|
"mariadb": "^3.2.2",
|
|
91
87
|
"marked": "^12.0.2",
|
|
92
88
|
"mocha": "^10.8.2",
|
|
@@ -94,10 +90,8 @@
|
|
|
94
90
|
"morgan": "^1.10.0",
|
|
95
91
|
"nodemailer": "^6.9.9",
|
|
96
92
|
"nodemon": "^3.0.1",
|
|
97
|
-
"pathfinding": "^0.4.18",
|
|
98
93
|
"peer": "^1.0.2",
|
|
99
94
|
"peerjs": "^1.5.2",
|
|
100
|
-
"pixi.js": "7.4.2",
|
|
101
95
|
"prom-client": "^15.1.2",
|
|
102
96
|
"public-ip": "^6.0.1",
|
|
103
97
|
"read": "^2.1.0",
|
|
@@ -116,7 +110,6 @@
|
|
|
116
110
|
"vanilla-jsoneditor": "^2.3.2",
|
|
117
111
|
"winston": "^3.11.0"
|
|
118
112
|
},
|
|
119
|
-
"devDependencies": {},
|
|
120
113
|
"publishConfig": {
|
|
121
114
|
"provenance": true,
|
|
122
115
|
"access": "public",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { adminGuard
|
|
1
|
+
import { adminGuard } from '../../server/auth.js';
|
|
2
2
|
import { loggerFactory } from '../../server/logger.js';
|
|
3
3
|
import { CoreController } from './core.controller.js';
|
|
4
4
|
import express from 'express';
|
|
@@ -7,6 +7,7 @@ const logger = loggerFactory(import.meta);
|
|
|
7
7
|
|
|
8
8
|
const CoreRouter = (options) => {
|
|
9
9
|
const router = express.Router();
|
|
10
|
+
const authMiddleware = options.authMiddleware;
|
|
10
11
|
router.post(`/:id`, authMiddleware, adminGuard, async (req, res) => await CoreController.post(req, res, options));
|
|
11
12
|
router.post(`/`, authMiddleware, adminGuard, async (req, res) => await CoreController.post(req, res, options));
|
|
12
13
|
router.get(`/:id`, authMiddleware, adminGuard, async (req, res) => await CoreController.get(req, res, options));
|
|
@@ -21,7 +21,12 @@ const DefaultController = {
|
|
|
21
21
|
},
|
|
22
22
|
get: async (req, res, options) => {
|
|
23
23
|
try {
|
|
24
|
-
const
|
|
24
|
+
const { page, limit } = req.query;
|
|
25
|
+
const result = await DefaultService.get(
|
|
26
|
+
{ ...req, query: { ...req.query, page: parseInt(page), limit: parseInt(limit) } },
|
|
27
|
+
res,
|
|
28
|
+
options,
|
|
29
|
+
);
|
|
25
30
|
return res.status(200).json({
|
|
26
31
|
status: 'success',
|
|
27
32
|
data: result,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { authMiddleware } from '../../server/auth.js';
|
|
2
1
|
import { loggerFactory } from '../../server/logger.js';
|
|
3
2
|
import { DefaultController } from './default.controller.js';
|
|
4
3
|
import express from 'express';
|
|
@@ -7,9 +6,14 @@ const logger = loggerFactory(import.meta);
|
|
|
7
6
|
|
|
8
7
|
const DefaultRouter = (options) => {
|
|
9
8
|
const router = express.Router();
|
|
9
|
+
const authMiddleware = options.authMiddleware;
|
|
10
10
|
router.post(`/:id`, async (req, res) => await DefaultController.post(req, res, options));
|
|
11
11
|
router.post(`/`, async (req, res) => await DefaultController.post(req, res, options));
|
|
12
|
-
router.get(
|
|
12
|
+
router.get(
|
|
13
|
+
`/:id`,
|
|
14
|
+
// authMiddleware,
|
|
15
|
+
async (req, res) => await DefaultController.get(req, res, options),
|
|
16
|
+
);
|
|
13
17
|
router.get(`/`, async (req, res) => await DefaultController.get(req, res, options));
|
|
14
18
|
router.put(`/:id`, async (req, res) => await DefaultController.put(req, res, options));
|
|
15
19
|
router.put(`/`, async (req, res) => await DefaultController.put(req, res, options));
|
|
@@ -13,7 +13,16 @@ const DefaultService = {
|
|
|
13
13
|
/** @type {import('./default.model.js').DefaultModel} */
|
|
14
14
|
const Default = DataBaseProvider.instance[`${options.host}${options.path}`].mongoose.models.Default;
|
|
15
15
|
if (req.params.id) return await Default.findById(req.params.id);
|
|
16
|
-
|
|
16
|
+
const { query, page = 1, limit = 10, sort = { updatedAt: -1 } } = req.query;
|
|
17
|
+
const queryPayload = query ? JSON.parse(query) : {};
|
|
18
|
+
const skip = (page - 1) * limit;
|
|
19
|
+
const [data, total] = await Promise.all([
|
|
20
|
+
Default.find(queryPayload).sort(sort).limit(limit).skip(skip),
|
|
21
|
+
Default.countDocuments(queryPayload),
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
const totalPages = Math.ceil(total / limit);
|
|
25
|
+
return { data, total, page, totalPages };
|
|
17
26
|
},
|
|
18
27
|
put: async (req, res, options) => {
|
|
19
28
|
/** @type {import('./default.model.js').DefaultModel} */
|