underpost 2.89.45 → 2.90.1
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.production +2 -0
- package/README.md +3 -2
- package/bin/build.js +4 -0
- package/cli.md +73 -42
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +8 -24
- package/manifests/lxd/underpost-setup.sh +1 -1
- package/package.json +1 -1
- package/scripts/nvim.sh +1 -1
- package/src/cli/cluster.js +7 -21
- package/src/cli/db.js +34 -10
- package/src/cli/deploy.js +280 -116
- package/src/cli/index.js +27 -2
- package/src/cli/monitor.js +1 -1
- package/src/cli/run.js +216 -12
- package/src/cli/static.js +84 -0
- package/src/client/components/core/CalendarCore.js +1 -7
- package/src/client/components/core/Modal.js +2 -2
- package/src/client/components/core/Panel.js +1 -1
- package/src/client/components/core/PanelForm.js +1 -5
- package/src/client/components/default/MenuDefault.js +5 -30
- package/src/index.js +10 -1
- package/src/server/client-build.js +9 -33
- package/src/server/json-schema.js +0 -77
|
@@ -519,39 +519,15 @@ const buildClient = async (options = { liveClientBuildPaths: [], instances: [],
|
|
|
519
519
|
|
|
520
520
|
for (const ssrBodyComponent of confSSR[view.ssr].body) {
|
|
521
521
|
const SrrComponent = await ssrFactory(`./src/client/ssr/body/${ssrBodyComponent}.js`);
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
});
|
|
532
|
-
else ssrHeadComponents += SrrComponent({ metadata });
|
|
533
|
-
break;
|
|
534
|
-
|
|
535
|
-
case 'CyberiaSplashScreenLore': {
|
|
536
|
-
ssrBodyComponents += SrrComponent({
|
|
537
|
-
ssrPath,
|
|
538
|
-
host,
|
|
539
|
-
path,
|
|
540
|
-
ttiLoadTimeLimit,
|
|
541
|
-
});
|
|
542
|
-
break;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
default:
|
|
546
|
-
ssrBodyComponents += SrrComponent({
|
|
547
|
-
ssrPath,
|
|
548
|
-
host,
|
|
549
|
-
path,
|
|
550
|
-
ttiLoadTimeLimit,
|
|
551
|
-
version: Underpost.version,
|
|
552
|
-
});
|
|
553
|
-
break;
|
|
554
|
-
}
|
|
522
|
+
ssrBodyComponents += SrrComponent({
|
|
523
|
+
...metadata,
|
|
524
|
+
ssrPath,
|
|
525
|
+
host,
|
|
526
|
+
path,
|
|
527
|
+
ttiLoadTimeLimit,
|
|
528
|
+
version: Underpost.version,
|
|
529
|
+
backgroundImage: backgroundImage ? (path === '/' ? path : `${path}/`) + backgroundImage : undefined,
|
|
530
|
+
});
|
|
555
531
|
}
|
|
556
532
|
}
|
|
557
533
|
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
function isPlainObject(obj) {
|
|
2
|
-
return obj ? typeof obj === 'object' && Object.getPrototypeOf(obj) === Object.prototype : false;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
const supportType = ['string', 'number', 'array', 'object', 'boolean', 'integer'];
|
|
6
|
-
|
|
7
|
-
function getType(type) {
|
|
8
|
-
if (!type) type = 'string';
|
|
9
|
-
if (supportType.indexOf(type) !== -1) {
|
|
10
|
-
return type;
|
|
11
|
-
}
|
|
12
|
-
return typeof type;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function isSchema(object) {
|
|
16
|
-
if (supportType.indexOf(object.type) !== -1) {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function handleSchema(json, schema) {
|
|
23
|
-
Object.assign(schema, json);
|
|
24
|
-
if (schema.type === 'object') {
|
|
25
|
-
delete schema.properties;
|
|
26
|
-
parse(json.properties, schema);
|
|
27
|
-
}
|
|
28
|
-
if (schema.type === 'array') {
|
|
29
|
-
delete schema.items;
|
|
30
|
-
schema.items = {};
|
|
31
|
-
parse(json.items, schema.items);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function handleArray(arr, schema) {
|
|
36
|
-
schema.type = 'array';
|
|
37
|
-
let props = (schema.items = {});
|
|
38
|
-
parse(arr[0], props);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function handleObject(json, schema) {
|
|
42
|
-
if (isSchema(json)) {
|
|
43
|
-
return handleSchema(json, schema);
|
|
44
|
-
}
|
|
45
|
-
schema.type = 'object';
|
|
46
|
-
schema.required = [];
|
|
47
|
-
let props = (schema.properties = {});
|
|
48
|
-
for (let key in json) {
|
|
49
|
-
let item = json[key];
|
|
50
|
-
let curSchema = (props[key] = {});
|
|
51
|
-
if (key[0] === '*') {
|
|
52
|
-
delete props[key];
|
|
53
|
-
key = key.substr(1);
|
|
54
|
-
schema.required.push(key);
|
|
55
|
-
curSchema = props[key] = {};
|
|
56
|
-
}
|
|
57
|
-
parse(item, curSchema);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function parse(json, schema) {
|
|
62
|
-
if (Array.isArray(json)) {
|
|
63
|
-
handleArray(json, schema);
|
|
64
|
-
} else if (isPlainObject(json)) {
|
|
65
|
-
handleObject(json, schema);
|
|
66
|
-
} else {
|
|
67
|
-
schema.type = getType(json);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function ejs(data) {
|
|
72
|
-
let JsonSchema = {};
|
|
73
|
-
parse(data, JsonSchema);
|
|
74
|
-
return JsonSchema;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export { ejs };
|