@sonolus/generate-static 5.4.4 → 5.4.5
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/dist/index.js +17 -14
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const skin_1 = require("./server/items/skin");
|
|
|
18
18
|
const json_1 = require("./utils/json");
|
|
19
19
|
const options = new commander_1.Command()
|
|
20
20
|
.name('sonolus-generate-static')
|
|
21
|
-
.version('5.4.
|
|
21
|
+
.version('5.4.5')
|
|
22
22
|
.option('-i, --input <value>', 'input directory', 'pack')
|
|
23
23
|
.option('-o, --output <value>', 'output directory', 'static')
|
|
24
24
|
.option('-a, --address [value]', 'address')
|
|
@@ -108,16 +108,18 @@ try {
|
|
|
108
108
|
title: sonolus.localize(sonolus.db.info.title),
|
|
109
109
|
description: sonolus.db.info.description && sonolus.localize(sonolus.db.info.description),
|
|
110
110
|
buttons: [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
]
|
|
111
|
+
['post', 'posts'],
|
|
112
|
+
['playlist', 'playlists'],
|
|
113
|
+
['level', 'levels'],
|
|
114
|
+
['replay', 'replays'],
|
|
115
|
+
['skin', 'skins'],
|
|
116
|
+
['background', 'backgrounds'],
|
|
117
|
+
['effect', 'effects'],
|
|
118
|
+
['particle', 'particles'],
|
|
119
|
+
['engine', 'engines'],
|
|
120
|
+
]
|
|
121
|
+
.filter(([, type]) => sonolus.db[type].length)
|
|
122
|
+
.map(([type]) => ({ type })),
|
|
121
123
|
configuration: {
|
|
122
124
|
options: [],
|
|
123
125
|
},
|
|
@@ -125,9 +127,7 @@ try {
|
|
|
125
127
|
};
|
|
126
128
|
(0, fs_extra_1.outputJsonSync)(`${pathOutput}/sonolus/info`, serverInfo);
|
|
127
129
|
console.log('[INFO]', `${pathOutput}/sonolus/package`);
|
|
128
|
-
const packageInfo = {
|
|
129
|
-
shouldUpdate: false,
|
|
130
|
-
};
|
|
130
|
+
const packageInfo = {};
|
|
131
131
|
(0, fs_extra_1.outputJsonSync)(`${pathOutput}/sonolus/package`, packageInfo);
|
|
132
132
|
outputItems('posts', sonolus, sonolus.db.posts, 'post', post_item_1.toPostItem);
|
|
133
133
|
outputItems('playlists', sonolus, sonolus.db.playlists, 'playlist', playlist_1.toPlaylistItem);
|
|
@@ -138,6 +138,9 @@ try {
|
|
|
138
138
|
outputItems('particles', sonolus, sonolus.db.particles, 'particle', particle_1.toParticleItem);
|
|
139
139
|
outputItems('engines', sonolus, sonolus.db.engines, 'engine', engine_1.toEngineItem);
|
|
140
140
|
outputItems('replays', sonolus, sonolus.db.replays, 'replay', replay_1.toReplayItem);
|
|
141
|
+
console.log('[INFO]', `${pathOutput}/sonolus/levels/result/info`);
|
|
142
|
+
const levelResultInfo = {};
|
|
143
|
+
(0, fs_extra_1.outputJsonSync)(`${pathOutput}/sonolus/levels/result/info`, levelResultInfo);
|
|
141
144
|
console.log('[INFO]', `${pathOutput}/sonolus/repository`);
|
|
142
145
|
(0, fs_extra_1.copySync)(`${pathInput}/repository`, `${pathOutput}/sonolus/repository`);
|
|
143
146
|
console.log();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonolus/generate-static",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.5",
|
|
4
4
|
"description": "CLI tool to generate static Sonolus server from repository and database",
|
|
5
5
|
"author": "NonSpicyBurrito",
|
|
6
6
|
"repository": "github:Sonolus/sonolus-generate-static",
|
|
@@ -19,18 +19,19 @@
|
|
|
19
19
|
"build": "tsc -p ."
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@eslint/js": "^
|
|
22
|
+
"@eslint/js": "^9.9.0",
|
|
23
|
+
"@types/eslint__js": "^8.42.3",
|
|
23
24
|
"@types/fs-extra": "^11.0.4",
|
|
24
|
-
"eslint": "^
|
|
25
|
+
"eslint": "^9.9.0",
|
|
25
26
|
"eslint-config-prettier": "^9.1.0",
|
|
26
27
|
"prettier": "^3.3.3",
|
|
27
28
|
"prettier-plugin-organize-imports": "^4.0.0",
|
|
28
29
|
"typescript": "~5.5.4",
|
|
29
|
-
"typescript-eslint": "^
|
|
30
|
+
"typescript-eslint": "^8.1.0"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@sinclair/typebox": "^0.
|
|
33
|
-
"@sonolus/core": "~7.
|
|
33
|
+
"@sinclair/typebox": "^0.33.7",
|
|
34
|
+
"@sonolus/core": "~7.9.0",
|
|
34
35
|
"commander": "^12.1.0",
|
|
35
36
|
"fs-extra": "^11.2.0"
|
|
36
37
|
}
|