rn-update-cli 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.
Files changed (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +167 -0
  3. package/README.zh-CN.md +167 -0
  4. package/cli.json +525 -0
  5. package/lib/api.d.ts +56 -0
  6. package/lib/api.js +671 -0
  7. package/lib/app.d.ts +107 -0
  8. package/lib/app.js +329 -0
  9. package/lib/auto-update.d.ts +35 -0
  10. package/lib/auto-update.js +507 -0
  11. package/lib/bin.d.ts +2 -0
  12. package/lib/bin.js +133 -0
  13. package/lib/bundle-pack.d.ts +6 -0
  14. package/lib/bundle-pack.js +91 -0
  15. package/lib/bundle-runner.d.ts +168 -0
  16. package/lib/bundle-runner.js +1305 -0
  17. package/lib/bundle.d.ts +45 -0
  18. package/lib/bundle.js +226 -0
  19. package/lib/cache.d.ts +10 -0
  20. package/lib/cache.js +25 -0
  21. package/lib/commands.d.ts +11 -0
  22. package/lib/commands.js +72 -0
  23. package/lib/diff.d.ts +18 -0
  24. package/lib/diff.js +690 -0
  25. package/lib/exports.d.ts +11 -0
  26. package/lib/exports.js +20 -0
  27. package/lib/install.d.ts +9 -0
  28. package/lib/install.js +51 -0
  29. package/lib/locales/en.d.ts +187 -0
  30. package/lib/locales/en.js +194 -0
  31. package/lib/locales/zh.d.ts +187 -0
  32. package/lib/locales/zh.js +194 -0
  33. package/lib/native-package.d.ts +21 -0
  34. package/lib/native-package.js +298 -0
  35. package/lib/package.d.ts +68 -0
  36. package/lib/package.js +487 -0
  37. package/lib/provider.d.ts +24 -0
  38. package/lib/provider.js +244 -0
  39. package/lib/standalone-publish.d.ts +17 -0
  40. package/lib/standalone-publish.js +433 -0
  41. package/lib/symbolicate.d.ts +35 -0
  42. package/lib/symbolicate.js +130 -0
  43. package/lib/types.d.ts +152 -0
  44. package/lib/types.js +2 -0
  45. package/lib/user.d.ts +8 -0
  46. package/lib/user.js +50 -0
  47. package/lib/utils/add-gitignore.d.ts +6 -0
  48. package/lib/utils/add-gitignore.js +44 -0
  49. package/lib/utils/app-info-parser/aab.d.ts +27 -0
  50. package/lib/utils/app-info-parser/aab.js +256 -0
  51. package/lib/utils/app-info-parser/apk.d.ts +19 -0
  52. package/lib/utils/app-info-parser/apk.js +95 -0
  53. package/lib/utils/app-info-parser/app.d.ts +9 -0
  54. package/lib/utils/app-info-parser/app.js +15 -0
  55. package/lib/utils/app-info-parser/index.d.ts +21 -0
  56. package/lib/utils/app-info-parser/index.js +51 -0
  57. package/lib/utils/app-info-parser/ipa.d.ts +19 -0
  58. package/lib/utils/app-info-parser/ipa.js +101 -0
  59. package/lib/utils/app-info-parser/resource-finder.d.ts +49 -0
  60. package/lib/utils/app-info-parser/resource-finder.js +429 -0
  61. package/lib/utils/app-info-parser/utils.d.ts +36 -0
  62. package/lib/utils/app-info-parser/utils.js +140 -0
  63. package/lib/utils/app-info-parser/xml-parser/binary.d.ts +61 -0
  64. package/lib/utils/app-info-parser/xml-parser/binary.js +577 -0
  65. package/lib/utils/app-info-parser/xml-parser/manifest.d.ts +15 -0
  66. package/lib/utils/app-info-parser/xml-parser/manifest.js +207 -0
  67. package/lib/utils/app-info-parser/zip.d.ts +29 -0
  68. package/lib/utils/app-info-parser/zip.js +97 -0
  69. package/lib/utils/check-lockfile.d.ts +6 -0
  70. package/lib/utils/check-lockfile.js +93 -0
  71. package/lib/utils/check-plugin.d.ts +12 -0
  72. package/lib/utils/check-plugin.js +36 -0
  73. package/lib/utils/command-result.d.ts +8 -0
  74. package/lib/utils/command-result.js +27 -0
  75. package/lib/utils/constants.d.ts +10 -0
  76. package/lib/utils/constants.js +39 -0
  77. package/lib/utils/dep-versions.d.ts +20 -0
  78. package/lib/utils/dep-versions.js +129 -0
  79. package/lib/utils/git.d.ts +14 -0
  80. package/lib/utils/git.js +64 -0
  81. package/lib/utils/hbcTransform.d.ts +111 -0
  82. package/lib/utils/hbcTransform.js +561 -0
  83. package/lib/utils/hermes-base.d.ts +227 -0
  84. package/lib/utils/hermes-base.js +1287 -0
  85. package/lib/utils/hermes-literals.d.ts +64 -0
  86. package/lib/utils/hermes-literals.js +260 -0
  87. package/lib/utils/http-helper.d.ts +10 -0
  88. package/lib/utils/http-helper.js +150 -0
  89. package/lib/utils/i18n.d.ts +22 -0
  90. package/lib/utils/i18n.js +46 -0
  91. package/lib/utils/index.d.ts +67 -0
  92. package/lib/utils/index.js +545 -0
  93. package/lib/utils/latest-version/index.d.ts +154 -0
  94. package/lib/utils/latest-version/index.js +331 -0
  95. package/lib/utils/options.d.ts +10 -0
  96. package/lib/utils/options.js +68 -0
  97. package/lib/utils/plugin-config.d.ts +14 -0
  98. package/lib/utils/plugin-config.js +66 -0
  99. package/lib/utils/runtime.d.ts +54 -0
  100. package/lib/utils/runtime.js +263 -0
  101. package/lib/utils/slim-sourcemap.d.ts +28 -0
  102. package/lib/utils/slim-sourcemap.js +106 -0
  103. package/lib/utils/zip-entries.d.ts +10 -0
  104. package/lib/utils/zip-entries.js +211 -0
  105. package/lib/utils/zip-options.d.ts +17 -0
  106. package/lib/utils/zip-options.js +190 -0
  107. package/lib/utils/zip-range.d.ts +148 -0
  108. package/lib/utils/zip-range.js +581 -0
  109. package/lib/utils/zip-raw-writer.d.ts +52 -0
  110. package/lib/utils/zip-raw-writer.js +209 -0
  111. package/lib/version-operations.d.ts +21 -0
  112. package/lib/version-operations.js +320 -0
  113. package/lib/versions.d.ts +66 -0
  114. package/lib/versions.js +402 -0
  115. package/package.json +113 -0
  116. package/proto/Configuration.proto +183 -0
  117. package/proto/Resources.proto +569 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * [INPUT]: 依赖文件系统、路径、文件前缀魔数与 ZIP 压缩等级约定
3
+ * [OUTPUT]: 对外提供 ZipEntryOptions、压缩阈值常量及条目压缩策略函数
4
+ * [POS]: CLI 归档压缩策略层,按 payload 类型选择安全且可复现的 ZIP 参数
5
+ */
6
+ export type ZipEntryOptions = {
7
+ compress?: boolean;
8
+ compressionLevel?: number;
9
+ };
10
+ export declare const ZIP_ENTRY_SNIFF_BYTES = 64;
11
+ export declare const MANIFEST_COMPRESSION_THRESHOLD_BYTES = 256;
12
+ export declare const PAYLOAD_COMPRESSION_LEVEL = 6;
13
+ export declare const MANIFEST_COMPRESSION_LEVEL = 9;
14
+ export declare function zipOptionsForPatchEntry(): ZipEntryOptions;
15
+ export declare function zipOptionsForManifestEntry(byteLength?: number): ZipEntryOptions;
16
+ export declare function zipOptionsForPayloadEntry(fileName: string, prefix?: Buffer): ZipEntryOptions;
17
+ export declare function zipOptionsForPayloadFile(filePath: string, entryName?: string): ZipEntryOptions;
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+ /**
3
+ * [INPUT]: 依赖文件系统、路径、文件前缀魔数与 ZIP 压缩等级约定
4
+ * [OUTPUT]: 对外提供 ZipEntryOptions、压缩阈值常量及条目压缩策略函数
5
+ * [POS]: CLI 归档压缩策略层,按 payload 类型选择安全且可复现的 ZIP 参数
6
+ */
7
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
+ if (k2 === undefined) k2 = k;
9
+ var desc = Object.getOwnPropertyDescriptor(m, k);
10
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
+ desc = { enumerable: true, get: function() { return m[k]; } };
12
+ }
13
+ Object.defineProperty(o, k2, desc);
14
+ }) : (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ o[k2] = m[k];
17
+ }));
18
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
19
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
20
+ }) : function(o, v) {
21
+ o["default"] = v;
22
+ });
23
+ var __importStar = (this && this.__importStar) || (function () {
24
+ var ownKeys = function(o) {
25
+ ownKeys = Object.getOwnPropertyNames || function (o) {
26
+ var ar = [];
27
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
28
+ return ar;
29
+ };
30
+ return ownKeys(o);
31
+ };
32
+ return function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ })();
40
+ var __importDefault = (this && this.__importDefault) || function (mod) {
41
+ return (mod && mod.__esModule) ? mod : { "default": mod };
42
+ };
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.MANIFEST_COMPRESSION_LEVEL = exports.PAYLOAD_COMPRESSION_LEVEL = exports.MANIFEST_COMPRESSION_THRESHOLD_BYTES = exports.ZIP_ENTRY_SNIFF_BYTES = void 0;
45
+ exports.zipOptionsForPatchEntry = zipOptionsForPatchEntry;
46
+ exports.zipOptionsForManifestEntry = zipOptionsForManifestEntry;
47
+ exports.zipOptionsForPayloadEntry = zipOptionsForPayloadEntry;
48
+ exports.zipOptionsForPayloadFile = zipOptionsForPayloadFile;
49
+ const fs = __importStar(require("fs"));
50
+ const path_1 = __importDefault(require("path"));
51
+ exports.ZIP_ENTRY_SNIFF_BYTES = 64;
52
+ exports.MANIFEST_COMPRESSION_THRESHOLD_BYTES = 256;
53
+ // Deflate level for the bundle/asset payload. Level 9 measured ~4x the CPU
54
+ // of level 6 on Hermes bytecode for ~0.6% smaller output, so 6 is the sweet
55
+ // spot; the manifest is tiny, so it can afford 9.
56
+ exports.PAYLOAD_COMPRESSION_LEVEL = 6;
57
+ exports.MANIFEST_COMPRESSION_LEVEL = 9;
58
+ const alreadyCompressedExtensions = new Set([
59
+ '.7z',
60
+ '.aab',
61
+ '.apk',
62
+ '.br',
63
+ '.bz2',
64
+ '.gif',
65
+ '.gz',
66
+ '.heic',
67
+ '.jpeg',
68
+ '.jpg',
69
+ '.lzma',
70
+ '.mp3',
71
+ '.mp4',
72
+ '.ogg',
73
+ '.png',
74
+ '.webm',
75
+ '.webp',
76
+ '.woff',
77
+ '.woff2',
78
+ '.xz',
79
+ '.zip',
80
+ '.zst',
81
+ ]);
82
+ const HERMES_MAGIC = Buffer.from([
83
+ 0xc6, 0x1f, 0xbc, 0x03, 0xc1, 0x03, 0x19, 0x1f,
84
+ ]);
85
+ const HERMES_DELTA_MAGIC = Buffer.from([
86
+ 0x39, 0xe0, 0x43, 0xfc, 0x3e, 0xfc, 0xe6, 0xe0,
87
+ ]);
88
+ function startsWith(bytes, signature) {
89
+ return (bytes.length >= signature.length &&
90
+ bytes.subarray(0, signature.length).equals(signature));
91
+ }
92
+ function hasHermesBytecodeMagic(bytes) {
93
+ return (startsWith(bytes, HERMES_MAGIC) || startsWith(bytes, HERMES_DELTA_MAGIC));
94
+ }
95
+ function hasAlreadyCompressedMagic(bytes) {
96
+ if (bytes.length < 2) {
97
+ return false;
98
+ }
99
+ if (startsWith(bytes, Buffer.from([0x89, 0x50, 0x4e, 0x47]))) {
100
+ return true;
101
+ }
102
+ if (startsWith(bytes, Buffer.from([0xff, 0xd8, 0xff]))) {
103
+ return true;
104
+ }
105
+ if (startsWith(bytes, Buffer.from('GIF87a', 'ascii')) ||
106
+ startsWith(bytes, Buffer.from('GIF89a', 'ascii'))) {
107
+ return true;
108
+ }
109
+ if (bytes.length >= 12 &&
110
+ bytes.subarray(0, 4).equals(Buffer.from('RIFF', 'ascii')) &&
111
+ bytes.subarray(8, 12).equals(Buffer.from('WEBP', 'ascii'))) {
112
+ return true;
113
+ }
114
+ if (startsWith(bytes, Buffer.from([0x50, 0x4b, 0x03, 0x04])) ||
115
+ startsWith(bytes, Buffer.from([0x50, 0x4b, 0x05, 0x06])) ||
116
+ startsWith(bytes, Buffer.from([0x50, 0x4b, 0x07, 0x08]))) {
117
+ return true;
118
+ }
119
+ if (startsWith(bytes, Buffer.from([0x1f, 0x8b]))) {
120
+ return true;
121
+ }
122
+ if (startsWith(bytes, Buffer.from('BZh', 'ascii'))) {
123
+ return true;
124
+ }
125
+ if (startsWith(bytes, Buffer.from([0xfd, 0x37, 0x7a, 0x58, 0x5a, 0x00]))) {
126
+ return true;
127
+ }
128
+ if (startsWith(bytes, Buffer.from([0x37, 0x7a, 0xbc, 0xaf, 0x27, 0x1c]))) {
129
+ return true;
130
+ }
131
+ if (startsWith(bytes, Buffer.from([0x28, 0xb5, 0x2f, 0xfd]))) {
132
+ return true;
133
+ }
134
+ if (bytes.length >= 12 && bytes.subarray(4, 8).equals(Buffer.from('ftyp'))) {
135
+ return true;
136
+ }
137
+ if (startsWith(bytes, Buffer.from('OggS', 'ascii'))) {
138
+ return true;
139
+ }
140
+ if (startsWith(bytes, Buffer.from('ID3', 'ascii'))) {
141
+ return true;
142
+ }
143
+ if (bytes[0] === 0xff && bytes.length >= 2 && (bytes[1] & 0xe0) === 0xe0) {
144
+ return true;
145
+ }
146
+ if (startsWith(bytes, Buffer.from('wOFF', 'ascii')) ||
147
+ startsWith(bytes, Buffer.from('wOF2', 'ascii'))) {
148
+ return true;
149
+ }
150
+ return false;
151
+ }
152
+ function readFilePrefix(filePath) {
153
+ const buffer = Buffer.alloc(exports.ZIP_ENTRY_SNIFF_BYTES);
154
+ const fd = fs.openSync(filePath, 'r');
155
+ try {
156
+ const bytesRead = fs.readSync(fd, buffer, 0, buffer.length, 0);
157
+ return buffer.subarray(0, bytesRead);
158
+ }
159
+ finally {
160
+ fs.closeSync(fd);
161
+ }
162
+ }
163
+ function zipOptionsForPatchEntry() {
164
+ return { compress: false };
165
+ }
166
+ function zipOptionsForManifestEntry(byteLength = 0) {
167
+ if (byteLength >= exports.MANIFEST_COMPRESSION_THRESHOLD_BYTES) {
168
+ return { compressionLevel: exports.MANIFEST_COMPRESSION_LEVEL };
169
+ }
170
+ return { compress: false };
171
+ }
172
+ function zipOptionsForPayloadEntry(fileName, prefix) {
173
+ if (prefix && prefix.length > 0) {
174
+ if (hasHermesBytecodeMagic(prefix)) {
175
+ // Hermes bytecode is binary, but still benefits significantly from zip deflate.
176
+ return { compress: true, compressionLevel: exports.PAYLOAD_COMPRESSION_LEVEL };
177
+ }
178
+ if (hasAlreadyCompressedMagic(prefix)) {
179
+ return { compress: false };
180
+ }
181
+ }
182
+ const extension = path_1.default.extname(fileName).toLowerCase();
183
+ if (alreadyCompressedExtensions.has(extension)) {
184
+ return { compress: false };
185
+ }
186
+ return { compress: true, compressionLevel: exports.PAYLOAD_COMPRESSION_LEVEL };
187
+ }
188
+ function zipOptionsForPayloadFile(filePath, entryName = filePath) {
189
+ return zipOptionsForPayloadEntry(entryName, readFilePrefix(filePath));
190
+ }
@@ -0,0 +1,148 @@
1
+ /**
2
+ * [INPUT]: 依赖 HTTP Range/If-Range 响应、ZIP 中央目录、流与 ZIP 条目读取器
3
+ * [OUTPUT]: 对外提供远程 ZIP 定位、范围读取、缓存读取器和协议错误类型
4
+ * [POS]: CLI 远程制品按需读取底座,减少 Hermes base 与 bundle 获取的网络/磁盘开销
5
+ */
6
+ import { Readable } from 'stream';
7
+ import { type Entry, RandomAccessReader, type ZipFile } from 'yauzl';
8
+ export declare const ZIP_STORED = 0;
9
+ export declare const ZIP_DEFLATED = 8;
10
+ export interface ZipEntryLocation {
11
+ fileName: string;
12
+ /** absolute offset of the compressed data, past the local file header */
13
+ dataOffset: number;
14
+ compressedSize: number;
15
+ uncompressedSize: number;
16
+ /** 0 = stored, 8 = deflate; anything else cannot be inflated here */
17
+ compressionMethod: number;
18
+ }
19
+ /** Data location of the first entry matching `matches` in a local zip. */
20
+ export declare function locateZipEntry(zipPath: string, matches: (name: string) => boolean): Promise<ZipEntryLocation | null>;
21
+ /**
22
+ * Content and data location of the first matching entry in one pass over the
23
+ * archive (publish needs both: the bundle to hash and cache, its location to
24
+ * report to the server).
25
+ */
26
+ export declare function readZipEntryWithLocation(zipPath: string, matches: (name: string) => boolean): Promise<{
27
+ data: Buffer;
28
+ location: ZipEntryLocation;
29
+ } | null>;
30
+ /**
31
+ * The `bundleOffset` / `bundleCompressedSize` / `bundleCompression` fields for
32
+ * version/create and package/create, or nothing when the entry cannot be
33
+ * fetched by a single Range request (unknown, empty or exotic compression).
34
+ */
35
+ export declare function bundleLocationFields(location: ZipEntryLocation | null | undefined): Record<string, number>;
36
+ /** Deadlines for the Range requests; every field has a default. */
37
+ export interface RangeOptions {
38
+ /** reads of at most CHUNK_BYTES (tail, headers, directory pages), default 20 s */
39
+ headerTimeoutMs?: number;
40
+ /** base deadline for larger reads (entry data, a prefetched directory), default 30 s */
41
+ dataTimeoutMs?: number;
42
+ /** added to `dataTimeoutMs` per MB requested, default 1 s */
43
+ dataTimeoutPerMbMs?: number;
44
+ }
45
+ /** The server answered a Range request with the whole body (HTTP 200). */
46
+ export declare class RangeUnsupportedError extends Error {
47
+ readonly response: Response;
48
+ constructor(response: Response);
49
+ }
50
+ interface ContentRange {
51
+ start: number;
52
+ end: number;
53
+ total: number;
54
+ }
55
+ export declare function parseContentRange(header: string | null): ContentRange | null;
56
+ /**
57
+ * The validator to send as `If-Range` on later requests for the same object,
58
+ * so a replaced archive answers 200 (handled like a server without Range)
59
+ * instead of mixing bytes of two versions. Weak ETags are not allowed there.
60
+ */
61
+ export declare function rangeValidator(headers: Headers): string | undefined;
62
+ /**
63
+ * Fetch one entry whose compressed bytes are already located (the ppk's own
64
+ * publish-time report) and decompress it. Returns the raw entry content.
65
+ */
66
+ export declare function fetchZipEntryData(url: string, location: Pick<ZipEntryLocation, 'dataOffset' | 'compressedSize' | 'compressionMethod'>, options?: RangeOptions): Promise<{
67
+ data: Buffer;
68
+ fetchedBytes: number;
69
+ totalBytes: number;
70
+ }>;
71
+ export interface HttpRangeReaderOptions extends RangeOptions {
72
+ /** validator of the archive (see `rangeValidator`), sent as If-Range */
73
+ ifRange?: string;
74
+ }
75
+ interface Chunk {
76
+ start: number;
77
+ data: Buffer;
78
+ }
79
+ /**
80
+ * yauzl reader over HTTP Range. Header reads (EOCD, central directory, local
81
+ * file headers) are widened to CHUNK_BYTES and cached. Chunks are kept as
82
+ * fetched — only overlapping ones are merged, touching ones are read across —
83
+ * so an entry's bytes are held once, and a read reuses whatever prefix the
84
+ * cache holds (typically the bytes following the local file header) before
85
+ * requesting the rest. Every request after the first carries If-Range and
86
+ * must report the same archive size.
87
+ */
88
+ export declare class HttpRangeReader extends RandomAccessReader {
89
+ private readonly url;
90
+ readonly totalSize: number;
91
+ private readonly options;
92
+ /** sorted by `start`, never overlapping */
93
+ private chunks;
94
+ /** span a header read inside it should widen to (see `hintEntry`) */
95
+ private hint;
96
+ requests: number;
97
+ fetchedBytes: number;
98
+ constructor(url: string, totalSize: number, tail?: Chunk, options?: HttpRangeReaderOptions);
99
+ /**
100
+ * The next entry to be read: yauzl first reads its local file header, and
101
+ * widening that read to the entry's data makes the data stream a cache hit
102
+ * — one request for header + bundle instead of two. The central directory
103
+ * may understate the local header's extra field, hence the slack.
104
+ */
105
+ hintEntry(entry: Entry): void;
106
+ /** Cache `data` at `start`, merging with any chunk it overlaps. */
107
+ addChunk(start: number, data: Buffer): void;
108
+ /** Fetch `[start, end)` into the cache in one request. */
109
+ prefetch(start: number, end: number): Promise<void>;
110
+ private requestOptions;
111
+ private fetchBuffer;
112
+ /**
113
+ * Contiguous cached pieces starting exactly at `start`, up to `end`: views
114
+ * into one chunk or into a run of touching chunks, possibly ending short.
115
+ */
116
+ private cachedPieces;
117
+ /** start of the cached run (touching chunks) holding byte `end - 1` */
118
+ private cachedSuffixStart;
119
+ /** start of the first cached chunk at or after `position` */
120
+ private nextCachedStart;
121
+ _readStreamForRange(start: number, end: number): Readable;
122
+ read(buffer: Buffer, offset: number, length: number, position: number, callback: (err: Error | null, bytesRead?: number) => void): void;
123
+ }
124
+ export declare function parseEndOfCentralDirectory(tail: Buffer): {
125
+ cdOffset: number;
126
+ cdSize: number;
127
+ } | null;
128
+ export type RemoteZip = {
129
+ kind: 'zip';
130
+ zipFile: ZipFile;
131
+ reader: HttpRangeReader;
132
+ }
133
+ /** the server ignored Range: the whole archive is streaming in `response` */
134
+ | {
135
+ kind: 'full';
136
+ response: Response;
137
+ };
138
+ /**
139
+ * Open a remote zip by fetching its tail (EOCD + central directory for
140
+ * typical archives) and letting yauzl read the rest on demand.
141
+ */
142
+ export declare function openRemoteZip(url: string, options?: RangeOptions): Promise<RemoteZip>;
143
+ /**
144
+ * Read the first matching entry of an opened remote zip, then close it. With
145
+ * `reader` given, the entry's header and data are fetched in one request.
146
+ */
147
+ export declare function readRemoteZipEntry(zipFile: ZipFile, matches: (name: string) => boolean, reader?: HttpRangeReader): Promise<Buffer | null>;
148
+ export {};