@solana-mobile/dapp-store-cli 0.5.0 → 0.5.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/lib/CliSetup.js CHANGED
@@ -182,6 +182,7 @@ function _tryWithErrorMessage() {
182
182
  e = _state.sent();
183
183
  errorMsg = (_e_message = e === null || e === void 0 ? void 0 : e.message) !== null && _e_message !== void 0 ? _e_message : "";
184
184
  showMessage("Error", errorMsg, "error");
185
+ process.exit(-1);
185
186
  return [
186
187
  3,
187
188
  3
@@ -198,19 +199,27 @@ function _tryWithErrorMessage() {
198
199
  mainCli.name("dapp-store").version(Constants.CLI_VERSION).description("CLI to assist with publishing to the Saga Dapp Store");
199
200
  export var initCliCmd = mainCli.command("init").description("First-time initialization of tooling configuration").action(/*#__PURE__*/ _async_to_generator(function() {
200
201
  return _ts_generator(this, function(_state) {
201
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
202
- var msg;
203
- return _ts_generator(this, function(_state) {
204
- msg = initScaffold();
205
- showMessage("Initialized", msg);
202
+ switch(_state.label){
203
+ case 0:
204
+ return [
205
+ 4,
206
+ tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
207
+ var msg;
208
+ return _ts_generator(this, function(_state) {
209
+ msg = initScaffold();
210
+ showMessage("Initialized", msg);
211
+ return [
212
+ 2
213
+ ];
214
+ });
215
+ }))
216
+ ];
217
+ case 1:
218
+ _state.sent();
206
219
  return [
207
220
  2
208
221
  ];
209
- });
210
- }));
211
- return [
212
- 2
213
- ];
222
+ }
214
223
  });
215
224
  }));
216
225
  export var createCliCmd = mainCli.command("create").description("Create a `publisher`, `app`, or `release`");
@@ -218,49 +227,57 @@ export var createPublisherCliCmd = createCliCmd.command("publisher").description
218
227
  var _ref = _async_to_generator(function(param) {
219
228
  var keypair, url, dryRun, storageConfig;
220
229
  return _ts_generator(this, function(_state) {
221
- keypair = param.keypair, url = param.url, dryRun = param.dryRun, storageConfig = param.storageConfig;
222
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
223
- var signer, result, displayUrl, resultText;
224
- return _ts_generator(this, function(_state) {
225
- switch(_state.label){
226
- case 0:
227
- latestReleaseMessage();
228
- return [
229
- 4,
230
- checkForSelfUpdate()
231
- ];
232
- case 1:
233
- _state.sent();
234
- signer = parseKeypair(keypair);
235
- if (!signer) return [
236
- 3,
237
- 3
238
- ];
239
- return [
240
- 4,
241
- createPublisherCommand({
242
- signer: signer,
243
- url: url,
244
- dryRun: dryRun,
245
- storageParams: storageConfig
246
- })
247
- ];
248
- case 2:
249
- result = _state.sent();
250
- displayUrl = "https://solscan.io/token/".concat(result.publisherAddress).concat(generateNetworkSuffix(url));
251
- resultText = "Publisher NFT successfully minted:\n".concat(displayUrl);
252
- showMessage("Success", resultText);
253
- _state.label = 3;
254
- case 3:
255
- return [
256
- 2
257
- ];
258
- }
259
- });
260
- }));
261
- return [
262
- 2
263
- ];
230
+ switch(_state.label){
231
+ case 0:
232
+ keypair = param.keypair, url = param.url, dryRun = param.dryRun, storageConfig = param.storageConfig;
233
+ return [
234
+ 4,
235
+ tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
236
+ var signer, result, displayUrl, resultText;
237
+ return _ts_generator(this, function(_state) {
238
+ switch(_state.label){
239
+ case 0:
240
+ latestReleaseMessage();
241
+ return [
242
+ 4,
243
+ checkForSelfUpdate()
244
+ ];
245
+ case 1:
246
+ _state.sent();
247
+ signer = parseKeypair(keypair);
248
+ if (!signer) return [
249
+ 3,
250
+ 3
251
+ ];
252
+ return [
253
+ 4,
254
+ createPublisherCommand({
255
+ signer: signer,
256
+ url: url,
257
+ dryRun: dryRun,
258
+ storageParams: storageConfig
259
+ })
260
+ ];
261
+ case 2:
262
+ result = _state.sent();
263
+ displayUrl = "https://solscan.io/token/".concat(result.publisherAddress).concat(generateNetworkSuffix(url));
264
+ resultText = "Publisher NFT successfully minted:\n".concat(displayUrl);
265
+ showMessage("Success", resultText);
266
+ _state.label = 3;
267
+ case 3:
268
+ return [
269
+ 2
270
+ ];
271
+ }
272
+ });
273
+ }))
274
+ ];
275
+ case 1:
276
+ _state.sent();
277
+ return [
278
+ 2
279
+ ];
280
+ }
264
281
  });
265
282
  });
266
283
  return function(_) {
@@ -271,59 +288,67 @@ export var createAppCliCmd = createCliCmd.command("app").description("Create a a
271
288
  var _ref = _async_to_generator(function(param) {
272
289
  var publisherMintAddress, keypair, url, dryRun, storageConfig;
273
290
  return _ts_generator(this, function(_state) {
274
- publisherMintAddress = param.publisherMintAddress, keypair = param.keypair, url = param.url, dryRun = param.dryRun, storageConfig = param.storageConfig;
275
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
276
- var config, signer, result, displayUrl, resultText;
277
- return _ts_generator(this, function(_state) {
278
- switch(_state.label){
279
- case 0:
280
- latestReleaseMessage();
281
- return [
282
- 4,
283
- checkForSelfUpdate()
284
- ];
285
- case 1:
286
- _state.sent();
287
- return [
288
- 4,
289
- loadPublishDetailsWithChecks()
290
- ];
291
- case 2:
292
- config = _state.sent();
293
- if (!hasAddressInConfig(config.publisher) && !publisherMintAddress) {
294
- throw new Error("Either specify a publisher mint address in the config file or specify as a CLI argument to this command.");
295
- }
296
- signer = parseKeypair(keypair);
297
- if (!signer) return [
298
- 3,
299
- 4
300
- ];
301
- return [
302
- 4,
303
- createAppCommand({
304
- publisherMintAddress: publisherMintAddress,
305
- signer: signer,
306
- url: url,
307
- dryRun: dryRun,
308
- storageParams: storageConfig
309
- })
310
- ];
311
- case 3:
312
- result = _state.sent();
313
- displayUrl = "https://solscan.io/token/".concat(result.appAddress).concat(generateNetworkSuffix(url));
314
- resultText = "App NFT successfully minted:\n".concat(displayUrl);
315
- showMessage("Success", resultText);
316
- _state.label = 4;
317
- case 4:
318
- return [
319
- 2
320
- ];
321
- }
322
- });
323
- }));
324
- return [
325
- 2
326
- ];
291
+ switch(_state.label){
292
+ case 0:
293
+ publisherMintAddress = param.publisherMintAddress, keypair = param.keypair, url = param.url, dryRun = param.dryRun, storageConfig = param.storageConfig;
294
+ return [
295
+ 4,
296
+ tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
297
+ var config, signer, result, displayUrl, resultText;
298
+ return _ts_generator(this, function(_state) {
299
+ switch(_state.label){
300
+ case 0:
301
+ latestReleaseMessage();
302
+ return [
303
+ 4,
304
+ checkForSelfUpdate()
305
+ ];
306
+ case 1:
307
+ _state.sent();
308
+ return [
309
+ 4,
310
+ loadPublishDetailsWithChecks()
311
+ ];
312
+ case 2:
313
+ config = _state.sent();
314
+ if (!hasAddressInConfig(config.publisher) && !publisherMintAddress) {
315
+ throw new Error("Either specify a publisher mint address in the config file or specify as a CLI argument to this command.");
316
+ }
317
+ signer = parseKeypair(keypair);
318
+ if (!signer) return [
319
+ 3,
320
+ 4
321
+ ];
322
+ return [
323
+ 4,
324
+ createAppCommand({
325
+ publisherMintAddress: publisherMintAddress,
326
+ signer: signer,
327
+ url: url,
328
+ dryRun: dryRun,
329
+ storageParams: storageConfig
330
+ })
331
+ ];
332
+ case 3:
333
+ result = _state.sent();
334
+ displayUrl = "https://solscan.io/token/".concat(result.appAddress).concat(generateNetworkSuffix(url));
335
+ resultText = "App NFT successfully minted:\n".concat(displayUrl);
336
+ showMessage("Success", resultText);
337
+ _state.label = 4;
338
+ case 4:
339
+ return [
340
+ 2
341
+ ];
342
+ }
343
+ });
344
+ }))
345
+ ];
346
+ case 1:
347
+ _state.sent();
348
+ return [
349
+ 2
350
+ ];
351
+ }
327
352
  });
328
353
  });
329
354
  return function(_) {
@@ -334,64 +359,72 @@ export var createReleaseCliCmd = createCliCmd.command("release").description("Cr
334
359
  var _ref = _async_to_generator(function(param) {
335
360
  var appMintAddress, keypair, url, dryRun, buildToolsPath, storageConfig;
336
361
  return _ts_generator(this, function(_state) {
337
- appMintAddress = param.appMintAddress, keypair = param.keypair, url = param.url, dryRun = param.dryRun, buildToolsPath = param.buildToolsPath, storageConfig = param.storageConfig;
338
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
339
- var resolvedBuildToolsPath, config, signer, result, displayUrl, resultText;
340
- return _ts_generator(this, function(_state) {
341
- switch(_state.label){
342
- case 0:
343
- latestReleaseMessage();
344
- return [
345
- 4,
346
- checkForSelfUpdate()
347
- ];
348
- case 1:
349
- _state.sent();
350
- resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
351
- if (resolvedBuildToolsPath === undefined) {
352
- throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
353
- }
354
- return [
355
- 4,
356
- loadPublishDetailsWithChecks()
357
- ];
358
- case 2:
359
- config = _state.sent();
360
- if (!hasAddressInConfig(config.app) && !appMintAddress) {
361
- throw new Error("Either specify an app mint address in the config file or specify as a CLI argument to this command");
362
- }
363
- signer = parseKeypair(keypair);
364
- if (!signer) return [
365
- 3,
366
- 4
367
- ];
368
- return [
369
- 4,
370
- createReleaseCommand({
371
- appMintAddress: appMintAddress,
372
- buildToolsPath: resolvedBuildToolsPath,
373
- signer: signer,
374
- url: url,
375
- dryRun: dryRun,
376
- storageParams: storageConfig
377
- })
378
- ];
379
- case 3:
380
- result = _state.sent();
381
- displayUrl = "https://solscan.io/token/".concat(result === null || result === void 0 ? void 0 : result.releaseAddress).concat(generateNetworkSuffix(url));
382
- resultText = "Release NFT successfully minted:\n".concat(displayUrl);
383
- showMessage("Success", resultText);
384
- _state.label = 4;
385
- case 4:
386
- return [
387
- 2
388
- ];
389
- }
390
- });
391
- }));
392
- return [
393
- 2
394
- ];
362
+ switch(_state.label){
363
+ case 0:
364
+ appMintAddress = param.appMintAddress, keypair = param.keypair, url = param.url, dryRun = param.dryRun, buildToolsPath = param.buildToolsPath, storageConfig = param.storageConfig;
365
+ return [
366
+ 4,
367
+ tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
368
+ var resolvedBuildToolsPath, config, signer, result, displayUrl, resultText;
369
+ return _ts_generator(this, function(_state) {
370
+ switch(_state.label){
371
+ case 0:
372
+ latestReleaseMessage();
373
+ return [
374
+ 4,
375
+ checkForSelfUpdate()
376
+ ];
377
+ case 1:
378
+ _state.sent();
379
+ resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
380
+ if (resolvedBuildToolsPath === undefined) {
381
+ throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
382
+ }
383
+ return [
384
+ 4,
385
+ loadPublishDetailsWithChecks()
386
+ ];
387
+ case 2:
388
+ config = _state.sent();
389
+ if (!hasAddressInConfig(config.app) && !appMintAddress) {
390
+ throw new Error("Either specify an app mint address in the config file or specify as a CLI argument to this command");
391
+ }
392
+ signer = parseKeypair(keypair);
393
+ if (!signer) return [
394
+ 3,
395
+ 4
396
+ ];
397
+ return [
398
+ 4,
399
+ createReleaseCommand({
400
+ appMintAddress: appMintAddress,
401
+ buildToolsPath: resolvedBuildToolsPath,
402
+ signer: signer,
403
+ url: url,
404
+ dryRun: dryRun,
405
+ storageParams: storageConfig
406
+ })
407
+ ];
408
+ case 3:
409
+ result = _state.sent();
410
+ displayUrl = "https://solscan.io/token/".concat(result === null || result === void 0 ? void 0 : result.releaseAddress).concat(generateNetworkSuffix(url));
411
+ resultText = "Release NFT successfully minted:\n".concat(displayUrl);
412
+ showMessage("Success", resultText);
413
+ _state.label = 4;
414
+ case 4:
415
+ return [
416
+ 2
417
+ ];
418
+ }
419
+ });
420
+ }))
421
+ ];
422
+ case 1:
423
+ _state.sent();
424
+ return [
425
+ 2
426
+ ];
427
+ }
395
428
  });
396
429
  });
397
430
  return function(_) {
@@ -402,48 +435,56 @@ mainCli.command("validate").description("Validates details prior to publishing")
402
435
  var _ref = _async_to_generator(function(param) {
403
436
  var keypair, buildToolsPath;
404
437
  return _ts_generator(this, function(_state) {
405
- keypair = param.keypair, buildToolsPath = param.buildToolsPath;
406
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
407
- var resolvedBuildToolsPath, signer;
408
- return _ts_generator(this, function(_state) {
409
- switch(_state.label){
410
- case 0:
411
- latestReleaseMessage();
412
- return [
413
- 4,
414
- checkForSelfUpdate()
415
- ];
416
- case 1:
417
- _state.sent();
418
- resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
419
- if (resolvedBuildToolsPath === undefined) {
420
- throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
421
- }
422
- signer = parseKeypair(keypair);
423
- if (!signer) return [
424
- 3,
425
- 3
426
- ];
427
- return [
428
- 4,
429
- validateCommand({
430
- signer: signer,
431
- buildToolsPath: resolvedBuildToolsPath
432
- })
433
- ];
434
- case 2:
435
- _state.sent();
436
- _state.label = 3;
437
- case 3:
438
- return [
439
- 2
440
- ];
441
- }
442
- });
443
- }));
444
- return [
445
- 2
446
- ];
438
+ switch(_state.label){
439
+ case 0:
440
+ keypair = param.keypair, buildToolsPath = param.buildToolsPath;
441
+ return [
442
+ 4,
443
+ tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
444
+ var resolvedBuildToolsPath, signer;
445
+ return _ts_generator(this, function(_state) {
446
+ switch(_state.label){
447
+ case 0:
448
+ latestReleaseMessage();
449
+ return [
450
+ 4,
451
+ checkForSelfUpdate()
452
+ ];
453
+ case 1:
454
+ _state.sent();
455
+ resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
456
+ if (resolvedBuildToolsPath === undefined) {
457
+ throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
458
+ }
459
+ signer = parseKeypair(keypair);
460
+ if (!signer) return [
461
+ 3,
462
+ 3
463
+ ];
464
+ return [
465
+ 4,
466
+ validateCommand({
467
+ signer: signer,
468
+ buildToolsPath: resolvedBuildToolsPath
469
+ })
470
+ ];
471
+ case 2:
472
+ _state.sent();
473
+ _state.label = 3;
474
+ case 3:
475
+ return [
476
+ 2
477
+ ];
478
+ }
479
+ });
480
+ }))
481
+ ];
482
+ case 1:
483
+ _state.sent();
484
+ return [
485
+ 2
486
+ ];
487
+ }
447
488
  });
448
489
  });
449
490
  return function(_) {
@@ -455,65 +496,73 @@ publishCommand.command("submit").description("Submit a new app to the Solana Mob
455
496
  var _ref = _async_to_generator(function(param) {
456
497
  var appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, dryRun;
457
498
  return _ts_generator(this, function(_state) {
458
- appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, dryRun = param.dryRun;
459
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
460
- var config, signer, resultText;
461
- return _ts_generator(this, function(_state) {
462
- switch(_state.label){
463
- case 0:
464
- return [
465
- 4,
466
- checkForSelfUpdate()
467
- ];
468
- case 1:
469
- _state.sent();
470
- return [
471
- 4,
472
- checkSubmissionNetwork(url)
473
- ];
474
- case 2:
475
- _state.sent();
476
- return [
477
- 4,
478
- loadPublishDetails(Constants.getConfigFilePath())
479
- ];
480
- case 3:
481
- config = _state.sent();
482
- if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
483
- throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
484
- }
485
- signer = parseKeypair(keypair);
486
- if (!signer) return [
487
- 3,
488
- 5
489
- ];
490
- return [
491
- 4,
492
- publishSubmitCommand({
493
- appMintAddress: appMintAddress,
494
- releaseMintAddress: releaseMintAddress,
495
- signer: signer,
496
- url: url,
497
- dryRun: dryRun,
498
- compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
499
- requestorIsAuthorized: requestorIsAuthorized
500
- })
501
- ];
502
- case 4:
503
- _state.sent();
504
- resultText = "Successfully submitted to the Solana Mobile dApp publisher portal";
505
- showMessage("Success", resultText);
506
- _state.label = 5;
507
- case 5:
508
- return [
509
- 2
510
- ];
511
- }
512
- });
513
- }));
514
- return [
515
- 2
516
- ];
499
+ switch(_state.label){
500
+ case 0:
501
+ appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, dryRun = param.dryRun;
502
+ return [
503
+ 4,
504
+ tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
505
+ var config, signer, resultText;
506
+ return _ts_generator(this, function(_state) {
507
+ switch(_state.label){
508
+ case 0:
509
+ return [
510
+ 4,
511
+ checkForSelfUpdate()
512
+ ];
513
+ case 1:
514
+ _state.sent();
515
+ return [
516
+ 4,
517
+ checkSubmissionNetwork(url)
518
+ ];
519
+ case 2:
520
+ _state.sent();
521
+ return [
522
+ 4,
523
+ loadPublishDetails(Constants.getConfigFilePath())
524
+ ];
525
+ case 3:
526
+ config = _state.sent();
527
+ if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
528
+ throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
529
+ }
530
+ signer = parseKeypair(keypair);
531
+ if (!signer) return [
532
+ 3,
533
+ 5
534
+ ];
535
+ return [
536
+ 4,
537
+ publishSubmitCommand({
538
+ appMintAddress: appMintAddress,
539
+ releaseMintAddress: releaseMintAddress,
540
+ signer: signer,
541
+ url: url,
542
+ dryRun: dryRun,
543
+ compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
544
+ requestorIsAuthorized: requestorIsAuthorized
545
+ })
546
+ ];
547
+ case 4:
548
+ _state.sent();
549
+ resultText = "Successfully submitted to the Solana Mobile dApp publisher portal";
550
+ showMessage("Success", resultText);
551
+ _state.label = 5;
552
+ case 5:
553
+ return [
554
+ 2
555
+ ];
556
+ }
557
+ });
558
+ }))
559
+ ];
560
+ case 1:
561
+ _state.sent();
562
+ return [
563
+ 2
564
+ ];
565
+ }
517
566
  });
518
567
  });
519
568
  return function(_) {
@@ -524,66 +573,74 @@ publishCommand.command("update").description("Update an existing app on the Sola
524
573
  var _ref = _async_to_generator(function(param) {
525
574
  var appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, critical, dryRun;
526
575
  return _ts_generator(this, function(_state) {
527
- appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, critical = param.critical, dryRun = param.dryRun;
528
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
529
- var config, signer, resultText;
530
- return _ts_generator(this, function(_state) {
531
- switch(_state.label){
532
- case 0:
533
- return [
534
- 4,
535
- checkForSelfUpdate()
536
- ];
537
- case 1:
538
- _state.sent();
539
- return [
540
- 4,
541
- checkSubmissionNetwork(url)
542
- ];
543
- case 2:
544
- _state.sent();
545
- return [
546
- 4,
547
- loadPublishDetails(Constants.getConfigFilePath())
548
- ];
549
- case 3:
550
- config = _state.sent();
551
- if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
552
- throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
553
- }
554
- signer = parseKeypair(keypair);
555
- if (!signer) return [
556
- 3,
557
- 5
558
- ];
559
- return [
560
- 4,
561
- publishUpdateCommand({
562
- appMintAddress: appMintAddress,
563
- releaseMintAddress: releaseMintAddress,
564
- signer: signer,
565
- url: url,
566
- dryRun: dryRun,
567
- compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
568
- requestorIsAuthorized: requestorIsAuthorized,
569
- critical: critical
570
- })
571
- ];
572
- case 4:
573
- _state.sent();
574
- resultText = "dApp successfully updated on the publisher portal";
575
- showMessage("Success", resultText);
576
- _state.label = 5;
577
- case 5:
578
- return [
579
- 2
580
- ];
581
- }
582
- });
583
- }));
584
- return [
585
- 2
586
- ];
576
+ switch(_state.label){
577
+ case 0:
578
+ appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, critical = param.critical, dryRun = param.dryRun;
579
+ return [
580
+ 4,
581
+ tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
582
+ var config, signer, resultText;
583
+ return _ts_generator(this, function(_state) {
584
+ switch(_state.label){
585
+ case 0:
586
+ return [
587
+ 4,
588
+ checkForSelfUpdate()
589
+ ];
590
+ case 1:
591
+ _state.sent();
592
+ return [
593
+ 4,
594
+ checkSubmissionNetwork(url)
595
+ ];
596
+ case 2:
597
+ _state.sent();
598
+ return [
599
+ 4,
600
+ loadPublishDetails(Constants.getConfigFilePath())
601
+ ];
602
+ case 3:
603
+ config = _state.sent();
604
+ if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
605
+ throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
606
+ }
607
+ signer = parseKeypair(keypair);
608
+ if (!signer) return [
609
+ 3,
610
+ 5
611
+ ];
612
+ return [
613
+ 4,
614
+ publishUpdateCommand({
615
+ appMintAddress: appMintAddress,
616
+ releaseMintAddress: releaseMintAddress,
617
+ signer: signer,
618
+ url: url,
619
+ dryRun: dryRun,
620
+ compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
621
+ requestorIsAuthorized: requestorIsAuthorized,
622
+ critical: critical
623
+ })
624
+ ];
625
+ case 4:
626
+ _state.sent();
627
+ resultText = "dApp successfully updated on the publisher portal";
628
+ showMessage("Success", resultText);
629
+ _state.label = 5;
630
+ case 5:
631
+ return [
632
+ 2
633
+ ];
634
+ }
635
+ });
636
+ }))
637
+ ];
638
+ case 1:
639
+ _state.sent();
640
+ return [
641
+ 2
642
+ ];
643
+ }
587
644
  });
588
645
  });
589
646
  return function(_) {
@@ -594,65 +651,73 @@ publishCommand.command("remove").description("Remove an existing app from the So
594
651
  var _ref = _async_to_generator(function(param) {
595
652
  var appMintAddress, releaseMintAddress, keypair, url, requestorIsAuthorized, critical, dryRun;
596
653
  return _ts_generator(this, function(_state) {
597
- appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, requestorIsAuthorized = param.requestorIsAuthorized, critical = param.critical, dryRun = param.dryRun;
598
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
599
- var config, signer, resultText;
600
- return _ts_generator(this, function(_state) {
601
- switch(_state.label){
602
- case 0:
603
- return [
604
- 4,
605
- checkForSelfUpdate()
606
- ];
607
- case 1:
608
- _state.sent();
609
- return [
610
- 4,
611
- checkSubmissionNetwork(url)
612
- ];
613
- case 2:
614
- _state.sent();
615
- return [
616
- 4,
617
- loadPublishDetails(Constants.getConfigFilePath())
618
- ];
619
- case 3:
620
- config = _state.sent();
621
- if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
622
- throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
623
- }
624
- signer = parseKeypair(keypair);
625
- if (!signer) return [
626
- 3,
627
- 5
628
- ];
629
- return [
630
- 4,
631
- publishRemoveCommand({
632
- appMintAddress: appMintAddress,
633
- releaseMintAddress: releaseMintAddress,
634
- signer: signer,
635
- url: url,
636
- dryRun: dryRun,
637
- requestorIsAuthorized: requestorIsAuthorized,
638
- critical: critical
639
- })
640
- ];
641
- case 4:
642
- _state.sent();
643
- resultText = "dApp successfully removed from the publisher portal";
644
- showMessage("Success", resultText);
645
- _state.label = 5;
646
- case 5:
647
- return [
648
- 2
649
- ];
650
- }
651
- });
652
- }));
653
- return [
654
- 2
655
- ];
654
+ switch(_state.label){
655
+ case 0:
656
+ appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, requestorIsAuthorized = param.requestorIsAuthorized, critical = param.critical, dryRun = param.dryRun;
657
+ return [
658
+ 4,
659
+ tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
660
+ var config, signer, resultText;
661
+ return _ts_generator(this, function(_state) {
662
+ switch(_state.label){
663
+ case 0:
664
+ return [
665
+ 4,
666
+ checkForSelfUpdate()
667
+ ];
668
+ case 1:
669
+ _state.sent();
670
+ return [
671
+ 4,
672
+ checkSubmissionNetwork(url)
673
+ ];
674
+ case 2:
675
+ _state.sent();
676
+ return [
677
+ 4,
678
+ loadPublishDetails(Constants.getConfigFilePath())
679
+ ];
680
+ case 3:
681
+ config = _state.sent();
682
+ if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
683
+ throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
684
+ }
685
+ signer = parseKeypair(keypair);
686
+ if (!signer) return [
687
+ 3,
688
+ 5
689
+ ];
690
+ return [
691
+ 4,
692
+ publishRemoveCommand({
693
+ appMintAddress: appMintAddress,
694
+ releaseMintAddress: releaseMintAddress,
695
+ signer: signer,
696
+ url: url,
697
+ dryRun: dryRun,
698
+ requestorIsAuthorized: requestorIsAuthorized,
699
+ critical: critical
700
+ })
701
+ ];
702
+ case 4:
703
+ _state.sent();
704
+ resultText = "dApp successfully removed from the publisher portal";
705
+ showMessage("Success", resultText);
706
+ _state.label = 5;
707
+ case 5:
708
+ return [
709
+ 2
710
+ ];
711
+ }
712
+ });
713
+ }))
714
+ ];
715
+ case 1:
716
+ _state.sent();
717
+ return [
718
+ 2
719
+ ];
720
+ }
656
721
  });
657
722
  });
658
723
  return function(_) {
@@ -663,65 +728,73 @@ publishCommand.command("support <request_details>").description("Submit a suppor
663
728
  var _ref = _async_to_generator(function(requestDetails, param) {
664
729
  var appMintAddress, releaseMintAddress, keypair, url, requestorIsAuthorized, dryRun;
665
730
  return _ts_generator(this, function(_state) {
666
- appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, requestorIsAuthorized = param.requestorIsAuthorized, dryRun = param.dryRun;
667
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
668
- var config, signer, resultText;
669
- return _ts_generator(this, function(_state) {
670
- switch(_state.label){
671
- case 0:
672
- return [
673
- 4,
674
- checkForSelfUpdate()
675
- ];
676
- case 1:
677
- _state.sent();
678
- return [
679
- 4,
680
- checkSubmissionNetwork(url)
681
- ];
682
- case 2:
683
- _state.sent();
684
- return [
685
- 4,
686
- loadPublishDetails(Constants.getConfigFilePath())
687
- ];
688
- case 3:
689
- config = _state.sent();
690
- if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
691
- throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
692
- }
693
- signer = parseKeypair(keypair);
694
- if (!signer) return [
695
- 3,
696
- 5
697
- ];
698
- return [
699
- 4,
700
- publishSupportCommand({
701
- appMintAddress: appMintAddress,
702
- releaseMintAddress: releaseMintAddress,
703
- signer: signer,
704
- url: url,
705
- dryRun: dryRun,
706
- requestorIsAuthorized: requestorIsAuthorized,
707
- requestDetails: requestDetails
708
- })
709
- ];
710
- case 4:
711
- _state.sent();
712
- resultText = "Support request sent successfully";
713
- showMessage("Success", resultText);
714
- _state.label = 5;
715
- case 5:
716
- return [
717
- 2
718
- ];
719
- }
720
- });
721
- }));
722
- return [
723
- 2
724
- ];
731
+ switch(_state.label){
732
+ case 0:
733
+ appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, requestorIsAuthorized = param.requestorIsAuthorized, dryRun = param.dryRun;
734
+ return [
735
+ 4,
736
+ tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
737
+ var config, signer, resultText;
738
+ return _ts_generator(this, function(_state) {
739
+ switch(_state.label){
740
+ case 0:
741
+ return [
742
+ 4,
743
+ checkForSelfUpdate()
744
+ ];
745
+ case 1:
746
+ _state.sent();
747
+ return [
748
+ 4,
749
+ checkSubmissionNetwork(url)
750
+ ];
751
+ case 2:
752
+ _state.sent();
753
+ return [
754
+ 4,
755
+ loadPublishDetails(Constants.getConfigFilePath())
756
+ ];
757
+ case 3:
758
+ config = _state.sent();
759
+ if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
760
+ throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
761
+ }
762
+ signer = parseKeypair(keypair);
763
+ if (!signer) return [
764
+ 3,
765
+ 5
766
+ ];
767
+ return [
768
+ 4,
769
+ publishSupportCommand({
770
+ appMintAddress: appMintAddress,
771
+ releaseMintAddress: releaseMintAddress,
772
+ signer: signer,
773
+ url: url,
774
+ dryRun: dryRun,
775
+ requestorIsAuthorized: requestorIsAuthorized,
776
+ requestDetails: requestDetails
777
+ })
778
+ ];
779
+ case 4:
780
+ _state.sent();
781
+ resultText = "Support request sent successfully";
782
+ showMessage("Success", resultText);
783
+ _state.label = 5;
784
+ case 5:
785
+ return [
786
+ 2
787
+ ];
788
+ }
789
+ });
790
+ }))
791
+ ];
792
+ case 1:
793
+ _state.sent();
794
+ return [
795
+ 2
796
+ ];
797
+ }
725
798
  });
726
799
  });
727
800
  return function(requestDetails, _) {