underpost 2.8.531 → 2.8.611
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/.github/workflows/ghpkg.yml +1 -1
- package/.github/workflows/npmpkg.yml +1 -1
- package/.github/workflows/pwa-microservices-template.page.yml +1 -1
- package/.vscode/settings.json +3 -0
- package/bin/build.js +29 -4
- package/bin/deploy.js +2 -1
- package/bin/index.js +34 -6
- package/bin/vs.js +1 -0
- package/conf.js +0 -2
- package/docker-compose.yml +1 -1
- package/manifests/kind-config-dev.yaml +12 -0
- package/manifests/mongodb/kustomization.yaml +2 -2
- package/manifests/mongodb-4.4/service-deployment.yaml +5 -4
- package/package.json +8 -7
- package/src/cli/cluster.js +58 -32
- package/src/cli/cron.js +1 -1
- package/src/cli/db.js +102 -38
- package/src/cli/deploy.js +71 -38
- package/src/cli/fs.js +149 -0
- package/src/cli/image.js +36 -6
- package/src/cli/repository.js +21 -0
- package/src/cli/script.js +12 -6
- package/src/cli/test.js +19 -8
- package/src/client/components/core/CalendarCore.js +12 -1
- package/src/client/components/core/CommonJs.js +52 -1
- package/src/client/components/core/CssCore.js +2 -4
- package/src/client/components/core/Docs.js +1 -2
- package/src/client/components/core/Input.js +4 -2
- package/src/client/components/core/LoadingAnimation.js +8 -1
- package/src/client/components/core/Modal.js +30 -6
- package/src/client/components/core/Panel.js +8 -6
- package/src/client/components/core/PanelForm.js +23 -7
- package/src/client/services/core/core.service.js +15 -10
- package/src/client/ssr/Render.js +4 -1
- package/src/client/ssr/body/CacheControl.js +2 -3
- package/src/client/sw/default.sw.js +3 -3
- package/src/index.js +9 -1
- package/src/server/backup.js +2 -2
- package/src/server/client-build.js +32 -23
- package/src/server/client-formatted.js +2 -1
- package/src/server/conf.js +1 -1
- package/src/server/dns.js +2 -2
- package/src/server/runtime.js +16 -1
- package/manifests/valkey/underpost-engine-valkey-service.yaml +0 -17
- package/manifests/valkey/underpost-engine-valkey-statefulset.yaml +0 -39
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
4
|
import vm from 'node:vm';
|
|
5
|
+
import Underpost from '../index.js';
|
|
5
6
|
|
|
6
7
|
const srcFormatted = (src) =>
|
|
7
8
|
src
|
|
@@ -49,7 +50,7 @@ const viewFormatted = (src, dists, proxyPath, baseHost = '') => {
|
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
const ssrFactory = async (componentPath = `./src/client/ssr/Render.js`) => {
|
|
52
|
-
const context = { SrrComponent: () => {}, npm_package_version:
|
|
53
|
+
const context = { SrrComponent: () => {}, npm_package_version: Underpost.version };
|
|
53
54
|
vm.createContext(context);
|
|
54
55
|
vm.runInContext(await srcFormatted(fs.readFileSync(componentPath, 'utf8')), context);
|
|
55
56
|
return context.SrrComponent;
|
package/src/server/conf.js
CHANGED
|
@@ -996,7 +996,7 @@ const Cmd = {
|
|
|
996
996
|
cron: (deployList, jobList, name, expression, options) =>
|
|
997
997
|
`pm2 start ./bin/index.js --no-autorestart --instances 1 --cron "${expression}" --name ${name} -- cron ${
|
|
998
998
|
options?.itc ? `--itc ` : ''
|
|
999
|
-
}${deployList} ${jobList}`,
|
|
999
|
+
}${options?.git ? `--git ` : ''}${deployList} ${jobList}`,
|
|
1000
1000
|
};
|
|
1001
1001
|
|
|
1002
1002
|
const fixDependencies = async () => {
|
package/src/server/dns.js
CHANGED
|
@@ -12,8 +12,8 @@ const logger = loggerFactory(import.meta);
|
|
|
12
12
|
|
|
13
13
|
class Dns {
|
|
14
14
|
static callback = async function (deployList) {
|
|
15
|
-
//
|
|
16
|
-
// LAN
|
|
15
|
+
// Network topology configuration:
|
|
16
|
+
// LAN -> [NAT-VPS](modem/router device) -> WAN
|
|
17
17
|
// enabled DMZ Host to proxy IP 80-443 (79-444) sometimes router block first port
|
|
18
18
|
// disabled local red DHCP
|
|
19
19
|
// verify inet ip proxy server address
|
package/src/server/runtime.js
CHANGED
|
@@ -19,7 +19,8 @@ import { DataBaseProvider } from '../db/DataBaseProvider.js';
|
|
|
19
19
|
import { createPeerServer } from './peer.js';
|
|
20
20
|
import { Lampp } from '../runtime/lampp/Lampp.js';
|
|
21
21
|
import { getDeployId } from './conf.js';
|
|
22
|
-
import { ssrFactory } from './client-formatted.js';
|
|
22
|
+
import { JSONweb, ssrFactory } from './client-formatted.js';
|
|
23
|
+
import Underpost from '../index.js';
|
|
23
24
|
|
|
24
25
|
dotenv.config();
|
|
25
26
|
|
|
@@ -384,6 +385,13 @@ const buildRuntime = async () => {
|
|
|
384
385
|
ssrPath,
|
|
385
386
|
ssrHeadComponents: '',
|
|
386
387
|
ssrBodyComponents: (await ssrFactory(`./src/client/ssr/body/404.js`))(),
|
|
388
|
+
renderPayload: {
|
|
389
|
+
apiBasePath: process.env.BASE_API,
|
|
390
|
+
version: Underpost.version,
|
|
391
|
+
},
|
|
392
|
+
renderApi: {
|
|
393
|
+
JSONweb,
|
|
394
|
+
},
|
|
387
395
|
});
|
|
388
396
|
const path404 = `${directory ? directory : `${getRootDirectory()}${rootHostPath}`}/404/index.html`;
|
|
389
397
|
const page404 = fs.existsSync(path404) ? `${path === '/' ? '' : path}/404` : undefined;
|
|
@@ -400,6 +408,13 @@ const buildRuntime = async () => {
|
|
|
400
408
|
ssrPath,
|
|
401
409
|
ssrHeadComponents: '',
|
|
402
410
|
ssrBodyComponents: (await ssrFactory(`./src/client/ssr/body/500.js`))(),
|
|
411
|
+
renderPayload: {
|
|
412
|
+
apiBasePath: process.env.BASE_API,
|
|
413
|
+
version: Underpost.version,
|
|
414
|
+
},
|
|
415
|
+
renderApi: {
|
|
416
|
+
JSONweb,
|
|
417
|
+
},
|
|
403
418
|
});
|
|
404
419
|
const path500 = `${directory ? directory : `${getRootDirectory()}${rootHostPath}`}/500/index.html`;
|
|
405
420
|
const page500 = fs.existsSync(path500) ? `${path === '/' ? '' : path}/500` : undefined;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: v1
|
|
3
|
-
kind: Service
|
|
4
|
-
metadata:
|
|
5
|
-
name: service-valkey
|
|
6
|
-
namespace: default
|
|
7
|
-
spec:
|
|
8
|
-
ports:
|
|
9
|
-
- port: 6379
|
|
10
|
-
targetPort: 6379
|
|
11
|
-
selector:
|
|
12
|
-
app: service-valkey
|
|
13
|
-
ipFamilyPolicy: PreferDualStack
|
|
14
|
-
ipFamilies:
|
|
15
|
-
- IPv4
|
|
16
|
-
# - IPv6
|
|
17
|
-
type: ClusterIP
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: apps/v1
|
|
3
|
-
kind: StatefulSet
|
|
4
|
-
metadata:
|
|
5
|
-
name: service-valkey
|
|
6
|
-
namespace: default
|
|
7
|
-
spec:
|
|
8
|
-
serviceName: service-valkey
|
|
9
|
-
replicas: 1
|
|
10
|
-
selector:
|
|
11
|
-
matchLabels:
|
|
12
|
-
app: service-valkey
|
|
13
|
-
template:
|
|
14
|
-
metadata:
|
|
15
|
-
labels:
|
|
16
|
-
app: service-valkey
|
|
17
|
-
spec:
|
|
18
|
-
containers:
|
|
19
|
-
- name: service-valkey
|
|
20
|
-
image: docker.io/valkey/valkey:latest
|
|
21
|
-
env:
|
|
22
|
-
- name: TZ
|
|
23
|
-
value: Europe/Zurich
|
|
24
|
-
ports:
|
|
25
|
-
- containerPort: 6379
|
|
26
|
-
startupProbe:
|
|
27
|
-
tcpSocket:
|
|
28
|
-
port: 6379
|
|
29
|
-
failureThreshold: 30
|
|
30
|
-
periodSeconds: 5
|
|
31
|
-
timeoutSeconds: 5
|
|
32
|
-
livenessProbe:
|
|
33
|
-
tcpSocket:
|
|
34
|
-
port: 6379
|
|
35
|
-
failureThreshold: 2
|
|
36
|
-
periodSeconds: 30
|
|
37
|
-
timeoutSeconds: 5
|
|
38
|
-
restartPolicy: Always
|
|
39
|
-
automountServiceAccountToken: false
|