@solana-mobile/dapp-store-cli 0.10.0 → 0.11.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 (34) hide show
  1. package/lib/CliSetup.js +468 -568
  2. package/lib/CliUtils.js +18 -33
  3. package/lib/__tests__/CliSetupTest.js +4 -27
  4. package/lib/commands/ValidateCommand.js +15 -40
  5. package/lib/commands/create/CreateCliApp.js +18 -30
  6. package/lib/commands/create/CreateCliRelease.js +16 -26
  7. package/lib/commands/create/index.js +0 -1
  8. package/lib/commands/publish/PublishCliRemove.js +11 -19
  9. package/lib/commands/publish/PublishCliSubmit.js +11 -19
  10. package/lib/commands/publish/PublishCliSupport.js +11 -19
  11. package/lib/commands/publish/PublishCliUpdate.js +11 -19
  12. package/lib/commands/utils.js +6 -14
  13. package/lib/config/PublishDetails.js +125 -257
  14. package/lib/generated/config_obj.json +1 -1
  15. package/lib/generated/config_schema.json +1 -1
  16. package/lib/index.js +6 -14
  17. package/lib/package.json +2 -2
  18. package/lib/prebuild_schema/publishing_source.yaml +0 -4
  19. package/lib/upload/CachedStorageDriver.js +13 -19
  20. package/package.json +2 -2
  21. package/src/CliSetup.ts +5 -54
  22. package/src/CliUtils.ts +5 -11
  23. package/src/__tests__/CliSetupTest.ts +8 -43
  24. package/src/commands/ValidateCommand.ts +0 -20
  25. package/src/commands/create/CreateCliApp.ts +1 -8
  26. package/src/commands/create/index.ts +0 -1
  27. package/src/commands/publish/PublishCliRemove.ts +1 -2
  28. package/src/commands/publish/PublishCliSubmit.ts +1 -2
  29. package/src/commands/publish/PublishCliSupport.ts +1 -2
  30. package/src/commands/publish/PublishCliUpdate.ts +1 -2
  31. package/src/config/PublishDetails.ts +4 -57
  32. package/src/prebuild_schema/publishing_source.yaml +0 -4
  33. package/lib/commands/create/CreateCliPublisher.js +0 -237
  34. package/src/commands/create/CreateCliPublisher.ts +0 -87
@@ -112,7 +112,7 @@ function _unsupported_iterable_to_array(o, minLen) {
112
112
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
113
113
  }
114
114
  function _ts_generator(thisArg, body) {
115
- var f, y, t, g, _ = {
115
+ var f, y, t, _ = {
116
116
  label: 0,
117
117
  sent: function() {
118
118
  if (t[0] & 1) throw t[1];
@@ -120,12 +120,8 @@ function _ts_generator(thisArg, body) {
120
120
  },
121
121
  trys: [],
122
122
  ops: []
123
- };
124
- return g = {
125
- next: verb(0),
126
- "throw": verb(1),
127
- "return": verb(2)
128
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
123
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
124
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
129
125
  return this;
130
126
  }), g;
131
127
  function verb(n) {
@@ -138,7 +134,7 @@ function _ts_generator(thisArg, body) {
138
134
  }
139
135
  function step(op) {
140
136
  if (f) throw new TypeError("Generator is already executing.");
141
- while(_)try {
137
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
142
138
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
143
139
  if (y = 0, t) op = [
144
140
  op[0] & 2,
@@ -236,8 +232,8 @@ var ajv = new Ajv({
236
232
  strictTuples: false
237
233
  });
238
234
  var validate = ajv.compile(schemaJson);
239
- export var loadPublishDetails = /*#__PURE__*/ function() {
240
- var _ref = _async_to_generator(function(configPath) {
235
+ export var loadPublishDetails = function(configPath) {
236
+ return _async_to_generator(function() {
241
237
  var configFile, valid;
242
238
  return _ts_generator(this, function(_state) {
243
239
  switch(_state.label){
@@ -259,19 +255,15 @@ export var loadPublishDetails = /*#__PURE__*/ function() {
259
255
  ];
260
256
  }
261
257
  });
262
- });
263
- return function loadPublishDetails(configPath) {
264
- return _ref.apply(this, arguments);
265
- };
266
- }();
267
- export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
268
- var _ref = _async_to_generator(function() {
269
- var buildToolsDir, _config_publisher_media_find, _config_publisher_media, _config_app_media_find, _config_app_media, _config_release_media_find, _config_release_media, _config_release_media_find1, _config_release_media1, _config_release_media_find2, _config_release_media2, _config_release_media3, _config_release_media4, config, apkEntry, apkPath, _, publisherIcon, iconPath, iconBuffer, appIcon, iconPath1, iconBuffer1, releaseIcon, iconPath2, banner, bannerPath, featureGraphic, featureGraphicPath, screenshots, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, item, mediaPath, err, videos, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator1, _step1, video, mediaPath1, err, googlePkg, pkgCompare, alpha_testers, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, wallet;
270
- var _arguments = arguments;
258
+ })();
259
+ };
260
+ export var loadPublishDetailsWithChecks = function() {
261
+ var buildToolsDir = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
262
+ return _async_to_generator(function() {
263
+ var _config_app_media_find, _config_app_media, _config_release_media_find, _config_release_media, _config_release_media_find1, _config_release_media1, _config_release_media_find2, _config_release_media2, _config_release_media3, _config_release_media4, config, apkEntry, apkPath, _, appIcon, iconPath, iconBuffer, releaseIcon, iconPath1, banner, bannerPath, featureGraphic, featureGraphicPath, screenshots, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, item, mediaPath, err, videos, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator1, _step1, video, mediaPath1, err, googlePkg, pkgCompare, alpha_testers, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, wallet;
271
264
  return _ts_generator(this, function(_state) {
272
265
  switch(_state.label){
273
266
  case 0:
274
- buildToolsDir = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : null;
275
267
  return [
276
268
  4,
277
269
  loadPublishDetails(Constants.getConfigFilePath())
@@ -299,17 +291,17 @@ export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
299
291
  _.android_details = _state.sent();
300
292
  _state.label = 3;
301
293
  case 3:
302
- publisherIcon = (_config_publisher_media = config.publisher.media) === null || _config_publisher_media === void 0 ? void 0 : (_config_publisher_media_find = _config_publisher_media.find(function(asset) {
294
+ appIcon = (_config_app_media = config.app.media) === null || _config_app_media === void 0 ? void 0 : (_config_app_media_find = _config_app_media.find(function(asset) {
303
295
  return asset.purpose === "icon";
304
- })) === null || _config_publisher_media_find === void 0 ? void 0 : _config_publisher_media_find.uri;
305
- if (!publisherIcon) return [
296
+ })) === null || _config_app_media_find === void 0 ? void 0 : _config_app_media_find.uri;
297
+ if (!appIcon) return [
306
298
  3,
307
299
  6
308
300
  ];
309
- iconPath = path.join(process.cwd(), publisherIcon);
301
+ iconPath = path.join(process.cwd(), appIcon);
310
302
  return [
311
303
  4,
312
- checkIconCompatibility(iconPath, "Publisher")
304
+ checkIconCompatibility(iconPath, "App")
313
305
  ];
314
306
  case 4:
315
307
  _state.sent();
@@ -319,48 +311,25 @@ export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
319
311
  ];
320
312
  case 5:
321
313
  iconBuffer = _state.sent();
322
- config.publisher.icon = toMetaplexFile(iconBuffer, publisherIcon);
314
+ config.app.icon = toMetaplexFile(iconBuffer, appIcon);
323
315
  _state.label = 6;
324
316
  case 6:
325
- appIcon = (_config_app_media = config.app.media) === null || _config_app_media === void 0 ? void 0 : (_config_app_media_find = _config_app_media.find(function(asset) {
326
- return asset.purpose === "icon";
327
- })) === null || _config_app_media_find === void 0 ? void 0 : _config_app_media_find.uri;
328
- if (!appIcon) return [
329
- 3,
330
- 9
331
- ];
332
- iconPath1 = path.join(process.cwd(), appIcon);
333
- return [
334
- 4,
335
- checkIconCompatibility(iconPath1, "App")
336
- ];
337
- case 7:
338
- _state.sent();
339
- return [
340
- 4,
341
- fs.promises.readFile(iconPath1)
342
- ];
343
- case 8:
344
- iconBuffer1 = _state.sent();
345
- config.app.icon = toMetaplexFile(iconBuffer1, appIcon);
346
- _state.label = 9;
347
- case 9:
348
317
  releaseIcon = (_config_release_media = config.release.media) === null || _config_release_media === void 0 ? void 0 : (_config_release_media_find = _config_release_media.find(function(asset) {
349
318
  return asset.purpose === "icon";
350
319
  })) === null || _config_release_media_find === void 0 ? void 0 : _config_release_media_find.uri;
351
320
  if (!releaseIcon) return [
352
321
  3,
353
- 11
322
+ 8
354
323
  ];
355
- iconPath2 = path.join(process.cwd(), releaseIcon);
324
+ iconPath1 = path.join(process.cwd(), releaseIcon);
356
325
  return [
357
326
  4,
358
- checkIconCompatibility(iconPath2, "Release")
327
+ checkIconCompatibility(iconPath1, "Release")
359
328
  ];
360
- case 10:
329
+ case 7:
361
330
  _state.sent();
362
- _state.label = 11;
363
- case 11:
331
+ _state.label = 8;
332
+ case 8:
364
333
  if (!appIcon && !releaseIcon) {
365
334
  throw new Error("Please specify at least one media entry of type icon in your configuration file");
366
335
  }
@@ -369,33 +338,38 @@ export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
369
338
  })) === null || _config_release_media_find1 === void 0 ? void 0 : _config_release_media_find1.uri;
370
339
  if (!banner) return [
371
340
  3,
372
- 13
341
+ 10
373
342
  ];
374
343
  bannerPath = path.join(process.cwd(), banner);
375
344
  return [
376
345
  4,
377
346
  checkBannerCompatibility(bannerPath)
378
347
  ];
379
- case 12:
348
+ case 9:
380
349
  _state.sent();
381
- _state.label = 13;
382
- case 13:
350
+ return [
351
+ 3,
352
+ 11
353
+ ];
354
+ case 10:
355
+ throw new Error("Please specify banner image of size 1200x600 in your configuration file");
356
+ case 11:
383
357
  featureGraphic = (_config_release_media2 = config.release.media) === null || _config_release_media2 === void 0 ? void 0 : (_config_release_media_find2 = _config_release_media2.find(function(asset) {
384
358
  return asset.purpose === "featureGraphic";
385
359
  })) === null || _config_release_media_find2 === void 0 ? void 0 : _config_release_media_find2.uri;
386
360
  if (!featureGraphic) return [
387
361
  3,
388
- 15
362
+ 13
389
363
  ];
390
364
  featureGraphicPath = path.join(process.cwd(), featureGraphic);
391
365
  return [
392
366
  4,
393
367
  checkFeatureGraphicCompatibility(featureGraphicPath)
394
368
  ];
395
- case 14:
369
+ case 12:
396
370
  _state.sent();
397
- _state.label = 15;
398
- case 15:
371
+ _state.label = 13;
372
+ case 13:
399
373
  config.release.media.forEach(function(item) {
400
374
  var mediaPath = path.join(process.cwd(), item.uri);
401
375
  if (!fs.existsSync(mediaPath)) {
@@ -412,20 +386,20 @@ export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
412
386
  return asset.purpose === "screenshot";
413
387
  });
414
388
  _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
415
- _state.label = 16;
416
- case 16:
389
+ _state.label = 14;
390
+ case 14:
417
391
  _state.trys.push([
418
- 16,
419
- 21,
420
- 22,
421
- 23
392
+ 14,
393
+ 19,
394
+ 20,
395
+ 21
422
396
  ]);
423
397
  _iterator = screenshots[Symbol.iterator]();
424
- _state.label = 17;
425
- case 17:
398
+ _state.label = 15;
399
+ case 15:
426
400
  if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
427
401
  3,
428
- 20
402
+ 18
429
403
  ];
430
404
  item = _step.value;
431
405
  mediaPath = path.join(process.cwd(), item.uri);
@@ -433,31 +407,31 @@ export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
433
407
  4,
434
408
  checkScreenshotDimensions(mediaPath)
435
409
  ];
436
- case 18:
410
+ case 16:
437
411
  if (_state.sent()) {
438
412
  throw new Error("Screenshot ".concat(mediaPath, " must be at least 1080px in width and height."));
439
413
  }
440
- _state.label = 19;
441
- case 19:
414
+ _state.label = 17;
415
+ case 17:
442
416
  _iteratorNormalCompletion = true;
443
417
  return [
444
418
  3,
445
- 17
419
+ 15
446
420
  ];
447
- case 20:
421
+ case 18:
448
422
  return [
449
423
  3,
450
- 23
424
+ 21
451
425
  ];
452
- case 21:
426
+ case 19:
453
427
  err = _state.sent();
454
428
  _didIteratorError = true;
455
429
  _iteratorError = err;
456
430
  return [
457
431
  3,
458
- 23
432
+ 21
459
433
  ];
460
- case 22:
434
+ case 20:
461
435
  try {
462
436
  if (!_iteratorNormalCompletion && _iterator.return != null) {
463
437
  _iterator.return();
@@ -470,25 +444,25 @@ export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
470
444
  return [
471
445
  7
472
446
  ];
473
- case 23:
447
+ case 21:
474
448
  videos = (_config_release_media4 = config.release.media) === null || _config_release_media4 === void 0 ? void 0 : _config_release_media4.filter(function(asset) {
475
449
  return asset.purpose === "video";
476
450
  });
477
451
  _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
478
- _state.label = 24;
479
- case 24:
452
+ _state.label = 22;
453
+ case 22:
480
454
  _state.trys.push([
481
- 24,
482
- 29,
483
- 30,
484
- 31
455
+ 22,
456
+ 27,
457
+ 28,
458
+ 29
485
459
  ]);
486
460
  _iterator1 = videos[Symbol.iterator]();
487
- _state.label = 25;
488
- case 25:
461
+ _state.label = 23;
462
+ case 23:
489
463
  if (!!(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done)) return [
490
464
  3,
491
- 28
465
+ 26
492
466
  ];
493
467
  video = _step1.value;
494
468
  mediaPath1 = path.join(process.cwd(), video.uri);
@@ -496,31 +470,31 @@ export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
496
470
  4,
497
471
  checkVideoDimensions(mediaPath1)
498
472
  ];
499
- case 26:
473
+ case 24:
500
474
  if (_state.sent()) {
501
475
  throw new Error("Video ".concat(mediaPath1, " must be at least 720px in width and height."));
502
476
  }
503
- _state.label = 27;
504
- case 27:
477
+ _state.label = 25;
478
+ case 25:
505
479
  _iteratorNormalCompletion1 = true;
506
480
  return [
507
481
  3,
508
- 25
482
+ 23
509
483
  ];
510
- case 28:
484
+ case 26:
511
485
  return [
512
486
  3,
513
- 31
487
+ 29
514
488
  ];
515
- case 29:
489
+ case 27:
516
490
  err = _state.sent();
517
491
  _didIteratorError1 = true;
518
492
  _iteratorError1 = err;
519
493
  return [
520
494
  3,
521
- 31
495
+ 29
522
496
  ];
523
- case 30:
497
+ case 28:
524
498
  try {
525
499
  if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
526
500
  _iterator1.return();
@@ -533,7 +507,7 @@ export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
533
507
  return [
534
508
  7
535
509
  ];
536
- case 31:
510
+ case 29:
537
511
  if (screenshots.length + videos.length < 4) {
538
512
  throw new Error("At least 4 screenshots or videos are required for publishing a new release. Found only ".concat(screenshots.length + videos.length));
539
513
  }
@@ -581,13 +555,10 @@ export var loadPublishDetailsWithChecks = /*#__PURE__*/ function() {
581
555
  ];
582
556
  }
583
557
  });
584
- });
585
- return function loadPublishDetailsWithChecks() {
586
- return _ref.apply(this, arguments);
587
- };
588
- }();
589
- var checkIconCompatibility = /*#__PURE__*/ function() {
590
- var _ref = _async_to_generator(function(path, typeString) {
558
+ })();
559
+ };
560
+ var checkIconCompatibility = function(path, typeString) {
561
+ return _async_to_generator(function() {
591
562
  return _ts_generator(this, function(_state) {
592
563
  switch(_state.label){
593
564
  case 0:
@@ -607,13 +578,10 @@ var checkIconCompatibility = /*#__PURE__*/ function() {
607
578
  ];
608
579
  }
609
580
  });
610
- });
611
- return function checkIconCompatibility(path, typeString) {
612
- return _ref.apply(this, arguments);
613
- };
614
- }();
615
- var checkBannerCompatibility = /*#__PURE__*/ function() {
616
- var _ref = _async_to_generator(function(path) {
581
+ })();
582
+ };
583
+ var checkBannerCompatibility = function(path) {
584
+ return _async_to_generator(function() {
617
585
  return _ts_generator(this, function(_state) {
618
586
  switch(_state.label){
619
587
  case 0:
@@ -633,13 +601,10 @@ var checkBannerCompatibility = /*#__PURE__*/ function() {
633
601
  ];
634
602
  }
635
603
  });
636
- });
637
- return function checkBannerCompatibility(path) {
638
- return _ref.apply(this, arguments);
639
- };
640
- }();
641
- var checkFeatureGraphicCompatibility = /*#__PURE__*/ function() {
642
- var _ref = _async_to_generator(function(path) {
604
+ })();
605
+ };
606
+ var checkFeatureGraphicCompatibility = function(path) {
607
+ return _async_to_generator(function() {
643
608
  return _ts_generator(this, function(_state) {
644
609
  switch(_state.label){
645
610
  case 0:
@@ -659,11 +624,8 @@ var checkFeatureGraphicCompatibility = /*#__PURE__*/ function() {
659
624
  ];
660
625
  }
661
626
  });
662
- });
663
- return function checkFeatureGraphicCompatibility(path) {
664
- return _ref.apply(this, arguments);
665
- };
666
- }();
627
+ })();
628
+ };
667
629
  var checkImageExtension = function(uri) {
668
630
  var fileExt = path.extname(uri).toLowerCase();
669
631
  return fileExt == ".png" || fileExt == ".jpg" || fileExt == ".jpeg" || fileExt == ".webp";
@@ -694,8 +656,8 @@ var checkVideoExtension = function(uri) {
694
656
  throw new Error("Please ensure all translations of short_description are between 0 and 30 characters");
695
657
  }
696
658
  };
697
- var checkIconDimensions = /*#__PURE__*/ function() {
698
- var _ref = _async_to_generator(function(iconPath) {
659
+ var checkIconDimensions = function(iconPath) {
660
+ return _async_to_generator(function() {
699
661
  var size, _size_width;
700
662
  return _ts_generator(this, function(_state) {
701
663
  switch(_state.label){
@@ -712,13 +674,10 @@ var checkIconDimensions = /*#__PURE__*/ function() {
712
674
  ];
713
675
  }
714
676
  });
715
- });
716
- return function checkIconDimensions(iconPath) {
717
- return _ref.apply(this, arguments);
718
- };
719
- }();
720
- var checkScreenshotDimensions = /*#__PURE__*/ function() {
721
- var _ref = _async_to_generator(function(imagePath) {
677
+ })();
678
+ };
679
+ var checkScreenshotDimensions = function(imagePath) {
680
+ return _async_to_generator(function() {
722
681
  var size, _size_width, _size_height;
723
682
  return _ts_generator(this, function(_state) {
724
683
  switch(_state.label){
@@ -735,13 +694,10 @@ var checkScreenshotDimensions = /*#__PURE__*/ function() {
735
694
  ];
736
695
  }
737
696
  });
738
- });
739
- return function checkScreenshotDimensions(imagePath) {
740
- return _ref.apply(this, arguments);
741
- };
742
- }();
743
- var checkBannerDimensions = /*#__PURE__*/ function() {
744
- var _ref = _async_to_generator(function(imagePath) {
697
+ })();
698
+ };
699
+ var checkBannerDimensions = function(imagePath) {
700
+ return _async_to_generator(function() {
745
701
  var size, _size_width, _size_height;
746
702
  return _ts_generator(this, function(_state) {
747
703
  switch(_state.label){
@@ -758,13 +714,10 @@ var checkBannerDimensions = /*#__PURE__*/ function() {
758
714
  ];
759
715
  }
760
716
  });
761
- });
762
- return function checkBannerDimensions(imagePath) {
763
- return _ref.apply(this, arguments);
764
- };
765
- }();
766
- var checkFeatureGraphicDimensions = /*#__PURE__*/ function() {
767
- var _ref = _async_to_generator(function(imagePath) {
717
+ })();
718
+ };
719
+ var checkFeatureGraphicDimensions = function(imagePath) {
720
+ return _async_to_generator(function() {
768
721
  var size, _size_width, _size_height;
769
722
  return _ts_generator(this, function(_state) {
770
723
  switch(_state.label){
@@ -781,13 +734,10 @@ var checkFeatureGraphicDimensions = /*#__PURE__*/ function() {
781
734
  ];
782
735
  }
783
736
  });
784
- });
785
- return function checkFeatureGraphicDimensions(imagePath) {
786
- return _ref.apply(this, arguments);
787
- };
788
- }();
789
- var checkVideoDimensions = /*#__PURE__*/ function() {
790
- var _ref = _async_to_generator(function(imagePath) {
737
+ })();
738
+ };
739
+ var checkVideoDimensions = function(imagePath) {
740
+ return _async_to_generator(function() {
791
741
  var size, _size_width, _size_height;
792
742
  return _ts_generator(this, function(_state) {
793
743
  switch(_state.label){
@@ -804,13 +754,10 @@ var checkVideoDimensions = /*#__PURE__*/ function() {
804
754
  ];
805
755
  }
806
756
  });
807
- });
808
- return function checkVideoDimensions(imagePath) {
809
- return _ref.apply(this, arguments);
810
- };
811
- }();
812
- var getAndroidDetails = /*#__PURE__*/ function() {
813
- var _ref = _async_to_generator(function(aaptDir, apkPath) {
757
+ })();
758
+ };
759
+ var getAndroidDetails = function(aaptDir, apkPath) {
760
+ return _async_to_generator(function() {
814
761
  var stdout, appPackage, versionCode, versionName, minSdk, permissions, locales, isDebuggable, _locales_values, localeArray, localesSrc, _appPackage_, _minSdk_, _versionCode_, _versionName_, _tmp, e;
815
762
  return _ts_generator(this, function(_state) {
816
763
  switch(_state.label){
@@ -852,13 +799,9 @@ var getAndroidDetails = /*#__PURE__*/ function() {
852
799
  if (permissions.includes("android.permission.REQUEST_INSTALL_PACKAGES") || permissions.includes("android.permission.REQUEST_DELETE_PACKAGES")) {
853
800
  showMessage("App requests install or delete permission", "App will be subject to additional security reviews for listing on Solana dApp Store and processing time may be beyond regular review time", "warning");
854
801
  }
855
- if (permissions.includes("com.solanamobile.seedvault.ACCESS_SEED_VAULT")) {
802
+ if (permissions.includes("com.solanamobile.seedvault.ACCESS_SEED_VAULT") || permissions.includes("com.solanamobile.seedvault.ACCESS_SEED_VAULT_PRIVILEGED")) {
856
803
  showMessage("App requests Seed Vault permission", "If this is not a wallet application, your app maybe rejected from listing on Solana dApp Store.", "warning");
857
804
  }
858
- if (localeArray.length >= 60) {
859
- showMessage("The bundle apk claims supports for following locales", "Claim for supported locales::\n" + localeArray + "\nIf this release does not support all these locales the release may be rejected" + "\nSee details at https://developer.android.com/guide/topics/resources/multilingual-support#design for configuring the supported locales", "warning");
860
- }
861
- checkAbis(apkPath);
862
805
  _tmp = {
863
806
  android_package: (_appPackage_ = appPackage === null || appPackage === void 0 ? void 0 : appPackage[1]) !== null && _appPackage_ !== void 0 ? _appPackage_ : "",
864
807
  min_sdk: parseInt((_minSdk_ = minSdk === null || minSdk === void 0 ? void 0 : minSdk[1]) !== null && _minSdk_ !== void 0 ? _minSdk_ : "0", 10),
@@ -891,77 +834,10 @@ var getAndroidDetails = /*#__PURE__*/ function() {
891
834
  ];
892
835
  }
893
836
  });
894
- });
895
- return function getAndroidDetails(aaptDir, apkPath) {
896
- return _ref.apply(this, arguments);
897
- };
898
- }();
899
- var checkAbis = /*#__PURE__*/ function() {
900
- var _ref = _async_to_generator(function(apkPath) {
901
- var stdout, amV7libs, x86libs, x8664libs, messages, e;
902
- return _ts_generator(this, function(_state) {
903
- switch(_state.label){
904
- case 0:
905
- _state.trys.push([
906
- 0,
907
- 2,
908
- ,
909
- 3
910
- ]);
911
- return [
912
- 4,
913
- runExec("zipinfo -s ".concat(apkPath, " | grep .so$"))
914
- ];
915
- case 1:
916
- stdout = _state.sent().stdout;
917
- amV7libs = _to_consumable_array(stdout.matchAll(/lib\/armeabi-v7a\/(.*)/g)).flatMap(function(permission) {
918
- return permission[1];
919
- });
920
- x86libs = _to_consumable_array(stdout.matchAll(/lib\/x86\/(.*)/g)).flatMap(function(permission) {
921
- return permission[1];
922
- });
923
- x8664libs = _to_consumable_array(stdout.matchAll(/lib\/x86_64\/(.*)/g)).flatMap(function(permission) {
924
- return permission[1];
925
- });
926
- if (amV7libs.length > 0 || x86libs.length > 0 || x8664libs.length > 0) {
927
- messages = [
928
- "Solana dApp Store only supports arm64-v8a abi.",
929
- "Your apk file contains following unsupported abis"
930
- ].concat(_to_consumable_array(amV7libs.length > 0 ? [
931
- "\narmeabi-v7a:\n" + amV7libs
932
- ] : []), _to_consumable_array(x86libs.length > 0 ? [
933
- "\nx86:\n" + x86libs
934
- ] : []), _to_consumable_array(x8664libs.length > 0 ? [
935
- "\nx86_64:\n" + x8664libs
936
- ] : []), [
937
- "\n\nAlthough your app works fine on Saga, these library files are unused and increase the size of apk file making the download and update time longer for your app.",
938
- "\n\nSee https://developer.android.com/games/optimize/64-bit#build-with-64-bit for how to optimize your app."
939
- ]).join('\n');
940
- showMessage("Unsupported files found in apk", messages, "warning");
941
- }
942
- return [
943
- 3,
944
- 3
945
- ];
946
- case 2:
947
- e = _state.sent();
948
- return [
949
- 3,
950
- 3
951
- ];
952
- case 3:
953
- return [
954
- 2
955
- ];
956
- }
957
- });
958
- });
959
- return function checkAbis(apkPath) {
960
- return _ref.apply(this, arguments);
961
- };
962
- }();
963
- export var extractCertFingerprint = /*#__PURE__*/ function() {
964
- var _ref = _async_to_generator(function(aaptDir, apkPath) {
837
+ })();
838
+ };
839
+ export var extractCertFingerprint = function(aaptDir, apkPath) {
840
+ return _async_to_generator(function() {
965
841
  var stdout, regex, match;
966
842
  return _ts_generator(this, function(_state) {
967
843
  switch(_state.label){
@@ -987,18 +863,15 @@ export var extractCertFingerprint = /*#__PURE__*/ function() {
987
863
  ];
988
864
  }
989
865
  });
990
- });
991
- return function extractCertFingerprint(aaptDir, apkPath) {
992
- return _ref.apply(this, arguments);
993
- };
994
- }();
995
- export var writeToPublishDetails = /*#__PURE__*/ function() {
996
- var _ref = _async_to_generator(function(param) {
997
- var publisher, app, release, lastSubmittedVersionOnChain, lastUpdatedVersionOnStore, currentConfig, _publisher_address, _app_address, _release_address, newConfig;
866
+ })();
867
+ };
868
+ export var writeToPublishDetails = function(param) {
869
+ var app = param.app, release = param.release, lastSubmittedVersionOnChain = param.lastSubmittedVersionOnChain, lastUpdatedVersionOnStore = param.lastUpdatedVersionOnStore;
870
+ return _async_to_generator(function() {
871
+ var currentConfig, _app_address, _release_address, newConfig;
998
872
  return _ts_generator(this, function(_state) {
999
873
  switch(_state.label){
1000
874
  case 0:
1001
- publisher = param.publisher, app = param.app, release = param.release, lastSubmittedVersionOnChain = param.lastSubmittedVersionOnChain, lastUpdatedVersionOnStore = param.lastUpdatedVersionOnStore;
1002
875
  return [
1003
876
  4,
1004
877
  loadPublishDetailsWithChecks()
@@ -1008,9 +881,7 @@ export var writeToPublishDetails = /*#__PURE__*/ function() {
1008
881
  delete currentConfig.publisher.icon;
1009
882
  delete currentConfig.app.icon;
1010
883
  newConfig = {
1011
- publisher: _object_spread_props(_object_spread({}, currentConfig.publisher), {
1012
- address: (_publisher_address = publisher === null || publisher === void 0 ? void 0 : publisher.address) !== null && _publisher_address !== void 0 ? _publisher_address : currentConfig.publisher.address
1013
- }),
884
+ publisher: _object_spread({}, currentConfig.publisher),
1014
885
  app: _object_spread_props(_object_spread({}, currentConfig.app), {
1015
886
  address: (_app_address = app === null || app === void 0 ? void 0 : app.address) !== null && _app_address !== void 0 ? _app_address : currentConfig.app.address
1016
887
  }),
@@ -1029,8 +900,5 @@ export var writeToPublishDetails = /*#__PURE__*/ function() {
1029
900
  ];
1030
901
  }
1031
902
  });
1032
- });
1033
- return function writeToPublishDetails(_) {
1034
- return _ref.apply(this, arguments);
1035
- };
1036
- }();
903
+ })();
904
+ };