nitro-patcher 1.0.0 → 1.1.1
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 +12 -0
- package/dist/browser.js +3212 -1845
- package/dist/browser.js.LEGAL.txt +227 -0
- package/dist/browser.js.map +4 -4
- package/dist/{chunk-B7NTPBDX.js → chunk-2F24YQ5P.js} +285 -1
- package/dist/chunk-2F24YQ5P.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/nitro-helper.d.ts +1 -1
- package/dist/nitro-patch-helper.d.ts +13 -1
- package/dist/nitro-patch-helper.js +3 -1
- package/package.json +4 -3
- package/src/browser.ts +17 -0
- package/src/nitro-patch-helper.ts +2 -0
- package/src/patch/create.ts +333 -0
- package/src/patch/xdelta3-LICENSE +201 -0
- package/dist/chunk-B7NTPBDX.js.map +0 -1
package/dist/browser.d.ts
CHANGED
|
@@ -21,6 +21,17 @@ export interface BrowserPatchOptions {
|
|
|
21
21
|
maxUncompressedSize?: number;
|
|
22
22
|
maxEntries?: number;
|
|
23
23
|
}
|
|
24
|
+
export interface CreatePatchOptions extends BrowserPatchOptions {
|
|
25
|
+
metadata?: Omit<PatchMetadata, "formatVersion">;
|
|
26
|
+
readme?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CreatePatchResult {
|
|
29
|
+
buffer: Uint8Array<ArrayBuffer>;
|
|
30
|
+
changedFiles: number;
|
|
31
|
+
warnings: string[];
|
|
32
|
+
}
|
|
33
|
+
/** Create an in-memory XZP with diagnostic warnings. Call in a Web Worker. */
|
|
34
|
+
export declare const createPatch: (original: Uint8Array, modified: Uint8Array, options?: CreatePatchOptions) => Promise<CreatePatchResult>;
|
|
24
35
|
export interface DsiCheck {
|
|
25
36
|
status: "valid" | "invalid" | "not-applicable";
|
|
26
37
|
reason?: string;
|
|
@@ -72,6 +83,7 @@ export declare const readPatchInfo: (archive: Uint8Array, options?: BrowserPatch
|
|
|
72
83
|
/** Extract one file from a ZIP archive entirely in memory. */
|
|
73
84
|
export declare const extractZipEntry: (archive: Uint8Array, entryName: string, options?: BrowserPatchOptions) => Uint8Array<ArrayBuffer>;
|
|
74
85
|
export declare const PatchHelper: Readonly<{
|
|
86
|
+
createPatch: (original: Uint8Array, modified: Uint8Array, options?: CreatePatchOptions) => Promise<CreatePatchResult>;
|
|
75
87
|
extractZipEntry: (archive: Uint8Array, entryName: string, options?: BrowserPatchOptions) => Uint8Array<ArrayBuffer>;
|
|
76
88
|
patchBuffer: (original: Uint8Array, archive: Uint8Array, options?: BrowserPatchOptions) => BrowserPatchResult;
|
|
77
89
|
readPatchInfo: (archive: Uint8Array, options?: BrowserPatchOptions) => PatchInfo;
|