forked from phenom/healer-man
Release Healer Man 0.1.32
This commit is contained in:
1 parent
d3d6aaebdb
commit
6dcb1034e5
102 files changed
+10772
-788
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
createContentManifest, loadCampaignDungeonPackDefinitions, scanContentSources,
|
||||
} from "./publish-content.mjs";
|
||||
import { prepareContentObjects } from "./content-objects.mjs";
|
||||
import contentPolicy from "../../shared/content-policy.json" with { type: "json" };
|
||||
|
||||
export function selectBootstrapContent(files, packDefinitions) {
|
||||
const manifest = createContentManifest(files, { packDefinitions });
|
||||
@@ -15,15 +16,12 @@ export function selectBootstrapContent(files, packDefinitions) {
|
||||
included.add(id);
|
||||
for (const dependency of packs.get(id)?.dependencies ?? []) include(dependency);
|
||||
}
|
||||
for (const pack of manifest.packs) {
|
||||
if (BUNDLED_ANDROID_PACKS.includes(pack.id) || pack.id.startsWith("dungeon:")) include(pack.id);
|
||||
}
|
||||
for (const packId of BUNDLED_ANDROID_PACKS) include(packId);
|
||||
return {
|
||||
files: files.filter((file) => included.has(file.packId)),
|
||||
packDefinitions: manifest.packs.filter((pack) => included.has(pack.id)).map((pack) => ({
|
||||
...pack,
|
||||
// Shared maps can be physically bundled without installing Manastorm gameplay.
|
||||
bundledOnAndroid: !pack.id.startsWith("manastorm:"),
|
||||
bundledOnAndroid: BUNDLED_ANDROID_PACKS.includes(pack.id),
|
||||
})),
|
||||
};
|
||||
}
|
||||
@@ -44,6 +42,11 @@ export async function prepareBootstrap(platform) {
|
||||
const prepared = await prepareContentObjects(selected.files, {
|
||||
directory: path.join(outputDirectory, "content/bundled"), baseUrl: "/content/bundled",
|
||||
});
|
||||
if (prepared.storedBytes > contentPolicy.maxBootstrapStoredBytes) {
|
||||
throw new Error(
|
||||
`Bootstrap content is ${prepared.storedBytes} bytes; the release limit is ${contentPolicy.maxBootstrapStoredBytes} bytes.`,
|
||||
);
|
||||
}
|
||||
const manifest = createContentManifest(prepared.files, {
|
||||
baseUrl: "/content/bundled", packDefinitions: selected.packDefinitions,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user