react-native-update-cli 2.4.1 → 2.5.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/cli.json +14 -0
- package/lib/bundle.js +1 -7
- package/lib/locales/en.js +3 -0
- package/lib/locales/zh.js +3 -0
- package/lib/package.js +7 -0
- package/lib/utils/app-info-parser/aab.js +266 -0
- package/lib/utils/app-info-parser/apk.js +1 -1
- package/lib/utils/app-info-parser/index.js +7 -2
- package/lib/utils/index.js +137 -0
- package/lib/versions.js +22 -0
- package/package.json +3 -2
- package/proto/Configuration.proto +183 -0
- package/proto/Resources.proto +569 -0
- package/src/bundle.ts +2 -9
- package/src/locales/en.ts +3 -0
- package/src/locales/zh.ts +3 -0
- package/src/package.ts +12 -3
- package/src/utils/app-info-parser/aab.js +326 -0
- package/src/utils/app-info-parser/apk.js +1 -1
- package/src/utils/app-info-parser/index.ts +6 -2
- package/src/utils/index.ts +154 -0
- package/src/versions.ts +26 -1
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package aapt.pb;
|
|
4
|
+
|
|
5
|
+
option java_package = "com.android.aapt";
|
|
6
|
+
|
|
7
|
+
import "Configuration.proto";
|
|
8
|
+
|
|
9
|
+
// A string pool that wraps the binary form of the C++ class android::ResStringPool.
|
|
10
|
+
message StringPool {
|
|
11
|
+
bytes data = 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// The position of a declared entity in a file.
|
|
15
|
+
message SourcePosition {
|
|
16
|
+
uint32 line_number = 1;
|
|
17
|
+
uint32 column_number = 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Developer friendly source file information for an entity in the resource table.
|
|
21
|
+
message Source {
|
|
22
|
+
// The index of the string path within the source StringPool.
|
|
23
|
+
uint32 path_idx = 1;
|
|
24
|
+
|
|
25
|
+
SourcePosition position = 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Top level message representing a resource table.
|
|
29
|
+
message ResourceTable {
|
|
30
|
+
// The string pool containing source paths referenced by Source messages.
|
|
31
|
+
StringPool source_pool = 1;
|
|
32
|
+
|
|
33
|
+
// The packages declared in this resource table.
|
|
34
|
+
repeated Package package = 2;
|
|
35
|
+
|
|
36
|
+
// The overlayable declarations in this resource table.
|
|
37
|
+
repeated Overlayable overlayable = 3;
|
|
38
|
+
|
|
39
|
+
// The tool fingerprints of the tools that built this resource table.
|
|
40
|
+
repeated ToolFingerprint tool_fingerprint = 4;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// A package declaration.
|
|
44
|
+
message Package {
|
|
45
|
+
// The package ID of this package.
|
|
46
|
+
// This is the first byte of a resource ID (0xPPTTEEEE).
|
|
47
|
+
// This is optional, and if not set, the package ID is assigned by the runtime.
|
|
48
|
+
// For the framework, this is 0x01. For the application, this is 0x7f.
|
|
49
|
+
uint32 package_id = 1;
|
|
50
|
+
|
|
51
|
+
// The Java compatible package name.
|
|
52
|
+
string package_name = 2;
|
|
53
|
+
|
|
54
|
+
// The types declared in this package.
|
|
55
|
+
repeated Type type = 3;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// A set of resources grouped under a common type (string, layout, xml, etc).
|
|
59
|
+
// This maps to the second byte of a resource ID (0xPPTTEEEE).
|
|
60
|
+
message Type {
|
|
61
|
+
// The type ID of this type.
|
|
62
|
+
// This is optional, and if not set, the type ID is assigned by the runtime.
|
|
63
|
+
uint32 type_id = 1;
|
|
64
|
+
|
|
65
|
+
// The name of this type.
|
|
66
|
+
string name = 2;
|
|
67
|
+
|
|
68
|
+
// The entries declared in this type.
|
|
69
|
+
repeated Entry entry = 3;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// A resource entry declaration.
|
|
73
|
+
// This maps to the last two bytes of a resource ID (0xPPTTEEEE).
|
|
74
|
+
message Entry {
|
|
75
|
+
// The entry ID of this entry.
|
|
76
|
+
// This is optional, and if not set, the entry ID is assigned by the runtime.
|
|
77
|
+
uint32 entry_id = 1;
|
|
78
|
+
|
|
79
|
+
// The name of this entry.
|
|
80
|
+
string name = 2;
|
|
81
|
+
|
|
82
|
+
// The visibility of this entry.
|
|
83
|
+
Visibility visibility = 3;
|
|
84
|
+
|
|
85
|
+
// The allow-new state of this entry.
|
|
86
|
+
AllowNew allow_new = 4;
|
|
87
|
+
|
|
88
|
+
// The overlayable state of this entry.
|
|
89
|
+
OverlayableItem overlayable_item = 5;
|
|
90
|
+
|
|
91
|
+
// The set of values defined for this entry, each with a different configuration.
|
|
92
|
+
repeated ConfigValue config_value = 6;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// The visibility of a resource entry.
|
|
96
|
+
message Visibility {
|
|
97
|
+
enum Level {
|
|
98
|
+
UNKNOWN = 0;
|
|
99
|
+
PRIVATE = 1;
|
|
100
|
+
PUBLIC = 2;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// The visibility level.
|
|
104
|
+
Level level = 1;
|
|
105
|
+
|
|
106
|
+
// The source of the visibility declaration.
|
|
107
|
+
Source source = 2;
|
|
108
|
+
|
|
109
|
+
// The comment associated with the visibility declaration.
|
|
110
|
+
string comment = 3;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// The allow-new state of a resource entry.
|
|
114
|
+
message AllowNew {
|
|
115
|
+
// The source of the allow-new declaration.
|
|
116
|
+
Source source = 1;
|
|
117
|
+
|
|
118
|
+
// The comment associated with the allow-new declaration.
|
|
119
|
+
string comment = 2;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// The overlayable state of a resource entry.
|
|
123
|
+
message OverlayableItem {
|
|
124
|
+
enum Policy {
|
|
125
|
+
NONE = 0;
|
|
126
|
+
PUBLIC = 1;
|
|
127
|
+
SYSTEM = 2;
|
|
128
|
+
VENDOR = 3;
|
|
129
|
+
PRODUCT = 4;
|
|
130
|
+
SIGNATURE = 5;
|
|
131
|
+
ODM = 6;
|
|
132
|
+
OEM = 7;
|
|
133
|
+
ACTOR = 8;
|
|
134
|
+
CONFIG_SIGNATURE = 9;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// The source of the overlayable declaration.
|
|
138
|
+
Source source = 1;
|
|
139
|
+
|
|
140
|
+
// The comment associated with the overlayable declaration.
|
|
141
|
+
string comment = 2;
|
|
142
|
+
|
|
143
|
+
// The policy of the overlayable declaration.
|
|
144
|
+
repeated Policy policy = 3;
|
|
145
|
+
|
|
146
|
+
// The index of the overlayable declaration in the overlayable list.
|
|
147
|
+
uint32 overlayable_idx = 4;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// A value defined for a resource entry with a specific configuration.
|
|
151
|
+
message ConfigValue {
|
|
152
|
+
// The configuration for which this value is defined.
|
|
153
|
+
Configuration config = 1;
|
|
154
|
+
|
|
155
|
+
// The value of the resource.
|
|
156
|
+
Value value = 2;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// A generic value of a resource.
|
|
160
|
+
message Value {
|
|
161
|
+
// The source of the value declaration.
|
|
162
|
+
Source source = 1;
|
|
163
|
+
|
|
164
|
+
// The comment associated with the value declaration.
|
|
165
|
+
string comment = 2;
|
|
166
|
+
|
|
167
|
+
// The value is a weak reference to another resource.
|
|
168
|
+
bool weak = 3;
|
|
169
|
+
|
|
170
|
+
// The value is a raw string.
|
|
171
|
+
Item item = 4;
|
|
172
|
+
|
|
173
|
+
// The value is a compound value.
|
|
174
|
+
CompoundValue compound_value = 5;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// A value that is a single item.
|
|
178
|
+
message Item {
|
|
179
|
+
// The value is a reference to another resource.
|
|
180
|
+
Reference ref = 1;
|
|
181
|
+
|
|
182
|
+
// The value is a string.
|
|
183
|
+
String str = 2;
|
|
184
|
+
|
|
185
|
+
// The value is a raw string.
|
|
186
|
+
RawString raw_str = 3;
|
|
187
|
+
|
|
188
|
+
// The value is a styled string.
|
|
189
|
+
StyledString styled_str = 4;
|
|
190
|
+
|
|
191
|
+
// The value is a file.
|
|
192
|
+
File file = 5;
|
|
193
|
+
|
|
194
|
+
// The value is an integer.
|
|
195
|
+
Id id = 6;
|
|
196
|
+
|
|
197
|
+
// The value is a primitive.
|
|
198
|
+
Primitive prim = 7;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// A value that is a compound value.
|
|
202
|
+
message CompoundValue {
|
|
203
|
+
// The value is an attribute.
|
|
204
|
+
Attribute attr = 1;
|
|
205
|
+
|
|
206
|
+
// The value is a style.
|
|
207
|
+
Style style = 2;
|
|
208
|
+
|
|
209
|
+
// The value is a styleable.
|
|
210
|
+
Styleable styleable = 3;
|
|
211
|
+
|
|
212
|
+
// The value is an array.
|
|
213
|
+
Array array = 4;
|
|
214
|
+
|
|
215
|
+
// The value is a plural.
|
|
216
|
+
Plural plural = 5;
|
|
217
|
+
|
|
218
|
+
// The value is a macro.
|
|
219
|
+
MacroBody macro = 6;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// A reference to another resource.
|
|
223
|
+
message Reference {
|
|
224
|
+
enum Type {
|
|
225
|
+
REFERENCE = 0;
|
|
226
|
+
ATTRIBUTE = 1;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// The type of reference.
|
|
230
|
+
Type type = 1;
|
|
231
|
+
|
|
232
|
+
// The resource ID being referenced.
|
|
233
|
+
uint32 id = 2;
|
|
234
|
+
|
|
235
|
+
// The name of the resource being referenced.
|
|
236
|
+
string name = 3;
|
|
237
|
+
|
|
238
|
+
// The private state of the reference.
|
|
239
|
+
bool private = 4;
|
|
240
|
+
|
|
241
|
+
// The dynamic reference state of the reference.
|
|
242
|
+
bool is_dynamic = 5;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// A string value.
|
|
246
|
+
message String {
|
|
247
|
+
// The string value.
|
|
248
|
+
string value = 1;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// A raw string value.
|
|
252
|
+
message RawString {
|
|
253
|
+
// The raw string value.
|
|
254
|
+
string value = 1;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// A styled string value.
|
|
258
|
+
message StyledString {
|
|
259
|
+
// The raw string value.
|
|
260
|
+
string value = 1;
|
|
261
|
+
|
|
262
|
+
// The spans of the styled string.
|
|
263
|
+
repeated Span span = 2;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// A span of a styled string.
|
|
267
|
+
message Span {
|
|
268
|
+
// The tag of the span.
|
|
269
|
+
string tag = 1;
|
|
270
|
+
|
|
271
|
+
// The first character index of the span.
|
|
272
|
+
uint32 first_char = 2;
|
|
273
|
+
|
|
274
|
+
// The last character index of the span.
|
|
275
|
+
uint32 last_char = 3;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// A file value.
|
|
279
|
+
message File {
|
|
280
|
+
// The path to the file.
|
|
281
|
+
string path = 1;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// An ID value.
|
|
285
|
+
message Id {
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// A primitive value.
|
|
289
|
+
message Primitive {
|
|
290
|
+
// The null value.
|
|
291
|
+
message NullType {}
|
|
292
|
+
// The empty value.
|
|
293
|
+
message EmptyType {}
|
|
294
|
+
|
|
295
|
+
oneof oneof_value {
|
|
296
|
+
NullType null_value = 1;
|
|
297
|
+
EmptyType empty_value = 2;
|
|
298
|
+
float float_value = 3;
|
|
299
|
+
uint32 dimension_value = 4;
|
|
300
|
+
uint32 fraction_value = 5;
|
|
301
|
+
int32 int_decimal_value = 6;
|
|
302
|
+
uint32 int_hexadecimal_value = 7;
|
|
303
|
+
bool boolean_value = 8;
|
|
304
|
+
uint32 color_argb8_value = 9;
|
|
305
|
+
uint32 color_rgb8_value = 10;
|
|
306
|
+
uint32 color_argb4_value = 11;
|
|
307
|
+
uint32 color_rgb4_value = 12;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// An attribute value.
|
|
312
|
+
message Attribute {
|
|
313
|
+
enum FormatFlags {
|
|
314
|
+
NONE = 0x0;
|
|
315
|
+
REFERENCE = 0x1;
|
|
316
|
+
STRING = 0x2;
|
|
317
|
+
INTEGER = 0x4;
|
|
318
|
+
BOOLEAN = 0x8;
|
|
319
|
+
COLOR = 0x10;
|
|
320
|
+
FLOAT = 0x20;
|
|
321
|
+
DIMENSION = 0x40;
|
|
322
|
+
FRACTION = 0x80;
|
|
323
|
+
ENUM = 0x10000;
|
|
324
|
+
FLAGS = 0x20000;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// The format flags of the attribute.
|
|
328
|
+
uint32 format_flags = 1;
|
|
329
|
+
|
|
330
|
+
// The minimum value of the attribute.
|
|
331
|
+
int32 min_int = 2;
|
|
332
|
+
|
|
333
|
+
// The maximum value of the attribute.
|
|
334
|
+
int32 max_int = 3;
|
|
335
|
+
|
|
336
|
+
// The symbols of the attribute.
|
|
337
|
+
repeated Symbol symbol = 4;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// A symbol of an attribute.
|
|
341
|
+
message Symbol {
|
|
342
|
+
// The source of the symbol declaration.
|
|
343
|
+
Source source = 1;
|
|
344
|
+
|
|
345
|
+
// The comment associated with the symbol declaration.
|
|
346
|
+
string comment = 2;
|
|
347
|
+
|
|
348
|
+
// The name of the symbol.
|
|
349
|
+
Reference name = 3;
|
|
350
|
+
|
|
351
|
+
// The value of the symbol.
|
|
352
|
+
uint32 value = 4;
|
|
353
|
+
|
|
354
|
+
// The type of the symbol.
|
|
355
|
+
uint32 type = 5;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// A style value.
|
|
359
|
+
message Style {
|
|
360
|
+
// The parent of the style.
|
|
361
|
+
Reference parent = 1;
|
|
362
|
+
|
|
363
|
+
// The source of the parent declaration.
|
|
364
|
+
Source parent_source = 2;
|
|
365
|
+
|
|
366
|
+
// The entries of the style.
|
|
367
|
+
repeated Entry entry = 3;
|
|
368
|
+
|
|
369
|
+
// An entry of a style.
|
|
370
|
+
message Entry {
|
|
371
|
+
// The source of the entry declaration.
|
|
372
|
+
Source source = 1;
|
|
373
|
+
|
|
374
|
+
// The comment associated with the entry declaration.
|
|
375
|
+
string comment = 2;
|
|
376
|
+
|
|
377
|
+
// The key of the entry.
|
|
378
|
+
Reference key = 3;
|
|
379
|
+
|
|
380
|
+
// The item of the entry.
|
|
381
|
+
Item item = 4;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// A styleable value.
|
|
386
|
+
message Styleable {
|
|
387
|
+
// The entries of the styleable.
|
|
388
|
+
repeated Entry entry = 1;
|
|
389
|
+
|
|
390
|
+
// An entry of a styleable.
|
|
391
|
+
message Entry {
|
|
392
|
+
// The source of the entry declaration.
|
|
393
|
+
Source source = 1;
|
|
394
|
+
|
|
395
|
+
// The comment associated with the entry declaration.
|
|
396
|
+
string comment = 2;
|
|
397
|
+
|
|
398
|
+
// The attribute of the entry.
|
|
399
|
+
Reference attr = 3;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// An array value.
|
|
404
|
+
message Array {
|
|
405
|
+
// The elements of the array.
|
|
406
|
+
repeated Element element = 1;
|
|
407
|
+
|
|
408
|
+
// An element of an array.
|
|
409
|
+
message Element {
|
|
410
|
+
// The source of the element declaration.
|
|
411
|
+
Source source = 1;
|
|
412
|
+
|
|
413
|
+
// The comment associated with the element declaration.
|
|
414
|
+
string comment = 2;
|
|
415
|
+
|
|
416
|
+
// The item of the element.
|
|
417
|
+
Item item = 3;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// A plural value.
|
|
422
|
+
message Plural {
|
|
423
|
+
enum Arity {
|
|
424
|
+
ZERO = 0;
|
|
425
|
+
ONE = 1;
|
|
426
|
+
TWO = 2;
|
|
427
|
+
FEW = 3;
|
|
428
|
+
MANY = 4;
|
|
429
|
+
OTHER = 5;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// The entries of the plural.
|
|
433
|
+
repeated Entry entry = 1;
|
|
434
|
+
|
|
435
|
+
// An entry of a plural.
|
|
436
|
+
message Entry {
|
|
437
|
+
// The source of the entry declaration.
|
|
438
|
+
Source source = 1;
|
|
439
|
+
|
|
440
|
+
// The comment associated with the entry declaration.
|
|
441
|
+
string comment = 2;
|
|
442
|
+
|
|
443
|
+
// The arity of the entry.
|
|
444
|
+
Arity arity = 3;
|
|
445
|
+
|
|
446
|
+
// The item of the entry.
|
|
447
|
+
Item item = 4;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// A macro body value.
|
|
452
|
+
message MacroBody {
|
|
453
|
+
// The raw string value.
|
|
454
|
+
string raw_string = 1;
|
|
455
|
+
|
|
456
|
+
// The style string value.
|
|
457
|
+
StyleString style_string = 2;
|
|
458
|
+
|
|
459
|
+
// The untranslatable sections of the macro.
|
|
460
|
+
repeated UntranslatableSection untranslatable_section = 3;
|
|
461
|
+
|
|
462
|
+
// The namespace declarations of the macro.
|
|
463
|
+
repeated NamespaceDeclaration namespace_declaration = 4;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
message StyleString {
|
|
467
|
+
string str = 1;
|
|
468
|
+
repeated Span spans = 2;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
message UntranslatableSection {
|
|
472
|
+
uint64 start_index = 1;
|
|
473
|
+
uint64 end_index = 2;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
message NamespaceDeclaration {
|
|
477
|
+
string prefix = 1;
|
|
478
|
+
string uri = 2;
|
|
479
|
+
Source source = 3;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// An overlayable declaration.
|
|
483
|
+
message Overlayable {
|
|
484
|
+
// The name of the overlayable.
|
|
485
|
+
string name = 1;
|
|
486
|
+
|
|
487
|
+
// The source of the overlayable declaration.
|
|
488
|
+
Source source = 2;
|
|
489
|
+
|
|
490
|
+
// The actor of the overlayable declaration.
|
|
491
|
+
string actor = 3;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// A tool fingerprint.
|
|
495
|
+
message ToolFingerprint {
|
|
496
|
+
// The tool name.
|
|
497
|
+
string tool = 1;
|
|
498
|
+
|
|
499
|
+
// The version of the tool.
|
|
500
|
+
string version = 2;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// A dynamic reference table.
|
|
504
|
+
message DynamicRefTable {
|
|
505
|
+
// The package ID to package name mapping.
|
|
506
|
+
repeated PackageId packageName = 1;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
message PackageId {
|
|
510
|
+
uint32 id = 1;
|
|
511
|
+
string name = 2;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// A generic XML node.
|
|
515
|
+
message XmlNode {
|
|
516
|
+
// The element node.
|
|
517
|
+
XmlElement element = 1;
|
|
518
|
+
|
|
519
|
+
// The text node.
|
|
520
|
+
string text = 2;
|
|
521
|
+
|
|
522
|
+
// The source of the node.
|
|
523
|
+
SourcePosition source = 3;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
message XmlNamespace {
|
|
527
|
+
string prefix = 1;
|
|
528
|
+
string uri = 2;
|
|
529
|
+
SourcePosition source = 3;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// An XML element.
|
|
533
|
+
message XmlElement {
|
|
534
|
+
// The namespace declarations of the element.
|
|
535
|
+
repeated XmlNamespace namespace_declaration = 1;
|
|
536
|
+
|
|
537
|
+
// The namespace URI of the element.
|
|
538
|
+
string namespace_uri = 2;
|
|
539
|
+
|
|
540
|
+
// The name of the element.
|
|
541
|
+
string name = 3;
|
|
542
|
+
|
|
543
|
+
// The attributes of the element.
|
|
544
|
+
repeated XmlAttribute attribute = 4;
|
|
545
|
+
|
|
546
|
+
// The children of the element.
|
|
547
|
+
repeated XmlNode child = 5;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// An XML attribute.
|
|
551
|
+
message XmlAttribute {
|
|
552
|
+
// The namespace URI of the attribute.
|
|
553
|
+
string namespace_uri = 1;
|
|
554
|
+
|
|
555
|
+
// The name of the attribute.
|
|
556
|
+
string name = 2;
|
|
557
|
+
|
|
558
|
+
// The value of the attribute.
|
|
559
|
+
string value = 3;
|
|
560
|
+
|
|
561
|
+
// The source of the attribute.
|
|
562
|
+
SourcePosition source = 4;
|
|
563
|
+
|
|
564
|
+
// The resource ID of the attribute.
|
|
565
|
+
uint32 resource_id = 5;
|
|
566
|
+
|
|
567
|
+
// The compiled item of the attribute.
|
|
568
|
+
Item compiled_item = 6;
|
|
569
|
+
}
|
package/src/bundle.ts
CHANGED
|
@@ -578,7 +578,6 @@ async function diffFromPPK(origin: string, next: string, output: string) {
|
|
|
578
578
|
}
|
|
579
579
|
|
|
580
580
|
const copies = {};
|
|
581
|
-
const copiesv2 = {};
|
|
582
581
|
|
|
583
582
|
const zipfile = new YazlZipFile();
|
|
584
583
|
|
|
@@ -640,7 +639,6 @@ async function diffFromPPK(origin: string, next: string, output: string) {
|
|
|
640
639
|
addEntry(base);
|
|
641
640
|
}
|
|
642
641
|
copies[entry.fileName] = originMap[entry.crc32];
|
|
643
|
-
copiesv2[entry.crc32] = entry.fileName;
|
|
644
642
|
return;
|
|
645
643
|
}
|
|
646
644
|
|
|
@@ -673,7 +671,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
|
|
|
673
671
|
|
|
674
672
|
//console.log({copies, deletes});
|
|
675
673
|
zipfile.addBuffer(
|
|
676
|
-
Buffer.from(JSON.stringify({ copies,
|
|
674
|
+
Buffer.from(JSON.stringify({ copies, deletes })),
|
|
677
675
|
'__diff.json',
|
|
678
676
|
);
|
|
679
677
|
zipfile.end();
|
|
@@ -718,7 +716,6 @@ async function diffFromPackage(
|
|
|
718
716
|
}
|
|
719
717
|
|
|
720
718
|
const copies = {};
|
|
721
|
-
const copiesv2 = {};
|
|
722
719
|
|
|
723
720
|
const zipfile = new YazlZipFile();
|
|
724
721
|
|
|
@@ -754,7 +751,6 @@ async function diffFromPackage(
|
|
|
754
751
|
// If moved from other place
|
|
755
752
|
if (originMap[entry.crc32]) {
|
|
756
753
|
copies[entry.fileName] = originMap[entry.crc32];
|
|
757
|
-
copiesv2[entry.crc32] = entry.fileName;
|
|
758
754
|
return;
|
|
759
755
|
}
|
|
760
756
|
|
|
@@ -773,10 +769,7 @@ async function diffFromPackage(
|
|
|
773
769
|
}
|
|
774
770
|
});
|
|
775
771
|
|
|
776
|
-
zipfile.addBuffer(
|
|
777
|
-
Buffer.from(JSON.stringify({ copies, copiesv2 })),
|
|
778
|
-
'__diff.json',
|
|
779
|
-
);
|
|
772
|
+
zipfile.addBuffer(Buffer.from(JSON.stringify({ copies })), '__diff.json');
|
|
780
773
|
zipfile.end();
|
|
781
774
|
await writePromise;
|
|
782
775
|
}
|
package/src/locales/en.ts
CHANGED
|
@@ -115,6 +115,7 @@ This can reduce the risk of inconsistent dependencies and supply chain attacks.
|
|
|
115
115
|
uploadingSourcemap: 'Uploading sourcemap',
|
|
116
116
|
usageDiff: 'Usage: cresc {{command}} <origin> <next>',
|
|
117
117
|
usageParseApk: 'Usage: cresc parseApk <apk file>',
|
|
118
|
+
usageParseAab: 'Usage: cresc parseAab <aab file>',
|
|
118
119
|
usageParseApp: 'Usage: cresc parseApp <app file>',
|
|
119
120
|
usageParseIpa: 'Usage: cresc parseIpa <ipa file>',
|
|
120
121
|
usageUnderDevelopment: 'Usage is under development now.',
|
|
@@ -137,6 +138,8 @@ This can reduce the risk of inconsistent dependencies and supply chain attacks.
|
|
|
137
138
|
deletePackageError:
|
|
138
139
|
'Failed to delete native package {{packageId}}: {{error}}',
|
|
139
140
|
usageDeletePackage: 'Usage: cresc deletePackage [packageId] --appId [appId]',
|
|
141
|
+
deleteVersionSuccess: 'Version {{versionId}} deleted successfully',
|
|
142
|
+
deleteVersionError: 'Failed to delete version {{versionId}}: {{error}}',
|
|
140
143
|
bundleFileNotFound:
|
|
141
144
|
'Bundle file not found! Please use default bundle file name and path.',
|
|
142
145
|
diffPackageGenerated: '{{- output}} generated.',
|
package/src/locales/zh.ts
CHANGED
|
@@ -109,6 +109,7 @@ export default {
|
|
|
109
109
|
uploadingSourcemap: '正在上传 sourcemap',
|
|
110
110
|
usageDiff: '用法:pushy {{command}} <origin> <next>',
|
|
111
111
|
usageParseApk: '使用方法: pushy parseApk apk后缀文件',
|
|
112
|
+
usageParseAab: '使用方法: pushy parseAab aab后缀文件',
|
|
112
113
|
usageParseApp: '使用方法: pushy parseApp app后缀文件',
|
|
113
114
|
usageParseIpa: '使用方法: pushy parseIpa ipa后缀文件',
|
|
114
115
|
usageUploadApk: '使用方法: pushy uploadApk apk后缀文件',
|
|
@@ -129,6 +130,8 @@ export default {
|
|
|
129
130
|
deletePackageError: '删除原生包 {{packageId}} 失败: {{error}}',
|
|
130
131
|
usageDeletePackage:
|
|
131
132
|
'使用方法: pushy deletePackage [packageId] --appId [appId]',
|
|
133
|
+
deleteVersionSuccess: '热更包 {{versionId}} 删除成功',
|
|
134
|
+
deleteVersionError: '删除热更包 {{versionId}} 失败: {{error}}',
|
|
132
135
|
bundleFileNotFound: '未找到 bundle 文件!请使用默认的 bundle 文件名和路径。',
|
|
133
136
|
diffPackageGenerated: '{{- output}} 已生成。',
|
|
134
137
|
nodeBsdiffRequired:
|
package/src/package.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { getPlatform, getSelectedApp } from './app';
|
|
|
6
6
|
|
|
7
7
|
import Table from 'tty-table';
|
|
8
8
|
import type { Platform } from './types';
|
|
9
|
-
import { getApkInfo, getAppInfo, getIpaInfo } from './utils';
|
|
9
|
+
import { getApkInfo, getAppInfo, getIpaInfo, getAabInfo } from './utils';
|
|
10
10
|
import { depVersions } from './utils/dep-versions';
|
|
11
11
|
import { getCommitInfo } from './utils/git';
|
|
12
12
|
|
|
@@ -207,6 +207,13 @@ export const packageCommands = {
|
|
|
207
207
|
}
|
|
208
208
|
console.log(await getApkInfo(fn));
|
|
209
209
|
},
|
|
210
|
+
parseAab: async ({ args }: { args: string[] }) => {
|
|
211
|
+
const fn = args[0];
|
|
212
|
+
if (!fn || !fn.endsWith('.aab')) {
|
|
213
|
+
throw new Error(t('usageParseAab'));
|
|
214
|
+
}
|
|
215
|
+
console.log(await getAabInfo(fn));
|
|
216
|
+
},
|
|
210
217
|
packages: async ({ options }: { options: { platform: Platform } }) => {
|
|
211
218
|
const platform = await getPlatform(options.platform);
|
|
212
219
|
const { appId } = await getSelectedApp(platform);
|
|
@@ -217,7 +224,7 @@ export const packageCommands = {
|
|
|
217
224
|
options,
|
|
218
225
|
}: {
|
|
219
226
|
args: string[];
|
|
220
|
-
options: { appId?: string
|
|
227
|
+
options: { appId?: string; packageId?: string; packageVersion?: string };
|
|
221
228
|
}) => {
|
|
222
229
|
let { appId, packageId, packageVersion } = options;
|
|
223
230
|
|
|
@@ -232,7 +239,9 @@ export const packageCommands = {
|
|
|
232
239
|
if (!allPkgs) {
|
|
233
240
|
throw new Error(t('noPackagesFound', { appId }));
|
|
234
241
|
}
|
|
235
|
-
const selectedPackage = allPkgs.find(
|
|
242
|
+
const selectedPackage = allPkgs.find(
|
|
243
|
+
(pkg) => pkg.name === packageVersion,
|
|
244
|
+
);
|
|
236
245
|
if (!selectedPackage) {
|
|
237
246
|
throw new Error(t('packageNotFound', { packageVersion }));
|
|
238
247
|
}
|