@reldens/cms 0.6.0 → 0.8.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/admin/reldens-admin-client.css +29 -30
- package/admin/templates/dashboard.html +1 -1
- package/bin/reldens-cms.js +1 -1
- package/install/index.html +23 -9
- package/install/success.html +36 -0
- package/lib/admin-manager.js +41 -4
- package/lib/admin-templates-loader.js +37 -0
- package/lib/admin-translations.js +4 -218
- package/lib/allowed-extensions.js +11 -0
- package/lib/entities-loader.js +2 -6
- package/lib/frontend.js +25 -17
- package/lib/installer.js +144 -116
- package/lib/loaded-entities-processor.js +30 -0
- package/lib/manager.js +223 -56
- package/lib/mime-types.js +35 -0
- package/lib/templates-list.js +0 -9
- package/lib/templates-to-path-mapper.js +28 -0
- package/migrations/default-homepage.sql +10 -0
- package/migrations/install.sql +1 -23
- package/migrations/users-authentication.sql +16 -0
- package/package.json +2 -2
- package/templates/.env.dist +11 -11
- package/templates/assets/favicons/android-icon-144x144.png +0 -0
- package/templates/assets/favicons/android-icon-192x192.png +0 -0
- package/templates/assets/favicons/android-icon-512x512.png +0 -0
- package/templates/assets/favicons/apple-touch-icon.png +0 -0
- package/templates/assets/favicons/favicon-16x16.png +0 -0
- package/templates/assets/favicons/favicon-32x32.png +0 -0
- package/templates/assets/favicons/mstile-150x150.png +0 -0
- package/templates/assets/favicons/safari-pinned-tab.svg +121 -0
- package/templates/assets/web/loading.gif +0 -0
- package/templates/assets/web/reldens-your-logo-mage.png +0 -0
- package/templates/browserconfig.xml +9 -0
- package/templates/favicon.ico +0 -0
- package/templates/index.js.dist +2 -2
- package/templates/site.webmanifest +27 -0
- package/admin/templates/maps-wizard-maps-selection.html +0 -85
- package/admin/templates/maps-wizard.html +0 -341
- package/admin/templates/objects-import.html +0 -143
- package/admin/templates/skills-import.html +0 -201
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Reldens -
|
|
2
|
+
* Reldens - CMS
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
|
|
@@ -86,7 +86,6 @@
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
& .button {
|
|
89
|
-
|
|
90
89
|
padding: 0.5rem 1rem;
|
|
91
90
|
border: none;
|
|
92
91
|
border-radius: 4px;
|
|
@@ -94,44 +93,44 @@
|
|
|
94
93
|
cursor: pointer;
|
|
95
94
|
text-decoration: none;
|
|
96
95
|
|
|
97
|
-
|
|
98
|
-
color: var(--
|
|
99
|
-
background-color: var(--lightBlue);
|
|
100
|
-
|
|
101
|
-
&:hover {
|
|
102
|
-
background-color: var(--lightBlue);
|
|
103
|
-
}
|
|
96
|
+
&:disabled {
|
|
97
|
+
background-color: var(--grey) !important;
|
|
104
98
|
}
|
|
99
|
+
}
|
|
105
100
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
& .button-primary {
|
|
102
|
+
color: var(--white);
|
|
103
|
+
background-color: var(--lightBlue);
|
|
109
104
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
105
|
+
&:hover {
|
|
106
|
+
background-color: var(--lightBlue);
|
|
113
107
|
}
|
|
108
|
+
}
|
|
114
109
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
& .button-secondary {
|
|
111
|
+
color: var(--white);
|
|
112
|
+
background-color: var(--grey);
|
|
118
113
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
114
|
+
&:hover {
|
|
115
|
+
background-color: var(--grey);
|
|
122
116
|
}
|
|
117
|
+
}
|
|
123
118
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
119
|
+
& .button-warning {
|
|
120
|
+
color: var(--white);
|
|
121
|
+
background-color: var(--orange);
|
|
127
122
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
123
|
+
&:hover {
|
|
124
|
+
background-color: var(--orange);
|
|
131
125
|
}
|
|
126
|
+
}
|
|
132
127
|
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
& .button-danger {
|
|
129
|
+
color: var(--white);
|
|
130
|
+
background-color: var(--red);
|
|
131
|
+
|
|
132
|
+
&:hover {
|
|
133
|
+
background-color: var(--red);
|
|
135
134
|
}
|
|
136
135
|
}
|
|
137
136
|
|
|
@@ -556,7 +555,7 @@
|
|
|
556
555
|
padding: 0.5rem;
|
|
557
556
|
border: 1px solid #ccc;
|
|
558
557
|
border-radius: 4px;
|
|
559
|
-
min-width: 150px;
|
|
558
|
+
min-width: 150px;
|
|
560
559
|
}
|
|
561
560
|
}
|
|
562
561
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Welcome to the Reldens
|
|
1
|
+
Welcome to the Reldens CMS!
|
package/bin/reldens-cms.js
CHANGED
|
@@ -23,7 +23,7 @@ let started = manager.start().then((result) => {
|
|
|
23
23
|
Logger.info('Reldens CMS started by command.');
|
|
24
24
|
return true;
|
|
25
25
|
}).catch((error) => {
|
|
26
|
-
Logger.
|
|
26
|
+
Logger.critical('Failed to start CMS:', error);
|
|
27
27
|
process.exit();
|
|
28
28
|
});
|
|
29
29
|
|
package/install/index.html
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div class="forms-container">
|
|
18
18
|
<div class="row">
|
|
19
19
|
<form name="install-form" id="install-form" class="install-form" action="/install" method="post">
|
|
20
|
-
<h3 class="form-title"
|
|
20
|
+
<h3 class="form-title">Server Configuration</h3>
|
|
21
21
|
<div class="input-box app-host">
|
|
22
22
|
<label for="app-host">Host</label>
|
|
23
23
|
<input type="text" name="app-host" id="app-host" value="{{app-host}}" class="required" required/>
|
|
@@ -30,17 +30,14 @@
|
|
|
30
30
|
<label for="app-admin-path">Admin Panel Path</label>
|
|
31
31
|
<input type="text" name="app-admin-path" id="app-admin-path" value="{{app-admin-path}}"/>
|
|
32
32
|
</div>
|
|
33
|
+
<div class="input-box app-admin-secret">
|
|
34
|
+
<label for="app-admin-secret">Admin Panel Secret</label>
|
|
35
|
+
<input type="text" name="app-admin-secret" id="app-admin-secret" value="{{app-admin-secret}}"/>
|
|
36
|
+
</div>
|
|
33
37
|
<div class="input-box app-error">
|
|
34
38
|
<p class="error installation-process-failed">There was an error during the installation process.</p>
|
|
35
39
|
</div>
|
|
36
|
-
<h3 class="form-title"
|
|
37
|
-
<div class="db-basic-config-notice">
|
|
38
|
-
<span>Default configuration:</span>
|
|
39
|
-
<ul>
|
|
40
|
-
<li>Client: mysql - Port: 3306</li>
|
|
41
|
-
<li>Database Driver: prisma</li>
|
|
42
|
-
</ul>
|
|
43
|
-
</div>
|
|
40
|
+
<h3 class="form-title">Database Configuration</h3>
|
|
44
41
|
<div class="input-box db-storage-driver">
|
|
45
42
|
<label for="db-storage-driver">Storage Driver</label>
|
|
46
43
|
<select name="db-storage-driver" id="db-storage-driver" class="required" required>
|
|
@@ -79,6 +76,23 @@
|
|
|
79
76
|
<p class="error sql-file-not-found">SQL installation file not found.</p>
|
|
80
77
|
<p class="error db-installation-process-failed">There was an error during the installation process.</p>
|
|
81
78
|
</div>
|
|
79
|
+
<h3 class="form-title">Installation Options</h3>
|
|
80
|
+
<div class="input-box install-cms-tables">
|
|
81
|
+
<input type="checkbox" name="install-cms-tables" id="install-cms-tables" checked/>
|
|
82
|
+
<label for="install-cms-tables">Install default CMS pages tables</label>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="input-box install-user-auth">
|
|
85
|
+
<input type="checkbox" name="install-user-auth" id="install-user-auth" checked/>
|
|
86
|
+
<label for="install-user-auth">Install users authentication</label>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="input-box install-default-user">
|
|
89
|
+
<input type="checkbox" name="install-default-user" id="install-default-user" checked/>
|
|
90
|
+
<label for="install-default-user">Install default admin user (root@cms-admin.com / root)</label>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="input-box install-default-homepage">
|
|
93
|
+
<input type="checkbox" name="install-default-homepage" id="install-default-homepage" checked/>
|
|
94
|
+
<label for="install-default-homepage">Install default homepage</label>
|
|
95
|
+
</div>
|
|
82
96
|
<div class="input-box submit-container">
|
|
83
97
|
<img class="install-loading hidden" src="/install-assets/img/loading.gif"/>
|
|
84
98
|
<input id="install-submit-button" type="submit" value="Install"/>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Reldens CMS - Installation</title>
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
6
|
+
<link rel="stylesheet" href="/install-assets/css/installer.css">
|
|
7
|
+
<script src="/install-assets/js/installer.js"></script>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div class="wrapper">
|
|
11
|
+
<div class="header">
|
|
12
|
+
<h1 class="title">
|
|
13
|
+
<strong>Reldens CMS</strong> - Installation
|
|
14
|
+
</h1>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="content">
|
|
17
|
+
<div class="forms-container">
|
|
18
|
+
<div class="row">
|
|
19
|
+
Installation completed!
|
|
20
|
+
<p>
|
|
21
|
+
Default data<br/>
|
|
22
|
+
username: root
|
|
23
|
+
email: root@cms-admin.com
|
|
24
|
+
password: root
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="footer">
|
|
30
|
+
<div class="copyright">
|
|
31
|
+
© 2025 Reldens CMS
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</body>
|
|
36
|
+
</html>
|
package/lib/admin-manager.js
CHANGED
|
@@ -54,7 +54,7 @@ class AdminManager
|
|
|
54
54
|
|
|
55
55
|
async setupAdmin()
|
|
56
56
|
{
|
|
57
|
-
if
|
|
57
|
+
if(this.validator instanceof ValidatorInterface && !this.validator.validate(this)){
|
|
58
58
|
return false;
|
|
59
59
|
}
|
|
60
60
|
this.resourcesByReference = {};
|
|
@@ -380,6 +380,9 @@ class AdminManager
|
|
|
380
380
|
this.adminRouter = this.applicationFramework.Router();
|
|
381
381
|
// apply session middleware only to /admin routes:
|
|
382
382
|
if(this.session){
|
|
383
|
+
if(!this.secret){
|
|
384
|
+
Logger.warning('Admin Manager "secret" key was not provided.');
|
|
385
|
+
}
|
|
383
386
|
this.adminRouter.use(this.session({secret: this.secret, resave: false, saveUninitialized: true}));
|
|
384
387
|
}
|
|
385
388
|
this.adminRouter.use(this.bodyParser.json());
|
|
@@ -636,6 +639,26 @@ class AdminManager
|
|
|
636
639
|
return fileNames.join(property.isArray);
|
|
637
640
|
}
|
|
638
641
|
|
|
642
|
+
formatDateTimeForEdit(dateValue, isDisabled)
|
|
643
|
+
{
|
|
644
|
+
if(!dateValue || '' === dateValue){
|
|
645
|
+
return '';
|
|
646
|
+
}
|
|
647
|
+
let date = new Date(dateValue);
|
|
648
|
+
if(isNaN(date.getTime())){
|
|
649
|
+
return '';
|
|
650
|
+
}
|
|
651
|
+
if(isDisabled){
|
|
652
|
+
return sc.formatDate(date);
|
|
653
|
+
}
|
|
654
|
+
let year = date.getFullYear();
|
|
655
|
+
let month = String(date.getMonth() + 1).padStart(2, '0');
|
|
656
|
+
let day = String(date.getDate()).padStart(2, '0');
|
|
657
|
+
let hours = String(date.getHours()).padStart(2, '0');
|
|
658
|
+
let minutes = String(date.getMinutes()).padStart(2, '0');
|
|
659
|
+
return year+'-'+month+'-'+day+'T'+hours+':'+minutes;
|
|
660
|
+
}
|
|
661
|
+
|
|
639
662
|
async generateEditRouteContent(req, driverResource, entityPath)
|
|
640
663
|
{
|
|
641
664
|
let idProperty = this.fetchEntityIdPropertyKey(driverResource);
|
|
@@ -660,6 +683,7 @@ class AdminManager
|
|
|
660
683
|
if(resourceProperty.isUpload && loadedEntity){
|
|
661
684
|
isRequired = '';
|
|
662
685
|
}
|
|
686
|
+
let inputType = this.getInputType(resourceProperty, fieldDisabled);
|
|
663
687
|
renderedEditProperties[propertyKey] = await this.render(
|
|
664
688
|
this.adminFilesContents.fields.edit[this.propertyType(resourceProperty, 'edit')],
|
|
665
689
|
{
|
|
@@ -667,11 +691,13 @@ class AdminManager
|
|
|
667
691
|
fieldValue: await this.generatePropertyEditRenderedValue(
|
|
668
692
|
loadedEntity,
|
|
669
693
|
propertyKey,
|
|
670
|
-
resourceProperty
|
|
694
|
+
resourceProperty,
|
|
695
|
+
fieldDisabled
|
|
671
696
|
),
|
|
672
697
|
fieldDisabled: fieldDisabled ? ' disabled="disabled"' : '',
|
|
673
698
|
required: isRequired,
|
|
674
|
-
multiple: resourceProperty.isArray ? ' multiple="multiple"' : ''
|
|
699
|
+
multiple: resourceProperty.isArray ? ' multiple="multiple"' : '',
|
|
700
|
+
inputType
|
|
675
701
|
}
|
|
676
702
|
);
|
|
677
703
|
}
|
|
@@ -679,6 +705,14 @@ class AdminManager
|
|
|
679
705
|
return await this.renderRoute(renderedView, this.adminContents.sideBar);
|
|
680
706
|
}
|
|
681
707
|
|
|
708
|
+
getInputType(resourceProperty, fieldDisabled)
|
|
709
|
+
{
|
|
710
|
+
if('datetime' === resourceProperty.type && !fieldDisabled){
|
|
711
|
+
return 'datetime-local';
|
|
712
|
+
}
|
|
713
|
+
return 'text';
|
|
714
|
+
}
|
|
715
|
+
|
|
682
716
|
async loadEntityById(driverResource, id)
|
|
683
717
|
{
|
|
684
718
|
let entityRepository = this.dataServer.getEntity(driverResource.entityKey);
|
|
@@ -936,13 +970,16 @@ class AdminManager
|
|
|
936
970
|
return {fieldValue, fieldName};
|
|
937
971
|
}
|
|
938
972
|
|
|
939
|
-
async generatePropertyEditRenderedValue(entity, propertyKey, resourceProperty)
|
|
973
|
+
async generatePropertyEditRenderedValue(entity, propertyKey, resourceProperty, isFieldDisabled)
|
|
940
974
|
{
|
|
941
975
|
let entityPropertyValue = sc.get(entity, propertyKey, null);
|
|
942
976
|
let fieldValue = (0 === entityPropertyValue ? '0' : entityPropertyValue || '').toString();
|
|
943
977
|
if('boolean' === resourceProperty.type){
|
|
944
978
|
fieldValue = '1' === fieldValue || 'true' === fieldValue ? ' checked="checked"' : '';
|
|
945
979
|
}
|
|
980
|
+
if('datetime' === resourceProperty.type){
|
|
981
|
+
fieldValue = this.formatDateTimeForEdit(entityPropertyValue, isFieldDisabled);
|
|
982
|
+
}
|
|
946
983
|
if('reference' === resourceProperty.type){
|
|
947
984
|
let relationDriverResource = this.resourcesByReference[resourceProperty.reference];
|
|
948
985
|
let relation = this.relations[resourceProperty.reference];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Reldens - AdminTemplatesLoader
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const { Logger, sc } = require('@reldens/utils');
|
|
8
|
+
const { FileHandler } = require('@reldens/server-utils');
|
|
9
|
+
|
|
10
|
+
class AdminTemplatesLoader
|
|
11
|
+
{
|
|
12
|
+
|
|
13
|
+
async fetchAdminFilesContents(adminTemplates)
|
|
14
|
+
{
|
|
15
|
+
let adminFilesContents = {};
|
|
16
|
+
for(let template of Object.keys(adminTemplates)){
|
|
17
|
+
let templateData = adminTemplates[template];
|
|
18
|
+
if(sc.isObject(templateData)){
|
|
19
|
+
let subFoldersContents = await this.fetchAdminFilesContents(templateData);
|
|
20
|
+
if(!subFoldersContents){
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
adminFilesContents[template] = subFoldersContents;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if(!FileHandler.isFile(templateData)){
|
|
27
|
+
Logger.critical('Admin template file not found.', template);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
adminFilesContents[template] = await FileHandler.fetchFileContents(templateData);
|
|
31
|
+
}
|
|
32
|
+
return adminFilesContents;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
module.exports.AdminTemplatesLoader = new AdminTemplatesLoader();
|
|
@@ -12,8 +12,8 @@ class AdminTranslations
|
|
|
12
12
|
// @TODO - BETA - Fix translations, use snippets, include new snippets under the basic config script.
|
|
13
13
|
let adminTranslations = {
|
|
14
14
|
messages: {
|
|
15
|
-
loginWelcome: '
|
|
16
|
-
reldensTitle: 'Reldens -
|
|
15
|
+
loginWelcome: 'CMS - Login',
|
|
16
|
+
reldensTitle: 'Reldens - CMS',
|
|
17
17
|
reldensSlogan: 'You can do it',
|
|
18
18
|
reldensDiscordTitle: 'Join our Discord server!',
|
|
19
19
|
reldensDiscordText: 'Talk with the creators and other Reldens users',
|
|
@@ -24,229 +24,15 @@ class AdminTranslations
|
|
|
24
24
|
reldensLoading: 'Loading...'
|
|
25
25
|
},
|
|
26
26
|
labels: {
|
|
27
|
-
navigation: 'Reldens -
|
|
27
|
+
navigation: 'Reldens - CMS',
|
|
28
28
|
adminVersion: 'Admin: {{version}}',
|
|
29
29
|
loginWelcome: 'Reldens',
|
|
30
30
|
pages: 'Server Management',
|
|
31
31
|
management: 'Management',
|
|
32
|
-
mapsWizard: 'Maps Generation and Import',
|
|
33
|
-
objectsImport: 'Objects Import',
|
|
34
|
-
skillsImport: 'Skills Import',
|
|
35
32
|
shuttingDown: 'Server is shutting down in:',
|
|
36
33
|
submitShutdownLabel: 'Shutdown Server',
|
|
37
34
|
submitCancelLabel: 'Cancel Server Shutdown',
|
|
38
|
-
}
|
|
39
|
-
active_from: 'Active From',
|
|
40
|
-
active_to: 'Active To',
|
|
41
|
-
ads_id: 'Ads ID',
|
|
42
|
-
ads_type: 'Ads Type',
|
|
43
|
-
affectedProperty: 'Affected Property',
|
|
44
|
-
aimProperties: 'Aim Properties',
|
|
45
|
-
allowEffectBelowZero: 'Allow Effect Below Zero',
|
|
46
|
-
allowSelfTarget: 'Allow Self Target',
|
|
47
|
-
also_show_in_type: 'Also Show In Type',
|
|
48
|
-
animationData: 'Animation Data',
|
|
49
|
-
animationKey: 'Animation Key',
|
|
50
|
-
applyDirectDamage: 'Apply Direct Damage',
|
|
51
|
-
asset_file: 'Asset File',
|
|
52
|
-
asset_key: 'Asset Key',
|
|
53
|
-
asset_type: 'Asset Type',
|
|
54
|
-
attackProperties: 'Attack Properties',
|
|
55
|
-
audio_id: 'Audio ID',
|
|
56
|
-
audio_key: 'Audio Key',
|
|
57
|
-
autoFillExperienceMultiplier: 'Auto Fill Experience Multiplier',
|
|
58
|
-
autoFillRanges: 'Auto Fill Ranges',
|
|
59
|
-
autoValidation: 'Auto Validation',
|
|
60
|
-
auto_remove_requirement: 'Auto Remove Requirement',
|
|
61
|
-
banner_data: 'Banner Data',
|
|
62
|
-
base_value: 'Base Value',
|
|
63
|
-
bottom: 'Bottom',
|
|
64
|
-
castTime: 'Cast Time',
|
|
65
|
-
category_id: 'Category ID',
|
|
66
|
-
category_key: 'Category Key',
|
|
67
|
-
category_label: 'Category Label',
|
|
68
|
-
chat_player_id: 'Chat Player ID',
|
|
69
|
-
chat_private_player_id: 'Chat Private Player',
|
|
70
|
-
chat_room: 'Chat Room',
|
|
71
|
-
chat_type: 'Chat Type',
|
|
72
|
-
clan_id: 'Clan ID',
|
|
73
|
-
classKey: 'Class Key',
|
|
74
|
-
class_path: 'Class Path',
|
|
75
|
-
class_path_id: 'Class Path ID',
|
|
76
|
-
class_path_level: 'Level Key',
|
|
77
|
-
class_path_level_skill: 'Skill',
|
|
78
|
-
class_path_owner: 'Class Path Owner',
|
|
79
|
-
class_type: 'Class Type',
|
|
80
|
-
client_key: 'Client Key',
|
|
81
|
-
client_params: 'Client Params',
|
|
82
|
-
code: 'Code',
|
|
83
|
-
conditional: 'Conditional',
|
|
84
|
-
config: 'Config',
|
|
85
|
-
country_code: 'Country Code',
|
|
86
|
-
created_at: 'Created At',
|
|
87
|
-
criticalAffected: 'Critical Affected',
|
|
88
|
-
criticalChance: 'Critical Chance',
|
|
89
|
-
criticalFixedValue: 'Critical FixedValue',
|
|
90
|
-
criticalMultiplier: 'Critical Multiplier',
|
|
91
|
-
currentExp: 'Current Exp',
|
|
92
|
-
currentLevel: 'Current Level',
|
|
93
|
-
customData: 'Custom Data',
|
|
94
|
-
damageAffected: 'Damage Affected',
|
|
95
|
-
defenseProperties: 'Defense Properties',
|
|
96
|
-
description: 'Description',
|
|
97
|
-
dir: 'Dir',
|
|
98
|
-
direction: 'Direction',
|
|
99
|
-
drop_quantity: 'Drop Quantity',
|
|
100
|
-
drop_rate: 'Drop Rate',
|
|
101
|
-
dodgeFullEnabled: 'Dodge Full Enabled',
|
|
102
|
-
dodgeOverAimSuccess: 'Dodge Over Aim Success',
|
|
103
|
-
dodgeProperties: 'Dodge Properties',
|
|
104
|
-
duration: 'Duration',
|
|
105
|
-
email: 'Email',
|
|
106
|
-
enabled: 'Enabled',
|
|
107
|
-
ended_at: 'Ended At',
|
|
108
|
-
event_data: 'Event Data',
|
|
109
|
-
event_key: 'Event Key',
|
|
110
|
-
experience: 'Experience',
|
|
111
|
-
execTimeOut: 'Exec Time Out',
|
|
112
|
-
extra_params: 'Extra Params',
|
|
113
|
-
file: 'File',
|
|
114
|
-
files_name: 'Files Name',
|
|
115
|
-
from_room_id: 'From Room ID',
|
|
116
|
-
group_id: 'Group ID',
|
|
117
|
-
handler_key: 'Handler Key',
|
|
118
|
-
has_drop_body: 'Has Drop Body',
|
|
119
|
-
height: 'Height',
|
|
120
|
-
hitDamage: 'Hit Damage',
|
|
121
|
-
id: 'ID',
|
|
122
|
-
instances_limit: 'Instances Limit',
|
|
123
|
-
is_active: 'Is Active',
|
|
124
|
-
is_default: 'Is Default',
|
|
125
|
-
is_enabled: 'Is Enabled',
|
|
126
|
-
is_unique: 'Is Unique',
|
|
127
|
-
item_id: 'Item ID',
|
|
128
|
-
item_key: 'Item Key',
|
|
129
|
-
items_limit: 'Items Limit',
|
|
130
|
-
key: 'Key',
|
|
131
|
-
kill_npc_id: 'Kill NPC ID',
|
|
132
|
-
kill_player_id: 'Kill Player ID',
|
|
133
|
-
kill_time: 'Kill Time',
|
|
134
|
-
label: 'Label',
|
|
135
|
-
label_level: 'Label Level',
|
|
136
|
-
language_code: 'Language Code',
|
|
137
|
-
last_npc_kill_time: 'Last NPC Kill Time',
|
|
138
|
-
last_player_kill_time: 'Last Player Kill Time',
|
|
139
|
-
layer: 'Layer',
|
|
140
|
-
layer_name: 'Layer Name',
|
|
141
|
-
level: 'Level',
|
|
142
|
-
level_id: 'Level ID',
|
|
143
|
-
level_owner: 'Level Owner',
|
|
144
|
-
level_set: 'Level Set',
|
|
145
|
-
level_set_id: 'Level Set ID',
|
|
146
|
-
levels_set_id: 'Levels Set ID',
|
|
147
|
-
limit_per_item: 'Limit Per Item',
|
|
148
|
-
locale: 'Locale',
|
|
149
|
-
locale_id: 'Locale ID',
|
|
150
|
-
login_count: 'Login Count',
|
|
151
|
-
login_date: 'Login Date',
|
|
152
|
-
logout_date: 'Logout Date',
|
|
153
|
-
map_filename: 'Map Filename',
|
|
154
|
-
marker_key: 'Marker Key',
|
|
155
|
-
maxProperty: 'Max Property',
|
|
156
|
-
maxValue: 'Max Value',
|
|
157
|
-
message: 'Message',
|
|
158
|
-
message_time: 'Message Time',
|
|
159
|
-
message_type: 'Message Type',
|
|
160
|
-
magnitude: 'Magnitude',
|
|
161
|
-
minProperty: 'Min Property',
|
|
162
|
-
minValue: 'Min Value',
|
|
163
|
-
modifier_id: 'Modifier ID',
|
|
164
|
-
name: 'Name',
|
|
165
|
-
next_room_id: 'Next Room ID',
|
|
166
|
-
npcs_kills_count: 'NPCs Kills Count',
|
|
167
|
-
objectHeight: 'Object Height',
|
|
168
|
-
objectWidth: 'Object Width',
|
|
169
|
-
object_asset_id: 'Object Asset ID',
|
|
170
|
-
object_class_key: 'Object Class Key',
|
|
171
|
-
object_id: 'Object ID',
|
|
172
|
-
obtained_score: 'Obtained Score',
|
|
173
|
-
operation: 'Operation',
|
|
174
|
-
owner_id: 'Owner ID',
|
|
175
|
-
parent_group: 'Parent Group',
|
|
176
|
-
parent_skill: 'Parent Skill',
|
|
177
|
-
path: 'Path',
|
|
178
|
-
password: 'Password',
|
|
179
|
-
player_id: 'Player ID',
|
|
180
|
-
played_time: 'Played Time',
|
|
181
|
-
players_kill_count: 'Players Kills Count',
|
|
182
|
-
players_kills_count: 'Players Kills Count',
|
|
183
|
-
points: 'Points',
|
|
184
|
-
position: 'Position',
|
|
185
|
-
position_bottom: 'Position Bottom',
|
|
186
|
-
position_left: 'Position Left',
|
|
187
|
-
position_right: 'Position Right',
|
|
188
|
-
position_top: 'Position Top',
|
|
189
|
-
private_params: 'Private Params',
|
|
190
|
-
private_player_id: 'Private Player ID',
|
|
191
|
-
property_key: 'Property Key',
|
|
192
|
-
provider_id: 'Provider ID',
|
|
193
|
-
qty: 'Qty',
|
|
194
|
-
qty_limit: 'Qty Limit',
|
|
195
|
-
range: 'Range',
|
|
196
|
-
rangeAutomaticValidation: 'Range Automatic Validation',
|
|
197
|
-
rangePropertyX: 'Range Property X',
|
|
198
|
-
rangePropertyY: 'Range Property Y',
|
|
199
|
-
rangeTargetPropertyX: 'Range Target Property X',
|
|
200
|
-
rangeTargetPropertyY: 'Range Target Property Y',
|
|
201
|
-
remaining_uses: 'Remaining Uses',
|
|
202
|
-
required_experience: 'Required Experience',
|
|
203
|
-
required_item_key: 'Required Item Key',
|
|
204
|
-
required_quantity: 'Required Quantity',
|
|
205
|
-
respawn_time: 'Respawn Time',
|
|
206
|
-
replay: 'Replay',
|
|
207
|
-
reward_item_is_required: 'Reward Item Is Required',
|
|
208
|
-
reward_item_key: 'Reward Item Key',
|
|
209
|
-
reward_quantity: 'Reward Quantity',
|
|
210
|
-
rewards_events_id: 'Rewards Events ID',
|
|
211
|
-
role_id: 'Role ID',
|
|
212
|
-
room_class_key: 'Room Class Key',
|
|
213
|
-
room_id: 'Room ID',
|
|
214
|
-
scene_images: 'Scene Images',
|
|
215
|
-
scope: 'Scope',
|
|
216
|
-
server_url: 'Server URL',
|
|
217
|
-
show_in_general: 'Show In General',
|
|
218
|
-
show_tab: 'Show Tab',
|
|
219
|
-
single_audio: 'Single Audio',
|
|
220
|
-
skill: 'Skill',
|
|
221
|
-
skillDelay: 'Skill Delay',
|
|
222
|
-
skill_id: 'Skill ID',
|
|
223
|
-
sort: 'Sort',
|
|
224
|
-
start: 'Start',
|
|
225
|
-
started_at: 'Started At',
|
|
226
|
-
state: 'State',
|
|
227
|
-
stat_id: 'Stat ID',
|
|
228
|
-
status: 'Status',
|
|
229
|
-
target_id: 'Target ID',
|
|
230
|
-
target_key: 'Target Key',
|
|
231
|
-
target_label: 'Target Label',
|
|
232
|
-
tile_index: 'Tile Index',
|
|
233
|
-
title: 'Title',
|
|
234
|
-
top: 'Top',
|
|
235
|
-
total_score: 'Total Score',
|
|
236
|
-
type: 'Type',
|
|
237
|
-
type_id: 'Type ID',
|
|
238
|
-
updated_at: 'Updated At',
|
|
239
|
-
useTimeOut: 'Use Time Out',
|
|
240
|
-
user_id: 'User ID',
|
|
241
|
-
username: 'Username',
|
|
242
|
-
usesLimit: 'Uses Limit',
|
|
243
|
-
uses_limit: 'Uses Limit',
|
|
244
|
-
validateTargetOnHit: 'Validate Target On Hit',
|
|
245
|
-
value: 'Value',
|
|
246
|
-
was_given: 'Was Given',
|
|
247
|
-
width: 'Width',
|
|
248
|
-
x: 'X',
|
|
249
|
-
y: 'Y'
|
|
35
|
+
}
|
|
250
36
|
};
|
|
251
37
|
for(let i of Object.keys(translations)){
|
|
252
38
|
if(!adminTranslations[i]){
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Reldens - AllowedExtensions
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
module.exports.AllowedExtensions = {
|
|
8
|
+
audio: ['.aac', '.mid', '.midi', '.mp3', '.ogg', '.oga', '.opus', '.wav', '.weba', '.3g2'],
|
|
9
|
+
image: ['.jpg', '.jpeg', '.png', '.gif', '.svg', '.webp'],
|
|
10
|
+
text: ['.json', '.jsonld', '.txt']
|
|
11
|
+
};
|
package/lib/entities-loader.js
CHANGED
|
@@ -28,12 +28,8 @@ class EntitiesLoader
|
|
|
28
28
|
return {};
|
|
29
29
|
}
|
|
30
30
|
try {
|
|
31
|
-
let
|
|
32
|
-
return {
|
|
33
|
-
entities: loadedEntities.entitiesConfig,
|
|
34
|
-
entitiesRaw: loadedEntities.rawRegisteredEntities,
|
|
35
|
-
translations: loadedEntities.entitiesTranslations,
|
|
36
|
-
}
|
|
31
|
+
let {rawRegisteredEntities, entitiesConfig, entitiesTranslations} = require(entitiesPath);
|
|
32
|
+
return {rawRegisteredEntities, entitiesTranslations, entitiesConfig};
|
|
37
33
|
} catch(error){
|
|
38
34
|
Logger.error('Failed to load generated entities: ' + error.message);
|
|
39
35
|
}
|