@gaialabs/core 0.1.14 → 0.1.15
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -771,7 +771,7 @@ declare class RomGenerator {
|
|
|
771
771
|
constructor(projectName?: string);
|
|
772
772
|
initialize(): Promise<void>;
|
|
773
773
|
validateAndDownload(sourceData: Uint8Array): Promise<boolean>;
|
|
774
|
-
generateProject(modules: string[], manualFiles?: ChunkFile[]): Promise<Uint8Array>;
|
|
774
|
+
generateProject(modules: string[], manualFiles?: ChunkFile[], unshiftManualFiles?: boolean): Promise<Uint8Array>;
|
|
775
775
|
private applyProjectInit;
|
|
776
776
|
private assembleCodeFromText;
|
|
777
777
|
private generateAsmIncludeLookups;
|
package/dist/index.d.ts
CHANGED
|
@@ -771,7 +771,7 @@ declare class RomGenerator {
|
|
|
771
771
|
constructor(projectName?: string);
|
|
772
772
|
initialize(): Promise<void>;
|
|
773
773
|
validateAndDownload(sourceData: Uint8Array): Promise<boolean>;
|
|
774
|
-
generateProject(modules: string[], manualFiles?: ChunkFile[]): Promise<Uint8Array>;
|
|
774
|
+
generateProject(modules: string[], manualFiles?: ChunkFile[], unshiftManualFiles?: boolean): Promise<Uint8Array>;
|
|
775
775
|
private applyProjectInit;
|
|
776
776
|
private assembleCodeFromText;
|
|
777
777
|
private generateAsmIncludeLookups;
|
package/dist/index.js
CHANGED
|
@@ -3690,7 +3690,7 @@ var RomGenerator = class {
|
|
|
3690
3690
|
}
|
|
3691
3691
|
return false;
|
|
3692
3692
|
}
|
|
3693
|
-
async generateProject(modules, manualFiles) {
|
|
3693
|
+
async generateProject(modules, manualFiles, unshiftManualFiles = false) {
|
|
3694
3694
|
if (!this.dbRoot) throw new Error("Database not initialized");
|
|
3695
3695
|
if (!this.sourceData) throw new Error("Source data not initialized");
|
|
3696
3696
|
const reader = new BlockReader(this.sourceData, this.dbRoot);
|
|
@@ -3701,10 +3701,15 @@ var RomGenerator = class {
|
|
|
3701
3701
|
for (const block of asmFiles) block.textData = writer.generateAsm(block);
|
|
3702
3702
|
for (const chunkFile of this.dbRoot.baseRomFiles) this.applyPatchFile(chunkFile, chunkFiles, asmFiles, patchFiles);
|
|
3703
3703
|
const moduleLookup = this.applyProjectInit(chunkFiles, asmFiles, patchFiles);
|
|
3704
|
+
if (unshiftManualFiles) {
|
|
3705
|
+
for (const file of manualFiles ?? []) this.applyPatchFile(file, chunkFiles, asmFiles, patchFiles);
|
|
3706
|
+
}
|
|
3704
3707
|
for (const module of modules) {
|
|
3705
3708
|
for (const file of moduleLookup.get(module)) this.applyPatchFile(file, chunkFiles, asmFiles, patchFiles);
|
|
3706
3709
|
}
|
|
3707
|
-
|
|
3710
|
+
if (!unshiftManualFiles) {
|
|
3711
|
+
for (const file of manualFiles ?? []) this.applyPatchFile(file, chunkFiles, asmFiles, patchFiles);
|
|
3712
|
+
}
|
|
3708
3713
|
this.assembleCodeFromText(asmFiles);
|
|
3709
3714
|
RomProcessor.applyPatches(asmFiles, patchFiles);
|
|
3710
3715
|
for (const asm of chunkFiles) shared.ChunkFileUtils.calculateSize(asm);
|