mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-04-22 06:57:38 -05:00
Merge pull request #27 from PretendoNetwork/feat/s3
This commit is contained in:
commit
da6ace244f
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -64,3 +64,4 @@ cdn/storage
|
|||
*.byaml
|
||||
*.byaml.checksum
|
||||
*.bak
|
||||
!/seeding/**/*
|
||||
|
|
|
|||
1149
package-lock.json
generated
1149
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
|
@ -9,7 +9,8 @@
|
|||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"build": "tsup && tsc --noEmit",
|
||||
"start": "node --enable-source-maps dist/server.js"
|
||||
"start": "node --enable-source-maps dist/server.js",
|
||||
"cli": "node --enable-source-maps dist/cli/cli.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.723.0",
|
||||
|
|
@ -17,6 +18,7 @@
|
|||
"@pretendonetwork/grpc": "^1.0.6",
|
||||
"@typegoose/auto-increment": "^3.6.1",
|
||||
"boss-js": "github:PretendoNetwork/boss-js",
|
||||
"commander": "^14.0.0",
|
||||
"dicer": "^0.3.1",
|
||||
"dotenv": "^16.4.7",
|
||||
"express": "^5.1.0",
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
const BOSS = require('boss-js');
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const crypto = require('crypto');
|
||||
require('dotenv').config();
|
||||
|
||||
const { PN_BOSS_CONFIG_BOSS_WIIU_AES_KEY, PN_BOSS_CONFIG_BOSS_WIIU_HMAC_KEY } = process.env;
|
||||
|
||||
const decryptedFilePath = path.normalize(path.resolve(__dirname, process.argv[2]));
|
||||
const encryptedFolderName = path.basename(path.dirname(decryptedFilePath));
|
||||
const encryptedFolderPath = path.normalize(path.resolve(decryptedFilePath, '../../../encrypted', encryptedFolderName));
|
||||
|
||||
fs.ensureDirSync(encryptedFolderPath);
|
||||
|
||||
const encryptedContents = BOSS.encryptWiiU(decryptedFilePath, PN_BOSS_CONFIG_BOSS_WIIU_AES_KEY, PN_BOSS_CONFIG_BOSS_WIIU_HMAC_KEY);
|
||||
const hash = crypto.createHash('md5').update(encryptedContents).digest('hex');
|
||||
|
||||
const encryptedFilePath = path.normalize(path.resolve(encryptedFolderPath, hash));
|
||||
|
||||
fs.writeFileSync(encryptedFilePath, encryptedContents);
|
||||
|
||||
console.log(`Encrypted ${process.argv[2].split('/').pop()} to ${encryptedFilePath}, (Length ${encryptedContents.length})`);
|
||||
16
seeding/README.md
Normal file
16
seeding/README.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Seeding
|
||||
|
||||
The CLI of the BOSS server can seed data from this folder. This folder contains some default tasksheets that are expected from the system.
|
||||
|
||||
```sh
|
||||
npm run cli -- import seed
|
||||
```
|
||||
|
||||
## Notes about seeding
|
||||
|
||||
1. Only files referenced by tasksheets are processed
|
||||
2. You can safely run seeding as many times as seeded, it ignores unchanged data.
|
||||
3. Unencrypted task files must follow this syntax: `<DATA_ID>.<FILENAME>` - For example: `39015.Festival.byaml` (The name unused, but good practice to set it appropiately)
|
||||
4. Encrypted task files must follow this syntax: `<DATA_ID>.enc.<FILENAME>` - For example: `39015.enc.Festival.byaml` (The name unused, but good practice to set it appropiately)
|
||||
5. Tasksheets must follow this syntax: `1.<BOSS_APP_ID>.<TASKNAME>.taskheet.xml`
|
||||
6. Seeding only adds and updates data. Tasksheets or files that are removed are not deleted.
|
||||
BIN
seeding/files/1347.enc.HapTexture.bfres
Normal file
BIN
seeding/files/1347.enc.HapTexture.bfres
Normal file
Binary file not shown.
BIN
seeding/files/1348.enc.Festival.byaml
Normal file
BIN
seeding/files/1348.enc.Festival.byaml
Normal file
Binary file not shown.
BIN
seeding/files/1349.enc.PanelTexture.bfres
Normal file
BIN
seeding/files/1349.enc.PanelTexture.bfres
Normal file
Binary file not shown.
BIN
seeding/files/1356.enc.PanelTexture.bfres
Normal file
BIN
seeding/files/1356.enc.PanelTexture.bfres
Normal file
Binary file not shown.
BIN
seeding/files/1357.enc.Festival.byaml
Normal file
BIN
seeding/files/1357.enc.Festival.byaml
Normal file
Binary file not shown.
BIN
seeding/files/1358.enc.HapTexture.bfres
Normal file
BIN
seeding/files/1358.enc.HapTexture.bfres
Normal file
Binary file not shown.
BIN
seeding/files/1490.enc.Festival.byaml
Normal file
BIN
seeding/files/1490.enc.Festival.byaml
Normal file
Binary file not shown.
BIN
seeding/files/1491.enc.HapTexture.bfres
Normal file
BIN
seeding/files/1491.enc.HapTexture.bfres
Normal file
Binary file not shown.
BIN
seeding/files/1492.enc.PanelTexture.bfres
Normal file
BIN
seeding/files/1492.enc.PanelTexture.bfres
Normal file
Binary file not shown.
BIN
seeding/files/15165.enc.00003b3d
Normal file
BIN
seeding/files/15165.enc.00003b3d
Normal file
Binary file not shown.
BIN
seeding/files/1546.enc.VSSetting.byaml
Normal file
BIN
seeding/files/1546.enc.VSSetting.byaml
Normal file
Binary file not shown.
BIN
seeding/files/1547.enc.VSSetting.byaml
Normal file
BIN
seeding/files/1547.enc.VSSetting.byaml
Normal file
Binary file not shown.
BIN
seeding/files/15506.enc.00003c92
Normal file
BIN
seeding/files/15506.enc.00003c92
Normal file
Binary file not shown.
BIN
seeding/files/179.enc.BGM_BOSS-BASE_20.1_US
Normal file
BIN
seeding/files/179.enc.BGM_BOSS-BASE_20.1_US
Normal file
Binary file not shown.
BIN
seeding/files/1790.enc.VSSetting.byaml
Normal file
BIN
seeding/files/1790.enc.VSSetting.byaml
Normal file
Binary file not shown.
BIN
seeding/files/180.enc.BGM_BOSS-BASE_20.0_US
Normal file
BIN
seeding/files/180.enc.BGM_BOSS-BASE_20.0_US
Normal file
Binary file not shown.
BIN
seeding/files/193.enc.BGM_BOSS-BASE_20.1_EU
Normal file
BIN
seeding/files/193.enc.BGM_BOSS-BASE_20.1_EU
Normal file
Binary file not shown.
BIN
seeding/files/194.enc.BGM_BOSS-BASE_20.0_EU
Normal file
BIN
seeding/files/194.enc.BGM_BOSS-BASE_20.0_EU
Normal file
Binary file not shown.
BIN
seeding/files/21387.enc.0000538b
Normal file
BIN
seeding/files/21387.enc.0000538b
Normal file
Binary file not shown.
BIN
seeding/files/21391.enc.0000538f
Normal file
BIN
seeding/files/21391.enc.0000538f
Normal file
Binary file not shown.
BIN
seeding/files/3457.enc.00000d81
Normal file
BIN
seeding/files/3457.enc.00000d81
Normal file
Binary file not shown.
BIN
seeding/files/37149.enc.0000911d
Normal file
BIN
seeding/files/37149.enc.0000911d
Normal file
Binary file not shown.
BIN
seeding/files/37175.enc.00009137
Normal file
BIN
seeding/files/37175.enc.00009137
Normal file
Binary file not shown.
BIN
seeding/files/39015.enc.00009867
Normal file
BIN
seeding/files/39015.enc.00009867
Normal file
Binary file not shown.
BIN
seeding/files/40146.enc.00009cd2
Normal file
BIN
seeding/files/40146.enc.00009cd2
Normal file
Binary file not shown.
BIN
seeding/files/475.enc.Boss000.pack
Normal file
BIN
seeding/files/475.enc.Boss000.pack
Normal file
Binary file not shown.
BIN
seeding/files/476.enc.Boss001.pack
Normal file
BIN
seeding/files/476.enc.Boss001.pack
Normal file
Binary file not shown.
BIN
seeding/files/477.enc.Boss002.pack
Normal file
BIN
seeding/files/477.enc.Boss002.pack
Normal file
Binary file not shown.
BIN
seeding/files/478.enc.BossStatic000.pack
Normal file
BIN
seeding/files/478.enc.BossStatic000.pack
Normal file
Binary file not shown.
BIN
seeding/files/479.enc.BossStatic001.pack
Normal file
BIN
seeding/files/479.enc.BossStatic001.pack
Normal file
Binary file not shown.
BIN
seeding/files/480.enc.BossStatic002.pack
Normal file
BIN
seeding/files/480.enc.BossStatic002.pack
Normal file
Binary file not shown.
BIN
seeding/files/493.enc.Boss003.pack
Normal file
BIN
seeding/files/493.enc.Boss003.pack
Normal file
Binary file not shown.
BIN
seeding/files/495.enc.Boss004.pack
Normal file
BIN
seeding/files/495.enc.Boss004.pack
Normal file
Binary file not shown.
BIN
seeding/files/496.enc.Boss000.pack
Normal file
BIN
seeding/files/496.enc.Boss000.pack
Normal file
Binary file not shown.
BIN
seeding/files/497.enc.Boss001.pack
Normal file
BIN
seeding/files/497.enc.Boss001.pack
Normal file
Binary file not shown.
BIN
seeding/files/497.enc.Boss005.pack
Normal file
BIN
seeding/files/497.enc.Boss005.pack
Normal file
Binary file not shown.
BIN
seeding/files/498.enc.Boss002.pack
Normal file
BIN
seeding/files/498.enc.Boss002.pack
Normal file
Binary file not shown.
BIN
seeding/files/499.enc.BossStatic000.pack
Normal file
BIN
seeding/files/499.enc.BossStatic000.pack
Normal file
Binary file not shown.
BIN
seeding/files/499.enc.BossStatic003.pack
Normal file
BIN
seeding/files/499.enc.BossStatic003.pack
Normal file
Binary file not shown.
BIN
seeding/files/500.enc.BossStatic001.pack
Normal file
BIN
seeding/files/500.enc.BossStatic001.pack
Normal file
Binary file not shown.
BIN
seeding/files/501.enc.BossStatic002.pack
Normal file
BIN
seeding/files/501.enc.BossStatic002.pack
Normal file
Binary file not shown.
BIN
seeding/files/501.enc.BossStatic004.pack
Normal file
BIN
seeding/files/501.enc.BossStatic004.pack
Normal file
Binary file not shown.
BIN
seeding/files/503.enc.BossStatic005.pack
Normal file
BIN
seeding/files/503.enc.BossStatic005.pack
Normal file
Binary file not shown.
BIN
seeding/files/514.enc.Boss003.pack
Normal file
BIN
seeding/files/514.enc.Boss003.pack
Normal file
Binary file not shown.
BIN
seeding/files/516.enc.Boss004.pack
Normal file
BIN
seeding/files/516.enc.Boss004.pack
Normal file
Binary file not shown.
BIN
seeding/files/518.enc.Boss005.pack
Normal file
BIN
seeding/files/518.enc.Boss005.pack
Normal file
Binary file not shown.
BIN
seeding/files/520.enc.BossStatic003.pack
Normal file
BIN
seeding/files/520.enc.BossStatic003.pack
Normal file
Binary file not shown.
BIN
seeding/files/522.enc.BossStatic004.pack
Normal file
BIN
seeding/files/522.enc.BossStatic004.pack
Normal file
Binary file not shown.
BIN
seeding/files/524.enc.BossStatic005.pack
Normal file
BIN
seeding/files/524.enc.BossStatic005.pack
Normal file
Binary file not shown.
BIN
seeding/files/539.enc.Boss006.pack
Normal file
BIN
seeding/files/539.enc.Boss006.pack
Normal file
Binary file not shown.
BIN
seeding/files/541.enc.BossStatic006.pack
Normal file
BIN
seeding/files/541.enc.BossStatic006.pack
Normal file
Binary file not shown.
BIN
seeding/files/547.enc.Boss007.pack
Normal file
BIN
seeding/files/547.enc.Boss007.pack
Normal file
Binary file not shown.
BIN
seeding/files/549.enc.BossStatic007.pack
Normal file
BIN
seeding/files/549.enc.BossStatic007.pack
Normal file
Binary file not shown.
BIN
seeding/files/551.enc.Boss008.pack
Normal file
BIN
seeding/files/551.enc.Boss008.pack
Normal file
Binary file not shown.
BIN
seeding/files/553.enc.BossStatic008.pack
Normal file
BIN
seeding/files/553.enc.BossStatic008.pack
Normal file
Binary file not shown.
BIN
seeding/files/560.enc.BossStatic006.pack
Normal file
BIN
seeding/files/560.enc.BossStatic006.pack
Normal file
Binary file not shown.
BIN
seeding/files/562.enc.Boss006.pack
Normal file
BIN
seeding/files/562.enc.Boss006.pack
Normal file
Binary file not shown.
BIN
seeding/files/566.enc.Boss007.pack
Normal file
BIN
seeding/files/566.enc.Boss007.pack
Normal file
Binary file not shown.
BIN
seeding/files/568.enc.BossStatic007.pack
Normal file
BIN
seeding/files/568.enc.BossStatic007.pack
Normal file
Binary file not shown.
BIN
seeding/files/56897.enc.0000de41
Normal file
BIN
seeding/files/56897.enc.0000de41
Normal file
Binary file not shown.
BIN
seeding/files/56933.enc.0000de65
Normal file
BIN
seeding/files/56933.enc.0000de65
Normal file
Binary file not shown.
BIN
seeding/files/56957.enc.0000de7d
Normal file
BIN
seeding/files/56957.enc.0000de7d
Normal file
Binary file not shown.
BIN
seeding/files/570.enc.Boss008.pack
Normal file
BIN
seeding/files/570.enc.Boss008.pack
Normal file
Binary file not shown.
BIN
seeding/files/572.enc.BossStatic008.pack
Normal file
BIN
seeding/files/572.enc.BossStatic008.pack
Normal file
Binary file not shown.
BIN
seeding/files/575.enc.Boss009.pack
Normal file
BIN
seeding/files/575.enc.Boss009.pack
Normal file
Binary file not shown.
BIN
seeding/files/577.enc.Boss010.pack
Normal file
BIN
seeding/files/577.enc.Boss010.pack
Normal file
Binary file not shown.
BIN
seeding/files/579.enc.BossStatic009.pack
Normal file
BIN
seeding/files/579.enc.BossStatic009.pack
Normal file
Binary file not shown.
BIN
seeding/files/581.enc.BossStatic010.pack
Normal file
BIN
seeding/files/581.enc.BossStatic010.pack
Normal file
Binary file not shown.
BIN
seeding/files/594.enc.Boss009.pack
Normal file
BIN
seeding/files/594.enc.Boss009.pack
Normal file
Binary file not shown.
BIN
seeding/files/596.enc.Boss010.pack
Normal file
BIN
seeding/files/596.enc.Boss010.pack
Normal file
Binary file not shown.
BIN
seeding/files/598.enc.BossStatic009.pack
Normal file
BIN
seeding/files/598.enc.BossStatic009.pack
Normal file
Binary file not shown.
BIN
seeding/files/600.enc.BossStatic010.pack
Normal file
BIN
seeding/files/600.enc.BossStatic010.pack
Normal file
Binary file not shown.
BIN
seeding/files/603.enc.BossStatic011.pack
Normal file
BIN
seeding/files/603.enc.BossStatic011.pack
Normal file
Binary file not shown.
BIN
seeding/files/605.enc.BossStatic012.pack
Normal file
BIN
seeding/files/605.enc.BossStatic012.pack
Normal file
Binary file not shown.
BIN
seeding/files/607.enc.BossStatic013.pack
Normal file
BIN
seeding/files/607.enc.BossStatic013.pack
Normal file
Binary file not shown.
BIN
seeding/files/609.enc.Boss011.pack
Normal file
BIN
seeding/files/609.enc.Boss011.pack
Normal file
Binary file not shown.
BIN
seeding/files/611.enc.Boss012.pack
Normal file
BIN
seeding/files/611.enc.Boss012.pack
Normal file
Binary file not shown.
BIN
seeding/files/613.enc.Boss013.pack
Normal file
BIN
seeding/files/613.enc.Boss013.pack
Normal file
Binary file not shown.
BIN
seeding/files/637.enc.Boss014.pack
Normal file
BIN
seeding/files/637.enc.Boss014.pack
Normal file
Binary file not shown.
BIN
seeding/files/638.enc.BossStatic011.pack
Normal file
BIN
seeding/files/638.enc.BossStatic011.pack
Normal file
Binary file not shown.
BIN
seeding/files/639.enc.BossStatic014.pack
Normal file
BIN
seeding/files/639.enc.BossStatic014.pack
Normal file
Binary file not shown.
BIN
seeding/files/640.enc.BossStatic012.pack
Normal file
BIN
seeding/files/640.enc.BossStatic012.pack
Normal file
Binary file not shown.
BIN
seeding/files/641.enc.Boss015.pack
Normal file
BIN
seeding/files/641.enc.Boss015.pack
Normal file
Binary file not shown.
BIN
seeding/files/642.enc.BossStatic013.pack
Normal file
BIN
seeding/files/642.enc.BossStatic013.pack
Normal file
Binary file not shown.
BIN
seeding/files/643.enc.Boss016.pack
Normal file
BIN
seeding/files/643.enc.Boss016.pack
Normal file
Binary file not shown.
BIN
seeding/files/644.enc.Boss011.pack
Normal file
BIN
seeding/files/644.enc.Boss011.pack
Normal file
Binary file not shown.
BIN
seeding/files/645.enc.BossStatic015.pack
Normal file
BIN
seeding/files/645.enc.BossStatic015.pack
Normal file
Binary file not shown.
BIN
seeding/files/646.enc.Boss012.pack
Normal file
BIN
seeding/files/646.enc.Boss012.pack
Normal file
Binary file not shown.
BIN
seeding/files/647.enc.BossStatic016.pack
Normal file
BIN
seeding/files/647.enc.BossStatic016.pack
Normal file
Binary file not shown.
BIN
seeding/files/648.enc.Boss013.pack
Normal file
BIN
seeding/files/648.enc.Boss013.pack
Normal file
Binary file not shown.
BIN
seeding/files/654.enc.32.xml
Normal file
BIN
seeding/files/654.enc.32.xml
Normal file
Binary file not shown.
BIN
seeding/files/654.enc.Boss017.pack
Normal file
BIN
seeding/files/654.enc.Boss017.pack
Normal file
Binary file not shown.
BIN
seeding/files/656.enc.Boss018.pack
Normal file
BIN
seeding/files/656.enc.Boss018.pack
Normal file
Binary file not shown.
BIN
seeding/files/658.enc.BossStatic017.pack
Normal file
BIN
seeding/files/658.enc.BossStatic017.pack
Normal file
Binary file not shown.
BIN
seeding/files/660.enc.BossStatic018.pack
Normal file
BIN
seeding/files/660.enc.BossStatic018.pack
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user