nitro-patcher 0.3.0 → 1.0.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/dist/browser.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export interface PatchMetadata {
2
+ formatVersion?: number;
2
3
  id?: string;
3
4
  author?: string;
4
5
  name?: string;
@@ -20,11 +21,28 @@ export interface BrowserPatchOptions {
20
21
  maxUncompressedSize?: number;
21
22
  maxEntries?: number;
22
23
  }
24
+ export interface DsiCheck {
25
+ status: "valid" | "invalid" | "not-applicable";
26
+ reason?: string;
27
+ }
28
+ export interface DsiVerification {
29
+ arm9: DsiCheck;
30
+ arm7: DsiCheck;
31
+ arm9i: DsiCheck;
32
+ arm7i: DsiCheck;
33
+ arm9NoSecure: DsiCheck;
34
+ banner: DsiCheck;
35
+ sectors: DsiCheck;
36
+ blocks: DsiCheck;
37
+ master: DsiCheck;
38
+ signature: DsiCheck;
39
+ }
23
40
  export interface BrowserPatchResult {
24
41
  buffer: Uint8Array<ArrayBuffer>;
25
42
  returnValue: "SUCCESS" | "MD5_MISMATCH";
26
43
  inputMd5: string;
27
44
  outputMd5: string;
45
+ dsi?: DsiVerification;
28
46
  }
29
47
  export interface RomInfo {
30
48
  gameTitle: string;
@@ -37,9 +55,12 @@ export interface RomInfo {
37
55
  secureArea: boolean;
38
56
  banner: boolean;
39
57
  };
58
+ dsi?: DsiVerification;
40
59
  }
41
60
  /** Parse ROM metadata entirely in memory. No filesystem or Node types required. */
42
- export declare const inspectRom: (bytes: Uint8Array) => RomInfo;
61
+ export declare const inspectRom: (bytes: Uint8Array, options?: {
62
+ dsiMode?: "legacy" | "complete";
63
+ }) => RomInfo;
43
64
  /** Synchronous CPU work; call in a Web Worker for responsive browser UIs. */
44
65
  export declare const patchBuffer: (original: Uint8Array, archive: Uint8Array, options?: BrowserPatchOptions) => BrowserPatchResult;
45
66
  /** Read and validate metadata.json from a patch package entirely in memory. */
@@ -58,5 +79,7 @@ export declare const PatchHelper: Readonly<{
58
79
  readPatchReadme: (archive: Uint8Array, options?: BrowserPatchOptions) => PatchReadme | null;
59
80
  }>;
60
81
  export declare const NitroHelper: Readonly<{
61
- inspectRom: (bytes: Uint8Array) => RomInfo;
82
+ inspectRom: (bytes: Uint8Array, options?: {
83
+ dsiMode?: "legacy" | "complete";
84
+ }) => RomInfo;
62
85
  }>;