underpost 2.8.848 → 2.8.851
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/README.md +41 -35
- package/cli.md +83 -83
- package/docker-compose.yml +1 -1
- package/manifests/deployment/dd-template-development/deployment.yaml +2 -2
- package/package.json +1 -1
- package/src/api/user/user.service.js +8 -34
- package/src/client/components/core/Content.js +11 -7
- package/src/client/components/core/Css.js +5 -1
- package/src/client/components/core/Input.js +6 -1
- package/src/client/components/core/LogIn.js +3 -0
- package/src/client/components/core/LogOut.js +1 -1
- package/src/client/components/core/Modal.js +5 -2
- package/src/client/components/core/Recover.js +2 -1
- package/src/client/components/core/SignUp.js +1 -0
- package/src/client/components/core/VanillaJs.js +48 -14
- package/src/client/components/default/MenuDefault.js +2 -2
- package/src/client/components/default/RoutesDefault.js +3 -4
- package/src/index.js +1 -1
- package/src/mailer/MailerProvider.js +37 -0
package/README.md
CHANGED
|
@@ -43,6 +43,9 @@ template
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
46
49
|
|
|
47
50
|
|
|
48
51
|
|
|
@@ -50,7 +53,7 @@ template
|
|
|
50
53
|
<!-- badges -->
|
|
51
54
|
|
|
52
55
|
|
|
53
|
-
[](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.yml) [](https://www.npmjs.com/package/underpost) [](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.yml) [](https://www.npmjs.com/package/underpost) [](https://socket.dev/npm/package/underpost/overview/2.8.851) [](https://coveralls.io/github/underpostnet/engine?branch=master) [](https://www.npmjs.org/package/underpost) [](https://www.npmjs.com/package/underpost)
|
|
54
57
|
|
|
55
58
|
|
|
56
59
|
<!-- end-badges -->
|
|
@@ -76,6 +79,9 @@ template
|
|
|
76
79
|
|
|
77
80
|
|
|
78
81
|
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
79
85
|
|
|
80
86
|
|
|
81
87
|
|
|
@@ -124,43 +130,43 @@ Run dev client server
|
|
|
124
130
|
npm run dev
|
|
125
131
|
```
|
|
126
132
|
<!-- -->
|
|
127
|
-
## underpost ci/cd cli v2.8.
|
|
133
|
+
## underpost ci/cd cli v2.8.851
|
|
128
134
|
|
|
129
135
|
### Usage: `underpost [options] [command]`
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Options:
|
|
139
|
+
-V, --version output the version number
|
|
140
|
+
-h, --help display help for command
|
|
134
141
|
|
|
135
142
|
Commands:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
143
|
+
new <app-name> Initializes a new Underpost project with a predefined structure.
|
|
144
|
+
start [options] <deploy-id> [env] Initiates application servers, build pipelines, or other defined services based on the deployment ID.
|
|
145
|
+
clone [options] <uri> Clones a specified GitHub repository into the current directory.
|
|
146
|
+
pull [options] <path> <uri> Pulls the latest changes from a specified GitHub repository.
|
|
147
|
+
cmt [options] <path> <commit-type> [module-tag] [message] Manages commits to a GitHub repository, supporting various commit types and options.
|
|
148
|
+
push [options] <path> <uri> Pushes committed changes from a local repository to a remote GitHub repository.
|
|
149
|
+
env <deploy-id> [env] Sets environment variables and configurations related to a specific deployment ID.
|
|
150
|
+
config [options] <operator> [key] [value] Manages Underpost configurations using various operators.
|
|
151
|
+
root Displays the root path of the npm installation.
|
|
152
|
+
cluster [options] [pod-name] Manages Kubernetes clusters, defaulting to Kind cluster initialization.
|
|
153
|
+
deploy [options] [deploy-list] [env] Manages application deployments, defaulting to deploying development pods.
|
|
154
|
+
secret [options] <platform> Manages secrets for various platforms.
|
|
155
|
+
dockerfile-image-build [options] Builds a Docker image from a specified Dockerfile with various options for naming, saving, and loading.
|
|
156
|
+
dockerfile-pull-base-images [options] Pulls required Underpost Dockerfile base images and optionally loads them into clusters.
|
|
157
|
+
install Quickly imports Underpost npm dependencies by copying them.
|
|
158
|
+
db [options] <deploy-list> Manages database operations, including import, export, and collection management.
|
|
159
|
+
script [options] <operator> <script-name> [script-value] Supports a variety of built-in Underpost global scripts, their preset lifecycle events, and arbitrary custom scripts.
|
|
160
|
+
cron [options] [deploy-list] [job-list] Manages cron jobs, including initialization, execution, and configuration updates.
|
|
161
|
+
fs [options] [path] Manages file storage, defaulting to file upload operations.
|
|
162
|
+
test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
|
|
163
|
+
monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
|
|
164
|
+
ssh [options] Import and start ssh server and client based on current default deployment ID.
|
|
165
|
+
run [options] <runner-id> [path] Runs a script from the specified path.
|
|
166
|
+
lxd [options] Manages LXD containers and virtual machines.
|
|
167
|
+
baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
|
|
168
|
+
help [command] display help for command
|
|
169
|
+
|
|
163
170
|
```
|
|
164
|
-
|
|
171
|
+
|
|
165
172
|
<a target="_top" href="https://github.com/underpostnet/pwa-microservices-template/blob/master/cli.md">See complete CLI Docs here.</a>
|
|
166
|
-
|
package/cli.md
CHANGED
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
## underpost ci/cd cli v2.8.
|
|
1
|
+
## underpost ci/cd cli v2.8.851
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Options:
|
|
7
|
+
-V, --version output the version number
|
|
8
|
+
-h, --help display help for command
|
|
8
9
|
|
|
9
10
|
Commands:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
11
|
+
new <app-name> Initializes a new Underpost project with a predefined structure.
|
|
12
|
+
start [options] <deploy-id> [env] Initiates application servers, build pipelines, or other defined services based on the deployment ID.
|
|
13
|
+
clone [options] <uri> Clones a specified GitHub repository into the current directory.
|
|
14
|
+
pull [options] <path> <uri> Pulls the latest changes from a specified GitHub repository.
|
|
15
|
+
cmt [options] <path> <commit-type> [module-tag] [message] Manages commits to a GitHub repository, supporting various commit types and options.
|
|
16
|
+
push [options] <path> <uri> Pushes committed changes from a local repository to a remote GitHub repository.
|
|
17
|
+
env <deploy-id> [env] Sets environment variables and configurations related to a specific deployment ID.
|
|
18
|
+
config [options] <operator> [key] [value] Manages Underpost configurations using various operators.
|
|
19
|
+
root Displays the root path of the npm installation.
|
|
20
|
+
cluster [options] [pod-name] Manages Kubernetes clusters, defaulting to Kind cluster initialization.
|
|
21
|
+
deploy [options] [deploy-list] [env] Manages application deployments, defaulting to deploying development pods.
|
|
22
|
+
secret [options] <platform> Manages secrets for various platforms.
|
|
23
|
+
dockerfile-image-build [options] Builds a Docker image from a specified Dockerfile with various options for naming, saving, and loading.
|
|
24
|
+
dockerfile-pull-base-images [options] Pulls required Underpost Dockerfile base images and optionally loads them into clusters.
|
|
25
|
+
install Quickly imports Underpost npm dependencies by copying them.
|
|
26
|
+
db [options] <deploy-list> Manages database operations, including import, export, and collection management.
|
|
27
|
+
script [options] <operator> <script-name> [script-value] Supports a variety of built-in Underpost global scripts, their preset lifecycle events, and arbitrary custom scripts.
|
|
28
|
+
cron [options] [deploy-list] [job-list] Manages cron jobs, including initialization, execution, and configuration updates.
|
|
29
|
+
fs [options] [path] Manages file storage, defaulting to file upload operations.
|
|
30
|
+
test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
|
|
31
|
+
monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
|
|
32
|
+
ssh [options] Import and start ssh server and client based on current default deployment ID.
|
|
33
|
+
run [options] <runner-id> [path] Runs a script from the specified path.
|
|
34
|
+
lxd [options] Manages LXD containers and virtual machines.
|
|
35
|
+
baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
|
|
36
|
+
help [command] display help for command
|
|
37
|
+
|
|
37
38
|
```
|
|
38
39
|
|
|
39
40
|
## Commands:
|
|
40
|
-
|
|
41
41
|
|
|
42
42
|
### `new` :
|
|
43
|
+
|
|
43
44
|
```
|
|
44
45
|
Usage: underpost new [options] <app-name>
|
|
45
46
|
|
|
@@ -50,11 +51,11 @@ Arguments:
|
|
|
50
51
|
|
|
51
52
|
Options:
|
|
52
53
|
-h, --help display help for command
|
|
53
|
-
|
|
54
|
+
|
|
54
55
|
```
|
|
55
|
-
|
|
56
56
|
|
|
57
57
|
### `start` :
|
|
58
|
+
|
|
58
59
|
```
|
|
59
60
|
Usage: underpost start [options] <deploy-id> [env]
|
|
60
61
|
|
|
@@ -70,11 +71,11 @@ Options:
|
|
|
70
71
|
--run Starts application servers and monitors their health.
|
|
71
72
|
--build Triggers the client-side application build process.
|
|
72
73
|
-h, --help display help for command
|
|
73
|
-
|
|
74
|
+
|
|
74
75
|
```
|
|
75
|
-
|
|
76
76
|
|
|
77
77
|
### `clone` :
|
|
78
|
+
|
|
78
79
|
```
|
|
79
80
|
Usage: underpost clone [options] <uri>
|
|
80
81
|
|
|
@@ -87,11 +88,11 @@ Options:
|
|
|
87
88
|
--bare Performs a bare clone, downloading only the .git files.
|
|
88
89
|
-g8 Uses the g8 repository extension for cloning.
|
|
89
90
|
-h, --help display help for command
|
|
90
|
-
|
|
91
|
+
|
|
91
92
|
```
|
|
92
|
-
|
|
93
93
|
|
|
94
94
|
### `pull` :
|
|
95
|
+
|
|
95
96
|
```
|
|
96
97
|
Usage: underpost pull [options] <path> <uri>
|
|
97
98
|
|
|
@@ -105,11 +106,11 @@ Arguments:
|
|
|
105
106
|
Options:
|
|
106
107
|
-g8 Uses the g8 repository extension for pulling.
|
|
107
108
|
-h, --help display help for command
|
|
108
|
-
|
|
109
|
+
|
|
109
110
|
```
|
|
110
|
-
|
|
111
111
|
|
|
112
112
|
### `cmt` :
|
|
113
|
+
|
|
113
114
|
```
|
|
114
115
|
Usage: underpost cmt [options] <path> <commit-type> [module-tag] [message]
|
|
115
116
|
|
|
@@ -129,11 +130,11 @@ Options:
|
|
|
129
130
|
--copy Copies the generated commit message to the clipboard.
|
|
130
131
|
--info Displays information about available commit types.
|
|
131
132
|
-h, --help display help for command
|
|
132
|
-
|
|
133
|
+
|
|
133
134
|
```
|
|
134
|
-
|
|
135
135
|
|
|
136
136
|
### `push` :
|
|
137
|
+
|
|
137
138
|
```
|
|
138
139
|
Usage: underpost push [options] <path> <uri>
|
|
139
140
|
|
|
@@ -147,11 +148,11 @@ Options:
|
|
|
147
148
|
-f Forces the push, overwriting the remote repository history.
|
|
148
149
|
-g8 Uses the g8 repository extension for pushing.
|
|
149
150
|
-h, --help display help for command
|
|
150
|
-
|
|
151
|
+
|
|
151
152
|
```
|
|
152
|
-
|
|
153
153
|
|
|
154
154
|
### `env` :
|
|
155
|
+
|
|
155
156
|
```
|
|
156
157
|
Usage: underpost env [options] <deploy-id> [env]
|
|
157
158
|
|
|
@@ -166,11 +167,11 @@ Arguments:
|
|
|
166
167
|
|
|
167
168
|
Options:
|
|
168
169
|
-h, --help display help for command
|
|
169
|
-
|
|
170
|
+
|
|
170
171
|
```
|
|
171
|
-
|
|
172
172
|
|
|
173
173
|
### `config` :
|
|
174
|
+
|
|
174
175
|
```
|
|
175
176
|
Usage: underpost config [options] <operator> [key] [value]
|
|
176
177
|
|
|
@@ -185,11 +186,11 @@ Arguments:
|
|
|
185
186
|
Options:
|
|
186
187
|
--plain Prints the configuration value in plain text.
|
|
187
188
|
-h, --help display help for command
|
|
188
|
-
|
|
189
|
+
|
|
189
190
|
```
|
|
190
|
-
|
|
191
191
|
|
|
192
192
|
### `root` :
|
|
193
|
+
|
|
193
194
|
```
|
|
194
195
|
Usage: underpost root [options]
|
|
195
196
|
|
|
@@ -197,11 +198,11 @@ Displays the root path of the npm installation.
|
|
|
197
198
|
|
|
198
199
|
Options:
|
|
199
200
|
-h, --help display help for command
|
|
200
|
-
|
|
201
|
+
|
|
201
202
|
```
|
|
202
|
-
|
|
203
203
|
|
|
204
204
|
### `cluster` :
|
|
205
|
+
|
|
205
206
|
```
|
|
206
207
|
Usage: underpost cluster [options] [pod-name]
|
|
207
208
|
|
|
@@ -255,11 +256,11 @@ Options:
|
|
|
255
256
|
--k3s Initializes the cluster using K3s (Lightweight
|
|
256
257
|
Kubernetes).
|
|
257
258
|
-h, --help display help for command
|
|
258
|
-
|
|
259
|
+
|
|
259
260
|
```
|
|
260
|
-
|
|
261
261
|
|
|
262
262
|
### `deploy` :
|
|
263
|
+
|
|
263
264
|
```
|
|
264
265
|
Usage: underpost deploy [options] [deploy-list] [env]
|
|
265
266
|
|
|
@@ -306,11 +307,11 @@ Options:
|
|
|
306
307
|
bundles (only static public or storage
|
|
307
308
|
client files).
|
|
308
309
|
-h, --help display help for command
|
|
309
|
-
|
|
310
|
+
|
|
310
311
|
```
|
|
311
|
-
|
|
312
312
|
|
|
313
313
|
### `secret` :
|
|
314
|
+
|
|
314
315
|
```
|
|
315
316
|
Usage: underpost secret [options] <platform>
|
|
316
317
|
|
|
@@ -328,11 +329,11 @@ Options:
|
|
|
328
329
|
--list Lists all available secrets for the
|
|
329
330
|
platform.
|
|
330
331
|
-h, --help display help for command
|
|
331
|
-
|
|
332
|
+
|
|
332
333
|
```
|
|
333
|
-
|
|
334
334
|
|
|
335
335
|
### `dockerfile-image-build` :
|
|
336
|
+
|
|
336
337
|
```
|
|
337
338
|
Usage: underpost dockerfile-image-build [options]
|
|
338
339
|
|
|
@@ -359,11 +360,11 @@ Options:
|
|
|
359
360
|
cache.
|
|
360
361
|
--k3s-load Loads the image into a K3s cluster.
|
|
361
362
|
-h, --help display help for command
|
|
362
|
-
|
|
363
|
+
|
|
363
364
|
```
|
|
364
|
-
|
|
365
365
|
|
|
366
366
|
### `dockerfile-pull-base-images` :
|
|
367
|
+
|
|
367
368
|
```
|
|
368
369
|
Usage: underpost dockerfile-pull-base-images [options]
|
|
369
370
|
|
|
@@ -377,11 +378,11 @@ Options:
|
|
|
377
378
|
--version Sets a custom version for the base images.
|
|
378
379
|
--k3s-load Loads the image into a K3s cluster.
|
|
379
380
|
-h, --help display help for command
|
|
380
|
-
|
|
381
|
+
|
|
381
382
|
```
|
|
382
|
-
|
|
383
383
|
|
|
384
384
|
### `install` :
|
|
385
|
+
|
|
385
386
|
```
|
|
386
387
|
Usage: underpost install [options]
|
|
387
388
|
|
|
@@ -389,11 +390,11 @@ Quickly imports Underpost npm dependencies by copying them.
|
|
|
389
390
|
|
|
390
391
|
Options:
|
|
391
392
|
-h, --help display help for command
|
|
392
|
-
|
|
393
|
+
|
|
393
394
|
```
|
|
394
|
-
|
|
395
395
|
|
|
396
396
|
### `db` :
|
|
397
|
+
|
|
397
398
|
```
|
|
398
399
|
Usage: underpost db [options] <deploy-list>
|
|
399
400
|
|
|
@@ -423,11 +424,11 @@ Options:
|
|
|
423
424
|
--ns <ns-name> Optional: Specifies the namespace context for
|
|
424
425
|
database operations.
|
|
425
426
|
-h, --help display help for command
|
|
426
|
-
|
|
427
|
+
|
|
427
428
|
```
|
|
428
|
-
|
|
429
429
|
|
|
430
430
|
### `script` :
|
|
431
|
+
|
|
431
432
|
```
|
|
432
433
|
Usage: underpost script [options] <operator> <script-name> [script-value]
|
|
433
434
|
|
|
@@ -449,11 +450,11 @@ Options:
|
|
|
449
450
|
execution.
|
|
450
451
|
--pod-name <pod-name> Optional: Specifies the pod name for script execution.
|
|
451
452
|
-h, --help display help for command
|
|
452
|
-
|
|
453
|
+
|
|
453
454
|
```
|
|
454
|
-
|
|
455
455
|
|
|
456
456
|
### `cron` :
|
|
457
|
+
|
|
457
458
|
```
|
|
458
459
|
Usage: underpost cron [options] [deploy-list] [job-list]
|
|
459
460
|
|
|
@@ -474,11 +475,11 @@ Options:
|
|
|
474
475
|
--dashboard-update Updates dashboard cron data with the current job
|
|
475
476
|
configurations.
|
|
476
477
|
-h, --help display help for command
|
|
477
|
-
|
|
478
|
+
|
|
478
479
|
```
|
|
479
|
-
|
|
480
480
|
|
|
481
481
|
### `fs` :
|
|
482
|
+
|
|
482
483
|
```
|
|
483
484
|
Usage: underpost fs [options] [path]
|
|
484
485
|
|
|
@@ -496,11 +497,11 @@ Options:
|
|
|
496
497
|
--force Forces the action, overriding any warnings or conflicts.
|
|
497
498
|
--storage-file-path <storage-file-path> Specifies a custom file storage path.
|
|
498
499
|
-h, --help display help for command
|
|
499
|
-
|
|
500
|
+
|
|
500
501
|
```
|
|
501
|
-
|
|
502
502
|
|
|
503
503
|
### `test` :
|
|
504
|
+
|
|
504
505
|
```
|
|
505
506
|
Usage: underpost test [options] [deploy-list]
|
|
506
507
|
|
|
@@ -522,11 +523,11 @@ Options:
|
|
|
522
523
|
--kind-type <kind-type> Optional: Specifies the Kind cluster type for
|
|
523
524
|
tests.
|
|
524
525
|
-h, --help display help for command
|
|
525
|
-
|
|
526
|
+
|
|
526
527
|
```
|
|
527
|
-
|
|
528
528
|
|
|
529
529
|
### `monitor` :
|
|
530
|
+
|
|
530
531
|
```
|
|
531
532
|
Usage: underpost monitor [options] <deploy-id> [env]
|
|
532
533
|
|
|
@@ -549,11 +550,11 @@ Options:
|
|
|
549
550
|
--sync Synchronizes with current proxy deployments and
|
|
550
551
|
traffic configurations.
|
|
551
552
|
-h, --help display help for command
|
|
552
|
-
|
|
553
|
+
|
|
553
554
|
```
|
|
554
|
-
|
|
555
555
|
|
|
556
556
|
### `ssh` :
|
|
557
|
+
|
|
557
558
|
```
|
|
558
559
|
Usage: underpost ssh [options]
|
|
559
560
|
|
|
@@ -563,11 +564,11 @@ Options:
|
|
|
563
564
|
--generate Generates new ssh credential and stores it in current private
|
|
564
565
|
keys file storage.
|
|
565
566
|
-h, --help display help for command
|
|
566
|
-
|
|
567
|
+
|
|
567
568
|
```
|
|
568
|
-
|
|
569
569
|
|
|
570
570
|
### `run` :
|
|
571
|
+
|
|
571
572
|
```
|
|
572
573
|
Usage: underpost run [options] <runner-id> [path]
|
|
573
574
|
|
|
@@ -589,11 +590,11 @@ Options:
|
|
|
589
590
|
--container-name <container-name> Optional: Specifies the container name for test execution.
|
|
590
591
|
--namespace <namespace> Optional: Specifies the namespace for test execution.
|
|
591
592
|
-h, --help display help for command
|
|
592
|
-
|
|
593
|
+
|
|
593
594
|
```
|
|
594
|
-
|
|
595
595
|
|
|
596
596
|
### `lxd` :
|
|
597
|
+
|
|
597
598
|
```
|
|
598
599
|
Usage: underpost lxd [options]
|
|
599
600
|
|
|
@@ -634,11 +635,11 @@ Options:
|
|
|
634
635
|
--auto-expose-k8s-ports <vm-id> Automatically exposes common Kubernetes
|
|
635
636
|
ports for the specified VM.
|
|
636
637
|
-h, --help display help for command
|
|
637
|
-
|
|
638
|
+
|
|
638
639
|
```
|
|
639
|
-
|
|
640
640
|
|
|
641
641
|
### `baremetal` :
|
|
642
|
+
|
|
642
643
|
```
|
|
643
644
|
Usage: underpost baremetal [options] [workflow-id] [hostname] [ip-address]
|
|
644
645
|
|
|
@@ -672,6 +673,5 @@ Options:
|
|
|
672
673
|
baremetal operations.
|
|
673
674
|
--ls Lists available boot resources and machines.
|
|
674
675
|
-h, --help display help for command
|
|
675
|
-
|
|
676
|
+
|
|
676
677
|
```
|
|
677
|
-
|
package/docker-compose.yml
CHANGED
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-template-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v2.8.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.8.851
|
|
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-template-development-green
|
|
103
|
-
image: localhost/rockylinux9-underpost:v2.8.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v2.8.851
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|
package/package.json
CHANGED
|
@@ -31,20 +31,10 @@ const UserService = {
|
|
|
31
31
|
const token = hashJWT({ email: req.body.email }, '15m');
|
|
32
32
|
const payloadToken = hashJWT({ email: req.body.email }, '15m');
|
|
33
33
|
const id = `${options.host}${options.path}`;
|
|
34
|
-
const translate =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
P1: {
|
|
40
|
-
en: 'To recover your account, please click the button below:',
|
|
41
|
-
es: 'Para recuperar tu cuenta, haz click en el botón de abajo:',
|
|
42
|
-
},
|
|
43
|
-
BTN_LABEL: {
|
|
44
|
-
en: 'Recover Password',
|
|
45
|
-
es: 'Recuperar Contraseña',
|
|
46
|
-
},
|
|
47
|
-
};
|
|
34
|
+
const translate = MailerProvider.instance[id].translateTemplates.recoverEmail;
|
|
35
|
+
const recoverUrl = `${process.env.NODE_ENV === 'development' ? 'http://' : 'https://'}${req.hostname}${
|
|
36
|
+
req.body.proxyPath
|
|
37
|
+
}recover?payload=${payloadToken}`;
|
|
48
38
|
const sendResult = await MailerProvider.send({
|
|
49
39
|
id,
|
|
50
40
|
sendOptions: {
|
|
@@ -55,13 +45,8 @@ const UserService = {
|
|
|
55
45
|
.replace('{{H1}}', translate.H1[req.lang])
|
|
56
46
|
.replace('{{P1}}', translate.P1[req.lang])
|
|
57
47
|
.replace('{{TOKEN}}', token)
|
|
58
|
-
.replace(`{{COMPANY}}`,
|
|
59
|
-
.replace(
|
|
60
|
-
'{{RECOVER_WEB_URL}}',
|
|
61
|
-
`${process.env === 'development' ? 'http://' : 'https://'}${options.host}${options.path}${
|
|
62
|
-
options.path === '/' ? 'recover' : `/recover`
|
|
63
|
-
}?payload=${payloadToken}`,
|
|
64
|
-
)
|
|
48
|
+
.replace(`{{COMPANY}}`, req.hostname) // html body
|
|
49
|
+
.replace('{{RECOVER_WEB_URL}}', recoverUrl)
|
|
65
50
|
.replace('{{RECOVER_BTN_LABEL}}', translate.BTN_LABEL[req.lang]),
|
|
66
51
|
|
|
67
52
|
attachments: [
|
|
@@ -98,18 +83,7 @@ const UserService = {
|
|
|
98
83
|
},
|
|
99
84
|
);
|
|
100
85
|
}
|
|
101
|
-
const translate =
|
|
102
|
-
H1: {
|
|
103
|
-
en: 'Confirm Your Email',
|
|
104
|
-
zh: '请确认您的电子邮箱',
|
|
105
|
-
es: 'Confirma tu correo electrónico',
|
|
106
|
-
},
|
|
107
|
-
P1: {
|
|
108
|
-
en: 'Email confirmed! Thanks.',
|
|
109
|
-
zh: '电子邮箱已确认!感谢。',
|
|
110
|
-
es: 'Correo electrónico confirmado! Gracias.',
|
|
111
|
-
},
|
|
112
|
-
};
|
|
86
|
+
const translate = MailerProvider.instance[id].translateTemplates.confirmEmail;
|
|
113
87
|
const sendResult = await MailerProvider.send({
|
|
114
88
|
id,
|
|
115
89
|
sendOptions: {
|
|
@@ -120,7 +94,7 @@ const UserService = {
|
|
|
120
94
|
.replace('{{H1}}', translate.H1[req.lang])
|
|
121
95
|
.replace('{{P1}}', translate.P1[req.lang])
|
|
122
96
|
.replace('{{TOKEN}}', token)
|
|
123
|
-
.replace(`{{COMPANY}}`,
|
|
97
|
+
.replace(`{{COMPANY}}`, req.hostname), // html body
|
|
124
98
|
attachments: [
|
|
125
99
|
// {
|
|
126
100
|
// filename: 'logo.png',
|
|
@@ -7,7 +7,7 @@ import { Modal, renderViewTitle } from './Modal.js';
|
|
|
7
7
|
import { DocumentService } from '../../services/document/document.service.js';
|
|
8
8
|
import { CoreService, getApiBaseUrl } from '../../services/core/core.service.js';
|
|
9
9
|
import { loggerFactory } from './Logger.js';
|
|
10
|
-
import { imageShimmer, renderCssAttr } from './Css.js';
|
|
10
|
+
import { imageShimmer, renderChessPattern, renderCssAttr, styleFactory } from './Css.js';
|
|
11
11
|
|
|
12
12
|
const logger = loggerFactory(import.meta);
|
|
13
13
|
|
|
@@ -114,7 +114,6 @@ const Content = {
|
|
|
114
114
|
width: '100%',
|
|
115
115
|
border: 'none',
|
|
116
116
|
};
|
|
117
|
-
options.style = `style="${renderCssAttr(options)}"`;
|
|
118
117
|
if (!options.class) options.class = ``;
|
|
119
118
|
const { container, file } = options;
|
|
120
119
|
const ext = file.name.split('.')[file.name.split('.').length - 1];
|
|
@@ -126,7 +125,7 @@ const Content = {
|
|
|
126
125
|
const content = options.url
|
|
127
126
|
? await CoreService.getRaw({ url: options.url })
|
|
128
127
|
: await getRawContentFile(getBlobFromUint8ArrayFile(file.data.data, file.mimetype));
|
|
129
|
-
render += html`<div class="${options.class}" ${options.style}>${marked.parse(content)}</div>`;
|
|
128
|
+
render += html`<div class="${options.class}" ${styleFactory(options.style)}>${marked.parse(content)}</div>`;
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
break;
|
|
@@ -135,13 +134,18 @@ const Content = {
|
|
|
135
134
|
case 'jpeg':
|
|
136
135
|
case 'webp':
|
|
137
136
|
case 'svg':
|
|
137
|
+
case 'gif':
|
|
138
138
|
case 'png': {
|
|
139
139
|
const url = options.url
|
|
140
140
|
? options.url
|
|
141
141
|
: file._id
|
|
142
142
|
? getApiBaseUrl({ id: file._id, endpoint: 'file/blob' })
|
|
143
143
|
: URL.createObjectURL(getBlobFromUint8ArrayFile(file.data.data, file.mimetype));
|
|
144
|
-
const imgRender = html`<img
|
|
144
|
+
const imgRender = html`<img
|
|
145
|
+
class="in ${options.class}"
|
|
146
|
+
${styleFactory(options.style, `${renderChessPattern(50)}`)}
|
|
147
|
+
src="${url}"
|
|
148
|
+
/>`;
|
|
145
149
|
render += imgRender;
|
|
146
150
|
break;
|
|
147
151
|
}
|
|
@@ -153,14 +157,14 @@ const Content = {
|
|
|
153
157
|
: URL.createObjectURL(getBlobFromUint8ArrayFile(file.data.data, file.mimetype));
|
|
154
158
|
render += html`<iframe
|
|
155
159
|
class="in ${options.class} iframe-${options.idModal}"
|
|
156
|
-
${options.style}
|
|
160
|
+
${styleFactory(options.style)}
|
|
157
161
|
src="${url}"
|
|
158
162
|
></iframe>`;
|
|
159
163
|
break;
|
|
160
164
|
}
|
|
161
165
|
|
|
162
166
|
case 'json':
|
|
163
|
-
render += html`<pre class="in ${options.class}" ${options.style}>
|
|
167
|
+
render += html`<pre class="in ${options.class}" ${styleFactory(options.style)}>
|
|
164
168
|
${JSON.stringify(
|
|
165
169
|
JSON.parse(
|
|
166
170
|
options.url
|
|
@@ -174,7 +178,7 @@ const Content = {
|
|
|
174
178
|
break;
|
|
175
179
|
|
|
176
180
|
default:
|
|
177
|
-
render += html`<div class="in ${options.class}" ${options.style}>
|
|
181
|
+
render += html`<div class="in ${options.class}" ${styleFactory(options.style)}>
|
|
178
182
|
${options.url
|
|
179
183
|
? await CoreService.getRaw({ url: options.url })
|
|
180
184
|
: await getRawContentFile(getBlobFromUint8ArrayFile(file.data.data, file.mimetype))}
|
|
@@ -1026,7 +1026,8 @@ const imageShimmer = () => html`<div
|
|
|
1026
1026
|
</div>
|
|
1027
1027
|
</div>`;
|
|
1028
1028
|
|
|
1029
|
-
const renderChessPattern = (
|
|
1029
|
+
const renderChessPattern = (patternSize = 20) =>
|
|
1030
|
+
`background: repeating-conic-gradient(#808080 0 25%, #0000 0 50%) 50% / ${patternSize}px ${patternSize}px`;
|
|
1030
1031
|
|
|
1031
1032
|
const extractBackgroundImageUrl = (element) => {
|
|
1032
1033
|
const style = window.getComputedStyle(element);
|
|
@@ -1044,6 +1045,8 @@ const simpleIconsRender = (selector) => {
|
|
|
1044
1045
|
});
|
|
1045
1046
|
};
|
|
1046
1047
|
|
|
1048
|
+
const styleFactory = (payload, plain = '') => `style="${renderCssAttr({ style: payload })} ${plain}"`;
|
|
1049
|
+
|
|
1047
1050
|
export {
|
|
1048
1051
|
Css,
|
|
1049
1052
|
Themes,
|
|
@@ -1083,4 +1086,5 @@ export {
|
|
|
1083
1086
|
lightenHex,
|
|
1084
1087
|
darkenHex,
|
|
1085
1088
|
adjustHex,
|
|
1089
|
+
styleFactory,
|
|
1086
1090
|
};
|
|
@@ -359,4 +359,9 @@ const InputFile = {
|
|
|
359
359
|
},
|
|
360
360
|
};
|
|
361
361
|
|
|
362
|
-
|
|
362
|
+
function isTextInputFocused() {
|
|
363
|
+
const active = document.activeElement;
|
|
364
|
+
return active && (active.tagName === 'INPUT' || active.tagName === 'TEXTAREA');
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export { Input, InputFile, fileFormDataFactory, getSrcFromFileData, getFileFromFileData, isTextInputFocused };
|
|
@@ -8,7 +8,7 @@ import { Webhook } from './Webhook.js';
|
|
|
8
8
|
const LogOut = {
|
|
9
9
|
Event: {},
|
|
10
10
|
Trigger: async function (options) {
|
|
11
|
-
LogIn.
|
|
11
|
+
LogIn.cleanMainUser();
|
|
12
12
|
await Webhook.unregister();
|
|
13
13
|
for (const eventKey of Object.keys(this.Event)) await this.Event[eventKey](options);
|
|
14
14
|
if (s(`.session`))
|
|
@@ -28,7 +28,7 @@ import { setDocTitle, closeModalRouteChangeEvent, handleModalViewRoute } from '.
|
|
|
28
28
|
import { NotificationManager } from './NotificationManager.js';
|
|
29
29
|
import { EventsUI } from './EventsUI.js';
|
|
30
30
|
import { Translate } from './Translate.js';
|
|
31
|
-
import { Input } from './Input.js';
|
|
31
|
+
import { Input, isTextInputFocused } from './Input.js';
|
|
32
32
|
import { Validator } from './Validator.js';
|
|
33
33
|
import { DropDown } from './DropDown.js';
|
|
34
34
|
import { Keyboard } from './Keyboard.js';
|
|
@@ -186,7 +186,7 @@ const Modal = {
|
|
|
186
186
|
`.default-slide-menu-top-bar-fix-title-container`,
|
|
187
187
|
html`
|
|
188
188
|
<div class="inl default-slide-menu-top-bar-fix-title-container-text">
|
|
189
|
-
${options.RouterInstance.
|
|
189
|
+
${options.RouterInstance.BannerAppTemplate}
|
|
190
190
|
</div>
|
|
191
191
|
`,
|
|
192
192
|
);
|
|
@@ -608,6 +608,7 @@ const Modal = {
|
|
|
608
608
|
}),
|
|
609
609
|
);
|
|
610
610
|
s(`.search-result-btn-${result.routerId}`).onclick = () => {
|
|
611
|
+
if (!s(`.html-${searchBoxHistoryId}`) || !s(`.html-${searchBoxHistoryId}`).hasChildNodes()) return;
|
|
611
612
|
s(`.html-${searchBoxHistoryId}`).childNodes[currentKeyBoardSearchBoxIndex].classList.remove(
|
|
612
613
|
`main-btn-menu-active`,
|
|
613
614
|
);
|
|
@@ -621,6 +622,7 @@ const Modal = {
|
|
|
621
622
|
};
|
|
622
623
|
|
|
623
624
|
const getResultSearchBox = (validatorData) => {
|
|
625
|
+
if (!s(`.html-${searchBoxHistoryId}`) || !s(`.html-${searchBoxHistoryId}`).hasChildNodes()) return;
|
|
624
626
|
const { model, id } = validatorData;
|
|
625
627
|
switch (model) {
|
|
626
628
|
case 'search-box':
|
|
@@ -998,6 +1000,7 @@ const Modal = {
|
|
|
998
1000
|
['Alt', 'k'],
|
|
999
1001
|
],
|
|
1000
1002
|
eventCallBack: () => {
|
|
1003
|
+
if (isTextInputFocused()) return;
|
|
1001
1004
|
if (s(`.top-bar-search-box`)) {
|
|
1002
1005
|
if (s(`.main-body-btn-ui-close`).classList.contains('hide')) {
|
|
1003
1006
|
s(`.main-body-btn-ui-open`).click();
|
|
@@ -7,7 +7,7 @@ import { LogIn } from './LogIn.js';
|
|
|
7
7
|
import { NotificationManager } from './NotificationManager.js';
|
|
8
8
|
import { Translate } from './Translate.js';
|
|
9
9
|
import { Validator } from './Validator.js';
|
|
10
|
-
import { getQueryParams, s } from './VanillaJs.js';
|
|
10
|
+
import { getProxyPath, getQueryParams, s } from './VanillaJs.js';
|
|
11
11
|
|
|
12
12
|
const Recover = {
|
|
13
13
|
Event: {},
|
|
@@ -80,6 +80,7 @@ const Recover = {
|
|
|
80
80
|
}
|
|
81
81
|
switch (mode) {
|
|
82
82
|
case 'recover-verify-email': {
|
|
83
|
+
body.proxyPath = getProxyPath();
|
|
83
84
|
const result = await UserService.post({ id: 'recover-verify-email', body });
|
|
84
85
|
NotificationManager.Push({
|
|
85
86
|
html:
|
|
@@ -133,22 +133,56 @@ const copyData = (data) =>
|
|
|
133
133
|
const pasteData = () => new Promise((resolve) => navigator.clipboard.readText().then((clipText) => resolve(clipText)));
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
* Normalize a path/URL (ensure leading slash, collapse duplicate slashes,
|
|
137
|
+
* keep query + hash, remove trailing slash except for root).
|
|
138
|
+
* Examples:
|
|
139
|
+
* - 'a/b' -> '/a/b'
|
|
140
|
+
* - '/a//b/' -> '/a/b'
|
|
141
|
+
* - 'https://example.com/a/b?q=1#top' -> '/a/b?q=1#top' (origin ignored)
|
|
142
|
+
* - '#section' -> '/current/path#section' (resolved relative by new URL)
|
|
143
|
+
*/
|
|
144
|
+
function normalizePath(input) {
|
|
145
|
+
// ensure string and trim
|
|
146
|
+
if (typeof input !== 'string') input = String(input ?? '');
|
|
147
|
+
input = input.trim();
|
|
148
|
+
|
|
149
|
+
// empty -> root
|
|
150
|
+
if (input === '') return '/';
|
|
151
|
+
|
|
152
|
+
// Use URL to parse relative or absolute paths relative to current origin
|
|
153
|
+
let url;
|
|
154
|
+
try {
|
|
155
|
+
url = new URL(input, window.location.origin);
|
|
156
|
+
} catch (e) {
|
|
157
|
+
// fallback (very rare)
|
|
158
|
+
input = input.replace(/\s+/g, ''); // remove problematic spaces
|
|
159
|
+
input = input.replace(/\/+/g, '/'); // collapse multiple '/'
|
|
160
|
+
if (!input.startsWith('/')) input = '/' + input;
|
|
161
|
+
if (input.length > 1 && input.endsWith('/')) input = input.slice(0, -1);
|
|
162
|
+
return input;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Normalize pathname: collapse slashes, ensure leading slash, remove trailing except root
|
|
166
|
+
let pathname = url.pathname.replace(/\/+/g, '/');
|
|
167
|
+
if (!pathname.startsWith('/')) pathname = '/' + pathname;
|
|
168
|
+
if (pathname.length > 1 && pathname.endsWith('/')) pathname = pathname.slice(0, -1);
|
|
169
|
+
|
|
170
|
+
// Rebuild: pathname + search + hash
|
|
171
|
+
return pathname + url.search + url.hash;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Improved setPath: normalizes path and avoids pushState if nothing changes.
|
|
148
176
|
*/
|
|
149
177
|
const setPath = (path = '/', stateStorage = {}, title = '') => {
|
|
150
|
-
|
|
151
|
-
|
|
178
|
+
const normalized = normalizePath(path);
|
|
179
|
+
|
|
180
|
+
// Compare the full form (pathname + search + hash) with current
|
|
181
|
+
const currentFull = window.location.pathname + window.location.search + window.location.hash;
|
|
182
|
+
if (currentFull === normalized) return; // nothing to do
|
|
183
|
+
|
|
184
|
+
// pushState: third arg should be a path relative to same origin (we pass normalized)
|
|
185
|
+
return history.pushState(stateStorage, title, normalized);
|
|
152
186
|
};
|
|
153
187
|
|
|
154
188
|
/**
|
|
@@ -35,7 +35,7 @@ const MenuDefault = {
|
|
|
35
35
|
const id = getId(this.Data, 'menu-');
|
|
36
36
|
this.Data[id] = {};
|
|
37
37
|
const RouterInstance = RouterDefault();
|
|
38
|
-
const {
|
|
38
|
+
const { BannerAppTemplate } = RouterInstance;
|
|
39
39
|
const { barConfig } = await Themes[Css.currentTheme]();
|
|
40
40
|
const heightTopBar = 50;
|
|
41
41
|
const heightBottomBar = 50;
|
|
@@ -162,7 +162,7 @@ const MenuDefault = {
|
|
|
162
162
|
</div>
|
|
163
163
|
`,
|
|
164
164
|
barConfig: newInstance(barConfig),
|
|
165
|
-
title:
|
|
165
|
+
title: BannerAppTemplate,
|
|
166
166
|
// titleClass: 'hide',
|
|
167
167
|
titleRender: () => {
|
|
168
168
|
ThemeEvents['titleRender'] = () => {
|
|
@@ -4,7 +4,7 @@ import { getProxyPath, s } from '../core/VanillaJs.js';
|
|
|
4
4
|
|
|
5
5
|
const logger = loggerFactory(import.meta);
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const BannerAppTemplate = html`<strong class="inl" style="font-family: system-ui">PWA</strong>`;
|
|
8
8
|
|
|
9
9
|
// Router
|
|
10
10
|
const RoutesDefault = () => {
|
|
@@ -12,7 +12,6 @@ const RoutesDefault = () => {
|
|
|
12
12
|
'/': {
|
|
13
13
|
title: 'Home',
|
|
14
14
|
render: () => Modal.onHomeRouterEvent(),
|
|
15
|
-
upperCase: false,
|
|
16
15
|
},
|
|
17
16
|
'/home': { title: 'home', render: () => Modal.onHomeRouterEvent() },
|
|
18
17
|
'/settings': { title: 'settings', render: () => s(`.main-btn-settings`).click() },
|
|
@@ -40,7 +39,7 @@ const RoutesDefault = () => {
|
|
|
40
39
|
window.Routes = RoutesDefault;
|
|
41
40
|
|
|
42
41
|
const RouterDefault = () => {
|
|
43
|
-
return { Routes: RoutesDefault,
|
|
42
|
+
return { Routes: RoutesDefault, BannerAppTemplate };
|
|
44
43
|
};
|
|
45
44
|
|
|
46
|
-
export { RoutesDefault, RouterDefault,
|
|
45
|
+
export { RoutesDefault, RouterDefault, BannerAppTemplate };
|
package/src/index.js
CHANGED
|
@@ -48,6 +48,43 @@ const MailerProvider = {
|
|
|
48
48
|
...options,
|
|
49
49
|
transporter,
|
|
50
50
|
templates: await EmailRender.getTemplates(options),
|
|
51
|
+
translateTemplates: {
|
|
52
|
+
confirmEmail: {
|
|
53
|
+
H1: {
|
|
54
|
+
en: 'Confirm Your Email',
|
|
55
|
+
es: 'Confirma tu correo electrónico',
|
|
56
|
+
},
|
|
57
|
+
P1: {
|
|
58
|
+
en: `Email confirmed! Thanks.
|
|
59
|
+
<br />
|
|
60
|
+
<span style="font-size: 12px; color: gray">
|
|
61
|
+
If it is not automatically verified,
|
|
62
|
+
please allow the image to be seen, thank you.
|
|
63
|
+
</span>
|
|
64
|
+
`,
|
|
65
|
+
es: `Correo electrónico confirmado! Gracias.
|
|
66
|
+
<br />
|
|
67
|
+
<span style="font-size: 12px; color: gray">
|
|
68
|
+
Si no se verifica automáticamente, por favor permita que se vea la imagen, gracias.
|
|
69
|
+
</span>
|
|
70
|
+
`,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
recoverEmail: {
|
|
74
|
+
H1: {
|
|
75
|
+
en: 'Recover your account',
|
|
76
|
+
es: 'Recupera tu cuenta',
|
|
77
|
+
},
|
|
78
|
+
P1: {
|
|
79
|
+
en: 'To recover your account, please click the button below:',
|
|
80
|
+
es: 'Para recuperar tu cuenta, haz click en el botón de abajo:',
|
|
81
|
+
},
|
|
82
|
+
BTN_LABEL: {
|
|
83
|
+
en: 'Recover Password',
|
|
84
|
+
es: 'Recuperar Contraseña',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
51
88
|
};
|
|
52
89
|
|
|
53
90
|
return this.instance[id];
|